@useinsider/guido 3.20.0 → 3.20.1-beta.04cd240
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/composables/useLegacyStrategyConversion.js +16 -16
- package/dist/composables/useStripo.js +11 -10
- package/dist/composables/useVersionHistoryApi.js +42 -37
- package/dist/config/compiler/itemsCompilerRules.js +21 -5
- package/dist/config/compiler/utils/itemsCompilerUtils.js +64 -17
- package/dist/config/migrator/itemsBlockMigrator.js +112 -108
- package/dist/extensions/Blocks/Items/block.js +76 -64
- package/dist/extensions/Blocks/Items/constants/cardWidth.js +20 -0
- package/dist/extensions/Blocks/Items/layouts/vertical.html.js +1 -1
- package/dist/extensions/Blocks/Recommendation/block.js +60 -49
- package/dist/extensions/Blocks/Recommendation/controls/cardComposition/index.js +163 -149
- package/dist/extensions/Blocks/Recommendation/controls/customAttribute/textTrim.js +1 -2
- package/dist/extensions/Blocks/Recommendation/controls/main/currency.js +102 -78
- package/dist/extensions/Blocks/Recommendation/controls/main/index.js +313 -210
- package/dist/extensions/Blocks/Recommendation/controls/main/layoutOrientation.js +15 -13
- package/dist/extensions/Blocks/Recommendation/controls/main/pricePlacement.js +17 -12
- package/dist/extensions/Blocks/Recommendation/controls/main/productLayout.js +92 -84
- package/dist/extensions/Blocks/Recommendation/controls/main/utils.js +219 -193
- package/dist/extensions/Blocks/Recommendation/controls/mobileLayout/cssRules.js +23 -18
- package/dist/extensions/Blocks/Recommendation/controls/name/textTrim.js +1 -2
- package/dist/extensions/Blocks/Recommendation/controls/shared/textTrimCssRules.js +6 -6
- package/dist/extensions/Blocks/Recommendation/controls/spacing/index.js +12 -9
- package/dist/extensions/Blocks/Recommendation/extension.js +4 -2
- package/dist/extensions/Blocks/Recommendation/settingsPanel.js +4 -2
- package/dist/extensions/Blocks/Recommendation/store/recommendation.js +240 -190
- package/dist/extensions/Blocks/Recommendation/utils/blockRefresh.js +19 -0
- package/dist/extensions/Blocks/Recommendation/utils/blockUrlConfig.js +25 -0
- package/dist/extensions/Blocks/Recommendation/utils/captureStyleTemplates.js +72 -70
- package/dist/extensions/Blocks/Recommendation/utils/compositionKeys.js +69 -60
- package/dist/extensions/Blocks/Recommendation/utils/followUpApply.js +34 -0
- package/dist/extensions/Blocks/Recommendation/utils/nodeConfigWriter.js +73 -28
- package/dist/extensions/Blocks/Recommendation/utils/restoreRefresh.js +36 -0
- package/dist/extensions/Blocks/Recommendation/utils/strategyCommit.js +39 -20
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +271 -192
- package/dist/package.json.js +1 -1
- package/dist/src/config/compiler/utils/itemsCompilerUtils.d.ts +10 -0
- package/dist/src/extensions/Blocks/Checkbox/controls/blockBackground/index.d.ts +1 -0
- package/dist/src/extensions/Blocks/CouponBlock/controls/index.d.ts +8 -0
- package/dist/src/extensions/Blocks/Items/block.d.ts +5 -0
- package/dist/src/extensions/Blocks/Items/constants/cardWidth.d.ts +12 -0
- package/dist/src/extensions/Blocks/Items/controls/index.d.ts +40 -0
- package/dist/src/extensions/Blocks/RadioButton/controls/blockBackground/index.d.ts +1 -0
- package/dist/src/extensions/Blocks/Recommendation/block.d.ts +3 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/blockBackground/index.d.ts +1 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/button/index.d.ts +11 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/cardComposition/index.d.ts +3 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/customAttribute/index.d.ts +7 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/image/index.d.ts +2 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/main/currency.d.ts +3 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/main/index.d.ts +22 -3
- package/dist/src/extensions/Blocks/Recommendation/controls/main/productLayout.d.ts +1 -18
- package/dist/src/extensions/Blocks/Recommendation/controls/main/utils.d.ts +8 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/mobileLayout/cssRules.d.ts +10 -6
- package/dist/src/extensions/Blocks/Recommendation/controls/name/index.d.ts +7 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/index.d.ts +7 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/omnibusDiscount/index.d.ts +7 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/omnibusPrice/index.d.ts +7 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/price/index.d.ts +7 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/shared/textTrimCssRules.d.ts +2 -3
- package/dist/src/extensions/Blocks/Recommendation/controls/spacing/index.d.ts +1 -1
- package/dist/src/extensions/Blocks/Recommendation/controls/title/index.d.ts +7 -0
- package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +28 -6
- package/dist/src/extensions/Blocks/Recommendation/utils/blockRefresh.d.ts +19 -0
- package/dist/src/extensions/Blocks/Recommendation/utils/blockUrlConfig.d.ts +4 -0
- package/dist/src/extensions/Blocks/Recommendation/utils/compositionKeys.d.ts +4 -0
- package/dist/src/extensions/Blocks/Recommendation/utils/followUpApply.d.ts +20 -0
- package/dist/src/extensions/Blocks/Recommendation/utils/nodeConfigWriter.d.ts +15 -2
- package/dist/src/extensions/Blocks/Recommendation/utils/restoreRefresh.d.ts +2 -0
- package/dist/src/extensions/Blocks/Recommendation/utils/strategyCommit.d.ts +7 -0
- package/dist/src/extensions/Blocks/_Boilerplate/controls/blockBackground/index.d.ts +1 -0
- package/dist/src/extensions/Blocks/controlFactories.d.ts +22 -0
- package/dist/src/stores/editor.d.ts +3 -1
- package/dist/src/utils/liquidProtection.d.ts +3 -0
- package/dist/static/styles/components/button.css.js +5 -0
- package/dist/stores/editor.js +5 -0
- package/dist/utils/liquidProtection.js +5 -0
- package/dist/utils/templatePreparation.js +61 -85
- package/package.json +3 -3
|
@@ -1,23 +1,29 @@
|
|
|
1
|
-
import { useToaster as
|
|
2
|
-
import { useTranslations as
|
|
3
|
-
import { getRecommendationFeedSourceMaps as F, strategyEditPath as
|
|
4
|
-
import { ToasterTypeOptions as
|
|
5
|
-
import { useRecommendationApi as
|
|
1
|
+
import { useToaster as L } from "../../../../composables/useToaster.js";
|
|
2
|
+
import { useTranslations as U } from "../../../../composables/useTranslations.js";
|
|
3
|
+
import { getRecommendationFeedSourceMaps as F, strategyEditPath as B, strategyCreatePath as z, getOperatorOptions as M, PriceAttributes as N } from "../../../../enums/extensions/recommendationBlock.js";
|
|
4
|
+
import { ToasterTypeOptions as E } from "../../../../enums/toaster.js";
|
|
5
|
+
import { useRecommendationApi as O } from "../../../../services/recommendationApi.js";
|
|
6
6
|
import { useConfigStore as R } from "../../../../stores/config.js";
|
|
7
|
-
import { defineStore as
|
|
7
|
+
import { defineStore as V } from "pinia";
|
|
8
8
|
import "../constants/selectors.js";
|
|
9
|
-
import { DEFAULT_MOBILE_CARDS_IN_ROW as
|
|
10
|
-
import { CURRENT_CONFIG_VERSION as C, DEFAULT_NODE_CONFIG as T, EXCLUDED_ALGORITHM_IDS as
|
|
9
|
+
import { DEFAULT_MOBILE_CARDS_IN_ROW as A, DEFAULT_CARDS_IN_ROW as x } from "../constants/layout.js";
|
|
10
|
+
import { CURRENT_CONFIG_VERSION as C, DEFAULT_NODE_CONFIG as T, EXCLUDED_ALGORITHM_IDS as j } from "../constants/defaultConfig.js";
|
|
11
11
|
import { getDefaultProducts as w } from "../templates/utils.js";
|
|
12
12
|
import { generateCompleteFilterQuery as P } from "../utils/filterUtil.js";
|
|
13
|
-
import { isLegacyStrategyConfig as
|
|
14
|
-
import { getPartnerRecommendationParams as
|
|
15
|
-
import { sanitizeProductIds as
|
|
16
|
-
import { isFilterValid as
|
|
17
|
-
import { getInvalidFields as
|
|
18
|
-
const m =
|
|
19
|
-
let
|
|
20
|
-
const
|
|
13
|
+
import { isLegacyStrategyConfig as $ } from "../utils/legacyStrategyMigration.js";
|
|
14
|
+
import { getPartnerRecommendationParams as q } from "../utils/partnerCustomizations.js";
|
|
15
|
+
import { sanitizeProductIds as K } from "../utils/productIds.js";
|
|
16
|
+
import { isFilterValid as H } from "../validation/filterSchema.js";
|
|
17
|
+
import { getInvalidFields as J, isConfigValid as Q } from "../validation/requiredFields.js";
|
|
18
|
+
const m = O();
|
|
19
|
+
let p = null, y = null;
|
|
20
|
+
const b = /* @__PURE__ */ new Map();
|
|
21
|
+
let k = null, I = 0;
|
|
22
|
+
const u = /* @__PURE__ */ new Map(), _ = /* @__PURE__ */ new Map();
|
|
23
|
+
function W(t) {
|
|
24
|
+
const e = _.get(t);
|
|
25
|
+
return e && e.token === u.get(t) ? e.outcome : !1;
|
|
26
|
+
}
|
|
21
27
|
let l = null;
|
|
22
28
|
function D() {
|
|
23
29
|
return {
|
|
@@ -35,7 +41,7 @@ function D() {
|
|
|
35
41
|
productIds: [],
|
|
36
42
|
id: 1,
|
|
37
43
|
language: "en_US",
|
|
38
|
-
mobileCardsInRow:
|
|
44
|
+
mobileCardsInRow: A,
|
|
39
45
|
mobileLayoutEnabled: !1,
|
|
40
46
|
orientation: "grid",
|
|
41
47
|
recommendedProducts: [],
|
|
@@ -69,10 +75,12 @@ function G() {
|
|
|
69
75
|
isInitialized: !1,
|
|
70
76
|
filterSnapshot: null,
|
|
71
77
|
syncedConfigFingerprint: null,
|
|
72
|
-
legacyConversionLoading: !1
|
|
78
|
+
legacyConversionLoading: !1,
|
|
79
|
+
configVersion: 0,
|
|
80
|
+
adoptedSizeVersion: 0
|
|
73
81
|
};
|
|
74
82
|
}
|
|
75
|
-
const
|
|
83
|
+
const X = () => ({
|
|
76
84
|
recommendationCampaignUrls: {},
|
|
77
85
|
activePredictiveAlgorithms: [],
|
|
78
86
|
languages: {},
|
|
@@ -87,8 +95,8 @@ const Q = () => ({
|
|
|
87
95
|
currentRecommendationId: null,
|
|
88
96
|
strategyPanelOpen: !1,
|
|
89
97
|
configVersion: 0
|
|
90
|
-
}),
|
|
91
|
-
state: () =>
|
|
98
|
+
}), ht = V("guidoRecommendationExtension", {
|
|
99
|
+
state: () => X(),
|
|
92
100
|
getters: {
|
|
93
101
|
// ====================================================================
|
|
94
102
|
// Proxy Getters — Backward Compatible Access to Current Block State
|
|
@@ -119,7 +127,7 @@ const Q = () => ({
|
|
|
119
127
|
return t.currentRecommendationId !== null && t.blockStates[t.currentRecommendationId] ? t.blockStates[t.currentRecommendationId].removeStrategyModalStatus : !1;
|
|
120
128
|
},
|
|
121
129
|
isLegacyStrategyBlock() {
|
|
122
|
-
return R().isFeatureEnabled("reusableRecommendationStrategy") &&
|
|
130
|
+
return R().isFeatureEnabled("reusableRecommendationStrategy") && $(this.recommendationConfigs);
|
|
123
131
|
},
|
|
124
132
|
legacyConversionLoading(t) {
|
|
125
133
|
return t.currentRecommendationId !== null && t.blockStates[t.currentRecommendationId] ? t.blockStates[t.currentRecommendationId].legacyConversionLoading ?? !1 : !1;
|
|
@@ -129,7 +137,7 @@ const Q = () => ({
|
|
|
129
137
|
},
|
|
130
138
|
assignedStrategy(t) {
|
|
131
139
|
const { strategyId: e } = this.recommendationConfigs;
|
|
132
|
-
return e ? t.strategies.find((
|
|
140
|
+
return e ? t.strategies.find((n) => String(n.strategy_id) === e) ?? null : null;
|
|
133
141
|
},
|
|
134
142
|
/**
|
|
135
143
|
* Proxy getter: delegates to blockStates[currentRecommendationId].filterStatus
|
|
@@ -159,19 +167,19 @@ const Q = () => ({
|
|
|
159
167
|
},
|
|
160
168
|
getUniqueFilterGroups() {
|
|
161
169
|
const { filters: t } = this.recommendationConfigs;
|
|
162
|
-
return [...new Set(t.map((e) => e.filterGroup))].sort((e,
|
|
170
|
+
return [...new Set(t.map((e) => e.filterGroup))].sort((e, n) => e - n);
|
|
163
171
|
},
|
|
164
172
|
getActivePredictiveAlgorithms: (t) => {
|
|
165
|
-
const e = F(),
|
|
166
|
-
return t.activePredictiveAlgorithms.filter((
|
|
167
|
-
|
|
168
|
-
}),
|
|
169
|
-
text:
|
|
170
|
-
value:
|
|
173
|
+
const e = F(), n = [];
|
|
174
|
+
return t.activePredictiveAlgorithms.filter((r) => !j.includes(r)).forEach((r) => {
|
|
175
|
+
n.push(...e.filter((o) => o.id === r));
|
|
176
|
+
}), n.map((r) => ({
|
|
177
|
+
text: r.name,
|
|
178
|
+
value: r.key
|
|
171
179
|
}));
|
|
172
180
|
},
|
|
173
|
-
getLanguages: (t) => Object.entries(t.languages).map(([e,
|
|
174
|
-
text:
|
|
181
|
+
getLanguages: (t) => Object.entries(t.languages).map(([e, n]) => ({
|
|
182
|
+
text: n,
|
|
175
183
|
value: e
|
|
176
184
|
})),
|
|
177
185
|
getCurrencySymbolList: (t) => t.currencyList.map((e) => ({
|
|
@@ -181,7 +189,7 @@ const Q = () => ({
|
|
|
181
189
|
getFilterList() {
|
|
182
190
|
return Object.values(this.filterList).filter((t) => t.isFilterable !== 0 && t.isFilterable !== !1).map((t) => {
|
|
183
191
|
let e;
|
|
184
|
-
return t.type === "productAttribute" ? e = `product_attributes.${t.attributeName}` :
|
|
192
|
+
return t.type === "productAttribute" ? e = `product_attributes.${t.attributeName}` : N.includes(t.attributeName) ? e = `${t.attributeName}.${this.recommendationConfigs.currencySettings.value}` : e = t.attributeName, {
|
|
185
193
|
text: t.displayName,
|
|
186
194
|
value: e,
|
|
187
195
|
type: t.attributeType
|
|
@@ -213,13 +221,13 @@ const Q = () => ({
|
|
|
213
221
|
removeBlockState(t) {
|
|
214
222
|
const e = t.toString();
|
|
215
223
|
if (this.recommendationCampaignUrls[e]) {
|
|
216
|
-
const
|
|
217
|
-
delete
|
|
224
|
+
const r = { ...this.recommendationCampaignUrls };
|
|
225
|
+
delete r[e], this.recommendationCampaignUrls = r;
|
|
218
226
|
}
|
|
219
|
-
const
|
|
220
|
-
if (delete
|
|
221
|
-
const
|
|
222
|
-
this.currentRecommendationId =
|
|
227
|
+
const n = { ...this.blockStates };
|
|
228
|
+
if (delete n[t], this.blockStates = n, this.currentRecommendationId === t) {
|
|
229
|
+
const r = Object.keys(this.blockStates).map(Number);
|
|
230
|
+
this.currentRecommendationId = r.length > 0 ? r[0] : null;
|
|
223
231
|
}
|
|
224
232
|
},
|
|
225
233
|
/**
|
|
@@ -231,18 +239,18 @@ const Q = () => ({
|
|
|
231
239
|
* (SD-149916).
|
|
232
240
|
*/
|
|
233
241
|
cloneBlockState(t, e) {
|
|
234
|
-
const
|
|
235
|
-
if (
|
|
236
|
-
const
|
|
237
|
-
|
|
242
|
+
const n = this.blockStates[t];
|
|
243
|
+
if (n) {
|
|
244
|
+
const s = structuredClone(n);
|
|
245
|
+
s.recommendationConfigs.id = e, s.recommendationConfigs.strategyId && R().isFeatureEnabled("reusableRecommendationStrategy") && (s.isInitialized = !1, s.syncedConfigFingerprint = null), this.blockStates = {
|
|
238
246
|
...this.blockStates,
|
|
239
|
-
[e]:
|
|
247
|
+
[e]: s
|
|
240
248
|
};
|
|
241
249
|
}
|
|
242
|
-
const
|
|
250
|
+
const r = t.toString(), o = e.toString(), i = this.recommendationCampaignUrls[r];
|
|
243
251
|
i && (this.recommendationCampaignUrls = {
|
|
244
252
|
...this.recommendationCampaignUrls,
|
|
245
|
-
[
|
|
253
|
+
[o]: i
|
|
246
254
|
});
|
|
247
255
|
},
|
|
248
256
|
/**
|
|
@@ -267,15 +275,15 @@ const Q = () => ({
|
|
|
267
275
|
* `isInitialized`) alone.
|
|
268
276
|
*/
|
|
269
277
|
seedBlockUrlConfig(t, e) {
|
|
270
|
-
const
|
|
278
|
+
const n = (s, a) => s === "." || s === "," || s === " " ? s : a, r = {
|
|
271
279
|
name: e.currencyCode,
|
|
272
280
|
value: e.currencyCode,
|
|
273
281
|
symbol: e.currencySymbol,
|
|
274
282
|
alignment: e.currencyAlignment === "before" ? "0" : "1",
|
|
275
283
|
decimalCount: String(e.currencyDecimalCount),
|
|
276
|
-
decimalSeparator:
|
|
277
|
-
thousandSeparator:
|
|
278
|
-
},
|
|
284
|
+
decimalSeparator: n(e.currencyDecimalSeparator, ","),
|
|
285
|
+
thousandSeparator: n(e.currencyThousandSeparator, ".")
|
|
286
|
+
}, o = !this.blockStates[t], i = o ? G() : this.blockStates[t];
|
|
279
287
|
i.recommendationConfigs = {
|
|
280
288
|
...i.recommendationConfigs,
|
|
281
289
|
strategy: e.strategy,
|
|
@@ -285,12 +293,16 @@ const Q = () => ({
|
|
|
285
293
|
productIds: e.productIds,
|
|
286
294
|
filters: e.filters,
|
|
287
295
|
shuffleProducts: e.shuffleProducts,
|
|
288
|
-
currencySettings:
|
|
289
|
-
},
|
|
296
|
+
currencySettings: r
|
|
297
|
+
}, o && (this.blockStates = {
|
|
290
298
|
...this.blockStates,
|
|
291
299
|
[t]: i
|
|
292
300
|
});
|
|
293
301
|
},
|
|
302
|
+
/** Re-seeds a block whose node a restore rewrote; a pending fetch for the old config must not be joined. */
|
|
303
|
+
reseedBlockFromNode(t, e) {
|
|
304
|
+
this.seedBlockUrlConfig(t, e), b.delete(t);
|
|
305
|
+
},
|
|
294
306
|
/**
|
|
295
307
|
* Patches the current block's recommendationConfigs.
|
|
296
308
|
* Replaces `store.$patch({ recommendationConfigs: { ... } })` pattern.
|
|
@@ -298,27 +310,27 @@ const Q = () => ({
|
|
|
298
310
|
patchCurrentBlockConfig(t, e = {}) {
|
|
299
311
|
if (this.currentRecommendationId === null || !this.blockStates[this.currentRecommendationId])
|
|
300
312
|
return;
|
|
301
|
-
const
|
|
302
|
-
|
|
303
|
-
...
|
|
313
|
+
const n = this.blockStates[this.currentRecommendationId];
|
|
314
|
+
n.recommendationConfigs = {
|
|
315
|
+
...n.recommendationConfigs,
|
|
304
316
|
...t,
|
|
305
317
|
currencySettings: {
|
|
306
|
-
...
|
|
318
|
+
...n.recommendationConfigs.currencySettings,
|
|
307
319
|
...t.currencySettings || {}
|
|
308
320
|
}
|
|
309
321
|
};
|
|
310
|
-
const { triggerRefetch:
|
|
311
|
-
|
|
322
|
+
const { triggerRefetch: r = !0 } = e;
|
|
323
|
+
r && (n.configVersion++, this.configVersion++);
|
|
312
324
|
},
|
|
313
325
|
/**
|
|
314
326
|
* Creates a filter with the first available attribute and operator pre-selected.
|
|
315
327
|
*/
|
|
316
328
|
createDefaultFilter(t, e) {
|
|
317
|
-
const [
|
|
329
|
+
const [n] = this.getFilterList, [r] = M(n == null ? void 0 : n.type);
|
|
318
330
|
return {
|
|
319
331
|
type: "standardFilter",
|
|
320
|
-
attribute: (
|
|
321
|
-
operator: (
|
|
332
|
+
attribute: (n == null ? void 0 : n.value) ?? "",
|
|
333
|
+
operator: (r == null ? void 0 : r.value) ?? "",
|
|
322
334
|
innerGroupOperator: "*",
|
|
323
335
|
outerGroupOperator: "*",
|
|
324
336
|
filterNumber: e,
|
|
@@ -387,15 +399,15 @@ const Q = () => ({
|
|
|
387
399
|
}
|
|
388
400
|
if (this.strategiesFetched)
|
|
389
401
|
return;
|
|
390
|
-
const t =
|
|
402
|
+
const t = I, e = (async () => {
|
|
391
403
|
this.strategiesLoading = !0;
|
|
392
404
|
try {
|
|
393
|
-
const
|
|
394
|
-
if (t !==
|
|
405
|
+
const n = await m.fetchRecommendationStrategies();
|
|
406
|
+
if (t !== I)
|
|
395
407
|
return;
|
|
396
|
-
this.strategies =
|
|
408
|
+
this.strategies = n, this.strategiesFetched = !0;
|
|
397
409
|
} finally {
|
|
398
|
-
this.strategiesLoading = !1, t ===
|
|
410
|
+
this.strategiesLoading = !1, t === I && (this.strategiesSettled = !0);
|
|
399
411
|
}
|
|
400
412
|
})();
|
|
401
413
|
k = e;
|
|
@@ -416,7 +428,7 @@ const Q = () => ({
|
|
|
416
428
|
}));
|
|
417
429
|
},
|
|
418
430
|
invalidateStrategies() {
|
|
419
|
-
this.strategiesFetched = !1, this.strategiesSettled = !1,
|
|
431
|
+
this.strategiesFetched = !1, this.strategiesSettled = !1, I += 1;
|
|
420
432
|
},
|
|
421
433
|
/**
|
|
422
434
|
* Opens a Smart Recommender strategy page in a new tab and refreshes the list every time
|
|
@@ -434,20 +446,20 @@ const Q = () => ({
|
|
|
434
446
|
_armStrategyPageReturn(t) {
|
|
435
447
|
const e = window.open(t, "_blank");
|
|
436
448
|
if (!e)
|
|
437
|
-
return
|
|
438
|
-
type:
|
|
439
|
-
message:
|
|
449
|
+
return L().showToaster({
|
|
450
|
+
type: E.Error,
|
|
451
|
+
message: U()("discovery-strategy.error-description")
|
|
440
452
|
}), !1;
|
|
441
453
|
e.opener = null, l == null || l();
|
|
442
|
-
let
|
|
443
|
-
const
|
|
444
|
-
document.hidden ||
|
|
454
|
+
let n = !1;
|
|
455
|
+
const r = () => {
|
|
456
|
+
document.hidden || n || (e != null && e.closed && (l == null || l()), n = !0, this.invalidateStrategies(), this.fetchStrategies().then(() => this._refreshAssignedStrategyProducts()).catch(() => {
|
|
445
457
|
}).finally(() => {
|
|
446
|
-
|
|
458
|
+
n = !1;
|
|
447
459
|
}));
|
|
448
460
|
};
|
|
449
|
-
return document.addEventListener("visibilitychange",
|
|
450
|
-
document.removeEventListener("visibilitychange",
|
|
461
|
+
return document.addEventListener("visibilitychange", r), l = () => {
|
|
462
|
+
document.removeEventListener("visibilitychange", r), l = null;
|
|
451
463
|
}, !0;
|
|
452
464
|
},
|
|
453
465
|
/**
|
|
@@ -471,23 +483,23 @@ const Q = () => ({
|
|
|
471
483
|
* new strategy is offered; the user picks it themselves.
|
|
472
484
|
*/
|
|
473
485
|
openStrategyCreation() {
|
|
474
|
-
return this._armStrategyPageReturn(
|
|
486
|
+
return this._armStrategyPageReturn(z());
|
|
475
487
|
},
|
|
476
488
|
/**
|
|
477
489
|
* Opens the strategy's edit page. Every return refreshes the list so the block reflects the
|
|
478
490
|
* edited configuration.
|
|
479
491
|
*/
|
|
480
492
|
openStrategyEdit(t) {
|
|
481
|
-
return this._armStrategyPageReturn(
|
|
493
|
+
return this._armStrategyPageReturn(B(t));
|
|
482
494
|
},
|
|
483
495
|
async resolveStrategyUrlTemplate(t, e) {
|
|
484
|
-
const
|
|
485
|
-
if (
|
|
486
|
-
return
|
|
496
|
+
const n = typeof t.updated_at == "string" ? t.updated_at : "", r = n ? `${t.strategy_id}:${n}:${e}` : "", o = r ? this.strategyUrlTemplates[r] : void 0;
|
|
497
|
+
if (o)
|
|
498
|
+
return o;
|
|
487
499
|
const { full_path: i = "" } = await m.generateStrategyEndpoint(t, e) ?? {};
|
|
488
|
-
return
|
|
500
|
+
return r && i && (this.strategyUrlTemplates = {
|
|
489
501
|
...this.strategyUrlTemplates,
|
|
490
|
-
[
|
|
502
|
+
[r]: i
|
|
491
503
|
}), i;
|
|
492
504
|
},
|
|
493
505
|
assignStrategy(t) {
|
|
@@ -497,27 +509,27 @@ const Q = () => ({
|
|
|
497
509
|
});
|
|
498
510
|
},
|
|
499
511
|
async convertLegacyStrategy(t, e = { scope: "campaign" }) {
|
|
500
|
-
const
|
|
501
|
-
if (
|
|
512
|
+
const n = this.currentRecommendationId;
|
|
513
|
+
if (n === null || !this.blockStates[n])
|
|
502
514
|
throw new Error("[Guido] convertLegacyStrategy called without an active block");
|
|
503
|
-
this.blockStates[
|
|
515
|
+
this.blockStates[n].legacyConversionLoading = !0;
|
|
504
516
|
try {
|
|
505
|
-
const
|
|
517
|
+
const r = await m.migrateLegacyStrategy(t, e);
|
|
506
518
|
this.invalidateStrategies();
|
|
507
519
|
try {
|
|
508
520
|
await this.fetchStrategies();
|
|
509
|
-
} catch (
|
|
510
|
-
console.error("[Guido] strategy listing refresh after conversion failed",
|
|
521
|
+
} catch (s) {
|
|
522
|
+
console.error("[Guido] strategy listing refresh after conversion failed", s);
|
|
511
523
|
}
|
|
512
|
-
const
|
|
524
|
+
const o = this.strategies.find((s) => String(s.strategy_id) === r), i = this.blockStates[n];
|
|
513
525
|
return i && (i.recommendationConfigs = {
|
|
514
526
|
...i.recommendationConfigs,
|
|
515
|
-
strategyId:
|
|
527
|
+
strategyId: r,
|
|
516
528
|
nodeConfigVersion: C,
|
|
517
|
-
...(
|
|
518
|
-
}), this.currentRecommendationId ===
|
|
529
|
+
...(o == null ? void 0 : o.size) !== void 0 ? { size: String(o.size) } : {}
|
|
530
|
+
}, i.configVersion++), this.currentRecommendationId === n && this.configVersion++, r;
|
|
519
531
|
} finally {
|
|
520
|
-
this.blockStates[
|
|
532
|
+
this.blockStates[n] && (this.blockStates[n].legacyConversionLoading = !1);
|
|
521
533
|
}
|
|
522
534
|
},
|
|
523
535
|
/**
|
|
@@ -526,8 +538,8 @@ const Q = () => ({
|
|
|
526
538
|
* the document never received.
|
|
527
539
|
*/
|
|
528
540
|
revertLegacyConversion(t, e) {
|
|
529
|
-
const
|
|
530
|
-
|
|
541
|
+
const n = this.blockStates[t];
|
|
542
|
+
n && (n.recommendationConfigs = { ...n.recommendationConfigs, ...e }, n.configVersion++, this.currentRecommendationId === t && this.configVersion++);
|
|
531
543
|
},
|
|
532
544
|
removeStrategy() {
|
|
533
545
|
this.patchCurrentBlockConfig({
|
|
@@ -542,43 +554,43 @@ const Q = () => ({
|
|
|
542
554
|
// ====================================================================
|
|
543
555
|
async fetchRecommendationCreateData() {
|
|
544
556
|
if (!this.activePredictiveAlgorithms.length) {
|
|
545
|
-
if (
|
|
546
|
-
await
|
|
557
|
+
if (p) {
|
|
558
|
+
await p;
|
|
547
559
|
return;
|
|
548
560
|
}
|
|
549
|
-
|
|
561
|
+
p = (async () => {
|
|
550
562
|
const {
|
|
551
563
|
activePredictiveAlgorithms: t,
|
|
552
564
|
languages: e,
|
|
553
|
-
currencies:
|
|
565
|
+
currencies: n
|
|
554
566
|
} = await m.fetchRecommendationCreateData();
|
|
555
567
|
if (this.activePredictiveAlgorithms = t, this.languages = e, this.currentRecommendationId !== null && this.blockStates[this.currentRecommendationId]) {
|
|
556
|
-
const
|
|
557
|
-
|
|
568
|
+
const r = this.blockStates[this.currentRecommendationId];
|
|
569
|
+
r.filterStatus = !!r.recommendationConfigs.filters.length;
|
|
558
570
|
}
|
|
559
|
-
this.currencyList =
|
|
571
|
+
this.currencyList = n;
|
|
560
572
|
})();
|
|
561
573
|
try {
|
|
562
|
-
await
|
|
574
|
+
await p;
|
|
563
575
|
} finally {
|
|
564
|
-
|
|
576
|
+
p = null;
|
|
565
577
|
}
|
|
566
578
|
}
|
|
567
579
|
},
|
|
568
580
|
async fetchRecommendationFilters() {
|
|
569
581
|
if (!Object.keys(this.filterList).length) {
|
|
570
|
-
if (
|
|
571
|
-
await
|
|
582
|
+
if (y) {
|
|
583
|
+
await y;
|
|
572
584
|
return;
|
|
573
585
|
}
|
|
574
|
-
|
|
586
|
+
y = (async () => {
|
|
575
587
|
const t = await m.fetchRecommendationFilters();
|
|
576
588
|
this.filterList = t;
|
|
577
589
|
})();
|
|
578
590
|
try {
|
|
579
|
-
await
|
|
591
|
+
await y;
|
|
580
592
|
} finally {
|
|
581
|
-
|
|
593
|
+
y = null;
|
|
582
594
|
}
|
|
583
595
|
}
|
|
584
596
|
},
|
|
@@ -593,56 +605,56 @@ const Q = () => ({
|
|
|
593
605
|
deleteFilterGroup(t) {
|
|
594
606
|
if (this.currentRecommendationId === null || !this.blockStates[this.currentRecommendationId])
|
|
595
607
|
return;
|
|
596
|
-
const e = this.blockStates[this.currentRecommendationId],
|
|
597
|
-
e.recommendationConfigs.filters =
|
|
608
|
+
const e = this.blockStates[this.currentRecommendationId], n = e.recommendationConfigs.filters.filter((i) => i.filterGroup !== t), r = [...new Set(n.map((i) => i.filterGroup))].sort((i, s) => i - s), o = new Map(r.map((i, s) => [i, s + 1]));
|
|
609
|
+
e.recommendationConfigs.filters = n.map((i) => ({
|
|
598
610
|
...i,
|
|
599
|
-
filterGroup:
|
|
611
|
+
filterGroup: o.get(i.filterGroup) ?? i.filterGroup
|
|
600
612
|
}));
|
|
601
613
|
},
|
|
602
614
|
updateFilter(t) {
|
|
603
615
|
if (this.currentRecommendationId === null || !this.blockStates[this.currentRecommendationId])
|
|
604
616
|
return;
|
|
605
|
-
const e = this.blockStates[this.currentRecommendationId],
|
|
606
|
-
if (
|
|
607
|
-
const
|
|
608
|
-
n
|
|
617
|
+
const e = this.blockStates[this.currentRecommendationId], n = e.recommendationConfigs.filters.findIndex((r) => r.filterNumber === t.filterNumber && r.filterGroup === t.filterGroup);
|
|
618
|
+
if (n !== -1) {
|
|
619
|
+
const r = [...e.recommendationConfigs.filters];
|
|
620
|
+
r[n] = {
|
|
609
621
|
...t,
|
|
610
|
-
isValid:
|
|
611
|
-
}, e.recommendationConfigs.filters =
|
|
622
|
+
isValid: H(t)
|
|
623
|
+
}, e.recommendationConfigs.filters = r;
|
|
612
624
|
}
|
|
613
625
|
},
|
|
614
626
|
deleteFilter(t) {
|
|
615
627
|
if (this.currentRecommendationId === null || !this.blockStates[this.currentRecommendationId])
|
|
616
628
|
return;
|
|
617
|
-
const e = this.blockStates[this.currentRecommendationId],
|
|
618
|
-
if (
|
|
619
|
-
let
|
|
620
|
-
if (
|
|
629
|
+
const e = this.blockStates[this.currentRecommendationId], n = [...e.recommendationConfigs.filters].findIndex((r) => r.filterNumber === t.filterNumber && r.filterGroup === t.filterGroup);
|
|
630
|
+
if (n !== -1) {
|
|
631
|
+
let r = [...e.recommendationConfigs.filters];
|
|
632
|
+
if (r.splice(n, 1), r.some((i) => i.filterGroup === t.filterGroup)) {
|
|
621
633
|
let i = 1;
|
|
622
|
-
|
|
634
|
+
r = r.map((s) => s.filterGroup === t.filterGroup ? { ...s, filterNumber: i++ } : s);
|
|
623
635
|
} else {
|
|
624
|
-
const i = [...new Set(
|
|
625
|
-
|
|
636
|
+
const i = [...new Set(r.map((a) => a.filterGroup))].sort((a, d) => a - d), s = new Map(i.map((a, d) => [a, d + 1]));
|
|
637
|
+
r = r.map((a) => ({
|
|
626
638
|
...a,
|
|
627
|
-
filterGroup:
|
|
639
|
+
filterGroup: s.get(a.filterGroup) ?? a.filterGroup
|
|
628
640
|
}));
|
|
629
641
|
}
|
|
630
|
-
e.recommendationConfigs.filters =
|
|
642
|
+
e.recommendationConfigs.filters = r;
|
|
631
643
|
}
|
|
632
644
|
},
|
|
633
645
|
addFilter(t) {
|
|
634
646
|
if (this.currentRecommendationId === null || !this.blockStates[this.currentRecommendationId])
|
|
635
647
|
return;
|
|
636
|
-
const e = this.blockStates[this.currentRecommendationId],
|
|
637
|
-
(
|
|
638
|
-
).length + 1, i =
|
|
639
|
-
i !== -1 ?
|
|
648
|
+
const e = this.blockStates[this.currentRecommendationId], n = [...e.recommendationConfigs.filters], o = n.filter(
|
|
649
|
+
(s) => s.filterGroup === t.filterGroup
|
|
650
|
+
).length + 1, i = n.findLastIndex((s) => s.filterGroup === t.filterGroup);
|
|
651
|
+
i !== -1 ? n.splice(i + 1, 0, {
|
|
640
652
|
...t,
|
|
641
|
-
filterNumber:
|
|
642
|
-
}) :
|
|
653
|
+
filterNumber: o
|
|
654
|
+
}) : n.push({
|
|
643
655
|
...t,
|
|
644
|
-
filterNumber:
|
|
645
|
-
}), e.recommendationConfigs.filters =
|
|
656
|
+
filterNumber: o
|
|
657
|
+
}), e.recommendationConfigs.filters = n;
|
|
646
658
|
},
|
|
647
659
|
generateFilterQuery() {
|
|
648
660
|
return P(this.recommendationConfigs.filters);
|
|
@@ -653,111 +665,149 @@ const Q = () => ({
|
|
|
653
665
|
* every block's recommendationConfigs across user edits.
|
|
654
666
|
*/
|
|
655
667
|
hasInvalidBlock() {
|
|
656
|
-
return Object.values(this.blockStates).some((t) => !
|
|
668
|
+
return Object.values(this.blockStates).some((t) => !Q(t.recommendationConfigs, this));
|
|
657
669
|
},
|
|
658
670
|
/**
|
|
659
671
|
* Which required fields are missing across the design's blocks, so the save
|
|
660
672
|
* toaster can name the cause instead of always showing the generic message.
|
|
661
673
|
*/
|
|
662
674
|
invalidBlockFields() {
|
|
663
|
-
return Object.values(this.blockStates).flatMap((t) =>
|
|
675
|
+
return Object.values(this.blockStates).flatMap((t) => J(t.recommendationConfigs, this));
|
|
664
676
|
},
|
|
665
677
|
// ====================================================================
|
|
666
678
|
// Per-Block Product Fetching
|
|
667
679
|
// ====================================================================
|
|
668
680
|
async fetchRecommendationProducts() {
|
|
669
|
-
|
|
681
|
+
this.currentRecommendationId !== null && await this.fetchRecommendationProductsForBlock(this.currentRecommendationId);
|
|
682
|
+
},
|
|
683
|
+
/**
|
|
684
|
+
* Fetches one block's products whether or not it is selected: the panel teardown and the
|
|
685
|
+
* strategy drawer refresh the block they were handed after the user may have moved on.
|
|
686
|
+
*/
|
|
687
|
+
async fetchRecommendationProductsForBlock(t) {
|
|
688
|
+
var i;
|
|
689
|
+
const e = this.blockStates[t];
|
|
690
|
+
if (!e)
|
|
670
691
|
return;
|
|
671
|
-
const
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
b
|
|
675
|
-
].join(":");
|
|
676
|
-
if (y && I === t) {
|
|
677
|
-
await y;
|
|
692
|
+
const n = [e.configVersion, e.adoptedSizeVersion, I].join(":"), r = b.get(t);
|
|
693
|
+
if ((r == null ? void 0 : r.key) === n) {
|
|
694
|
+
await r.promise;
|
|
678
695
|
return;
|
|
679
696
|
}
|
|
680
|
-
|
|
697
|
+
const o = this._doFetchProducts(t);
|
|
698
|
+
b.set(t, { key: n, promise: o });
|
|
681
699
|
try {
|
|
682
|
-
await
|
|
700
|
+
await o;
|
|
683
701
|
} finally {
|
|
684
|
-
|
|
702
|
+
((i = b.get(t)) == null ? void 0 : i.promise) === o && b.delete(t);
|
|
685
703
|
}
|
|
686
704
|
},
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
705
|
+
// Captures the block ID up front so the write lands on it even if the user switches.
|
|
706
|
+
async _doFetchProducts(t) {
|
|
707
|
+
var S;
|
|
708
|
+
const e = t ?? this.currentRecommendationId, n = this.blockStates[e], { recommendationConfigs: r } = n, o = R();
|
|
709
|
+
if (r.strategyId && o.isFeatureEnabled("reusableRecommendationStrategy")) {
|
|
710
|
+
await this._doFetchStrategyProducts(e);
|
|
692
711
|
return;
|
|
693
712
|
}
|
|
694
|
-
const
|
|
695
|
-
|
|
696
|
-
const
|
|
713
|
+
const i = (u.get(e) ?? 0) + 1;
|
|
714
|
+
u.set(e, i);
|
|
715
|
+
const s = parseInt(r.size) || 6;
|
|
697
716
|
if (!r.strategy) {
|
|
698
|
-
this._setBlockProducts(
|
|
717
|
+
this._setBlockProducts(e, [], s);
|
|
699
718
|
return;
|
|
700
719
|
}
|
|
701
|
-
const
|
|
720
|
+
const a = r.filters.filter((h) => h.isValid), d = P(a), f = ((S = F().find((h) => h.key === r.strategy)) == null ? void 0 : S.path) || "", c = {
|
|
702
721
|
locale: r.language,
|
|
703
722
|
currency: r.currencySettings.value,
|
|
704
|
-
partnerName:
|
|
723
|
+
partnerName: o.partnerName,
|
|
705
724
|
size: r.size,
|
|
706
725
|
details: !0,
|
|
707
|
-
campaignId:
|
|
726
|
+
campaignId: o.variationId
|
|
708
727
|
};
|
|
709
|
-
r.strategy === "manualMerchandising" ? c.productId =
|
|
728
|
+
r.strategy === "manualMerchandising" ? c.productId = K(r.productIds) : r.strategy === "similarViewed" && (c.productId = "{itemId}"), r.strategy === "userBased" && (c.userId = "{user_id}"), d && (c.filter = d), r.shuffleProducts && (c.shuffle = !0), Object.assign(
|
|
710
729
|
c,
|
|
711
|
-
|
|
730
|
+
q(o.partnerName, r.strategy)
|
|
712
731
|
);
|
|
713
|
-
let
|
|
732
|
+
let g;
|
|
714
733
|
try {
|
|
715
|
-
|
|
734
|
+
g = await m.fetchRecommendationProducts(f, c);
|
|
716
735
|
} catch {
|
|
717
|
-
|
|
736
|
+
g = [];
|
|
718
737
|
}
|
|
719
|
-
|
|
738
|
+
u.get(e) === i && this._setBlockProducts(e, g, s);
|
|
720
739
|
},
|
|
721
740
|
/**
|
|
722
|
-
* Block-scoped counterpart of `fetchRecommendationProducts`, which only
|
|
723
|
-
*
|
|
724
|
-
*
|
|
741
|
+
* Block-scoped counterpart of `fetchRecommendationProducts`, which only serves the selected block:
|
|
742
|
+
* the legacy conversion and the duplicate refresh must reach a block that may no longer be selected.
|
|
743
|
+
* @returns whether real products arrived
|
|
725
744
|
*/
|
|
726
|
-
async fetchStrategyProductsForBlock(t) {
|
|
727
|
-
var
|
|
728
|
-
(
|
|
745
|
+
async fetchStrategyProductsForBlock(t, e = {}) {
|
|
746
|
+
var n;
|
|
747
|
+
return (n = this.blockStates[t]) != null && n.recommendationConfigs.strategyId ? this._doFetchStrategyProducts(t, e) : !1;
|
|
748
|
+
},
|
|
749
|
+
/**
|
|
750
|
+
* Reloads a block's products and adopts its strategy's current size, which may have
|
|
751
|
+
* moved since the block was assigned.
|
|
752
|
+
* @returns whether a fresh listing holds the strategy and its products arrived
|
|
753
|
+
*/
|
|
754
|
+
async refreshStrategyBlock(t) {
|
|
755
|
+
var o;
|
|
756
|
+
const e = (o = this.blockStates[t]) == null ? void 0 : o.recommendationConfigs.strategyId;
|
|
757
|
+
if (!e)
|
|
758
|
+
return !1;
|
|
759
|
+
try {
|
|
760
|
+
await this.fetchStrategies();
|
|
761
|
+
} catch {
|
|
762
|
+
return !1;
|
|
763
|
+
}
|
|
764
|
+
const n = this.strategiesFetched ? this.strategies.find((i) => String(i.strategy_id) === e) : void 0;
|
|
765
|
+
if (!n || !await this.fetchStrategyProductsForBlock(t, { keepOnFailure: !0 }))
|
|
766
|
+
return !1;
|
|
767
|
+
const r = this.blockStates[t];
|
|
768
|
+
if ((r == null ? void 0 : r.recommendationConfigs.strategyId) !== e)
|
|
769
|
+
return !1;
|
|
770
|
+
if (n.size !== void 0) {
|
|
771
|
+
const i = String(n.size);
|
|
772
|
+
r.recommendationConfigs.size !== i && r.adoptedSizeVersion++, r.recommendationConfigs = { ...r.recommendationConfigs, size: i };
|
|
773
|
+
}
|
|
774
|
+
return !0;
|
|
775
|
+
},
|
|
776
|
+
_doFetchStrategyProducts(t, e = {}) {
|
|
777
|
+
const n = (u.get(t) ?? 0) + 1;
|
|
778
|
+
u.set(t, n);
|
|
779
|
+
const r = this._loadStrategyProducts(t, n, e);
|
|
780
|
+
return _.set(t, { token: n, outcome: r }), r;
|
|
729
781
|
},
|
|
730
|
-
async
|
|
731
|
-
const e = (g.get(t) ?? 0) + 1;
|
|
732
|
-
g.set(t, e);
|
|
782
|
+
async _loadStrategyProducts(t, e, { keepOnFailure: n = !1 }) {
|
|
733
783
|
const { recommendationConfigs: r } = this.blockStates[t];
|
|
734
|
-
let
|
|
784
|
+
let o = [], i = parseInt(r.size) || 6;
|
|
735
785
|
try {
|
|
736
786
|
await this.fetchStrategies();
|
|
737
|
-
const
|
|
738
|
-
(
|
|
787
|
+
const s = this.strategies.find(
|
|
788
|
+
(a) => String(a.strategy_id) === r.strategyId
|
|
739
789
|
);
|
|
740
|
-
if (
|
|
741
|
-
|
|
742
|
-
const
|
|
743
|
-
|
|
790
|
+
if (s) {
|
|
791
|
+
i = parseInt(String(s.size ?? "")) || i;
|
|
792
|
+
const a = r.currencySettings.value, f = (await this.resolveStrategyUrlTemplate(s, a)).replaceAll("{locale}", r.language).replaceAll("{currency}", a), c = f.indexOf("?"), g = c === -1 ? f : f.slice(0, c), S = (c === -1 ? "" : f.slice(c + 1)).split("&").filter((v) => v && !v.startsWith("user_id=")), h = S.length ? `${g}?${S.join("&")}` : g;
|
|
793
|
+
h && (o = await m.fetchRecommendationProductsByUrl(h));
|
|
744
794
|
}
|
|
745
795
|
} catch {
|
|
746
|
-
|
|
796
|
+
o = [];
|
|
747
797
|
}
|
|
748
|
-
|
|
798
|
+
return u.get(t) !== e ? W(t) : !o.length && n ? !1 : (this._setBlockProducts(t, o, i), o.length > 0);
|
|
749
799
|
},
|
|
750
|
-
_setBlockProducts(t, e,
|
|
800
|
+
_setBlockProducts(t, e, n) {
|
|
751
801
|
if (!this.blockStates[t])
|
|
752
802
|
return;
|
|
753
|
-
const
|
|
803
|
+
const r = e.length > 0 ? e : w(n);
|
|
754
804
|
this.blockStates[t].recommendationProducts = [
|
|
755
|
-
...
|
|
756
|
-
...w(Math.max(0,
|
|
805
|
+
...r.slice(0, n),
|
|
806
|
+
...w(Math.max(0, n - r.length))
|
|
757
807
|
];
|
|
758
808
|
}
|
|
759
809
|
}
|
|
760
810
|
});
|
|
761
811
|
export {
|
|
762
|
-
|
|
812
|
+
ht as useRecommendationExtensionStore
|
|
763
813
|
};
|