@wix/stores 1.0.959 → 1.0.960

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 (121) hide show
  1. package/_sdk-exports/context-category-by-id-context-provider/runtime.d.ts +4026 -0
  2. package/_sdk-exports/context-category-by-id-context-provider/runtime.js +2 -0
  3. package/_sdk-exports/context-category-by-slug-context-provider/runtime.d.ts +4046 -0
  4. package/_sdk-exports/context-category-by-slug-context-provider/runtime.js +2 -0
  5. package/_sdk-exports/context-category-info-context-provider/runtime.d.ts +3530 -0
  6. package/_sdk-exports/context-category-info-context-provider/runtime.js +2 -0
  7. package/_sdk-exports/context-category-list-context-provider/runtime.d.ts +101 -0
  8. package/_sdk-exports/context-category-list-context-provider/runtime.js +2 -0
  9. package/_sdk-exports/context-product-by-id-context-provider/runtime.d.ts +4221 -0
  10. package/_sdk-exports/context-product-by-id-context-provider/runtime.js +2 -0
  11. package/_sdk-exports/context-product-by-slug-context-provider/runtime.d.ts +4217 -0
  12. package/_sdk-exports/context-product-by-slug-context-provider/runtime.js +2 -0
  13. package/_sdk-exports/context-product-context-provider/runtime.d.ts +4449 -0
  14. package/_sdk-exports/context-product-context-provider/runtime.js +2 -0
  15. package/_sdk-exports/context-product-item-context-provider/runtime.d.ts +4102 -0
  16. package/_sdk-exports/context-product-item-context-provider/runtime.js +2 -0
  17. package/_sdk-exports/context-product-list-context-provider/runtime.d.ts +3969 -0
  18. package/_sdk-exports/context-product-list-context-provider/runtime.js +2 -0
  19. package/_sdk-exports/context-promotion-item-context-provider/runtime.d.ts +85 -0
  20. package/_sdk-exports/context-promotion-item-context-provider/runtime.js +2 -0
  21. package/build/cjs/context-category-by-id-context-provider.d.ts +4026 -0
  22. package/build/cjs/context-category-by-id-context-provider.js +3572 -0
  23. package/build/cjs/context-category-by-id-context-provider.js.map +1 -0
  24. package/build/cjs/context-category-by-slug-context-provider.d.ts +4046 -0
  25. package/build/cjs/context-category-by-slug-context-provider.js +3674 -0
  26. package/build/cjs/context-category-by-slug-context-provider.js.map +1 -0
  27. package/build/cjs/context-category-info-context-provider.d.ts +3530 -0
  28. package/build/cjs/context-category-info-context-provider.js +1201 -0
  29. package/build/cjs/context-category-info-context-provider.js.map +1 -0
  30. package/build/cjs/context-category-list-context-provider.d.ts +101 -0
  31. package/build/cjs/context-category-list-context-provider.js +587 -0
  32. package/build/cjs/context-category-list-context-provider.js.map +1 -0
  33. package/build/cjs/context-product-by-id-context-provider.d.ts +4221 -0
  34. package/build/cjs/context-product-by-id-context-provider.js +3454 -0
  35. package/build/cjs/context-product-by-id-context-provider.js.map +1 -0
  36. package/build/cjs/context-product-by-slug-context-provider.d.ts +4217 -0
  37. package/build/cjs/context-product-by-slug-context-provider.js +3477 -0
  38. package/build/cjs/context-product-by-slug-context-provider.js.map +1 -0
  39. package/build/cjs/context-product-context-provider.d.ts +4449 -0
  40. package/build/cjs/context-product-context-provider.js +587 -0
  41. package/build/cjs/context-product-context-provider.js.map +1 -0
  42. package/build/cjs/context-product-item-context-provider.d.ts +4102 -0
  43. package/build/cjs/context-product-item-context-provider.js +4396 -0
  44. package/build/cjs/context-product-item-context-provider.js.map +1 -0
  45. package/build/cjs/context-product-list-context-provider.d.ts +3970 -0
  46. package/build/cjs/context-product-list-context-provider.js +587 -0
  47. package/build/cjs/context-product-list-context-provider.js.map +1 -0
  48. package/build/cjs/context-promotion-item-context-provider.d.ts +85 -0
  49. package/build/cjs/context-promotion-item-context-provider.js +592 -0
  50. package/build/cjs/context-promotion-item-context-provider.js.map +1 -0
  51. package/build/es/context-category-by-id-context-provider.d.mts +4026 -0
  52. package/build/es/context-category-by-id-context-provider.mjs +3532 -0
  53. package/build/es/context-category-by-id-context-provider.mjs.map +1 -0
  54. package/build/es/context-category-by-slug-context-provider.d.mts +4046 -0
  55. package/build/es/context-category-by-slug-context-provider.mjs +3634 -0
  56. package/build/es/context-category-by-slug-context-provider.mjs.map +1 -0
  57. package/build/es/context-category-info-context-provider.d.mts +3530 -0
  58. package/build/es/context-category-info-context-provider.mjs +1172 -0
  59. package/build/es/context-category-info-context-provider.mjs.map +1 -0
  60. package/build/es/context-category-list-context-provider.d.mts +101 -0
  61. package/build/es/context-category-list-context-provider.mjs +558 -0
  62. package/build/es/context-category-list-context-provider.mjs.map +1 -0
  63. package/build/es/context-product-by-id-context-provider.d.mts +4221 -0
  64. package/build/es/context-product-by-id-context-provider.mjs +3415 -0
  65. package/build/es/context-product-by-id-context-provider.mjs.map +1 -0
  66. package/build/es/context-product-by-slug-context-provider.d.mts +4217 -0
  67. package/build/es/context-product-by-slug-context-provider.mjs +3437 -0
  68. package/build/es/context-product-by-slug-context-provider.mjs.map +1 -0
  69. package/build/es/context-product-context-provider.d.mts +4449 -0
  70. package/build/es/context-product-context-provider.mjs +558 -0
  71. package/build/es/context-product-context-provider.mjs.map +1 -0
  72. package/build/es/context-product-item-context-provider.d.mts +4102 -0
  73. package/build/es/context-product-item-context-provider.mjs +4356 -0
  74. package/build/es/context-product-item-context-provider.mjs.map +1 -0
  75. package/build/es/context-product-list-context-provider.d.mts +3970 -0
  76. package/build/es/context-product-list-context-provider.mjs +558 -0
  77. package/build/es/context-product-list-context-provider.mjs.map +1 -0
  78. package/build/es/context-promotion-item-context-provider.d.mts +85 -0
  79. package/build/es/context-promotion-item-context-provider.mjs +563 -0
  80. package/build/es/context-promotion-item-context-provider.mjs.map +1 -0
  81. package/build/internal/cjs/context-category-by-id-context-provider.d.ts +4026 -0
  82. package/build/internal/cjs/context-category-by-slug-context-provider.d.ts +4046 -0
  83. package/build/internal/cjs/context-category-info-context-provider.d.ts +3530 -0
  84. package/build/internal/cjs/context-category-list-context-provider.d.ts +101 -0
  85. package/build/internal/cjs/context-product-by-id-context-provider.d.ts +4221 -0
  86. package/build/internal/cjs/context-product-by-slug-context-provider.d.ts +4217 -0
  87. package/build/internal/cjs/context-product-context-provider.d.ts +4449 -0
  88. package/build/internal/cjs/context-product-item-context-provider.d.ts +4102 -0
  89. package/build/internal/cjs/context-product-list-context-provider.d.ts +3970 -0
  90. package/build/internal/cjs/context-promotion-item-context-provider.d.ts +85 -0
  91. package/build/internal/es/context-category-by-id-context-provider.d.mts +4026 -0
  92. package/build/internal/es/context-category-by-slug-context-provider.d.mts +4046 -0
  93. package/build/internal/es/context-category-info-context-provider.d.mts +3530 -0
  94. package/build/internal/es/context-category-list-context-provider.d.mts +101 -0
  95. package/build/internal/es/context-product-by-id-context-provider.d.mts +4221 -0
  96. package/build/internal/es/context-product-by-slug-context-provider.d.mts +4217 -0
  97. package/build/internal/es/context-product-context-provider.d.mts +4449 -0
  98. package/build/internal/es/context-product-item-context-provider.d.mts +4102 -0
  99. package/build/internal/es/context-product-list-context-provider.d.mts +3970 -0
  100. package/build/internal/es/context-promotion-item-context-provider.d.mts +85 -0
  101. package/category-by-id-context-provider/package.json +3 -0
  102. package/category-by-slug-context-provider/package.json +3 -0
  103. package/category-info-context-provider/package.json +3 -0
  104. package/category-list-context-provider/package.json +3 -0
  105. package/context/category-by-id-context-provider/package.json +3 -0
  106. package/context/category-by-slug-context-provider/package.json +3 -0
  107. package/context/category-info-context-provider/package.json +3 -0
  108. package/context/category-list-context-provider/package.json +3 -0
  109. package/context/product-by-id-context-provider/package.json +3 -0
  110. package/context/product-by-slug-context-provider/package.json +3 -0
  111. package/context/product-context-provider/package.json +3 -0
  112. package/context/product-item-context-provider/package.json +3 -0
  113. package/context/product-list-context-provider/package.json +3 -0
  114. package/context/promotion-item-context-provider/package.json +3 -0
  115. package/package.json +159 -24
  116. package/product-by-id-context-provider/package.json +3 -0
  117. package/product-by-slug-context-provider/package.json +3 -0
  118. package/product-context-provider/package.json +3 -0
  119. package/product-item-context-provider/package.json +3 -0
  120. package/product-list-context-provider/package.json +3 -0
  121. package/promotion-item-context-provider/package.json +3 -0
@@ -0,0 +1,3477 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to2, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to2, key) && key !== except)
16
+ __defProp(to2, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to2;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // context-product-by-slug-context-provider.ts
31
+ var context_product_by_slug_context_provider_exports = {};
32
+ __export(context_product_by_slug_context_provider_exports, {
33
+ NO_PRODUCT_SLUG_ERROR: () => Xl,
34
+ ProductBySlugContextProvider: () => $l,
35
+ default: () => $l,
36
+ injectAccessTokenGetter: () => eu,
37
+ useProductBySlugContext: () => Zl
38
+ });
39
+ module.exports = __toCommonJS(context_product_by_slug_context_provider_exports);
40
+
41
+ // _sdk-exports/context-product-by-slug-context-provider/runtime.js
42
+ var import_react = require("react");
43
+ var import_product_context_provider = __toESM(require("@wix/stores/product-context-provider"));
44
+ var import_services_manager_react = require("@wix/services-manager-react");
45
+ var import_jsx_runtime = require("react/jsx-runtime");
46
+ var d = Object.create;
47
+ var f = Object.defineProperty;
48
+ var p = Object.getOwnPropertyDescriptor;
49
+ var m = Object.getOwnPropertyNames;
50
+ var h = Object.getPrototypeOf;
51
+ var g = Object.prototype.hasOwnProperty;
52
+ var _ = (e2, t2) => () => (t2 || (e2((t2 = { exports: {} }).exports, t2), e2 = null), t2.exports);
53
+ var v = (e2, t2, n2, r2) => {
54
+ if (t2 && typeof t2 == `object` || typeof t2 == `function`) for (var i2 = m(t2), a2 = 0, o2 = i2.length, s2; a2 < o2; a2++) s2 = i2[a2], !g.call(e2, s2) && s2 !== n2 && f(e2, s2, { get: ((e3) => t2[e3]).bind(null, s2), enumerable: !(r2 = p(t2, s2)) || r2.enumerable });
55
+ return e2;
56
+ };
57
+ var y = (e2, t2, n2) => (n2 = e2 == null ? {} : d(h(e2)), v(t2 || !e2 || !e2.__esModule || !g.call(e2, `default`) ? f(n2, `default`, { value: e2, enumerable: true }) : n2, e2));
58
+ var b = {};
59
+ function x(e2, t2 = false, n2 = (e3) => e3) {
60
+ return () => ({ __type: `event-definition`, type: e2, isDomainEvent: t2, transformations: n2 });
61
+ }
62
+ var S = (e2) => {
63
+ switch (e2) {
64
+ case `get`:
65
+ case `GET`:
66
+ return `GET`;
67
+ case `post`:
68
+ case `POST`:
69
+ return `POST`;
70
+ case `put`:
71
+ case `PUT`:
72
+ return `PUT`;
73
+ case `delete`:
74
+ case `DELETE`:
75
+ return `DELETE`;
76
+ case `patch`:
77
+ case `PATCH`:
78
+ return `PATCH`;
79
+ case `head`:
80
+ case `HEAD`:
81
+ return `HEAD`;
82
+ case `options`:
83
+ case `OPTIONS`:
84
+ return `OPTIONS`;
85
+ default:
86
+ throw Error(`Unknown method: ${e2}`);
87
+ }
88
+ };
89
+ var C = (e2) => (t2) => async (n2) => {
90
+ let r2, i2 = (t3) => {
91
+ if (r2 = e2(n2)(t3), r2.url === void 0) throw Error(`Url was not successfully created for this request, please reach out to support channels for assistance.`);
92
+ let { method: i3, url: a2, params: o2 } = r2;
93
+ return { ...r2, method: S(i3), url: a2, data: r2.data, params: o2 };
94
+ };
95
+ try {
96
+ let e3 = await t2.request(i2);
97
+ if (r2 === void 0) throw Error(`Request options were not created for this request, please reach out to support channels for assistance.`);
98
+ let n3 = Array.isArray(r2.transformResponse) ? r2.transformResponse : [r2.transformResponse], a2 = e3.data;
99
+ return n3.forEach((t3) => {
100
+ t3 && (a2 = t3(e3.data, e3.headers));
101
+ }), a2;
102
+ } catch (e3) {
103
+ throw typeof e3 == `object` && e3 && `response` in e3 && typeof e3.response == `object` && e3.response !== null && `data` in e3.response ? e3.response.data : e3;
104
+ }
105
+ };
106
+ var w = (e2) => e2.__isAmbassador ? true : !!e2().__isAmbassador;
107
+ var T = `__metadata`;
108
+ var E = `edge.wixapis.com`;
109
+ var D = class extends Error {
110
+ message;
111
+ response;
112
+ constructor(e2, t2) {
113
+ super(e2), this.message = e2, this.response = t2;
114
+ }
115
+ async details() {
116
+ let e2 = await this.response.json();
117
+ return O(this.response.status, e2?.message, e2?.details, { requestId: this.response.headers.get(`X-Wix-Request-Id`), details: e2 });
118
+ }
119
+ };
120
+ var O = (e2, t2, n2, r2) => ({ details: { ...!n2?.validationError && { applicationError: { description: t2, code: e2, data: r2 } }, ...n2 }, message: t2, requestId: r2?.requestId });
121
+ var k = (e2) => e2?.method && [`post`, `put`, `patch`].includes(e2.method.toLocaleLowerCase()) && e2.body ? { "Content-Type": `application/json` } : {};
122
+ var ee = (e2) => e2 && typeof e2 == `object` && !Array.isArray(e2);
123
+ var te = (e2) => e2.__type === `host`;
124
+ function ne(e2, t2) {
125
+ return e2.create(t2);
126
+ }
127
+ var re = `x-wix-bi-gateway`;
128
+ function ie(e2, t2, n2) {
129
+ return { [re]: ae({ environment: `js-sdk${n2 ? `-${n2}` : ``}`, "package-name": e2.packageName ?? t2?.PACKAGE_NAME, "method-fqn": e2.methodFqn, entity: e2.entityFqdn }) };
130
+ }
131
+ function ae(e2) {
132
+ return Object.entries(e2).filter(([e3, t2]) => !!t2).map(([e3, t2]) => `${e3}=${t2}`).join(`,`);
133
+ }
134
+ function oe(e2) {
135
+ let t2 = globalThis.__wix_context__, n2 = { client: b.client, elevatedClient: b.elevatedClient }, r2;
136
+ globalThis.__wix_context__ = void 0, b.client = void 0, b.elevatedClient = void 0, typeof $wixContext < `u` && (r2 = { client: $wixContext?.client, elevatedClient: $wixContext?.elevatedClient }, delete $wixContext.client, delete $wixContext.elevatedClient);
137
+ try {
138
+ return e2();
139
+ } finally {
140
+ globalThis.__wix_context__ = t2, b.client = n2.client, b.elevatedClient = n2.elevatedClient, typeof $wixContext < `u` && ($wixContext.client = r2.client, $wixContext.elevatedClient = r2.elevatedClient);
141
+ }
142
+ }
143
+ var se = { id: `_id`, createdDate: `_createdDate`, updatedDate: `_updatedDate` };
144
+ function ce(e2) {
145
+ return pe(e2).map((e3) => e3.toLocaleUpperCase()).join(`_`);
146
+ }
147
+ var le = /([\p{Ll}\d])(\p{Lu})/gu;
148
+ var ue = /(\p{Lu})([\p{Lu}][\p{Ll}])/gu;
149
+ var de = `$1\0$2`;
150
+ var fe = /[^\p{L}\d]+/giu;
151
+ function pe(e2) {
152
+ let t2 = e2.trim();
153
+ t2 = t2.replace(le, de).replace(ue, de), t2 = t2.replace(fe, `\0`);
154
+ let n2 = 0, r2 = t2.length;
155
+ for (; t2.charAt(n2) === `\0`; ) n2++;
156
+ if (n2 === r2) return [];
157
+ for (; t2.charAt(r2 - 1) === `\0`; ) r2--;
158
+ return t2.slice(n2, r2).split(/\0/g);
159
+ }
160
+ var me = (e2) => `validationError` in (e2.response?.data?.details ?? {});
161
+ var he = (e2) => `applicationError` in (e2.response?.data?.details ?? {});
162
+ var ge = (e2) => (e2.response?.status ?? -1) >= 400 && (e2.response?.status ?? -1) < 500;
163
+ function _e(e2, t2 = { explicitPathsToArguments: {}, spreadPathsToArguments: {}, singleArgumentUnchanged: false }, n2 = []) {
164
+ if (typeof e2 != `object` || !e2) throw e2;
165
+ if (me(e2)) return ve(e2, t2, n2);
166
+ if (he(e2)) return be(e2);
167
+ if (ge(e2)) {
168
+ let t3 = e2.response?.status, n3 = e2.response?.statusText ?? `UNKNOWN`, r2 = e2.response?.data?.message ?? n3, i2 = { applicationError: { description: n3, code: ce(n3), data: {} }, requestId: e2.requestId };
169
+ return ye(e2, { message: JSON.stringify({ message: r2, details: i2 }, null, 2), extraProperties: { details: i2, status: t3 } });
170
+ }
171
+ return xe(e2);
172
+ }
173
+ var ve = (e2, t2, n2) => {
174
+ let r2 = e2.response?.data, i2 = e2.requestId, { fieldViolations: a2 } = r2.details.validationError, o2 = Se(t2, a2, n2)?.sort((e3, t3) => e3.field < t3.field ? -1 : 1), s2 = `INVALID_ARGUMENT: ${o2?.map(({ field: e3, description: t3 }) => `"${e3}" ${t3}`)?.join(`, `)}`, c2 = { validationError: { fieldViolations: o2 }, requestId: i2 };
175
+ return ye(e2, { message: JSON.stringify({ message: s2, details: c2 }, null, 2), extraProperties: { details: c2, status: e2.response?.status, requestId: i2 } });
176
+ };
177
+ var ye = (e2, { message: t2, extraProperties: n2 }) => Object.assign(e2, { ...n2, message: t2 });
178
+ var be = (e2) => {
179
+ let t2 = e2.response?.status, n2 = e2.response?.statusText ?? `UNKNOWN`, r2 = e2.response?.data?.message ?? n2, i2 = e2.response?.data?.details?.applicationError?.description ?? n2, a2 = e2.response?.data?.details?.applicationError?.code ?? ce(n2), o2 = e2.response?.data?.details?.applicationError?.data ?? {}, s2 = r2 === i2 ? r2 : `${r2}: ${i2}`, c2 = { applicationError: { description: i2, code: a2, data: o2 }, requestId: e2.requestId };
180
+ return ye(e2, { message: JSON.stringify({ message: s2, details: c2 }, null, 2), extraProperties: { details: c2, status: t2, requestId: e2.requestId } });
181
+ };
182
+ var xe = (e2) => ye(e2, { message: e2.requestId ? `System error occurred, request-id: ${e2.requestId}` : `System error occurred: ${JSON.stringify(e2)}`, extraProperties: { requestId: e2.requestId, status: e2.response?.status, code: ce(e2.response?.statusText ?? `UNKNOWN`), ...!e2.response && { runtimeError: e2 } } });
183
+ var Se = ({ spreadPathsToArguments: e2, explicitPathsToArguments: t2, singleArgumentUnchanged: n2 }, r2, i2) => {
184
+ let a2 = { ...e2, ...t2 }, o2 = Object.keys(a2);
185
+ return r2?.filter((e3) => !r2.some((t3) => t3.field.length > e3.field.length && t3.field.startsWith(e3.field) && o2.includes(t3.field))).map((e3) => {
186
+ let r3 = t2[e3.field];
187
+ if (r3) return { ...e3, field: Ce(r3, i2) };
188
+ let s2 = o2?.sort((e4, t3) => t3.length - e4.length)?.find((t3) => e3.field.startsWith(t3));
189
+ if (s2) {
190
+ let t3 = a2[s2];
191
+ if (t3) return { ...e3, field: e3.field.replace(s2, Ce(t3, i2)) };
192
+ }
193
+ return n2 ? { ...e3, field: `${i2[0]}.${e3.field}` } : e3;
194
+ });
195
+ };
196
+ var Ce = (e2, t2) => {
197
+ let n2 = we(e2);
198
+ return n2 == null ? e2 : e2.replace(`$[${n2}]`, t2[n2]);
199
+ };
200
+ var we = (e2) => {
201
+ let t2 = e2.match(/\$\[(?<argIndex>\d+)\]/);
202
+ return t2 && t2.groups && Number(t2.groups.argIndex);
203
+ };
204
+ function Te(e2, t2, n2, r2, i2, a2, o2, s2, c2, l2, u2) {
205
+ return oe(() => e2({ request: async (e3) => {
206
+ let i3 = e3({ host: s2?.HTTPHost || `www.wixapis.com` }), a3 = i3;
207
+ a3.method === `GET` && a3.fallback?.length && (a3.params?.toString().length ?? 0) > 4e3 && (a3 = i3.fallback[0]);
208
+ let o3 = s2?.HTTPHost ?? `www.wixapis.com`, u3 = `https://${l2 ? E : o3}${a3.url}`;
209
+ a3.params && a3.params.toString() && (u3 += `?${a3.params.toString()}`);
210
+ try {
211
+ let e4 = ie(i3, t2, c2), o4 = { method: a3.method, ...a3.data && { body: JSON.stringify(a3.data) }, headers: { ...e4 } }, s3 = await n2(u3, o4);
212
+ if (s3.status !== 200) {
213
+ let e5 = null;
214
+ try {
215
+ e5 = await s3.json();
216
+ } catch {
217
+ }
218
+ let t3 = De(s3.status, e5?.message ?? s3.statusText, e5?.details, { requestId: s3.headers.get(`X-Wix-Request-Id`), details: e5 }), n3 = _e(t3);
219
+ throw r2?.handleError(n3, { requestOptions: { url: a3.url, method: a3.method, entityFqdn: i3.entityFqdn, methodFqn: i3.methodFqn } }), t3;
220
+ }
221
+ let l3 = await s3.json();
222
+ return { data: a3.migrationOptions?.optInTransformResponse && a3.transformResponse ? Array.isArray(a3.transformResponse) ? a3.transformResponse[0](l3) : a3.transformResponse(l3) : l3, headers: s3.headers, status: s3.status, statusText: s3.statusText };
223
+ } catch (e4) {
224
+ throw e4.message?.includes(`fetch is not defined`) && console.error(`Node.js v18+ is required`), e4;
225
+ }
226
+ }, fetchWithAuth: n2, wixAPIFetch: i2, getActiveToken: a2, getAuthHeaders: o2 }, { validateRequestSchema: u2 }));
227
+ }
228
+ var Ee = class extends Error {
229
+ response;
230
+ requestId;
231
+ constructor(e2) {
232
+ super(), this.response = e2.response, this.requestId = e2.requestId;
233
+ }
234
+ };
235
+ var De = (e2, t2, n2, r2) => new Ee({ response: { data: { details: { ...!n2?.validationError && { applicationError: { description: t2, code: e2, data: r2 } }, ...n2 }, message: t2 }, status: e2 }, requestId: r2?.requestId });
236
+ var Oe = `.`;
237
+ function ke(e2, t2, n2) {
238
+ if (e2 == null) throw Error(`Cannot set value on null or undefined`);
239
+ let r2 = Ae(t2), i2 = e2;
240
+ for (let e3 = 0; e3 < r2.length; e3++) {
241
+ let t3 = r2[e3];
242
+ if (e3 === r2.length - 1) {
243
+ i2[t3] = n2;
244
+ break;
245
+ }
246
+ let a2 = r2[e3 + 1];
247
+ (!(t3 in i2) || i2[t3] == null || typeof i2[t3] != `object` || i2[t3] === null) && (i2[t3] = typeof a2 == `number` ? [] : {}), i2 = i2[t3];
248
+ }
249
+ return e2;
250
+ }
251
+ function Ae(e2) {
252
+ return Array.isArray(e2) ? e2 : e2.split(Oe).map((e3) => je(e3) ? Number(e3) : e3);
253
+ }
254
+ function je(e2) {
255
+ return /^\d+$/.test(e2);
256
+ }
257
+ function Me(e2) {
258
+ let t2 = {};
259
+ for (let [n2, r2] of Object.entries(e2)) Ne(n2) || ke(t2, Ae(n2), r2);
260
+ return t2;
261
+ }
262
+ function Ne(e2) {
263
+ return e2 === `__proto__` || e2 === `constructor` || e2 === `prototype`;
264
+ }
265
+ var Pe = class {
266
+ BRACKET_PATTERN = /\[(\d+)\]/g;
267
+ NUMERIC_PATTERN = /^\d+$/;
268
+ ESCAPED_DOT_PATTERN = /\\\./g;
269
+ ESCAPED_LEFT_BRACKET_PATTERN = /\\\[/g;
270
+ ESCAPED_RIGHT_BRACKET_PATTERN = /\\\]/g;
271
+ SPLIT_PATTERN = /\.|\[(\d+)\]/g;
272
+ DOT_BEFORE_BRACKET_PATTERN = /\.\[/g;
273
+ ESCAPED_DOT_PLACEHOLDER = `__DOT__`;
274
+ ESCAPED_RIGHT_BRACKET_PLACEHOLDER = `__RB__`;
275
+ ESCAPED_LEFT_BRACKET_PLACEHOLDER = `__LB__`;
276
+ modifiedFields;
277
+ cleanedModifiedFields;
278
+ constructor(e2) {
279
+ this.modifiedFields = e2;
280
+ }
281
+ replaceEscapedCharacters(e2) {
282
+ return e2.replace(this.ESCAPED_DOT_PATTERN, this.ESCAPED_DOT_PLACEHOLDER).replace(this.ESCAPED_LEFT_BRACKET_PATTERN, this.ESCAPED_LEFT_BRACKET_PLACEHOLDER).replace(this.ESCAPED_RIGHT_BRACKET_PATTERN, this.ESCAPED_RIGHT_BRACKET_PLACEHOLDER);
283
+ }
284
+ restoreEscapedCharacters(e2) {
285
+ return e2.replace(this.ESCAPED_DOT_PLACEHOLDER, `\\.`).replace(this.ESCAPED_RIGHT_BRACKET_PLACEHOLDER, `\\]`).replace(this.ESCAPED_LEFT_BRACKET_PLACEHOLDER, `\\[`);
286
+ }
287
+ unflatten() {
288
+ return this.cleanedModifiedFields = Object.fromEntries(Object.entries(this.modifiedFields).map(([e2, t2]) => [this.replaceEscapedCharacters(this.bracketToDotNotation(e2)), t2])), Me(this.cleanedModifiedFields);
289
+ }
290
+ flatten(e2) {
291
+ let t2 = {};
292
+ for (let n2 of Object.keys(this.cleanedModifiedFields)) {
293
+ let r2 = this.splitPath(n2), i2 = this.navigatePath(e2, r2);
294
+ t2 = { ...t2, ...i2 };
295
+ }
296
+ return Object.fromEntries(Object.entries(t2).map(([e3, t3]) => [this.restoreEscapedCharacters(e3), t3]));
297
+ }
298
+ splitPath(e2) {
299
+ let t2 = [], n2 = 0, r2 = Array.from(e2.matchAll(this.SPLIT_PATTERN));
300
+ for (let i2 of r2) i2.index > n2 && t2.push(e2.substring(n2, i2.index)), i2[1] && t2.push(i2[1]), n2 = i2.index + i2[0].length;
301
+ return n2 < e2.length && t2.push(e2.substring(n2)), t2;
302
+ }
303
+ navigatePath(e2, t2) {
304
+ let n2 = e2, r2 = [], i2 = (e3) => {
305
+ if (!Array.isArray(n2)) throw Error(`Expected array at path ${this.buildPathString(r2)}, but got ${typeof n2}`);
306
+ r2.push(`[${e3}]`), n2 = n2[parseInt(e3, 10)];
307
+ }, a2 = (e3, t3) => {
308
+ let i3 = e3 in se ? se[e3] : void 0;
309
+ if (i3 && i3 in t3) {
310
+ r2.push(i3), n2 = t3[i3];
311
+ return;
312
+ }
313
+ let a3 = Re(e3);
314
+ if (a3 && a3 in t3) {
315
+ r2.push(a3), n2 = t3[a3];
316
+ return;
317
+ }
318
+ throw Error(`Cannot find key '${e3}' or its transformations at path ${this.buildPathString(r2)}`);
319
+ }, o2 = (e3, t3) => {
320
+ r2.push(e3), n2 = t3[e3];
321
+ };
322
+ for (let e3 of t2) {
323
+ if (this.NUMERIC_PATTERN.test(e3)) {
324
+ i2(e3);
325
+ continue;
326
+ }
327
+ if (typeof n2 != `object` || !n2) throw Error(`Cannot access property '${e3}' on ${typeof n2} at path ${this.buildPathString(r2)}`);
328
+ let t3 = n2;
329
+ if (e3 in n2) {
330
+ o2(e3, t3);
331
+ continue;
332
+ }
333
+ a2(e3, t3);
334
+ }
335
+ return { [this.buildPathString(r2)]: n2 };
336
+ }
337
+ buildPathString(e2) {
338
+ return e2.join(`.`).replace(this.DOT_BEFORE_BRACKET_PATTERN, `[`);
339
+ }
340
+ bracketToDotNotation(e2) {
341
+ return e2.replace(this.BRACKET_PATTERN, (t2, n2, r2) => r2 > 0 && e2[r2 - 1] === `\\` ? t2 : `.` + n2);
342
+ }
343
+ };
344
+ function Fe(e2, t2) {
345
+ let n2 = e2?.modifiedFields;
346
+ if (!n2) return null;
347
+ let r2 = Ie(n2);
348
+ if (!r2) return null;
349
+ let { unflattenedModifiedFields: i2, modifiedFieldsManipulator: a2 } = r2;
350
+ e2 = { ...e2, modifiedFields: i2 };
351
+ let o2 = t2(e2), s2 = o2?.modifiedFields;
352
+ if (!s2) return null;
353
+ let c2 = Le(s2, a2);
354
+ return c2 === null ? null : (o2.modifiedFields = c2, o2);
355
+ }
356
+ function Ie(e2) {
357
+ if (typeof e2 == `object` && e2 && !Array.isArray(e2)) try {
358
+ let t2 = new Pe(e2);
359
+ return { unflattenedModifiedFields: t2.unflatten(), modifiedFieldsManipulator: t2 };
360
+ } catch {
361
+ return null;
362
+ }
363
+ return null;
364
+ }
365
+ function Le(e2, t2) {
366
+ if (typeof e2 == `object` && e2 && !Array.isArray(e2)) try {
367
+ return t2.flatten(e2);
368
+ } catch {
369
+ return null;
370
+ }
371
+ return null;
372
+ }
373
+ function Re(e2) {
374
+ return e2.replace(/[-_\s]+(.)?/g, (e3, t2) => t2 ? t2.toUpperCase() : ``).replace(/^./, (e3) => e3.toLowerCase());
375
+ }
376
+ function ze() {
377
+ return { emit(e2, ...t2) {
378
+ for (let n2 = 0, r2 = this.events[e2] || [], i2 = r2.length; n2 < i2; n2++) r2[n2](...t2);
379
+ }, events: {}, on(e2, t2) {
380
+ return (this.events[e2] ||= []).push(t2), () => {
381
+ this.events[e2] = this.events[e2]?.filter((e3) => t2 !== e3);
382
+ };
383
+ } };
384
+ }
385
+ var Be = (e2) => e2.__type === `event-definition`;
386
+ function Ve(e2, t2, n2, r2) {
387
+ let i2;
388
+ if (e2.isDomainEvent) {
389
+ let { deletedEvent: e3, actionEvent: t3, createdEvent: a3, updatedEvent: o3, ...s3 } = n2, c2 = { ...r2, ...s3 };
390
+ i2 = e3 ? e3?.deletedEntity ? { entity: e3?.deletedEntity, metadata: c2 } : { metadata: c2 } : t3 ? { data: t3.body, metadata: c2 } : o3 ? { entity: o3.currentEntity, metadata: c2, ...o3.modifiedFields ? { modifiedFields: o3.modifiedFields } : {} } : { entity: a3?.entity, metadata: c2 };
391
+ } else i2 = { data: n2, metadata: r2 };
392
+ let a2 = e2.transformations ?? ((e3) => e3), o2 = i2, s2 = i2;
393
+ if (s2.modifiedFields) {
394
+ let e3 = s2.modifiedFields;
395
+ if (typeof e3 == `object` && e3 && !Array.isArray(e3)) {
396
+ o2 = structuredClone(i2);
397
+ let e4 = Fe(s2, a2);
398
+ if (e4) return t2(e4);
399
+ }
400
+ }
401
+ return t2(a2(o2));
402
+ }
403
+ function He(e2) {
404
+ let t2 = /* @__PURE__ */ new Map(), n2 = ze();
405
+ return { initModule(e3) {
406
+ return (r2) => {
407
+ let i2 = t2.get(e3.type) ?? [];
408
+ i2.push({ eventDefinition: e3, handler: r2 }), t2.set(e3.type, i2), n2.emit(`registered`, e3);
409
+ };
410
+ }, client: { ...n2, getRegisteredEvents: () => t2, async process(e3, n3 = { expectedEvents: [] }) {
411
+ let { eventType: r2, identity: i2, instanceId: a2, payload: o2, accountInfo: s2 } = await this.parseJWT(e3), c2 = [...n3.expectedEvents, ...Array.from(t2.keys()).map((e4) => ({ type: e4 }))];
412
+ if (c2.length > 0 && !c2.some(({ type: e4 }) => e4 === r2)) throw Error(`Unexpected event type: ${r2}. Expected one of: ${c2.map((e4) => e4.type).join(`, `)}`);
413
+ let l2 = t2.get(r2) ?? [];
414
+ return await Promise.all(l2.map(({ eventDefinition: e4, handler: t3 }) => Ve(e4, t3, o2, { instanceId: a2, identity: i2, accountInfo: s2 }))), { instanceId: a2, eventType: r2, payload: o2, identity: i2, accountInfo: s2 };
415
+ }, async processRequest(e3, t3) {
416
+ let n3 = await e3.text();
417
+ return this.process(n3, t3);
418
+ }, async parseJWT(t3) {
419
+ let n3 = e2();
420
+ if (!n3.decodeJWT) throw Error(`decodeJWT is not supported by the authentication strategy`);
421
+ let { decoded: r2, valid: i2 } = await n3.decodeJWT(t3);
422
+ if (!i2) throw Error(`JWT is not valid`);
423
+ if (typeof r2.data != `string`) throw Error(`Unexpected type of JWT data: expected string, got ${typeof r2.data}`);
424
+ let a2 = JSON.parse(r2.data), o2 = a2.eventType, s2 = a2.accountInfo, c2 = a2.instanceId, l2 = a2.identity ? JSON.parse(a2.identity) : void 0;
425
+ return { instanceId: c2, eventType: o2, payload: JSON.parse(a2.data), identity: l2, accountInfo: s2 };
426
+ }, async parseRequest(e3) {
427
+ let t3 = await e3.text();
428
+ return this.parseJWT(t3);
429
+ }, async executeHandlers(e3) {
430
+ let n3 = Array.from(t2.keys()).map((e4) => ({ type: e4 }));
431
+ if (n3.length > 0 && !n3.some(({ type: t3 }) => t3 === e3.eventType)) throw Error(`Unexpected event type: ${e3.eventType}. Expected one of: ${n3.map((e4) => e4.type).join(`, `)}`);
432
+ let r2 = t2.get(e3.eventType) ?? [];
433
+ await Promise.all(r2.map(({ eventDefinition: t3, handler: n4 }) => Ve(t3, n4, e3.payload, { instanceId: e3.instanceId, identity: e3.identity })));
434
+ }, apps: { AppInstalled: x(`AppInstalled`)(), AppRemoved: x(`AppRemoved`)() } } };
435
+ }
436
+ var Ue = (e2) => e2.__type === `service-plugin-definition`;
437
+ function We(e2) {
438
+ let t2 = /* @__PURE__ */ new Map(), n2 = ze();
439
+ return { initModule(e3) {
440
+ return (r2) => {
441
+ let i2 = t2.get(e3.componentType.toLowerCase()) ?? [];
442
+ i2.push({ servicePluginDefinition: e3, implementation: r2 }), t2.set(e3.componentType.toLowerCase(), i2), n2.emit(`registered`, e3);
443
+ };
444
+ }, client: { ...n2, getRegisteredServicePlugins: () => t2, async parseJWT(t3) {
445
+ let n3 = e2();
446
+ if (!n3.decodeJWT) throw Error(`decodeJWT is not supported by the authentication strategy`);
447
+ let { decoded: r2, valid: i2 } = await n3.decodeJWT(t3, true);
448
+ if (!i2) throw Error(`JWT is not valid`);
449
+ if (typeof r2.data != `object` || r2.data === null || !(`metadata` in r2.data) || typeof r2.data.metadata != `object` || r2.data.metadata === null || !(`appExtensionType` in r2.data.metadata) || typeof r2.data.metadata.appExtensionType != `string`) throw Error(`Unexpected JWT data: expected object with metadata.appExtensionType string`);
450
+ return r2.data;
451
+ }, async process(e3) {
452
+ let t3 = await this.parseJWT(e3.body);
453
+ return this.executeHandler(t3, e3.url);
454
+ }, async parseRequest(e3) {
455
+ let t3 = await e3.text();
456
+ return this.parseJWT(t3);
457
+ }, async processRequest(e3) {
458
+ let t3 = await this.parseRequest(e3);
459
+ return this.processParsedRequest(t3, e3.url);
460
+ }, async processParsedRequest(e3, t3) {
461
+ try {
462
+ let n3 = await this.executeHandler(e3, t3);
463
+ return Response.json(n3);
464
+ } catch (e4) {
465
+ if (e4.errorType === `SPI` && e4.applicationCode && e4.httpCode) return Response.json({ applicationError: { code: e4.applicationCode, data: e4.data } }, { status: e4.httpCode });
466
+ throw e4;
467
+ }
468
+ }, async executeHandler(e3, n3) {
469
+ let r2 = e3.metadata.appExtensionType.toLowerCase(), i2 = t2.get(r2) ?? [];
470
+ if (i2.length === 0) throw Error(`No service plugin implementations found for component type ${r2}`);
471
+ if (i2.length > 1) throw Error(`Multiple service plugin implementations found for component type ${r2}. This is currently not supported`);
472
+ let { implementation: a2, servicePluginDefinition: o2 } = i2[0], s2 = o2.methods.find((e4) => n3.endsWith(e4.primaryHttpMappingPath));
473
+ if (!s2) throw Error(`Unexpect request: request url did not match any method: ` + n3);
474
+ let c2 = a2[s2.name];
475
+ if (!c2) throw Error(`Got request for service plugin method ${s2.name} but no implementation was provided. Available methods: ${Object.keys(a2).join(`, `)}`);
476
+ return s2.transformations.toREST(await c2(s2.transformations.fromREST(e3)));
477
+ } } };
478
+ }
479
+ var A = `X-Wix-Consistent`;
480
+ function Ge(e2) {
481
+ let t2 = e2.headers || { Authorization: `` }, n2 = { getAuthHeaders: (e3) => Promise.resolve({ headers: {} }) }, r2 = e2.auth, i2 = typeof r2 == `function` ? r2 : () => r2 ?? n2, a2 = () => i2().getAuthHeaders(e2.host), o2 = () => e2.fetch ?? fetch, s2 = async (n3, r3) => {
482
+ let i3 = o2(), s3 = await a2(), c3 = { ...r3?.headers ?? {}, ...s3.headers, ...e2.host?.essentials?.passThroughHeaders, ...t2[`X-Wix-Consistent`] ? { [A]: t2[A] } : {} }, l3 = e2.host?.getErrorHandler?.();
483
+ try {
484
+ if (typeof n3 == `string` || n3 instanceof URL) {
485
+ let e3 = await i3(n3, { ...r3, headers: c3 });
486
+ l3?.handleError(e3, { requestOptions: { url: n3.toString(), method: r3?.method } });
487
+ let a3 = Ke(e3);
488
+ return a3 && (t2[A] = a3), e3;
489
+ }
490
+ {
491
+ for (let [e4, t3] of Object.entries(c3)) typeof t3 == `string` && n3.headers.set(e4, t3);
492
+ let e3 = await i3(n3, r3);
493
+ l3?.handleError(e3, { requestOptions: { url: n3.url, method: r3?.method } });
494
+ let a3 = Ke(e3);
495
+ return a3 && (t2[A] = a3), e3;
496
+ }
497
+ } catch (e3) {
498
+ throw l3?.handleError(e3, { requestOptions: { url: typeof n3 == `string` || n3 instanceof URL ? n3.toString() : n3.url, method: r3?.method } }), e3;
499
+ }
500
+ }, { client: c2, initModule: l2 } = We(i2), { client: u2, initModule: d2 } = He(i2), f2 = async (n3, r3) => {
501
+ let i3 = o2(), s3 = await a2(), c3 = k(r3), l3 = await i3(n3, { ...r3, headers: { ...c3, ...t2, ...s3?.headers, ...r3?.headers, ...e2.host?.essentials?.passThroughHeaders, ...t2[`X-Wix-Consistent`] ? { [A]: t2[A] } : {} } }), u3 = Ke(l3);
502
+ return u3 && (t2[A] = u3), l3;
503
+ }, p2 = (t3, n3) => {
504
+ if (Be(t3)) return d2(t3);
505
+ if (Ue(t3)) return l2(t3);
506
+ if (te(t3) && e2.host) return ne(t3, e2.host);
507
+ if (typeof t3 == `function`) {
508
+ if (`__type` in t3 && t3.__type === `wix_spi_error`) return t3;
509
+ let r3 = e2.host?.apiBaseUrl ?? `www.wixapis.com`, o3 = e2.useCDN === void 0 ? i2().shouldUseCDN : e2.useCDN;
510
+ return Te(oe(() => w(t3)) ? C(t3) : t3, n3 ?? {}, f2, e2.host?.getErrorHandler?.(), (e3, t4) => {
511
+ let n4 = new URL(e3, `https://${r3}`);
512
+ return n4.host = r3, n4.protocol = `https`, f2(n4.toString(), t4);
513
+ }, i2().getActiveToken, async () => a2(), { HTTPHost: r3 }, e2.host?.name, o3, e2.validateRequestSchema);
514
+ }
515
+ return ee(t3) ? Object.fromEntries(Object.entries(t3).map(([e3, n4]) => [e3, p2(n4, t3[T])])) : t3;
516
+ }, m2 = (e3) => {
517
+ for (let n3 in e3) t2[n3] = e3[n3];
518
+ };
519
+ return { ...e2.modules ? p2(e2.modules) : {}, get auth() {
520
+ let t3 = i2();
521
+ return t3.getAuthHeaders = t3.getAuthHeaders.bind(void 0, e2.host), t3;
522
+ }, setHeaders: m2, use: p2, enableContext(e3, t3 = { elevated: false }) {
523
+ e3 === `global` ? globalThis.__wix_context__ == null ? t3.elevated ? globalThis.__wix_context__ = { elevatedClient: this } : globalThis.__wix_context__ = { client: this } : t3.elevated ? globalThis.__wix_context__.elevatedClient = this : globalThis.__wix_context__.client = this : t3.elevated ? b.elevatedClient = this : b.client = this;
524
+ }, fetch: (t3, n3) => {
525
+ let r3 = e2.host?.apiBaseUrl ?? `www.wixapis.com`, i3 = new URL(t3, `https://${r3}`);
526
+ return i3.host = r3, i3.protocol = `https`, f2(i3.toString(), n3);
527
+ }, fetchWithAuth: s2, async graphql(t3, n3, r3 = { apiVersion: `alpha` }) {
528
+ let i3 = e2?.host?.apiBaseUrl ?? `www.wixapis.com`, a3 = await f2(`https://${i3}/graphql/${r3.apiVersion}`, { method: `POST`, headers: { "Content-Type": `application/json` }, body: JSON.stringify({ query: t3, variables: n3 }) });
529
+ if (a3.status !== 200) throw new D(`GraphQL request failed with status ${a3.status}`, a3);
530
+ let { data: o3, errors: s3 } = await a3.json();
531
+ return { data: o3 ?? {}, errors: s3 };
532
+ }, webhooks: u2, servicePlugins: c2 };
533
+ }
534
+ function Ke(e2) {
535
+ return e2.headers?.get(`X-Wix-Consistent`) ?? e2.headers?.get(`x-wix-consistent`);
536
+ }
537
+ var qe = `wix:`;
538
+ var Je = { _id: `id`, _createdDate: `createdDate`, _updatedDate: `updatedDate` };
539
+ var Ye = { id: `_id`, createdDate: `_createdDate`, updatedDate: `_updatedDate` };
540
+ var Xe = `items`;
541
+ var Ze = `pagingMetadata`;
542
+ var Qe = Je;
543
+ function $e(e2, t2) {
544
+ return e2?.split(`.`).map((e3) => t2?.[e3] ?? e3).join(`.`);
545
+ }
546
+ function j(e2, { transformSystemFields: t2 = true } = {}) {
547
+ return t2 ? $e(e2, Qe) : e2;
548
+ }
549
+ var et = `sort.fieldName`;
550
+ function tt(e2, t2, n2) {
551
+ return (e2 === et || e2.endsWith(`.${et}`)) && typeof t2 == `string` ? $e(t2, n2) : t2;
552
+ }
553
+ function nt(e2, t2, n2) {
554
+ let r2 = (e3) => n2.includes(e3), i2 = (e3, n3) => {
555
+ if (Array.isArray(e3)) e3.forEach((e4) => {
556
+ i2(e4, n3);
557
+ });
558
+ else if (typeof e3 == `object` && e3) {
559
+ let a2 = e3;
560
+ Object.keys(a2).forEach((e4) => {
561
+ let o2 = n3 === `` ? e4 : `${n3}.${e4}`;
562
+ if (r2(o2)) return;
563
+ let s2 = rt(e4, t2);
564
+ s2 !== e4 && !(s2 in a2) && (a2[s2] = a2[e4], delete a2[e4]), a2[s2] = tt(o2, a2[s2], t2), i2(a2[s2], o2);
565
+ });
566
+ }
567
+ };
568
+ return i2(e2, ``), e2;
569
+ }
570
+ function rt(e2, t2) {
571
+ let n2;
572
+ return n2 = e2.includes(`.`) ? e2.split(`.`).map((e3) => t2[e3] ?? e3).join(`.`) : t2[e2] ?? e2, n2;
573
+ }
574
+ function M(e2, t2 = []) {
575
+ return nt(e2, Je, t2);
576
+ }
577
+ function N(e2, t2 = []) {
578
+ return nt(e2, Ye, t2);
579
+ }
580
+ function it(e2) {
581
+ return e2?.toISOString();
582
+ }
583
+ function P(e2) {
584
+ return e2 ? new Date(e2) : void 0;
585
+ }
586
+ var at = /* @__PURE__ */ new WeakMap();
587
+ function ot() {
588
+ return { leaves: void 0, fields: void 0, mapFields: void 0, anyField: void 0 };
589
+ }
590
+ function st(e2, t2) {
591
+ let n2 = e2.get(t2);
592
+ return n2 || (n2 = ot(), e2.set(t2, n2)), n2;
593
+ }
594
+ function ct(e2, t2) {
595
+ return t2 === `*` ? (e2.anyField ??= ot(), e2.anyField) : t2.endsWith(`{}`) ? (e2.mapFields ??= /* @__PURE__ */ new Map(), st(e2.mapFields, t2.slice(0, -2))) : (e2.fields ??= /* @__PURE__ */ new Map(), st(e2.fields, t2));
596
+ }
597
+ function lt(e2) {
598
+ let t2 = ot();
599
+ for (let n2 of e2) {
600
+ let e3 = n2.path.split(`.`).reduce(ct, t2);
601
+ e3.leaves ??= [], e3.leaves.push(n2);
602
+ }
603
+ return t2;
604
+ }
605
+ function ut(e2) {
606
+ let t2 = at.get(e2);
607
+ return t2 || (t2 = lt(e2), at.set(e2, t2)), t2;
608
+ }
609
+ function dt(e2) {
610
+ return typeof e2 == `object` && !!e2;
611
+ }
612
+ function ft(e2, { isRepeated: t2, isMap: n2 }, r2) {
613
+ return t2 ? Array.isArray(e2) ? e2.map(r2) : e2 : n2 ? dt(e2) ? Object.fromEntries(Object.entries(e2).map(([e3, t3]) => [e3, r2(t3)])) : e2 : r2(e2);
614
+ }
615
+ function pt(e2, t2, n2) {
616
+ dt(e2) && gt(e2, t2, n2);
617
+ }
618
+ function mt(e2, t2, n2) {
619
+ for (let [r2, i2] of t2) {
620
+ if (!(r2 in e2)) continue;
621
+ if (i2.leaves) for (let t4 of i2.leaves) e2[r2] = ft(e2[r2], t4, n2);
622
+ let t3 = e2[r2];
623
+ Array.isArray(t3) ? t3.forEach((e3) => pt(e3, i2, n2)) : pt(t3, i2, n2);
624
+ }
625
+ }
626
+ function ht(e2, t2, n2) {
627
+ for (let [r2, i2] of t2) {
628
+ let t3 = e2[r2];
629
+ dt(t3) && Object.values(t3).forEach((e3) => pt(e3, i2, n2));
630
+ }
631
+ }
632
+ function gt(e2, { fields: t2, mapFields: n2, anyField: r2 }, i2) {
633
+ t2 && mt(e2, t2, i2), n2 && ht(e2, n2, i2), r2 && Object.values(e2).forEach((e3) => pt(e3, r2, i2));
634
+ }
635
+ function F(e2, t2) {
636
+ if (!dt(e2)) return e2;
637
+ for (let { paths: n2, transformFn: r2 } of t2) gt(e2, ut(n2), r2);
638
+ return e2;
639
+ }
640
+ function _t(e2, t2) {
641
+ let { protocol: n2 } = new URL(e2);
642
+ return n2 === `${t2}:` ? `${qe}${e2}` : e2;
643
+ }
644
+ function vt(e2) {
645
+ return Object.fromEntries(Object.entries(e2).filter(([, e3]) => e3 !== void 0));
646
+ }
647
+ function yt(e2) {
648
+ return wt(e2).map((e3) => e3.toLocaleUpperCase()).join(`_`);
649
+ }
650
+ var bt = /([\p{Ll}\d])(\p{Lu})/gu;
651
+ var xt = /(\p{Lu})([\p{Lu}][\p{Ll}])/gu;
652
+ var St = `$1\0$2`;
653
+ var Ct = /[^\p{L}\d]+/giu;
654
+ function wt(e2) {
655
+ let t2 = e2.trim();
656
+ t2 = t2.replace(bt, St).replace(xt, St), t2 = t2.replace(Ct, `\0`);
657
+ let n2 = 0, r2 = t2.length;
658
+ for (; t2.charAt(n2) === `\0`; ) n2++;
659
+ if (n2 === r2) return [];
660
+ for (; t2.charAt(r2 - 1) === `\0`; ) r2--;
661
+ return t2.slice(n2, r2).split(/\0/g);
662
+ }
663
+ var Tt = (e2) => `validationError` in (e2.response?.data?.details ?? {});
664
+ var Et = (e2) => `applicationError` in (e2.response?.data?.details ?? {});
665
+ var Dt = (e2) => (e2.response?.status ?? -1) >= 400 && (e2.response?.status ?? -1) < 500;
666
+ function I(e2, t2 = { explicitPathsToArguments: {}, spreadPathsToArguments: {}, singleArgumentUnchanged: false }, n2 = []) {
667
+ if (typeof e2 != `object` || !e2) throw e2;
668
+ if (Tt(e2)) return Ot(e2, t2, n2);
669
+ if (Et(e2)) return At(e2);
670
+ if (Dt(e2)) {
671
+ let t3 = e2.response?.status, n3 = e2.response?.statusText ?? `UNKNOWN`, r2 = e2.response?.data?.message ?? n3, i2 = { applicationError: { description: n3, code: yt(n3), data: {} }, requestId: e2.requestId };
672
+ return kt(e2, { message: JSON.stringify({ message: r2, details: i2 }, null, 2), extraProperties: { details: i2, status: t3 } });
673
+ }
674
+ return jt(e2);
675
+ }
676
+ var Ot = (e2, t2, n2) => {
677
+ let r2 = e2.response?.data, i2 = e2.requestId, { fieldViolations: a2 } = r2.details.validationError, o2 = Mt(t2, a2, n2)?.sort((e3, t3) => e3.field < t3.field ? -1 : 1), s2 = `INVALID_ARGUMENT: ${o2?.map(({ field: e3, description: t3 }) => `"${e3}" ${t3}`)?.join(`, `)}`, c2 = { validationError: { fieldViolations: o2 }, requestId: i2 };
678
+ return kt(e2, { message: JSON.stringify({ message: s2, details: c2 }, null, 2), extraProperties: { details: c2, status: e2.response?.status, requestId: i2 } });
679
+ };
680
+ var kt = (e2, { message: t2, extraProperties: n2 }) => Object.assign(e2, { ...n2, message: t2 });
681
+ var At = (e2) => {
682
+ let t2 = e2.response?.status, n2 = e2.response?.statusText ?? `UNKNOWN`, r2 = e2.response?.data?.message ?? n2, i2 = e2.response?.data?.details?.applicationError?.description ?? n2, a2 = e2.response?.data?.details?.applicationError?.code ?? yt(n2), o2 = e2.response?.data?.details?.applicationError?.data ?? {}, s2 = r2 === i2 ? r2 : `${r2}: ${i2}`, c2 = { applicationError: { description: i2, code: a2, data: o2 }, requestId: e2.requestId };
683
+ return kt(e2, { message: JSON.stringify({ message: s2, details: c2 }, null, 2), extraProperties: { details: c2, status: t2, requestId: e2.requestId } });
684
+ };
685
+ var jt = (e2) => kt(e2, { message: e2.requestId ? `System error occurred, request-id: ${e2.requestId}` : `System error occurred: ${JSON.stringify(e2)}`, extraProperties: { requestId: e2.requestId, status: e2.response?.status, code: yt(e2.response?.statusText ?? `UNKNOWN`), ...!e2.response && { runtimeError: e2 } } });
686
+ var Mt = ({ spreadPathsToArguments: e2, explicitPathsToArguments: t2, singleArgumentUnchanged: n2 }, r2, i2) => {
687
+ let a2 = { ...e2, ...t2 }, o2 = Object.keys(a2);
688
+ return r2?.filter((e3) => !r2.some((t3) => t3.field.length > e3.field.length && t3.field.startsWith(e3.field) && o2.includes(t3.field))).map((e3) => {
689
+ let r3 = t2[e3.field];
690
+ if (r3) return { ...e3, field: Nt(r3, i2) };
691
+ let s2 = o2?.sort((e4, t3) => t3.length - e4.length)?.find((t3) => e3.field.startsWith(t3));
692
+ if (s2) {
693
+ let t3 = a2[s2];
694
+ if (t3) return { ...e3, field: e3.field.replace(s2, Nt(t3, i2)) };
695
+ }
696
+ return n2 ? { ...e3, field: `${i2[0]}.${e3.field}` } : e3;
697
+ });
698
+ };
699
+ var Nt = (e2, t2) => {
700
+ let n2 = Pt(e2);
701
+ return n2 == null ? e2 : e2.replace(`$[${n2}]`, t2[n2]);
702
+ };
703
+ var Pt = (e2) => {
704
+ let t2 = e2.match(/\$\[(?<argIndex>\d+)\]/);
705
+ return t2 && t2.groups && Number(t2.groups.argIndex);
706
+ };
707
+ function Ft() {
708
+ let e2 = typeof $wixContext < `u` && $wixContext.initWixModules ? $wixContext.initWixModules : globalThis.__wix_context__ !== void 0 && globalThis.__wix_context__.initWixModules ? globalThis.__wix_context__.initWixModules : void 0;
709
+ if (e2) return { initWixModules(t3, n3) {
710
+ return It(() => e2(t3, n3));
711
+ }, fetchWithAuth() {
712
+ throw Error(`fetchWithAuth is not available in this context`);
713
+ }, graphql() {
714
+ throw Error(`graphql is not available in this context`);
715
+ } };
716
+ let t2 = typeof $wixContext < `u` ? $wixContext.client : b.client === void 0 ? globalThis.__wix_context__ === void 0 ? void 0 : globalThis.__wix_context__.client : b.client, n2 = typeof $wixContext < `u` ? $wixContext.elevatedClient : b.elevatedClient === void 0 ? globalThis.__wix_context__ === void 0 ? void 0 : globalThis.__wix_context__.elevatedClient : b.elevatedClient;
717
+ if (t2 || n2) return { initWixModules(e3, r2) {
718
+ if (r2) {
719
+ if (!n2) throw Error(`An elevated client is required to use elevated modules. Make sure to initialize the Wix context with an elevated client before using elevated SDK modules`);
720
+ return It(() => n2.use(e3));
721
+ }
722
+ if (!t2) throw Error(`Wix context is not available. Make sure to initialize the Wix context before using SDK modules`);
723
+ return It(() => t2.use(e3));
724
+ }, fetchWithAuth: (e3, n3) => {
725
+ if (!t2) throw Error(`Wix context is not available. Make sure to initialize the Wix context before using SDK modules`);
726
+ return t2.fetchWithAuth(e3, n3);
727
+ }, getAuth() {
728
+ if (!t2) throw Error(`Wix context is not available. Make sure to initialize the Wix context before using SDK modules`);
729
+ return t2.auth;
730
+ }, async graphql(e3, n3, r2) {
731
+ if (!t2) throw Error(`Wix context is not available. Make sure to initialize the Wix context before using SDK modules`);
732
+ return t2.graphql(e3, n3, r2);
733
+ } };
734
+ }
735
+ function It(e2) {
736
+ let t2 = globalThis.__wix_context__, n2 = { client: b.client, elevatedClient: b.elevatedClient }, r2;
737
+ globalThis.__wix_context__ = void 0, b.client = void 0, b.elevatedClient = void 0, typeof $wixContext < `u` && (r2 = { client: $wixContext?.client, elevatedClient: $wixContext?.elevatedClient }, delete $wixContext.client, delete $wixContext.elevatedClient);
738
+ try {
739
+ return e2();
740
+ } finally {
741
+ globalThis.__wix_context__ = t2, b.client = n2.client, b.elevatedClient = n2.elevatedClient, typeof $wixContext < `u` && ($wixContext.client = r2.client, $wixContext.elevatedClient = r2.elevatedClient);
742
+ }
743
+ }
744
+ function Lt(e2, t2) {
745
+ return (...n2) => {
746
+ let r2 = Ft();
747
+ return r2 ? r2.initWixModules(e2, t2).apply(void 0, n2) : e2.apply(void 0, n2);
748
+ };
749
+ }
750
+ function Rt(e2) {
751
+ let t2 = (...t3) => {
752
+ let n2 = Ft();
753
+ return n2 ? n2.initWixModules(e2).apply(void 0, t3) : () => ({ slug: e2.type });
754
+ };
755
+ return t2.__type = e2.__type, t2.type = e2.type, t2.isDomainEvent = e2.isDomainEvent, t2.transformations = e2.transformations, t2;
756
+ }
757
+ function L(e2, t2 = false) {
758
+ return Lt(e2, t2);
759
+ }
760
+ function zt(e2, t2) {
761
+ let n2 = Bt(e2), r2 = Object.entries(n2).some(([e3, t3]) => e3.includes(`.`) || Array.isArray(t3) && t3.some((e4) => typeof e4 == `object`));
762
+ return t2 && r2 ? new URLSearchParams({ ".r": Ht(JSON.stringify(e2)) }) : Object.entries(n2).reduce((e3, [t3, n3]) => ((Array.isArray(n3) ? n3 : [n3]).forEach((r3) => {
763
+ r3 == null || Array.isArray(n3) && typeof r3 == `object` || e3.append(t3, r3);
764
+ }), e3), new URLSearchParams());
765
+ }
766
+ function R(e2) {
767
+ let t2 = tn($t(e2.host), e2.domainToMappings);
768
+ return dn(cn(e2.protoPath, e2.data || {}), t2);
769
+ }
770
+ function Bt(e2, t2 = ``) {
771
+ let n2 = {};
772
+ return Object.entries(e2).forEach(([e3, r2]) => {
773
+ let i2 = typeof r2 == `object` && !!r2 && !Array.isArray(r2), a2 = Vt(t2, e3);
774
+ if (i2) {
775
+ let e4 = Bt(r2, a2);
776
+ Object.assign(n2, e4);
777
+ } else n2[a2] = r2;
778
+ }), n2;
779
+ }
780
+ function Vt(e2, t2) {
781
+ return `${e2}${e2 ? `.` : ``}${t2}`;
782
+ }
783
+ var Ht = (e2) => {
784
+ let t2 = new TextEncoder().encode(e2);
785
+ return (typeof btoa < `u` ? btoa(String.fromCodePoint(...t2)) : Buffer.from(e2, `utf-8`).toString(`base64`)).replace(/=/g, ``).replace(/\+/g, `-`).replace(/\//g, `_`);
786
+ };
787
+ var Ut = [`wix.com`, `editorx.com`];
788
+ var Wt = `_`;
789
+ var Gt = `*.`;
790
+ var Kt = RegExp(`\\.(${Ut.join(`|`)})$`);
791
+ var qt = [`42.wixprod.net`, `uw2-edt-1.wixprod.net`, `virginia-edt.wixprod.net`];
792
+ var Jt = { "payments.base44.com": `manage.wix.com`, "create.editorx.com": `editor.editorx.com` };
793
+ var Yt = `dev.wix-code.com`;
794
+ var Xt = /{(.*)}/;
795
+ var Zt = RegExp(`\\.(${qt.join(`|`)})$`);
796
+ var Qt = RegExp(`.*\\.${Yt}$`);
797
+ function $t(e2) {
798
+ return en(e2).replace(Kt, `._base_domain_`).replace(Zt, `._api_base_domain_`).replace(Qt, `*.dev.wix-code.com`);
799
+ }
800
+ function en(e2) {
801
+ return Jt[e2] ?? e2;
802
+ }
803
+ function tn(e2, t2) {
804
+ let n2 = t2[e2];
805
+ if (n2) return n2;
806
+ let r2 = nn(e2, t2) ?? rn(e2, t2);
807
+ if (!r2) {
808
+ if (on(e2)) {
809
+ let e3 = t2[sn];
810
+ if (e3) return e3;
811
+ }
812
+ let n3 = t2[Wt];
813
+ if (n3) return n3;
814
+ }
815
+ return r2 ?? [];
816
+ }
817
+ function nn(e2, t2) {
818
+ return Object.entries(t2).find(([t3]) => {
819
+ let [, ...n2] = e2.split(`.`);
820
+ return n2.join(`.`) === t3;
821
+ })?.[1];
822
+ }
823
+ function rn(e2, t2) {
824
+ let [n2] = Object.entries(t2).filter(([t3]) => an(e2, t3)).sort(([e3], [t3]) => t3.length - e3.length);
825
+ if (!n2) return;
826
+ let [, r2] = n2;
827
+ return r2;
828
+ }
829
+ function an(e2, t2) {
830
+ if (!t2.startsWith(Gt)) return false;
831
+ let n2 = t2.slice(1);
832
+ return e2.length > n2.length && e2.endsWith(n2);
833
+ }
834
+ function on(e2) {
835
+ return !!e2.match(/\._base_domain_$/);
836
+ }
837
+ var sn = `www._base_domain_`;
838
+ function cn(e2, t2) {
839
+ return e2.split(`/`).map((e3) => ln(e3, t2)).join(`/`);
840
+ }
841
+ function ln(e2, t2) {
842
+ let n2 = e2.match(Xt) || [], r2 = n2[1];
843
+ return r2 ? un(t2, r2, e2, e2.replace(n2[0], ``)) : e2;
844
+ }
845
+ function un(e2, t2, n2, r2) {
846
+ let i2 = e2;
847
+ for (let e3 of t2.split(`.`)) {
848
+ if (!i2) return n2;
849
+ i2 = i2[e3];
850
+ }
851
+ return `${i2}${r2}`;
852
+ }
853
+ function dn(e2, t2) {
854
+ let n2 = t2?.find((t3) => e2.startsWith(t3.destPath));
855
+ return n2 ? n2.srcPath + e2.slice(n2.destPath.length) : e2;
856
+ }
857
+ function z(e2) {
858
+ return Rt(e2);
859
+ }
860
+ function fn(e2) {
861
+ return isFinite(e2) ? e2 : e2.toString();
862
+ }
863
+ function B(e2) {
864
+ return e2 === `NaN` ? NaN : e2 === `Infinity` ? 1 / 0 : e2 === `-Infinity` ? -1 / 0 : e2;
865
+ }
866
+ function pn(e2) {
867
+ return e2 && vt({ city: e2.city, hint: e2.hint, subdivision: e2.subdivision, country: e2.country, postalCode: e2.postalCode, formattedAddress: e2.formatted, geocode: e2.location, addressLine: e2.addressLine1, addressLine2: e2.addressLine2, streetAddress: e2.streetAddress && { name: e2.streetAddress.name, number: e2.streetAddress.number, apt: e2.streetAddress.apt, formattedAddressLine: e2.streetAddress.formattedAddressLine } });
868
+ }
869
+ function mn(e2) {
870
+ return e2 && vt({ formatted: e2.formattedAddress, location: e2.geocode, addressLine1: e2.addressLine, addressLine2: e2.addressLine2, streetAddress: e2.streetAddress && { name: e2.streetAddress.name, number: e2.streetAddress.number, apt: e2.streetAddress.apt, formattedAddressLine: e2.streetAddress.formattedAddressLine }, hint: e2.hint, city: e2.city, subdivision: e2.subdivision, country: e2.country, postalCode: e2.postalCode, countryFullname: e2.countryFullname, subdivisionFullname: e2.subdivisionFullname });
871
+ }
872
+ var hn = `x-wix-linguist`;
873
+ var gn = `00000000-0000-0000-0000-000000000000`;
874
+ var _n = `false`;
875
+ var vn = () => {
876
+ let e2 = xn(`language`), t2 = xn(`locale`);
877
+ if (e2) return { [hn]: [e2, t2 || e2, _n, gn].join(`|`) };
878
+ };
879
+ function yn() {
880
+ let e2 = null, t2 = null;
881
+ return { promise: new Promise((n2, r2) => {
882
+ e2 = n2, t2 = r2;
883
+ }), resolve: e2, reject: t2 };
884
+ }
885
+ var bn = () => (typeof window < `u` ? window.commonConfig : void 0) ?? globalThis.commonConfig;
886
+ var xn = (e2) => bn()?.[e2];
887
+ var Sn = ({ createHost: e2 }) => ({ __type: `host`, create: (e3) => ({}), host: (t2) => {
888
+ let { applicationId: n2, componentId: r2 } = t2 ?? {}, i2 = typeof window < `u` ? window.wixEmbedsAPI : void 0, a2 = e2(t2), o2 = wn();
889
+ return { ...a2, apiBaseUrl: o2, getMonitoringClient: i2?.getMonitoringClientFunction?.(n2, r2), essentials: { language: xn(`language`), locale: xn(`locale`), get passThroughHeaders() {
890
+ return vn();
891
+ } } };
892
+ }, auth: (e3) => {
893
+ let t2 = typeof window < `u` ? window.wixEmbedsAPI : void 0;
894
+ !e3 && Cn() && (e3 = t2?.getAccessTokenFunction?.());
895
+ let n2 = false, { resolve: r2, promise: i2 } = yn();
896
+ return { getAuthHeaders: async () => {
897
+ if (!e3 && n2 && (e3 = await i2), !e3) throw Error(`Failed to resolve auth token`);
898
+ return { headers: { Authorization: await e3() } };
899
+ }, getAccessTokenInjector: () => (n2 = true, (e4) => {
900
+ r2(e4);
901
+ }) };
902
+ } });
903
+ function Cn() {
904
+ return typeof document < `u` && document.currentScript?.tagName === `SCRIPT`;
905
+ }
906
+ function wn() {
907
+ let e2 = (typeof window < `u` ? window.wixEmbedsAPI : void 0)?.getExternalBaseUrl?.();
908
+ if (!e2) return;
909
+ let t2 = new URL(e2);
910
+ return t2?.pathname && t2.pathname !== `/` ? `${t2.hostname}${t2.pathname}` : t2.hostname;
911
+ }
912
+ var Tn = ({ clientSdk: e2, applicationId: t2 }) => ({ invoke: async ({ namespace: n2, method: r2, args: i2 }) => {
913
+ if (!e2) throw Error(`Wix Site SDK only works in a Wix site environment. Learn more: https://dev.wix.com/docs/sdk/host-modules/site/introduction`);
914
+ return e2.invoke({ namespace: n2, method: r2, args: i2, applicationId: t2, accessToken: `accessToken` });
915
+ }, getAccessToken: () => {
916
+ throw Error(`Not implemented`);
917
+ }, observeState: () => ({ disconnect: () => {
918
+ } }) });
919
+ var En = Sn({ createHost: function(e2) {
920
+ let t2 = (typeof $wixContext < `u` ? $wixContext.clientSdk : void 0) ?? e2?.clientSdk ?? (typeof window < `u` ? window?.clientSdk : void 0), { applicationId: n2 } = e2 || {};
921
+ if (!n2) throw Error(`"createHost" was called without a required field "applicationId"`);
922
+ return { channel: Tn({ clientSdk: t2, applicationId: n2 }), close: () => {
923
+ } };
924
+ } });
925
+ var Dn = (e2, t2) => {
926
+ let n2 = En.host({ applicationId: e2, componentId: t2 }), r2 = En.auth();
927
+ return Ge({ auth: r2, host: n2 }).enableContext(`module`), r2.getAccessTokenInjector();
928
+ };
929
+ var On = (e2) => Dn(`215238eb-22a5-4c36-9e7b-e7c08025e04e`, e2);
930
+ function kn(e2) {
931
+ if (e2.status === `fulfilled`) return e2.value;
932
+ throw e2.status === `rejected` ? e2.reason : e2.status === `pending` ? e2 : (e2.status = `pending`, e2.then((t2) => {
933
+ e2.status = `fulfilled`, e2.value = t2;
934
+ }, (t2) => {
935
+ e2.status = `rejected`, e2.reason = t2;
936
+ }), e2);
937
+ }
938
+ function An(e2) {
939
+ return Object.keys(e2).length === 1 && `$and` in e2 && Array.isArray(e2.$and);
940
+ }
941
+ function jn(e2) {
942
+ return Object.keys(e2).length === 1 && `$or` in e2 && Array.isArray(e2.$or);
943
+ }
944
+ function Mn(e2) {
945
+ return Object.keys(e2).length === 1 && `$not` in e2 && typeof e2.$not == `object`;
946
+ }
947
+ function V(e2, t2) {
948
+ return e2 === void 0 || Object.keys(e2).length === 0 ? t2 : t2 === void 0 || Object.keys(t2).length === 0 ? e2 : { $and: [...An(e2) ? e2.$and : [e2], ...An(t2) ? t2.$and : [t2]] };
949
+ }
950
+ function Nn(e2, t2) {
951
+ return e2 === void 0 || Object.keys(e2).length === 0 ? t2 : t2 === void 0 || Object.keys(t2).length === 0 ? e2 : { $or: [...jn(e2) ? e2.$or : [e2], ...jn(t2) ? t2.$or : [t2]] };
952
+ }
953
+ function Pn(e2) {
954
+ if (e2 !== void 0 && Object.keys(e2).length !== 0) return Mn(e2) ? e2.$not : { $not: e2 };
955
+ }
956
+ var Fn = class {
957
+ _items;
958
+ _fetchNextPage;
959
+ _fetchPrevPage;
960
+ _originQuery;
961
+ _limit;
962
+ constructor({ items: e2, originQuery: t2, fetchNextPage: n2, fetchPrevPage: r2, limit: i2 }) {
963
+ this._items = e2, this._fetchNextPage = n2, this._fetchPrevPage = r2, this._originQuery = t2, this._limit = i2;
964
+ }
965
+ get items() {
966
+ return this._items;
967
+ }
968
+ get length() {
969
+ return this._items.length;
970
+ }
971
+ get pageSize() {
972
+ return this._limit;
973
+ }
974
+ get query() {
975
+ return this._originQuery;
976
+ }
977
+ async next() {
978
+ if (!this.hasNext()) throw Error(`No next page to fetch`);
979
+ return await this._fetchNextPage();
980
+ }
981
+ async prev() {
982
+ if (!this.hasPrev()) throw Error(`No previous page to fetch`);
983
+ return await this._fetchPrevPage();
984
+ }
985
+ };
986
+ var In = class extends Fn {
987
+ _nextCursor;
988
+ _prevCursor;
989
+ cursors;
990
+ constructor({ items: e2, originQuery: t2, fetchNextPage: n2, fetchPrevPage: r2, limit: i2, nextCursor: a2, prevCursor: o2 }) {
991
+ super({ items: e2, originQuery: t2, fetchNextPage: n2, fetchPrevPage: r2, limit: i2 }), this._nextCursor = a2, this._prevCursor = o2, this.cursors = { next: a2, prev: o2 };
992
+ }
993
+ hasNext() {
994
+ return !!this._nextCursor;
995
+ }
996
+ hasPrev() {
997
+ return !!this._prevCursor;
998
+ }
999
+ };
1000
+ var Ln = class extends Fn {
1001
+ _totalCount;
1002
+ _offset;
1003
+ _tooManyToCount;
1004
+ constructor({ items: e2, fetchNextPage: t2, fetchPrevPage: n2, offset: r2, originQuery: i2, limit: a2, totalCount: o2, tooManyToCount: s2 }) {
1005
+ super({ items: e2, fetchNextPage: t2, fetchPrevPage: n2, originQuery: i2, limit: a2 }), this._totalCount = o2, this._offset = r2, this._tooManyToCount = s2;
1006
+ }
1007
+ get currentPage() {
1008
+ return this._limit === 0 ? void 0 : Math.floor(this._offset / this._limit);
1009
+ }
1010
+ get totalPages() {
1011
+ return this._tooManyToCount || this._limit === 0 ? void 0 : Math.ceil(this._totalCount / this._limit);
1012
+ }
1013
+ get totalCount() {
1014
+ return this._tooManyToCount ? void 0 : this._totalCount;
1015
+ }
1016
+ hasNext() {
1017
+ return this._limit !== 0 && this.currentPage !== void 0 && this.totalPages !== void 0 && this.currentPage < this.totalPages - 1;
1018
+ }
1019
+ hasPrev() {
1020
+ return !!(this._limit !== 0 && this.currentPage && this.currentPage > 0);
1021
+ }
1022
+ };
1023
+ function Rn(e2) {
1024
+ let t2 = (n2) => ({ query: n2, async find() {
1025
+ try {
1026
+ let r2 = e2.requestTransformer(e2.pagingMethod === `CURSOR` && n2.cursorPaging.cursor ? { cursorPaging: n2.cursorPaging } : n2), i2 = await e2.func(r2), { [Xe]: a2, [Ze]: o2 } = e2.responseTransformer(i2);
1027
+ if (e2.pagingMethod === `OFFSET`) {
1028
+ let e3 = n2;
1029
+ return new Ln({ items: a2 ?? [], fetchNextPage: () => t2({ ...e3, paging: { offset: e3.paging.offset + e3.paging.limit, limit: e3.paging.limit } }).find(), fetchPrevPage: () => t2({ ...n2, paging: { offset: Math.max(e3.paging.offset - e3.paging.limit, 0), limit: e3.paging.limit } }).find(), offset: e3.paging.offset, limit: e3.paging.limit, totalCount: o2?.total, tooManyToCount: o2?.tooManyToCount, originQuery: this });
1030
+ }
1031
+ let s2 = n2.cursorPaging;
1032
+ return new In({ items: a2 ?? [], limit: s2.limit, originQuery: this, fetchNextPage: () => t2({ ...n2, cursorPaging: { cursor: o2?.cursors?.next ?? void 0, limit: s2.limit } }).find(), fetchPrevPage: () => t2({ ...n2, cursorPaging: { cursor: o2?.cursors?.prev ?? void 0, limit: s2.limit } }).find(), prevCursor: o2?.cursors?.prev ?? void 0, nextCursor: o2?.cursors?.next ?? void 0 });
1033
+ } catch (t3) {
1034
+ throw e2.errorTransformer(t3);
1035
+ }
1036
+ }, skipTo(e3) {
1037
+ return t2({ ...n2, cursorPaging: { cursor: e3, limit: n2.cursorPaging.limit } });
1038
+ }, eq(r2, i2) {
1039
+ let a2 = i2 === void 0 ? null : i2, o2 = { [H(e2.transformationPaths, r2)]: a2 };
1040
+ return t2({ ...n2, filter: V(n2.filter, o2) });
1041
+ }, ne(r2, i2) {
1042
+ let a2 = i2 === void 0 ? null : i2, o2 = { [H(e2.transformationPaths, r2)]: { $ne: a2 } };
1043
+ return t2({ ...n2, filter: V(n2.filter, o2) });
1044
+ }, ge(r2, i2) {
1045
+ let a2 = { [H(e2.transformationPaths, r2)]: { $gte: i2 } };
1046
+ return t2({ ...n2, filter: V(n2.filter, a2) });
1047
+ }, gt(r2, i2) {
1048
+ let a2 = { [H(e2.transformationPaths, r2)]: { $gt: i2 } };
1049
+ return t2({ ...n2, filter: V(n2.filter, a2) });
1050
+ }, le(r2, i2) {
1051
+ let a2 = { [H(e2.transformationPaths, r2)]: { $lte: i2 } };
1052
+ return t2({ ...n2, filter: V(n2.filter, a2) });
1053
+ }, lt(r2, i2) {
1054
+ let a2 = { [H(e2.transformationPaths, r2)]: { $lt: i2 } };
1055
+ return t2({ ...n2, filter: V(n2.filter, a2) });
1056
+ }, isNotEmpty(e3) {
1057
+ return this.ne(e3, null);
1058
+ }, isEmpty(e3) {
1059
+ return this.eq(e3, null);
1060
+ }, startsWith(r2, i2) {
1061
+ let a2 = { [H(e2.transformationPaths, r2)]: { $startsWith: i2 } };
1062
+ return t2({ ...n2, filter: V(n2.filter, a2) });
1063
+ }, endsWith(r2, i2) {
1064
+ let a2 = { [H(e2.transformationPaths, r2)]: { $endsWith: i2 } };
1065
+ return t2({ ...n2, filter: V(n2.filter, a2) });
1066
+ }, contains(r2, i2) {
1067
+ let a2 = { [H(e2.transformationPaths, r2)]: { $contains: i2 } };
1068
+ return t2({ ...n2, filter: V(n2.filter, a2) });
1069
+ }, hasSome(r2, ...i2) {
1070
+ let a2 = { [H(e2.transformationPaths, r2)]: { $hasSome: Array.isArray(i2[0]) ? i2[0] : i2 } };
1071
+ return t2({ ...n2, filter: V(n2.filter, a2) });
1072
+ }, hasAll(r2, ...i2) {
1073
+ let a2 = { [H(e2.transformationPaths, r2)]: { $hasAll: Array.isArray(i2[0]) ? i2[0] : i2 } };
1074
+ return t2({ ...n2, filter: V(n2.filter, a2) });
1075
+ }, between(e3, t3, n3) {
1076
+ return this.ge(e3, t3).lt(e3, n3);
1077
+ }, in(r2, i2) {
1078
+ let a2 = { [H(e2.transformationPaths, r2)]: { $in: i2 } };
1079
+ return t2({ ...n2, filter: V(n2.filter, a2) });
1080
+ }, exists(r2, i2 = true) {
1081
+ let a2 = { [H(e2.transformationPaths, r2)]: { $exists: i2 } };
1082
+ return t2({ ...n2, filter: V(n2.filter, a2) });
1083
+ }, or(e3) {
1084
+ return t2({ ...n2, filter: Nn(n2.filter, e3.query.filter) });
1085
+ }, and(e3) {
1086
+ return t2({ ...n2, filter: V(n2.filter, e3.query.filter) });
1087
+ }, not(e3) {
1088
+ return t2({ ...n2, filter: Pn(e3.query.filter) });
1089
+ }, ascending(...r2) {
1090
+ return t2({ ...n2, sort: [...n2.sort ?? [], ...r2.map((t3) => ({ fieldName: H(e2.transformationPaths, t3), order: `ASC` }))] });
1091
+ }, descending(...r2) {
1092
+ return t2({ ...n2, sort: [...n2.sort ?? [], ...r2.map((t3) => ({ fieldName: H(e2.transformationPaths, t3), order: `DESC` }))] });
1093
+ }, skip(e3) {
1094
+ return t2({ ...n2, paging: { offset: e3, limit: `limit` in n2.paging ? n2.paging.limit : 50 } });
1095
+ }, limit(r2) {
1096
+ if (e2.pagingMethod === `CURSOR`) {
1097
+ let e3 = n2;
1098
+ return t2({ ...n2, cursorPaging: { limit: r2, cursor: `cursor` in e3.cursorPaging ? e3.cursorPaging.cursor : void 0 } });
1099
+ }
1100
+ let i2 = n2;
1101
+ return t2({ ...n2, paging: { limit: r2, offset: `offset` in i2.paging ? i2.paging.offset : 0 } });
1102
+ } });
1103
+ return t2({ filter: {}, ...e2.pagingMethod === `OFFSET` ? { paging: { offset: 0, limit: 50 } } : { cursorPaging: { limit: 50 } } });
1104
+ }
1105
+ function H(e2, t2) {
1106
+ let n2 = Object.entries(e2).find(([e3]) => e3 === t2 || t2.startsWith(`${e3}.`))?.[0];
1107
+ return n2 ? t2.replace(n2, e2[n2]) : $e(t2, { ...e2, ...Qe });
1108
+ }
1109
+ function zn(e2, t2, n2 = {}) {
1110
+ let r2 = (r3, i3) => zn(e2, t2, { ...n2, [r3]: i3 }), i2 = () => Object.keys(n2).length === 0 ? {} : { [j(e2, t2)]: n2 };
1111
+ return { get filter() {
1112
+ return i2();
1113
+ }, eq: (e3) => r2(`$eq`, e3), ne: (e3) => r2(`$ne`, e3), gt: (e3) => r2(`$gt`, e3), gte: (e3) => r2(`$gte`, e3), lt: (e3) => r2(`$lt`, e3), lte: (e3) => r2(`$lte`, e3), startsWith: (e3) => r2(`$startsWith`, e3), endsWith: (e3) => r2(`$endsWith`, e3), contains: (e3) => r2(`$contains`, e3), in: (e3) => r2(`$in`, e3), nin: (e3) => r2(`$nin`, e3), hasSome: (e3) => r2(`$hasSome`, e3), hasAll: (e3) => r2(`$hasAll`, e3), exists: (e3 = true) => r2(`$exists`, e3), isEmpty: (e3 = true) => r2(`$isEmpty`, e3), isNotEmpty: () => r2(`$ne`, null) };
1114
+ }
1115
+ function Bn(e2) {
1116
+ return Object.assign((t2) => zn(t2, e2), { and: (...e3) => ({ filter: { $and: e3.map((e4) => e4.filter) } }), or: (...e3) => ({ filter: { $or: e3.map((e4) => e4.filter) } }), not: (e3) => ({ filter: { $not: e3.filter } }) });
1117
+ }
1118
+ function Vn(e2) {
1119
+ return (t2) => ({ asc: () => ({ sort: { fieldName: j(t2, e2), order: `ASC` } }), desc: () => ({ sort: { fieldName: j(t2, e2), order: `DESC` } }) });
1120
+ }
1121
+ function Hn(e2) {
1122
+ return () => {
1123
+ let t2 = {}, n2 = { withFilter(e3) {
1124
+ return t2 = { ...t2, filter: e3.filter }, n2;
1125
+ }, withFields(...r2) {
1126
+ return t2 = { ...t2, fields: r2.map((t3) => j(t3, e2)) }, n2;
1127
+ }, withSorting(...e3) {
1128
+ return t2 = { ...t2, sort: e3.map((e4) => e4.sort) }, n2;
1129
+ }, withPaging(e3) {
1130
+ return t2 = { ...t2, paging: e3 }, n2;
1131
+ }, build() {
1132
+ return t2;
1133
+ } };
1134
+ return n2;
1135
+ };
1136
+ }
1137
+ function Un(e2) {
1138
+ return { QueryBuilder: Hn(e2), Filter: Bn(e2), Sort: Vn(e2) };
1139
+ }
1140
+ var Wn = `filter`;
1141
+ var Gn = `sort`;
1142
+ var Kn = `cursorPaging`;
1143
+ var qn = `paging`;
1144
+ var Jn = [Wn, Gn, Kn];
1145
+ var Yn = [Wn, Gn, qn];
1146
+ function Xn(e2, t2) {
1147
+ return !e2 || typeof e2 != `object` ? false : t2.some((t3) => e2.hasOwnProperty(t3));
1148
+ }
1149
+ function Zn(e2) {
1150
+ return Xn(e2, Jn);
1151
+ }
1152
+ function Qn(e2) {
1153
+ return Xn(e2, Yn);
1154
+ }
1155
+ function $n(e2) {
1156
+ let { hasOptionsParameter: t2 } = e2;
1157
+ return function(...n2) {
1158
+ return t2 ? tr(n2, e2) : er(n2, e2);
1159
+ };
1160
+ }
1161
+ function er(e2, t2) {
1162
+ return e2.length === 0 ? t2.builderQueryFunction() : t2.typedQueryFunction(e2[0]);
1163
+ }
1164
+ function tr(e2, t2) {
1165
+ switch (e2.length) {
1166
+ case 0:
1167
+ return t2.builderQueryFunction();
1168
+ case 1:
1169
+ return Zn(e2[0]) || Qn(e2[0]) ? t2.typedQueryFunction(e2[0]) : t2.builderQueryFunction(e2[0]);
1170
+ default:
1171
+ return t2.typedQueryFunction(e2[0], e2[1]);
1172
+ }
1173
+ }
1174
+ function nr(e2) {
1175
+ if (!e2) return;
1176
+ let t2 = _t(e2, `image`), { protocol: n2, hash: r2, pathname: i2 } = new URL(t2), a2 = new URLSearchParams(r2.replace(`#`, ``)), o2 = a2.get(`originHeight`), s2 = a2.get(`originWidth`), [c2, l2] = i2.replace(`image://v1/`, ``).split(`/`), u2 = decodeURIComponent(l2);
1177
+ if (n2 === `wix:`) {
1178
+ let t3 = { id: c2, height: Number(o2), width: Number(s2) };
1179
+ return u2 ? { ...t3, altText: u2, filename: u2, url: e2 } : t3;
1180
+ }
1181
+ return { url: e2 };
1182
+ }
1183
+ function U(e2) {
1184
+ if (!e2) return;
1185
+ let t2 = ``;
1186
+ return (e2.filename || e2.altText) && (t2 = `/${encodeURIComponent(e2.filename || e2.altText)}`), e2.id ? `wix:image://v1/${e2.id}${t2}#originWidth=${e2.width}&originHeight=${e2.height}` : e2.url;
1187
+ }
1188
+ function rr(e2) {
1189
+ if (!e2) return;
1190
+ let t2 = ``;
1191
+ e2?.filename && (t2 = `/${encodeURIComponent(e2.filename)}`);
1192
+ let n2 = ``;
1193
+ if (e2.posters?.length) {
1194
+ let [t3, r2] = e2.posters, i2 = r2 || t3, a2 = i2.id || ``;
1195
+ if (!a2 && i2.url) {
1196
+ let e3 = i2.url.lastIndexOf(`/`);
1197
+ e3 !== -1 && (a2 = i2.url.substring(e3 + 1));
1198
+ }
1199
+ a2 && (n2 = `#posterUri=${a2}&posterWidth=${i2.width}&posterHeight=${i2.height}`);
1200
+ }
1201
+ return e2.id ? `wix:video://v1/${e2.id}${t2}${n2}` : e2.url;
1202
+ }
1203
+ function ir(e2) {
1204
+ let t2 = {}, n2 = { get search() {
1205
+ return t2;
1206
+ }, expression(e3) {
1207
+ return t2 = { ...t2, expression: e3 }, n2;
1208
+ }, mode(e3) {
1209
+ return t2 = { ...t2, mode: e3 }, n2;
1210
+ }, fields(r2) {
1211
+ return t2 = { ...t2, fields: r2.map((t3) => j(t3, e2)) }, n2;
1212
+ }, fuzzy(e3 = true) {
1213
+ return t2 = { ...t2, fuzzy: e3 }, n2;
1214
+ } };
1215
+ return n2;
1216
+ }
1217
+ function ar(e2) {
1218
+ return (t2) => {
1219
+ let n2 = ir(e2);
1220
+ return t2 === void 0 ? n2 : n2.expression(t2);
1221
+ };
1222
+ }
1223
+ function or(e2) {
1224
+ let t2 = { ...e2, type: `VALUE`, value: { ...e2.value } }, n2 = { get aggregation() {
1225
+ return t2;
1226
+ }, sortBy(e3, r2) {
1227
+ return t2 = { ...t2, value: { ...t2.value, sortType: e3, sortDirection: r2 } }, n2;
1228
+ }, limit(e3) {
1229
+ return t2 = { ...t2, value: { ...t2.value, limit: e3 } }, n2;
1230
+ }, excludeMissingValues() {
1231
+ return t2 = { ...t2, value: { ...t2.value, missingValues: `EXCLUDE` } }, n2;
1232
+ }, includeMissingValues() {
1233
+ return t2 = { ...t2, value: { ...t2.value, missingValues: `INCLUDE` } }, n2;
1234
+ }, includeValues(e3) {
1235
+ return t2 = { ...t2, value: { ...t2.value, includeOptions: { addToBucket: e3 } } }, n2;
1236
+ } };
1237
+ return n2;
1238
+ }
1239
+ function sr(e2) {
1240
+ let t2 = { ...e2, type: `RANGE`, range: { buckets: [] } }, n2 = { get aggregation() {
1241
+ return t2;
1242
+ }, withBuckets(...e3) {
1243
+ return t2 = { ...t2, range: { buckets: e3 } }, n2;
1244
+ } };
1245
+ return n2;
1246
+ }
1247
+ function cr(e2) {
1248
+ let t2 = { ...e2, type: `DATE_HISTOGRAM`, dateHistogram: {} }, n2 = { get aggregation() {
1249
+ return t2;
1250
+ }, interval(e3) {
1251
+ return t2 = { ...t2, dateHistogram: { interval: e3 } }, n2;
1252
+ } };
1253
+ return n2;
1254
+ }
1255
+ function lr(e2) {
1256
+ let t2 = { ...e2, type: `SCALAR`, scalar: {} }, n2 = { get aggregation() {
1257
+ return t2;
1258
+ }, type(e3) {
1259
+ return t2 = { ...t2, scalar: { type: e3 } }, n2;
1260
+ } };
1261
+ return n2;
1262
+ }
1263
+ function ur(e2) {
1264
+ let t2 = { ...e2, type: `NESTED`, nested: { nestedAggregations: [] } }, n2 = { get aggregation() {
1265
+ return t2;
1266
+ }, addNestedAggregation(e3) {
1267
+ let r2 = e3.aggregation, i2 = [...t2.nested?.nestedAggregations ?? [], r2];
1268
+ return t2 = { ...t2, nested: { nestedAggregations: i2 } }, n2;
1269
+ } };
1270
+ return n2;
1271
+ }
1272
+ function dr(e2, t2) {
1273
+ let n2 = { name: e2 }, r2 = { get aggregation() {
1274
+ return n2;
1275
+ }, ofType(e3) {
1276
+ return n2 = { ...n2, type: e3 }, r2;
1277
+ }, onField(e3) {
1278
+ return n2 = { ...n2, fieldPath: j(e3, t2) }, r2;
1279
+ }, asValueAggregation() {
1280
+ return or(n2);
1281
+ }, asRangeAggregation() {
1282
+ return sr(n2);
1283
+ }, asDateHistogramAggregation() {
1284
+ return cr(n2);
1285
+ }, asScalarAggregation() {
1286
+ return lr(n2);
1287
+ }, asNestedAggregation() {
1288
+ return ur(n2);
1289
+ } };
1290
+ return r2;
1291
+ }
1292
+ function fr(e2) {
1293
+ return (t2) => dr(t2, e2);
1294
+ }
1295
+ function pr() {
1296
+ return () => {
1297
+ let e2 = {}, t2 = { withFilter(n2) {
1298
+ return e2 = { ...e2, filter: n2.filter }, t2;
1299
+ }, withSearchClause(n2) {
1300
+ return e2 = { ...e2, search: n2.search }, t2;
1301
+ }, withSorting(...n2) {
1302
+ return e2 = { ...e2, sort: n2.map((e3) => e3.sort) }, t2;
1303
+ }, withAggregation(...n2) {
1304
+ return e2 = { ...e2, aggregations: n2.map((e3) => e3.aggregation) }, t2;
1305
+ }, withPaging(n2) {
1306
+ return e2 = { ...e2, paging: n2 }, t2;
1307
+ }, withTimeZone(n2) {
1308
+ return e2 = { ...e2, timeZone: n2 }, t2;
1309
+ }, build() {
1310
+ return e2;
1311
+ } };
1312
+ return t2;
1313
+ };
1314
+ }
1315
+ function mr(e2) {
1316
+ return { SearchBuilder: pr(), Filter: Bn(e2), Sort: Vn(e2), SearchParams: ar(e2), Aggregation: fr(e2) };
1317
+ }
1318
+ function hr(e2) {
1319
+ return R(Object.assign(e2, { domainToMappings: { "manage._base_domain_": [{ srcPath: `/inventory`, destPath: `` }], "api._api_base_domain_": [{ srcPath: `/inventory`, destPath: `` }], _: [{ srcPath: `/_api/inventory`, destPath: `` }], "editor._base_domain_": [{ srcPath: `/_api/inventory`, destPath: `` }], "blocks._base_domain_": [{ srcPath: `/_api/inventory`, destPath: `` }], "create.editorx": [{ srcPath: `/_api/inventory`, destPath: `` }], "www.wixapis.com": [{ srcPath: `/stores/v3/inventory-items`, destPath: `/v3/inventory-items` }, { srcPath: `/stores/v3/bulk/inventory-items`, destPath: `/v3/bulk/inventory-items` }], "*.dev.wix-code.com": [{ srcPath: `/_api/inventory`, destPath: `` }], "editor.wixapps.net": [{ srcPath: `/_api/inventory`, destPath: `` }] } }));
1320
+ }
1321
+ var gr = `@wix/auto_sdk_stores_inventory-items-v-3`;
1322
+ function _r(e2) {
1323
+ function t2({ host: t3 }) {
1324
+ return { entityFqdn: `wix.stores.catalog.v3.inventory_item`, method: `GET`, methodFqn: `com.wix.stores.catalog.inventory.api.v3.InventoryService.QueryInventoryItems`, packageName: gr, migrationOptions: { optInTransformResponse: true }, url: hr({ protoPath: `/v3/inventory-items/query`, data: e2, host: t3 }), params: zt(e2, true), transformResponse: (e3) => F(e3, [{ transformFn: P, paths: [{ path: `inventoryItems.createdDate` }, { path: `inventoryItems.updatedDate` }] }]), fallback: [{ method: `POST`, url: hr({ protoPath: `/v3/inventory-items/query`, data: e2, host: t3 }), data: e2 }] };
1325
+ }
1326
+ return t2;
1327
+ }
1328
+ var vr = ((e2) => (e2.OUT_OF_STOCK = `OUT_OF_STOCK`, e2.IN_STOCK = `IN_STOCK`, e2.PREORDER = `PREORDER`, e2))(vr || {});
1329
+ function yr() {
1330
+ let { httpClient: e2, sideEffects: t2 } = arguments[0];
1331
+ return Rn({ func: async (n2) => {
1332
+ let r2 = _r(n2);
1333
+ t2?.onSiteCall?.();
1334
+ try {
1335
+ let n3 = await e2.request(r2);
1336
+ return t2?.onSuccess?.(n3), n3;
1337
+ } catch (e3) {
1338
+ throw t2?.onError?.(e3), e3;
1339
+ }
1340
+ }, requestTransformer: (e3) => {
1341
+ let t3 = [e3, {}];
1342
+ return M({ ...t3?.[1], query: t3?.[0] });
1343
+ }, responseTransformer: ({ data: e3 }) => {
1344
+ let t3 = N(F(e3, []));
1345
+ return { items: t3?.inventoryItems, pagingMetadata: t3?.pagingMetadata };
1346
+ }, errorTransformer: (e3) => {
1347
+ throw I(e3, { spreadPathsToArguments: {}, explicitPathsToArguments: { query: `$[0]` }, singleArgumentUnchanged: false });
1348
+ }, pagingMethod: `CURSOR`, transformationPaths: {} });
1349
+ }
1350
+ async function br(e2) {
1351
+ let { httpClient: t2, sideEffects: n2 } = arguments[1], r2 = _r(M({ query: e2 }));
1352
+ n2?.onSiteCall?.();
1353
+ try {
1354
+ let e3 = await t2.request(r2);
1355
+ return n2?.onSuccess?.(e3), N(e3.data);
1356
+ } catch (e3) {
1357
+ let t3 = I(e3, { spreadPathsToArguments: {}, explicitPathsToArguments: { query: `$[0]` }, singleArgumentUnchanged: false }, [`query`]);
1358
+ throw n2?.onError?.(e3), t3;
1359
+ }
1360
+ }
1361
+ ({ ...Un() }, { ...mr() });
1362
+ function xr(e2) {
1363
+ return () => yr({ httpClient: e2 });
1364
+ }
1365
+ function Sr(e2) {
1366
+ return (t2) => br(t2, { httpClient: e2 });
1367
+ }
1368
+ var Cr = x(`wix.stores.catalog.v3.inventory_item_created`, true, (e2) => N(F(e2, [{ transformFn: P, paths: [{ path: `entity.createdDate` }, { path: `entity.updatedDate` }, { path: `metadata.eventTime` }] }])))();
1369
+ var wr = x(`wix.stores.catalog.v3.inventory_item_deleted`, true, (e2) => N(F(e2, [{ transformFn: P, paths: [{ path: `entity.createdDate` }, { path: `entity.updatedDate` }, { path: `metadata.eventTime` }] }])))();
1370
+ var Tr = x(`wix.stores.catalog.v3.inventory_item_stock_status_updated`, true, (e2) => N(F(e2, [{ transformFn: P, paths: [{ path: `metadata.eventTime` }] }])))();
1371
+ var Er = x(`wix.stores.catalog.v3.inventory_item_updated`, true, (e2) => N(F(e2, [{ transformFn: P, paths: [{ path: `entity.createdDate` }, { path: `entity.updatedDate` }, { path: `metadata.eventTime` }, { path: `modifiedFields.createdDate` }, { path: `modifiedFields.updatedDate` }] }])))();
1372
+ var Dr = x(`wix.stores.catalog.v3.inventory_item_updated_with_reason`, true, (e2) => N(F(e2, [{ transformFn: P, paths: [{ path: `data.currentEntity.createdDate` }, { path: `data.currentEntity.updatedDate` }, { path: `metadata.eventTime` }] }])))();
1373
+ function Or(e2) {
1374
+ let t2 = $n({ builderQueryFunction: () => xr(e2)(), typedQueryFunction: (t3) => Sr(e2)(t3), hasOptionsParameter: false });
1375
+ function n2(e3) {
1376
+ return t2(...arguments);
1377
+ }
1378
+ return n2;
1379
+ }
1380
+ var kr = L(Or);
1381
+ z(Cr), z(wr), z(Tr), z(Er), z(Dr);
1382
+ function Ar(e2) {
1383
+ if (!e2) return;
1384
+ let { pathname: t2 } = new URL(e2);
1385
+ return { relativePath: t2, url: e2 };
1386
+ }
1387
+ function W(e2) {
1388
+ if (e2) return e2.url;
1389
+ }
1390
+ function jr(e2) {
1391
+ return R(Object.assign(e2, { domainToMappings: { "api._api_base_domain_": [{ srcPath: `/stores-catalog-orchestrator`, destPath: `` }], "manage._base_domain_": [{ srcPath: `/stores`, destPath: `` }], "www.wixapis.com": [{ srcPath: `/stores/v3/products`, destPath: `/v3/products` }, { srcPath: `/stores/v3/bulk/products`, destPath: `/v3/bulk/products` }, { srcPath: `/stores/v3/products-with-inventory`, destPath: `/v3/products-with-inventory` }, { srcPath: `/stores/v3/bulk/products-with-inventory`, destPath: `/v3/bulk/products-with-inventory` }, { srcPath: `/stores/v3/all-products-category`, destPath: `/v3/all-products-category` }], "www._base_domain_": [{ srcPath: `/_api/stores-catalog-orchestrator`, destPath: `` }], "editor._base_domain_": [{ srcPath: `/_api/stores-catalog-orchestrator`, destPath: `` }], "blocks._base_domain_": [{ srcPath: `/_api/stores-catalog-orchestrator`, destPath: `` }], "create.editorx": [{ srcPath: `/_api/stores-catalog-orchestrator`, destPath: `` }], "editor.wixapps.net": [{ srcPath: `/_api/stores-catalog-orchestrator`, destPath: `` }], "*.dev.wix-code.com": [{ srcPath: `/_api/stores-catalog-orchestrator`, destPath: `` }], _: [{ srcPath: `/_api/stores-catalog-orchestrator`, destPath: `` }] } }));
1392
+ }
1393
+ var Mr = `@wix/auto_sdk_stores_products-v-3`;
1394
+ function Nr(e2) {
1395
+ function t2({ host: t3 }) {
1396
+ return { entityFqdn: `wix.stores.catalog.v3.product`, method: `GET`, methodFqn: `wix.stores.catalog.v3.CatalogApi.GetProductBySlug`, packageName: Mr, migrationOptions: { optInTransformResponse: true }, url: jr({ protoPath: `/v3/products/slug/{slug}`, data: e2, host: t3 }), params: zt(e2), transformResponse: (e3) => F(e3, [{ transformFn: P, paths: [{ path: `product.createdDate` }, { path: `product.updatedDate` }, { path: `product.description.metadata.createdTimestamp` }, { path: `product.description.metadata.updatedTimestamp` }, { path: `product.media.main.image.urlExpirationDate` }, { path: `product.media.main.video.urlExpirationDate` }, { path: `product.media.main.video.resolutions.urlExpirationDate` }, { path: `product.media.main.video.resolutions.poster.urlExpirationDate` }, { path: `product.media.main.video.posters.urlExpirationDate` }, { path: `product.media.itemsInfo.items.image.urlExpirationDate` }, { path: `product.media.itemsInfo.items.video.urlExpirationDate` }, { path: `product.media.itemsInfo.items.video.resolutions.urlExpirationDate` }, { path: `product.media.itemsInfo.items.video.resolutions.poster.urlExpirationDate` }, { path: `product.media.itemsInfo.items.video.posters.urlExpirationDate` }, { path: `product.options.choicesSettings.choices.image.urlExpirationDate` }, { path: `product.options.choicesSettings.choices.linkedMedia.image.urlExpirationDate` }, { path: `product.options.choicesSettings.choices.linkedMedia.video.urlExpirationDate` }, { path: `product.options.choicesSettings.choices.linkedMedia.video.resolutions.urlExpirationDate` }, { path: `product.options.choicesSettings.choices.linkedMedia.video.resolutions.poster.urlExpirationDate` }, { path: `product.options.choicesSettings.choices.linkedMedia.video.posters.urlExpirationDate` }, { path: `product.options.choicesSettings.choices.displayImage.urlExpirationDate` }, { path: `product.modifiers.choicesSettings.choices.image.urlExpirationDate` }, { path: `product.modifiers.choicesSettings.choices.linkedMedia.image.urlExpirationDate` }, { path: `product.modifiers.choicesSettings.choices.linkedMedia.video.urlExpirationDate` }, { path: `product.modifiers.choicesSettings.choices.linkedMedia.video.resolutions.urlExpirationDate` }, { path: `product.modifiers.choicesSettings.choices.linkedMedia.video.resolutions.poster.urlExpirationDate` }, { path: `product.modifiers.choicesSettings.choices.linkedMedia.video.posters.urlExpirationDate` }, { path: `product.modifiers.choicesSettings.choices.displayImage.urlExpirationDate` }, { path: `product.infoSections.description.metadata.createdTimestamp` }, { path: `product.infoSections.description.metadata.updatedTimestamp` }, { path: `product.variantsInfo.variants.media.image.urlExpirationDate` }, { path: `product.variantsInfo.variants.media.video.urlExpirationDate` }, { path: `product.variantsInfo.variants.media.video.resolutions.urlExpirationDate` }, { path: `product.variantsInfo.variants.media.video.resolutions.poster.urlExpirationDate` }, { path: `product.variantsInfo.variants.media.video.posters.urlExpirationDate` }, { path: `product.variantSummary.minPriceVariant.media.image.urlExpirationDate` }, { path: `product.variantSummary.minPriceVariant.media.video.urlExpirationDate` }, { path: `product.variantSummary.minPriceVariant.media.video.resolutions.urlExpirationDate` }, { path: `product.variantSummary.minPriceVariant.media.video.resolutions.poster.urlExpirationDate` }, { path: `product.variantSummary.minPriceVariant.media.video.posters.urlExpirationDate` }] }, { transformFn: B, paths: [{ path: `product.physicalProperties.pricePerUnit.quantity` }, { path: `product.physicalProperties.shippingWeightRange.minValue` }, { path: `product.physicalProperties.shippingWeightRange.maxValue` }, { path: `product.variantsInfo.variants.physicalProperties.pricePerUnit.settings.quantity` }, { path: `product.variantsInfo.variants.revenueDetails.profitMargin` }, { path: `product.subscriptionDetails.subscriptions.discount.percentOff` }, { path: `product.variantSummary.minPriceVariant.physicalProperties.pricePerUnit.settings.quantity` }, { path: `product.variantSummary.minPriceVariant.revenueDetails.profitMargin` }, { path: `product.minVariantPriceInfo.pricePerUnitData.settings.quantity` }, { path: `product.minVariantPriceInfo.revenueDetails.profitMargin` }, { path: `product.description.nodes.buttonData.styles.background.gradient.centerX` }, { path: `product.description.nodes.buttonData.styles.background.gradient.centerY` }, { path: `product.description.nodes.buttonData.styles.background.gradient.stops.position` }, { path: `product.description.nodes.buttonData.styles.backgroundHover.gradient.centerX` }, { path: `product.description.nodes.buttonData.styles.backgroundHover.gradient.centerY` }, { path: `product.description.nodes.buttonData.styles.backgroundHover.gradient.stops.position` }, { path: `product.description.nodes.galleryData.items.image.media.duration` }, { path: `product.description.nodes.galleryData.items.video.media.duration` }, { path: `product.description.nodes.galleryData.items.video.thumbnail.duration` }, { path: `product.description.nodes.galleryData.options.item.ratio` }, { path: `product.description.nodes.imageData.image.duration` }, { path: `product.description.nodes.imageData.crop.x` }, { path: `product.description.nodes.imageData.crop.y` }, { path: `product.description.nodes.imageData.crop.width` }, { path: `product.description.nodes.imageData.crop.height` }, { path: `product.description.nodes.mapData.mapSettings.lat` }, { path: `product.description.nodes.mapData.mapSettings.lng` }, { path: `product.description.nodes.pollData.poll.image.duration` }, { path: `product.description.nodes.pollData.poll.options.image.duration` }, { path: `product.description.nodes.pollData.design.poll.background.image.duration` }, { path: `product.description.nodes.appEmbedData.image.duration` }, { path: `product.description.nodes.videoData.video.duration` }, { path: `product.description.nodes.videoData.thumbnail.duration` }, { path: `product.description.nodes.audioData.audio.duration` }, { path: `product.description.nodes.audioData.coverImage.duration` }, { path: `product.description.nodes.layoutData.backgroundImage.media.duration` }, { path: `product.description.nodes.layoutData.backgroundImage.overlay.gradient.centerX` }, { path: `product.description.nodes.layoutData.backgroundImage.overlay.gradient.centerY` }, { path: `product.description.nodes.layoutData.backgroundImage.overlay.gradient.stops.position` }, { path: `product.description.nodes.layoutData.backdropImage.media.duration` }, { path: `product.description.nodes.layoutData.backdropImage.overlay.gradient.centerX` }, { path: `product.description.nodes.layoutData.backdropImage.overlay.gradient.centerY` }, { path: `product.description.nodes.layoutData.backdropImage.overlay.gradient.stops.position` }, { path: `product.description.nodes.layoutData.background.gradient.centerX` }, { path: `product.description.nodes.layoutData.background.gradient.centerY` }, { path: `product.description.nodes.layoutData.background.gradient.stops.position` }, { path: `product.description.nodes.layoutData.backdrop.gradient.centerX` }, { path: `product.description.nodes.layoutData.backdrop.gradient.centerY` }, { path: `product.description.nodes.layoutData.backdrop.gradient.stops.position` }, { path: `product.description.nodes.shapeData.shape.duration` }, { path: `product.description.nodes.cardData.background.gradient.centerX` }, { path: `product.description.nodes.cardData.background.gradient.centerY` }, { path: `product.description.nodes.cardData.background.gradient.stops.position` }, { path: `product.description.nodes.cardData.backgroundImage.media.duration` }, { path: `product.description.nodes.cardData.backgroundImage.overlay.gradient.centerX` }, { path: `product.description.nodes.cardData.backgroundImage.overlay.gradient.centerY` }, { path: `product.description.nodes.cardData.backgroundImage.overlay.gradient.stops.position` }, { path: `product.description.nodes.tocData.fontSize` }, { path: `product.description.nodes.tocData.itemSpacing` }, { path: `product.description.nodes.smartBlockCellData.shape.duration` }, { path: `product.infoSections.description.nodes.buttonData.styles.background.gradient.centerX` }, { path: `product.infoSections.description.nodes.buttonData.styles.background.gradient.centerY` }, { path: `product.infoSections.description.nodes.buttonData.styles.background.gradient.stops.position` }, { path: `product.infoSections.description.nodes.buttonData.styles.backgroundHover.gradient.centerX` }, { path: `product.infoSections.description.nodes.buttonData.styles.backgroundHover.gradient.centerY` }, { path: `product.infoSections.description.nodes.buttonData.styles.backgroundHover.gradient.stops.position` }, { path: `product.infoSections.description.nodes.galleryData.items.image.media.duration` }, { path: `product.infoSections.description.nodes.galleryData.items.video.media.duration` }, { path: `product.infoSections.description.nodes.galleryData.items.video.thumbnail.duration` }, { path: `product.infoSections.description.nodes.galleryData.options.item.ratio` }, { path: `product.infoSections.description.nodes.imageData.image.duration` }, { path: `product.infoSections.description.nodes.imageData.crop.x` }, { path: `product.infoSections.description.nodes.imageData.crop.y` }, { path: `product.infoSections.description.nodes.imageData.crop.width` }, { path: `product.infoSections.description.nodes.imageData.crop.height` }, { path: `product.infoSections.description.nodes.mapData.mapSettings.lat` }, { path: `product.infoSections.description.nodes.mapData.mapSettings.lng` }, { path: `product.infoSections.description.nodes.pollData.poll.image.duration` }, { path: `product.infoSections.description.nodes.pollData.poll.options.image.duration` }, { path: `product.infoSections.description.nodes.pollData.design.poll.background.image.duration` }, { path: `product.infoSections.description.nodes.appEmbedData.image.duration` }, { path: `product.infoSections.description.nodes.videoData.video.duration` }, { path: `product.infoSections.description.nodes.videoData.thumbnail.duration` }, { path: `product.infoSections.description.nodes.audioData.audio.duration` }, { path: `product.infoSections.description.nodes.audioData.coverImage.duration` }, { path: `product.infoSections.description.nodes.layoutData.backgroundImage.media.duration` }, { path: `product.infoSections.description.nodes.layoutData.backgroundImage.overlay.gradient.centerX` }, { path: `product.infoSections.description.nodes.layoutData.backgroundImage.overlay.gradient.centerY` }, { path: `product.infoSections.description.nodes.layoutData.backgroundImage.overlay.gradient.stops.position` }, { path: `product.infoSections.description.nodes.layoutData.backdropImage.media.duration` }, { path: `product.infoSections.description.nodes.layoutData.backdropImage.overlay.gradient.centerX` }, { path: `product.infoSections.description.nodes.layoutData.backdropImage.overlay.gradient.centerY` }, { path: `product.infoSections.description.nodes.layoutData.backdropImage.overlay.gradient.stops.position` }, { path: `product.infoSections.description.nodes.layoutData.background.gradient.centerX` }, { path: `product.infoSections.description.nodes.layoutData.background.gradient.centerY` }, { path: `product.infoSections.description.nodes.layoutData.background.gradient.stops.position` }, { path: `product.infoSections.description.nodes.layoutData.backdrop.gradient.centerX` }, { path: `product.infoSections.description.nodes.layoutData.backdrop.gradient.centerY` }, { path: `product.infoSections.description.nodes.layoutData.backdrop.gradient.stops.position` }, { path: `product.infoSections.description.nodes.shapeData.shape.duration` }, { path: `product.infoSections.description.nodes.cardData.background.gradient.centerX` }, { path: `product.infoSections.description.nodes.cardData.background.gradient.centerY` }, { path: `product.infoSections.description.nodes.cardData.background.gradient.stops.position` }, { path: `product.infoSections.description.nodes.cardData.backgroundImage.media.duration` }, { path: `product.infoSections.description.nodes.cardData.backgroundImage.overlay.gradient.centerX` }, { path: `product.infoSections.description.nodes.cardData.backgroundImage.overlay.gradient.centerY` }, { path: `product.infoSections.description.nodes.cardData.backgroundImage.overlay.gradient.stops.position` }, { path: `product.infoSections.description.nodes.tocData.fontSize` }, { path: `product.infoSections.description.nodes.tocData.itemSpacing` }, { path: `product.infoSections.description.nodes.smartBlockCellData.shape.duration` }, { path: `product.variantsInfo.variants.physicalProperties.weight` }, { path: `product.variantSummary.minPriceVariant.physicalProperties.weight` }, { path: `product.minVariantPriceInfo.weight` }] }]) };
1397
+ }
1398
+ return t2;
1399
+ }
1400
+ var Pr = ((e2) => (e2.FREE_TEXT = `FREE_TEXT`, e2.TEXT_CHOICES = `TEXT_CHOICES`, e2.SWATCH_CHOICES = `SWATCH_CHOICES`, e2))(Pr || {});
1401
+ var Fr = ((e2) => (e2.IN_STOCK = `IN_STOCK`, e2.OUT_OF_STOCK = `OUT_OF_STOCK`, e2.PARTIALLY_OUT_OF_STOCK = `PARTIALLY_OUT_OF_STOCK`, e2))(Fr || {});
1402
+ var Ir = ((e2) => (e2.ALL_VARIANTS = `ALL_VARIANTS`, e2.NO_VARIANTS = `NO_VARIANTS`, e2.SOME_VARIANTS = `SOME_VARIANTS`, e2))(Ir || {});
1403
+ var G = ((e2) => (e2.URL = `URL`, e2.CURRENCY = `CURRENCY`, e2.INFO_SECTION = `INFO_SECTION`, e2.MERCHANT_DATA = `MERCHANT_DATA`, e2.PLAIN_DESCRIPTION = `PLAIN_DESCRIPTION`, e2.INFO_SECTION_PLAIN_DESCRIPTION = `INFO_SECTION_PLAIN_DESCRIPTION`, e2.SUBSCRIPTION_PRICES_INFO = `SUBSCRIPTION_PRICES_INFO`, e2.BREADCRUMBS_INFO = `BREADCRUMBS_INFO`, e2.WEIGHT_MEASUREMENT_UNIT_INFO = `WEIGHT_MEASUREMENT_UNIT_INFO`, e2.VARIANT_OPTION_CHOICE_NAMES = `VARIANT_OPTION_CHOICE_NAMES`, e2.MEDIA_ITEMS_INFO = `MEDIA_ITEMS_INFO`, e2.DESCRIPTION = `DESCRIPTION`, e2.DIRECT_CATEGORIES_INFO = `DIRECT_CATEGORIES_INFO`, e2.ALL_CATEGORIES_INFO = `ALL_CATEGORIES_INFO`, e2.INFO_SECTION_DESCRIPTION = `INFO_SECTION_DESCRIPTION`, e2.THUMBNAIL = `THUMBNAIL`, e2.PRODUCT_CHOICES_MEDIA_REFERENCES = `PRODUCT_CHOICES_MEDIA_REFERENCES`, e2.PRODUCT_CHOICES_DISPLAY_IMAGE = `PRODUCT_CHOICES_DISPLAY_IMAGE`, e2.MIN_PRICE_VARIANT = `MIN_PRICE_VARIANT`, e2.DISCOUNT_INFO = `DISCOUNT_INFO`, e2))(G || {});
1404
+ async function Lr(e2, t2) {
1405
+ let { httpClient: n2, sideEffects: r2 } = arguments[2], i2 = Nr(M({ slug: e2, fields: t2?.fields }, []));
1406
+ r2?.onSiteCall?.();
1407
+ try {
1408
+ let e3 = await n2.request(i2);
1409
+ return r2?.onSuccess?.(e3), N(F(e3.data, [{ transformFn: W, paths: [{ path: `product.url` }] }, { transformFn: U, paths: [{ path: `product.media.main.image` }, { path: `product.media.itemsInfo.items.image` }, { path: `product.options.choicesSettings.choices.image` }, { path: `product.options.choicesSettings.choices.displayImage` }, { path: `product.options.choicesSettings.choices.linkedMedia.image` }, { path: `product.modifiers.choicesSettings.choices.image` }, { path: `product.modifiers.choicesSettings.choices.displayImage` }, { path: `product.modifiers.choicesSettings.choices.linkedMedia.image` }, { path: `product.variantsInfo.variants.media.image` }, { path: `product.variantSummary.minPriceVariant.media.image` }] }, { transformFn: rr, paths: [{ path: `product.media.main.video` }, { path: `product.media.itemsInfo.items.video` }, { path: `product.options.choicesSettings.choices.linkedMedia.video` }, { path: `product.modifiers.choicesSettings.choices.linkedMedia.video` }, { path: `product.variantsInfo.variants.media.video` }, { path: `product.variantSummary.minPriceVariant.media.video` }] }]), [`product.description`, `product.infoSections.description`]);
1410
+ } catch (e3) {
1411
+ let t3 = I(e3, { spreadPathsToArguments: {}, explicitPathsToArguments: { slug: `$[0]`, fields: `$[1].fields` }, singleArgumentUnchanged: false }, [`slug`, `options`]);
1412
+ throw r2?.onError?.(e3), t3;
1413
+ }
1414
+ }
1415
+ ({ ...mr() }, { ...Un() });
1416
+ function Rr(e2) {
1417
+ return (t2, n2) => Lr(t2, n2, { httpClient: e2 });
1418
+ }
1419
+ var zr = x(`wix.stores.catalog.v3.product_created`, true, (e2) => N(F(e2, [{ transformFn: P, paths: [{ path: `entity.createdDate` }, { path: `entity.updatedDate` }, { path: `entity.description.metadata.createdTimestamp` }, { path: `entity.description.metadata.updatedTimestamp` }, { path: `entity.infoSections.description.metadata.createdTimestamp` }, { path: `entity.infoSections.description.metadata.updatedTimestamp` }, { path: `metadata.eventTime` }] }, { transformFn: W, paths: [{ path: `entity.url` }] }, { transformFn: B, paths: [{ path: `entity.physicalProperties.pricePerUnit.quantity` }, { path: `entity.physicalProperties.shippingWeightRange.minValue` }, { path: `entity.physicalProperties.shippingWeightRange.maxValue` }, { path: `entity.variantsInfo.variants.physicalProperties.pricePerUnit.settings.quantity` }, { path: `entity.variantsInfo.variants.revenueDetails.profitMargin` }, { path: `entity.subscriptionDetails.subscriptions.discount.percentOff` }, { path: `entity.variantSummary.minPriceVariant.physicalProperties.pricePerUnit.settings.quantity` }, { path: `entity.variantSummary.minPriceVariant.revenueDetails.profitMargin` }, { path: `entity.minVariantPriceInfo.pricePerUnitData.settings.quantity` }, { path: `entity.minVariantPriceInfo.revenueDetails.profitMargin` }, { path: `entity.description.nodes.buttonData.styles.background.gradient.centerX` }, { path: `entity.description.nodes.buttonData.styles.background.gradient.centerY` }, { path: `entity.description.nodes.buttonData.styles.background.gradient.stops.position` }, { path: `entity.description.nodes.buttonData.styles.backgroundHover.gradient.centerX` }, { path: `entity.description.nodes.buttonData.styles.backgroundHover.gradient.centerY` }, { path: `entity.description.nodes.buttonData.styles.backgroundHover.gradient.stops.position` }, { path: `entity.description.nodes.galleryData.items.image.media.duration` }, { path: `entity.description.nodes.galleryData.items.video.media.duration` }, { path: `entity.description.nodes.galleryData.items.video.thumbnail.duration` }, { path: `entity.description.nodes.galleryData.options.item.ratio` }, { path: `entity.description.nodes.imageData.image.duration` }, { path: `entity.description.nodes.imageData.crop.x` }, { path: `entity.description.nodes.imageData.crop.y` }, { path: `entity.description.nodes.imageData.crop.width` }, { path: `entity.description.nodes.imageData.crop.height` }, { path: `entity.description.nodes.mapData.mapSettings.lat` }, { path: `entity.description.nodes.mapData.mapSettings.lng` }, { path: `entity.description.nodes.pollData.poll.image.duration` }, { path: `entity.description.nodes.pollData.poll.options.image.duration` }, { path: `entity.description.nodes.pollData.design.poll.background.image.duration` }, { path: `entity.description.nodes.appEmbedData.image.duration` }, { path: `entity.description.nodes.videoData.video.duration` }, { path: `entity.description.nodes.videoData.thumbnail.duration` }, { path: `entity.description.nodes.audioData.audio.duration` }, { path: `entity.description.nodes.audioData.coverImage.duration` }, { path: `entity.description.nodes.layoutData.backgroundImage.media.duration` }, { path: `entity.description.nodes.layoutData.backgroundImage.overlay.gradient.centerX` }, { path: `entity.description.nodes.layoutData.backgroundImage.overlay.gradient.centerY` }, { path: `entity.description.nodes.layoutData.backgroundImage.overlay.gradient.stops.position` }, { path: `entity.description.nodes.layoutData.backdropImage.media.duration` }, { path: `entity.description.nodes.layoutData.backdropImage.overlay.gradient.centerX` }, { path: `entity.description.nodes.layoutData.backdropImage.overlay.gradient.centerY` }, { path: `entity.description.nodes.layoutData.backdropImage.overlay.gradient.stops.position` }, { path: `entity.description.nodes.layoutData.background.gradient.centerX` }, { path: `entity.description.nodes.layoutData.background.gradient.centerY` }, { path: `entity.description.nodes.layoutData.background.gradient.stops.position` }, { path: `entity.description.nodes.layoutData.backdrop.gradient.centerX` }, { path: `entity.description.nodes.layoutData.backdrop.gradient.centerY` }, { path: `entity.description.nodes.layoutData.backdrop.gradient.stops.position` }, { path: `entity.description.nodes.shapeData.shape.duration` }, { path: `entity.description.nodes.cardData.background.gradient.centerX` }, { path: `entity.description.nodes.cardData.background.gradient.centerY` }, { path: `entity.description.nodes.cardData.background.gradient.stops.position` }, { path: `entity.description.nodes.cardData.backgroundImage.media.duration` }, { path: `entity.description.nodes.cardData.backgroundImage.overlay.gradient.centerX` }, { path: `entity.description.nodes.cardData.backgroundImage.overlay.gradient.centerY` }, { path: `entity.description.nodes.cardData.backgroundImage.overlay.gradient.stops.position` }, { path: `entity.description.nodes.tocData.fontSize` }, { path: `entity.description.nodes.tocData.itemSpacing` }, { path: `entity.description.nodes.smartBlockCellData.shape.duration` }, { path: `entity.infoSections.description.nodes.buttonData.styles.background.gradient.centerX` }, { path: `entity.infoSections.description.nodes.buttonData.styles.background.gradient.centerY` }, { path: `entity.infoSections.description.nodes.buttonData.styles.background.gradient.stops.position` }, { path: `entity.infoSections.description.nodes.buttonData.styles.backgroundHover.gradient.centerX` }, { path: `entity.infoSections.description.nodes.buttonData.styles.backgroundHover.gradient.centerY` }, { path: `entity.infoSections.description.nodes.buttonData.styles.backgroundHover.gradient.stops.position` }, { path: `entity.infoSections.description.nodes.galleryData.items.image.media.duration` }, { path: `entity.infoSections.description.nodes.galleryData.items.video.media.duration` }, { path: `entity.infoSections.description.nodes.galleryData.items.video.thumbnail.duration` }, { path: `entity.infoSections.description.nodes.galleryData.options.item.ratio` }, { path: `entity.infoSections.description.nodes.imageData.image.duration` }, { path: `entity.infoSections.description.nodes.imageData.crop.x` }, { path: `entity.infoSections.description.nodes.imageData.crop.y` }, { path: `entity.infoSections.description.nodes.imageData.crop.width` }, { path: `entity.infoSections.description.nodes.imageData.crop.height` }, { path: `entity.infoSections.description.nodes.mapData.mapSettings.lat` }, { path: `entity.infoSections.description.nodes.mapData.mapSettings.lng` }, { path: `entity.infoSections.description.nodes.pollData.poll.image.duration` }, { path: `entity.infoSections.description.nodes.pollData.poll.options.image.duration` }, { path: `entity.infoSections.description.nodes.pollData.design.poll.background.image.duration` }, { path: `entity.infoSections.description.nodes.appEmbedData.image.duration` }, { path: `entity.infoSections.description.nodes.videoData.video.duration` }, { path: `entity.infoSections.description.nodes.videoData.thumbnail.duration` }, { path: `entity.infoSections.description.nodes.audioData.audio.duration` }, { path: `entity.infoSections.description.nodes.audioData.coverImage.duration` }, { path: `entity.infoSections.description.nodes.layoutData.backgroundImage.media.duration` }, { path: `entity.infoSections.description.nodes.layoutData.backgroundImage.overlay.gradient.centerX` }, { path: `entity.infoSections.description.nodes.layoutData.backgroundImage.overlay.gradient.centerY` }, { path: `entity.infoSections.description.nodes.layoutData.backgroundImage.overlay.gradient.stops.position` }, { path: `entity.infoSections.description.nodes.layoutData.backdropImage.media.duration` }, { path: `entity.infoSections.description.nodes.layoutData.backdropImage.overlay.gradient.centerX` }, { path: `entity.infoSections.description.nodes.layoutData.backdropImage.overlay.gradient.centerY` }, { path: `entity.infoSections.description.nodes.layoutData.backdropImage.overlay.gradient.stops.position` }, { path: `entity.infoSections.description.nodes.layoutData.background.gradient.centerX` }, { path: `entity.infoSections.description.nodes.layoutData.background.gradient.centerY` }, { path: `entity.infoSections.description.nodes.layoutData.background.gradient.stops.position` }, { path: `entity.infoSections.description.nodes.layoutData.backdrop.gradient.centerX` }, { path: `entity.infoSections.description.nodes.layoutData.backdrop.gradient.centerY` }, { path: `entity.infoSections.description.nodes.layoutData.backdrop.gradient.stops.position` }, { path: `entity.infoSections.description.nodes.shapeData.shape.duration` }, { path: `entity.infoSections.description.nodes.cardData.background.gradient.centerX` }, { path: `entity.infoSections.description.nodes.cardData.background.gradient.centerY` }, { path: `entity.infoSections.description.nodes.cardData.background.gradient.stops.position` }, { path: `entity.infoSections.description.nodes.cardData.backgroundImage.media.duration` }, { path: `entity.infoSections.description.nodes.cardData.backgroundImage.overlay.gradient.centerX` }, { path: `entity.infoSections.description.nodes.cardData.backgroundImage.overlay.gradient.centerY` }, { path: `entity.infoSections.description.nodes.cardData.backgroundImage.overlay.gradient.stops.position` }, { path: `entity.infoSections.description.nodes.tocData.fontSize` }, { path: `entity.infoSections.description.nodes.tocData.itemSpacing` }, { path: `entity.infoSections.description.nodes.smartBlockCellData.shape.duration` }, { path: `entity.variantsInfo.variants.physicalProperties.weight` }, { path: `entity.variantSummary.minPriceVariant.physicalProperties.weight` }, { path: `entity.minVariantPriceInfo.weight` }] }, { transformFn: U, paths: [{ path: `entity.media.main.image` }, { path: `entity.media.itemsInfo.items.image` }, { path: `entity.options.choicesSettings.choices.image` }, { path: `entity.options.choicesSettings.choices.displayImage` }, { path: `entity.options.choicesSettings.choices.linkedMedia.image` }, { path: `entity.modifiers.choicesSettings.choices.image` }, { path: `entity.modifiers.choicesSettings.choices.displayImage` }, { path: `entity.modifiers.choicesSettings.choices.linkedMedia.image` }, { path: `entity.variantsInfo.variants.media.image` }, { path: `entity.variantSummary.minPriceVariant.media.image` }] }, { transformFn: rr, paths: [{ path: `entity.media.main.video` }, { path: `entity.media.itemsInfo.items.video` }, { path: `entity.options.choicesSettings.choices.linkedMedia.video` }, { path: `entity.modifiers.choicesSettings.choices.linkedMedia.video` }, { path: `entity.variantsInfo.variants.media.video` }, { path: `entity.variantSummary.minPriceVariant.media.video` }] }])))();
1420
+ var Br = x(`wix.stores.catalog.v3.product_deleted`, true, (e2) => N(F(e2, [{ transformFn: P, paths: [{ path: `entity.createdDate` }, { path: `entity.updatedDate` }, { path: `entity.description.metadata.createdTimestamp` }, { path: `entity.description.metadata.updatedTimestamp` }, { path: `entity.infoSections.description.metadata.createdTimestamp` }, { path: `entity.infoSections.description.metadata.updatedTimestamp` }, { path: `metadata.eventTime` }] }, { transformFn: W, paths: [{ path: `entity.url` }] }, { transformFn: B, paths: [{ path: `entity.physicalProperties.pricePerUnit.quantity` }, { path: `entity.physicalProperties.shippingWeightRange.minValue` }, { path: `entity.physicalProperties.shippingWeightRange.maxValue` }, { path: `entity.variantsInfo.variants.physicalProperties.pricePerUnit.settings.quantity` }, { path: `entity.variantsInfo.variants.revenueDetails.profitMargin` }, { path: `entity.subscriptionDetails.subscriptions.discount.percentOff` }, { path: `entity.variantSummary.minPriceVariant.physicalProperties.pricePerUnit.settings.quantity` }, { path: `entity.variantSummary.minPriceVariant.revenueDetails.profitMargin` }, { path: `entity.minVariantPriceInfo.pricePerUnitData.settings.quantity` }, { path: `entity.minVariantPriceInfo.revenueDetails.profitMargin` }, { path: `entity.description.nodes.buttonData.styles.background.gradient.centerX` }, { path: `entity.description.nodes.buttonData.styles.background.gradient.centerY` }, { path: `entity.description.nodes.buttonData.styles.background.gradient.stops.position` }, { path: `entity.description.nodes.buttonData.styles.backgroundHover.gradient.centerX` }, { path: `entity.description.nodes.buttonData.styles.backgroundHover.gradient.centerY` }, { path: `entity.description.nodes.buttonData.styles.backgroundHover.gradient.stops.position` }, { path: `entity.description.nodes.galleryData.items.image.media.duration` }, { path: `entity.description.nodes.galleryData.items.video.media.duration` }, { path: `entity.description.nodes.galleryData.items.video.thumbnail.duration` }, { path: `entity.description.nodes.galleryData.options.item.ratio` }, { path: `entity.description.nodes.imageData.image.duration` }, { path: `entity.description.nodes.imageData.crop.x` }, { path: `entity.description.nodes.imageData.crop.y` }, { path: `entity.description.nodes.imageData.crop.width` }, { path: `entity.description.nodes.imageData.crop.height` }, { path: `entity.description.nodes.mapData.mapSettings.lat` }, { path: `entity.description.nodes.mapData.mapSettings.lng` }, { path: `entity.description.nodes.pollData.poll.image.duration` }, { path: `entity.description.nodes.pollData.poll.options.image.duration` }, { path: `entity.description.nodes.pollData.design.poll.background.image.duration` }, { path: `entity.description.nodes.appEmbedData.image.duration` }, { path: `entity.description.nodes.videoData.video.duration` }, { path: `entity.description.nodes.videoData.thumbnail.duration` }, { path: `entity.description.nodes.audioData.audio.duration` }, { path: `entity.description.nodes.audioData.coverImage.duration` }, { path: `entity.description.nodes.layoutData.backgroundImage.media.duration` }, { path: `entity.description.nodes.layoutData.backgroundImage.overlay.gradient.centerX` }, { path: `entity.description.nodes.layoutData.backgroundImage.overlay.gradient.centerY` }, { path: `entity.description.nodes.layoutData.backgroundImage.overlay.gradient.stops.position` }, { path: `entity.description.nodes.layoutData.backdropImage.media.duration` }, { path: `entity.description.nodes.layoutData.backdropImage.overlay.gradient.centerX` }, { path: `entity.description.nodes.layoutData.backdropImage.overlay.gradient.centerY` }, { path: `entity.description.nodes.layoutData.backdropImage.overlay.gradient.stops.position` }, { path: `entity.description.nodes.layoutData.background.gradient.centerX` }, { path: `entity.description.nodes.layoutData.background.gradient.centerY` }, { path: `entity.description.nodes.layoutData.background.gradient.stops.position` }, { path: `entity.description.nodes.layoutData.backdrop.gradient.centerX` }, { path: `entity.description.nodes.layoutData.backdrop.gradient.centerY` }, { path: `entity.description.nodes.layoutData.backdrop.gradient.stops.position` }, { path: `entity.description.nodes.shapeData.shape.duration` }, { path: `entity.description.nodes.cardData.background.gradient.centerX` }, { path: `entity.description.nodes.cardData.background.gradient.centerY` }, { path: `entity.description.nodes.cardData.background.gradient.stops.position` }, { path: `entity.description.nodes.cardData.backgroundImage.media.duration` }, { path: `entity.description.nodes.cardData.backgroundImage.overlay.gradient.centerX` }, { path: `entity.description.nodes.cardData.backgroundImage.overlay.gradient.centerY` }, { path: `entity.description.nodes.cardData.backgroundImage.overlay.gradient.stops.position` }, { path: `entity.description.nodes.tocData.fontSize` }, { path: `entity.description.nodes.tocData.itemSpacing` }, { path: `entity.description.nodes.smartBlockCellData.shape.duration` }, { path: `entity.infoSections.description.nodes.buttonData.styles.background.gradient.centerX` }, { path: `entity.infoSections.description.nodes.buttonData.styles.background.gradient.centerY` }, { path: `entity.infoSections.description.nodes.buttonData.styles.background.gradient.stops.position` }, { path: `entity.infoSections.description.nodes.buttonData.styles.backgroundHover.gradient.centerX` }, { path: `entity.infoSections.description.nodes.buttonData.styles.backgroundHover.gradient.centerY` }, { path: `entity.infoSections.description.nodes.buttonData.styles.backgroundHover.gradient.stops.position` }, { path: `entity.infoSections.description.nodes.galleryData.items.image.media.duration` }, { path: `entity.infoSections.description.nodes.galleryData.items.video.media.duration` }, { path: `entity.infoSections.description.nodes.galleryData.items.video.thumbnail.duration` }, { path: `entity.infoSections.description.nodes.galleryData.options.item.ratio` }, { path: `entity.infoSections.description.nodes.imageData.image.duration` }, { path: `entity.infoSections.description.nodes.imageData.crop.x` }, { path: `entity.infoSections.description.nodes.imageData.crop.y` }, { path: `entity.infoSections.description.nodes.imageData.crop.width` }, { path: `entity.infoSections.description.nodes.imageData.crop.height` }, { path: `entity.infoSections.description.nodes.mapData.mapSettings.lat` }, { path: `entity.infoSections.description.nodes.mapData.mapSettings.lng` }, { path: `entity.infoSections.description.nodes.pollData.poll.image.duration` }, { path: `entity.infoSections.description.nodes.pollData.poll.options.image.duration` }, { path: `entity.infoSections.description.nodes.pollData.design.poll.background.image.duration` }, { path: `entity.infoSections.description.nodes.appEmbedData.image.duration` }, { path: `entity.infoSections.description.nodes.videoData.video.duration` }, { path: `entity.infoSections.description.nodes.videoData.thumbnail.duration` }, { path: `entity.infoSections.description.nodes.audioData.audio.duration` }, { path: `entity.infoSections.description.nodes.audioData.coverImage.duration` }, { path: `entity.infoSections.description.nodes.layoutData.backgroundImage.media.duration` }, { path: `entity.infoSections.description.nodes.layoutData.backgroundImage.overlay.gradient.centerX` }, { path: `entity.infoSections.description.nodes.layoutData.backgroundImage.overlay.gradient.centerY` }, { path: `entity.infoSections.description.nodes.layoutData.backgroundImage.overlay.gradient.stops.position` }, { path: `entity.infoSections.description.nodes.layoutData.backdropImage.media.duration` }, { path: `entity.infoSections.description.nodes.layoutData.backdropImage.overlay.gradient.centerX` }, { path: `entity.infoSections.description.nodes.layoutData.backdropImage.overlay.gradient.centerY` }, { path: `entity.infoSections.description.nodes.layoutData.backdropImage.overlay.gradient.stops.position` }, { path: `entity.infoSections.description.nodes.layoutData.background.gradient.centerX` }, { path: `entity.infoSections.description.nodes.layoutData.background.gradient.centerY` }, { path: `entity.infoSections.description.nodes.layoutData.background.gradient.stops.position` }, { path: `entity.infoSections.description.nodes.layoutData.backdrop.gradient.centerX` }, { path: `entity.infoSections.description.nodes.layoutData.backdrop.gradient.centerY` }, { path: `entity.infoSections.description.nodes.layoutData.backdrop.gradient.stops.position` }, { path: `entity.infoSections.description.nodes.shapeData.shape.duration` }, { path: `entity.infoSections.description.nodes.cardData.background.gradient.centerX` }, { path: `entity.infoSections.description.nodes.cardData.background.gradient.centerY` }, { path: `entity.infoSections.description.nodes.cardData.background.gradient.stops.position` }, { path: `entity.infoSections.description.nodes.cardData.backgroundImage.media.duration` }, { path: `entity.infoSections.description.nodes.cardData.backgroundImage.overlay.gradient.centerX` }, { path: `entity.infoSections.description.nodes.cardData.backgroundImage.overlay.gradient.centerY` }, { path: `entity.infoSections.description.nodes.cardData.backgroundImage.overlay.gradient.stops.position` }, { path: `entity.infoSections.description.nodes.tocData.fontSize` }, { path: `entity.infoSections.description.nodes.tocData.itemSpacing` }, { path: `entity.infoSections.description.nodes.smartBlockCellData.shape.duration` }, { path: `entity.variantsInfo.variants.physicalProperties.weight` }, { path: `entity.variantSummary.minPriceVariant.physicalProperties.weight` }, { path: `entity.minVariantPriceInfo.weight` }] }, { transformFn: U, paths: [{ path: `entity.media.main.image` }, { path: `entity.media.itemsInfo.items.image` }, { path: `entity.options.choicesSettings.choices.image` }, { path: `entity.options.choicesSettings.choices.displayImage` }, { path: `entity.options.choicesSettings.choices.linkedMedia.image` }, { path: `entity.modifiers.choicesSettings.choices.image` }, { path: `entity.modifiers.choicesSettings.choices.displayImage` }, { path: `entity.modifiers.choicesSettings.choices.linkedMedia.image` }, { path: `entity.variantsInfo.variants.media.image` }, { path: `entity.variantSummary.minPriceVariant.media.image` }] }, { transformFn: rr, paths: [{ path: `entity.media.main.video` }, { path: `entity.media.itemsInfo.items.video` }, { path: `entity.options.choicesSettings.choices.linkedMedia.video` }, { path: `entity.modifiers.choicesSettings.choices.linkedMedia.video` }, { path: `entity.variantsInfo.variants.media.video` }, { path: `entity.variantSummary.minPriceVariant.media.video` }] }])))();
1421
+ var Vr = x(`wix.stores.catalog.v3.product_updated`, true, (e2) => N(F(e2, [{ transformFn: P, paths: [{ path: `entity.createdDate` }, { path: `entity.updatedDate` }, { path: `entity.description.metadata.createdTimestamp` }, { path: `entity.description.metadata.updatedTimestamp` }, { path: `entity.infoSections.description.metadata.createdTimestamp` }, { path: `entity.infoSections.description.metadata.updatedTimestamp` }, { path: `metadata.eventTime` }, { path: `modifiedFields.createdDate` }, { path: `modifiedFields.updatedDate` }, { path: `modifiedFields.description.metadata.createdTimestamp` }, { path: `modifiedFields.description.metadata.updatedTimestamp` }, { path: `modifiedFields.infoSections.description.metadata.createdTimestamp` }, { path: `modifiedFields.infoSections.description.metadata.updatedTimestamp` }] }, { transformFn: W, paths: [{ path: `entity.url` }, { path: `modifiedFields.url` }] }, { transformFn: B, paths: [{ path: `entity.physicalProperties.pricePerUnit.quantity` }, { path: `entity.physicalProperties.shippingWeightRange.minValue` }, { path: `entity.physicalProperties.shippingWeightRange.maxValue` }, { path: `entity.variantsInfo.variants.physicalProperties.pricePerUnit.settings.quantity` }, { path: `entity.variantsInfo.variants.revenueDetails.profitMargin` }, { path: `entity.subscriptionDetails.subscriptions.discount.percentOff` }, { path: `entity.variantSummary.minPriceVariant.physicalProperties.pricePerUnit.settings.quantity` }, { path: `entity.variantSummary.minPriceVariant.revenueDetails.profitMargin` }, { path: `entity.minVariantPriceInfo.pricePerUnitData.settings.quantity` }, { path: `entity.minVariantPriceInfo.revenueDetails.profitMargin` }, { path: `entity.description.nodes.buttonData.styles.background.gradient.centerX` }, { path: `entity.description.nodes.buttonData.styles.background.gradient.centerY` }, { path: `entity.description.nodes.buttonData.styles.background.gradient.stops.position` }, { path: `entity.description.nodes.buttonData.styles.backgroundHover.gradient.centerX` }, { path: `entity.description.nodes.buttonData.styles.backgroundHover.gradient.centerY` }, { path: `entity.description.nodes.buttonData.styles.backgroundHover.gradient.stops.position` }, { path: `entity.description.nodes.galleryData.items.image.media.duration` }, { path: `entity.description.nodes.galleryData.items.video.media.duration` }, { path: `entity.description.nodes.galleryData.items.video.thumbnail.duration` }, { path: `entity.description.nodes.galleryData.options.item.ratio` }, { path: `entity.description.nodes.imageData.image.duration` }, { path: `entity.description.nodes.imageData.crop.x` }, { path: `entity.description.nodes.imageData.crop.y` }, { path: `entity.description.nodes.imageData.crop.width` }, { path: `entity.description.nodes.imageData.crop.height` }, { path: `entity.description.nodes.mapData.mapSettings.lat` }, { path: `entity.description.nodes.mapData.mapSettings.lng` }, { path: `entity.description.nodes.pollData.poll.image.duration` }, { path: `entity.description.nodes.pollData.poll.options.image.duration` }, { path: `entity.description.nodes.pollData.design.poll.background.image.duration` }, { path: `entity.description.nodes.appEmbedData.image.duration` }, { path: `entity.description.nodes.videoData.video.duration` }, { path: `entity.description.nodes.videoData.thumbnail.duration` }, { path: `entity.description.nodes.audioData.audio.duration` }, { path: `entity.description.nodes.audioData.coverImage.duration` }, { path: `entity.description.nodes.layoutData.backgroundImage.media.duration` }, { path: `entity.description.nodes.layoutData.backgroundImage.overlay.gradient.centerX` }, { path: `entity.description.nodes.layoutData.backgroundImage.overlay.gradient.centerY` }, { path: `entity.description.nodes.layoutData.backgroundImage.overlay.gradient.stops.position` }, { path: `entity.description.nodes.layoutData.backdropImage.media.duration` }, { path: `entity.description.nodes.layoutData.backdropImage.overlay.gradient.centerX` }, { path: `entity.description.nodes.layoutData.backdropImage.overlay.gradient.centerY` }, { path: `entity.description.nodes.layoutData.backdropImage.overlay.gradient.stops.position` }, { path: `entity.description.nodes.layoutData.background.gradient.centerX` }, { path: `entity.description.nodes.layoutData.background.gradient.centerY` }, { path: `entity.description.nodes.layoutData.background.gradient.stops.position` }, { path: `entity.description.nodes.layoutData.backdrop.gradient.centerX` }, { path: `entity.description.nodes.layoutData.backdrop.gradient.centerY` }, { path: `entity.description.nodes.layoutData.backdrop.gradient.stops.position` }, { path: `entity.description.nodes.shapeData.shape.duration` }, { path: `entity.description.nodes.cardData.background.gradient.centerX` }, { path: `entity.description.nodes.cardData.background.gradient.centerY` }, { path: `entity.description.nodes.cardData.background.gradient.stops.position` }, { path: `entity.description.nodes.cardData.backgroundImage.media.duration` }, { path: `entity.description.nodes.cardData.backgroundImage.overlay.gradient.centerX` }, { path: `entity.description.nodes.cardData.backgroundImage.overlay.gradient.centerY` }, { path: `entity.description.nodes.cardData.backgroundImage.overlay.gradient.stops.position` }, { path: `entity.description.nodes.tocData.fontSize` }, { path: `entity.description.nodes.tocData.itemSpacing` }, { path: `entity.description.nodes.smartBlockCellData.shape.duration` }, { path: `entity.infoSections.description.nodes.buttonData.styles.background.gradient.centerX` }, { path: `entity.infoSections.description.nodes.buttonData.styles.background.gradient.centerY` }, { path: `entity.infoSections.description.nodes.buttonData.styles.background.gradient.stops.position` }, { path: `entity.infoSections.description.nodes.buttonData.styles.backgroundHover.gradient.centerX` }, { path: `entity.infoSections.description.nodes.buttonData.styles.backgroundHover.gradient.centerY` }, { path: `entity.infoSections.description.nodes.buttonData.styles.backgroundHover.gradient.stops.position` }, { path: `entity.infoSections.description.nodes.galleryData.items.image.media.duration` }, { path: `entity.infoSections.description.nodes.galleryData.items.video.media.duration` }, { path: `entity.infoSections.description.nodes.galleryData.items.video.thumbnail.duration` }, { path: `entity.infoSections.description.nodes.galleryData.options.item.ratio` }, { path: `entity.infoSections.description.nodes.imageData.image.duration` }, { path: `entity.infoSections.description.nodes.imageData.crop.x` }, { path: `entity.infoSections.description.nodes.imageData.crop.y` }, { path: `entity.infoSections.description.nodes.imageData.crop.width` }, { path: `entity.infoSections.description.nodes.imageData.crop.height` }, { path: `entity.infoSections.description.nodes.mapData.mapSettings.lat` }, { path: `entity.infoSections.description.nodes.mapData.mapSettings.lng` }, { path: `entity.infoSections.description.nodes.pollData.poll.image.duration` }, { path: `entity.infoSections.description.nodes.pollData.poll.options.image.duration` }, { path: `entity.infoSections.description.nodes.pollData.design.poll.background.image.duration` }, { path: `entity.infoSections.description.nodes.appEmbedData.image.duration` }, { path: `entity.infoSections.description.nodes.videoData.video.duration` }, { path: `entity.infoSections.description.nodes.videoData.thumbnail.duration` }, { path: `entity.infoSections.description.nodes.audioData.audio.duration` }, { path: `entity.infoSections.description.nodes.audioData.coverImage.duration` }, { path: `entity.infoSections.description.nodes.layoutData.backgroundImage.media.duration` }, { path: `entity.infoSections.description.nodes.layoutData.backgroundImage.overlay.gradient.centerX` }, { path: `entity.infoSections.description.nodes.layoutData.backgroundImage.overlay.gradient.centerY` }, { path: `entity.infoSections.description.nodes.layoutData.backgroundImage.overlay.gradient.stops.position` }, { path: `entity.infoSections.description.nodes.layoutData.backdropImage.media.duration` }, { path: `entity.infoSections.description.nodes.layoutData.backdropImage.overlay.gradient.centerX` }, { path: `entity.infoSections.description.nodes.layoutData.backdropImage.overlay.gradient.centerY` }, { path: `entity.infoSections.description.nodes.layoutData.backdropImage.overlay.gradient.stops.position` }, { path: `entity.infoSections.description.nodes.layoutData.background.gradient.centerX` }, { path: `entity.infoSections.description.nodes.layoutData.background.gradient.centerY` }, { path: `entity.infoSections.description.nodes.layoutData.background.gradient.stops.position` }, { path: `entity.infoSections.description.nodes.layoutData.backdrop.gradient.centerX` }, { path: `entity.infoSections.description.nodes.layoutData.backdrop.gradient.centerY` }, { path: `entity.infoSections.description.nodes.layoutData.backdrop.gradient.stops.position` }, { path: `entity.infoSections.description.nodes.shapeData.shape.duration` }, { path: `entity.infoSections.description.nodes.cardData.background.gradient.centerX` }, { path: `entity.infoSections.description.nodes.cardData.background.gradient.centerY` }, { path: `entity.infoSections.description.nodes.cardData.background.gradient.stops.position` }, { path: `entity.infoSections.description.nodes.cardData.backgroundImage.media.duration` }, { path: `entity.infoSections.description.nodes.cardData.backgroundImage.overlay.gradient.centerX` }, { path: `entity.infoSections.description.nodes.cardData.backgroundImage.overlay.gradient.centerY` }, { path: `entity.infoSections.description.nodes.cardData.backgroundImage.overlay.gradient.stops.position` }, { path: `entity.infoSections.description.nodes.tocData.fontSize` }, { path: `entity.infoSections.description.nodes.tocData.itemSpacing` }, { path: `entity.infoSections.description.nodes.smartBlockCellData.shape.duration` }, { path: `entity.variantsInfo.variants.physicalProperties.weight` }, { path: `entity.variantSummary.minPriceVariant.physicalProperties.weight` }, { path: `entity.minVariantPriceInfo.weight` }, { path: `modifiedFields.physicalProperties.pricePerUnit.quantity` }, { path: `modifiedFields.physicalProperties.shippingWeightRange.minValue` }, { path: `modifiedFields.physicalProperties.shippingWeightRange.maxValue` }, { path: `modifiedFields.variantsInfo.variants.physicalProperties.pricePerUnit.settings.quantity` }, { path: `modifiedFields.variantsInfo.variants.revenueDetails.profitMargin` }, { path: `modifiedFields.subscriptionDetails.subscriptions.discount.percentOff` }, { path: `modifiedFields.variantSummary.minPriceVariant.physicalProperties.pricePerUnit.settings.quantity` }, { path: `modifiedFields.variantSummary.minPriceVariant.revenueDetails.profitMargin` }, { path: `modifiedFields.minVariantPriceInfo.pricePerUnitData.settings.quantity` }, { path: `modifiedFields.minVariantPriceInfo.revenueDetails.profitMargin` }, { path: `modifiedFields.description.nodes.buttonData.styles.background.gradient.centerX` }, { path: `modifiedFields.description.nodes.buttonData.styles.background.gradient.centerY` }, { path: `modifiedFields.description.nodes.buttonData.styles.background.gradient.stops.position` }, { path: `modifiedFields.description.nodes.buttonData.styles.backgroundHover.gradient.centerX` }, { path: `modifiedFields.description.nodes.buttonData.styles.backgroundHover.gradient.centerY` }, { path: `modifiedFields.description.nodes.buttonData.styles.backgroundHover.gradient.stops.position` }, { path: `modifiedFields.description.nodes.galleryData.items.image.media.duration` }, { path: `modifiedFields.description.nodes.galleryData.items.video.media.duration` }, { path: `modifiedFields.description.nodes.galleryData.items.video.thumbnail.duration` }, { path: `modifiedFields.description.nodes.galleryData.options.item.ratio` }, { path: `modifiedFields.description.nodes.imageData.image.duration` }, { path: `modifiedFields.description.nodes.imageData.crop.x` }, { path: `modifiedFields.description.nodes.imageData.crop.y` }, { path: `modifiedFields.description.nodes.imageData.crop.width` }, { path: `modifiedFields.description.nodes.imageData.crop.height` }, { path: `modifiedFields.description.nodes.mapData.mapSettings.lat` }, { path: `modifiedFields.description.nodes.mapData.mapSettings.lng` }, { path: `modifiedFields.description.nodes.pollData.poll.image.duration` }, { path: `modifiedFields.description.nodes.pollData.poll.options.image.duration` }, { path: `modifiedFields.description.nodes.pollData.design.poll.background.image.duration` }, { path: `modifiedFields.description.nodes.appEmbedData.image.duration` }, { path: `modifiedFields.description.nodes.videoData.video.duration` }, { path: `modifiedFields.description.nodes.videoData.thumbnail.duration` }, { path: `modifiedFields.description.nodes.audioData.audio.duration` }, { path: `modifiedFields.description.nodes.audioData.coverImage.duration` }, { path: `modifiedFields.description.nodes.layoutData.backgroundImage.media.duration` }, { path: `modifiedFields.description.nodes.layoutData.backgroundImage.overlay.gradient.centerX` }, { path: `modifiedFields.description.nodes.layoutData.backgroundImage.overlay.gradient.centerY` }, { path: `modifiedFields.description.nodes.layoutData.backgroundImage.overlay.gradient.stops.position` }, { path: `modifiedFields.description.nodes.layoutData.backdropImage.media.duration` }, { path: `modifiedFields.description.nodes.layoutData.backdropImage.overlay.gradient.centerX` }, { path: `modifiedFields.description.nodes.layoutData.backdropImage.overlay.gradient.centerY` }, { path: `modifiedFields.description.nodes.layoutData.backdropImage.overlay.gradient.stops.position` }, { path: `modifiedFields.description.nodes.layoutData.background.gradient.centerX` }, { path: `modifiedFields.description.nodes.layoutData.background.gradient.centerY` }, { path: `modifiedFields.description.nodes.layoutData.background.gradient.stops.position` }, { path: `modifiedFields.description.nodes.layoutData.backdrop.gradient.centerX` }, { path: `modifiedFields.description.nodes.layoutData.backdrop.gradient.centerY` }, { path: `modifiedFields.description.nodes.layoutData.backdrop.gradient.stops.position` }, { path: `modifiedFields.description.nodes.shapeData.shape.duration` }, { path: `modifiedFields.description.nodes.cardData.background.gradient.centerX` }, { path: `modifiedFields.description.nodes.cardData.background.gradient.centerY` }, { path: `modifiedFields.description.nodes.cardData.background.gradient.stops.position` }, { path: `modifiedFields.description.nodes.cardData.backgroundImage.media.duration` }, { path: `modifiedFields.description.nodes.cardData.backgroundImage.overlay.gradient.centerX` }, { path: `modifiedFields.description.nodes.cardData.backgroundImage.overlay.gradient.centerY` }, { path: `modifiedFields.description.nodes.cardData.backgroundImage.overlay.gradient.stops.position` }, { path: `modifiedFields.description.nodes.tocData.fontSize` }, { path: `modifiedFields.description.nodes.tocData.itemSpacing` }, { path: `modifiedFields.description.nodes.smartBlockCellData.shape.duration` }, { path: `modifiedFields.infoSections.description.nodes.buttonData.styles.background.gradient.centerX` }, { path: `modifiedFields.infoSections.description.nodes.buttonData.styles.background.gradient.centerY` }, { path: `modifiedFields.infoSections.description.nodes.buttonData.styles.background.gradient.stops.position` }, { path: `modifiedFields.infoSections.description.nodes.buttonData.styles.backgroundHover.gradient.centerX` }, { path: `modifiedFields.infoSections.description.nodes.buttonData.styles.backgroundHover.gradient.centerY` }, { path: `modifiedFields.infoSections.description.nodes.buttonData.styles.backgroundHover.gradient.stops.position` }, { path: `modifiedFields.infoSections.description.nodes.galleryData.items.image.media.duration` }, { path: `modifiedFields.infoSections.description.nodes.galleryData.items.video.media.duration` }, { path: `modifiedFields.infoSections.description.nodes.galleryData.items.video.thumbnail.duration` }, { path: `modifiedFields.infoSections.description.nodes.galleryData.options.item.ratio` }, { path: `modifiedFields.infoSections.description.nodes.imageData.image.duration` }, { path: `modifiedFields.infoSections.description.nodes.imageData.crop.x` }, { path: `modifiedFields.infoSections.description.nodes.imageData.crop.y` }, { path: `modifiedFields.infoSections.description.nodes.imageData.crop.width` }, { path: `modifiedFields.infoSections.description.nodes.imageData.crop.height` }, { path: `modifiedFields.infoSections.description.nodes.mapData.mapSettings.lat` }, { path: `modifiedFields.infoSections.description.nodes.mapData.mapSettings.lng` }, { path: `modifiedFields.infoSections.description.nodes.pollData.poll.image.duration` }, { path: `modifiedFields.infoSections.description.nodes.pollData.poll.options.image.duration` }, { path: `modifiedFields.infoSections.description.nodes.pollData.design.poll.background.image.duration` }, { path: `modifiedFields.infoSections.description.nodes.appEmbedData.image.duration` }, { path: `modifiedFields.infoSections.description.nodes.videoData.video.duration` }, { path: `modifiedFields.infoSections.description.nodes.videoData.thumbnail.duration` }, { path: `modifiedFields.infoSections.description.nodes.audioData.audio.duration` }, { path: `modifiedFields.infoSections.description.nodes.audioData.coverImage.duration` }, { path: `modifiedFields.infoSections.description.nodes.layoutData.backgroundImage.media.duration` }, { path: `modifiedFields.infoSections.description.nodes.layoutData.backgroundImage.overlay.gradient.centerX` }, { path: `modifiedFields.infoSections.description.nodes.layoutData.backgroundImage.overlay.gradient.centerY` }, { path: `modifiedFields.infoSections.description.nodes.layoutData.backgroundImage.overlay.gradient.stops.position` }, { path: `modifiedFields.infoSections.description.nodes.layoutData.backdropImage.media.duration` }, { path: `modifiedFields.infoSections.description.nodes.layoutData.backdropImage.overlay.gradient.centerX` }, { path: `modifiedFields.infoSections.description.nodes.layoutData.backdropImage.overlay.gradient.centerY` }, { path: `modifiedFields.infoSections.description.nodes.layoutData.backdropImage.overlay.gradient.stops.position` }, { path: `modifiedFields.infoSections.description.nodes.layoutData.background.gradient.centerX` }, { path: `modifiedFields.infoSections.description.nodes.layoutData.background.gradient.centerY` }, { path: `modifiedFields.infoSections.description.nodes.layoutData.background.gradient.stops.position` }, { path: `modifiedFields.infoSections.description.nodes.layoutData.backdrop.gradient.centerX` }, { path: `modifiedFields.infoSections.description.nodes.layoutData.backdrop.gradient.centerY` }, { path: `modifiedFields.infoSections.description.nodes.layoutData.backdrop.gradient.stops.position` }, { path: `modifiedFields.infoSections.description.nodes.shapeData.shape.duration` }, { path: `modifiedFields.infoSections.description.nodes.cardData.background.gradient.centerX` }, { path: `modifiedFields.infoSections.description.nodes.cardData.background.gradient.centerY` }, { path: `modifiedFields.infoSections.description.nodes.cardData.background.gradient.stops.position` }, { path: `modifiedFields.infoSections.description.nodes.cardData.backgroundImage.media.duration` }, { path: `modifiedFields.infoSections.description.nodes.cardData.backgroundImage.overlay.gradient.centerX` }, { path: `modifiedFields.infoSections.description.nodes.cardData.backgroundImage.overlay.gradient.centerY` }, { path: `modifiedFields.infoSections.description.nodes.cardData.backgroundImage.overlay.gradient.stops.position` }, { path: `modifiedFields.infoSections.description.nodes.tocData.fontSize` }, { path: `modifiedFields.infoSections.description.nodes.tocData.itemSpacing` }, { path: `modifiedFields.infoSections.description.nodes.smartBlockCellData.shape.duration` }, { path: `modifiedFields.variantsInfo.variants.physicalProperties.weight` }, { path: `modifiedFields.variantSummary.minPriceVariant.physicalProperties.weight` }, { path: `modifiedFields.minVariantPriceInfo.weight` }] }, { transformFn: U, paths: [{ path: `entity.media.main.image` }, { path: `entity.media.itemsInfo.items.image` }, { path: `entity.options.choicesSettings.choices.image` }, { path: `entity.options.choicesSettings.choices.displayImage` }, { path: `entity.options.choicesSettings.choices.linkedMedia.image` }, { path: `entity.modifiers.choicesSettings.choices.image` }, { path: `entity.modifiers.choicesSettings.choices.displayImage` }, { path: `entity.modifiers.choicesSettings.choices.linkedMedia.image` }, { path: `entity.variantsInfo.variants.media.image` }, { path: `entity.variantSummary.minPriceVariant.media.image` }, { path: `modifiedFields.media.main.image` }, { path: `modifiedFields.media.itemsInfo.items.image` }, { path: `modifiedFields.options.choicesSettings.choices.image` }, { path: `modifiedFields.options.choicesSettings.choices.displayImage` }, { path: `modifiedFields.options.choicesSettings.choices.linkedMedia.image` }, { path: `modifiedFields.modifiers.choicesSettings.choices.image` }, { path: `modifiedFields.modifiers.choicesSettings.choices.displayImage` }, { path: `modifiedFields.modifiers.choicesSettings.choices.linkedMedia.image` }, { path: `modifiedFields.variantsInfo.variants.media.image` }, { path: `modifiedFields.variantSummary.minPriceVariant.media.image` }] }, { transformFn: rr, paths: [{ path: `entity.media.main.video` }, { path: `entity.media.itemsInfo.items.video` }, { path: `entity.options.choicesSettings.choices.linkedMedia.video` }, { path: `entity.modifiers.choicesSettings.choices.linkedMedia.video` }, { path: `entity.variantsInfo.variants.media.video` }, { path: `entity.variantSummary.minPriceVariant.media.video` }, { path: `modifiedFields.media.main.video` }, { path: `modifiedFields.media.itemsInfo.items.video` }, { path: `modifiedFields.options.choicesSettings.choices.linkedMedia.video` }, { path: `modifiedFields.modifiers.choicesSettings.choices.linkedMedia.video` }, { path: `modifiedFields.variantsInfo.variants.media.video` }, { path: `modifiedFields.variantSummary.minPriceVariant.media.video` }] }])))();
1422
+ var Hr = L(Rr);
1423
+ z(zr), z(Br), z(Vr);
1424
+ function Ur(e2) {
1425
+ return R(Object.assign(e2, { domainToMappings: { "api._api_base_domain_": [{ srcPath: `/product-group`, destPath: `` }], "editor._base_domain_": [{ srcPath: `/_api/product-group`, destPath: `` }], "blocks._base_domain_": [{ srcPath: `/_api/product-group`, destPath: `` }], "create.editorx": [{ srcPath: `/_api/product-group`, destPath: `` }], _: [{ srcPath: `/_api/product-group`, destPath: `` }], "manage._base_domain_": [{ srcPath: `/_api/product-group`, destPath: `` }], "www.wixapis.com": [{ srcPath: `/stores/v3/product-groups`, destPath: `/v3/product-groups` }, { srcPath: `/stores/v3/bulk/product-groups`, destPath: `/v3/bulk/product-groups` }], "*.dev.wix-code.com": [{ srcPath: `/_api/product-group`, destPath: `` }] } }));
1426
+ }
1427
+ var Wr = `@wix/auto_sdk_stores_product-groups-v-3`;
1428
+ function Gr(e2) {
1429
+ function t2({ host: t3 }) {
1430
+ return { entityFqdn: `wix.stores.catalog.v3.product_group`, method: `GET`, methodFqn: `wix.stores.catalog.product_group.v3.ProductGroupService.QueryProductGroups`, packageName: Wr, migrationOptions: { optInTransformResponse: true }, url: Ur({ protoPath: `/v3/product-groups/query`, data: e2, host: t3 }), params: zt(e2, true), transformResponse: (e3) => F(e3, [{ transformFn: P, paths: [{ path: `productGroups.createdDate` }, { path: `productGroups.updatedDate` }, { path: `productGroups.media.image.urlExpirationDate` }] }]), fallback: [{ method: `POST`, url: Ur({ protoPath: `/v3/product-groups/query`, data: e2, host: t3 }), data: e2 }] };
1431
+ }
1432
+ return t2;
1433
+ }
1434
+ var Kr = ((e2) => (e2.GROUPING_CUSTOMIZATION = `GROUPING_CUSTOMIZATION`, e2.THUMBNAIL = `THUMBNAIL`, e2))(Kr || {});
1435
+ function qr(e2) {
1436
+ let { httpClient: t2, sideEffects: n2 } = arguments[1];
1437
+ return Rn({ func: async (r2) => {
1438
+ let i2 = Gr({ ...r2, ...e2 ?? {} });
1439
+ n2?.onSiteCall?.();
1440
+ try {
1441
+ let e3 = await t2.request(i2);
1442
+ return n2?.onSuccess?.(e3), e3;
1443
+ } catch (e3) {
1444
+ throw n2?.onError?.(e3), e3;
1445
+ }
1446
+ }, requestTransformer: (t3) => {
1447
+ let n3 = [t3, e2];
1448
+ return M({ ...n3?.[1], query: n3?.[0] });
1449
+ }, responseTransformer: ({ data: e3 }) => {
1450
+ let t3 = N(F(e3, [{ transformFn: U, paths: [{ path: `productGroups.media.image` }] }]));
1451
+ return { items: t3?.productGroups, pagingMetadata: t3?.pagingMetadata };
1452
+ }, errorTransformer: (e3) => {
1453
+ throw I(e3, { spreadPathsToArguments: {}, explicitPathsToArguments: { query: `$[0]` }, singleArgumentUnchanged: false });
1454
+ }, pagingMethod: `CURSOR`, transformationPaths: {} });
1455
+ }
1456
+ async function Jr(e2, t2) {
1457
+ let { httpClient: n2, sideEffects: r2 } = arguments[2], i2 = Gr(M({ query: e2, ...t2 }));
1458
+ r2?.onSiteCall?.();
1459
+ try {
1460
+ let e3 = await n2.request(i2);
1461
+ return r2?.onSuccess?.(e3), N(F(e3.data, [{ transformFn: U, paths: [{ path: `productGroups.media.image` }] }]));
1462
+ } catch (e3) {
1463
+ let t3 = I(e3, { spreadPathsToArguments: {}, explicitPathsToArguments: { query: `$[0]` }, singleArgumentUnchanged: false }, [`query`, `options`]);
1464
+ throw r2?.onError?.(e3), t3;
1465
+ }
1466
+ }
1467
+ ({ ...Un() }, { ...mr() });
1468
+ function Yr(e2) {
1469
+ return (t2) => qr(t2, { httpClient: e2 });
1470
+ }
1471
+ function Xr(e2) {
1472
+ return (t2, n2) => Jr(t2, n2, { httpClient: e2 });
1473
+ }
1474
+ function Zr(e2) {
1475
+ let t2 = $n({ builderQueryFunction: (t3) => Yr(e2)(t3), typedQueryFunction: (t3, n3) => Xr(e2)(t3, n3), hasOptionsParameter: true });
1476
+ function n2(e3, n3) {
1477
+ return t2(...arguments);
1478
+ }
1479
+ return n2;
1480
+ }
1481
+ var Qr = L(Zr);
1482
+ function $r(e2) {
1483
+ return R(Object.assign(e2, { domainToMappings: { "manage._base_domain_": [{ srcPath: `/_api/location`, destPath: `` }], _: [{ srcPath: `/_api/location`, destPath: `` }], "*.dev.wix-code.com": [{ srcPath: `/_api/location`, destPath: `` }], "www.wixapis.com": [{ srcPath: `/stores/v3/locations`, destPath: `/v3/locations` }] } }));
1484
+ }
1485
+ var ei = `@wix/auto_sdk_stores_stores-locations-v-3`;
1486
+ function ti(e2) {
1487
+ function t2({ host: t3 }) {
1488
+ return { entityFqdn: `wix.stores.catalog.v3.stores_location`, method: `POST`, methodFqn: `wix.stores.catalog.location.v3.StoresLocationService.QueryStoresLocations`, packageName: ei, migrationOptions: { optInTransformResponse: true }, url: $r({ protoPath: `/v3/locations/query`, data: e2, host: t3 }), data: e2, transformResponse: (e3) => F(e3, [{ transformFn: P, paths: [{ path: `storesLocations.createdDate` }, { path: `storesLocations.updatedDate` }] }]) };
1489
+ }
1490
+ return t2;
1491
+ }
1492
+ function ni() {
1493
+ let { httpClient: e2, sideEffects: t2 } = arguments[0];
1494
+ return Rn({ func: async (n2) => {
1495
+ let r2 = ti(n2);
1496
+ t2?.onSiteCall?.();
1497
+ try {
1498
+ let n3 = await e2.request(r2);
1499
+ return t2?.onSuccess?.(n3), n3;
1500
+ } catch (e3) {
1501
+ throw t2?.onError?.(e3), e3;
1502
+ }
1503
+ }, requestTransformer: (e3) => {
1504
+ let t3 = [e3, {}];
1505
+ return M({ ...t3?.[1], query: t3?.[0] });
1506
+ }, responseTransformer: ({ data: e3 }) => {
1507
+ let t3 = N(F(e3, []));
1508
+ return { items: t3?.storesLocations, pagingMetadata: t3?.pagingMetadata };
1509
+ }, errorTransformer: (e3) => {
1510
+ throw I(e3, { spreadPathsToArguments: {}, explicitPathsToArguments: { query: `$[0]` }, singleArgumentUnchanged: false });
1511
+ }, pagingMethod: `CURSOR`, transformationPaths: {} });
1512
+ }
1513
+ async function ri(e2) {
1514
+ let { httpClient: t2, sideEffects: n2 } = arguments[1], r2 = ti(M({ query: e2 }));
1515
+ n2?.onSiteCall?.();
1516
+ try {
1517
+ let e3 = await t2.request(r2);
1518
+ return n2?.onSuccess?.(e3), N(e3.data);
1519
+ } catch (e3) {
1520
+ let t3 = I(e3, { spreadPathsToArguments: {}, explicitPathsToArguments: { query: `$[0]` }, singleArgumentUnchanged: false }, [`query`]);
1521
+ throw n2?.onError?.(e3), t3;
1522
+ }
1523
+ }
1524
+ ({ ...Un() });
1525
+ function ii(e2) {
1526
+ return () => ni({ httpClient: e2 });
1527
+ }
1528
+ function ai(e2) {
1529
+ return (t2) => ri(t2, { httpClient: e2 });
1530
+ }
1531
+ function oi(e2) {
1532
+ let t2 = $n({ builderQueryFunction: () => ii(e2)(), typedQueryFunction: (t3) => ai(e2)(t3), hasOptionsParameter: false });
1533
+ function n2(e3) {
1534
+ return t2(...arguments);
1535
+ }
1536
+ return n2;
1537
+ }
1538
+ var si = L(oi);
1539
+ var ci = `https://static.wixstatic.com/media`;
1540
+ var li = `https://video.wixstatic.com/video`;
1541
+ var ui = /image:\/\/v1\/([^/#]+)/;
1542
+ var di = /^(?:wix:)?video:\/\/v1\/([^/#]+)(?:\/[^#]*)?(?:#(.*))?$/;
1543
+ function fi(e2) {
1544
+ let t2 = e2?.match(di);
1545
+ if (!t2) return null;
1546
+ let [, n2, r2] = t2, i2 = new URLSearchParams(r2 ?? ``), a2 = i2.get(`posterUri`);
1547
+ return { id: n2, url: `${li}/${n2}/file`, ...a2 ? { poster: { uri: a2, url: `${ci}/${a2}`, width: Number(i2.get(`posterWidth`)) || 0, height: Number(i2.get(`posterHeight`)) || 0 } } : {} };
1548
+ }
1549
+ function pi(e2) {
1550
+ return e2 ? e2.match(ui)?.[1] ?? null : null;
1551
+ }
1552
+ function mi(e2) {
1553
+ if (!e2) return;
1554
+ if (/^https?:\/\//i.test(e2)) return e2;
1555
+ let t2 = pi(e2);
1556
+ return t2 ? `${ci}/${t2}` : void 0;
1557
+ }
1558
+ function hi(e2) {
1559
+ if (!e2) return null;
1560
+ let t2 = e2.match(/#originWidth=(\d+)&originHeight=(\d+)/);
1561
+ return t2 ? { width: parseInt(t2[1], 10), height: parseInt(t2[2], 10) } : null;
1562
+ }
1563
+ var gi = `one-time`;
1564
+ function _i(e2) {
1565
+ return e2.map((e3) => ({ id: e3._id, key: e3.key, name: e3.name ?? void 0, optionRenderType: e3.optionRenderType, choices: (e3.choicesSettings?.choices ?? []).map((e4) => {
1566
+ let t2 = pi(e4.displayImage) ?? void 0;
1567
+ return { choiceId: e4.choiceId, key: e4.key, name: e4.name ?? void 0, colorCode: e4.colorCode, ...t2 ? { displayImageUri: t2 } : {}, inStock: e4.inStock, visible: e4.visible ?? void 0, mediaIds: vi(e4.media) };
1568
+ }) }));
1569
+ }
1570
+ var vi = (e2) => {
1571
+ let t2 = (e2?.items ?? []).map((e3) => e3.mediaId);
1572
+ return t2.length > 0 ? t2 : void 0;
1573
+ };
1574
+ function yi(e2) {
1575
+ let t2 = e2.map((e3) => {
1576
+ let t3 = e3._id, n2 = e3.modifierRenderType === Pr.FREE_TEXT;
1577
+ return [t3, { id: t3, key: e3.key, name: e3.name ?? void 0, mandatory: e3.mandatory !== false, modifierRenderType: e3.modifierRenderType, freeTextSettings: n2 ? e3.freeTextSettings : void 0, choices: n2 ? void 0 : (e3.choicesSettings?.choices ?? []).map((e4) => {
1578
+ let t4 = pi(e4.displayImage) ?? void 0;
1579
+ return { choiceId: e4.choiceId, key: e4.key, name: e4.name ?? void 0, colorCode: e4.colorCode, ...t4 ? { displayImageUri: t4 } : {}, mediaIds: vi(e4.media) };
1580
+ }) }];
1581
+ });
1582
+ return Object.fromEntries(t2);
1583
+ }
1584
+ function bi(e2) {
1585
+ return e2.filter((e3) => e3.visible !== false).map(xi);
1586
+ }
1587
+ var xi = (e2) => {
1588
+ let t2 = Object.fromEntries((e2.choices ?? []).map((e3) => {
1589
+ let t3 = e3.optionChoiceIds;
1590
+ return [t3?.optionId, t3?.choiceId];
1591
+ }));
1592
+ return { id: e2._id, sku: e2.sku ?? void 0, choices: t2, price: Ci(e2), subscriptionPrices: wi(e2) };
1593
+ };
1594
+ function Si(e2) {
1595
+ return e2?.description == null ? void 0 : { description: e2.description };
1596
+ }
1597
+ var Ci = (e2) => {
1598
+ let t2 = e2.price;
1599
+ return { actualPrice: Hi(t2?.actualPrice), compareAtPrice: K(t2?.compareAtPrice), priceAfterDiscount: K(t2?.priceAfterDiscount), pricePerUnit: Si(e2.physicalProperties?.pricePerUnit) };
1600
+ };
1601
+ var wi = (e2) => (e2.subscriptionPricesInfo?.subscriptionPrices ?? []).map((e3) => ({ subscriptionId: e3.subscriptionId, price: Hi(e3.price) }));
1602
+ var Ti = { nodes: [] };
1603
+ var Ei = `@stores/product-groups`;
1604
+ function Di(e2) {
1605
+ let t2 = _i(e2.options ?? []), n2 = yi(e2.modifiers ?? []), r2 = ji(e2.subscriptionDetails?.subscriptions ?? []), i2 = bi(e2.variantsInfo?.variants ?? []), a2 = { subscriptions: r2, allowOneTimePurchases: e2.subscriptionDetails?.allowOneTimePurchases ?? false }, o2 = e2.additionalRibbons ?? [], s2 = { primary: e2.ribbon?.name ?? void 0, additional: o2.map((e3) => e3.name ?? void 0).filter((e3) => !!e3) }, c2 = e2.description ? Mi(e2.description) : Ti, l2 = e2.discountInfo?.discountRuleNames, u2 = ki(e2);
1606
+ return { id: e2._id, slug: e2.slug ?? void 0, url: e2.url ? { href: e2.url } : void 0, name: e2.name, description: c2, media: Vi(e2), mainMedia: Bi(e2.media?.main), ribbons: s2, breadcrumbs: Ni(e2), mainCategoryId: e2.mainCategoryId ?? void 0, categories: Pi(e2), infoSections: Oi(e2), currency: e2.currency, options: t2, modifiers: n2, variants: i2, minPriceVariant: Ri(e2), priceRange: zi(e2), subscriptionDetails: a2, inventory: { availabilityStatus: e2.inventory?.availabilityStatus, preorderAvailability: e2.inventory?.preorderAvailability }, discountRuleNames: l2, productGroupId: u2 };
1607
+ }
1608
+ function Oi(e2) {
1609
+ return (e2.infoSections ?? []).map((e3) => ({ _id: e3.uniqueName ?? e3._id, name: e3.title, body: e3.description ? Mi(e3.description) : void 0 }));
1610
+ }
1611
+ function ki(e2) {
1612
+ let t2 = e2.extendedFields?.namespaces?.[Ei]?.productGroupId;
1613
+ return typeof t2 == `string` ? t2 : void 0;
1614
+ }
1615
+ function Ai(e2) {
1616
+ return e2 === `WEEK` || e2 === `MONTH` || e2 === `YEAR` ? e2 : void 0;
1617
+ }
1618
+ function ji(e2) {
1619
+ return e2.filter((e3) => e3.visible !== false).map((e3) => ({ id: e3._id, name: e3.title, description: e3.description ?? void 0, frequency: Ai(e3.frequency), interval: e3.interval, billingCycles: e3.billingCycles ?? void 0 }));
1620
+ }
1621
+ function Mi(e2) {
1622
+ return { ...e2, nodes: e2.nodes ?? [] };
1623
+ }
1624
+ function Ni(e2) {
1625
+ return (e2.breadcrumbsInfo?.breadcrumbs ?? []).map((e3) => ({ id: e3.categoryId, name: e3.categoryName, slug: e3.categorySlug }));
1626
+ }
1627
+ function Pi(e2) {
1628
+ return (e2.directCategoriesInfo?.categories ?? []).flatMap((e3) => e3._id ? [{ id: e3._id }] : []);
1629
+ }
1630
+ function Fi(e2) {
1631
+ return { ...e2.displayName ? { title: e2.displayName } : {}, ...e2.altText ? { alt: e2.altText } : {} };
1632
+ }
1633
+ function Ii(e2, t2) {
1634
+ let n2 = e2.image ?? e2.url;
1635
+ if (!n2) return;
1636
+ let r2 = hi(e2.image), { title: i2, alt: a2 } = Fi(e2);
1637
+ return { id: pi(e2.image) ?? e2._id ?? t2, media: { type: `image`, src: n2, ...r2 ? { width: r2.width, height: r2.height } : {}, ...i2 ? { title: i2 } : {}, ...a2 ? { parameters: { alt: a2 } } : {} } };
1638
+ }
1639
+ function Li(e2, t2) {
1640
+ let n2 = fi(e2.video), r2 = n2?.url ?? e2.url;
1641
+ if (!r2) return;
1642
+ let i2 = n2?.poster?.url, a2 = n2?.poster?.width, o2 = n2?.poster?.height, { title: s2, alt: c2 } = Fi(e2);
1643
+ return { id: n2?.id ?? e2._id ?? t2, media: { type: `video`, src: r2, ...a2 === void 0 ? {} : { width: a2 }, ...o2 === void 0 ? {} : { height: o2 }, ...s2 ? { title: s2 } : {}, ...c2 || i2 ? { parameters: { ...c2 ? { alt: c2 } : {}, ...i2 ? { thumbnail: i2 } : {} } } : {} } };
1644
+ }
1645
+ function Ri(e2) {
1646
+ let t2 = e2.variantSummary?.minPriceVariant;
1647
+ return t2 ? bi([t2])[0] : void 0;
1648
+ }
1649
+ function zi(e2) {
1650
+ return { minActualPrice: K(e2.actualPriceRange?.minValue), maxActualPrice: K(e2.actualPriceRange?.maxValue), minCompareAtPrice: K(e2.compareAtPriceRange?.minValue), maxCompareAtPrice: K(e2.compareAtPriceRange?.maxValue) };
1651
+ }
1652
+ function Bi(e2) {
1653
+ if (!e2) return;
1654
+ let { title: t2, alt: n2 } = Fi(e2);
1655
+ if (e2.mediaType === `VIDEO`) {
1656
+ let r3 = fi(e2.video)?.poster;
1657
+ return r3 ? { ...r3, name: t2, alt: n2 } : void 0;
1658
+ }
1659
+ let r2 = e2.image ?? e2.url;
1660
+ if (!r2) return;
1661
+ let i2 = hi(e2.image);
1662
+ return { uri: pi(e2.image) ?? void 0, url: r2, width: i2?.width, height: i2?.height, name: t2, alt: n2 };
1663
+ }
1664
+ function Vi(e2) {
1665
+ return (e2.media?.itemsInfo?.items ?? (e2.media?.main ? [e2.media.main] : [])).flatMap((e3, t2) => {
1666
+ let n2 = e3.mediaType === `VIDEO` ? Li(e3, String(t2)) : Ii(e3, String(t2));
1667
+ return n2 ? [n2] : [];
1668
+ });
1669
+ }
1670
+ var Hi = (e2) => Number.parseFloat(e2?.amount);
1671
+ var K = (e2) => e2?.amount == null ? void 0 : Hi(e2);
1672
+ var Ui = [G.URL, G.DESCRIPTION, G.PLAIN_DESCRIPTION, G.MEDIA_ITEMS_INFO, G.INFO_SECTION, G.INFO_SECTION_DESCRIPTION, G.CURRENCY, G.DISCOUNT_INFO, G.SUBSCRIPTION_PRICES_INFO, G.BREADCRUMBS_INFO, G.DIRECT_CATEGORIES_INFO, G.PRODUCT_CHOICES_MEDIA_REFERENCES, G.PRODUCT_CHOICES_DISPLAY_IMAGE];
1673
+ function Wi(e2) {
1674
+ let { _id: t2, ...n2 } = e2;
1675
+ return { ...n2, id: t2 };
1676
+ }
1677
+ async function Gi(e2) {
1678
+ let t2 = (await Hr(e2, { fields: Ui })).product;
1679
+ if (!t2) throw Error(`Product not found for slug: ${e2}`);
1680
+ return { product: Di(t2), seoProduct: Wi(t2) };
1681
+ }
1682
+ function Ki(e2) {
1683
+ return R(Object.assign(e2, { domainToMappings: { "bo._base_domain_": [{ srcPath: `/back-in-stock-service`, destPath: `` }], "wixbo.ai": [{ srcPath: `/back-in-stock-service`, destPath: `` }], "wix-bo.com": [{ srcPath: `/back-in-stock-service`, destPath: `` }], "www.wixapis.com": [{ srcPath: `/back-in-stock-service`, destPath: `` }], _: [{ srcPath: `/v1/back-in-stock-notification-requests`, destPath: `/v1/back-in-stock-notification-requests` }], "*.dev.wix-code.com": [{ srcPath: `/v1/back-in-stock-notification-requests`, destPath: `/v1/back-in-stock-notification-requests` }] } }));
1684
+ }
1685
+ var qi = `@wix/auto_sdk_ecom_back-in-stock-notifications`;
1686
+ function Ji(e2) {
1687
+ function t2({ host: t3 }) {
1688
+ let n2 = F(e2, [{ transformFn: it, paths: [{ path: `request.createdDate` }, { path: `itemDetails.image.urlExpirationDate` }] }, { transformFn: fn, paths: [{ path: `itemDetails.image.focalPoint.x` }, { path: `itemDetails.image.focalPoint.y` }] }]);
1689
+ return { entityFqdn: `wix.ecom.v1.back_in_stock_notification_request`, method: `POST`, methodFqn: `com.wixpress.ecom.back.in.stock.BackInStockNotificationRequestService.CreateBackInStockNotificationRequest`, packageName: qi, migrationOptions: { optInTransformResponse: true }, url: Ki({ protoPath: `/v1/back-in-stock-notification-requests`, data: n2, host: t3 }), data: n2, transformResponse: (e3) => F(e3, [{ transformFn: P, paths: [{ path: `request.createdDate` }] }]) };
1690
+ }
1691
+ return t2;
1692
+ }
1693
+ async function Yi(e2, t2) {
1694
+ let { httpClient: n2, sideEffects: r2 } = arguments[2], i2 = Ji(F(M({ request: e2, itemDetails: t2 }), [{ transformFn: nr, paths: [{ path: `itemDetails.image` }] }]));
1695
+ r2?.onSiteCall?.();
1696
+ try {
1697
+ let e3 = await n2.request(i2);
1698
+ return r2?.onSuccess?.(e3), N(e3.data)?.request;
1699
+ } catch (e3) {
1700
+ let t3 = I(e3, { spreadPathsToArguments: {}, explicitPathsToArguments: { request: `$[0]`, itemDetails: `$[1]` }, singleArgumentUnchanged: false }, [`request`, `itemDetails`]);
1701
+ throw r2?.onError?.(e3), t3;
1702
+ }
1703
+ }
1704
+ ({ ...Un() });
1705
+ function Xi(e2) {
1706
+ return (t2, n2) => Yi(t2, n2, { httpClient: e2 });
1707
+ }
1708
+ var Zi = x(`wix.ecom.v1.back_in_stock_notification_request_created`, true, (e2) => N(F(e2, [{ transformFn: P, paths: [{ path: `entity.createdDate` }, { path: `metadata.eventTime` }] }])))();
1709
+ var Qi = x(`wix.ecom.v1.back_in_stock_notification_request_deleted`, true, (e2) => N(F(e2, [{ transformFn: P, paths: [{ path: `undefined.createdDate` }, { path: `metadata.eventTime` }] }])))();
1710
+ var $i = x(`wix.ecom.v1.back_in_stock_notification_request_updated`, true, (e2) => N(F(e2, [{ transformFn: P, paths: [{ path: `entity.createdDate` }, { path: `metadata.eventTime` }] }])))();
1711
+ var ea = L(Xi);
1712
+ z(Zi), z(Qi), z($i);
1713
+ function ta(e2) {
1714
+ return R(Object.assign(e2, { domainToMappings: { "bo._base_domain_": [{ srcPath: `/back-in-stock-service`, destPath: `` }], "wixbo.ai": [{ srcPath: `/back-in-stock-service`, destPath: `` }], "wix-bo.com": [{ srcPath: `/back-in-stock-service`, destPath: `` }], "www.wixapis.com": [{ srcPath: `/back-in-stock-service`, destPath: `` }], _: [{ srcPath: `/v1/back-in-stock-notification-requests`, destPath: `/v1/back-in-stock-notification-requests` }], "*.dev.wix-code.com": [{ srcPath: `/v1/back-in-stock-notification-requests`, destPath: `/v1/back-in-stock-notification-requests` }] } }));
1715
+ }
1716
+ var na = `@wix/auto_sdk_ecom_back-in-stock-settings`;
1717
+ function ra(e2) {
1718
+ function t2({ host: t3 }) {
1719
+ return { entityFqdn: `wix.ecom.v1.back_in_stock_settings`, method: `PUT`, methodFqn: `com.wixpress.ecom.back.in.stock.BackInStockSettingsService.GetSettings`, packageName: na, migrationOptions: { optInTransformResponse: true }, url: ta({ protoPath: `/v1/back-in-stock-notification-requests/settings`, data: e2, host: t3 }), data: e2 };
1720
+ }
1721
+ return t2;
1722
+ }
1723
+ async function ia() {
1724
+ let { httpClient: e2, sideEffects: t2 } = arguments[0], n2 = ra(M({}));
1725
+ t2?.onSiteCall?.();
1726
+ try {
1727
+ let r2 = await e2.request(n2);
1728
+ return t2?.onSuccess?.(r2), N(r2.data);
1729
+ } catch (e3) {
1730
+ let n3 = I(e3, { spreadPathsToArguments: {}, explicitPathsToArguments: {}, singleArgumentUnchanged: false }, []);
1731
+ throw t2?.onError?.(e3), n3;
1732
+ }
1733
+ }
1734
+ function aa(e2) {
1735
+ return () => ia({ httpClient: e2 });
1736
+ }
1737
+ var oa = L(aa);
1738
+ function sa(e2) {
1739
+ return R(Object.assign(e2, { domainToMappings: { "api._api_base_domain_": [{ srcPath: `/cart-v2`, destPath: `` }], _: [{ srcPath: `/_api/cart-v2`, destPath: `` }], "*.dev.wix-code.com": [{ srcPath: `/_api/cart-v2`, destPath: `` }], "www._base_domain_": [{ srcPath: `/_api/cart-v2`, destPath: `` }], "editor._base_domain_": [{ srcPath: `/_api/cart-v2`, destPath: `` }], "blocks._base_domain_": [{ srcPath: `/_api/cart-v2`, destPath: `` }], "create.editorx": [{ srcPath: `/_api/cart-v2`, destPath: `` }], "apps._base_domain_": [{ srcPath: `/_api/cart-v2`, destPath: `` }], "manage._base_domain_": [{ srcPath: `/_api/cart-v2`, destPath: `` }], "bo._base_domain_": [{ srcPath: `/_api/cart-v2`, destPath: `` }], "wixbo.ai": [{ srcPath: `/_api/cart-v2`, destPath: `` }], "wix-bo.com": [{ srcPath: `/_api/cart-v2`, destPath: `` }], "www.wixapis.com": [{ srcPath: `/ecom/v2/carts`, destPath: `/v2/carts` }], "editor.wixapps.net": [{ srcPath: `/_api/cart-v2`, destPath: `` }] } }));
1740
+ }
1741
+ var ca = `@wix/auto_sdk_ecom_cart-v-2`;
1742
+ function la(e2) {
1743
+ function t2({ host: t3 }) {
1744
+ let n2 = F(e2, [{ transformFn: it, paths: [{ path: `cart.createdDate` }, { path: `cart.updatedDate` }, { path: `cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate` }, { path: `cart.lineItems.attributes.image.urlExpirationDate` }, { path: `cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate` }, { path: `cart.lineItems.attributes.serviceProperties.scheduledDate` }, { path: `cart.lineItems.attributes.serviceProperties.endDate` }, { path: `catalogItems.catalogOverrideFields.image.urlExpirationDate` }, { path: `customItems.attributes.image.urlExpirationDate` }, { path: `customItems.attributes.serviceProperties.scheduledDate` }, { path: `customItems.attributes.serviceProperties.endDate` }, { path: `customItems.attributes.subscriptionInfo.subscriptionSettings.startDate` }] }, { transformFn: fn, paths: [{ path: `cart.lineItems.source.catalogOverrideFields.physicalProperties.weight` }, { path: `cart.lineItems.attributes.physicalProperties.weight` }, { path: `cart.deliveryInfo.address.geocode.latitude` }, { path: `cart.deliveryInfo.address.geocode.longitude` }, { path: `cart.paymentInfo.billingAddress.geocode.latitude` }, { path: `cart.paymentInfo.billingAddress.geocode.longitude` }, { path: `cart.legacyFields.discounts.merchantDiscount.percentage` }, { path: `cart.tcAppliedDiscounts.merchantDiscount.percentage` }, { path: `catalogItems.catalogOverrideFields.physicalProperties.weight` }, { path: `customItems.attributes.physicalProperties.weight` }] }]);
1745
+ return { entityFqdn: `wix.ecom.v2.cart`, method: `POST`, methodFqn: `wix.ecom.cart.v2.CartService.CreateCart`, packageName: ca, migrationOptions: { optInTransformResponse: true }, url: sa({ protoPath: `/v2/carts`, data: n2, host: t3 }), data: n2, transformResponse: (e3) => F(e3, [{ transformFn: P, paths: [{ path: `cart.createdDate` }, { path: `cart.updatedDate` }, { path: `cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate` }, { path: `cart.lineItems.attributes.image.urlExpirationDate` }, { path: `cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate` }, { path: `cart.lineItems.attributes.serviceProperties.scheduledDate` }, { path: `cart.lineItems.attributes.serviceProperties.endDate` }] }, { transformFn: B, paths: [{ path: `cart.lineItems.source.catalogOverrideFields.physicalProperties.weight` }, { path: `cart.lineItems.attributes.physicalProperties.weight` }, { path: `cart.deliveryInfo.address.geocode.latitude` }, { path: `cart.deliveryInfo.address.geocode.longitude` }, { path: `cart.paymentInfo.billingAddress.geocode.latitude` }, { path: `cart.paymentInfo.billingAddress.geocode.longitude` }, { path: `cart.legacyFields.discounts.merchantDiscount.percentage` }, { path: `cart.tcAppliedDiscounts.merchantDiscount.percentage` }] }]) };
1746
+ }
1747
+ return t2;
1748
+ }
1749
+ var ua = ((e2) => (e2.UNSPECIFIED = `UNSPECIFIED`, e2.WEB = `WEB`, e2.POS = `POS`, e2.EBAY = `EBAY`, e2.AMAZON = `AMAZON`, e2.OTHER_PLATFORM = `OTHER_PLATFORM`, e2.WIX_APP_STORE = `WIX_APP_STORE`, e2.WIX_INVOICES = `WIX_INVOICES`, e2.BACKOFFICE_MERCHANT = `BACKOFFICE_MERCHANT`, e2.WISH = `WISH`, e2.CLASS_PASS = `CLASS_PASS`, e2.GLOBAL_E = `GLOBAL_E`, e2.FACEBOOK = `FACEBOOK`, e2.ETSY = `ETSY`, e2.TIKTOK = `TIKTOK`, e2.FAIRE_COM = `FAIRE_COM`, e2.PAYPAL_AGENTIC_CHECKOUT = `PAYPAL_AGENTIC_CHECKOUT`, e2.STRIPE_AGENTIC_CHECKOUT = `STRIPE_AGENTIC_CHECKOUT`, e2.WIX_INVOICES_PLATFORM = `WIX_INVOICES_PLATFORM`, e2.UCP_AGENTIC_CHECKOUT = `UCP_AGENTIC_CHECKOUT`, e2))(ua || {});
1750
+ async function da(e2) {
1751
+ let { httpClient: t2, sideEffects: n2 } = arguments[1], r2 = la(F(M({ cart: e2?.cart, catalogItems: e2?.catalogItems, customItems: e2?.customItems, coupons: e2?.coupons, deliveryMethod: e2?.deliveryMethod, giftCards: e2?.giftCards }), [{ transformFn: nr, paths: [{ path: `cart.lineItems.source.catalogOverrideFields.image` }, { path: `cart.lineItems.attributes.image` }, { path: `catalogItems.catalogOverrideFields.image` }, { path: `customItems.attributes.image` }] }, { transformFn: Ar, paths: [{ path: `cart.lineItems.attributes.url` }, { path: `customItems.attributes.url` }] }, { transformFn: pn, paths: [{ path: `cart.deliveryInfo.address` }, { path: `cart.paymentInfo.billingAddress` }] }]));
1752
+ n2?.onSiteCall?.();
1753
+ try {
1754
+ let e3 = await t2.request(r2);
1755
+ return n2?.onSuccess?.(e3), N(F(e3.data, [{ transformFn: U, paths: [{ path: `cart.lineItems.source.catalogOverrideFields.image` }, { path: `cart.lineItems.attributes.image` }] }, { transformFn: W, paths: [{ path: `cart.lineItems.attributes.url` }] }, { transformFn: mn, paths: [{ path: `cart.deliveryInfo.address` }, { path: `cart.paymentInfo.billingAddress` }] }]))?.cart;
1756
+ } catch (e3) {
1757
+ let t3 = I(e3, { spreadPathsToArguments: {}, explicitPathsToArguments: { cart: `$[0].cart`, catalogItems: `$[0].catalogItems`, customItems: `$[0].customItems`, coupons: `$[0].coupons`, deliveryMethod: `$[0].deliveryMethod`, giftCards: `$[0].giftCards` }, singleArgumentUnchanged: false }, [`options`]);
1758
+ throw n2?.onError?.(e3), t3;
1759
+ }
1760
+ }
1761
+ function fa(e2) {
1762
+ return (t2) => da(t2, { httpClient: e2 });
1763
+ }
1764
+ var pa = L(fa);
1765
+ function ma(e2) {
1766
+ return R(Object.assign(e2, { domainToMappings: { "api._api_base_domain_": [{ srcPath: `/cart-v2`, destPath: `` }], _: [{ srcPath: `/_api/cart-v2`, destPath: `` }], "*.dev.wix-code.com": [{ srcPath: `/_api/cart-v2`, destPath: `` }], "www._base_domain_": [{ srcPath: `/_api/cart-v2`, destPath: `` }], "editor._base_domain_": [{ srcPath: `/_api/cart-v2`, destPath: `` }], "blocks._base_domain_": [{ srcPath: `/_api/cart-v2`, destPath: `` }], "create.editorx": [{ srcPath: `/_api/cart-v2`, destPath: `` }], "apps._base_domain_": [{ srcPath: `/_api/cart-v2`, destPath: `` }], "manage._base_domain_": [{ srcPath: `/_api/cart-v2`, destPath: `` }], "bo._base_domain_": [{ srcPath: `/_api/cart-v2`, destPath: `` }], "wixbo.ai": [{ srcPath: `/_api/cart-v2`, destPath: `` }], "wix-bo.com": [{ srcPath: `/_api/cart-v2`, destPath: `` }], "www.wixapis.com": [{ srcPath: `/ecom/v2/carts`, destPath: `/v2/carts` }], "editor.wixapps.net": [{ srcPath: `/_api/cart-v2`, destPath: `` }] } }));
1767
+ }
1768
+ var ha = `@wix/auto_sdk_ecom_current-cart-v-2`;
1769
+ function ga(e2) {
1770
+ function t2({ host: t3 }) {
1771
+ let n2 = F(e2, [{ transformFn: fn, paths: [{ path: `catalogItems.catalogOverrideFields.physicalProperties.weight` }, { path: `customItems.attributes.physicalProperties.weight` }] }, { transformFn: it, paths: [{ path: `catalogItems.catalogOverrideFields.image.urlExpirationDate` }, { path: `customItems.attributes.image.urlExpirationDate` }, { path: `customItems.attributes.serviceProperties.scheduledDate` }, { path: `customItems.attributes.serviceProperties.endDate` }, { path: `customItems.attributes.subscriptionInfo.subscriptionSettings.startDate` }] }]);
1772
+ return { entityFqdn: `wix.ecom.v2.cart`, method: `POST`, methodFqn: `wix.ecom.cart.v2.CurrentCartService.AddLineItemsToCurrentCart`, packageName: ha, migrationOptions: { optInTransformResponse: true }, url: ma({ protoPath: `/v2/carts/current/add-line-items`, data: n2, host: t3 }), data: n2, transformResponse: (e3) => F(e3, [{ transformFn: P, paths: [{ path: `cart.createdDate` }, { path: `cart.updatedDate` }, { path: `cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate` }, { path: `cart.lineItems.attributes.image.urlExpirationDate` }, { path: `cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate` }, { path: `cart.lineItems.attributes.serviceProperties.scheduledDate` }, { path: `cart.lineItems.attributes.serviceProperties.endDate` }] }, { transformFn: B, paths: [{ path: `cart.lineItems.source.catalogOverrideFields.physicalProperties.weight` }, { path: `cart.lineItems.attributes.physicalProperties.weight` }, { path: `cart.deliveryInfo.address.geocode.latitude` }, { path: `cart.deliveryInfo.address.geocode.longitude` }, { path: `cart.paymentInfo.billingAddress.geocode.latitude` }, { path: `cart.paymentInfo.billingAddress.geocode.longitude` }, { path: `cart.legacyFields.discounts.merchantDiscount.percentage` }, { path: `cart.tcAppliedDiscounts.merchantDiscount.percentage` }] }]) };
1773
+ }
1774
+ return t2;
1775
+ }
1776
+ async function _a(e2) {
1777
+ let { httpClient: t2, sideEffects: n2 } = arguments[1], r2 = ga(F(M({ catalogItems: e2?.catalogItems, customItems: e2?.customItems }), [{ transformFn: nr, paths: [{ path: `catalogItems.catalogOverrideFields.image` }, { path: `customItems.attributes.image` }] }, { transformFn: Ar, paths: [{ path: `customItems.attributes.url` }] }]));
1778
+ n2?.onSiteCall?.();
1779
+ try {
1780
+ let e3 = await t2.request(r2);
1781
+ return n2?.onSuccess?.(e3), N(F(e3.data, [{ transformFn: U, paths: [{ path: `cart.lineItems.source.catalogOverrideFields.image` }, { path: `cart.lineItems.attributes.image` }] }, { transformFn: W, paths: [{ path: `cart.lineItems.attributes.url` }] }, { transformFn: mn, paths: [{ path: `cart.deliveryInfo.address` }, { path: `cart.paymentInfo.billingAddress` }] }]));
1782
+ } catch (e3) {
1783
+ let t3 = I(e3, { spreadPathsToArguments: {}, explicitPathsToArguments: { catalogItems: `$[0].catalogItems`, customItems: `$[0].customItems` }, singleArgumentUnchanged: false }, [`options`]);
1784
+ throw n2?.onError?.(e3), t3;
1785
+ }
1786
+ }
1787
+ function va(e2) {
1788
+ return (t2) => _a(t2, { httpClient: e2 });
1789
+ }
1790
+ var ya = L(va);
1791
+ async function ba(e2) {
1792
+ await ya({ catalogItems: [e2] });
1793
+ }
1794
+ var xa = { type: `invalid-purchase`, message: `This item can't be purchased.` };
1795
+ function Sa(e2) {
1796
+ let t2 = e2;
1797
+ return { type: `cart`, message: t2?.message, details: t2?.details };
1798
+ }
1799
+ function q(e2) {
1800
+ return e2;
1801
+ }
1802
+ var Ca = q(`@wix/site-service-public-api-caller`);
1803
+ var wa = `215238eb-22a5-4c36-9e7b-e7c08025e04e`;
1804
+ var Ta = `1380b703-ce81-ff05-f115-39571d94dfcd`;
1805
+ `${wa}`, `${wa}`;
1806
+ var J = function(e2) {
1807
+ return e2.SIDE_CART = `ecom_side_cart`, e2.CART = `shopping_cart`, e2.CHECKOUT = `checkout`, e2.PRODUCT_PAGE = `product-page-builder`, e2.CATEGORY_PAGE = `category-page-builder`, e2;
1808
+ }({});
1809
+ var Ea = () => {
1810
+ let e2 = (0, import_services_manager_react.useGetService)();
1811
+ return { reloadCart: (0, import_react.useCallback)(async () => {
1812
+ if (typeof window < `u`) try {
1813
+ await e2(Ca).callPublicApi(Ta, `cart.reloadCart`, []);
1814
+ } catch {
1815
+ }
1816
+ }, [e2]) };
1817
+ };
1818
+ var Da = q(`@wix/viewer-service-router`);
1819
+ var Oa = q(`@wix/site-service-url`);
1820
+ var ka = q(`@wix/site-service-editor-context`);
1821
+ var Aa = q(`@wix/site-service-pages`);
1822
+ var ja = () => {
1823
+ let e2 = (0, import_services_manager_react.useService)(Oa), n2 = (0, import_react.useCallback)((t2, n3) => {
1824
+ let r2 = e2.appSectionRelativeUrl(wa, t2, true);
1825
+ if (r2) return `./${r2.replace(/^\//, ``).replace(/\/$/, ``)}/${encodeURIComponent(n3)}`;
1826
+ }, [e2]);
1827
+ return { getPageRelativeUrl: n2, getPageAbsoluteUrl: (0, import_react.useCallback)((t2, r2) => {
1828
+ let i2 = n2(t2, r2);
1829
+ if (i2) return new URL(i2, `${e2.siteUrl.replace(/\/$/, ``)}/`).href;
1830
+ }, [n2, e2]) };
1831
+ };
1832
+ var Ma = (e2) => {
1833
+ if (!e2) return ``;
1834
+ let t2 = new URLSearchParams(e2).toString();
1835
+ return t2 ? `?${t2}` : ``;
1836
+ };
1837
+ var Na = (e2, t2, n2) => {
1838
+ let r2 = `./${e2.replace(/^\//, ``)}`;
1839
+ return n2 ? r2 : new URL(r2, `${t2.replace(/\/$/, ``)}/`).href;
1840
+ };
1841
+ var Pa = () => {
1842
+ let e2 = (0, import_services_manager_react.useService)(Da), n2 = (0, import_services_manager_react.useService)(Oa), r2 = (0, import_services_manager_react.useService)(ka), i2 = (0, import_services_manager_react.useService)(Aa), { getPageRelativeUrl: a2, getPageAbsoluteUrl: o2 } = ja();
1843
+ return { navigateToPage: (0, import_react.useCallback)(async (t2, i3) => {
1844
+ try {
1845
+ let a3 = n2.appSectionRelativeUrl(Ta, t2);
1846
+ if (!a3) return false;
1847
+ let o3 = `${a3}${Ma(i3)}`;
1848
+ return await e2.navigateTo({ href: Na(o3, n2.siteUrl, r2.previewMode) }), true;
1849
+ } catch {
1850
+ return false;
1851
+ }
1852
+ }, [e2, n2, r2]), navigateToProductPage: (0, import_react.useCallback)(async (t2) => {
1853
+ try {
1854
+ let n3 = r2.previewMode ? a2(J.PRODUCT_PAGE, t2) : o2(J.PRODUCT_PAGE, t2);
1855
+ if (!n3) throw Error(`Failed to resolve app section relative URL for the product page`);
1856
+ await e2.navigateTo({ href: n3 });
1857
+ } catch (e3) {
1858
+ console.error(`navigateToProductPage: failed to navigate to product "${t2}"`, e3);
1859
+ }
1860
+ }, [e2, r2, a2, o2]), openLightbox: (0, import_react.useCallback)(async (t2) => {
1861
+ try {
1862
+ let n3 = Object.entries(i2.pages).find(([, e3]) => e3.popup && e3.appPageId === t2)?.[0];
1863
+ return n3 ? (await e2.navigateTo({ linkPopupId: n3 }), true) : false;
1864
+ } catch {
1865
+ return false;
1866
+ }
1867
+ }, [e2, i2]) };
1868
+ };
1869
+ var Y = function(e2) {
1870
+ return e2.IDLE = `idle`, e2.IN_PROGRESS = `in-progress`, e2.SUCCESS = `success`, e2;
1871
+ }({});
1872
+ var Fa = function(e2) {
1873
+ return e2.NONE = `none`, e2.NAVIGATE_TO_CART = `navigate-to-cart`, e2.OPEN_SIDE_CART = `open-side-cart`, e2;
1874
+ }({});
1875
+ var Ia = () => {
1876
+ let [e2, n2] = (0, import_react.useState)(Y.IDLE), { navigateToPage: r2, openLightbox: a2 } = Pa(), { reloadCart: o2 } = Ea(), s2 = (0, import_react.useCallback)(async (e3) => {
1877
+ switch (e3) {
1878
+ case Fa.NAVIGATE_TO_CART:
1879
+ await r2(J.CART);
1880
+ return;
1881
+ case Fa.OPEN_SIDE_CART:
1882
+ await a2(J.SIDE_CART);
1883
+ return;
1884
+ case Fa.NONE:
1885
+ default:
1886
+ return;
1887
+ }
1888
+ }, [r2, a2]);
1889
+ return { addToCart: (0, import_react.useCallback)(async (e3, t2) => {
1890
+ n2(Y.IN_PROGRESS);
1891
+ try {
1892
+ await ba(e3);
1893
+ } catch (e4) {
1894
+ return n2(Y.IDLE), { ok: false, error: Sa(e4) };
1895
+ }
1896
+ try {
1897
+ await o2(), n2(Y.SUCCESS), await s2(t2), setTimeout(() => n2(Y.IDLE), 2e3);
1898
+ } catch {
1899
+ n2(Y.IDLE);
1900
+ }
1901
+ return { ok: true };
1902
+ }, [o2, s2]), addToCartState: e2, reloadCart: o2 };
1903
+ };
1904
+ async function La(e2) {
1905
+ let t2 = await pa({ cart: { source: { channelType: ua.WEB } }, catalogItems: [e2] });
1906
+ if (!t2._id) throw Error(`missing checkout id`);
1907
+ return t2._id;
1908
+ }
1909
+ var Ra = function(e2) {
1910
+ return e2.IDLE = `idle`, e2.IN_PROGRESS = `in-progress`, e2;
1911
+ }({});
1912
+ var za = () => {
1913
+ let { navigateToPage: e2 } = Pa(), [n2, r2] = (0, import_react.useState)(Ra.IDLE);
1914
+ return { buyNowState: n2, buyNow: (0, import_react.useCallback)(async (t2) => {
1915
+ r2(Ra.IN_PROGRESS);
1916
+ try {
1917
+ let n3 = await La(t2);
1918
+ return await e2(J.CHECKOUT, { checkoutId: n3 }) ? { ok: true } : { ok: false, error: Sa(Error(`Failed to navigate to checkout`)) };
1919
+ } catch (e3) {
1920
+ return { ok: false, error: Sa(e3) };
1921
+ } finally {
1922
+ r2(Ra.IDLE);
1923
+ }
1924
+ }, [e2]) };
1925
+ };
1926
+ function Ba(e2) {
1927
+ let { product: t2, selectedVariant: n2, userSelections: r2, isPreOrder: i2 } = e2;
1928
+ return { catalogReference: { appId: wa, catalogItemId: t2.id, options: Va({ product: t2, selectedVariant: n2, userSelections: r2, isPreOrder: i2 }) }, quantity: r2.quantity };
1929
+ }
1930
+ var Va = ({ product: e2, selectedVariant: t2, userSelections: n2, isPreOrder: r2 }) => {
1931
+ let i2 = Ha(e2, t2.choices), { choiceBasedModifiers: a2, customTextFields: o2 } = Ua(e2, n2.selectedModifiers), s2 = { ...i2, ...a2 }, { selectedSubscriptionPlanId: c2 } = n2, l2 = { variantId: t2.id, options: s2 };
1932
+ return Object.keys(o2).length > 0 && (l2.customTextFields = o2), Wa(c2) && (l2.subscriptionOptionId = c2), r2 && (l2.preOrderRequested = true), l2;
1933
+ };
1934
+ var Ha = (e2, t2) => {
1935
+ let n2 = {};
1936
+ for (let [r2, i2] of Object.entries(t2)) {
1937
+ let t3 = e2.options.find((e3) => e3.id === r2), a2 = t3?.choices.find((e3) => e3.choiceId === i2);
1938
+ t3 && a2 && (n2[t3.key] = a2.key);
1939
+ }
1940
+ return n2;
1941
+ };
1942
+ var Ua = (e2, t2) => {
1943
+ let n2 = {}, r2 = {};
1944
+ for (let i2 of Object.values(e2.modifiers)) if (i2.modifierRenderType === Pr.FREE_TEXT) {
1945
+ let e3 = i2.freeTextSettings?.key;
1946
+ e3 && (r2[e3] = t2[i2.id] ?? ``);
1947
+ } else {
1948
+ let e3 = t2[i2.id], r3 = i2.choices?.find((t3) => t3.choiceId === e3);
1949
+ r3 && (n2[i2.key] = r3.key);
1950
+ }
1951
+ return { choiceBasedModifiers: n2, customTextFields: r2 };
1952
+ };
1953
+ var Wa = (e2) => e2 !== void 0 && e2 !== `one-time`;
1954
+ function Ga(e2, r2, i2) {
1955
+ let { selectedVariant: a2, selectedModifiers: o2, selectedSubscriptionPlanId: s2, quantity: c2, isSelectionValid: l2, setHasAttemptedSubmit: u2 } = r2, { addToCart: d2, addToCartState: f2 } = Ia(), { buyNow: p2, buyNowState: m2 } = za(), h2 = i2.isPreOrderState || i2.isInStock, g2 = (0, import_react.useCallback)(async (t2) => !h2 || (u2(true), !l2 || !a2) ? { ok: false, error: xa } : d2(Ba({ product: e2, selectedVariant: a2, userSelections: { selectedModifiers: o2, selectedSubscriptionPlanId: s2, quantity: c2 }, isPreOrder: i2.isPreOrderState }), t2 ?? Fa.NONE), [h2, i2.isPreOrderState, l2, u2, e2, a2, o2, s2, c2, d2]), _2 = (0, import_react.useCallback)(async () => !h2 || (u2(true), !l2 || !a2) ? { ok: false, error: xa } : p2(Ba({ product: e2, selectedVariant: a2, userSelections: { selectedModifiers: o2, selectedSubscriptionPlanId: s2, quantity: c2 }, isPreOrder: i2.isPreOrderState })), [h2, i2.isPreOrderState, l2, u2, e2, a2, o2, s2, c2, p2]);
1956
+ return (0, import_react.useMemo)(() => ({ addToCartState: f2, buyNowState: m2, handleAddToCart: g2, handleBuyNow: _2 }), [f2, m2, g2, _2]);
1957
+ }
1958
+ function Ka(e2) {
1959
+ return Ja(e2) ?? 99999;
1960
+ }
1961
+ function qa(e2, t2) {
1962
+ return Math.min(e2, Math.max(t2, 1));
1963
+ }
1964
+ function Ja(e2) {
1965
+ if (!e2 || !e2.trackQuantity) return;
1966
+ let { availabilityStatus: t2, inventoryQuantity: n2, preorderInfo: r2 } = e2, i2 = t2 === `PREORDER` ? r2?.quantity : n2;
1967
+ if (i2 != null) return Math.max(0, i2);
1968
+ }
1969
+ function Ya(e2) {
1970
+ let { availabilityStatus: t2, preorderAvailability: n2 } = e2 ?? {}, r2 = t2 !== Fr.OUT_OF_STOCK;
1971
+ return { isInStock: r2, isPreOrderState: n2 === Ir.ALL_VARIANTS || n2 === Ir.SOME_VARIANTS && !r2 };
1972
+ }
1973
+ function Xa(e2, t2) {
1974
+ return t2 ? { isInStock: t2.availabilityStatus === vr.IN_STOCK, isPreOrderState: t2.availabilityStatus === vr.PREORDER } : Ya(e2.inventory);
1975
+ }
1976
+ function Za(e2, t2) {
1977
+ return (0, import_react.useMemo)(() => {
1978
+ let { isInStock: n2, isPreOrderState: r2 } = Xa(e2, t2);
1979
+ return { isInStock: n2, isPreOrderState: r2, preOrderMessage: r2 ? t2?.preorderInfo?.message : void 0, remainingItemCount: Ja(t2) };
1980
+ }, [e2.inventory, t2]);
1981
+ }
1982
+ var Qa = _((e2, t2) => {
1983
+ t2.exports = typeof window == `object` && window && window.Object === Object && window;
1984
+ });
1985
+ var X = _((e2, t2) => {
1986
+ var n2 = Qa(), r2 = typeof self == `object` && self && self.Object === Object && self;
1987
+ t2.exports = n2 || r2 || Function(`return this`)();
1988
+ });
1989
+ var $a = _((e2, t2) => {
1990
+ t2.exports = X().Symbol;
1991
+ });
1992
+ var eo = _((e2, t2) => {
1993
+ var n2 = $a(), r2 = Object.prototype, i2 = r2.hasOwnProperty, a2 = r2.toString, o2 = n2 ? n2.toStringTag : void 0;
1994
+ function s2(e3) {
1995
+ var t3 = i2.call(e3, o2), n3 = e3[o2];
1996
+ try {
1997
+ e3[o2] = void 0;
1998
+ var r3 = true;
1999
+ } catch {
2000
+ }
2001
+ var s3 = a2.call(e3);
2002
+ return r3 && (t3 ? e3[o2] = n3 : delete e3[o2]), s3;
2003
+ }
2004
+ t2.exports = s2;
2005
+ });
2006
+ var to = _((e2, t2) => {
2007
+ var n2 = Object.prototype.toString;
2008
+ function r2(e3) {
2009
+ return n2.call(e3);
2010
+ }
2011
+ t2.exports = r2;
2012
+ });
2013
+ var no = _((e2, t2) => {
2014
+ var n2 = $a(), r2 = eo(), i2 = to(), a2 = `[object Null]`, o2 = `[object Undefined]`, s2 = n2 ? n2.toStringTag : void 0;
2015
+ function c2(e3) {
2016
+ return e3 == null ? e3 === void 0 ? o2 : a2 : s2 && s2 in Object(e3) ? r2(e3) : i2(e3);
2017
+ }
2018
+ t2.exports = c2;
2019
+ });
2020
+ var ro = _((e2, t2) => {
2021
+ function n2(e3) {
2022
+ return typeof e3 == `object` && !!e3;
2023
+ }
2024
+ t2.exports = n2;
2025
+ });
2026
+ var io = _((e2, t2) => {
2027
+ var n2 = no(), r2 = ro(), i2 = `[object Symbol]`;
2028
+ function a2(e3) {
2029
+ return typeof e3 == `symbol` || r2(e3) && n2(e3) == i2;
2030
+ }
2031
+ t2.exports = a2;
2032
+ });
2033
+ var ao = _((e2, t2) => {
2034
+ var n2 = io();
2035
+ function r2(e3, t3, r3) {
2036
+ for (var i2 = -1, a2 = e3.length; ++i2 < a2; ) {
2037
+ var o2 = e3[i2], s2 = t3(o2);
2038
+ if (s2 != null && (c2 === void 0 ? s2 === s2 && !n2(s2) : r3(s2, c2))) var c2 = s2, l2 = o2;
2039
+ }
2040
+ return l2;
2041
+ }
2042
+ t2.exports = r2;
2043
+ });
2044
+ var oo = _((e2, t2) => {
2045
+ function n2(e3, t3) {
2046
+ return e3 > t3;
2047
+ }
2048
+ t2.exports = n2;
2049
+ });
2050
+ var so = _((e2, t2) => {
2051
+ function n2(e3) {
2052
+ return e3;
2053
+ }
2054
+ t2.exports = n2;
2055
+ });
2056
+ var co = _((e2, t2) => {
2057
+ var n2 = ao(), r2 = oo(), i2 = so();
2058
+ function a2(e3) {
2059
+ return e3 && e3.length ? n2(e3, i2, r2) : void 0;
2060
+ }
2061
+ t2.exports = a2;
2062
+ });
2063
+ var lo = _((e2, t2) => {
2064
+ function n2() {
2065
+ this.__data__ = [], this.size = 0;
2066
+ }
2067
+ t2.exports = n2;
2068
+ });
2069
+ var uo = _((e2, t2) => {
2070
+ function n2(e3, t3) {
2071
+ return e3 === t3 || e3 !== e3 && t3 !== t3;
2072
+ }
2073
+ t2.exports = n2;
2074
+ });
2075
+ var fo = _((e2, t2) => {
2076
+ var n2 = uo();
2077
+ function r2(e3, t3) {
2078
+ for (var r3 = e3.length; r3--; ) if (n2(e3[r3][0], t3)) return r3;
2079
+ return -1;
2080
+ }
2081
+ t2.exports = r2;
2082
+ });
2083
+ var po = _((e2, t2) => {
2084
+ var n2 = fo(), r2 = Array.prototype.splice;
2085
+ function i2(e3) {
2086
+ var t3 = this.__data__, i3 = n2(t3, e3);
2087
+ return i3 < 0 ? false : (i3 == t3.length - 1 ? t3.pop() : r2.call(t3, i3, 1), --this.size, true);
2088
+ }
2089
+ t2.exports = i2;
2090
+ });
2091
+ var mo = _((e2, t2) => {
2092
+ var n2 = fo();
2093
+ function r2(e3) {
2094
+ var t3 = this.__data__, r3 = n2(t3, e3);
2095
+ return r3 < 0 ? void 0 : t3[r3][1];
2096
+ }
2097
+ t2.exports = r2;
2098
+ });
2099
+ var ho = _((e2, t2) => {
2100
+ var n2 = fo();
2101
+ function r2(e3) {
2102
+ return n2(this.__data__, e3) > -1;
2103
+ }
2104
+ t2.exports = r2;
2105
+ });
2106
+ var go = _((e2, t2) => {
2107
+ var n2 = fo();
2108
+ function r2(e3, t3) {
2109
+ var r3 = this.__data__, i2 = n2(r3, e3);
2110
+ return i2 < 0 ? (++this.size, r3.push([e3, t3])) : r3[i2][1] = t3, this;
2111
+ }
2112
+ t2.exports = r2;
2113
+ });
2114
+ var _o = _((e2, t2) => {
2115
+ var n2 = lo(), r2 = po(), i2 = mo(), a2 = ho(), o2 = go();
2116
+ function s2(e3) {
2117
+ var t3 = -1, n3 = e3 == null ? 0 : e3.length;
2118
+ for (this.clear(); ++t3 < n3; ) {
2119
+ var r3 = e3[t3];
2120
+ this.set(r3[0], r3[1]);
2121
+ }
2122
+ }
2123
+ s2.prototype.clear = n2, s2.prototype.delete = r2, s2.prototype.get = i2, s2.prototype.has = a2, s2.prototype.set = o2, t2.exports = s2;
2124
+ });
2125
+ var vo = _((e2, t2) => {
2126
+ var n2 = _o();
2127
+ function r2() {
2128
+ this.__data__ = new n2(), this.size = 0;
2129
+ }
2130
+ t2.exports = r2;
2131
+ });
2132
+ var yo = _((e2, t2) => {
2133
+ function n2(e3) {
2134
+ var t3 = this.__data__, n3 = t3.delete(e3);
2135
+ return this.size = t3.size, n3;
2136
+ }
2137
+ t2.exports = n2;
2138
+ });
2139
+ var bo = _((e2, t2) => {
2140
+ function n2(e3) {
2141
+ return this.__data__.get(e3);
2142
+ }
2143
+ t2.exports = n2;
2144
+ });
2145
+ var xo = _((e2, t2) => {
2146
+ function n2(e3) {
2147
+ return this.__data__.has(e3);
2148
+ }
2149
+ t2.exports = n2;
2150
+ });
2151
+ var So = _((e2, t2) => {
2152
+ function n2(e3) {
2153
+ var t3 = typeof e3;
2154
+ return e3 != null && (t3 == `object` || t3 == `function`);
2155
+ }
2156
+ t2.exports = n2;
2157
+ });
2158
+ var Co = _((e2, t2) => {
2159
+ var n2 = no(), r2 = So(), i2 = `[object AsyncFunction]`, a2 = `[object Function]`, o2 = `[object GeneratorFunction]`, s2 = `[object Proxy]`;
2160
+ function c2(e3) {
2161
+ if (!r2(e3)) return false;
2162
+ var t3 = n2(e3);
2163
+ return t3 == a2 || t3 == o2 || t3 == i2 || t3 == s2;
2164
+ }
2165
+ t2.exports = c2;
2166
+ });
2167
+ var wo = _((e2, t2) => {
2168
+ t2.exports = X()[`__core-js_shared__`];
2169
+ });
2170
+ var To = _((e2, t2) => {
2171
+ var n2 = wo(), r2 = function() {
2172
+ var e3 = /[^.]+$/.exec(n2 && n2.keys && n2.keys.IE_PROTO || ``);
2173
+ return e3 ? `Symbol(src)_1.` + e3 : ``;
2174
+ }();
2175
+ function i2(e3) {
2176
+ return !!r2 && r2 in e3;
2177
+ }
2178
+ t2.exports = i2;
2179
+ });
2180
+ var Eo = _((e2, t2) => {
2181
+ var n2 = Function.prototype.toString;
2182
+ function r2(e3) {
2183
+ if (e3 != null) {
2184
+ try {
2185
+ return n2.call(e3);
2186
+ } catch {
2187
+ }
2188
+ try {
2189
+ return e3 + ``;
2190
+ } catch {
2191
+ }
2192
+ }
2193
+ return ``;
2194
+ }
2195
+ t2.exports = r2;
2196
+ });
2197
+ var Do = _((e2, t2) => {
2198
+ var n2 = Co(), r2 = To(), i2 = So(), a2 = Eo(), o2 = /[\\^$.*+?()[\]{}|]/g, s2 = /^\[object .+?Constructor\]$/, c2 = Function.prototype, l2 = Object.prototype, u2 = c2.toString, d2 = l2.hasOwnProperty, f2 = RegExp(`^` + u2.call(d2).replace(o2, `\\$&`).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, `$1.*?`) + `$`);
2199
+ function p2(e3) {
2200
+ return !i2(e3) || r2(e3) ? false : (n2(e3) ? f2 : s2).test(a2(e3));
2201
+ }
2202
+ t2.exports = p2;
2203
+ });
2204
+ var Oo = _((e2, t2) => {
2205
+ function n2(e3, t3) {
2206
+ return e3?.[t3];
2207
+ }
2208
+ t2.exports = n2;
2209
+ });
2210
+ var ko = _((e2, t2) => {
2211
+ var n2 = Do(), r2 = Oo();
2212
+ function i2(e3, t3) {
2213
+ var i3 = r2(e3, t3);
2214
+ return n2(i3) ? i3 : void 0;
2215
+ }
2216
+ t2.exports = i2;
2217
+ });
2218
+ var Ao = _((e2, t2) => {
2219
+ t2.exports = ko()(X(), `Map`);
2220
+ });
2221
+ var jo = _((e2, t2) => {
2222
+ t2.exports = ko()(Object, `create`);
2223
+ });
2224
+ var Mo = _((e2, t2) => {
2225
+ var n2 = jo();
2226
+ function r2() {
2227
+ this.__data__ = n2 ? n2(null) : {}, this.size = 0;
2228
+ }
2229
+ t2.exports = r2;
2230
+ });
2231
+ var No = _((e2, t2) => {
2232
+ function n2(e3) {
2233
+ var t3 = this.has(e3) && delete this.__data__[e3];
2234
+ return this.size -= +!!t3, t3;
2235
+ }
2236
+ t2.exports = n2;
2237
+ });
2238
+ var Po = _((e2, t2) => {
2239
+ var n2 = jo(), r2 = `__lodash_hash_undefined__`, i2 = Object.prototype.hasOwnProperty;
2240
+ function a2(e3) {
2241
+ var t3 = this.__data__;
2242
+ if (n2) {
2243
+ var a3 = t3[e3];
2244
+ return a3 === r2 ? void 0 : a3;
2245
+ }
2246
+ return i2.call(t3, e3) ? t3[e3] : void 0;
2247
+ }
2248
+ t2.exports = a2;
2249
+ });
2250
+ var Fo = _((e2, t2) => {
2251
+ var n2 = jo(), r2 = Object.prototype.hasOwnProperty;
2252
+ function i2(e3) {
2253
+ var t3 = this.__data__;
2254
+ return n2 ? t3[e3] !== void 0 : r2.call(t3, e3);
2255
+ }
2256
+ t2.exports = i2;
2257
+ });
2258
+ var Io = _((e2, t2) => {
2259
+ var n2 = jo(), r2 = `__lodash_hash_undefined__`;
2260
+ function i2(e3, t3) {
2261
+ var i3 = this.__data__;
2262
+ return this.size += +!this.has(e3), i3[e3] = n2 && t3 === void 0 ? r2 : t3, this;
2263
+ }
2264
+ t2.exports = i2;
2265
+ });
2266
+ var Lo = _((e2, t2) => {
2267
+ var n2 = Mo(), r2 = No(), i2 = Po(), a2 = Fo(), o2 = Io();
2268
+ function s2(e3) {
2269
+ var t3 = -1, n3 = e3 == null ? 0 : e3.length;
2270
+ for (this.clear(); ++t3 < n3; ) {
2271
+ var r3 = e3[t3];
2272
+ this.set(r3[0], r3[1]);
2273
+ }
2274
+ }
2275
+ s2.prototype.clear = n2, s2.prototype.delete = r2, s2.prototype.get = i2, s2.prototype.has = a2, s2.prototype.set = o2, t2.exports = s2;
2276
+ });
2277
+ var Ro = _((e2, t2) => {
2278
+ var n2 = Lo(), r2 = _o(), i2 = Ao();
2279
+ function a2() {
2280
+ this.size = 0, this.__data__ = { hash: new n2(), map: new (i2 || r2)(), string: new n2() };
2281
+ }
2282
+ t2.exports = a2;
2283
+ });
2284
+ var zo = _((e2, t2) => {
2285
+ function n2(e3) {
2286
+ var t3 = typeof e3;
2287
+ return t3 == `string` || t3 == `number` || t3 == `symbol` || t3 == `boolean` ? e3 !== `__proto__` : e3 === null;
2288
+ }
2289
+ t2.exports = n2;
2290
+ });
2291
+ var Bo = _((e2, t2) => {
2292
+ var n2 = zo();
2293
+ function r2(e3, t3) {
2294
+ var r3 = e3.__data__;
2295
+ return n2(t3) ? r3[typeof t3 == `string` ? `string` : `hash`] : r3.map;
2296
+ }
2297
+ t2.exports = r2;
2298
+ });
2299
+ var Vo = _((e2, t2) => {
2300
+ var n2 = Bo();
2301
+ function r2(e3) {
2302
+ var t3 = n2(this, e3).delete(e3);
2303
+ return this.size -= +!!t3, t3;
2304
+ }
2305
+ t2.exports = r2;
2306
+ });
2307
+ var Ho = _((e2, t2) => {
2308
+ var n2 = Bo();
2309
+ function r2(e3) {
2310
+ return n2(this, e3).get(e3);
2311
+ }
2312
+ t2.exports = r2;
2313
+ });
2314
+ var Uo = _((e2, t2) => {
2315
+ var n2 = Bo();
2316
+ function r2(e3) {
2317
+ return n2(this, e3).has(e3);
2318
+ }
2319
+ t2.exports = r2;
2320
+ });
2321
+ var Wo = _((e2, t2) => {
2322
+ var n2 = Bo();
2323
+ function r2(e3, t3) {
2324
+ var r3 = n2(this, e3), i2 = r3.size;
2325
+ return r3.set(e3, t3), this.size += r3.size == i2 ? 0 : 1, this;
2326
+ }
2327
+ t2.exports = r2;
2328
+ });
2329
+ var Go = _((e2, t2) => {
2330
+ var n2 = Ro(), r2 = Vo(), i2 = Ho(), a2 = Uo(), o2 = Wo();
2331
+ function s2(e3) {
2332
+ var t3 = -1, n3 = e3 == null ? 0 : e3.length;
2333
+ for (this.clear(); ++t3 < n3; ) {
2334
+ var r3 = e3[t3];
2335
+ this.set(r3[0], r3[1]);
2336
+ }
2337
+ }
2338
+ s2.prototype.clear = n2, s2.prototype.delete = r2, s2.prototype.get = i2, s2.prototype.has = a2, s2.prototype.set = o2, t2.exports = s2;
2339
+ });
2340
+ var Ko = _((e2, t2) => {
2341
+ var n2 = _o(), r2 = Ao(), i2 = Go(), a2 = 200;
2342
+ function o2(e3, t3) {
2343
+ var o3 = this.__data__;
2344
+ if (o3 instanceof n2) {
2345
+ var s2 = o3.__data__;
2346
+ if (!r2 || s2.length < a2 - 1) return s2.push([e3, t3]), this.size = ++o3.size, this;
2347
+ o3 = this.__data__ = new i2(s2);
2348
+ }
2349
+ return o3.set(e3, t3), this.size = o3.size, this;
2350
+ }
2351
+ t2.exports = o2;
2352
+ });
2353
+ var qo = _((e2, t2) => {
2354
+ var n2 = _o(), r2 = vo(), i2 = yo(), a2 = bo(), o2 = xo(), s2 = Ko();
2355
+ function c2(e3) {
2356
+ var t3 = this.__data__ = new n2(e3);
2357
+ this.size = t3.size;
2358
+ }
2359
+ c2.prototype.clear = r2, c2.prototype.delete = i2, c2.prototype.get = a2, c2.prototype.has = o2, c2.prototype.set = s2, t2.exports = c2;
2360
+ });
2361
+ var Jo = _((e2, t2) => {
2362
+ function n2(e3) {
2363
+ return this.__data__.set(e3, `__lodash_hash_undefined__`), this;
2364
+ }
2365
+ t2.exports = n2;
2366
+ });
2367
+ var Yo = _((e2, t2) => {
2368
+ function n2(e3) {
2369
+ return this.__data__.has(e3);
2370
+ }
2371
+ t2.exports = n2;
2372
+ });
2373
+ var Xo = _((e2, t2) => {
2374
+ var n2 = Go(), r2 = Jo(), i2 = Yo();
2375
+ function a2(e3) {
2376
+ var t3 = -1, r3 = e3 == null ? 0 : e3.length;
2377
+ for (this.__data__ = new n2(); ++t3 < r3; ) this.add(e3[t3]);
2378
+ }
2379
+ a2.prototype.add = a2.prototype.push = r2, a2.prototype.has = i2, t2.exports = a2;
2380
+ });
2381
+ var Zo = _((e2, t2) => {
2382
+ function n2(e3, t3) {
2383
+ for (var n3 = -1, r2 = e3 == null ? 0 : e3.length; ++n3 < r2; ) if (t3(e3[n3], n3, e3)) return true;
2384
+ return false;
2385
+ }
2386
+ t2.exports = n2;
2387
+ });
2388
+ var Qo = _((e2, t2) => {
2389
+ function n2(e3, t3) {
2390
+ return e3.has(t3);
2391
+ }
2392
+ t2.exports = n2;
2393
+ });
2394
+ var $o = _((e2, t2) => {
2395
+ var n2 = Xo(), r2 = Zo(), i2 = Qo(), a2 = 1, o2 = 2;
2396
+ function s2(e3, t3, s3, c2, l2, u2) {
2397
+ var d2 = s3 & a2, f2 = e3.length, p2 = t3.length;
2398
+ if (f2 != p2 && !(d2 && p2 > f2)) return false;
2399
+ var m2 = u2.get(e3), h2 = u2.get(t3);
2400
+ if (m2 && h2) return m2 == t3 && h2 == e3;
2401
+ var g2 = -1, _2 = true, v2 = s3 & o2 ? new n2() : void 0;
2402
+ for (u2.set(e3, t3), u2.set(t3, e3); ++g2 < f2; ) {
2403
+ var y2 = e3[g2], b2 = t3[g2];
2404
+ if (c2) var x2 = d2 ? c2(b2, y2, g2, t3, e3, u2) : c2(y2, b2, g2, e3, t3, u2);
2405
+ if (x2 !== void 0) {
2406
+ if (x2) continue;
2407
+ _2 = false;
2408
+ break;
2409
+ }
2410
+ if (v2) {
2411
+ if (!r2(t3, function(e4, t4) {
2412
+ if (!i2(v2, t4) && (y2 === e4 || l2(y2, e4, s3, c2, u2))) return v2.push(t4);
2413
+ })) {
2414
+ _2 = false;
2415
+ break;
2416
+ }
2417
+ } else if (!(y2 === b2 || l2(y2, b2, s3, c2, u2))) {
2418
+ _2 = false;
2419
+ break;
2420
+ }
2421
+ }
2422
+ return u2.delete(e3), u2.delete(t3), _2;
2423
+ }
2424
+ t2.exports = s2;
2425
+ });
2426
+ var es = _((e2, t2) => {
2427
+ t2.exports = X().Uint8Array;
2428
+ });
2429
+ var ts = _((e2, t2) => {
2430
+ function n2(e3) {
2431
+ var t3 = -1, n3 = Array(e3.size);
2432
+ return e3.forEach(function(e4, r2) {
2433
+ n3[++t3] = [r2, e4];
2434
+ }), n3;
2435
+ }
2436
+ t2.exports = n2;
2437
+ });
2438
+ var ns = _((e2, t2) => {
2439
+ function n2(e3) {
2440
+ var t3 = -1, n3 = Array(e3.size);
2441
+ return e3.forEach(function(e4) {
2442
+ n3[++t3] = e4;
2443
+ }), n3;
2444
+ }
2445
+ t2.exports = n2;
2446
+ });
2447
+ var rs = _((e2, t2) => {
2448
+ var n2 = $a(), r2 = es(), i2 = uo(), a2 = $o(), o2 = ts(), s2 = ns(), c2 = 1, l2 = 2, u2 = `[object Boolean]`, d2 = `[object Date]`, f2 = `[object Error]`, p2 = `[object Map]`, m2 = `[object Number]`, h2 = `[object RegExp]`, g2 = `[object Set]`, _2 = `[object String]`, v2 = `[object Symbol]`, y2 = `[object ArrayBuffer]`, b2 = `[object DataView]`, x2 = n2 ? n2.prototype : void 0, S2 = x2 ? x2.valueOf : void 0;
2449
+ function C2(e3, t3, n3, x3, C3, w2, T2) {
2450
+ switch (n3) {
2451
+ case b2:
2452
+ if (e3.byteLength != t3.byteLength || e3.byteOffset != t3.byteOffset) return false;
2453
+ e3 = e3.buffer, t3 = t3.buffer;
2454
+ case y2:
2455
+ return !(e3.byteLength != t3.byteLength || !w2(new r2(e3), new r2(t3)));
2456
+ case u2:
2457
+ case d2:
2458
+ case m2:
2459
+ return i2(+e3, +t3);
2460
+ case f2:
2461
+ return e3.name == t3.name && e3.message == t3.message;
2462
+ case h2:
2463
+ case _2:
2464
+ return e3 == t3 + ``;
2465
+ case p2:
2466
+ var E2 = o2;
2467
+ case g2:
2468
+ var D2 = x3 & c2;
2469
+ if (E2 ||= s2, e3.size != t3.size && !D2) return false;
2470
+ var O2 = T2.get(e3);
2471
+ if (O2) return O2 == t3;
2472
+ x3 |= l2, T2.set(e3, t3);
2473
+ var k2 = a2(E2(e3), E2(t3), x3, C3, w2, T2);
2474
+ return T2.delete(e3), k2;
2475
+ case v2:
2476
+ if (S2) return S2.call(e3) == S2.call(t3);
2477
+ }
2478
+ return false;
2479
+ }
2480
+ t2.exports = C2;
2481
+ });
2482
+ var is = _((e2, t2) => {
2483
+ function n2(e3, t3) {
2484
+ for (var n3 = -1, r2 = t3.length, i2 = e3.length; ++n3 < r2; ) e3[i2 + n3] = t3[n3];
2485
+ return e3;
2486
+ }
2487
+ t2.exports = n2;
2488
+ });
2489
+ var Z = _((e2, t2) => {
2490
+ t2.exports = Array.isArray;
2491
+ });
2492
+ var as = _((e2, t2) => {
2493
+ var n2 = is(), r2 = Z();
2494
+ function i2(e3, t3, i3) {
2495
+ var a2 = t3(e3);
2496
+ return r2(e3) ? a2 : n2(a2, i3(e3));
2497
+ }
2498
+ t2.exports = i2;
2499
+ });
2500
+ var os = _((e2, t2) => {
2501
+ function n2(e3, t3) {
2502
+ for (var n3 = -1, r2 = e3 == null ? 0 : e3.length, i2 = 0, a2 = []; ++n3 < r2; ) {
2503
+ var o2 = e3[n3];
2504
+ t3(o2, n3, e3) && (a2[i2++] = o2);
2505
+ }
2506
+ return a2;
2507
+ }
2508
+ t2.exports = n2;
2509
+ });
2510
+ var ss = _((e2, t2) => {
2511
+ function n2() {
2512
+ return [];
2513
+ }
2514
+ t2.exports = n2;
2515
+ });
2516
+ var cs = _((e2, t2) => {
2517
+ var n2 = os(), r2 = ss(), i2 = Object.prototype.propertyIsEnumerable, a2 = Object.getOwnPropertySymbols;
2518
+ t2.exports = a2 ? function(e3) {
2519
+ return e3 == null ? [] : (e3 = Object(e3), n2(a2(e3), function(t3) {
2520
+ return i2.call(e3, t3);
2521
+ }));
2522
+ } : r2;
2523
+ });
2524
+ var ls = _((e2, t2) => {
2525
+ function n2(e3, t3) {
2526
+ for (var n3 = -1, r2 = Array(e3); ++n3 < e3; ) r2[n3] = t3(n3);
2527
+ return r2;
2528
+ }
2529
+ t2.exports = n2;
2530
+ });
2531
+ var us = _((e2, t2) => {
2532
+ var n2 = no(), r2 = ro(), i2 = `[object Arguments]`;
2533
+ function a2(e3) {
2534
+ return r2(e3) && n2(e3) == i2;
2535
+ }
2536
+ t2.exports = a2;
2537
+ });
2538
+ var ds = _((e2, t2) => {
2539
+ var n2 = us(), r2 = ro(), i2 = Object.prototype, a2 = i2.hasOwnProperty, o2 = i2.propertyIsEnumerable;
2540
+ t2.exports = n2(/* @__PURE__ */ function() {
2541
+ return arguments;
2542
+ }()) ? n2 : function(e3) {
2543
+ return r2(e3) && a2.call(e3, `callee`) && !o2.call(e3, `callee`);
2544
+ };
2545
+ });
2546
+ var fs = _((e2, t2) => {
2547
+ function n2() {
2548
+ return false;
2549
+ }
2550
+ t2.exports = n2;
2551
+ });
2552
+ var ps = _((e2, t2) => {
2553
+ var n2 = X(), r2 = fs(), i2 = typeof e2 == `object` && e2 && !e2.nodeType && e2, a2 = i2 && typeof t2 == `object` && t2 && !t2.nodeType && t2, o2 = a2 && a2.exports === i2 ? n2.Buffer : void 0;
2554
+ t2.exports = (o2 ? o2.isBuffer : void 0) || r2;
2555
+ });
2556
+ var ms = _((e2, t2) => {
2557
+ var n2 = /^(?:0|[1-9]\d*)$/;
2558
+ function r2(e3, t3) {
2559
+ var r3 = typeof e3;
2560
+ return t3 ??= 9007199254740991, !!t3 && (r3 == `number` || r3 != `symbol` && n2.test(e3)) && e3 > -1 && e3 % 1 == 0 && e3 < t3;
2561
+ }
2562
+ t2.exports = r2;
2563
+ });
2564
+ var hs = _((e2, t2) => {
2565
+ function n2(e3) {
2566
+ return typeof e3 == `number` && e3 > -1 && e3 % 1 == 0 && e3 <= 9007199254740991;
2567
+ }
2568
+ t2.exports = n2;
2569
+ });
2570
+ var gs = _((e2, t2) => {
2571
+ var n2 = no(), r2 = hs(), i2 = ro(), a2 = `[object Arguments]`, o2 = `[object Array]`, s2 = `[object Boolean]`, c2 = `[object Date]`, l2 = `[object Error]`, u2 = `[object Function]`, d2 = `[object Map]`, f2 = `[object Number]`, p2 = `[object Object]`, m2 = `[object RegExp]`, h2 = `[object Set]`, g2 = `[object String]`, _2 = `[object WeakMap]`, v2 = `[object ArrayBuffer]`, y2 = `[object DataView]`, b2 = `[object Float32Array]`, x2 = `[object Float64Array]`, S2 = `[object Int8Array]`, C2 = `[object Int16Array]`, w2 = `[object Int32Array]`, T2 = `[object Uint8Array]`, E2 = `[object Uint8ClampedArray]`, D2 = `[object Uint16Array]`, O2 = `[object Uint32Array]`, k2 = {};
2572
+ k2[b2] = k2[x2] = k2[S2] = k2[C2] = k2[w2] = k2[T2] = k2[E2] = k2[D2] = k2[O2] = true, k2[a2] = k2[o2] = k2[v2] = k2[s2] = k2[y2] = k2[c2] = k2[l2] = k2[u2] = k2[d2] = k2[f2] = k2[p2] = k2[m2] = k2[h2] = k2[g2] = k2[_2] = false;
2573
+ function ee2(e3) {
2574
+ return i2(e3) && r2(e3.length) && !!k2[n2(e3)];
2575
+ }
2576
+ t2.exports = ee2;
2577
+ });
2578
+ var _s = _((e2, t2) => {
2579
+ function n2(e3) {
2580
+ return function(t3) {
2581
+ return e3(t3);
2582
+ };
2583
+ }
2584
+ t2.exports = n2;
2585
+ });
2586
+ var vs = _((e2, t2) => {
2587
+ var n2 = Qa(), r2 = typeof e2 == `object` && e2 && !e2.nodeType && e2, i2 = r2 && typeof t2 == `object` && t2 && !t2.nodeType && t2, a2 = i2 && i2.exports === r2 && n2.process;
2588
+ t2.exports = function() {
2589
+ try {
2590
+ return i2 && i2.require && i2.require(`util`).types || a2 && a2.binding && a2.binding(`util`);
2591
+ } catch {
2592
+ }
2593
+ }();
2594
+ });
2595
+ var ys = _((e2, t2) => {
2596
+ var n2 = gs(), r2 = _s(), i2 = vs(), a2 = i2 && i2.isTypedArray;
2597
+ t2.exports = a2 ? r2(a2) : n2;
2598
+ });
2599
+ var bs = _((e2, t2) => {
2600
+ var n2 = ls(), r2 = ds(), i2 = Z(), a2 = ps(), o2 = ms(), s2 = ys(), c2 = Object.prototype.hasOwnProperty;
2601
+ function l2(e3, t3) {
2602
+ var l3 = i2(e3), u2 = !l3 && r2(e3), d2 = !l3 && !u2 && a2(e3), f2 = !l3 && !u2 && !d2 && s2(e3), p2 = l3 || u2 || d2 || f2, m2 = p2 ? n2(e3.length, String) : [], h2 = m2.length;
2603
+ for (var g2 in e3) (t3 || c2.call(e3, g2)) && !(p2 && (g2 == `length` || d2 && (g2 == `offset` || g2 == `parent`) || f2 && (g2 == `buffer` || g2 == `byteLength` || g2 == `byteOffset`) || o2(g2, h2))) && m2.push(g2);
2604
+ return m2;
2605
+ }
2606
+ t2.exports = l2;
2607
+ });
2608
+ var xs = _((e2, t2) => {
2609
+ var n2 = Object.prototype;
2610
+ function r2(e3) {
2611
+ var t3 = e3 && e3.constructor;
2612
+ return e3 === (typeof t3 == `function` && t3.prototype || n2);
2613
+ }
2614
+ t2.exports = r2;
2615
+ });
2616
+ var Ss = _((e2, t2) => {
2617
+ function n2(e3, t3) {
2618
+ return function(n3) {
2619
+ return e3(t3(n3));
2620
+ };
2621
+ }
2622
+ t2.exports = n2;
2623
+ });
2624
+ var Cs = _((e2, t2) => {
2625
+ t2.exports = Ss()(Object.keys, Object);
2626
+ });
2627
+ var ws = _((e2, t2) => {
2628
+ var n2 = xs(), r2 = Cs(), i2 = Object.prototype.hasOwnProperty;
2629
+ function a2(e3) {
2630
+ if (!n2(e3)) return r2(e3);
2631
+ var t3 = [];
2632
+ for (var a3 in Object(e3)) i2.call(e3, a3) && a3 != `constructor` && t3.push(a3);
2633
+ return t3;
2634
+ }
2635
+ t2.exports = a2;
2636
+ });
2637
+ var Ts = _((e2, t2) => {
2638
+ var n2 = Co(), r2 = hs();
2639
+ function i2(e3) {
2640
+ return e3 != null && r2(e3.length) && !n2(e3);
2641
+ }
2642
+ t2.exports = i2;
2643
+ });
2644
+ var Es = _((e2, t2) => {
2645
+ var n2 = bs(), r2 = ws(), i2 = Ts();
2646
+ function a2(e3) {
2647
+ return i2(e3) ? n2(e3) : r2(e3);
2648
+ }
2649
+ t2.exports = a2;
2650
+ });
2651
+ var Ds = _((e2, t2) => {
2652
+ var n2 = as(), r2 = cs(), i2 = Es();
2653
+ function a2(e3) {
2654
+ return n2(e3, i2, r2);
2655
+ }
2656
+ t2.exports = a2;
2657
+ });
2658
+ var Os = _((e2, t2) => {
2659
+ var n2 = Ds(), r2 = 1, i2 = Object.prototype.hasOwnProperty;
2660
+ function a2(e3, t3, a3, o2, s2, c2) {
2661
+ var l2 = a3 & r2, u2 = n2(e3), d2 = u2.length;
2662
+ if (d2 != n2(t3).length && !l2) return false;
2663
+ for (var f2 = d2; f2--; ) {
2664
+ var p2 = u2[f2];
2665
+ if (!(l2 ? p2 in t3 : i2.call(t3, p2))) return false;
2666
+ }
2667
+ var m2 = c2.get(e3), h2 = c2.get(t3);
2668
+ if (m2 && h2) return m2 == t3 && h2 == e3;
2669
+ var g2 = true;
2670
+ c2.set(e3, t3), c2.set(t3, e3);
2671
+ for (var _2 = l2; ++f2 < d2; ) {
2672
+ p2 = u2[f2];
2673
+ var v2 = e3[p2], y2 = t3[p2];
2674
+ if (o2) var b2 = l2 ? o2(y2, v2, p2, t3, e3, c2) : o2(v2, y2, p2, e3, t3, c2);
2675
+ if (!(b2 === void 0 ? v2 === y2 || s2(v2, y2, a3, o2, c2) : b2)) {
2676
+ g2 = false;
2677
+ break;
2678
+ }
2679
+ _2 ||= p2 == `constructor`;
2680
+ }
2681
+ if (g2 && !_2) {
2682
+ var x2 = e3.constructor, S2 = t3.constructor;
2683
+ x2 != S2 && `constructor` in e3 && `constructor` in t3 && !(typeof x2 == `function` && x2 instanceof x2 && typeof S2 == `function` && S2 instanceof S2) && (g2 = false);
2684
+ }
2685
+ return c2.delete(e3), c2.delete(t3), g2;
2686
+ }
2687
+ t2.exports = a2;
2688
+ });
2689
+ var ks = _((e2, t2) => {
2690
+ t2.exports = ko()(X(), `DataView`);
2691
+ });
2692
+ var As = _((e2, t2) => {
2693
+ t2.exports = ko()(X(), `Promise`);
2694
+ });
2695
+ var js = _((e2, t2) => {
2696
+ t2.exports = ko()(X(), `Set`);
2697
+ });
2698
+ var Ms = _((e2, t2) => {
2699
+ t2.exports = ko()(X(), `WeakMap`);
2700
+ });
2701
+ var Ns = _((e2, t2) => {
2702
+ var n2 = ks(), r2 = Ao(), i2 = As(), a2 = js(), o2 = Ms(), s2 = no(), c2 = Eo(), l2 = `[object Map]`, u2 = `[object Object]`, d2 = `[object Promise]`, f2 = `[object Set]`, p2 = `[object WeakMap]`, m2 = `[object DataView]`, h2 = c2(n2), g2 = c2(r2), _2 = c2(i2), v2 = c2(a2), y2 = c2(o2), b2 = s2;
2703
+ (n2 && b2(new n2(new ArrayBuffer(1))) != m2 || r2 && b2(new r2()) != l2 || i2 && b2(i2.resolve()) != d2 || a2 && b2(new a2()) != f2 || o2 && b2(new o2()) != p2) && (b2 = function(e3) {
2704
+ var t3 = s2(e3), n3 = t3 == u2 ? e3.constructor : void 0, r3 = n3 ? c2(n3) : ``;
2705
+ if (r3) switch (r3) {
2706
+ case h2:
2707
+ return m2;
2708
+ case g2:
2709
+ return l2;
2710
+ case _2:
2711
+ return d2;
2712
+ case v2:
2713
+ return f2;
2714
+ case y2:
2715
+ return p2;
2716
+ }
2717
+ return t3;
2718
+ }), t2.exports = b2;
2719
+ });
2720
+ var Ps = _((e2, t2) => {
2721
+ var n2 = qo(), r2 = $o(), i2 = rs(), a2 = Os(), o2 = Ns(), s2 = Z(), c2 = ps(), l2 = ys(), u2 = 1, d2 = `[object Arguments]`, f2 = `[object Array]`, p2 = `[object Object]`, m2 = Object.prototype.hasOwnProperty;
2722
+ function h2(e3, t3, h3, g2, _2, v2) {
2723
+ var y2 = s2(e3), b2 = s2(t3), x2 = y2 ? f2 : o2(e3), S2 = b2 ? f2 : o2(t3);
2724
+ x2 = x2 == d2 ? p2 : x2, S2 = S2 == d2 ? p2 : S2;
2725
+ var C2 = x2 == p2, w2 = S2 == p2, T2 = x2 == S2;
2726
+ if (T2 && c2(e3)) {
2727
+ if (!c2(t3)) return false;
2728
+ y2 = true, C2 = false;
2729
+ }
2730
+ if (T2 && !C2) return v2 ||= new n2(), y2 || l2(e3) ? r2(e3, t3, h3, g2, _2, v2) : i2(e3, t3, x2, h3, g2, _2, v2);
2731
+ if (!(h3 & u2)) {
2732
+ var E2 = C2 && m2.call(e3, `__wrapped__`), D2 = w2 && m2.call(t3, `__wrapped__`);
2733
+ if (E2 || D2) {
2734
+ var O2 = E2 ? e3.value() : e3, k2 = D2 ? t3.value() : t3;
2735
+ return v2 ||= new n2(), _2(O2, k2, h3, g2, v2);
2736
+ }
2737
+ }
2738
+ return T2 ? (v2 ||= new n2(), a2(e3, t3, h3, g2, _2, v2)) : false;
2739
+ }
2740
+ t2.exports = h2;
2741
+ });
2742
+ var Fs = _((e2, t2) => {
2743
+ var n2 = Ps(), r2 = ro();
2744
+ function i2(e3, t3, a2, o2, s2) {
2745
+ return e3 === t3 ? true : e3 == null || t3 == null || !r2(e3) && !r2(t3) ? e3 !== e3 && t3 !== t3 : n2(e3, t3, a2, o2, i2, s2);
2746
+ }
2747
+ t2.exports = i2;
2748
+ });
2749
+ var Is = _((e2, t2) => {
2750
+ var n2 = qo(), r2 = Fs(), i2 = 1, a2 = 2;
2751
+ function o2(e3, t3, o3, s2) {
2752
+ var c2 = o3.length, l2 = c2, u2 = !s2;
2753
+ if (e3 == null) return !l2;
2754
+ for (e3 = Object(e3); c2--; ) {
2755
+ var d2 = o3[c2];
2756
+ if (u2 && d2[2] ? d2[1] !== e3[d2[0]] : !(d2[0] in e3)) return false;
2757
+ }
2758
+ for (; ++c2 < l2; ) {
2759
+ d2 = o3[c2];
2760
+ var f2 = d2[0], p2 = e3[f2], m2 = d2[1];
2761
+ if (u2 && d2[2]) {
2762
+ if (p2 === void 0 && !(f2 in e3)) return false;
2763
+ } else {
2764
+ var h2 = new n2();
2765
+ if (s2) var g2 = s2(p2, m2, f2, e3, t3, h2);
2766
+ if (!(g2 === void 0 ? r2(m2, p2, i2 | a2, s2, h2) : g2)) return false;
2767
+ }
2768
+ }
2769
+ return true;
2770
+ }
2771
+ t2.exports = o2;
2772
+ });
2773
+ var Ls = _((e2, t2) => {
2774
+ var n2 = So();
2775
+ function r2(e3) {
2776
+ return e3 === e3 && !n2(e3);
2777
+ }
2778
+ t2.exports = r2;
2779
+ });
2780
+ var Rs = _((e2, t2) => {
2781
+ var n2 = Ls(), r2 = Es();
2782
+ function i2(e3) {
2783
+ for (var t3 = r2(e3), i3 = t3.length; i3--; ) {
2784
+ var a2 = t3[i3], o2 = e3[a2];
2785
+ t3[i3] = [a2, o2, n2(o2)];
2786
+ }
2787
+ return t3;
2788
+ }
2789
+ t2.exports = i2;
2790
+ });
2791
+ var zs = _((e2, t2) => {
2792
+ function n2(e3, t3) {
2793
+ return function(n3) {
2794
+ return n3 != null && n3[e3] === t3 && (t3 !== void 0 || e3 in Object(n3));
2795
+ };
2796
+ }
2797
+ t2.exports = n2;
2798
+ });
2799
+ var Bs = _((e2, t2) => {
2800
+ var n2 = Is(), r2 = Rs(), i2 = zs();
2801
+ function a2(e3) {
2802
+ var t3 = r2(e3);
2803
+ return t3.length == 1 && t3[0][2] ? i2(t3[0][0], t3[0][1]) : function(r3) {
2804
+ return r3 === e3 || n2(r3, e3, t3);
2805
+ };
2806
+ }
2807
+ t2.exports = a2;
2808
+ });
2809
+ var Vs = _((e2, t2) => {
2810
+ var n2 = Z(), r2 = io(), i2 = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, a2 = /^\w*$/;
2811
+ function o2(e3, t3) {
2812
+ if (n2(e3)) return false;
2813
+ var o3 = typeof e3;
2814
+ return o3 == `number` || o3 == `symbol` || o3 == `boolean` || e3 == null || r2(e3) ? true : a2.test(e3) || !i2.test(e3) || t3 != null && e3 in Object(t3);
2815
+ }
2816
+ t2.exports = o2;
2817
+ });
2818
+ var Hs = _((e2, t2) => {
2819
+ var n2 = Go(), r2 = `Expected a function`;
2820
+ function i2(e3, t3) {
2821
+ if (typeof e3 != `function` || t3 != null && typeof t3 != `function`) throw TypeError(r2);
2822
+ var a2 = function() {
2823
+ var n3 = arguments, r3 = t3 ? t3.apply(this, n3) : n3[0], i3 = a2.cache;
2824
+ if (i3.has(r3)) return i3.get(r3);
2825
+ var o2 = e3.apply(this, n3);
2826
+ return a2.cache = i3.set(r3, o2) || i3, o2;
2827
+ };
2828
+ return a2.cache = new (i2.Cache || n2)(), a2;
2829
+ }
2830
+ i2.Cache = n2, t2.exports = i2;
2831
+ });
2832
+ var Us = _((e2, t2) => {
2833
+ var n2 = Hs(), r2 = 500;
2834
+ function i2(e3) {
2835
+ var t3 = n2(e3, function(e4) {
2836
+ return i3.size === r2 && i3.clear(), e4;
2837
+ }), i3 = t3.cache;
2838
+ return t3;
2839
+ }
2840
+ t2.exports = i2;
2841
+ });
2842
+ var Ws = _((e2, t2) => {
2843
+ var n2 = Us(), r2 = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, i2 = /\\(\\)?/g;
2844
+ t2.exports = n2(function(e3) {
2845
+ var t3 = [];
2846
+ return e3.charCodeAt(0) === 46 && t3.push(``), e3.replace(r2, function(e4, n3, r3, a2) {
2847
+ t3.push(r3 ? a2.replace(i2, `$1`) : n3 || e4);
2848
+ }), t3;
2849
+ });
2850
+ });
2851
+ var Gs = _((e2, t2) => {
2852
+ function n2(e3, t3) {
2853
+ for (var n3 = -1, r2 = e3 == null ? 0 : e3.length, i2 = Array(r2); ++n3 < r2; ) i2[n3] = t3(e3[n3], n3, e3);
2854
+ return i2;
2855
+ }
2856
+ t2.exports = n2;
2857
+ });
2858
+ var Ks = _((e2, t2) => {
2859
+ var n2 = $a(), r2 = Gs(), i2 = Z(), a2 = io(), o2 = 1 / 0, s2 = n2 ? n2.prototype : void 0, c2 = s2 ? s2.toString : void 0;
2860
+ function l2(e3) {
2861
+ if (typeof e3 == `string`) return e3;
2862
+ if (i2(e3)) return r2(e3, l2) + ``;
2863
+ if (a2(e3)) return c2 ? c2.call(e3) : ``;
2864
+ var t3 = e3 + ``;
2865
+ return t3 == `0` && 1 / e3 == -o2 ? `-0` : t3;
2866
+ }
2867
+ t2.exports = l2;
2868
+ });
2869
+ var qs = _((e2, t2) => {
2870
+ var n2 = Ks();
2871
+ function r2(e3) {
2872
+ return e3 == null ? `` : n2(e3);
2873
+ }
2874
+ t2.exports = r2;
2875
+ });
2876
+ var Js = _((e2, t2) => {
2877
+ var n2 = Z(), r2 = Vs(), i2 = Ws(), a2 = qs();
2878
+ function o2(e3, t3) {
2879
+ return n2(e3) ? e3 : r2(e3, t3) ? [e3] : i2(a2(e3));
2880
+ }
2881
+ t2.exports = o2;
2882
+ });
2883
+ var Ys = _((e2, t2) => {
2884
+ var n2 = io(), r2 = 1 / 0;
2885
+ function i2(e3) {
2886
+ if (typeof e3 == `string` || n2(e3)) return e3;
2887
+ var t3 = e3 + ``;
2888
+ return t3 == `0` && 1 / e3 == -r2 ? `-0` : t3;
2889
+ }
2890
+ t2.exports = i2;
2891
+ });
2892
+ var Xs = _((e2, t2) => {
2893
+ var n2 = Js(), r2 = Ys();
2894
+ function i2(e3, t3) {
2895
+ t3 = n2(t3, e3);
2896
+ for (var i3 = 0, a2 = t3.length; e3 != null && i3 < a2; ) e3 = e3[r2(t3[i3++])];
2897
+ return i3 && i3 == a2 ? e3 : void 0;
2898
+ }
2899
+ t2.exports = i2;
2900
+ });
2901
+ var Zs = _((e2, t2) => {
2902
+ var n2 = Xs();
2903
+ function r2(e3, t3, r3) {
2904
+ var i2 = e3 == null ? void 0 : n2(e3, t3);
2905
+ return i2 === void 0 ? r3 : i2;
2906
+ }
2907
+ t2.exports = r2;
2908
+ });
2909
+ var Qs = _((e2, t2) => {
2910
+ function n2(e3, t3) {
2911
+ return e3 != null && t3 in Object(e3);
2912
+ }
2913
+ t2.exports = n2;
2914
+ });
2915
+ var $s = _((e2, t2) => {
2916
+ var n2 = Js(), r2 = ds(), i2 = Z(), a2 = ms(), o2 = hs(), s2 = Ys();
2917
+ function c2(e3, t3, c3) {
2918
+ t3 = n2(t3, e3);
2919
+ for (var l2 = -1, u2 = t3.length, d2 = false; ++l2 < u2; ) {
2920
+ var f2 = s2(t3[l2]);
2921
+ if (!(d2 = e3 != null && c3(e3, f2))) break;
2922
+ e3 = e3[f2];
2923
+ }
2924
+ return d2 || ++l2 != u2 ? d2 : (u2 = e3 == null ? 0 : e3.length, !!u2 && o2(u2) && a2(f2, u2) && (i2(e3) || r2(e3)));
2925
+ }
2926
+ t2.exports = c2;
2927
+ });
2928
+ var ec = _((e2, t2) => {
2929
+ var n2 = Qs(), r2 = $s();
2930
+ function i2(e3, t3) {
2931
+ return e3 != null && r2(e3, t3, n2);
2932
+ }
2933
+ t2.exports = i2;
2934
+ });
2935
+ var tc = _((e2, t2) => {
2936
+ var n2 = Fs(), r2 = Zs(), i2 = ec(), a2 = Vs(), o2 = Ls(), s2 = zs(), c2 = Ys(), l2 = 1, u2 = 2;
2937
+ function d2(e3, t3) {
2938
+ return a2(e3) && o2(t3) ? s2(c2(e3), t3) : function(a3) {
2939
+ var o3 = r2(a3, e3);
2940
+ return o3 === void 0 && o3 === t3 ? i2(a3, e3) : n2(t3, o3, l2 | u2);
2941
+ };
2942
+ }
2943
+ t2.exports = d2;
2944
+ });
2945
+ var nc = _((e2, t2) => {
2946
+ function n2(e3) {
2947
+ return function(t3) {
2948
+ return t3?.[e3];
2949
+ };
2950
+ }
2951
+ t2.exports = n2;
2952
+ });
2953
+ var rc = _((e2, t2) => {
2954
+ var n2 = Xs();
2955
+ function r2(e3) {
2956
+ return function(t3) {
2957
+ return n2(t3, e3);
2958
+ };
2959
+ }
2960
+ t2.exports = r2;
2961
+ });
2962
+ var ic = _((e2, t2) => {
2963
+ var n2 = nc(), r2 = rc(), i2 = Vs(), a2 = Ys();
2964
+ function o2(e3) {
2965
+ return i2(e3) ? n2(a2(e3)) : r2(e3);
2966
+ }
2967
+ t2.exports = o2;
2968
+ });
2969
+ var ac = _((e2, t2) => {
2970
+ var n2 = Bs(), r2 = tc(), i2 = so(), a2 = Z(), o2 = ic();
2971
+ function s2(e3) {
2972
+ return typeof e3 == `function` ? e3 : e3 == null ? i2 : typeof e3 == `object` ? a2(e3) ? r2(e3[0], e3[1]) : n2(e3) : o2(e3);
2973
+ }
2974
+ t2.exports = s2;
2975
+ });
2976
+ var oc = _((e2, t2) => {
2977
+ var n2 = ao(), r2 = oo(), i2 = ac();
2978
+ function a2(e3, t3) {
2979
+ return e3 && e3.length ? n2(e3, i2(t3, 2), r2) : void 0;
2980
+ }
2981
+ t2.exports = a2;
2982
+ });
2983
+ var sc = _((e2, t2) => {
2984
+ function n2(e3, t3) {
2985
+ return e3 < t3;
2986
+ }
2987
+ t2.exports = n2;
2988
+ });
2989
+ var cc = _((e2, t2) => {
2990
+ var n2 = ao(), r2 = sc(), i2 = so();
2991
+ function a2(e3) {
2992
+ return e3 && e3.length ? n2(e3, i2, r2) : void 0;
2993
+ }
2994
+ t2.exports = a2;
2995
+ });
2996
+ var lc = _((e2, t2) => {
2997
+ var n2 = ao(), r2 = ac(), i2 = sc();
2998
+ function a2(e3, t3) {
2999
+ return e3 && e3.length ? n2(e3, r2(t3, 2), i2) : void 0;
3000
+ }
3001
+ t2.exports = a2;
3002
+ });
3003
+ var uc = y(co(), 1);
3004
+ var dc = y(oc(), 1);
3005
+ var fc = y(cc(), 1);
3006
+ var pc = y(lc(), 1);
3007
+ var mc = ({ price: e2 }) => e2.actualPrice;
3008
+ function hc(e2) {
3009
+ return e2.priceAfterDiscount === void 0 ? { currentSellingPrice: e2.actualPrice, priceBeforeDiscount: e2.compareAtPrice, pricePerUnit: e2.pricePerUnit } : { currentSellingPrice: e2.priceAfterDiscount, priceBeforeDiscount: e2.actualPrice, pricePerUnit: e2.pricePerUnit };
3010
+ }
3011
+ function gc(e2, t2) {
3012
+ let n2 = e2.subscriptionPrices.find((e3) => e3.subscriptionId === t2);
3013
+ if (!n2) throw Error(`Missing subscription price for plan ${t2} on variant ${e2.id}`);
3014
+ let r2 = n2.price;
3015
+ return { currentSellingPrice: r2, priceBeforeDiscount: r2 < e2.price.actualPrice ? e2.price.actualPrice : void 0 };
3016
+ }
3017
+ function _c(e2) {
3018
+ let t2 = (0, pc.default)(e2, mc), n2 = (0, dc.default)(e2, mc), r2 = e2.map(({ price: e3 }) => hc(e3)), i2 = hc(t2.price), a2 = hc(n2.price), o2 = r2.flatMap(({ priceBeforeDiscount: e3 }) => e3 === void 0 ? [] : [e3]);
3019
+ return { minCurrentSellingPrice: i2.currentSellingPrice, maxCurrentSellingPrice: a2.currentSellingPrice, minPriceBeforeDiscount: (0, fc.default)(o2), maxPriceBeforeDiscount: (0, uc.default)(o2), minPricePerUnit: i2.pricePerUnit, maxPricePerUnit: a2.pricePerUnit };
3020
+ }
3021
+ function vc(e2, t2) {
3022
+ return e2.subscriptionDetails.subscriptions.map((e3) => ({ subscription: e3, price: gc(t2, e3.id) }));
3023
+ }
3024
+ function yc(e2) {
3025
+ return { productPrice: { currentSellingPrice: void 0 }, subscriptionPlanPrices: e2.subscriptionDetails.subscriptions.map((e3) => ({ subscription: e3, price: { currentSellingPrice: void 0 } })), productPriceRange: { minCurrentSellingPrice: void 0, maxCurrentSellingPrice: void 0 } };
3026
+ }
3027
+ function bc(e2) {
3028
+ if (!e2.minPriceVariant) return yc(e2);
3029
+ let t2 = hc(e2.minPriceVariant.price), n2 = e2.minPriceVariant.price.priceAfterDiscount !== void 0;
3030
+ return { productPrice: t2, subscriptionPlanPrices: e2.subscriptionDetails.subscriptions.map((e3) => ({ subscription: e3, price: {} })), productPriceRange: { minCurrentSellingPrice: t2.currentSellingPrice, maxCurrentSellingPrice: n2 ? void 0 : e2.priceRange.maxActualPrice, minPriceBeforeDiscount: t2.priceBeforeDiscount, maxPriceBeforeDiscount: n2 ? e2.priceRange.maxActualPrice : e2.priceRange.maxCompareAtPrice, minPricePerUnit: t2.pricePerUnit } };
3031
+ }
3032
+ function xc(e2, t2, n2) {
3033
+ if (!n2) return bc(e2);
3034
+ let r2 = (0, pc.default)(e2.variants, mc), i2 = t2 ?? r2;
3035
+ return i2 ? { productPrice: hc(i2.price), subscriptionPlanPrices: vc(e2, i2), productPriceRange: _c(e2.variants) } : yc(e2);
3036
+ }
3037
+ function Sc(e2, t2) {
3038
+ let n2 = e2.subscriptionPlanPrices.find(({ subscription: e3 }) => e3.id === t2);
3039
+ return n2 ? { currentSellingPrice: n2.price.currentSellingPrice, priceBeforeDiscount: n2.price.priceBeforeDiscount, pricePerUnit: e2.productPrice.pricePerUnit } : e2.productPrice;
3040
+ }
3041
+ function Cc(e2) {
3042
+ return hc(e2.price).currentSellingPrice;
3043
+ }
3044
+ var wc = `BACK_IN_STOCK_NOTIFICATION_REQUEST_ALREADY_EXISTS`;
3045
+ function Tc(e2) {
3046
+ return e2?.details?.applicationError?.code ?? `UNKNOWN`;
3047
+ }
3048
+ function Ec(e2) {
3049
+ return { code: Tc(e2), message: e2?.message };
3050
+ }
3051
+ async function Dc(e2) {
3052
+ let { productId: t2, variantId: n2, email: r2, name: i2, price: a2, imageUrl: o2 } = e2;
3053
+ try {
3054
+ return await ea({ catalogReference: { catalogItemId: t2, appId: wa, ...n2 ? { options: { variantId: n2 } } : {} }, email: r2 }, { name: i2, price: String(a2), ...o2 ? { image: o2 } : {} }), `created`;
3055
+ } catch (e3) {
3056
+ if (Tc(e3) === wc) return `already-subscribed`;
3057
+ throw Ec(e3);
3058
+ }
3059
+ }
3060
+ var Oc = (e2) => e2.media.type === `image`;
3061
+ function kc(e2, t2) {
3062
+ let n2 = t2.choices[e2.id];
3063
+ return e2.choices.find((e3) => e3.choiceId === n2);
3064
+ }
3065
+ function Ac(e2, t2) {
3066
+ let n2 = e2.options.map((e3) => kc(e3, t2)?.mediaIds).filter((e3) => !!(e3 && e3.length > 0));
3067
+ if (n2.length === 0) return;
3068
+ let r2 = n2.reduce((e3, t3) => e3.filter((e4) => t3.includes(e4))), i2 = r2.length > 0 ? r2 : n2.flat(), a2 = /* @__PURE__ */ new Map();
3069
+ for (let t3 of e2.media ?? []) Oc(t3) && a2.set(t3.id, t3);
3070
+ for (let e3 of i2) {
3071
+ let t3 = a2.get(e3)?.media.src;
3072
+ if (t3) return t3;
3073
+ }
3074
+ }
3075
+ function jc(e2, t2) {
3076
+ let n2 = [t2 ? Ac(e2, t2) : void 0, e2.media?.find(Oc)?.media.src];
3077
+ for (let e3 of n2) {
3078
+ let t3 = mi(e3);
3079
+ if (t3) return t3;
3080
+ }
3081
+ }
3082
+ function Mc(e2, r2) {
3083
+ let i2 = (0, import_react.useCallback)((t2) => r2 ? Dc({ productId: e2.id, variantId: r2.id, email: t2, name: e2.name ?? ``, price: Cc(r2), imageUrl: jc(e2, r2) }) : Promise.reject(Error(`Cannot create a back-in-stock notification without a selected variant`)), [e2, r2]);
3084
+ return (0, import_react.useMemo)(() => ({ handleNotifyMe: i2 }), [i2]);
3085
+ }
3086
+ function Nc(e2, t2) {
3087
+ return (0, import_react.useMemo)(() => ({ id: e2.id, name: e2.name, description: e2.description, ribbons: e2.ribbons, breadcrumbs: e2.breadcrumbs, mainCategoryId: e2.mainCategoryId, categories: e2.categories, infoSections: e2.infoSections, sku: t2?.sku, discountRules: e2.discountRuleNames?.map((e3) => ({ name: e3 })) }), [e2, t2]);
3088
+ }
3089
+ function Pc(e2) {
3090
+ return { type: `image`, src: e2.url, width: e2.width, height: e2.height, ...e2.name === void 0 ? {} : { title: e2.name }, ...e2.alt === void 0 ? {} : { parameters: { alt: e2.alt } } };
3091
+ }
3092
+ var Fc = `11062b_7b9f1e3756b64285ad5cf5e244b4ae77~mv2.png`;
3093
+ var Ic = { uri: Fc, url: `https://static.wixstatic.com/media/${Fc}`, width: 460, height: 460 };
3094
+ var Lc = [Pc(Ic)];
3095
+ function Rc(e2, t2, n2) {
3096
+ let r2 = Vc(e2, zc(e2, t2, n2));
3097
+ return r2.length > 0 ? r2 : e2.media ?? [];
3098
+ }
3099
+ function zc(e2, t2, n2) {
3100
+ let r2 = e2.options.flatMap((e3) => Bc(e3.choices, t2[e3.id])), i2 = Object.values(e2.modifiers).flatMap((e3) => Bc(e3.choices, n2[e3.id]));
3101
+ return [.../* @__PURE__ */ new Set([...r2, ...i2])];
3102
+ }
3103
+ function Bc(e2, t2) {
3104
+ return e2?.find((e3) => e3.choiceId === t2)?.mediaIds ?? [];
3105
+ }
3106
+ function Vc(e2, t2) {
3107
+ let n2 = new Map((e2.media ?? []).map((e3) => [e3.id, e3]));
3108
+ return t2.flatMap((e3) => {
3109
+ let t3 = n2.get(e3);
3110
+ return t3 ? [t3] : [];
3111
+ });
3112
+ }
3113
+ function Hc(e2) {
3114
+ return e2.map((e3) => e3.id).join(`|`);
3115
+ }
3116
+ function Uc(e2) {
3117
+ return e2.length > 0 ? e2.map((e3) => e3.media) : Lc;
3118
+ }
3119
+ function Wc({ product: e2, selectedOptions: r2, selectedModifiers: a2 }) {
3120
+ let o2 = (0, import_react.useMemo)(() => Uc(e2.media ?? []), [e2.media]), s2 = e2.mainMedia ?? Ic, c2 = (0, import_react.useMemo)(() => Rc(e2, r2, a2), [e2, r2, a2]), l2 = (0, import_react.useMemo)(() => Uc(c2), [c2]), u2 = Hc(c2), [d2, f2] = (0, import_react.useState)(u2), [p2, m2] = (0, import_react.useState)(0);
3121
+ d2 !== u2 && (f2(u2), m2(0));
3122
+ let h2 = (0, import_react.useCallback)((e3) => m2(e3), []);
3123
+ return (0, import_react.useMemo)(() => ({ allMedia: o2, mainMedia: s2, media: l2, selectedMediaIndex: p2, selectMedia: h2 }), [o2, s2, l2, p2, h2]);
3124
+ }
3125
+ function Gc(e2) {
3126
+ return Object.entries(e2).map(([e3, t2]) => ({ optionId: e3, choiceId: t2 }));
3127
+ }
3128
+ function Kc(e2) {
3129
+ return Object.entries(e2).map(([e3, t2]) => ({ modifierId: e3, value: t2 }));
3130
+ }
3131
+ function qc(e2, t2, r2, i2 = false) {
3132
+ let { selectedVariant: a2 } = t2, o2 = Nc(e2, a2), s2 = Za(e2, a2), c2 = Wc({ product: e2, selectedOptions: t2.selectedOptions, selectedModifiers: t2.selectedModifiers }), l2 = Mc(e2, a2), { getPageAbsoluteUrl: u2 } = ja(), d2 = (0, import_react.useMemo)(() => {
3133
+ if (!e2.slug) return;
3134
+ let t3 = u2(J.PRODUCT_PAGE, e2.slug);
3135
+ return t3 ? { href: t3 } : void 0;
3136
+ }, [e2.slug, u2]);
3137
+ return (0, import_react.useMemo)(() => {
3138
+ let { selectedVariant: e3, setHasAttemptedSubmit: n2, isSelectionValid: a3, selectedOptions: u3, selectedModifiers: f2, selectedSubscriptionPlanId: p2, quantity: m2, ...h2 } = t2;
3139
+ return { ...o2, link: d2, ...r2, ...h2, buyerSelections: { options: Gc(u3), modifiers: Kc(f2), subscriptionPlanId: p2, quantity: m2 }, ...s2, ...c2, ...l2, isBackInStockEnabled: i2 };
3140
+ }, [o2, d2, r2, t2, s2, c2, l2, i2]);
3141
+ }
3142
+ var Jc = q(`@wix/viewer-service-environment`);
3143
+ function Yc() {
3144
+ return (0, import_services_manager_react.useService)(Jc).language;
3145
+ }
3146
+ var Xc = (e2) => {
3147
+ let t2 = e2?.maximumFractionDigits ?? 2;
3148
+ return (e3) => e3?.toFixed(t2);
3149
+ };
3150
+ var Zc = (e2, t2, n2) => {
3151
+ let r2 = new Intl.NumberFormat(t2, { style: `currency`, currency: e2, ...n2 });
3152
+ return (e3) => {
3153
+ if (e3 != null) return r2.format(e3);
3154
+ };
3155
+ };
3156
+ function Qc(e2, t2, n2) {
3157
+ return e2 ? Zc(e2, t2, n2) : Xc(n2);
3158
+ }
3159
+ function $c(e2, t2) {
3160
+ let r2 = Yc();
3161
+ return (0, import_react.useMemo)(() => Qc(e2, r2, t2), [e2, r2, t2]);
3162
+ }
3163
+ function Q(e2, t2) {
3164
+ return e2 === void 0 ? void 0 : { amount: e2, formattedAmount: t2(e2) };
3165
+ }
3166
+ function el(e2, t2, n2) {
3167
+ return { id: e2.id, name: e2.name, isOneTimePurchase: false, description: e2.description, currentPrice: Q(t2.currentSellingPrice, n2), originalPrice: Q(t2.priceBeforeDiscount, n2), frequency: e2.frequency, interval: e2.interval, duration: e2.billingCycles };
3168
+ }
3169
+ function tl(e2) {
3170
+ return e2 === void 0 ? void 0 : { description: e2.description };
3171
+ }
3172
+ function nl(e2, t2) {
3173
+ return { currentSellingPrice: Q(e2.currentSellingPrice, t2), priceBeforeDiscount: Q(e2.priceBeforeDiscount, t2), pricePerUnit: tl(e2.pricePerUnit) };
3174
+ }
3175
+ function rl(e2, t2) {
3176
+ return { minCurrentSellingPrice: Q(e2.minCurrentSellingPrice, t2), maxCurrentSellingPrice: Q(e2.maxCurrentSellingPrice, t2), minPriceBeforeDiscount: Q(e2.minPriceBeforeDiscount, t2), maxPriceBeforeDiscount: Q(e2.maxPriceBeforeDiscount, t2), minPricePerUnit: tl(e2.minPricePerUnit), maxPricePerUnit: tl(e2.maxPricePerUnit) };
3177
+ }
3178
+ function il(e2, t2, n2, r2) {
3179
+ if (e2.length === 0) return [];
3180
+ let i2 = e2.map(({ subscription: e3, price: t3 }) => el(e3, t3, r2));
3181
+ return t2 ? [{ id: gi, name: `One-time purchase`, isOneTimePurchase: true, currentPrice: Q(n2.currentSellingPrice, r2) }, ...i2] : i2;
3182
+ }
3183
+ function al({ product: e2, userInputs: t2, hasLoadedVariants: r2 }) {
3184
+ let { selectedVariant: i2, selectedSubscriptionPlanId: a2 } = t2, o2 = $c(e2.currency);
3185
+ return (0, import_react.useMemo)(() => {
3186
+ let t3 = xc(e2, i2, r2), n2 = { ...nl(Sc(t3, a2), o2), ...rl(t3.productPriceRange, o2) }, s2 = il(t3.subscriptionPlanPrices, e2.subscriptionDetails.allowOneTimePurchases, t3.productPrice, o2);
3187
+ return { currency: e2.currency, pricing: n2, subscriptionPlans: s2 };
3188
+ }, [e2, i2, a2, r2, o2]);
3189
+ }
3190
+ function ol(e2) {
3191
+ return Object.values(e2).toSorted().join(`_`);
3192
+ }
3193
+ function sl(e2) {
3194
+ let t2 = /* @__PURE__ */ new Map();
3195
+ for (let n2 of e2) t2.set(ol(n2.choices), n2);
3196
+ return t2;
3197
+ }
3198
+ function cl(e2, t2, n2) {
3199
+ let r2 = Object.keys(n2).length > 0, i2 = {};
3200
+ for (let a2 of e2) {
3201
+ i2[a2.id] = {};
3202
+ for (let e3 of a2.choices) {
3203
+ if (!r2) {
3204
+ i2[a2.id][e3.choiceId] = { isInStock: e3.inStock ?? true, isVisible: e3.visible ?? true };
3205
+ continue;
3206
+ }
3207
+ if (e3.inStock === false && e3.visible === false) {
3208
+ i2[a2.id][e3.choiceId] = { isInStock: false, isVisible: false };
3209
+ continue;
3210
+ }
3211
+ let { isInStock: o2, isVisible: s2 } = ll({ ...n2, [a2.id]: e3.choiceId }, t2);
3212
+ i2[a2.id][e3.choiceId] = { isInStock: o2, isVisible: s2 };
3213
+ }
3214
+ }
3215
+ return i2;
3216
+ }
3217
+ function ll(e2, t2) {
3218
+ let n2 = false, r2 = false;
3219
+ for (let i2 of t2.values()) if (Object.entries(e2).every(([e3, t3]) => i2.choices[e3] === t3) && (r2 = true, (i2.availabilityStatus === vr.IN_STOCK || i2.availabilityStatus === vr.PREORDER) && (n2 = true), n2)) break;
3220
+ return { isInStock: n2, isVisible: r2 };
3221
+ }
3222
+ function ul(e2, t2) {
3223
+ let n2 = /* @__PURE__ */ new Map();
3224
+ for (let e3 of t2) n2.set(e3.variantId, e3);
3225
+ return e2.map((e3) => {
3226
+ let t3 = n2.get(e3.id);
3227
+ return { ...e3, availabilityStatus: t3?.availabilityStatus, preorderInfo: t3?.preorderInfo, inventoryQuantity: t3?.quantity, trackQuantity: t3?.trackQuantity };
3228
+ });
3229
+ }
3230
+ var dl = (e2, t2) => e2.modifierRenderType === Pr.FREE_TEXT ? !!t2 : e2.choices?.some((e3) => e3.choiceId === t2);
3231
+ function fl({ product: e2, selections: t2, selectedVariant: n2 }) {
3232
+ let r2 = { options: pl(e2.options, t2.selectedOptions, n2), modifiers: hl(e2.modifiers, t2.selectedModifiers), quantity: ml(t2.quantity, n2), subscriptionPlanId: gl(e2.subscriptionDetails, t2.selectedSubscriptionPlanId) };
3233
+ return { valid: Object.values(r2.options).length === 0 && Object.values(r2.modifiers).length === 0 && !r2.quantity && !r2.subscriptionPlanId, fields: r2 };
3234
+ }
3235
+ function pl(e2, t2, n2) {
3236
+ if (n2 !== null) return {};
3237
+ let r2 = {};
3238
+ for (let n3 of e2) t2[n3.id] || (r2[n3.id] = `missing`);
3239
+ return r2;
3240
+ }
3241
+ function ml(e2, t2) {
3242
+ if (e2 < 1) return `below-min`;
3243
+ if (e2 > Ka(t2)) return `above-max`;
3244
+ }
3245
+ function hl(e2, t2) {
3246
+ let n2 = Object.values(e2).filter((e3) => e3.mandatory && !dl(e3, t2[e3.id]));
3247
+ return Object.fromEntries(n2.map((e3) => [e3.id, `missing`]));
3248
+ }
3249
+ function gl(e2, t2) {
3250
+ if (e2.subscriptions.length !== 0) return t2 ? t2 === `one-time` ? e2.allowOneTimePurchases ? void 0 : `missing` : _l(e2, t2) ? void 0 : `missing` : `missing`;
3251
+ }
3252
+ function _l(e2, t2) {
3253
+ return e2.subscriptions.some((e3) => e3.id === t2);
3254
+ }
3255
+ var $ = function(e2) {
3256
+ return e2.PRODUCT_OPTION = `PRODUCT_OPTION`, e2.MODIFIER = `MODIFIER`, e2;
3257
+ }({});
3258
+ function vl(e2) {
3259
+ if (e2 === `IN_STOCK` || e2 === `OUT_OF_STOCK` || e2 === `PARTIALLY_OUT_OF_STOCK`) return e2;
3260
+ }
3261
+ function yl(e2) {
3262
+ if (!(!e2 || e2.customizationRenderType !== `TEXT_CHOICES` && e2.customizationRenderType !== `SWATCH_CHOICES`)) {
3263
+ if (e2.customizationType === `PRODUCT_OPTION`) return `PRODUCT_OPTION`;
3264
+ if (e2.customizationType === `MODIFIER`) return `MODIFIER`;
3265
+ }
3266
+ }
3267
+ function bl(e2) {
3268
+ return !e2._id || !e2.key ? null : { choiceId: e2._id, key: e2.key, name: e2.name, colorCode: e2.colorCode };
3269
+ }
3270
+ function xl(e2) {
3271
+ if (e2.status !== `ACTIVE` || !e2.productId || !e2.slug || !e2.choice) return null;
3272
+ let t2 = bl(e2.choice);
3273
+ return t2 ? { productId: e2.productId, choice: t2, slug: e2.slug, inventoryAvailabilityStatus: vl(e2.inventoryAvailabilityStatus) } : null;
3274
+ }
3275
+ function Sl(e2) {
3276
+ let t2 = e2.groupingCustomizationId, n2 = yl(e2.groupingCustomization);
3277
+ if (!t2 || !n2) return;
3278
+ let r2 = (e2.members ?? []).map((e3) => xl(e3)).filter((e3) => e3 !== null);
3279
+ if (r2.length !== 0) return { groupingCustomizationId: t2, customizationType: n2, members: r2 };
3280
+ }
3281
+ async function Cl(e2) {
3282
+ if (e2) try {
3283
+ let t2 = await Qr({ fields: [Kr.GROUPING_CUSTOMIZATION] }).eq(`_id`, e2).limit(1).find();
3284
+ return t2.items[0] ? Sl(t2.items[0]) : void 0;
3285
+ } catch {
3286
+ return;
3287
+ }
3288
+ }
3289
+ function wl(e2, t2) {
3290
+ if (!t2) return;
3291
+ let n2 = t2.members.find((t3) => t3.productId === e2.id);
3292
+ if (!n2) return;
3293
+ let r2 = { groupingCustomizationId: t2.groupingCustomizationId, currentProductChoiceId: n2.choice.choiceId, members: t2.members };
3294
+ if (t2.customizationType === $.PRODUCT_OPTION) return e2.options.find(({ id: e3 }) => e3 === t2.groupingCustomizationId) ? { ...r2, customizationType: $.PRODUCT_OPTION } : void 0;
3295
+ if (e2.modifiers[t2.groupingCustomizationId]) return { ...r2, customizationType: $.MODIFIER };
3296
+ }
3297
+ function Tl(e2, t2) {
3298
+ return e2.members.find((e3) => e3.choice.choiceId === t2);
3299
+ }
3300
+ function El(e2, t2, n2) {
3301
+ return !!e2 && t2 === e2.groupingCustomizationId && n2 !== e2.currentProductChoiceId;
3302
+ }
3303
+ function Dl(e2, t2) {
3304
+ if (!t2) return;
3305
+ if (t2.customizationType === $.PRODUCT_OPTION) {
3306
+ let n3 = e2.options.find(({ id: e3 }) => e3 === t2.groupingCustomizationId);
3307
+ if (!n3) return;
3308
+ let r3 = Ol(n3, t2);
3309
+ return { options: e2.options.map((e3) => e3.id === n3.id ? r3 : e3) };
3310
+ }
3311
+ let n2 = e2.modifiers[t2.groupingCustomizationId];
3312
+ if (!n2) return;
3313
+ let r2 = kl(n2, t2);
3314
+ return { modifiers: { ...e2.modifiers, [t2.groupingCustomizationId]: r2 } };
3315
+ }
3316
+ function Ol(e2, t2) {
3317
+ return { ...e2, isGroupedOption: true, choices: t2.members.map((e3) => ({ ...e3.choice, inStock: e3.inventoryAvailabilityStatus !== `OUT_OF_STOCK` })) };
3318
+ }
3319
+ function kl(e2, t2) {
3320
+ return { ...e2, choices: t2.members.map(({ choice: e3 }) => e3) };
3321
+ }
3322
+ function Al(e2, t2) {
3323
+ if (!t2 || t2.customizationType !== $.PRODUCT_OPTION) return e2;
3324
+ let n2 = Object.fromEntries(t2.members.map((e3) => [e3.choice.choiceId, { isInStock: e3.inventoryAvailabilityStatus !== `OUT_OF_STOCK`, isVisible: true }]));
3325
+ return { ...e2, [t2.groupingCustomizationId]: { ...n2, ...e2[t2.groupingCustomizationId] } };
3326
+ }
3327
+ function jl(e2, r2) {
3328
+ let { navigateToProductPage: i2 } = Pa(), a2 = (0, import_react.useMemo)(() => wl(e2, r2), [e2, r2]);
3329
+ return { productGrouping: a2, selectGroupSiblingChoice: (0, import_react.useCallback)((e3) => {
3330
+ if (!a2) return;
3331
+ let t2 = Tl(a2, e3);
3332
+ t2 && i2(t2.slug);
3333
+ }, [a2, i2]), productCustomizations: (0, import_react.useMemo)(() => Dl(e2, a2), [e2, a2]), addGroupChoicesAvailability: (0, import_react.useCallback)((e3) => Al(e3, a2), [a2]), initialSelection: (0, import_react.useMemo)(() => {
3334
+ if (!a2) return { options: {}, modifiers: {} };
3335
+ let { customizationType: t2, groupingCustomizationId: n2, currentProductChoiceId: r3 } = a2;
3336
+ if (t2 === $.MODIFIER && e2.modifiers[n2].mandatory === false) return { options: {}, modifiers: {} };
3337
+ let i3 = { [n2]: r3 };
3338
+ return t2 === $.PRODUCT_OPTION ? { options: i3, modifiers: {} } : { options: {}, modifiers: i3 };
3339
+ }, [a2, e2.modifiers]) };
3340
+ }
3341
+ function Ml(e2, r2, a2) {
3342
+ let o2 = jl(e2, a2), { productGrouping: s2, selectGroupSiblingChoice: c2, addGroupChoicesAvailability: l2 } = o2, [u2, d2] = (0, import_react.useState)(() => o2.initialSelection.options), [f2, p2] = (0, import_react.useState)(() => o2.initialSelection.modifiers), [m2, h2] = (0, import_react.useState)(void 0), [g2, _2] = (0, import_react.useState)(1), [v2, y2] = (0, import_react.useState)(false), b2 = (0, import_react.useMemo)(() => sl(ul(e2.variants, r2)), [e2.variants, r2]), x2 = (0, import_react.useMemo)(() => {
3343
+ let t2 = /* @__PURE__ */ new Map();
3344
+ return (n2) => {
3345
+ let r3 = ol(n2), i2 = t2.get(r3);
3346
+ if (i2) return i2;
3347
+ let a3 = l2(cl(e2.options, b2, n2));
3348
+ return t2.set(r3, a3), a3;
3349
+ };
3350
+ }, [b2, e2.options, l2]), S2 = (0, import_react.useMemo)(() => x2(u2), [x2, u2]), C2 = (0, import_react.useMemo)(() => Object.keys(u2).length === e2.options.length ? b2.get(ol(u2)) ?? null : null, [b2, u2, e2.options.length]), w2 = (0, import_react.useCallback)((e3, t2) => {
3351
+ if (u2[e3] !== t2) {
3352
+ if (El(s2, e3, t2)) {
3353
+ c2(t2);
3354
+ return;
3355
+ }
3356
+ d2((n2) => ({ ...n2, [e3]: t2 })), _2(1);
3357
+ }
3358
+ }, [u2, s2, c2]), T2 = (0, import_react.useCallback)((e3, t2) => {
3359
+ if (El(s2, e3, t2)) {
3360
+ c2(t2);
3361
+ return;
3362
+ }
3363
+ p2((n2) => n2[e3] === t2 ? n2 : { ...n2, [e3]: t2 });
3364
+ }, [s2, c2]), E2 = (0, import_react.useCallback)((e3) => {
3365
+ p2((t2) => {
3366
+ if (!(e3 in t2)) return t2;
3367
+ let { [e3]: n2, ...r3 } = t2;
3368
+ return r3;
3369
+ });
3370
+ }, []), D2 = (0, import_react.useCallback)((e3) => {
3371
+ h2(e3);
3372
+ }, []), O2 = (0, import_react.useMemo)(() => Ka(C2), [C2]), k2 = (0, import_react.useMemo)(() => qa(g2, O2), [g2, O2]), ee2 = (0, import_react.useCallback)((e3) => {
3373
+ _2(e3);
3374
+ }, []), te2 = (0, import_react.useMemo)(() => fl({ product: e2, selections: { selectedOptions: u2, selectedModifiers: f2, selectedSubscriptionPlanId: m2, quantity: k2 }, selectedVariant: C2 }), [e2, u2, f2, m2, k2, C2]), ne2 = o2.productCustomizations?.options ?? e2.options, re2 = o2.productCustomizations?.modifiers ?? e2.modifiers;
3375
+ return (0, import_react.useMemo)(() => ({ options: ne2, modifiers: re2, quantity: k2, selectedOptions: u2, selectedModifiers: f2, selectedSubscriptionPlanId: m2, selectedVariant: C2, selectedVariantId: C2?.id ?? null, selectionsAvailability: S2, maxPurchasableQuantity: O2, isSelectionValid: te2.valid, selectionValidationErrors: te2.fields, hasAttemptedSubmit: v2, setHasAttemptedSubmit: y2, selectOption: w2, selectModifier: T2, clearModifierSelection: E2, selectSubscriptionPlan: D2, selectQuantity: ee2 }), [ne2, re2, k2, u2, f2, m2, C2, S2, O2, te2, v2, w2, T2, E2, D2, ee2]);
3376
+ }
3377
+ function Nl({ product: e2, productGroup: t2, inventoryItems: r2, isBackInStockEnabled: i2, source: a2 }) {
3378
+ let o2 = Ml(e2, r2, t2), s2 = Ga(e2, o2, Za(e2, o2.selectedVariant)), c2 = qc(e2, o2, al({ product: e2, userInputs: o2, hasLoadedVariants: true }), i2);
3379
+ return (0, import_react.useMemo)(() => ({ ...c2, ...s2, source: a2 }), [c2, s2, a2]);
3380
+ }
3381
+ function Pl({ productPromise: e2, source: t2, children: n2 }) {
3382
+ let { product: r2, productGroup: i2, inventoryItems: o2, isBackInStockEnabled: s2 } = kn(e2), c2 = Nl({ product: r2, productGroup: i2, inventoryItems: o2, isBackInStockEnabled: s2, source: t2 });
3383
+ return (0, import_jsx_runtime.jsx)(import_product_context_provider.default, { value: c2, children: n2 });
3384
+ }
3385
+ function Fl(t2) {
3386
+ return (0, import_jsx_runtime.jsx)(import_react.Suspense, { fallback: null, children: (0, import_jsx_runtime.jsx)(Pl, { ...t2 }) });
3387
+ }
3388
+ Fl.displayName = `StandaloneProductContextProvider`;
3389
+ var Il = q(`@wix/site-service-warmup-data`);
3390
+ async function Ll(e2, t2, n2) {
3391
+ let r2 = typeof window > `u`;
3392
+ if (!r2 && e2) try {
3393
+ let n3 = await e2.get(t2);
3394
+ if (n3 !== null) return n3;
3395
+ } catch {
3396
+ }
3397
+ let i2 = await n2();
3398
+ if (r2 && e2) try {
3399
+ e2.set(t2, i2);
3400
+ } catch {
3401
+ }
3402
+ return i2;
3403
+ }
3404
+ function Rl(e2, t2) {
3405
+ let n2 = (0, import_services_manager_react.useGetService)(), [r2] = (0, import_react.useState)(() => {
3406
+ let r3;
3407
+ try {
3408
+ r3 = n2(Il);
3409
+ } catch {
3410
+ r3 = null;
3411
+ }
3412
+ return Ll(r3, e2, t2);
3413
+ });
3414
+ return r2;
3415
+ }
3416
+ async function zl() {
3417
+ return (await si().eq(`defaultLocation`, true).find()).items?.[0]?._id ?? void 0;
3418
+ }
3419
+ async function Bl() {
3420
+ try {
3421
+ return (await oa()).settings?.collectionStates?.some((e2) => e2.appId === `215238eb-22a5-4c36-9e7b-e7c08025e04e` && e2.collectingRequests) ?? false;
3422
+ } catch {
3423
+ return false;
3424
+ }
3425
+ }
3426
+ function Vl(e2) {
3427
+ return e2.map((e3) => ({ variantId: e3.variantId ?? ``, availabilityStatus: e3.availabilityStatus, quantity: e3.quantity ?? void 0, trackQuantity: e3.trackQuantity ?? false, preorderInfo: e3.preorderInfo ? { message: e3.preorderInfo.message ?? void 0, quantity: e3.preorderInfo.quantity ?? void 0 } : void 0 }));
3428
+ }
3429
+ async function Hl(e2, t2) {
3430
+ return Vl((await kr().eq(`productId`, e2).eq(`locationId`, t2).find()).items ?? []);
3431
+ }
3432
+ async function Ul(e2) {
3433
+ let [t2, n2, r2] = await Promise.all([e2(), zl(), Bl()]), { product: i2 } = t2;
3434
+ if (!n2) throw Error(`Location not found`);
3435
+ let [a2, o2] = await Promise.all([Hl(i2.id, n2), i2.productGroupId ? Cl(i2.productGroupId) : void 0]);
3436
+ return { ...t2, productGroup: o2, inventoryItems: a2, isBackInStockEnabled: r2 };
3437
+ }
3438
+ function Wl(e2, t2) {
3439
+ return Rl(`wixstores-storefront-builder:product-data:${e2}`, () => Ul(t2));
3440
+ }
3441
+ var Gl = function(e2) {
3442
+ return e2.PRODUCT_BY_SLUG = `product-by-slug`, e2.PRODUCT_BY_ID = `product-by-id`, e2.PRODUCT_ITEM = `product-item`, e2;
3443
+ }({});
3444
+ function Kl() {
3445
+ let e2 = (0, import_services_manager_react.useService)(Oa);
3446
+ return ql(new URL(e2.currentUrl));
3447
+ }
3448
+ function ql(e2) {
3449
+ return e2.pathname.split(`/`).filter(Boolean).at(-1) || void 0;
3450
+ }
3451
+ var Jl = q(`seo/seo-service`);
3452
+ function Yl(e2) {
3453
+ let t2 = (0, import_services_manager_react.useService)(Jl), n2 = (0, import_services_manager_react.useService)(Jc), i2 = (0, import_react.useRef)(false);
3454
+ !i2.current && e2.id && n2.isSSR() && (i2.current = true, t2.setSeoEntity({ itemType: `STORES_PRODUCT`, seoData: e2.seoData ?? {}, itemData: { product: e2 } }).catch(() => {
3455
+ }));
3456
+ }
3457
+ var Xl = `No product slug is available for the product context`;
3458
+ function Zl() {
3459
+ return (0, import_product_context_provider.useProductContext)();
3460
+ }
3461
+ function Ql({ productPromise: e2 }) {
3462
+ let { seoProduct: t2 } = kn(e2);
3463
+ return Yl(t2), null;
3464
+ }
3465
+ function $l({ children: e2 }) {
3466
+ let t2 = Kl(), n2 = Wl(`slug:${t2}`, () => t2 ? Gi(t2) : Promise.reject(Error(Xl)));
3467
+ return (0, import_jsx_runtime.jsxs)(Fl, { productPromise: n2, source: Gl.PRODUCT_BY_SLUG, children: [(0, import_jsx_runtime.jsx)(Ql, { productPromise: n2 }), e2] });
3468
+ }
3469
+ var eu = On(`b276b552-68b9-4936-98d5-fbe43c0bd257`);
3470
+ // Annotate the CommonJS export names for ESM import in node:
3471
+ 0 && (module.exports = {
3472
+ NO_PRODUCT_SLUG_ERROR,
3473
+ ProductBySlugContextProvider,
3474
+ injectAccessTokenGetter,
3475
+ useProductBySlugContext
3476
+ });
3477
+ //# sourceMappingURL=context-product-by-slug-context-provider.js.map