@getlupa/client 1.15.0 → 1.15.5

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.
@@ -6804,6 +6804,8 @@ var __async = (__this, __arguments, generator) => {
6804
6804
  const TRACKING_STORAGE_KEY = "LUPA_STATS";
6805
6805
  const TRACKING_STORAGE_KEY_BASE = "LUPA_STATS_BASE";
6806
6806
  const TRACKING_ANALYTICS_KEY = "LUPA_ANALYTICS";
6807
+ const TRACKING_CLICK_DELAYED = "LUPA_TRACKING_CLICK_DELAYED";
6808
+ const DELAYED_TRACKING_EVENTS_CACHE = "LUPA_DELAYED_TRACKING_EVENTS";
6807
6809
  const TRACKING_KEY_LENGTH = 10;
6808
6810
  const HISTORY_MAX_ITEMS = 7;
6809
6811
  const S_MIN_WIDTH = 575;
@@ -7024,6 +7026,14 @@ var __async = (__this, __arguments, generator) => {
7024
7026
  const transformedStr = typeof str === "string" ? str : str.toString();
7025
7027
  return transformedStr.normalize === void 0 ? (_a = transformedStr.toLocaleLowerCase()) == null ? void 0 : _a.trim() : (_b = transformedStr.toLocaleLowerCase().normalize("NFKD").replace(/[^\w\s.-_/]/g, "")) == null ? void 0 : _b.trim();
7026
7028
  };
7029
+ const getTransformedString = (str) => {
7030
+ var _a, _b;
7031
+ if (!str) {
7032
+ return "";
7033
+ }
7034
+ const transformedStr = typeof str === "string" ? str : str.toString();
7035
+ return transformedStr.normalize === void 0 ? (_a = transformedStr.toLocaleLowerCase()) == null ? void 0 : _a.trim() : (_b = transformedStr.toLocaleLowerCase().normalize("NFKD")) == null ? void 0 : _b.trim();
7036
+ };
7027
7037
  const capitalize$1 = (str) => {
7028
7038
  if (!str) {
7029
7039
  return "";
@@ -7097,8 +7107,8 @@ var __async = (__this, __arguments, generator) => {
7097
7107
  if (!input2) {
7098
7108
  return false;
7099
7109
  }
7100
- const normalizedInput = getNormalizedString(input2);
7101
- return possibleValues.some((v) => getNormalizedString(v) === normalizedInput);
7110
+ const normalizedInput = getTransformedString(input2);
7111
+ return possibleValues.some((v) => getTransformedString(v) === normalizedInput);
7102
7112
  };
7103
7113
  const levenshteinDistance = (s = "", t = "") => {
7104
7114
  if (!(s == null ? void 0 : s.length)) {
@@ -7131,225 +7141,6 @@ var __async = (__this, __arguments, generator) => {
7131
7141
  const closestValue = (_a = possibleValues.filter((_, i) => distances[i] === minDistance)) == null ? void 0 : _a[0];
7132
7142
  return closestValue;
7133
7143
  };
7134
- const initAnalyticsTracking = (analyticsOptions) => {
7135
- try {
7136
- if (analyticsOptions == null ? void 0 : analyticsOptions.enabled) {
7137
- window.sessionStorage.setItem(TRACKING_ANALYTICS_KEY, JSON.stringify(analyticsOptions));
7138
- } else {
7139
- window.sessionStorage.removeItem(TRACKING_ANALYTICS_KEY);
7140
- }
7141
- } catch (e2) {
7142
- }
7143
- };
7144
- const initBaseTracking = (enabled) => {
7145
- try {
7146
- if (enabled) {
7147
- window.sessionStorage.setItem(TRACKING_STORAGE_KEY_BASE, "1");
7148
- } else {
7149
- window.sessionStorage.removeItem(TRACKING_STORAGE_KEY_BASE);
7150
- clearSessionTracking();
7151
- clearUserTracking();
7152
- }
7153
- } catch (e2) {
7154
- }
7155
- };
7156
- const clearSessionTracking = () => {
7157
- try {
7158
- window.sessionStorage.removeItem(TRACKING_STORAGE_KEY);
7159
- } catch (e2) {
7160
- }
7161
- };
7162
- const initSessionTracking = () => {
7163
- try {
7164
- if (getSessionKey()) {
7165
- return;
7166
- }
7167
- const key = getRandomString(TRACKING_KEY_LENGTH);
7168
- window.sessionStorage.setItem(TRACKING_STORAGE_KEY, key);
7169
- } catch (e2) {
7170
- }
7171
- };
7172
- const initUserTracking = (userKey) => {
7173
- try {
7174
- if (getUserKey()) {
7175
- return;
7176
- }
7177
- const key = userKey || getRandomString(TRACKING_KEY_LENGTH);
7178
- window.localStorage.setItem(TRACKING_STORAGE_KEY, key);
7179
- } catch (e2) {
7180
- }
7181
- };
7182
- const clearUserTracking = () => {
7183
- try {
7184
- window.localStorage.removeItem(TRACKING_STORAGE_KEY);
7185
- } catch (e2) {
7186
- }
7187
- };
7188
- const isTrackingEnabled = () => {
7189
- try {
7190
- return Boolean(window.sessionStorage.getItem(TRACKING_STORAGE_KEY_BASE));
7191
- } catch (e2) {
7192
- return false;
7193
- }
7194
- };
7195
- const getSessionKey = () => {
7196
- var _a;
7197
- try {
7198
- return (_a = window.sessionStorage.getItem(TRACKING_STORAGE_KEY)) != null ? _a : void 0;
7199
- } catch (e2) {
7200
- return void 0;
7201
- }
7202
- };
7203
- const getUserKey = () => {
7204
- var _a;
7205
- try {
7206
- return (_a = window.localStorage.getItem(TRACKING_STORAGE_KEY)) != null ? _a : void 0;
7207
- } catch (e2) {
7208
- return void 0;
7209
- }
7210
- };
7211
- const initTracking = (options) => {
7212
- initBaseTracking(Boolean(options.trackBase));
7213
- if (options.trackSession) {
7214
- initSessionTracking();
7215
- } else {
7216
- clearSessionTracking();
7217
- }
7218
- if (options.trackUser) {
7219
- initUserTracking(options.userKey);
7220
- } else {
7221
- clearUserTracking();
7222
- }
7223
- if (options.analytics) {
7224
- initAnalyticsTracking(options.analytics);
7225
- }
7226
- };
7227
- const getLupaTrackingContext = () => {
7228
- if (!isTrackingEnabled()) {
7229
- return {};
7230
- }
7231
- return {
7232
- userId: getUserKey(),
7233
- sessionId: getSessionKey()
7234
- };
7235
- };
7236
- const trackLupaEvent = (queryKey, data = {}, options) => {
7237
- var _a, _b;
7238
- if (!queryKey || !data.type) {
7239
- return;
7240
- }
7241
- const eventData = {
7242
- searchQuery: (_a = data.searchQuery) != null ? _a : "",
7243
- itemId: (_b = data.itemId) != null ? _b : "",
7244
- name: data.type,
7245
- userId: getUserKey(),
7246
- sessionId: getSessionKey(),
7247
- filters: data.filters
7248
- };
7249
- LupaSearchSdk.track(queryKey, eventData, options);
7250
- };
7251
- const sendGa = (name, ...args) => {
7252
- window.ga(() => {
7253
- const trackers = window.ga.getAll();
7254
- const firstTracker = trackers[0];
7255
- if (!firstTracker) {
7256
- console.error("GA tracker not found");
7257
- }
7258
- const trackerName = firstTracker.get("name");
7259
- window.ga(`${trackerName}.${name}`, ...args);
7260
- });
7261
- };
7262
- const trackAnalyticsEvent = (data) => {
7263
- var _a, _b, _c;
7264
- try {
7265
- const options = JSON.parse(
7266
- (_a = window.sessionStorage.getItem(TRACKING_ANALYTICS_KEY)) != null ? _a : "{}"
7267
- );
7268
- if (!data.analytics || !options.enabled || ((_c = options.ignoreEvents) == null ? void 0 : _c.includes((_b = data.analytics) == null ? void 0 : _b.type))) {
7269
- return;
7270
- }
7271
- switch (options.type) {
7272
- case "ua":
7273
- sendUaAnalyticsEvent(data, options);
7274
- break;
7275
- case "ga4":
7276
- sendGa4AnalyticsEvent(data, options);
7277
- break;
7278
- case "debug":
7279
- processDebugEvent(data);
7280
- break;
7281
- default:
7282
- sendUaAnalyticsEvent(data, options);
7283
- }
7284
- } catch (e2) {
7285
- console.error("Unable to send an event to google analytics");
7286
- }
7287
- };
7288
- const parseEcommerceData = (data, title) => {
7289
- var _a, _b;
7290
- return ((_a = data.analytics) == null ? void 0 : _a.items) ? {
7291
- item_list_name: title,
7292
- items: (_b = data.analytics) == null ? void 0 : _b.items
7293
- } : void 0;
7294
- };
7295
- const sendUaAnalyticsEvent = (data, options) => {
7296
- var _a, _b, _c, _d;
7297
- const ga = window.ga;
7298
- if (!ga) {
7299
- console.error("Google Analytics object not found");
7300
- return;
7301
- }
7302
- sendGa(
7303
- "send",
7304
- "event",
7305
- options.parentEventName,
7306
- (_b = (_a = data.analytics) == null ? void 0 : _a.type) != null ? _b : "",
7307
- (_d = (_c = data.analytics) == null ? void 0 : _c.label) != null ? _d : ""
7308
- );
7309
- };
7310
- const sendGa4AnalyticsEvent = (data, options) => {
7311
- var _a, _b, _c, _d, _e, _f, _g;
7312
- if (!window || !window.dataLayer) {
7313
- console.error("dataLayer object not found.");
7314
- return;
7315
- }
7316
- const sendItemTitle = data.searchQuery !== ((_a = data.analytics) == null ? void 0 : _a.label);
7317
- const title = sendItemTitle ? (_b = data.analytics) == null ? void 0 : _b.label : void 0;
7318
- const params = __spreadValues2({
7319
- search_text: data.searchQuery,
7320
- item_title: title,
7321
- item_id: data.itemId,
7322
- ecommerce: parseEcommerceData(data, (_c = data.analytics) == null ? void 0 : _c.listLabel)
7323
- }, (_e = (_d = data.analytics) == null ? void 0 : _d.additionalParams) != null ? _e : {});
7324
- window.dataLayer.push(__spreadValues2({
7325
- event: (_g = (_f = data.analytics) == null ? void 0 : _f.type) != null ? _g : options.parentEventName
7326
- }, params));
7327
- };
7328
- const processDebugEvent = (data) => {
7329
- var _a, _b, _c, _d;
7330
- const sendItemTitle = data.searchQuery !== ((_a = data.analytics) == null ? void 0 : _a.label);
7331
- const title = sendItemTitle ? (_b = data.analytics) == null ? void 0 : _b.label : void 0;
7332
- const params = {
7333
- event: (_c = data.analytics) == null ? void 0 : _c.type,
7334
- search_text: data.searchQuery,
7335
- item_title: title,
7336
- item_id: data.itemId,
7337
- ecommerce: parseEcommerceData(data, (_d = data.analytics) == null ? void 0 : _d.listLabel)
7338
- };
7339
- console.debug("Analytics debug event:", params);
7340
- };
7341
- const track = (queryKey, data = {}, options) => {
7342
- var _a;
7343
- if (!isTrackingEnabled()) {
7344
- return;
7345
- }
7346
- const hasSearchQuery = data.searchQuery;
7347
- if (!hasSearchQuery && !((_a = data.options) == null ? void 0 : _a.allowEmptySearchQuery)) {
7348
- return;
7349
- }
7350
- trackAnalyticsEvent(data);
7351
- trackLupaEvent(queryKey, data, options);
7352
- };
7353
7144
  const DEFAULT_SEARCH_BOX_OPTIONS$1 = {
7354
7145
  inputSelector: "#searchBox",
7355
7146
  options: {
@@ -7554,83 +7345,343 @@ var __async = (__this, __arguments, generator) => {
7554
7345
  var _a;
7555
7346
  return (_a = searchBoxOptions.value.options) != null ? _a : searchResultOptions.value.options;
7556
7347
  }
7557
- );
7558
- const classMap = computed(() => {
7559
- var _a;
7560
- return (_a = searchResultOptions.value.classMap) != null ? _a : {};
7561
- });
7562
- const initialFilters = computed(() => searchResultInitialFilters.value);
7563
- const boxRoutingBehavior = computed(() => {
7564
- var _a;
7565
- return (_a = searchBoxOptions.value.routingBehavior) != null ? _a : "direct-link";
7348
+ );
7349
+ const classMap = computed(() => {
7350
+ var _a;
7351
+ return (_a = searchResultOptions.value.classMap) != null ? _a : {};
7352
+ });
7353
+ const initialFilters = computed(() => searchResultInitialFilters.value);
7354
+ const boxRoutingBehavior = computed(() => {
7355
+ var _a;
7356
+ return (_a = searchBoxOptions.value.routingBehavior) != null ? _a : "direct-link";
7357
+ });
7358
+ const searchResultsRoutingBehavior = computed(
7359
+ () => {
7360
+ var _a;
7361
+ return (_a = searchResultOptions.value.routingBehavior) != null ? _a : "direct-link";
7362
+ }
7363
+ );
7364
+ const defaultSearchResultPageSize = computed(
7365
+ () => {
7366
+ var _a, _b;
7367
+ return (_b = (_a = currentResolutionPageSizes.value) == null ? void 0 : _a[0]) != null ? _b : DEFAULT_PAGE_SIZE;
7368
+ }
7369
+ );
7370
+ const currentResolutionPageSizes = computed(() => {
7371
+ var _a, _b, _c, _d;
7372
+ const pageSizes = (_d = (_c = (_b = (_a = searchResultOptions.value) == null ? void 0 : _a.pagination) == null ? void 0 : _b.sizeSelection) == null ? void 0 : _c.sizes) != null ? _d : DEFAULT_PAGE_SIZE_SELECTION;
7373
+ if (Array.isArray(pageSizes)) {
7374
+ return pageSizes;
7375
+ }
7376
+ const screenSize = screenStore.currentScreenWidth;
7377
+ switch (screenSize) {
7378
+ case "xs":
7379
+ return pageSizes.xs;
7380
+ case "sm":
7381
+ return pageSizes.sm;
7382
+ case "md":
7383
+ return pageSizes.md;
7384
+ case "l":
7385
+ return pageSizes.l;
7386
+ case "xl":
7387
+ return pageSizes.xl;
7388
+ }
7389
+ });
7390
+ const setSearchBoxOptions = ({ options }) => {
7391
+ searchBoxOptions.value = options;
7392
+ };
7393
+ const setTrackingOptions = ({ options }) => {
7394
+ trackingOptions.value = options;
7395
+ };
7396
+ const setSearchResultOptions = ({ options }) => {
7397
+ searchResultOptions.value = options;
7398
+ };
7399
+ const setInitialFilters = ({ initialFilters: initialFilters2 }) => {
7400
+ searchResultInitialFilters.value = initialFilters2;
7401
+ };
7402
+ const getQueryParamName = (param) => {
7403
+ var _a;
7404
+ const nameMap = searchBoxOptions.value.queryParameterNames;
7405
+ return (_a = nameMap == null ? void 0 : nameMap[param]) != null ? _a : param;
7406
+ };
7407
+ return {
7408
+ searchBoxOptions,
7409
+ searchResultOptions,
7410
+ trackingOptions,
7411
+ envOptions,
7412
+ classMap,
7413
+ initialFilters,
7414
+ boxRoutingBehavior,
7415
+ searchResultsRoutingBehavior,
7416
+ defaultSearchResultPageSize,
7417
+ currentResolutionPageSizes,
7418
+ setSearchBoxOptions,
7419
+ setTrackingOptions,
7420
+ setSearchResultOptions,
7421
+ setInitialFilters,
7422
+ getQueryParamName
7423
+ };
7424
+ });
7425
+ const initAnalyticsTracking = (analyticsOptions) => {
7426
+ try {
7427
+ if (analyticsOptions == null ? void 0 : analyticsOptions.enabled) {
7428
+ window.sessionStorage.setItem(TRACKING_ANALYTICS_KEY, JSON.stringify(analyticsOptions));
7429
+ } else {
7430
+ window.sessionStorage.removeItem(TRACKING_ANALYTICS_KEY);
7431
+ }
7432
+ } catch (e2) {
7433
+ }
7434
+ };
7435
+ const initBaseTracking = (enabled) => {
7436
+ try {
7437
+ if (enabled) {
7438
+ window.sessionStorage.setItem(TRACKING_STORAGE_KEY_BASE, "1");
7439
+ } else {
7440
+ window.sessionStorage.removeItem(TRACKING_STORAGE_KEY_BASE);
7441
+ clearSessionTracking();
7442
+ clearUserTracking();
7443
+ }
7444
+ } catch (e2) {
7445
+ }
7446
+ };
7447
+ const clearSessionTracking = () => {
7448
+ try {
7449
+ window.sessionStorage.removeItem(TRACKING_STORAGE_KEY);
7450
+ } catch (e2) {
7451
+ }
7452
+ };
7453
+ const initSessionTracking = () => {
7454
+ try {
7455
+ if (getSessionKey()) {
7456
+ return;
7457
+ }
7458
+ const key = getRandomString(TRACKING_KEY_LENGTH);
7459
+ window.sessionStorage.setItem(TRACKING_STORAGE_KEY, key);
7460
+ } catch (e2) {
7461
+ }
7462
+ };
7463
+ const initUserTracking = (userKey) => {
7464
+ try {
7465
+ if (getUserKey()) {
7466
+ return;
7467
+ }
7468
+ const key = userKey || getRandomString(TRACKING_KEY_LENGTH);
7469
+ window.localStorage.setItem(TRACKING_STORAGE_KEY, key);
7470
+ } catch (e2) {
7471
+ }
7472
+ };
7473
+ const clearUserTracking = () => {
7474
+ try {
7475
+ window.localStorage.removeItem(TRACKING_STORAGE_KEY);
7476
+ } catch (e2) {
7477
+ }
7478
+ };
7479
+ const isTrackingEnabled = () => {
7480
+ try {
7481
+ return Boolean(window.sessionStorage.getItem(TRACKING_STORAGE_KEY_BASE));
7482
+ } catch (e2) {
7483
+ return false;
7484
+ }
7485
+ };
7486
+ const isDelayedClickTracking = () => {
7487
+ try {
7488
+ return Boolean(window.localStorage.getItem(TRACKING_CLICK_DELAYED));
7489
+ } catch (e2) {
7490
+ return false;
7491
+ }
7492
+ };
7493
+ const getSessionKey = () => {
7494
+ var _a;
7495
+ try {
7496
+ return (_a = window.sessionStorage.getItem(TRACKING_STORAGE_KEY)) != null ? _a : void 0;
7497
+ } catch (e2) {
7498
+ return void 0;
7499
+ }
7500
+ };
7501
+ const getUserKey = () => {
7502
+ var _a;
7503
+ try {
7504
+ return (_a = window.localStorage.getItem(TRACKING_STORAGE_KEY)) != null ? _a : void 0;
7505
+ } catch (e2) {
7506
+ return void 0;
7507
+ }
7508
+ };
7509
+ const initTracking = (options) => {
7510
+ initBaseTracking(Boolean(options.trackBase));
7511
+ if (options.trackSession) {
7512
+ initSessionTracking();
7513
+ } else {
7514
+ clearSessionTracking();
7515
+ }
7516
+ if (options.trackUser) {
7517
+ initUserTracking(options.userKey);
7518
+ } else {
7519
+ clearUserTracking();
7520
+ }
7521
+ if (options.analytics) {
7522
+ initAnalyticsTracking(options.analytics);
7523
+ }
7524
+ if (options.delayedClickTracking) {
7525
+ window.localStorage.setItem(TRACKING_CLICK_DELAYED, "1");
7526
+ checkAndDispatchDelayedEvents();
7527
+ } else {
7528
+ window.localStorage.removeItem(TRACKING_CLICK_DELAYED);
7529
+ }
7530
+ };
7531
+ const getLupaTrackingContext = () => {
7532
+ if (!isTrackingEnabled()) {
7533
+ return {};
7534
+ }
7535
+ return {
7536
+ userId: getUserKey(),
7537
+ sessionId: getSessionKey()
7538
+ };
7539
+ };
7540
+ const trackLupaEvent = (queryKey, data = {}, options) => {
7541
+ var _a, _b;
7542
+ if (!queryKey || !data.type) {
7543
+ return;
7544
+ }
7545
+ const eventData = {
7546
+ searchQuery: (_a = data.searchQuery) != null ? _a : "",
7547
+ itemId: (_b = data.itemId) != null ? _b : "",
7548
+ name: data.type,
7549
+ userId: getUserKey(),
7550
+ sessionId: getSessionKey(),
7551
+ filters: data.filters
7552
+ };
7553
+ LupaSearchSdk.track(queryKey, eventData, options);
7554
+ };
7555
+ const sendGa = (name, ...args) => {
7556
+ window.ga(() => {
7557
+ const trackers = window.ga.getAll();
7558
+ const firstTracker = trackers[0];
7559
+ if (!firstTracker) {
7560
+ console.error("GA tracker not found");
7561
+ }
7562
+ const trackerName = firstTracker.get("name");
7563
+ window.ga(`${trackerName}.${name}`, ...args);
7566
7564
  });
7567
- const searchResultsRoutingBehavior = computed(
7568
- () => {
7569
- var _a;
7570
- return (_a = searchResultOptions.value.routingBehavior) != null ? _a : "direct-link";
7565
+ };
7566
+ const trackAnalyticsEvent = (data) => {
7567
+ var _a, _b, _c;
7568
+ try {
7569
+ const options = JSON.parse(
7570
+ (_a = window.sessionStorage.getItem(TRACKING_ANALYTICS_KEY)) != null ? _a : "{}"
7571
+ );
7572
+ if (!data.analytics || !options.enabled || ((_c = options.ignoreEvents) == null ? void 0 : _c.includes((_b = data.analytics) == null ? void 0 : _b.type))) {
7573
+ return;
7571
7574
  }
7572
- );
7573
- const defaultSearchResultPageSize = computed(
7574
- () => {
7575
- var _a, _b;
7576
- return (_b = (_a = currentResolutionPageSizes.value) == null ? void 0 : _a[0]) != null ? _b : DEFAULT_PAGE_SIZE;
7575
+ switch (options.type) {
7576
+ case "ua":
7577
+ sendUaAnalyticsEvent(data, options);
7578
+ break;
7579
+ case "ga4":
7580
+ sendGa4AnalyticsEvent(data, options);
7581
+ break;
7582
+ case "debug":
7583
+ processDebugEvent(data);
7584
+ break;
7585
+ default:
7586
+ sendUaAnalyticsEvent(data, options);
7577
7587
  }
7588
+ } catch (e2) {
7589
+ console.error("Unable to send an event to google analytics");
7590
+ }
7591
+ };
7592
+ const parseEcommerceData = (data, title) => {
7593
+ var _a, _b;
7594
+ return ((_a = data.analytics) == null ? void 0 : _a.items) ? {
7595
+ item_list_name: title,
7596
+ items: (_b = data.analytics) == null ? void 0 : _b.items
7597
+ } : void 0;
7598
+ };
7599
+ const sendUaAnalyticsEvent = (data, options) => {
7600
+ var _a, _b, _c, _d;
7601
+ const ga = window.ga;
7602
+ if (!ga) {
7603
+ console.error("Google Analytics object not found");
7604
+ return;
7605
+ }
7606
+ sendGa(
7607
+ "send",
7608
+ "event",
7609
+ options.parentEventName,
7610
+ (_b = (_a = data.analytics) == null ? void 0 : _a.type) != null ? _b : "",
7611
+ (_d = (_c = data.analytics) == null ? void 0 : _c.label) != null ? _d : ""
7578
7612
  );
7579
- const currentResolutionPageSizes = computed(() => {
7580
- var _a, _b, _c, _d;
7581
- const pageSizes = (_d = (_c = (_b = (_a = searchResultOptions.value) == null ? void 0 : _a.pagination) == null ? void 0 : _b.sizeSelection) == null ? void 0 : _c.sizes) != null ? _d : DEFAULT_PAGE_SIZE_SELECTION;
7582
- if (Array.isArray(pageSizes)) {
7583
- return pageSizes;
7584
- }
7585
- const screenSize = screenStore.currentScreenWidth;
7586
- switch (screenSize) {
7587
- case "xs":
7588
- return pageSizes.xs;
7589
- case "sm":
7590
- return pageSizes.sm;
7591
- case "md":
7592
- return pageSizes.md;
7593
- case "l":
7594
- return pageSizes.l;
7595
- case "xl":
7596
- return pageSizes.xl;
7597
- }
7598
- });
7599
- const setSearchBoxOptions = ({ options }) => {
7600
- searchBoxOptions.value = options;
7601
- };
7602
- const setTrackingOptions = ({ options }) => {
7603
- trackingOptions.value = options;
7604
- };
7605
- const setSearchResultOptions = ({ options }) => {
7606
- searchResultOptions.value = options;
7607
- };
7608
- const setInitialFilters = ({ initialFilters: initialFilters2 }) => {
7609
- searchResultInitialFilters.value = initialFilters2;
7610
- };
7611
- const getQueryParamName = (param) => {
7612
- var _a;
7613
- const nameMap = searchBoxOptions.value.queryParameterNames;
7614
- return (_a = nameMap == null ? void 0 : nameMap[param]) != null ? _a : param;
7615
- };
7616
- return {
7617
- searchBoxOptions,
7618
- searchResultOptions,
7619
- trackingOptions,
7620
- envOptions,
7621
- classMap,
7622
- initialFilters,
7623
- boxRoutingBehavior,
7624
- searchResultsRoutingBehavior,
7625
- defaultSearchResultPageSize,
7626
- currentResolutionPageSizes,
7627
- setSearchBoxOptions,
7628
- setTrackingOptions,
7629
- setSearchResultOptions,
7630
- setInitialFilters,
7631
- getQueryParamName
7613
+ };
7614
+ const sendGa4AnalyticsEvent = (data, options) => {
7615
+ var _a, _b, _c, _d, _e, _f, _g;
7616
+ if (!window || !window.dataLayer) {
7617
+ console.error("dataLayer object not found.");
7618
+ return;
7619
+ }
7620
+ const sendItemTitle = data.searchQuery !== ((_a = data.analytics) == null ? void 0 : _a.label);
7621
+ const title = sendItemTitle ? (_b = data.analytics) == null ? void 0 : _b.label : void 0;
7622
+ const params = __spreadValues2({
7623
+ search_text: data.searchQuery,
7624
+ item_title: title,
7625
+ item_id: data.itemId,
7626
+ ecommerce: parseEcommerceData(data, (_c = data.analytics) == null ? void 0 : _c.listLabel)
7627
+ }, (_e = (_d = data.analytics) == null ? void 0 : _d.additionalParams) != null ? _e : {});
7628
+ window.dataLayer.push(__spreadValues2({
7629
+ event: (_g = (_f = data.analytics) == null ? void 0 : _f.type) != null ? _g : options.parentEventName
7630
+ }, params));
7631
+ };
7632
+ const processDebugEvent = (data) => {
7633
+ var _a, _b, _c, _d;
7634
+ const sendItemTitle = data.searchQuery !== ((_a = data.analytics) == null ? void 0 : _a.label);
7635
+ const title = sendItemTitle ? (_b = data.analytics) == null ? void 0 : _b.label : void 0;
7636
+ const params = {
7637
+ event: (_c = data.analytics) == null ? void 0 : _c.type,
7638
+ search_text: data.searchQuery,
7639
+ item_title: title,
7640
+ item_id: data.itemId,
7641
+ ecommerce: parseEcommerceData(data, (_d = data.analytics) == null ? void 0 : _d.listLabel)
7632
7642
  };
7633
- });
7643
+ console.debug("Analytics debug event:", params);
7644
+ };
7645
+ const getDelayedEventsCache = () => {
7646
+ var _a;
7647
+ try {
7648
+ return JSON.parse((_a = window.localStorage.getItem(DELAYED_TRACKING_EVENTS_CACHE)) != null ? _a : "{}");
7649
+ } catch (e2) {
7650
+ return {};
7651
+ }
7652
+ };
7653
+ const storeDelayedEventCache = (cache) => {
7654
+ try {
7655
+ window.localStorage.setItem(DELAYED_TRACKING_EVENTS_CACHE, JSON.stringify(cache));
7656
+ } catch (e2) {
7657
+ }
7658
+ };
7659
+ const checkAndDispatchDelayedEvents = () => {
7660
+ var _a, _b;
7661
+ const optionsStore = useOptionsStore();
7662
+ const eventCache = getDelayedEventsCache();
7663
+ const urls = Object.keys(eventCache);
7664
+ for (const url of urls) {
7665
+ if ((_a = window.location.href) == null ? void 0 : _a.includes(url)) {
7666
+ const options = (_b = optionsStore.envOptions) != null ? _b : { environment: "production" };
7667
+ const { queryKey, data } = eventCache[url];
7668
+ track(queryKey, data, options);
7669
+ }
7670
+ }
7671
+ storeDelayedEventCache({});
7672
+ };
7673
+ const track = (queryKey, data = {}, options) => {
7674
+ var _a;
7675
+ if (!isTrackingEnabled()) {
7676
+ return;
7677
+ }
7678
+ const hasSearchQuery = data.searchQuery;
7679
+ if (!hasSearchQuery && !((_a = data.options) == null ? void 0 : _a.allowEmptySearchQuery)) {
7680
+ return;
7681
+ }
7682
+ trackAnalyticsEvent(data);
7683
+ trackLupaEvent(queryKey, data, options);
7684
+ };
7634
7685
  var DocumentElementType = /* @__PURE__ */ ((DocumentElementType2) => {
7635
7686
  DocumentElementType2["IMAGE"] = "image";
7636
7687
  DocumentElementType2["TITLE"] = "title";
@@ -8139,7 +8190,11 @@ var __async = (__this, __arguments, generator) => {
8139
8190
  try {
8140
8191
  localStorage.setItem(
8141
8192
  CACHE_KEY,
8142
- JSON.stringify({ redirections: redirections.value, savedAt: Date.now() })
8193
+ JSON.stringify({
8194
+ redirections: redirections.value,
8195
+ savedAt: Date.now(),
8196
+ queryKey: redirectionOptions.value.queryKey
8197
+ })
8143
8198
  );
8144
8199
  } catch (e2) {
8145
8200
  }
@@ -8150,6 +8205,9 @@ var __async = (__this, __arguments, generator) => {
8150
8205
  return false;
8151
8206
  try {
8152
8207
  const data = JSON.parse((_a = localStorage.getItem(CACHE_KEY)) != null ? _a : "");
8208
+ if (data.queryKey !== config.queryKey) {
8209
+ return false;
8210
+ }
8153
8211
  if ((data == null ? void 0 : data.redirections) && Date.now() - data.savedAt < 1e3 * config.cacheSeconds) {
8154
8212
  redirections.value = data.redirections;
8155
8213
  return true;
@@ -8174,6 +8232,7 @@ var __async = (__this, __arguments, generator) => {
8174
8232
  try {
8175
8233
  const result2 = yield LupaSearchSdk.loadRedirectionRules(config.queryKey, options);
8176
8234
  if (!((_d = result2 == null ? void 0 : result2.rules) == null ? void 0 : _d.length)) {
8235
+ redirections.value = { rules: [] };
8177
8236
  return;
8178
8237
  }
8179
8238
  redirections.value = result2;
@@ -8611,10 +8670,10 @@ var __async = (__this, __arguments, generator) => {
8611
8670
  resetHighlightIndex
8612
8671
  };
8613
8672
  });
8614
- const _hoisted_1$1g = { id: "lupa-search-box-input-container" };
8615
- const _hoisted_2$U = { class: "lupa-input-clear" };
8616
- const _hoisted_3$D = { id: "lupa-search-box-input" };
8617
- const _hoisted_4$s = ["value"];
8673
+ const _hoisted_1$1h = { id: "lupa-search-box-input-container" };
8674
+ const _hoisted_2$V = { class: "lupa-input-clear" };
8675
+ const _hoisted_3$E = { id: "lupa-search-box-input" };
8676
+ const _hoisted_4$t = ["value"];
8618
8677
  const _hoisted_5$j = ["aria-label", "placeholder"];
8619
8678
  const _hoisted_6$9 = /* @__PURE__ */ createBaseVNode("span", { class: "lupa-search-submit-icon" }, null, -1);
8620
8679
  const _hoisted_7$7 = [
@@ -8624,7 +8683,7 @@ var __async = (__this, __arguments, generator) => {
8624
8683
  key: 0,
8625
8684
  class: "lupa-close-label"
8626
8685
  };
8627
- const _sfc_main$1s = /* @__PURE__ */ defineComponent({
8686
+ const _sfc_main$1t = /* @__PURE__ */ defineComponent({
8628
8687
  __name: "SearchBoxInput",
8629
8688
  props: {
8630
8689
  options: {},
@@ -8708,20 +8767,20 @@ var __async = (__this, __arguments, generator) => {
8708
8767
  };
8709
8768
  __expose({ focus });
8710
8769
  return (_ctx, _cache) => {
8711
- return openBlock(), createElementBlock("div", _hoisted_1$1g, [
8712
- createBaseVNode("div", _hoisted_2$U, [
8770
+ return openBlock(), createElementBlock("div", _hoisted_1$1h, [
8771
+ createBaseVNode("div", _hoisted_2$V, [
8713
8772
  createBaseVNode("div", {
8714
8773
  class: normalizeClass(["lupa-input-clear-content", { "lupa-input-clear-filled": inputValue.value }]),
8715
8774
  onClick: clear2
8716
8775
  }, null, 2)
8717
8776
  ]),
8718
- createBaseVNode("div", _hoisted_3$D, [
8777
+ createBaseVNode("div", _hoisted_3$E, [
8719
8778
  createBaseVNode("input", {
8720
8779
  class: "lupa-hint",
8721
8780
  "aria-hidden": "true",
8722
8781
  value: showHint.value ? suggestedValue.value.item.suggestion : "",
8723
8782
  disabled: ""
8724
- }, null, 8, _hoisted_4$s),
8783
+ }, null, 8, _hoisted_4$t),
8725
8784
  withDirectives(createBaseVNode("input", mergeProps({
8726
8785
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => inputValue.value = $event)
8727
8786
  }, inputAttributes.value, {
@@ -8754,7 +8813,7 @@ var __async = (__this, __arguments, generator) => {
8754
8813
  };
8755
8814
  }
8756
8815
  });
8757
- const _sfc_main$1r = /* @__PURE__ */ defineComponent({
8816
+ const _sfc_main$1s = /* @__PURE__ */ defineComponent({
8758
8817
  __name: "SearchBoxMoreResults",
8759
8818
  props: {
8760
8819
  labels: {},
@@ -8786,9 +8845,9 @@ var __async = (__this, __arguments, generator) => {
8786
8845
  };
8787
8846
  }
8788
8847
  });
8789
- const _hoisted_1$1f = { class: "lupa-search-box-history-item" };
8790
- const _hoisted_2$T = { class: "lupa-search-box-history-item-content" };
8791
- const _sfc_main$1q = /* @__PURE__ */ defineComponent({
8848
+ const _hoisted_1$1g = { class: "lupa-search-box-history-item" };
8849
+ const _hoisted_2$U = { class: "lupa-search-box-history-item-content" };
8850
+ const _sfc_main$1r = /* @__PURE__ */ defineComponent({
8792
8851
  __name: "SearchBoxHistoryItem",
8793
8852
  props: {
8794
8853
  item: {},
@@ -8804,8 +8863,8 @@ var __async = (__this, __arguments, generator) => {
8804
8863
  emit2("click", { query: props.item });
8805
8864
  };
8806
8865
  return (_ctx, _cache) => {
8807
- return openBlock(), createElementBlock("div", _hoisted_1$1f, [
8808
- createBaseVNode("div", _hoisted_2$T, [
8866
+ return openBlock(), createElementBlock("div", _hoisted_1$1g, [
8867
+ createBaseVNode("div", _hoisted_2$U, [
8809
8868
  createBaseVNode("div", {
8810
8869
  class: normalizeClass(["lupa-search-box-history-item-text", { "lupa-search-box-history-item-highlighted": _ctx.highlighted }]),
8811
8870
  onClick: click2
@@ -8819,11 +8878,11 @@ var __async = (__this, __arguments, generator) => {
8819
8878
  };
8820
8879
  }
8821
8880
  });
8822
- const _hoisted_1$1e = {
8881
+ const _hoisted_1$1f = {
8823
8882
  key: 0,
8824
8883
  class: "lupa-search-box-history-panel"
8825
8884
  };
8826
- const _sfc_main$1p = /* @__PURE__ */ defineComponent({
8885
+ const _sfc_main$1q = /* @__PURE__ */ defineComponent({
8827
8886
  __name: "SearchBoxHistoryPanel",
8828
8887
  props: {
8829
8888
  options: {}
@@ -8864,9 +8923,9 @@ var __async = (__this, __arguments, generator) => {
8864
8923
  }
8865
8924
  };
8866
8925
  return (_ctx, _cache) => {
8867
- return hasHistory.value ? (openBlock(), createElementBlock("div", _hoisted_1$1e, [
8926
+ return hasHistory.value ? (openBlock(), createElementBlock("div", _hoisted_1$1f, [
8868
8927
  (openBlock(true), createElementBlock(Fragment, null, renderList(unref(history), (item, index) => {
8869
- return openBlock(), createBlock(_sfc_main$1q, {
8928
+ return openBlock(), createBlock(_sfc_main$1r, {
8870
8929
  key: item,
8871
8930
  item,
8872
8931
  highlighted: index === highlightIndex.value,
@@ -8882,15 +8941,15 @@ var __async = (__this, __arguments, generator) => {
8882
8941
  };
8883
8942
  }
8884
8943
  });
8885
- const _hoisted_1$1d = { class: "lupa-search-box-no-results" };
8886
- const _sfc_main$1o = /* @__PURE__ */ defineComponent({
8944
+ const _hoisted_1$1e = { class: "lupa-search-box-no-results" };
8945
+ const _sfc_main$1p = /* @__PURE__ */ defineComponent({
8887
8946
  __name: "SearchBoxNoResults",
8888
8947
  props: {
8889
8948
  labels: {}
8890
8949
  },
8891
8950
  setup(__props) {
8892
8951
  return (_ctx, _cache) => {
8893
- return openBlock(), createElementBlock("p", _hoisted_1$1d, toDisplayString(_ctx.labels.noResults), 1);
8952
+ return openBlock(), createElementBlock("p", _hoisted_1$1e, toDisplayString(_ctx.labels.noResults), 1);
8894
8953
  };
8895
8954
  }
8896
8955
  });
@@ -8922,18 +8981,18 @@ var __async = (__this, __arguments, generator) => {
8922
8981
  }
8923
8982
  return gridTemplate.join(" ");
8924
8983
  };
8925
- const _hoisted_1$1c = ["innerHTML"];
8926
- const _hoisted_2$S = {
8984
+ const _hoisted_1$1d = ["innerHTML"];
8985
+ const _hoisted_2$T = {
8927
8986
  key: 1,
8928
8987
  "data-cy": "lupa-suggestion-value",
8929
8988
  class: "lupa-suggestion-value"
8930
8989
  };
8931
- const _hoisted_3$C = {
8990
+ const _hoisted_3$D = {
8932
8991
  key: 2,
8933
8992
  class: "lupa-suggestion-facet",
8934
8993
  "data-cy": "lupa-suggestion-facet"
8935
8994
  };
8936
- const _hoisted_4$r = {
8995
+ const _hoisted_4$s = {
8937
8996
  class: "lupa-suggestion-facet-label",
8938
8997
  "data-cy": "lupa-suggestion-facet-label"
8939
8998
  };
@@ -8941,7 +9000,7 @@ var __async = (__this, __arguments, generator) => {
8941
9000
  class: "lupa-suggestion-facet-value",
8942
9001
  "data-cy": "lupa-suggestion-facet-value"
8943
9002
  };
8944
- const _sfc_main$1n = /* @__PURE__ */ defineComponent({
9003
+ const _sfc_main$1o = /* @__PURE__ */ defineComponent({
8945
9004
  __name: "SearchBoxSuggestion",
8946
9005
  props: {
8947
9006
  suggestion: {},
@@ -8977,20 +9036,20 @@ var __async = (__this, __arguments, generator) => {
8977
9036
  class: "lupa-suggestion-value",
8978
9037
  "data-cy": "lupa-suggestion-value",
8979
9038
  innerHTML: _ctx.suggestion.displayHighlight
8980
- }, null, 8, _hoisted_1$1c)) : (openBlock(), createElementBlock("div", _hoisted_2$S, toDisplayString(_ctx.suggestion.display), 1)),
8981
- _ctx.suggestion.facet ? (openBlock(), createElementBlock("div", _hoisted_3$C, [
8982
- createBaseVNode("span", _hoisted_4$r, toDisplayString(facetLabel.value), 1),
9039
+ }, null, 8, _hoisted_1$1d)) : (openBlock(), createElementBlock("div", _hoisted_2$T, toDisplayString(_ctx.suggestion.display), 1)),
9040
+ _ctx.suggestion.facet ? (openBlock(), createElementBlock("div", _hoisted_3$D, [
9041
+ createBaseVNode("span", _hoisted_4$s, toDisplayString(facetLabel.value), 1),
8983
9042
  createBaseVNode("span", _hoisted_5$i, toDisplayString(_ctx.suggestion.facet.title), 1)
8984
9043
  ])) : createCommentVNode("", true)
8985
9044
  ]);
8986
9045
  };
8987
9046
  }
8988
9047
  });
8989
- const _hoisted_1$1b = {
9048
+ const _hoisted_1$1c = {
8990
9049
  id: "lupa-search-box-suggestions",
8991
9050
  "data-cy": "lupa-search-box-suggestions"
8992
9051
  };
8993
- const _sfc_main$1m = /* @__PURE__ */ defineComponent({
9052
+ const _sfc_main$1n = /* @__PURE__ */ defineComponent({
8994
9053
  __name: "SearchBoxSuggestions",
8995
9054
  props: {
8996
9055
  items: {},
@@ -9050,9 +9109,9 @@ var __async = (__this, __arguments, generator) => {
9050
9109
  });
9051
9110
  });
9052
9111
  return (_ctx, _cache) => {
9053
- return openBlock(), createElementBlock("div", _hoisted_1$1b, [
9112
+ return openBlock(), createElementBlock("div", _hoisted_1$1c, [
9054
9113
  (openBlock(true), createElementBlock(Fragment, null, renderList(items.value, (item, index) => {
9055
- return openBlock(), createBlock(_sfc_main$1n, {
9114
+ return openBlock(), createBlock(_sfc_main$1o, {
9056
9115
  key: getSuggestionKey(item),
9057
9116
  class: normalizeClass(["lupa-suggestion", index === highlightedIndex.value ? "lupa-suggestion-highlighted" : ""]),
9058
9117
  suggestion: item,
@@ -9080,7 +9139,7 @@ var __async = (__this, __arguments, generator) => {
9080
9139
  }, timeout);
9081
9140
  };
9082
9141
  };
9083
- const _sfc_main$1l = /* @__PURE__ */ defineComponent({
9142
+ const _sfc_main$1m = /* @__PURE__ */ defineComponent({
9084
9143
  __name: "SearchBoxSuggestionsWrapper",
9085
9144
  props: {
9086
9145
  panel: {},
@@ -9122,7 +9181,7 @@ var __async = (__this, __arguments, generator) => {
9122
9181
  const getSuggestionsDebounced = debounce$1(getSuggestions, props.debounce);
9123
9182
  watch(() => props.panel.limit, getSuggestionsDebounced);
9124
9183
  return (_ctx, _cache) => {
9125
- return openBlock(), createBlock(_sfc_main$1m, {
9184
+ return openBlock(), createBlock(_sfc_main$1n, {
9126
9185
  items: searchResult.value,
9127
9186
  highlight: _ctx.panel.highlight,
9128
9187
  queryKey: _ctx.panel.queryKey,
@@ -18200,9 +18259,9 @@ and ensure you are accounting for this risk.
18200
18259
  targetImage.src = placeholder;
18201
18260
  }
18202
18261
  };
18203
- const _hoisted_1$1a = ["src"];
18204
- const _hoisted_2$R = ["src"];
18205
- const _sfc_main$1k = /* @__PURE__ */ defineComponent({
18262
+ const _hoisted_1$1b = ["src"];
18263
+ const _hoisted_2$S = ["src"];
18264
+ const _sfc_main$1l = /* @__PURE__ */ defineComponent({
18206
18265
  __name: "ProductImage",
18207
18266
  props: {
18208
18267
  item: {},
@@ -18344,7 +18403,7 @@ and ensure you are accounting for this risk.
18344
18403
  }, { alt: imageAlt.value ? imageAlt.value : void 0 }, {
18345
18404
  onError: replaceWithPlaceholder,
18346
18405
  key: finalUrl.value
18347
- }), null, 16, _hoisted_1$1a))
18406
+ }), null, 16, _hoisted_1$1b))
18348
18407
  ]),
18349
18408
  _: 1
18350
18409
  })) : (openBlock(), createElementBlock("img", mergeProps({
@@ -18352,12 +18411,12 @@ and ensure you are accounting for this risk.
18352
18411
  class: ["lupa-images-main-image", { [_ctx.imageClass]: true }],
18353
18412
  style: styleOverride.value,
18354
18413
  src: finalMainImageUrl.value
18355
- }, { alt: imageAlt.value ? imageAlt.value : void 0 }, { onError: replaceWithPlaceholder }), null, 16, _hoisted_2$R))
18414
+ }, { alt: imageAlt.value ? imageAlt.value : void 0 }, { onError: replaceWithPlaceholder }), null, 16, _hoisted_2$S))
18356
18415
  ], 38);
18357
18416
  };
18358
18417
  }
18359
18418
  });
18360
- const _sfc_main$1j = /* @__PURE__ */ defineComponent({
18419
+ const _sfc_main$1k = /* @__PURE__ */ defineComponent({
18361
18420
  __name: "SearchBoxProductImage",
18362
18421
  props: {
18363
18422
  item: {},
@@ -18365,7 +18424,7 @@ and ensure you are accounting for this risk.
18365
18424
  },
18366
18425
  setup(__props) {
18367
18426
  return (_ctx, _cache) => {
18368
- return openBlock(), createBlock(_sfc_main$1k, {
18427
+ return openBlock(), createBlock(_sfc_main$1l, {
18369
18428
  item: _ctx.item,
18370
18429
  options: _ctx.options,
18371
18430
  "wrapper-class": "lupa-search-box-image-wrapper",
@@ -18374,12 +18433,12 @@ and ensure you are accounting for this risk.
18374
18433
  };
18375
18434
  }
18376
18435
  });
18377
- const _hoisted_1$19 = ["innerHTML"];
18378
- const _hoisted_2$Q = {
18436
+ const _hoisted_1$1a = ["innerHTML"];
18437
+ const _hoisted_2$R = {
18379
18438
  key: 1,
18380
18439
  class: "lupa-search-box-product-title"
18381
18440
  };
18382
- const _sfc_main$1i = /* @__PURE__ */ defineComponent({
18441
+ const _sfc_main$1j = /* @__PURE__ */ defineComponent({
18383
18442
  __name: "SearchBoxProductTitle",
18384
18443
  props: {
18385
18444
  item: {},
@@ -18402,18 +18461,18 @@ and ensure you are accounting for this risk.
18402
18461
  key: 0,
18403
18462
  class: "lupa-search-box-product-title",
18404
18463
  innerHTML: sanitizedTitle.value
18405
- }, null, 8, _hoisted_1$19)) : (openBlock(), createElementBlock("div", _hoisted_2$Q, [
18464
+ }, null, 8, _hoisted_1$1a)) : (openBlock(), createElementBlock("div", _hoisted_2$R, [
18406
18465
  createBaseVNode("strong", null, toDisplayString(title.value), 1)
18407
18466
  ]));
18408
18467
  };
18409
18468
  }
18410
18469
  });
18411
- const _hoisted_1$18 = ["innerHTML"];
18412
- const _hoisted_2$P = {
18470
+ const _hoisted_1$19 = ["innerHTML"];
18471
+ const _hoisted_2$Q = {
18413
18472
  key: 1,
18414
18473
  class: "lupa-search-box-product-description"
18415
18474
  };
18416
- const _sfc_main$1h = /* @__PURE__ */ defineComponent({
18475
+ const _sfc_main$1i = /* @__PURE__ */ defineComponent({
18417
18476
  __name: "SearchBoxProductDescription",
18418
18477
  props: {
18419
18478
  item: {},
@@ -18436,12 +18495,12 @@ and ensure you are accounting for this risk.
18436
18495
  key: 0,
18437
18496
  class: "lupa-search-box-product-description",
18438
18497
  innerHTML: sanitizedDescription.value
18439
- }, null, 8, _hoisted_1$18)) : (openBlock(), createElementBlock("div", _hoisted_2$P, toDisplayString(description.value), 1));
18498
+ }, null, 8, _hoisted_1$19)) : (openBlock(), createElementBlock("div", _hoisted_2$Q, toDisplayString(description.value), 1));
18440
18499
  };
18441
18500
  }
18442
18501
  });
18443
- const _hoisted_1$17 = { class: "lupa-search-box-product-price" };
18444
- const _sfc_main$1g = /* @__PURE__ */ defineComponent({
18502
+ const _hoisted_1$18 = { class: "lupa-search-box-product-price" };
18503
+ const _sfc_main$1h = /* @__PURE__ */ defineComponent({
18445
18504
  __name: "SearchBoxProductPrice",
18446
18505
  props: {
18447
18506
  item: {},
@@ -18459,13 +18518,13 @@ and ensure you are accounting for this risk.
18459
18518
  );
18460
18519
  });
18461
18520
  return (_ctx, _cache) => {
18462
- return openBlock(), createElementBlock("div", _hoisted_1$17, [
18521
+ return openBlock(), createElementBlock("div", _hoisted_1$18, [
18463
18522
  createBaseVNode("strong", null, toDisplayString(price.value), 1)
18464
18523
  ]);
18465
18524
  };
18466
18525
  }
18467
18526
  });
18468
- const _sfc_main$1f = /* @__PURE__ */ defineComponent({
18527
+ const _sfc_main$1g = /* @__PURE__ */ defineComponent({
18469
18528
  __name: "SearchBoxProductRegularPrice",
18470
18529
  props: {
18471
18530
  item: {},
@@ -18492,12 +18551,12 @@ and ensure you are accounting for this risk.
18492
18551
  };
18493
18552
  }
18494
18553
  });
18495
- const _hoisted_1$16 = ["innerHTML"];
18496
- const _hoisted_2$O = { key: 0 };
18497
- const _hoisted_3$B = { key: 1 };
18498
- const _hoisted_4$q = { class: "lupa-search-box-custom-label" };
18554
+ const _hoisted_1$17 = ["innerHTML"];
18555
+ const _hoisted_2$P = { key: 0 };
18556
+ const _hoisted_3$C = { key: 1 };
18557
+ const _hoisted_4$r = { class: "lupa-search-box-custom-label" };
18499
18558
  const _hoisted_5$h = { class: "lupa-search-box-custom-text" };
18500
- const _sfc_main$1e = /* @__PURE__ */ defineComponent({
18559
+ const _sfc_main$1f = /* @__PURE__ */ defineComponent({
18501
18560
  __name: "SearchBoxProductCustom",
18502
18561
  props: {
18503
18562
  item: {},
@@ -18523,20 +18582,20 @@ and ensure you are accounting for this risk.
18523
18582
  key: 0,
18524
18583
  class: [className.value, "lupa-search-box-product-custom"],
18525
18584
  innerHTML: text.value
18526
- }, toHandlers(_ctx.options.action ? { click: handleClick } : {}, true)), null, 16, _hoisted_1$16)) : (openBlock(), createElementBlock("div", mergeProps({
18585
+ }, toHandlers(_ctx.options.action ? { click: handleClick } : {}, true)), null, 16, _hoisted_1$17)) : (openBlock(), createElementBlock("div", mergeProps({
18527
18586
  key: 1,
18528
18587
  class: [className.value, "lupa-search-box-product-custom"]
18529
18588
  }, toHandlers(_ctx.options.action ? { click: handleClick } : {}, true)), [
18530
- !label.value ? (openBlock(), createElementBlock("div", _hoisted_2$O, toDisplayString(text.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$B, [
18531
- createBaseVNode("div", _hoisted_4$q, toDisplayString(label.value), 1),
18589
+ !label.value ? (openBlock(), createElementBlock("div", _hoisted_2$P, toDisplayString(text.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$C, [
18590
+ createBaseVNode("div", _hoisted_4$r, toDisplayString(label.value), 1),
18532
18591
  createBaseVNode("div", _hoisted_5$h, toDisplayString(text.value), 1)
18533
18592
  ]))
18534
18593
  ], 16));
18535
18594
  };
18536
18595
  }
18537
18596
  });
18538
- const _hoisted_1$15 = ["innerHTML"];
18539
- const _sfc_main$1d = /* @__PURE__ */ defineComponent({
18597
+ const _hoisted_1$16 = ["innerHTML"];
18598
+ const _sfc_main$1e = /* @__PURE__ */ defineComponent({
18540
18599
  __name: "SearchBoxProductCustomHtml",
18541
18600
  props: {
18542
18601
  item: {},
@@ -18561,7 +18620,7 @@ and ensure you are accounting for this risk.
18561
18620
  return openBlock(), createElementBlock("div", mergeProps({
18562
18621
  class: className.value,
18563
18622
  innerHTML: text.value
18564
- }, toHandlers(_ctx.options.action ? { click: handleClick } : {}, true)), null, 16, _hoisted_1$15);
18623
+ }, toHandlers(_ctx.options.action ? { click: handleClick } : {}, true)), null, 16, _hoisted_1$16);
18565
18624
  };
18566
18625
  }
18567
18626
  });
@@ -18795,10 +18854,10 @@ and ensure you are accounting for this risk.
18795
18854
  setRelatedCategoryChildren
18796
18855
  };
18797
18856
  });
18798
- const _hoisted_1$14 = { class: "lupa-search-box-add-to-cart-wrapper" };
18799
- const _hoisted_2$N = { class: "lupa-search-box-product-addtocart" };
18800
- const _hoisted_3$A = ["onClick", "disabled"];
18801
- const _sfc_main$1c = /* @__PURE__ */ defineComponent({
18857
+ const _hoisted_1$15 = { class: "lupa-search-box-add-to-cart-wrapper" };
18858
+ const _hoisted_2$O = { class: "lupa-search-box-product-addtocart" };
18859
+ const _hoisted_3$B = ["onClick", "disabled"];
18860
+ const _sfc_main$1d = /* @__PURE__ */ defineComponent({
18802
18861
  __name: "SearchBoxProductAddToCart",
18803
18862
  props: {
18804
18863
  item: {},
@@ -18831,37 +18890,37 @@ and ensure you are accounting for this risk.
18831
18890
  loading.value = false;
18832
18891
  });
18833
18892
  return (_ctx, _cache) => {
18834
- return openBlock(), createElementBlock("div", _hoisted_1$14, [
18835
- createBaseVNode("div", _hoisted_2$N, [
18893
+ return openBlock(), createElementBlock("div", _hoisted_1$15, [
18894
+ createBaseVNode("div", _hoisted_2$O, [
18836
18895
  createBaseVNode("button", {
18837
18896
  onClick: withModifiers(handleClick, ["stop", "prevent"]),
18838
18897
  class: normalizeClass(loading.value ? "lupa-add-to-cart-loading" : "lupa-add-to-cart"),
18839
18898
  "data-cy": "lupa-add-to-cart",
18840
18899
  type: "button",
18841
18900
  disabled: !inStockValue.value || loading.value
18842
- }, toDisplayString(label.value), 11, _hoisted_3$A)
18901
+ }, toDisplayString(label.value), 11, _hoisted_3$B)
18843
18902
  ])
18844
18903
  ]);
18845
18904
  };
18846
18905
  }
18847
18906
  });
18848
- const _hoisted_1$13 = {
18907
+ const _hoisted_1$14 = {
18849
18908
  key: 1,
18850
18909
  class: "lupa-search-box-element-badge-wrapper"
18851
18910
  };
18852
18911
  const __default__$4 = {
18853
18912
  components: {
18854
- SearchBoxProductImage: _sfc_main$1j,
18855
- SearchBoxProductTitle: _sfc_main$1i,
18856
- SearchBoxProductDescription: _sfc_main$1h,
18857
- SearchBoxProductPrice: _sfc_main$1g,
18858
- SearchBoxProductRegularPrice: _sfc_main$1f,
18859
- SearchBoxProductCustom: _sfc_main$1e,
18860
- SearchBoxProductCustomHtml: _sfc_main$1d,
18861
- SearchBoxProductAddToCart: _sfc_main$1c
18913
+ SearchBoxProductImage: _sfc_main$1k,
18914
+ SearchBoxProductTitle: _sfc_main$1j,
18915
+ SearchBoxProductDescription: _sfc_main$1i,
18916
+ SearchBoxProductPrice: _sfc_main$1h,
18917
+ SearchBoxProductRegularPrice: _sfc_main$1g,
18918
+ SearchBoxProductCustom: _sfc_main$1f,
18919
+ SearchBoxProductCustomHtml: _sfc_main$1e,
18920
+ SearchBoxProductAddToCart: _sfc_main$1d
18862
18921
  }
18863
18922
  };
18864
- const _sfc_main$1b = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValues2({}, __default__$4), {
18923
+ const _sfc_main$1c = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValues2({}, __default__$4), {
18865
18924
  __name: "SearchBoxProductElement",
18866
18925
  props: {
18867
18926
  item: {},
@@ -18924,7 +18983,7 @@ and ensure you are accounting for this risk.
18924
18983
  class: normalizeClass({ "lupa-loading-dynamic-data": isLoadingDynamicData((_a = _ctx.item) == null ? void 0 : _a.id) }),
18925
18984
  inStock: _ctx.isInStock
18926
18985
  }, null, 8, ["item", "options", "labels", "class", "inStock"])) : createCommentVNode("", true)
18927
- ], 64)) : (openBlock(), createElementBlock("div", _hoisted_1$13, [
18986
+ ], 64)) : (openBlock(), createElementBlock("div", _hoisted_1$14, [
18928
18987
  displayElement.value ? (openBlock(), createBlock(resolveDynamicComponent(elementComponent.value), {
18929
18988
  key: 0,
18930
18989
  item: enhancedItem.value,
@@ -18938,14 +18997,14 @@ and ensure you are accounting for this risk.
18938
18997
  };
18939
18998
  }
18940
18999
  }));
18941
- const _hoisted_1$12 = { class: "lupa-badge-title" };
18942
- const _hoisted_2$M = ["src"];
18943
- const _hoisted_3$z = { key: 1 };
18944
- const _hoisted_4$p = {
19000
+ const _hoisted_1$13 = { class: "lupa-badge-title" };
19001
+ const _hoisted_2$N = ["src"];
19002
+ const _hoisted_3$A = { key: 1 };
19003
+ const _hoisted_4$q = {
18945
19004
  key: 0,
18946
19005
  class: "lupa-badge-full-text"
18947
19006
  };
18948
- const _sfc_main$1a = /* @__PURE__ */ defineComponent({
19007
+ const _sfc_main$1b = /* @__PURE__ */ defineComponent({
18949
19008
  __name: "SearchResultGeneratedBadge",
18950
19009
  props: {
18951
19010
  options: {},
@@ -18978,20 +19037,20 @@ and ensure you are accounting for this risk.
18978
19037
  class: normalizeClass(["lupa-dynamic-badge", customClassName.value]),
18979
19038
  style: normalizeStyle({ background: _ctx.badge.backgroundColor, color: _ctx.badge.color })
18980
19039
  }, [
18981
- createBaseVNode("span", _hoisted_1$12, [
19040
+ createBaseVNode("span", _hoisted_1$13, [
18982
19041
  image.value ? (openBlock(), createElementBlock("img", {
18983
19042
  key: 0,
18984
19043
  src: image.value
18985
- }, null, 8, _hoisted_2$M)) : createCommentVNode("", true),
18986
- hasTitleText.value && showTitle.value ? (openBlock(), createElementBlock("span", _hoisted_3$z, toDisplayString(_ctx.badge.titleText), 1)) : createCommentVNode("", true)
19044
+ }, null, 8, _hoisted_2$N)) : createCommentVNode("", true),
19045
+ hasTitleText.value && showTitle.value ? (openBlock(), createElementBlock("span", _hoisted_3$A, toDisplayString(_ctx.badge.titleText), 1)) : createCommentVNode("", true)
18987
19046
  ]),
18988
- hasAdditionalText.value ? (openBlock(), createElementBlock("span", _hoisted_4$p, toDisplayString(_ctx.badge.additionalText), 1)) : createCommentVNode("", true)
19047
+ hasAdditionalText.value ? (openBlock(), createElementBlock("span", _hoisted_4$q, toDisplayString(_ctx.badge.additionalText), 1)) : createCommentVNode("", true)
18989
19048
  ], 6);
18990
19049
  };
18991
19050
  }
18992
19051
  });
18993
- const _hoisted_1$11 = { class: "lupa-generated-badges" };
18994
- const _sfc_main$19 = /* @__PURE__ */ defineComponent({
19052
+ const _hoisted_1$12 = { class: "lupa-generated-badges" };
19053
+ const _sfc_main$1a = /* @__PURE__ */ defineComponent({
18995
19054
  __name: "SearchResultGeneratedBadges",
18996
19055
  props: {
18997
19056
  options: {}
@@ -19017,9 +19076,9 @@ and ensure you are accounting for this risk.
19017
19076
  })).filter((b) => Boolean(b.id));
19018
19077
  });
19019
19078
  return (_ctx, _cache) => {
19020
- return openBlock(), createElementBlock("div", _hoisted_1$11, [
19079
+ return openBlock(), createElementBlock("div", _hoisted_1$12, [
19021
19080
  (openBlock(true), createElementBlock(Fragment, null, renderList(badges.value, (badge) => {
19022
- return openBlock(), createBlock(_sfc_main$1a, {
19081
+ return openBlock(), createBlock(_sfc_main$1b, {
19023
19082
  key: badge.id,
19024
19083
  badge,
19025
19084
  options: _ctx.options
@@ -19029,8 +19088,8 @@ and ensure you are accounting for this risk.
19029
19088
  };
19030
19089
  }
19031
19090
  });
19032
- const _hoisted_1$10 = ["innerHTML"];
19033
- const _sfc_main$18 = /* @__PURE__ */ defineComponent({
19091
+ const _hoisted_1$11 = ["innerHTML"];
19092
+ const _sfc_main$19 = /* @__PURE__ */ defineComponent({
19034
19093
  __name: "CustomBadge",
19035
19094
  props: {
19036
19095
  badge: {}
@@ -19051,12 +19110,12 @@ and ensure you are accounting for this risk.
19051
19110
  return openBlock(), createElementBlock("div", {
19052
19111
  class: normalizeClass(className.value),
19053
19112
  innerHTML: text.value
19054
- }, null, 10, _hoisted_1$10);
19113
+ }, null, 10, _hoisted_1$11);
19055
19114
  };
19056
19115
  }
19057
19116
  });
19058
- const _hoisted_1$$ = { class: "lupa-text-badges" };
19059
- const _sfc_main$17 = /* @__PURE__ */ defineComponent({
19117
+ const _hoisted_1$10 = { class: "lupa-text-badges" };
19118
+ const _sfc_main$18 = /* @__PURE__ */ defineComponent({
19060
19119
  __name: "TextBadge",
19061
19120
  props: {
19062
19121
  badge: {}
@@ -19070,7 +19129,7 @@ and ensure you are accounting for this risk.
19070
19129
  return badges.value.slice(0, props.badge.maxItems);
19071
19130
  });
19072
19131
  return (_ctx, _cache) => {
19073
- return openBlock(), createElementBlock("div", _hoisted_1$$, [
19132
+ return openBlock(), createElementBlock("div", _hoisted_1$10, [
19074
19133
  (openBlock(true), createElementBlock(Fragment, null, renderList(displayBadges.value, (item) => {
19075
19134
  return openBlock(), createElementBlock("div", {
19076
19135
  class: "lupa-badge lupa-text-badge",
@@ -19081,9 +19140,9 @@ and ensure you are accounting for this risk.
19081
19140
  };
19082
19141
  }
19083
19142
  });
19084
- const _hoisted_1$_ = { class: "lupa-image-badges" };
19085
- const _hoisted_2$L = ["src"];
19086
- const _sfc_main$16 = /* @__PURE__ */ defineComponent({
19143
+ const _hoisted_1$$ = { class: "lupa-image-badges" };
19144
+ const _hoisted_2$M = ["src"];
19145
+ const _sfc_main$17 = /* @__PURE__ */ defineComponent({
19087
19146
  __name: "ImageBadge",
19088
19147
  props: {
19089
19148
  badge: {}
@@ -19103,7 +19162,7 @@ and ensure you are accounting for this risk.
19103
19162
  return `${props.badge.rootImageUrl}${src}`;
19104
19163
  };
19105
19164
  return (_ctx, _cache) => {
19106
- return openBlock(), createElementBlock("div", _hoisted_1$_, [
19165
+ return openBlock(), createElementBlock("div", _hoisted_1$$, [
19107
19166
  (openBlock(true), createElementBlock(Fragment, null, renderList(displayBadges.value, (item) => {
19108
19167
  return openBlock(), createElementBlock("div", {
19109
19168
  class: "lupa-badge lupa-image-badge",
@@ -19111,14 +19170,14 @@ and ensure you are accounting for this risk.
19111
19170
  }, [
19112
19171
  createBaseVNode("img", {
19113
19172
  src: getImageUrl(item)
19114
- }, null, 8, _hoisted_2$L)
19173
+ }, null, 8, _hoisted_2$M)
19115
19174
  ]);
19116
19175
  }), 128))
19117
19176
  ]);
19118
19177
  };
19119
19178
  }
19120
19179
  });
19121
- const _sfc_main$15 = /* @__PURE__ */ defineComponent({
19180
+ const _sfc_main$16 = /* @__PURE__ */ defineComponent({
19122
19181
  __name: "DiscountBadge",
19123
19182
  props: {
19124
19183
  badge: {}
@@ -19176,16 +19235,16 @@ and ensure you are accounting for this risk.
19176
19235
  };
19177
19236
  }
19178
19237
  });
19179
- const _hoisted_1$Z = { id: "lupa-search-results-badges" };
19238
+ const _hoisted_1$_ = { id: "lupa-search-results-badges" };
19180
19239
  const __default__$3 = {
19181
19240
  components: {
19182
- CustomBadge: _sfc_main$18,
19183
- TextBadge: _sfc_main$17,
19184
- ImageBadge: _sfc_main$16,
19185
- DiscountBadge: _sfc_main$15
19241
+ CustomBadge: _sfc_main$19,
19242
+ TextBadge: _sfc_main$18,
19243
+ ImageBadge: _sfc_main$17,
19244
+ DiscountBadge: _sfc_main$16
19186
19245
  }
19187
19246
  };
19188
- const _sfc_main$14 = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValues2({}, __default__$3), {
19247
+ const _sfc_main$15 = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValues2({}, __default__$3), {
19189
19248
  __name: "SearchResultsBadgeWrapper",
19190
19249
  props: {
19191
19250
  position: {},
@@ -19248,7 +19307,7 @@ and ensure you are accounting for this risk.
19248
19307
  }
19249
19308
  };
19250
19309
  return (_ctx, _cache) => {
19251
- return openBlock(), createElementBlock("div", _hoisted_1$Z, [
19310
+ return openBlock(), createElementBlock("div", _hoisted_1$_, [
19252
19311
  createBaseVNode("div", {
19253
19312
  id: "lupa-badges",
19254
19313
  class: normalizeClass(anchorPosition.value)
@@ -19259,7 +19318,7 @@ and ensure you are accounting for this risk.
19259
19318
  badge
19260
19319
  }, null, 8, ["badge"]);
19261
19320
  }), 128)),
19262
- positionValue.value === "card" ? (openBlock(), createBlock(_sfc_main$19, {
19321
+ positionValue.value === "card" ? (openBlock(), createBlock(_sfc_main$1a, {
19263
19322
  key: 0,
19264
19323
  options: _ctx.options
19265
19324
  }, null, 8, ["options"])) : createCommentVNode("", true)
@@ -19268,13 +19327,13 @@ and ensure you are accounting for this risk.
19268
19327
  };
19269
19328
  }
19270
19329
  }));
19271
- const _hoisted_1$Y = ["href"];
19272
- const _hoisted_2$K = { class: "lupa-search-box-product-details-section" };
19273
- const _hoisted_3$y = {
19330
+ const _hoisted_1$Z = ["href"];
19331
+ const _hoisted_2$L = { class: "lupa-search-box-product-details-section" };
19332
+ const _hoisted_3$z = {
19274
19333
  key: 0,
19275
19334
  class: "lupa-search-box-product-add-to-cart-section"
19276
19335
  };
19277
- const _sfc_main$13 = /* @__PURE__ */ defineComponent({
19336
+ const _sfc_main$14 = /* @__PURE__ */ defineComponent({
19278
19337
  __name: "SearchBoxProduct",
19279
19338
  props: {
19280
19339
  item: {},
@@ -19360,7 +19419,7 @@ and ensure you are accounting for this risk.
19360
19419
  style: normalizeStyle(imageStyleOverride.value)
19361
19420
  }, [
19362
19421
  (openBlock(true), createElementBlock(Fragment, null, renderList(imageElements.value, (element) => {
19363
- return openBlock(), createBlock(_sfc_main$1b, {
19422
+ return openBlock(), createBlock(_sfc_main$1c, {
19364
19423
  class: "lupa-search-box-product-element",
19365
19424
  item: _ctx.item,
19366
19425
  element,
@@ -19370,10 +19429,10 @@ and ensure you are accounting for this risk.
19370
19429
  }, null, 8, ["item", "element", "labels", "link"]);
19371
19430
  }), 128))
19372
19431
  ], 4),
19373
- createBaseVNode("div", _hoisted_2$K, [
19432
+ createBaseVNode("div", _hoisted_2$L, [
19374
19433
  (openBlock(true), createElementBlock(Fragment, null, renderList(detailElements.value, (element) => {
19375
19434
  var _a;
19376
- return openBlock(), createBlock(_sfc_main$1b, {
19435
+ return openBlock(), createBlock(_sfc_main$1c, {
19377
19436
  key: element.key,
19378
19437
  class: "lupa-search-box-product-element",
19379
19438
  item: _ctx.item,
@@ -19384,7 +19443,7 @@ and ensure you are accounting for this risk.
19384
19443
  badgeOptions.value && ((_a = badgeOptions.value) == null ? void 0 : _a.anchorElementKey) === element.key ? {
19385
19444
  name: "badges",
19386
19445
  fn: withCtx(() => [
19387
- createVNode(_sfc_main$14, {
19446
+ createVNode(_sfc_main$15, {
19388
19447
  options: badgeOptions.value,
19389
19448
  position: "card"
19390
19449
  }, null, 8, ["options"])
@@ -19394,8 +19453,8 @@ and ensure you are accounting for this risk.
19394
19453
  ]), 1032, ["item", "element", "labels", "link"]);
19395
19454
  }), 128))
19396
19455
  ]),
19397
- addToCartElement.value ? (openBlock(), createElementBlock("div", _hoisted_3$y, [
19398
- createVNode(_sfc_main$1b, {
19456
+ addToCartElement.value ? (openBlock(), createElementBlock("div", _hoisted_3$z, [
19457
+ createVNode(_sfc_main$1c, {
19399
19458
  class: "lupa-search-box-product-element",
19400
19459
  item: _ctx.item,
19401
19460
  element: addToCartElement.value,
@@ -19404,7 +19463,7 @@ and ensure you are accounting for this risk.
19404
19463
  isInStock: isInStock.value
19405
19464
  }, null, 8, ["item", "element", "labels", "link", "isInStock"])
19406
19465
  ])) : createCommentVNode("", true)
19407
- ], 16, _hoisted_1$Y);
19466
+ ], 16, _hoisted_1$Z);
19408
19467
  };
19409
19468
  }
19410
19469
  });
@@ -19463,10 +19522,21 @@ and ensure you are accounting for this risk.
19463
19522
  options
19464
19523
  );
19465
19524
  };
19466
- return { trackSearch, trackResults, trackEvent };
19525
+ const trackDelayedEvent = ({
19526
+ queryKey,
19527
+ data,
19528
+ url
19529
+ }) => {
19530
+ let currentCache = getDelayedEventsCache();
19531
+ currentCache = __spreadProps2(__spreadValues2({}, currentCache), {
19532
+ [url]: { data, queryKey }
19533
+ });
19534
+ storeDelayedEventCache(currentCache);
19535
+ };
19536
+ return { trackSearch, trackResults, trackEvent, trackDelayedEvent };
19467
19537
  });
19468
- const _hoisted_1$X = { id: "lupa-search-box-products" };
19469
- const _sfc_main$12 = /* @__PURE__ */ defineComponent({
19538
+ const _hoisted_1$Y = { id: "lupa-search-box-products" };
19539
+ const _sfc_main$13 = /* @__PURE__ */ defineComponent({
19470
19540
  __name: "SearchBoxProducts",
19471
19541
  props: {
19472
19542
  items: {},
@@ -19507,7 +19577,7 @@ and ensure you are accounting for this risk.
19507
19577
  if (!props.panelOptions.idKey) {
19508
19578
  return;
19509
19579
  }
19510
- trackingStore.trackEvent({
19580
+ const trackableEvent = {
19511
19581
  queryKey: props.panelOptions.queryKey,
19512
19582
  data: {
19513
19583
  itemId: id,
@@ -19519,7 +19589,14 @@ and ensure you are accounting for this risk.
19519
19589
  items: [item]
19520
19590
  }
19521
19591
  }
19522
- });
19592
+ };
19593
+ if (isDelayedClickTracking()) {
19594
+ trackingStore.trackDelayedEvent(__spreadProps2(__spreadValues2({}, trackableEvent), {
19595
+ url: link
19596
+ }));
19597
+ } else {
19598
+ trackingStore.trackEvent(trackableEvent);
19599
+ }
19523
19600
  if (!link || eventType === "addToCart") {
19524
19601
  return;
19525
19602
  }
@@ -19527,7 +19604,7 @@ and ensure you are accounting for this risk.
19527
19604
  handleRoutingEvent(link, event, boxRoutingBehavior.value === "event");
19528
19605
  };
19529
19606
  return (_ctx, _cache) => {
19530
- return openBlock(), createElementBlock("div", _hoisted_1$X, [
19607
+ return openBlock(), createElementBlock("div", _hoisted_1$Y, [
19531
19608
  _ctx.$slots.productCard ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(_ctx.items, (item, index) => {
19532
19609
  return renderSlot(_ctx.$slots, "productCard", {
19533
19610
  key: index,
@@ -19539,7 +19616,7 @@ and ensure you are accounting for this risk.
19539
19616
  itemClicked: handleProductClick
19540
19617
  });
19541
19618
  }), 128)) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(_ctx.items, (item, index) => {
19542
- return openBlock(), createBlock(_sfc_main$13, {
19619
+ return openBlock(), createBlock(_sfc_main$14, {
19543
19620
  key: index,
19544
19621
  item,
19545
19622
  panelOptions: _ctx.panelOptions,
@@ -19554,9 +19631,9 @@ and ensure you are accounting for this risk.
19554
19631
  };
19555
19632
  }
19556
19633
  });
19557
- const _hoisted_1$W = { class: "lupa-search-box-documents-go-to-results-wrapper" };
19558
- const _hoisted_2$J = { key: 0 };
19559
- const _sfc_main$11 = /* @__PURE__ */ defineComponent({
19634
+ const _hoisted_1$X = { class: "lupa-search-box-documents-go-to-results-wrapper" };
19635
+ const _hoisted_2$K = { key: 0 };
19636
+ const _sfc_main$12 = /* @__PURE__ */ defineComponent({
19560
19637
  __name: "SearchBoxProductsGoToResultsButton",
19561
19638
  props: {
19562
19639
  options: {},
@@ -19586,19 +19663,19 @@ and ensure you are accounting for this risk.
19586
19663
  emit2("goToResults");
19587
19664
  };
19588
19665
  return (_ctx, _cache) => {
19589
- return openBlock(), createElementBlock("div", _hoisted_1$W, [
19666
+ return openBlock(), createElementBlock("div", _hoisted_1$X, [
19590
19667
  createBaseVNode("button", {
19591
19668
  class: "lupa-search-box-documents-go-to-results-button",
19592
19669
  onClick: goToResults
19593
19670
  }, [
19594
19671
  createTextVNode(toDisplayString(goToResultsLabel.value) + " ", 1),
19595
- totalCount.value ? (openBlock(), createElementBlock("span", _hoisted_2$J, " " + toDisplayString(totalCount.value), 1)) : createCommentVNode("", true)
19672
+ totalCount.value ? (openBlock(), createElementBlock("span", _hoisted_2$K, " " + toDisplayString(totalCount.value), 1)) : createCommentVNode("", true)
19596
19673
  ])
19597
19674
  ]);
19598
19675
  };
19599
19676
  }
19600
19677
  });
19601
- const _sfc_main$10 = /* @__PURE__ */ defineComponent({
19678
+ const _sfc_main$11 = /* @__PURE__ */ defineComponent({
19602
19679
  __name: "SearchBoxProductsWrapper",
19603
19680
  props: {
19604
19681
  panel: {},
@@ -19655,7 +19732,7 @@ and ensure you are accounting for this risk.
19655
19732
  watch(() => props.panel.limit, getItemsDebounced);
19656
19733
  return (_ctx, _cache) => {
19657
19734
  var _a, _b;
19658
- return openBlock(), createBlock(_sfc_main$12, {
19735
+ return openBlock(), createBlock(_sfc_main$13, {
19659
19736
  items: (_b = (_a = searchResult.value) == null ? void 0 : _a.items) != null ? _b : [],
19660
19737
  panelOptions: _ctx.panel,
19661
19738
  labels: _ctx.labels,
@@ -19665,7 +19742,7 @@ and ensure you are accounting for this risk.
19665
19742
  default: withCtx(() => {
19666
19743
  var _a2;
19667
19744
  return [
19668
- showGoToResultsButton.value && ((_a2 = searchResult.value) == null ? void 0 : _a2.items.length) ? (openBlock(), createBlock(_sfc_main$11, {
19745
+ showGoToResultsButton.value && ((_a2 = searchResult.value) == null ? void 0 : _a2.items.length) ? (openBlock(), createBlock(_sfc_main$12, {
19669
19746
  key: 0,
19670
19747
  options: _ctx.searchBoxOptions,
19671
19748
  panel: _ctx.panel,
@@ -19686,7 +19763,7 @@ and ensure you are accounting for this risk.
19686
19763
  };
19687
19764
  }
19688
19765
  });
19689
- const _sfc_main$$ = /* @__PURE__ */ defineComponent({
19766
+ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
19690
19767
  __name: "SearchBoxRelatedSourceWrapper",
19691
19768
  props: {
19692
19769
  panel: {},
@@ -19758,7 +19835,7 @@ and ensure you are accounting for this risk.
19758
19835
  });
19759
19836
  return (_ctx, _cache) => {
19760
19837
  var _a, _b;
19761
- return openBlock(), createBlock(_sfc_main$12, {
19838
+ return openBlock(), createBlock(_sfc_main$13, {
19762
19839
  items: (_b = (_a = searchResult.value) == null ? void 0 : _a.items) != null ? _b : [],
19763
19840
  panelOptions: documentPanelOptions.value,
19764
19841
  labels: _ctx.labels,
@@ -19776,16 +19853,16 @@ and ensure you are accounting for this risk.
19776
19853
  };
19777
19854
  }
19778
19855
  });
19779
- const _hoisted_1$V = {
19856
+ const _hoisted_1$W = {
19780
19857
  key: 0,
19781
19858
  id: "lupa-search-box-panel"
19782
19859
  };
19783
- const _hoisted_2$I = ["data-cy"];
19784
- const _hoisted_3$x = {
19860
+ const _hoisted_2$J = ["data-cy"];
19861
+ const _hoisted_3$y = {
19785
19862
  key: 0,
19786
19863
  class: "lupa-panel-title lupa-panel-title-top-results"
19787
19864
  };
19788
- const _hoisted_4$o = {
19865
+ const _hoisted_4$p = {
19789
19866
  key: 1,
19790
19867
  class: "lupa-panel-title"
19791
19868
  };
@@ -19795,12 +19872,12 @@ and ensure you are accounting for this risk.
19795
19872
  };
19796
19873
  const __default__$2 = {
19797
19874
  components: {
19798
- SearchBoxSuggestionsWrapper: _sfc_main$1l,
19799
- SearchBoxProductsWrapper: _sfc_main$10,
19800
- SearchBoxRelatedSourceWrapper: _sfc_main$$
19875
+ SearchBoxSuggestionsWrapper: _sfc_main$1m,
19876
+ SearchBoxProductsWrapper: _sfc_main$11,
19877
+ SearchBoxRelatedSourceWrapper: _sfc_main$10
19801
19878
  }
19802
19879
  };
19803
- const _sfc_main$_ = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValues2({}, __default__$2), {
19880
+ const _sfc_main$$ = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValues2({}, __default__$2), {
19804
19881
  __name: "SearchBoxMainPanel",
19805
19882
  props: {
19806
19883
  options: {},
@@ -19956,7 +20033,7 @@ and ensure you are accounting for this risk.
19956
20033
  ref_key: "panelContainer",
19957
20034
  ref: panelContainer
19958
20035
  }, [
19959
- displayResults.value ? (openBlock(), createElementBlock("div", _hoisted_1$V, [
20036
+ displayResults.value ? (openBlock(), createElementBlock("div", _hoisted_1$W, [
19960
20037
  labels.value.closePanel ? (openBlock(), createElementBlock("a", {
19961
20038
  key: 0,
19962
20039
  class: "lupa-search-box-close-panel",
@@ -19978,8 +20055,8 @@ and ensure you are accounting for this risk.
19978
20055
  style: normalizeStyle(panel.gridArea ? { gridArea: `${panel.gridArea}${index}` } : {}),
19979
20056
  "data-cy": "lupa-panel-" + panel.type + "-index"
19980
20057
  }, [
19981
- ((_a2 = panel.labels) == null ? void 0 : _a2.topResultsTitle) && showTopResultsPanelTitle(panel.queryKey) ? (openBlock(), createElementBlock("div", _hoisted_3$x, toDisplayString((_b = panel.labels) == null ? void 0 : _b.topResultsTitle), 1)) : createCommentVNode("", true),
19982
- ((_c = panel.labels) == null ? void 0 : _c.title) && showPanelTitle(panel) ? (openBlock(), createElementBlock("div", _hoisted_4$o, toDisplayString((_d = panel.labels) == null ? void 0 : _d.title), 1)) : createCommentVNode("", true),
20058
+ ((_a2 = panel.labels) == null ? void 0 : _a2.topResultsTitle) && showTopResultsPanelTitle(panel.queryKey) ? (openBlock(), createElementBlock("div", _hoisted_3$y, toDisplayString((_b = panel.labels) == null ? void 0 : _b.topResultsTitle), 1)) : createCommentVNode("", true),
20059
+ ((_c = panel.labels) == null ? void 0 : _c.title) && showPanelTitle(panel) ? (openBlock(), createElementBlock("div", _hoisted_4$p, toDisplayString((_d = panel.labels) == null ? void 0 : _d.title), 1)) : createCommentVNode("", true),
19983
20060
  panel.queryKey && canShowPanel(panel) ? (openBlock(), createBlock(resolveDynamicComponent(getComponent(panel.type)), {
19984
20061
  key: 2,
19985
20062
  panel,
@@ -20001,21 +20078,21 @@ and ensure you are accounting for this risk.
20001
20078
  key: "0"
20002
20079
  } : void 0
20003
20080
  ]), 1064, ["panel", "search-box-options", "options", "debounce", "inputValue", "labels"])) : createCommentVNode("", true)
20004
- ], 14, _hoisted_2$I);
20081
+ ], 14, _hoisted_2$J);
20005
20082
  }), 128))
20006
20083
  ], 4),
20007
- !unref(hasAnyResults) && _ctx.options.showNoResultsPanel ? (openBlock(), createBlock(_sfc_main$1o, {
20084
+ !unref(hasAnyResults) && _ctx.options.showNoResultsPanel ? (openBlock(), createBlock(_sfc_main$1p, {
20008
20085
  key: 1,
20009
20086
  labels: labels.value
20010
20087
  }, null, 8, ["labels"])) : createCommentVNode("", true),
20011
- unref(hasAnyResults) || !_ctx.options.hideMoreResultsButtonOnNoResults ? (openBlock(), createBlock(_sfc_main$1r, {
20088
+ unref(hasAnyResults) || !_ctx.options.hideMoreResultsButtonOnNoResults ? (openBlock(), createBlock(_sfc_main$1s, {
20012
20089
  key: 2,
20013
20090
  labels: labels.value,
20014
20091
  showTotalCount: (_a = _ctx.options.showTotalCount) != null ? _a : false,
20015
20092
  onGoToResults: _cache[4] || (_cache[4] = ($event) => _ctx.$emit("go-to-results"))
20016
20093
  }, null, 8, ["labels", "showTotalCount"])) : createCommentVNode("", true)
20017
20094
  ])) : displayHistory.value ? (openBlock(), createElementBlock("div", _hoisted_5$g, [
20018
- createVNode(_sfc_main$1p, {
20095
+ createVNode(_sfc_main$1q, {
20019
20096
  options: _ctx.options.history,
20020
20097
  history: history.value,
20021
20098
  onGoToResults: handleGoToResults,
@@ -20040,9 +20117,9 @@ and ensure you are accounting for this risk.
20040
20117
  const elements = getElements(triggers);
20041
20118
  elements.forEach((e2) => e2 == null ? void 0 : e2.removeEventListener(BIND_EVENT, event));
20042
20119
  };
20043
- const _hoisted_1$U = { id: "lupa-search-box" };
20044
- const _hoisted_2$H = { class: "lupa-search-box-wrapper" };
20045
- const _sfc_main$Z = /* @__PURE__ */ defineComponent({
20120
+ const _hoisted_1$V = { id: "lupa-search-box" };
20121
+ const _hoisted_2$I = { class: "lupa-search-box-wrapper" };
20122
+ const _sfc_main$_ = /* @__PURE__ */ defineComponent({
20046
20123
  __name: "SearchBox",
20047
20124
  props: {
20048
20125
  options: {},
@@ -20245,7 +20322,7 @@ and ensure you are accounting for this risk.
20245
20322
  if (!doc2.queryKey || !doc2.doc) {
20246
20323
  return;
20247
20324
  }
20248
- trackingStore.trackEvent({
20325
+ const event = {
20249
20326
  queryKey: doc2.queryKey,
20250
20327
  data: {
20251
20328
  itemId: doc2.id,
@@ -20257,7 +20334,14 @@ and ensure you are accounting for this risk.
20257
20334
  items: [doc2]
20258
20335
  }
20259
20336
  }
20260
- });
20337
+ };
20338
+ if (isDelayedClickTracking()) {
20339
+ trackingStore.trackDelayedEvent(__spreadProps2(__spreadValues2({}, event), {
20340
+ url: generateLink(props.options.links.searchResults, doc2)
20341
+ }));
20342
+ } else {
20343
+ trackingStore.trackEvent(event);
20344
+ }
20261
20345
  };
20262
20346
  const trackSearchQuery = (query) => {
20263
20347
  if (!query) {
@@ -20302,9 +20386,9 @@ and ensure you are accounting for this risk.
20302
20386
  };
20303
20387
  return (_ctx, _cache) => {
20304
20388
  var _a2;
20305
- return openBlock(), createElementBlock("div", _hoisted_1$U, [
20306
- createBaseVNode("div", _hoisted_2$H, [
20307
- createVNode(_sfc_main$1s, {
20389
+ return openBlock(), createElementBlock("div", _hoisted_1$V, [
20390
+ createBaseVNode("div", _hoisted_2$I, [
20391
+ createVNode(_sfc_main$1t, {
20308
20392
  options: inputOptions.value,
20309
20393
  suggestedValue: suggestedValue.value,
20310
20394
  "can-close": (_a2 = _ctx.isSearchContainer) != null ? _a2 : false,
@@ -20317,7 +20401,7 @@ and ensure you are accounting for this risk.
20317
20401
  onSearch: handleSearch,
20318
20402
  onClose: _cache[2] || (_cache[2] = ($event) => _ctx.$emit("close"))
20319
20403
  }, null, 8, ["options", "suggestedValue", "can-close", "emit-input-on-focus"]),
20320
- opened.value || _ctx.isSearchContainer ? (openBlock(), createBlock(_sfc_main$_, {
20404
+ opened.value || _ctx.isSearchContainer ? (openBlock(), createBlock(_sfc_main$$, {
20321
20405
  key: 0,
20322
20406
  options: panelOptions.value,
20323
20407
  inputValue: inputValue.value,
@@ -20406,20 +20490,20 @@ and ensure you are accounting for this risk.
20406
20490
  }
20407
20491
  return searchParams;
20408
20492
  };
20409
- const _hoisted_1$T = {
20493
+ const _hoisted_1$U = {
20410
20494
  key: 0,
20411
20495
  id: "lupa-search-results-did-you-mean"
20412
20496
  };
20413
- const _hoisted_2$G = {
20497
+ const _hoisted_2$H = {
20414
20498
  key: 0,
20415
20499
  "data-cy": "suggested-search-text-label"
20416
20500
  };
20417
- const _hoisted_3$w = {
20501
+ const _hoisted_3$x = {
20418
20502
  key: 1,
20419
20503
  "data-cy": "did-you-mean-label"
20420
20504
  };
20421
- const _hoisted_4$n = { key: 1 };
20422
- const _sfc_main$Y = /* @__PURE__ */ defineComponent({
20505
+ const _hoisted_4$o = { key: 1 };
20506
+ const _sfc_main$Z = /* @__PURE__ */ defineComponent({
20423
20507
  __name: "SearchResultsDidYouMean",
20424
20508
  props: {
20425
20509
  labels: {}
@@ -20451,8 +20535,8 @@ and ensure you are accounting for this risk.
20451
20535
  paramStore.goToResults({ searchText, facet });
20452
20536
  };
20453
20537
  return (_ctx, _cache) => {
20454
- return unref(searchResult).suggestedSearchText || didYouMeanValue.value ? (openBlock(), createElementBlock("div", _hoisted_1$T, [
20455
- unref(searchResult).suggestedSearchText ? (openBlock(), createElementBlock("div", _hoisted_2$G, [
20538
+ return unref(searchResult).suggestedSearchText || didYouMeanValue.value ? (openBlock(), createElementBlock("div", _hoisted_1$U, [
20539
+ unref(searchResult).suggestedSearchText ? (openBlock(), createElementBlock("div", _hoisted_2$H, [
20456
20540
  (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.labels.noResultsSuggestion.split(" "), (label, index) => {
20457
20541
  return openBlock(), createElementBlock("span", { key: index }, [
20458
20542
  createBaseVNode("span", {
@@ -20461,7 +20545,7 @@ and ensure you are accounting for this risk.
20461
20545
  ]);
20462
20546
  }), 128))
20463
20547
  ])) : createCommentVNode("", true),
20464
- didYouMeanValue.value ? (openBlock(), createElementBlock("div", _hoisted_3$w, [
20548
+ didYouMeanValue.value ? (openBlock(), createElementBlock("div", _hoisted_3$x, [
20465
20549
  (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.labels.didYouMean.split(" "), (label, index) => {
20466
20550
  return openBlock(), createElementBlock("span", { key: index }, [
20467
20551
  label.includes("{1}") ? (openBlock(), createElementBlock("span", {
@@ -20469,7 +20553,7 @@ and ensure you are accounting for this risk.
20469
20553
  class: "lupa-did-you-mean lupa-highlighted-search-text",
20470
20554
  "data-cy": "did-you-mean-value",
20471
20555
  onClick: _cache[0] || (_cache[0] = ($event) => goToResults({ searchText: didYouMeanValue.value }))
20472
- }, toDisplayString(didYouMeanValue.value) + " ", 1)) : (openBlock(), createElementBlock("span", _hoisted_4$n, toDisplayString(label) + " ", 1))
20556
+ }, toDisplayString(didYouMeanValue.value) + " ", 1)) : (openBlock(), createElementBlock("span", _hoisted_4$o, toDisplayString(label) + " ", 1))
20473
20557
  ]);
20474
20558
  }), 128))
20475
20559
  ])) : createCommentVNode("", true)
@@ -20477,12 +20561,12 @@ and ensure you are accounting for this risk.
20477
20561
  };
20478
20562
  }
20479
20563
  });
20480
- const _hoisted_1$S = {
20564
+ const _hoisted_1$T = {
20481
20565
  key: 0,
20482
20566
  class: "lupa-search-results-summary"
20483
20567
  };
20484
- const _hoisted_2$F = ["innerHTML"];
20485
- const _sfc_main$X = /* @__PURE__ */ defineComponent({
20568
+ const _hoisted_2$G = ["innerHTML"];
20569
+ const _sfc_main$Y = /* @__PURE__ */ defineComponent({
20486
20570
  __name: "SearchResultsSummary",
20487
20571
  props: {
20488
20572
  label: {},
@@ -20497,8 +20581,8 @@ and ensure you are accounting for this risk.
20497
20581
  return addParamsToLabel(props.label, range, `<span>${totalItems.value}</span>`);
20498
20582
  });
20499
20583
  return (_ctx, _cache) => {
20500
- return unref(totalItems) > 0 ? (openBlock(), createElementBlock("div", _hoisted_1$S, [
20501
- createBaseVNode("div", { innerHTML: summaryLabel.value }, null, 8, _hoisted_2$F),
20584
+ return unref(totalItems) > 0 ? (openBlock(), createElementBlock("div", _hoisted_1$T, [
20585
+ createBaseVNode("div", { innerHTML: summaryLabel.value }, null, 8, _hoisted_2$G),
20502
20586
  _ctx.clearable ? (openBlock(), createElementBlock("span", {
20503
20587
  key: 0,
20504
20588
  class: "lupa-filter-clear",
@@ -20509,19 +20593,19 @@ and ensure you are accounting for this risk.
20509
20593
  };
20510
20594
  }
20511
20595
  });
20512
- const _hoisted_1$R = {
20596
+ const _hoisted_1$S = {
20513
20597
  key: 0,
20514
20598
  class: "lupa-result-page-title",
20515
20599
  "data-cy": "lupa-result-page-title"
20516
20600
  };
20517
- const _hoisted_2$E = { key: 0 };
20518
- const _hoisted_3$v = {
20601
+ const _hoisted_2$F = { key: 0 };
20602
+ const _hoisted_3$w = {
20519
20603
  key: 1,
20520
20604
  class: "lupa-results-total-count"
20521
20605
  };
20522
- const _hoisted_4$m = { class: "lupa-results-total-count-number" };
20606
+ const _hoisted_4$n = { class: "lupa-results-total-count-number" };
20523
20607
  const _hoisted_5$f = ["innerHTML"];
20524
- const _sfc_main$W = /* @__PURE__ */ defineComponent({
20608
+ const _sfc_main$X = /* @__PURE__ */ defineComponent({
20525
20609
  __name: "SearchResultsTitle",
20526
20610
  props: {
20527
20611
  options: {},
@@ -20560,16 +20644,16 @@ and ensure you are accounting for this risk.
20560
20644
  });
20561
20645
  return (_ctx, _cache) => {
20562
20646
  return openBlock(), createElementBlock("div", null, [
20563
- showSearchTitle.value ? (openBlock(), createElementBlock("h1", _hoisted_1$R, [
20647
+ showSearchTitle.value ? (openBlock(), createElementBlock("h1", _hoisted_1$S, [
20564
20648
  createTextVNode(toDisplayString(_ctx.options.labels.searchResults), 1),
20565
- queryText.value ? (openBlock(), createElementBlock("span", _hoisted_2$E, "'" + toDisplayString(queryText.value) + "'", 1)) : createCommentVNode("", true),
20566
- showProductCount.value ? (openBlock(), createElementBlock("span", _hoisted_3$v, [
20649
+ queryText.value ? (openBlock(), createElementBlock("span", _hoisted_2$F, "'" + toDisplayString(queryText.value) + "'", 1)) : createCommentVNode("", true),
20650
+ showProductCount.value ? (openBlock(), createElementBlock("span", _hoisted_3$w, [
20567
20651
  createTextVNode("(" + toDisplayString(searchResultsCountLabel.value), 1),
20568
- createBaseVNode("span", _hoisted_4$m, toDisplayString(unref(totalItems)), 1),
20652
+ createBaseVNode("span", _hoisted_4$n, toDisplayString(unref(totalItems)), 1),
20569
20653
  createTextVNode(")")
20570
20654
  ])) : createCommentVNode("", true)
20571
20655
  ])) : createCommentVNode("", true),
20572
- _ctx.showSummary ? (openBlock(), createBlock(_sfc_main$X, {
20656
+ _ctx.showSummary ? (openBlock(), createBlock(_sfc_main$Y, {
20573
20657
  key: 1,
20574
20658
  label: summaryLabel.value
20575
20659
  }, null, 8, ["label"])) : createCommentVNode("", true),
@@ -20582,16 +20666,16 @@ and ensure you are accounting for this risk.
20582
20666
  };
20583
20667
  }
20584
20668
  });
20585
- const _hoisted_1$Q = { class: "lupa-search-result-filter-value" };
20586
- const _hoisted_2$D = {
20669
+ const _hoisted_1$R = { class: "lupa-search-result-filter-value" };
20670
+ const _hoisted_2$E = {
20587
20671
  class: "lupa-current-filter-label",
20588
20672
  "data-cy": "lupa-current-filter-label"
20589
20673
  };
20590
- const _hoisted_3$u = {
20674
+ const _hoisted_3$v = {
20591
20675
  class: "lupa-current-filter-value",
20592
20676
  "data-cy": "lupa-current-filter-value"
20593
20677
  };
20594
- const _sfc_main$V = /* @__PURE__ */ defineComponent({
20678
+ const _sfc_main$W = /* @__PURE__ */ defineComponent({
20595
20679
  __name: "CurrentFilterDisplay",
20596
20680
  props: {
20597
20681
  filter: {}
@@ -20603,28 +20687,28 @@ and ensure you are accounting for this risk.
20603
20687
  emit2("remove", { filter: props.filter });
20604
20688
  };
20605
20689
  return (_ctx, _cache) => {
20606
- return openBlock(), createElementBlock("div", _hoisted_1$Q, [
20690
+ return openBlock(), createElementBlock("div", _hoisted_1$R, [
20607
20691
  createBaseVNode("div", {
20608
20692
  class: "lupa-current-filter-action",
20609
20693
  onClick: handleClick
20610
20694
  }, "⨉"),
20611
- createBaseVNode("div", _hoisted_2$D, toDisplayString(_ctx.filter.label) + ": ", 1),
20612
- createBaseVNode("div", _hoisted_3$u, toDisplayString(_ctx.filter.value), 1)
20695
+ createBaseVNode("div", _hoisted_2$E, toDisplayString(_ctx.filter.label) + ": ", 1),
20696
+ createBaseVNode("div", _hoisted_3$v, toDisplayString(_ctx.filter.value), 1)
20613
20697
  ]);
20614
20698
  };
20615
20699
  }
20616
20700
  });
20617
- const _hoisted_1$P = { class: "lupa-filter-title-text" };
20618
- const _hoisted_2$C = {
20701
+ const _hoisted_1$Q = { class: "lupa-filter-title-text" };
20702
+ const _hoisted_2$D = {
20619
20703
  key: 0,
20620
20704
  class: "lupa-filter-count"
20621
20705
  };
20622
- const _hoisted_3$t = {
20706
+ const _hoisted_3$u = {
20623
20707
  key: 0,
20624
20708
  class: "filter-values"
20625
20709
  };
20626
- const _hoisted_4$l = { class: "lupa-current-filter-list" };
20627
- const _sfc_main$U = /* @__PURE__ */ defineComponent({
20710
+ const _hoisted_4$m = { class: "lupa-current-filter-list" };
20711
+ const _sfc_main$V = /* @__PURE__ */ defineComponent({
20628
20712
  __name: "CurrentFilters",
20629
20713
  props: {
20630
20714
  options: {},
@@ -20697,19 +20781,19 @@ and ensure you are accounting for this risk.
20697
20781
  class: "lupa-current-filter-title",
20698
20782
  onClick: _cache[0] || (_cache[0] = ($event) => isOpen.value = !isOpen.value)
20699
20783
  }, [
20700
- createBaseVNode("div", _hoisted_1$P, [
20784
+ createBaseVNode("div", _hoisted_1$Q, [
20701
20785
  createTextVNode(toDisplayString((_c = (_b = (_a = _ctx.options) == null ? void 0 : _a.labels) == null ? void 0 : _b.title) != null ? _c : "") + " ", 1),
20702
- _ctx.expandable ? (openBlock(), createElementBlock("span", _hoisted_2$C, " (" + toDisplayString(unref(currentFilterCount)) + ") ", 1)) : createCommentVNode("", true)
20786
+ _ctx.expandable ? (openBlock(), createElementBlock("span", _hoisted_2$D, " (" + toDisplayString(unref(currentFilterCount)) + ") ", 1)) : createCommentVNode("", true)
20703
20787
  ]),
20704
20788
  _ctx.expandable ? (openBlock(), createElementBlock("div", {
20705
20789
  key: 0,
20706
20790
  class: normalizeClass(["lupa-filter-title-caret", isOpen.value && "open"])
20707
20791
  }, null, 2)) : createCommentVNode("", true)
20708
20792
  ]),
20709
- !_ctx.expandable || isOpen.value ? (openBlock(), createElementBlock("div", _hoisted_3$t, [
20710
- createBaseVNode("div", _hoisted_4$l, [
20793
+ !_ctx.expandable || isOpen.value ? (openBlock(), createElementBlock("div", _hoisted_3$u, [
20794
+ createBaseVNode("div", _hoisted_4$m, [
20711
20795
  (openBlock(true), createElementBlock(Fragment, null, renderList(currentDisplayFilters.value, (filter2) => {
20712
- return openBlock(), createBlock(_sfc_main$V, {
20796
+ return openBlock(), createBlock(_sfc_main$W, {
20713
20797
  key: filter2.key + "_" + filter2.value,
20714
20798
  filter: filter2,
20715
20799
  onRemove: handleRemove
@@ -20726,8 +20810,8 @@ and ensure you are accounting for this risk.
20726
20810
  };
20727
20811
  }
20728
20812
  });
20729
- const _hoisted_1$O = ["href"];
20730
- const _sfc_main$T = /* @__PURE__ */ defineComponent({
20813
+ const _hoisted_1$P = ["href"];
20814
+ const _sfc_main$U = /* @__PURE__ */ defineComponent({
20731
20815
  __name: "CategoryFilterItem",
20732
20816
  props: {
20733
20817
  options: {},
@@ -20764,20 +20848,20 @@ and ensure you are accounting for this risk.
20764
20848
  "data-cy": "lupa-child-category-item",
20765
20849
  href: urlLink.value,
20766
20850
  onClick: handleNavigation
20767
- }, toDisplayString(title.value), 9, _hoisted_1$O)
20851
+ }, toDisplayString(title.value), 9, _hoisted_1$P)
20768
20852
  ], 2);
20769
20853
  };
20770
20854
  }
20771
20855
  });
20772
- const _hoisted_1$N = {
20856
+ const _hoisted_1$O = {
20773
20857
  class: "lupa-category-filter",
20774
20858
  "data-cy": "lupa-category-filter"
20775
20859
  };
20776
- const _hoisted_2$B = { class: "lupa-category-back" };
20777
- const _hoisted_3$s = ["href"];
20778
- const _hoisted_4$k = ["href"];
20860
+ const _hoisted_2$C = { class: "lupa-category-back" };
20861
+ const _hoisted_3$t = ["href"];
20862
+ const _hoisted_4$l = ["href"];
20779
20863
  const _hoisted_5$e = { class: "lupa-child-category-list" };
20780
- const _sfc_main$S = /* @__PURE__ */ defineComponent({
20864
+ const _sfc_main$T = /* @__PURE__ */ defineComponent({
20781
20865
  __name: "CategoryFilter",
20782
20866
  props: {
20783
20867
  options: {}
@@ -20865,14 +20949,14 @@ and ensure you are accounting for this risk.
20865
20949
  };
20866
20950
  __expose({ fetch: fetch2 });
20867
20951
  return (_ctx, _cache) => {
20868
- return openBlock(), createElementBlock("div", _hoisted_1$N, [
20869
- createBaseVNode("div", _hoisted_2$B, [
20952
+ return openBlock(), createElementBlock("div", _hoisted_1$O, [
20953
+ createBaseVNode("div", _hoisted_2$C, [
20870
20954
  hasBackButton.value ? (openBlock(), createElementBlock("a", {
20871
20955
  key: 0,
20872
20956
  "data-cy": "lupa-category-back",
20873
20957
  href: backUrlLink.value,
20874
20958
  onClick: handleNavigationBack
20875
- }, toDisplayString(backTitle.value), 9, _hoisted_3$s)) : createCommentVNode("", true)
20959
+ }, toDisplayString(backTitle.value), 9, _hoisted_3$t)) : createCommentVNode("", true)
20876
20960
  ]),
20877
20961
  createBaseVNode("div", {
20878
20962
  class: normalizeClass(["lupa-current-category", { "lupa-current-category-active": isActive }])
@@ -20882,11 +20966,11 @@ and ensure you are accounting for this risk.
20882
20966
  href: parentUrlLink.value,
20883
20967
  class: normalizeClass({ "lupa-title-category": !hasBackButton.value }),
20884
20968
  onClick: handleNavigationParent
20885
- }, toDisplayString(parentTitle.value), 11, _hoisted_4$k)
20969
+ }, toDisplayString(parentTitle.value), 11, _hoisted_4$l)
20886
20970
  ], 2),
20887
20971
  createBaseVNode("div", _hoisted_5$e, [
20888
20972
  (openBlock(true), createElementBlock(Fragment, null, renderList(categoryChildren.value, (child) => {
20889
- return openBlock(), createBlock(_sfc_main$T, {
20973
+ return openBlock(), createBlock(_sfc_main$U, {
20890
20974
  key: getCategoryKey(child),
20891
20975
  item: child,
20892
20976
  options: _ctx.options
@@ -20897,13 +20981,13 @@ and ensure you are accounting for this risk.
20897
20981
  };
20898
20982
  }
20899
20983
  });
20900
- const _hoisted_1$M = {
20984
+ const _hoisted_1$N = {
20901
20985
  class: "lupa-search-result-facet-term-values",
20902
20986
  "data-cy": "lupa-search-result-facet-term-values"
20903
20987
  };
20904
- const _hoisted_2$A = ["placeholder"];
20905
- const _hoisted_3$r = { class: "lupa-terms-list" };
20906
- const _hoisted_4$j = ["onClick"];
20988
+ const _hoisted_2$B = ["placeholder"];
20989
+ const _hoisted_3$s = { class: "lupa-terms-list" };
20990
+ const _hoisted_4$k = ["onClick"];
20907
20991
  const _hoisted_5$d = { class: "lupa-term-checkbox-wrapper" };
20908
20992
  const _hoisted_6$8 = { class: "lupa-term-checkbox-label" };
20909
20993
  const _hoisted_7$6 = { class: "lupa-term-label" };
@@ -20913,7 +20997,7 @@ and ensure you are accounting for this risk.
20913
20997
  };
20914
20998
  const _hoisted_9$2 = { key: 0 };
20915
20999
  const _hoisted_10$1 = { key: 1 };
20916
- const _sfc_main$R = /* @__PURE__ */ defineComponent({
21000
+ const _sfc_main$S = /* @__PURE__ */ defineComponent({
20917
21001
  __name: "TermFacet",
20918
21002
  props: {
20919
21003
  options: {},
@@ -20984,17 +21068,17 @@ and ensure you are accounting for this risk.
20984
21068
  return selectedItems == null ? void 0 : selectedItems.includes((_b = item.title) == null ? void 0 : _b.toString());
20985
21069
  };
20986
21070
  return (_ctx, _cache) => {
20987
- return openBlock(), createElementBlock("div", _hoisted_1$M, [
21071
+ return openBlock(), createElementBlock("div", _hoisted_1$N, [
20988
21072
  isFilterable.value ? withDirectives((openBlock(), createElementBlock("input", {
20989
21073
  key: 0,
20990
21074
  class: "lupa-term-filter",
20991
21075
  "data-cy": "lupa-term-filter",
20992
21076
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => termFilter.value = $event),
20993
21077
  placeholder: _ctx.options.labels.facetFilter
20994
- }, null, 8, _hoisted_2$A)), [
21078
+ }, null, 8, _hoisted_2$B)), [
20995
21079
  [vModelText, termFilter.value]
20996
21080
  ]) : createCommentVNode("", true),
20997
- createBaseVNode("div", _hoisted_3$r, [
21081
+ createBaseVNode("div", _hoisted_3$s, [
20998
21082
  (openBlock(true), createElementBlock(Fragment, null, renderList(displayValues.value, (item) => {
20999
21083
  return openBlock(), createElementBlock("div", {
21000
21084
  class: normalizeClass(["lupa-facet-term", { checked: isChecked(item) }]),
@@ -21011,7 +21095,7 @@ and ensure you are accounting for this risk.
21011
21095
  createBaseVNode("span", _hoisted_7$6, toDisplayString(item.title), 1),
21012
21096
  _ctx.options.showDocumentCount ? (openBlock(), createElementBlock("span", _hoisted_8$2, "(" + toDisplayString(item.count) + ")", 1)) : createCommentVNode("", true)
21013
21097
  ])
21014
- ], 10, _hoisted_4$j);
21098
+ ], 10, _hoisted_4$k);
21015
21099
  }), 128))
21016
21100
  ]),
21017
21101
  displayShowMore.value ? (openBlock(), createElementBlock("div", {
@@ -22002,16 +22086,16 @@ and ensure you are accounting for this risk.
22002
22086
  m.render = function(e2, t, r, i, n, o) {
22003
22087
  return openBlock(), createElementBlock("div", mergeProps(e2.sliderProps, { ref: "slider" }), null, 16);
22004
22088
  }, m.__file = "src/Slider.vue";
22005
- const _hoisted_1$L = { class: "lupa-search-result-facet-stats-values" };
22006
- const _hoisted_2$z = {
22089
+ const _hoisted_1$M = { class: "lupa-search-result-facet-stats-values" };
22090
+ const _hoisted_2$A = {
22007
22091
  key: 0,
22008
22092
  class: "lupa-stats-facet-summary"
22009
22093
  };
22010
- const _hoisted_3$q = {
22094
+ const _hoisted_3$r = {
22011
22095
  key: 1,
22012
22096
  class: "lupa-stats-facet-summary-input"
22013
22097
  };
22014
- const _hoisted_4$i = {
22098
+ const _hoisted_4$j = {
22015
22099
  key: 0,
22016
22100
  class: "lupa-stats-range-label"
22017
22101
  };
@@ -22030,7 +22114,7 @@ and ensure you are accounting for this risk.
22030
22114
  key: 2,
22031
22115
  class: "lupa-stats-slider-wrapper"
22032
22116
  };
22033
- const _sfc_main$Q = /* @__PURE__ */ defineComponent({
22117
+ const _sfc_main$R = /* @__PURE__ */ defineComponent({
22034
22118
  __name: "StatsFacet",
22035
22119
  props: {
22036
22120
  options: {},
@@ -22207,10 +22291,10 @@ and ensure you are accounting for this risk.
22207
22291
  innerSliderRange.value = value;
22208
22292
  };
22209
22293
  return (_ctx, _cache) => {
22210
- return openBlock(), createElementBlock("div", _hoisted_1$L, [
22211
- !isInputVisible.value ? (openBlock(), createElementBlock("div", _hoisted_2$z, toDisplayString(statsSummary.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$q, [
22294
+ return openBlock(), createElementBlock("div", _hoisted_1$M, [
22295
+ !isInputVisible.value ? (openBlock(), createElementBlock("div", _hoisted_2$A, toDisplayString(statsSummary.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$r, [
22212
22296
  createBaseVNode("div", null, [
22213
- rangeLabelFrom.value ? (openBlock(), createElementBlock("div", _hoisted_4$i, toDisplayString(rangeLabelFrom.value), 1)) : createCommentVNode("", true),
22297
+ rangeLabelFrom.value ? (openBlock(), createElementBlock("div", _hoisted_4$j, toDisplayString(rangeLabelFrom.value), 1)) : createCommentVNode("", true),
22214
22298
  createBaseVNode("div", _hoisted_5$c, [
22215
22299
  withDirectives(createBaseVNode("input", {
22216
22300
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => fromValue.value = $event),
@@ -22274,10 +22358,10 @@ and ensure you are accounting for this risk.
22274
22358
  };
22275
22359
  }
22276
22360
  });
22277
- const _hoisted_1$K = { class: "lupa-term-checkbox-wrapper" };
22278
- const _hoisted_2$y = { class: "lupa-term-checkbox-label" };
22279
- const _hoisted_3$p = { class: "lupa-term-label" };
22280
- const _hoisted_4$h = {
22361
+ const _hoisted_1$L = { class: "lupa-term-checkbox-wrapper" };
22362
+ const _hoisted_2$z = { class: "lupa-term-checkbox-label" };
22363
+ const _hoisted_3$q = { class: "lupa-term-label" };
22364
+ const _hoisted_4$i = {
22281
22365
  key: 0,
22282
22366
  class: "lupa-term-count"
22283
22367
  };
@@ -22285,7 +22369,7 @@ and ensure you are accounting for this risk.
22285
22369
  key: 0,
22286
22370
  class: "lupa-facet-level"
22287
22371
  };
22288
- const _sfc_main$P = /* @__PURE__ */ defineComponent({
22372
+ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
22289
22373
  __name: "HierarchyFacetLevel",
22290
22374
  props: {
22291
22375
  options: {},
@@ -22331,14 +22415,14 @@ and ensure you are accounting for this risk.
22331
22415
  "data-cy": "lupa-facet-term",
22332
22416
  onClick: _cache[0] || (_cache[0] = ($event) => handleFacetClick(_ctx.item))
22333
22417
  }, [
22334
- createBaseVNode("div", _hoisted_1$K, [
22418
+ createBaseVNode("div", _hoisted_1$L, [
22335
22419
  createBaseVNode("span", {
22336
22420
  class: normalizeClass(["lupa-term-checkbox", { checked: isChecked.value }])
22337
22421
  }, null, 2)
22338
22422
  ]),
22339
- createBaseVNode("div", _hoisted_2$y, [
22340
- createBaseVNode("span", _hoisted_3$p, toDisplayString(_ctx.item.title) + toDisplayString(" "), 1),
22341
- _ctx.options.showDocumentCount ? (openBlock(), createElementBlock("span", _hoisted_4$h, "(" + toDisplayString(_ctx.item.count) + ")", 1)) : createCommentVNode("", true)
22423
+ createBaseVNode("div", _hoisted_2$z, [
22424
+ createBaseVNode("span", _hoisted_3$q, toDisplayString(_ctx.item.title) + toDisplayString(" "), 1),
22425
+ _ctx.options.showDocumentCount ? (openBlock(), createElementBlock("span", _hoisted_4$i, "(" + toDisplayString(_ctx.item.count) + ")", 1)) : createCommentVNode("", true)
22342
22426
  ])
22343
22427
  ]),
22344
22428
  showChildren.value ? (openBlock(), createElementBlock("div", _hoisted_5$b, [
@@ -22357,13 +22441,13 @@ and ensure you are accounting for this risk.
22357
22441
  };
22358
22442
  }
22359
22443
  });
22360
- const _hoisted_1$J = {
22444
+ const _hoisted_1$K = {
22361
22445
  class: "lupa-search-result-facet-term-values lupa-search-result-facet-hierarchy-values",
22362
22446
  "data-cy": "lupa-search-result-facet-term-values"
22363
22447
  };
22364
- const _hoisted_2$x = { key: 0 };
22365
- const _hoisted_3$o = ["placeholder"];
22366
- const _sfc_main$O = /* @__PURE__ */ defineComponent({
22448
+ const _hoisted_2$y = { key: 0 };
22449
+ const _hoisted_3$p = ["placeholder"];
22450
+ const _sfc_main$P = /* @__PURE__ */ defineComponent({
22367
22451
  __name: "HierarchyFacet",
22368
22452
  props: {
22369
22453
  options: {},
@@ -22418,19 +22502,19 @@ and ensure you are accounting for this risk.
22418
22502
  showAll.value = false;
22419
22503
  };
22420
22504
  return (_ctx, _cache) => {
22421
- return openBlock(), createElementBlock("div", _hoisted_1$J, [
22422
- isFilterable.value ? (openBlock(), createElementBlock("div", _hoisted_2$x, [
22505
+ return openBlock(), createElementBlock("div", _hoisted_1$K, [
22506
+ isFilterable.value ? (openBlock(), createElementBlock("div", _hoisted_2$y, [
22423
22507
  withDirectives(createBaseVNode("input", {
22424
22508
  class: "lupa-term-filter",
22425
22509
  "data-cy": "lupa-term-filter",
22426
22510
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => termFilter.value = $event),
22427
22511
  placeholder: _ctx.options.labels.facetFilter
22428
- }, null, 8, _hoisted_3$o), [
22512
+ }, null, 8, _hoisted_3$p), [
22429
22513
  [vModelText, termFilter.value]
22430
22514
  ])
22431
22515
  ])) : createCommentVNode("", true),
22432
22516
  (openBlock(true), createElementBlock(Fragment, null, renderList(displayValues.value, (item) => {
22433
- return openBlock(), createBlock(_sfc_main$P, {
22517
+ return openBlock(), createBlock(_sfc_main$Q, {
22434
22518
  key: item.title,
22435
22519
  options: _ctx.options,
22436
22520
  item,
@@ -22454,20 +22538,20 @@ and ensure you are accounting for this risk.
22454
22538
  };
22455
22539
  }
22456
22540
  });
22457
- const _hoisted_1$I = { class: "lupa-facet-label-text" };
22458
- const _hoisted_2$w = {
22541
+ const _hoisted_1$J = { class: "lupa-facet-label-text" };
22542
+ const _hoisted_2$x = {
22459
22543
  key: 0,
22460
22544
  class: "lupa-facet-content",
22461
22545
  "data-cy": "lupa-facet-content"
22462
22546
  };
22463
22547
  const __default__$1 = {
22464
22548
  components: {
22465
- TermFacet: _sfc_main$R,
22466
- StatsFacet: _sfc_main$Q,
22467
- HierarchyFacet: _sfc_main$O
22549
+ TermFacet: _sfc_main$S,
22550
+ StatsFacet: _sfc_main$R,
22551
+ HierarchyFacet: _sfc_main$P
22468
22552
  }
22469
22553
  };
22470
- const _sfc_main$N = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValues2({}, __default__$1), {
22554
+ const _sfc_main$O = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValues2({}, __default__$1), {
22471
22555
  __name: "FacetDisplay",
22472
22556
  props: {
22473
22557
  options: {},
@@ -22579,12 +22663,12 @@ and ensure you are accounting for this risk.
22579
22663
  "data-cy": "lupa-search-result-facet-label",
22580
22664
  onClick: toggleFacet
22581
22665
  }, [
22582
- createBaseVNode("div", _hoisted_1$I, toDisplayString(facet.value.label), 1),
22666
+ createBaseVNode("div", _hoisted_1$J, toDisplayString(facet.value.label), 1),
22583
22667
  createBaseVNode("div", {
22584
22668
  class: normalizeClass(["lupa-facet-label-caret", isOpen.value && "open"])
22585
22669
  }, null, 2)
22586
22670
  ], 2),
22587
- isOpen.value ? (openBlock(), createElementBlock("div", _hoisted_2$w, [
22671
+ isOpen.value ? (openBlock(), createElementBlock("div", _hoisted_2$x, [
22588
22672
  (openBlock(), createBlock(resolveDynamicComponent(facetType.value), {
22589
22673
  facet: facet.value,
22590
22674
  currentFilters: currentFilters.value[facet.value.key],
@@ -22602,12 +22686,12 @@ and ensure you are accounting for this risk.
22602
22686
  };
22603
22687
  }
22604
22688
  }));
22605
- const _hoisted_1$H = { class: "lupa-search-result-facet-section" };
22606
- const _hoisted_2$v = {
22689
+ const _hoisted_1$I = { class: "lupa-search-result-facet-section" };
22690
+ const _hoisted_2$w = {
22607
22691
  key: 0,
22608
22692
  class: "lupa-facets-title"
22609
22693
  };
22610
- const _sfc_main$M = /* @__PURE__ */ defineComponent({
22694
+ const _sfc_main$N = /* @__PURE__ */ defineComponent({
22611
22695
  __name: "FacetList",
22612
22696
  props: {
22613
22697
  options: {},
@@ -22641,14 +22725,14 @@ and ensure you are accounting for this risk.
22641
22725
  };
22642
22726
  return (_ctx, _cache) => {
22643
22727
  var _a;
22644
- return openBlock(), createElementBlock("div", _hoisted_1$H, [
22645
- _ctx.options.labels.title ? (openBlock(), createElementBlock("div", _hoisted_2$v, toDisplayString(_ctx.options.labels.title), 1)) : createCommentVNode("", true),
22728
+ return openBlock(), createElementBlock("div", _hoisted_1$I, [
22729
+ _ctx.options.labels.title ? (openBlock(), createElementBlock("div", _hoisted_2$w, toDisplayString(_ctx.options.labels.title), 1)) : createCommentVNode("", true),
22646
22730
  createBaseVNode("div", {
22647
22731
  class: normalizeClass(["lupa-search-result-facet-list", "lupa-" + ((_a = _ctx.facetStyle) != null ? _a : "")])
22648
22732
  }, [
22649
22733
  (openBlock(true), createElementBlock(Fragment, null, renderList(displayFacets.value, (facet) => {
22650
22734
  var _a2;
22651
- return openBlock(), createBlock(_sfc_main$N, {
22735
+ return openBlock(), createBlock(_sfc_main$O, {
22652
22736
  key: facet.key,
22653
22737
  facet,
22654
22738
  currentFilters: currentFiltersValue.value,
@@ -22663,8 +22747,8 @@ and ensure you are accounting for this risk.
22663
22747
  };
22664
22748
  }
22665
22749
  });
22666
- const _hoisted_1$G = ["onClick"];
22667
- const _sfc_main$L = /* @__PURE__ */ defineComponent({
22750
+ const _hoisted_1$H = ["onClick"];
22751
+ const _sfc_main$M = /* @__PURE__ */ defineComponent({
22668
22752
  __name: "FacetsButton",
22669
22753
  props: {
22670
22754
  options: {}
@@ -22684,13 +22768,13 @@ and ensure you are accounting for this risk.
22684
22768
  key: 0,
22685
22769
  class: "lupa-facets-button-filter",
22686
22770
  onClick: withModifiers(handleClick, ["stop"])
22687
- }, toDisplayString(label.value), 9, _hoisted_1$G)) : createCommentVNode("", true);
22771
+ }, toDisplayString(label.value), 9, _hoisted_1$H)) : createCommentVNode("", true);
22688
22772
  };
22689
22773
  }
22690
22774
  });
22691
- const _hoisted_1$F = { class: "lupa-search-result-facets" };
22692
- const _hoisted_2$u = { class: "lupa-facets-filter-button-wrapper" };
22693
- const _sfc_main$K = /* @__PURE__ */ defineComponent({
22775
+ const _hoisted_1$G = { class: "lupa-search-result-facets" };
22776
+ const _hoisted_2$v = { class: "lupa-facets-filter-button-wrapper" };
22777
+ const _sfc_main$L = /* @__PURE__ */ defineComponent({
22694
22778
  __name: "Facets",
22695
22779
  props: {
22696
22780
  options: {},
@@ -22773,8 +22857,8 @@ and ensure you are accounting for this risk.
22773
22857
  emit2("filter");
22774
22858
  };
22775
22859
  return (_ctx, _cache) => {
22776
- return openBlock(), createElementBlock("div", _hoisted_1$F, [
22777
- regularFacets.value ? (openBlock(), createBlock(_sfc_main$M, {
22860
+ return openBlock(), createElementBlock("div", _hoisted_1$G, [
22861
+ regularFacets.value ? (openBlock(), createBlock(_sfc_main$N, {
22778
22862
  key: 0,
22779
22863
  options: _ctx.options,
22780
22864
  facets: regularFacets.value,
@@ -22784,8 +22868,8 @@ and ensure you are accounting for this risk.
22784
22868
  onSelect: handleFacetSelect,
22785
22869
  onClear: clear2
22786
22870
  }, null, 8, ["options", "facets", "currentFilters", "facetStyle", "clearable"])) : createCommentVNode("", true),
22787
- createBaseVNode("div", _hoisted_2$u, [
22788
- showFilterButton.value ? (openBlock(), createBlock(_sfc_main$L, {
22871
+ createBaseVNode("div", _hoisted_2$v, [
22872
+ showFilterButton.value ? (openBlock(), createBlock(_sfc_main$M, {
22789
22873
  key: 0,
22790
22874
  options: _ctx.options,
22791
22875
  onFilter: filter2
@@ -22795,11 +22879,11 @@ and ensure you are accounting for this risk.
22795
22879
  };
22796
22880
  }
22797
22881
  });
22798
- const _hoisted_1$E = {
22882
+ const _hoisted_1$F = {
22799
22883
  id: "lupa-search-result-filters",
22800
22884
  class: "lupa-search-result-filters"
22801
22885
  };
22802
- const _sfc_main$J = /* @__PURE__ */ defineComponent({
22886
+ const _sfc_main$K = /* @__PURE__ */ defineComponent({
22803
22887
  __name: "SearchResultsFilters",
22804
22888
  props: {
22805
22889
  options: {},
@@ -22832,19 +22916,19 @@ and ensure you are accounting for this risk.
22832
22916
  __expose({ fetch: fetch2 });
22833
22917
  return (_ctx, _cache) => {
22834
22918
  var _a;
22835
- return openBlock(), createElementBlock("div", _hoisted_1$E, [
22836
- showCurrentFilters.value ? (openBlock(), createBlock(_sfc_main$U, {
22919
+ return openBlock(), createElementBlock("div", _hoisted_1$F, [
22920
+ showCurrentFilters.value ? (openBlock(), createBlock(_sfc_main$V, {
22837
22921
  key: 0,
22838
22922
  options: _ctx.options.currentFilters,
22839
22923
  expandable: (_a = _ctx.expandable) != null ? _a : false
22840
22924
  }, null, 8, ["options", "expandable"])) : createCommentVNode("", true),
22841
- _ctx.options.categories ? (openBlock(), createBlock(_sfc_main$S, {
22925
+ _ctx.options.categories ? (openBlock(), createBlock(_sfc_main$T, {
22842
22926
  key: 1,
22843
22927
  options: _ctx.options.categories,
22844
22928
  ref_key: "categoryFilters",
22845
22929
  ref: categoryFilters
22846
22930
  }, null, 8, ["options"])) : createCommentVNode("", true),
22847
- _ctx.options.facets ? (openBlock(), createBlock(_sfc_main$K, {
22931
+ _ctx.options.facets ? (openBlock(), createBlock(_sfc_main$L, {
22848
22932
  key: 2,
22849
22933
  options: _ctx.options.facets,
22850
22934
  onFilter: filter2
@@ -22853,20 +22937,20 @@ and ensure you are accounting for this risk.
22853
22937
  };
22854
22938
  }
22855
22939
  });
22856
- const _hoisted_1$D = {
22940
+ const _hoisted_1$E = {
22857
22941
  key: 0,
22858
22942
  class: "lupa-mobile-filter-sidebar"
22859
22943
  };
22860
- const _hoisted_2$t = ["onClick"];
22861
- const _hoisted_3$n = { class: "lupa-mobile-sidebar-content" };
22862
- const _hoisted_4$g = { class: "lupa-sidebar-top" };
22944
+ const _hoisted_2$u = ["onClick"];
22945
+ const _hoisted_3$o = { class: "lupa-mobile-sidebar-content" };
22946
+ const _hoisted_4$h = { class: "lupa-sidebar-top" };
22863
22947
  const _hoisted_5$a = { class: "lupa-sidebar-title" };
22864
22948
  const _hoisted_6$6 = {
22865
22949
  key: 0,
22866
22950
  class: "lupa-sidebar-filter-count"
22867
22951
  };
22868
22952
  const _hoisted_7$4 = { class: "lupa-sidebar-filter-options" };
22869
- const _sfc_main$I = /* @__PURE__ */ defineComponent({
22953
+ const _sfc_main$J = /* @__PURE__ */ defineComponent({
22870
22954
  __name: "MobileFilterSidebar",
22871
22955
  props: {
22872
22956
  options: {}
@@ -22897,13 +22981,13 @@ and ensure you are accounting for this risk.
22897
22981
  handleMobileToggle();
22898
22982
  };
22899
22983
  return (_ctx, _cache) => {
22900
- return isMobileSidebarVisible.value ? (openBlock(), createElementBlock("div", _hoisted_1$D, [
22984
+ return isMobileSidebarVisible.value ? (openBlock(), createElementBlock("div", _hoisted_1$E, [
22901
22985
  createBaseVNode("div", {
22902
22986
  class: "lupa-sidebar-close",
22903
22987
  onClick: withModifiers(handleMobileToggle, ["stop"])
22904
- }, null, 8, _hoisted_2$t),
22905
- createBaseVNode("div", _hoisted_3$n, [
22906
- createBaseVNode("div", _hoisted_4$g, [
22988
+ }, null, 8, _hoisted_2$u),
22989
+ createBaseVNode("div", _hoisted_3$o, [
22990
+ createBaseVNode("div", _hoisted_4$h, [
22907
22991
  createBaseVNode("div", _hoisted_5$a, [
22908
22992
  createTextVNode(toDisplayString(sidebarTitle.value) + " ", 1),
22909
22993
  isFilterCountVisible.value ? (openBlock(), createElementBlock("span", _hoisted_6$6, toDisplayString(unref(currentFilterCount)), 1)) : createCommentVNode("", true)
@@ -22914,7 +22998,7 @@ and ensure you are accounting for this risk.
22914
22998
  })
22915
22999
  ]),
22916
23000
  createBaseVNode("div", _hoisted_7$4, [
22917
- createVNode(_sfc_main$J, {
23001
+ createVNode(_sfc_main$K, {
22918
23002
  options: _ctx.options,
22919
23003
  expandable: isActiveFiltersExpanded.value,
22920
23004
  onFilter: filter2
@@ -22925,14 +23009,14 @@ and ensure you are accounting for this risk.
22925
23009
  };
22926
23010
  }
22927
23011
  });
22928
- const _hoisted_1$C = { id: "lupa-search-results-breadcrumbs" };
22929
- const _hoisted_2$s = ["href", "onClick"];
22930
- const _hoisted_3$m = {
23012
+ const _hoisted_1$D = { id: "lupa-search-results-breadcrumbs" };
23013
+ const _hoisted_2$t = ["href", "onClick"];
23014
+ const _hoisted_3$n = {
22931
23015
  key: 1,
22932
23016
  class: "lupa-search-results-breadcrumb-text"
22933
23017
  };
22934
- const _hoisted_4$f = { key: 2 };
22935
- const _sfc_main$H = /* @__PURE__ */ defineComponent({
23018
+ const _hoisted_4$g = { key: 2 };
23019
+ const _sfc_main$I = /* @__PURE__ */ defineComponent({
22936
23020
  __name: "SearchResultsBreadcrumbs",
22937
23021
  props: {
22938
23022
  breadcrumbs: {}
@@ -22957,7 +23041,7 @@ and ensure you are accounting for this risk.
22957
23041
  handleRoutingEvent(link, event, hasEventRouting.value);
22958
23042
  };
22959
23043
  return (_ctx, _cache) => {
22960
- return openBlock(), createElementBlock("div", _hoisted_1$C, [
23044
+ return openBlock(), createElementBlock("div", _hoisted_1$D, [
22961
23045
  (openBlock(true), createElementBlock(Fragment, null, renderList(breadcrumbsValue.value, (breadcrumb, index) => {
22962
23046
  return openBlock(), createElementBlock("span", {
22963
23047
  class: "lupa-search-results-breadcrumb",
@@ -22971,19 +23055,19 @@ and ensure you are accounting for this risk.
22971
23055
  var _a;
22972
23056
  return handleNavigation(e2, (_a = breadcrumb == null ? void 0 : breadcrumb.link) != null ? _a : "");
22973
23057
  }
22974
- }, toDisplayString(getLabel(breadcrumb.label)), 9, _hoisted_2$s)) : (openBlock(), createElementBlock("span", _hoisted_3$m, toDisplayString(getLabel(breadcrumb.label)), 1)),
22975
- index < breadcrumbsValue.value.length - 1 ? (openBlock(), createElementBlock("span", _hoisted_4$f, " / ")) : createCommentVNode("", true)
23058
+ }, toDisplayString(getLabel(breadcrumb.label)), 9, _hoisted_2$t)) : (openBlock(), createElementBlock("span", _hoisted_3$n, toDisplayString(getLabel(breadcrumb.label)), 1)),
23059
+ index < breadcrumbsValue.value.length - 1 ? (openBlock(), createElementBlock("span", _hoisted_4$g, " / ")) : createCommentVNode("", true)
22976
23060
  ]);
22977
23061
  }), 128))
22978
23062
  ]);
22979
23063
  };
22980
23064
  }
22981
23065
  });
22982
- const _hoisted_1$B = {
23066
+ const _hoisted_1$C = {
22983
23067
  id: "lupa-search-result-filters",
22984
23068
  class: "lupa-search-result-filters lupa-search-result-top-filters"
22985
23069
  };
22986
- const _sfc_main$G = /* @__PURE__ */ defineComponent({
23070
+ const _sfc_main$H = /* @__PURE__ */ defineComponent({
22987
23071
  __name: "FiltersTopDropdown",
22988
23072
  props: {
22989
23073
  options: {}
@@ -22995,8 +23079,8 @@ and ensure you are accounting for this risk.
22995
23079
  };
22996
23080
  return (_ctx, _cache) => {
22997
23081
  var _a;
22998
- return openBlock(), createElementBlock("div", _hoisted_1$B, [
22999
- _ctx.options.facets ? (openBlock(), createBlock(_sfc_main$K, {
23082
+ return openBlock(), createElementBlock("div", _hoisted_1$C, [
23083
+ _ctx.options.facets ? (openBlock(), createBlock(_sfc_main$L, {
23000
23084
  key: 0,
23001
23085
  options: _ctx.options.facets,
23002
23086
  "facet-style": (_a = _ctx.options.facets.style) == null ? void 0 : _a.type,
@@ -23007,8 +23091,8 @@ and ensure you are accounting for this risk.
23007
23091
  };
23008
23092
  }
23009
23093
  });
23010
- const _hoisted_1$A = { id: "lupa-search-results-layout-selection" };
23011
- const _sfc_main$F = /* @__PURE__ */ defineComponent({
23094
+ const _hoisted_1$B = { id: "lupa-search-results-layout-selection" };
23095
+ const _sfc_main$G = /* @__PURE__ */ defineComponent({
23012
23096
  __name: "SearchResultsLayoutSelection",
23013
23097
  setup(__props) {
23014
23098
  const searchResultStore = useSearchResultStore();
@@ -23019,7 +23103,7 @@ and ensure you are accounting for this risk.
23019
23103
  searchResultStore.setLayout(layout2);
23020
23104
  };
23021
23105
  return (_ctx, _cache) => {
23022
- return openBlock(), createElementBlock("div", _hoisted_1$A, [
23106
+ return openBlock(), createElementBlock("div", _hoisted_1$B, [
23023
23107
  createBaseVNode("div", {
23024
23108
  class: normalizeClass([
23025
23109
  "lupa-layout-selection-grid",
@@ -23041,11 +23125,11 @@ and ensure you are accounting for this risk.
23041
23125
  };
23042
23126
  }
23043
23127
  });
23044
- const _hoisted_1$z = {
23128
+ const _hoisted_1$A = {
23045
23129
  key: 0,
23046
23130
  class: "lupa-mobile-toggle-filter-count"
23047
23131
  };
23048
- const _sfc_main$E = /* @__PURE__ */ defineComponent({
23132
+ const _sfc_main$F = /* @__PURE__ */ defineComponent({
23049
23133
  __name: "SearchResultsMobileToggle",
23050
23134
  props: {
23051
23135
  label: {},
@@ -23063,26 +23147,26 @@ and ensure you are accounting for this risk.
23063
23147
  onClick: handleMobileToggle
23064
23148
  }, [
23065
23149
  createTextVNode(toDisplayString(_ctx.label) + " ", 1),
23066
- _ctx.showFilterCount && unref(currentFilterCount) > 0 ? (openBlock(), createElementBlock("span", _hoisted_1$z, toDisplayString(unref(currentFilterCount)), 1)) : createCommentVNode("", true)
23150
+ _ctx.showFilterCount && unref(currentFilterCount) > 0 ? (openBlock(), createElementBlock("span", _hoisted_1$A, toDisplayString(unref(currentFilterCount)), 1)) : createCommentVNode("", true)
23067
23151
  ], 2);
23068
23152
  };
23069
23153
  }
23070
23154
  });
23071
- const _hoisted_1$y = {
23155
+ const _hoisted_1$z = {
23072
23156
  key: 0,
23073
23157
  id: "lupa-search-results-page-select",
23074
23158
  "data-cy": "lupa-search-results-page-select"
23075
23159
  };
23076
- const _hoisted_2$r = {
23160
+ const _hoisted_2$s = {
23077
23161
  key: 0,
23078
23162
  class: "lupa-page-number-separator"
23079
23163
  };
23080
- const _hoisted_3$l = ["onClick"];
23081
- const _hoisted_4$e = {
23164
+ const _hoisted_3$m = ["onClick"];
23165
+ const _hoisted_4$f = {
23082
23166
  key: 0,
23083
23167
  class: "lupa-page-number-separator"
23084
23168
  };
23085
- const _sfc_main$D = /* @__PURE__ */ defineComponent({
23169
+ const _sfc_main$E = /* @__PURE__ */ defineComponent({
23086
23170
  __name: "SearchResultsPageSelect",
23087
23171
  props: {
23088
23172
  lastPageLabel: {},
@@ -23159,7 +23243,7 @@ and ensure you are accounting for this risk.
23159
23243
  }
23160
23244
  };
23161
23245
  return (_ctx, _cache) => {
23162
- return showPagination.value ? (openBlock(), createElementBlock("div", _hoisted_1$y, [
23246
+ return showPagination.value ? (openBlock(), createElementBlock("div", _hoisted_1$z, [
23163
23247
  showBack.value ? (openBlock(), createElementBlock("div", {
23164
23248
  key: 0,
23165
23249
  class: normalizeClass(firstPageLabel.value === "<" ? "lupa-page-arrow" : "lupa-show-less"),
@@ -23170,7 +23254,7 @@ and ensure you are accounting for this risk.
23170
23254
  class: "lupa-page-number lupa-page-number-first",
23171
23255
  onClick: _cache[1] || (_cache[1] = () => handlePageChange(1))
23172
23256
  }, " 1 "),
23173
- showFirstPageSeparator.value ? (openBlock(), createElementBlock("div", _hoisted_2$r, "...")) : createCommentVNode("", true)
23257
+ showFirstPageSeparator.value ? (openBlock(), createElementBlock("div", _hoisted_2$s, "...")) : createCommentVNode("", true)
23174
23258
  ], 64)) : createCommentVNode("", true),
23175
23259
  (openBlock(true), createElementBlock(Fragment, null, renderList(pages.value, (page) => {
23176
23260
  return openBlock(), createElementBlock("div", {
@@ -23181,10 +23265,10 @@ and ensure you are accounting for this risk.
23181
23265
  page === _ctx.options.selectedPage ? "lupa-page-number-selected" : ""
23182
23266
  ]),
23183
23267
  "data-cy": "lupa-page-number"
23184
- }, toDisplayString(page), 11, _hoisted_3$l);
23268
+ }, toDisplayString(page), 11, _hoisted_3$m);
23185
23269
  }), 128)),
23186
23270
  showLastPage.value ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
23187
- showLastPageSeparator.value ? (openBlock(), createElementBlock("div", _hoisted_4$e, "...")) : createCommentVNode("", true),
23271
+ showLastPageSeparator.value ? (openBlock(), createElementBlock("div", _hoisted_4$f, "...")) : createCommentVNode("", true),
23188
23272
  createBaseVNode("div", {
23189
23273
  class: "lupa-page-number lupa-page-number-last",
23190
23274
  onClick: _cache[2] || (_cache[2] = () => {
@@ -23203,15 +23287,15 @@ and ensure you are accounting for this risk.
23203
23287
  };
23204
23288
  }
23205
23289
  });
23206
- const _hoisted_1$x = {
23290
+ const _hoisted_1$y = {
23207
23291
  id: "lupa-search-results-page-size",
23208
23292
  "data-cy": "lupa-search-results-page-size"
23209
23293
  };
23210
- const _hoisted_2$q = { id: "lupa-select" };
23211
- const _hoisted_3$k = { class: "lupa-select-label" };
23212
- const _hoisted_4$d = ["aria-label"];
23294
+ const _hoisted_2$r = { id: "lupa-select" };
23295
+ const _hoisted_3$l = { class: "lupa-select-label" };
23296
+ const _hoisted_4$e = ["aria-label"];
23213
23297
  const _hoisted_5$9 = ["value"];
23214
- const _sfc_main$C = /* @__PURE__ */ defineComponent({
23298
+ const _sfc_main$D = /* @__PURE__ */ defineComponent({
23215
23299
  __name: "SearchResultsPageSize",
23216
23300
  props: {
23217
23301
  labels: {},
@@ -23239,9 +23323,9 @@ and ensure you are accounting for this risk.
23239
23323
  });
23240
23324
  };
23241
23325
  return (_ctx, _cache) => {
23242
- return openBlock(), createElementBlock("div", _hoisted_1$x, [
23243
- createBaseVNode("div", _hoisted_2$q, [
23244
- createBaseVNode("label", _hoisted_3$k, toDisplayString(label.value), 1),
23326
+ return openBlock(), createElementBlock("div", _hoisted_1$y, [
23327
+ createBaseVNode("div", _hoisted_2$r, [
23328
+ createBaseVNode("label", _hoisted_3$l, toDisplayString(label.value), 1),
23245
23329
  createBaseVNode("select", {
23246
23330
  class: "lupa-select-dropdown",
23247
23331
  "aria-label": label.value,
@@ -23256,21 +23340,21 @@ and ensure you are accounting for this risk.
23256
23340
  value: option
23257
23341
  }, toDisplayString(prefixLabel.value) + toDisplayString(option), 9, _hoisted_5$9);
23258
23342
  }), 128))
23259
- ], 40, _hoisted_4$d)
23343
+ ], 40, _hoisted_4$e)
23260
23344
  ])
23261
23345
  ]);
23262
23346
  };
23263
23347
  }
23264
23348
  });
23265
- const _hoisted_1$w = {
23349
+ const _hoisted_1$x = {
23266
23350
  id: "lupa-search-results-sort",
23267
23351
  class: "lupa-search-results-sort"
23268
23352
  };
23269
- const _hoisted_2$p = { id: "lupa-select" };
23270
- const _hoisted_3$j = { class: "lupa-select-label" };
23271
- const _hoisted_4$c = ["aria-label"];
23353
+ const _hoisted_2$q = { id: "lupa-select" };
23354
+ const _hoisted_3$k = { class: "lupa-select-label" };
23355
+ const _hoisted_4$d = ["aria-label"];
23272
23356
  const _hoisted_5$8 = ["value"];
23273
- const _sfc_main$B = /* @__PURE__ */ defineComponent({
23357
+ const _sfc_main$C = /* @__PURE__ */ defineComponent({
23274
23358
  __name: "SearchResultsSort",
23275
23359
  props: {
23276
23360
  options: {},
@@ -23319,9 +23403,9 @@ and ensure you are accounting for this risk.
23319
23403
  previousKey.value = selectedKey.value;
23320
23404
  };
23321
23405
  return (_ctx, _cache) => {
23322
- return openBlock(), createElementBlock("div", _hoisted_1$w, [
23323
- createBaseVNode("div", _hoisted_2$p, [
23324
- createBaseVNode("label", _hoisted_3$j, toDisplayString(_ctx.options.label), 1),
23406
+ return openBlock(), createElementBlock("div", _hoisted_1$x, [
23407
+ createBaseVNode("div", _hoisted_2$q, [
23408
+ createBaseVNode("label", _hoisted_3$k, toDisplayString(_ctx.options.label), 1),
23325
23409
  withDirectives(createBaseVNode("select", {
23326
23410
  class: "lupa-select-dropdown",
23327
23411
  "aria-label": _ctx.options.label,
@@ -23336,7 +23420,7 @@ and ensure you are accounting for this risk.
23336
23420
  value: option.key
23337
23421
  }, toDisplayString(option.label), 9, _hoisted_5$8);
23338
23422
  }), 128))
23339
- ], 40, _hoisted_4$c), [
23423
+ ], 40, _hoisted_4$d), [
23340
23424
  [vModelSelect, selectedKey.value]
23341
23425
  ])
23342
23426
  ])
@@ -23344,13 +23428,13 @@ and ensure you are accounting for this risk.
23344
23428
  };
23345
23429
  }
23346
23430
  });
23347
- const _hoisted_1$v = { class: "lupa-toolbar-left" };
23348
- const _hoisted_2$o = {
23431
+ const _hoisted_1$w = { class: "lupa-toolbar-left" };
23432
+ const _hoisted_2$p = {
23349
23433
  key: 0,
23350
23434
  class: "lupa-toolbar-right-title"
23351
23435
  };
23352
- const _hoisted_3$i = { key: 2 };
23353
- const _hoisted_4$b = { key: 4 };
23436
+ const _hoisted_3$j = { key: 2 };
23437
+ const _hoisted_4$c = { key: 4 };
23354
23438
  const _hoisted_5$7 = { key: 6 };
23355
23439
  const _hoisted_6$5 = { class: "lupa-toolbar-right" };
23356
23440
  const _hoisted_7$3 = {
@@ -23359,7 +23443,7 @@ and ensure you are accounting for this risk.
23359
23443
  };
23360
23444
  const _hoisted_8 = { key: 2 };
23361
23445
  const _hoisted_9 = { key: 4 };
23362
- const _sfc_main$A = /* @__PURE__ */ defineComponent({
23446
+ const _sfc_main$B = /* @__PURE__ */ defineComponent({
23363
23447
  __name: "SearchResultsToolbar",
23364
23448
  props: {
23365
23449
  options: {},
@@ -23466,16 +23550,16 @@ and ensure you are accounting for this risk.
23466
23550
  id: "lupa-search-results-toolbar",
23467
23551
  class: normalizeClass({ "lupa-filter-no-results": !hasResults.value })
23468
23552
  }, [
23469
- createBaseVNode("div", _hoisted_1$v, [
23470
- toolbarLeftLabel.value ? (openBlock(), createElementBlock("div", _hoisted_2$o, toDisplayString(toolbarLeftLabel.value), 1)) : createCommentVNode("", true),
23471
- showLayoutSelection.value ? (openBlock(), createBlock(_sfc_main$F, { key: 1 })) : (openBlock(), createElementBlock("div", _hoisted_3$i)),
23472
- showItemSummary.value ? (openBlock(), createBlock(_sfc_main$X, {
23553
+ createBaseVNode("div", _hoisted_1$w, [
23554
+ toolbarLeftLabel.value ? (openBlock(), createElementBlock("div", _hoisted_2$p, toDisplayString(toolbarLeftLabel.value), 1)) : createCommentVNode("", true),
23555
+ showLayoutSelection.value ? (openBlock(), createBlock(_sfc_main$G, { key: 1 })) : (openBlock(), createElementBlock("div", _hoisted_3$j)),
23556
+ showItemSummary.value ? (openBlock(), createBlock(_sfc_main$Y, {
23473
23557
  key: 3,
23474
23558
  label: searchSummaryLabel.value,
23475
23559
  clearable: unref(hasAnyFilter) && showFilterClear.value,
23476
23560
  onClear: handleClearAll
23477
- }, null, 8, ["label", "clearable"])) : (openBlock(), createElementBlock("div", _hoisted_4$b)),
23478
- displayPageSelect.value ? (openBlock(), createBlock(_sfc_main$D, {
23561
+ }, null, 8, ["label", "clearable"])) : (openBlock(), createElementBlock("div", _hoisted_4$c)),
23562
+ displayPageSelect.value ? (openBlock(), createBlock(_sfc_main$E, {
23479
23563
  key: 5,
23480
23564
  options: paginationOptions.value.pageSelect,
23481
23565
  "last-page-label": paginationOptions.value.labels.showMore,
@@ -23484,16 +23568,16 @@ and ensure you are accounting for this risk.
23484
23568
  ]),
23485
23569
  createBaseVNode("div", _hoisted_6$5, [
23486
23570
  toolbarRightLabel.value ? (openBlock(), createElementBlock("div", _hoisted_7$3, toDisplayString(toolbarRightLabel.value), 1)) : createCommentVNode("", true),
23487
- createVNode(_sfc_main$E, {
23571
+ createVNode(_sfc_main$F, {
23488
23572
  label: optionsValue.value.labels.mobileFilterButton,
23489
23573
  "show-filter-count": showMobileFilterCount.value
23490
23574
  }, null, 8, ["label", "show-filter-count"]),
23491
- paginationDisplay.value.pageSize ? (openBlock(), createBlock(_sfc_main$C, {
23575
+ paginationDisplay.value.pageSize ? (openBlock(), createBlock(_sfc_main$D, {
23492
23576
  key: 1,
23493
23577
  options: paginationOptions.value.pageSize,
23494
23578
  labels: paginationOptions.value.labels
23495
23579
  }, null, 8, ["options", "labels"])) : (openBlock(), createElementBlock("div", _hoisted_8)),
23496
- sortOptions.value ? (openBlock(), createBlock(_sfc_main$B, {
23580
+ sortOptions.value ? (openBlock(), createBlock(_sfc_main$C, {
23497
23581
  key: 3,
23498
23582
  options: sortOptions.value,
23499
23583
  callbacks: callbacks.value
@@ -23503,7 +23587,7 @@ and ensure you are accounting for this risk.
23503
23587
  };
23504
23588
  }
23505
23589
  });
23506
- const _sfc_main$z = /* @__PURE__ */ defineComponent({
23590
+ const _sfc_main$A = /* @__PURE__ */ defineComponent({
23507
23591
  __name: "SearchResultsProductImage",
23508
23592
  props: {
23509
23593
  item: {},
@@ -23511,7 +23595,7 @@ and ensure you are accounting for this risk.
23511
23595
  },
23512
23596
  setup(__props) {
23513
23597
  return (_ctx, _cache) => {
23514
- return openBlock(), createBlock(_sfc_main$1k, {
23598
+ return openBlock(), createBlock(_sfc_main$1l, {
23515
23599
  item: _ctx.item,
23516
23600
  options: _ctx.options,
23517
23601
  "wrapper-class": "lupa-search-results-image-wrapper",
@@ -23520,16 +23604,16 @@ and ensure you are accounting for this risk.
23520
23604
  };
23521
23605
  }
23522
23606
  });
23523
- const _hoisted_1$u = ["title", "innerHTML"];
23524
- const _hoisted_2$n = ["title"];
23525
- const _hoisted_3$h = ["href", "innerHTML"];
23526
- const _hoisted_4$a = ["title"];
23607
+ const _hoisted_1$v = ["title", "innerHTML"];
23608
+ const _hoisted_2$o = ["title"];
23609
+ const _hoisted_3$i = ["href", "innerHTML"];
23610
+ const _hoisted_4$b = ["title"];
23527
23611
  const _hoisted_5$6 = {
23528
23612
  key: 0,
23529
23613
  class: "lupa-search-results-product-title-text"
23530
23614
  };
23531
23615
  const _hoisted_6$4 = ["href"];
23532
- const _sfc_main$y = /* @__PURE__ */ defineComponent({
23616
+ const _sfc_main$z = /* @__PURE__ */ defineComponent({
23533
23617
  __name: "SearchResultsProductTitle",
23534
23618
  props: {
23535
23619
  item: {},
@@ -23566,7 +23650,7 @@ and ensure you are accounting for this risk.
23566
23650
  style: normalizeStyle(`-webkit-line-clamp: ${maxLines.value}`),
23567
23651
  title: sanitizedTitle.value,
23568
23652
  innerHTML: sanitizedTitle.value
23569
- }, null, 12, _hoisted_1$u)) : isHtml.value && _ctx.options.link ? (openBlock(), createElementBlock("div", {
23653
+ }, null, 12, _hoisted_1$v)) : isHtml.value && _ctx.options.link ? (openBlock(), createElementBlock("div", {
23570
23654
  key: 1,
23571
23655
  class: "lupa-search-results-product-title",
23572
23656
  style: normalizeStyle(`-webkit-line-clamp: ${maxLines.value}`),
@@ -23577,8 +23661,8 @@ and ensure you are accounting for this risk.
23577
23661
  class: "lupa-search-results-product-title-text lupa-title-link",
23578
23662
  innerHTML: sanitizedTitle.value,
23579
23663
  onClick: handleNavigation
23580
- }, null, 8, _hoisted_3$h)
23581
- ], 12, _hoisted_2$n)) : (openBlock(), createElementBlock("div", {
23664
+ }, null, 8, _hoisted_3$i)
23665
+ ], 12, _hoisted_2$o)) : (openBlock(), createElementBlock("div", {
23582
23666
  key: 2,
23583
23667
  class: "lupa-search-results-product-title",
23584
23668
  style: normalizeStyle(`-webkit-line-clamp: ${maxLines.value}`),
@@ -23591,12 +23675,12 @@ and ensure you are accounting for this risk.
23591
23675
  class: "lupa-search-results-product-title-text lupa-title-link",
23592
23676
  onClick: handleNavigation
23593
23677
  }, toDisplayString(title.value), 9, _hoisted_6$4)) : createCommentVNode("", true)
23594
- ], 12, _hoisted_4$a));
23678
+ ], 12, _hoisted_4$b));
23595
23679
  };
23596
23680
  }
23597
23681
  });
23598
- const _hoisted_1$t = ["innerHTML"];
23599
- const _sfc_main$x = /* @__PURE__ */ defineComponent({
23682
+ const _hoisted_1$u = ["innerHTML"];
23683
+ const _sfc_main$y = /* @__PURE__ */ defineComponent({
23600
23684
  __name: "SearchResultsProductDescription",
23601
23685
  props: {
23602
23686
  item: {},
@@ -23623,7 +23707,7 @@ and ensure you are accounting for this risk.
23623
23707
  class: "lupa-search-results-product-description",
23624
23708
  style: normalizeStyle(`-webkit-line-clamp: ${maxLines.value}`),
23625
23709
  innerHTML: sanitizedDescription.value
23626
- }, null, 12, _hoisted_1$t)) : (openBlock(), createElementBlock("div", {
23710
+ }, null, 12, _hoisted_1$u)) : (openBlock(), createElementBlock("div", {
23627
23711
  key: 1,
23628
23712
  class: "lupa-search-results-product-description",
23629
23713
  style: normalizeStyle(`-webkit-line-clamp: ${maxLines.value}`)
@@ -23631,15 +23715,15 @@ and ensure you are accounting for this risk.
23631
23715
  };
23632
23716
  }
23633
23717
  });
23634
- const _hoisted_1$s = { id: "lupa-search-results-rating" };
23635
- const _hoisted_2$m = { class: "lupa-ratings" };
23636
- const _hoisted_3$g = { class: "lupa-ratings-base" };
23637
- const _hoisted_4$9 = ["innerHTML"];
23718
+ const _hoisted_1$t = { id: "lupa-search-results-rating" };
23719
+ const _hoisted_2$n = { class: "lupa-ratings" };
23720
+ const _hoisted_3$h = { class: "lupa-ratings-base" };
23721
+ const _hoisted_4$a = ["innerHTML"];
23638
23722
  const _hoisted_5$5 = { class: "lupa-rating-wrapper" };
23639
23723
  const _hoisted_6$3 = ["innerHTML"];
23640
23724
  const _hoisted_7$2 = ["href"];
23641
23725
  const STAR_COUNT = 5;
23642
- const _sfc_main$w = /* @__PURE__ */ defineComponent({
23726
+ const _sfc_main$x = /* @__PURE__ */ defineComponent({
23643
23727
  __name: "SearchResultsProductRating",
23644
23728
  props: {
23645
23729
  item: {},
@@ -23676,15 +23760,15 @@ and ensure you are accounting for this risk.
23676
23760
  return generateLink(props.options.links.ratingDetails, props.item);
23677
23761
  });
23678
23762
  return (_ctx, _cache) => {
23679
- return openBlock(), createElementBlock("div", _hoisted_1$s, [
23680
- createBaseVNode("div", _hoisted_2$m, [
23681
- createBaseVNode("div", _hoisted_3$g, [
23763
+ return openBlock(), createElementBlock("div", _hoisted_1$t, [
23764
+ createBaseVNode("div", _hoisted_2$n, [
23765
+ createBaseVNode("div", _hoisted_3$h, [
23682
23766
  (openBlock(true), createElementBlock(Fragment, null, renderList(baseStars.value, (star, index) => {
23683
23767
  return openBlock(), createElementBlock("div", {
23684
23768
  key: index,
23685
23769
  innerHTML: star,
23686
23770
  class: "lupa-rating lupa-rating-not-highlighted"
23687
- }, null, 8, _hoisted_4$9);
23771
+ }, null, 8, _hoisted_4$a);
23688
23772
  }), 128))
23689
23773
  ]),
23690
23774
  createBaseVNode("div", _hoisted_5$5, [
@@ -23710,11 +23794,11 @@ and ensure you are accounting for this risk.
23710
23794
  };
23711
23795
  }
23712
23796
  });
23713
- const _hoisted_1$r = {
23797
+ const _hoisted_1$s = {
23714
23798
  class: "lupa-search-results-product-regular-price",
23715
23799
  "data-cy": "lupa-search-results-product-regular-price"
23716
23800
  };
23717
- const _sfc_main$v = /* @__PURE__ */ defineComponent({
23801
+ const _sfc_main$w = /* @__PURE__ */ defineComponent({
23718
23802
  __name: "SearchResultsProductRegularPrice",
23719
23803
  props: {
23720
23804
  item: {},
@@ -23732,11 +23816,11 @@ and ensure you are accounting for this risk.
23732
23816
  );
23733
23817
  });
23734
23818
  return (_ctx, _cache) => {
23735
- return openBlock(), createElementBlock("div", _hoisted_1$r, toDisplayString(price.value), 1);
23819
+ return openBlock(), createElementBlock("div", _hoisted_1$s, toDisplayString(price.value), 1);
23736
23820
  };
23737
23821
  }
23738
23822
  });
23739
- const _sfc_main$u = /* @__PURE__ */ defineComponent({
23823
+ const _sfc_main$v = /* @__PURE__ */ defineComponent({
23740
23824
  __name: "SearchResultsProductPrice",
23741
23825
  props: {
23742
23826
  item: {},
@@ -23766,10 +23850,10 @@ and ensure you are accounting for this risk.
23766
23850
  };
23767
23851
  }
23768
23852
  });
23769
- const _hoisted_1$q = { class: "lupa-search-results-add-to-cart-wrapper" };
23770
- const _hoisted_2$l = { class: "lupa-search-results-product-addtocart" };
23771
- const _hoisted_3$f = ["id", "disabled", "onClick"];
23772
- const _sfc_main$t = /* @__PURE__ */ defineComponent({
23853
+ const _hoisted_1$r = { class: "lupa-search-results-add-to-cart-wrapper" };
23854
+ const _hoisted_2$m = { class: "lupa-search-results-product-addtocart" };
23855
+ const _hoisted_3$g = ["id", "disabled", "onClick"];
23856
+ const _sfc_main$u = /* @__PURE__ */ defineComponent({
23773
23857
  __name: "SearchResultsProductAddToCart",
23774
23858
  props: {
23775
23859
  item: {},
@@ -23807,26 +23891,26 @@ and ensure you are accounting for this risk.
23807
23891
  loading.value = false;
23808
23892
  });
23809
23893
  return (_ctx, _cache) => {
23810
- return openBlock(), createElementBlock("div", _hoisted_1$q, [
23811
- createBaseVNode("div", _hoisted_2$l, [
23894
+ return openBlock(), createElementBlock("div", _hoisted_1$r, [
23895
+ createBaseVNode("div", _hoisted_2$m, [
23812
23896
  createBaseVNode("button", {
23813
23897
  id: id.value,
23814
23898
  class: normalizeClass(loading.value ? "lupa-add-to-cart-loading" : "lupa-add-to-cart"),
23815
23899
  "data-cy": "lupa-add-to-cart",
23816
23900
  disabled: !inStockValue.value || loading.value,
23817
23901
  onClick: withModifiers(handleClick, ["stop"])
23818
- }, toDisplayString(label.value), 11, _hoisted_3$f)
23902
+ }, toDisplayString(label.value), 11, _hoisted_3$g)
23819
23903
  ])
23820
23904
  ]);
23821
23905
  };
23822
23906
  }
23823
23907
  });
23824
- const _hoisted_1$p = ["innerHTML"];
23825
- const _hoisted_2$k = { key: 0 };
23826
- const _hoisted_3$e = { key: 1 };
23827
- const _hoisted_4$8 = { class: "lupa-search-box-custom-label" };
23908
+ const _hoisted_1$q = ["innerHTML"];
23909
+ const _hoisted_2$l = { key: 0 };
23910
+ const _hoisted_3$f = { key: 1 };
23911
+ const _hoisted_4$9 = { class: "lupa-search-box-custom-label" };
23828
23912
  const _hoisted_5$4 = { class: "lupa-search-box-custom-text" };
23829
- const _sfc_main$s = /* @__PURE__ */ defineComponent({
23913
+ const _sfc_main$t = /* @__PURE__ */ defineComponent({
23830
23914
  __name: "SearchResultsProductCustom",
23831
23915
  props: {
23832
23916
  item: {},
@@ -23864,20 +23948,20 @@ and ensure you are accounting for this risk.
23864
23948
  key: 0,
23865
23949
  class: className.value,
23866
23950
  innerHTML: text.value
23867
- }, toHandlers(_ctx.options.action ? { click: handleClick } : {}, true)), null, 16, _hoisted_1$p)) : (openBlock(), createElementBlock("div", mergeProps({
23951
+ }, toHandlers(_ctx.options.action ? { click: handleClick } : {}, true)), null, 16, _hoisted_1$q)) : (openBlock(), createElementBlock("div", mergeProps({
23868
23952
  key: 1,
23869
23953
  class: className.value
23870
23954
  }, toHandlers(_ctx.options.action ? { click: handleClick } : {}, true)), [
23871
- !label.value ? (openBlock(), createElementBlock("div", _hoisted_2$k, toDisplayString(text.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$e, [
23872
- createBaseVNode("div", _hoisted_4$8, toDisplayString(label.value), 1),
23955
+ !label.value ? (openBlock(), createElementBlock("div", _hoisted_2$l, toDisplayString(text.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$f, [
23956
+ createBaseVNode("div", _hoisted_4$9, toDisplayString(label.value), 1),
23873
23957
  createBaseVNode("div", _hoisted_5$4, toDisplayString(text.value), 1)
23874
23958
  ]))
23875
23959
  ], 16));
23876
23960
  };
23877
23961
  }
23878
23962
  });
23879
- const _hoisted_1$o = ["innerHTML"];
23880
- const _sfc_main$r = /* @__PURE__ */ defineComponent({
23963
+ const _hoisted_1$p = ["innerHTML"];
23964
+ const _sfc_main$s = /* @__PURE__ */ defineComponent({
23881
23965
  __name: "SearchResultsProductCustomHtmlElement",
23882
23966
  props: {
23883
23967
  item: {},
@@ -23908,15 +23992,15 @@ and ensure you are accounting for this risk.
23908
23992
  return openBlock(), createElementBlock("div", mergeProps({
23909
23993
  class: className.value,
23910
23994
  innerHTML: text.value
23911
- }, toHandlers(_ctx.options.action ? { click: handleClick } : {}, true)), null, 16, _hoisted_1$o);
23995
+ }, toHandlers(_ctx.options.action ? { click: handleClick } : {}, true)), null, 16, _hoisted_1$p);
23912
23996
  };
23913
23997
  }
23914
23998
  });
23915
- const _hoisted_1$n = { id: "lupa-search-results-rating" };
23916
- const _hoisted_2$j = ["innerHTML"];
23917
- const _hoisted_3$d = { class: "lupa-ratings" };
23918
- const _hoisted_4$7 = ["href"];
23919
- const _sfc_main$q = /* @__PURE__ */ defineComponent({
23999
+ const _hoisted_1$o = { id: "lupa-search-results-rating" };
24000
+ const _hoisted_2$k = ["innerHTML"];
24001
+ const _hoisted_3$e = { class: "lupa-ratings" };
24002
+ const _hoisted_4$8 = ["href"];
24003
+ const _sfc_main$r = /* @__PURE__ */ defineComponent({
23920
24004
  __name: "SearchResultsProductSingleStarRating",
23921
24005
  props: {
23922
24006
  item: {},
@@ -23944,35 +24028,35 @@ and ensure you are accounting for this risk.
23944
24028
  return RATING_STAR_HTML;
23945
24029
  });
23946
24030
  return (_ctx, _cache) => {
23947
- return openBlock(), createElementBlock("div", _hoisted_1$n, [
24031
+ return openBlock(), createElementBlock("div", _hoisted_1$o, [
23948
24032
  createBaseVNode("div", {
23949
24033
  innerHTML: star.value,
23950
24034
  class: "lupa-rating lupa-rating-highlighted"
23951
- }, null, 8, _hoisted_2$j),
23952
- createBaseVNode("div", _hoisted_3$d, toDisplayString(rating.value), 1),
24035
+ }, null, 8, _hoisted_2$k),
24036
+ createBaseVNode("div", _hoisted_3$e, toDisplayString(rating.value), 1),
23953
24037
  createBaseVNode("a", {
23954
24038
  href: ratingLink.value,
23955
24039
  class: "lupa-total-ratings"
23956
- }, toDisplayString(totalRatings.value), 9, _hoisted_4$7)
24040
+ }, toDisplayString(totalRatings.value), 9, _hoisted_4$8)
23957
24041
  ]);
23958
24042
  };
23959
24043
  }
23960
24044
  });
23961
24045
  const __default__ = {
23962
24046
  components: {
23963
- SearchResultsProductImage: _sfc_main$z,
23964
- SearchResultsProductTitle: _sfc_main$y,
23965
- SearchResultsProductDescription: _sfc_main$x,
23966
- SearchResultsProductRating: _sfc_main$w,
23967
- SearchResultsProductRegularPrice: _sfc_main$v,
23968
- SearchResultsProductPrice: _sfc_main$u,
23969
- SearchResultsProductAddToCart: _sfc_main$t,
23970
- SearchResultsProductCustom: _sfc_main$s,
23971
- SearchResultsProductCustomHtmlElement: _sfc_main$r,
23972
- SearchResultsProductSingleStarRating: _sfc_main$q
23973
- }
23974
- };
23975
- const _sfc_main$p = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValues2({}, __default__), {
24047
+ SearchResultsProductImage: _sfc_main$A,
24048
+ SearchResultsProductTitle: _sfc_main$z,
24049
+ SearchResultsProductDescription: _sfc_main$y,
24050
+ SearchResultsProductRating: _sfc_main$x,
24051
+ SearchResultsProductRegularPrice: _sfc_main$w,
24052
+ SearchResultsProductPrice: _sfc_main$v,
24053
+ SearchResultsProductAddToCart: _sfc_main$u,
24054
+ SearchResultsProductCustom: _sfc_main$t,
24055
+ SearchResultsProductCustomHtmlElement: _sfc_main$s,
24056
+ SearchResultsProductSingleStarRating: _sfc_main$r
24057
+ }
24058
+ };
24059
+ const _sfc_main$q = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValues2({}, __default__), {
23976
24060
  __name: "SearchResultsProductCardElement",
23977
24061
  props: {
23978
24062
  item: {},
@@ -24048,13 +24132,14 @@ and ensure you are accounting for this risk.
24048
24132
  };
24049
24133
  }
24050
24134
  }));
24051
- const _hoisted_1$m = ["href"];
24052
- const _hoisted_2$i = {
24135
+ const _hoisted_1$n = ["onMouseup"];
24136
+ const _hoisted_2$j = ["href"];
24137
+ const _hoisted_3$d = {
24053
24138
  key: 0,
24054
24139
  class: "lupa-out-of-stock"
24055
24140
  };
24056
- const _hoisted_3$c = { class: "lupa-search-result-product-details-section" };
24057
- const _sfc_main$o = /* @__PURE__ */ defineComponent({
24141
+ const _hoisted_4$7 = { class: "lupa-search-result-product-details-section" };
24142
+ const _sfc_main$p = /* @__PURE__ */ defineComponent({
24058
24143
  __name: "SearchResultsProductCard",
24059
24144
  props: {
24060
24145
  product: {},
@@ -24157,7 +24242,7 @@ and ensure you are accounting for this risk.
24157
24242
  });
24158
24243
  const handleClick = () => {
24159
24244
  var _a, _b, _c, _d;
24160
- trackingStore.trackEvent({
24245
+ const event = {
24161
24246
  queryKey: props.options.queryKey,
24162
24247
  data: {
24163
24248
  itemId: id.value,
@@ -24170,9 +24255,15 @@ and ensure you are accounting for this risk.
24170
24255
  items: [props.product],
24171
24256
  itemId: id.value
24172
24257
  },
24173
- options: { allowEmptySearchQuery: true }
24258
+ options: { allowEmptySearchQuery: true },
24259
+ filters: searchResultStore.hasAnyFilter ? searchResultStore.filters : void 0
24174
24260
  }
24175
- });
24261
+ };
24262
+ if (isDelayedClickTracking()) {
24263
+ trackingStore.trackDelayedEvent(__spreadProps2(__spreadValues2({}, event), { url: link.value }));
24264
+ } else {
24265
+ trackingStore.trackEvent(event);
24266
+ }
24176
24267
  (_d = (_c = searchResultOptions.value.callbacks) == null ? void 0 : _c.onProductClick) == null ? void 0 : _d.call(_c, {
24177
24268
  queryKey: query.value,
24178
24269
  hasResults: true,
@@ -24205,8 +24296,11 @@ and ensure you are accounting for this risk.
24205
24296
  id: "lupa-search-result-product-card",
24206
24297
  "data-cy": "lupa-search-result-product-card",
24207
24298
  class: ["lupa-search-result-product-card", !isInStock.value ? "lupa-out-of-stock" : ""]
24208
- }, customDocumentHtmlAttributes.value, { onClick: handleClick }), [
24209
- createVNode(_sfc_main$14, { options: badgesOptions.value }, null, 8, ["options"]),
24299
+ }, customDocumentHtmlAttributes.value, {
24300
+ onClick: handleClick,
24301
+ onMouseup: withModifiers(handleClick, ["middle", "exact"])
24302
+ }), [
24303
+ createVNode(_sfc_main$15, { options: badgesOptions.value }, null, 8, ["options"]),
24210
24304
  createBaseVNode("div", {
24211
24305
  class: normalizeClass(["lupa-search-result-product-contents", listLayoutClass.value])
24212
24306
  }, [
@@ -24216,7 +24310,7 @@ and ensure you are accounting for this risk.
24216
24310
  onClick: handleNavigation
24217
24311
  }, [
24218
24312
  (openBlock(true), createElementBlock(Fragment, null, renderList(imageElements.value, (element) => {
24219
- return openBlock(), createBlock(_sfc_main$p, {
24313
+ return openBlock(), createBlock(_sfc_main$q, {
24220
24314
  class: "lupa-search-results-product-element",
24221
24315
  item: _ctx.product,
24222
24316
  element,
@@ -24227,16 +24321,16 @@ and ensure you are accounting for this risk.
24227
24321
  onProductEvent: handleProductEvent
24228
24322
  }, null, 8, ["item", "element", "labels", "inStock", "link"]);
24229
24323
  }), 128)),
24230
- createVNode(_sfc_main$14, {
24324
+ createVNode(_sfc_main$15, {
24231
24325
  options: badgesOptions.value,
24232
24326
  position: "image",
24233
24327
  class: "lupa-image-badges"
24234
24328
  }, null, 8, ["options"]),
24235
- ((_a = labels.value) == null ? void 0 : _a.outOfStock) && !isInStock.value ? (openBlock(), createElementBlock("div", _hoisted_2$i, toDisplayString(labels.value.outOfStock), 1)) : createCommentVNode("", true)
24236
- ], 8, _hoisted_1$m),
24237
- createBaseVNode("div", _hoisted_3$c, [
24329
+ ((_a = labels.value) == null ? void 0 : _a.outOfStock) && !isInStock.value ? (openBlock(), createElementBlock("div", _hoisted_3$d, toDisplayString(labels.value.outOfStock), 1)) : createCommentVNode("", true)
24330
+ ], 8, _hoisted_2$j),
24331
+ createBaseVNode("div", _hoisted_4$7, [
24238
24332
  (openBlock(true), createElementBlock(Fragment, null, renderList(detailElements.value, (element) => {
24239
- return openBlock(), createBlock(_sfc_main$p, {
24333
+ return openBlock(), createBlock(_sfc_main$q, {
24240
24334
  class: "lupa-search-results-product-element",
24241
24335
  item: _ctx.product,
24242
24336
  element,
@@ -24254,7 +24348,7 @@ and ensure you are accounting for this risk.
24254
24348
  class: normalizeClass("lupa-element-group-" + group)
24255
24349
  }, [
24256
24350
  (openBlock(true), createElementBlock(Fragment, null, renderList(getGroupElements(group), (element) => {
24257
- return openBlock(), createBlock(_sfc_main$p, {
24351
+ return openBlock(), createBlock(_sfc_main$q, {
24258
24352
  class: "lupa-search-results-product-element",
24259
24353
  item: _ctx.product,
24260
24354
  element,
@@ -24268,16 +24362,16 @@ and ensure you are accounting for this risk.
24268
24362
  ], 2);
24269
24363
  }), 128))
24270
24364
  ], 2)
24271
- ], 16);
24365
+ ], 16, _hoisted_1$n);
24272
24366
  };
24273
24367
  }
24274
24368
  });
24275
- const _hoisted_1$l = {
24369
+ const _hoisted_1$m = {
24276
24370
  id: "lupa-search-results-similar-queries",
24277
24371
  "data-cy": "lupa-search-results-similar-queries"
24278
24372
  };
24279
- const _hoisted_2$h = { class: "lupa-similar-queries-label" };
24280
- const _hoisted_3$b = {
24373
+ const _hoisted_2$i = { class: "lupa-similar-queries-label" };
24374
+ const _hoisted_3$c = {
24281
24375
  class: "lupa-similar-query-label",
24282
24376
  "data-cy": "lupa-similar-query-label"
24283
24377
  };
@@ -24288,7 +24382,7 @@ and ensure you are accounting for this risk.
24288
24382
  class: "lupa-products",
24289
24383
  "data-cy": "lupa-products"
24290
24384
  };
24291
- const _sfc_main$n = /* @__PURE__ */ defineComponent({
24385
+ const _sfc_main$o = /* @__PURE__ */ defineComponent({
24292
24386
  __name: "SearchResultsSimilarQueries",
24293
24387
  props: {
24294
24388
  labels: {},
@@ -24318,11 +24412,11 @@ and ensure you are accounting for this risk.
24318
24412
  paramsStore.goToResults({ searchText, facet });
24319
24413
  };
24320
24414
  return (_ctx, _cache) => {
24321
- return openBlock(), createElementBlock("div", _hoisted_1$l, [
24322
- createBaseVNode("div", _hoisted_2$h, toDisplayString(_ctx.labels.similarQueries), 1),
24415
+ return openBlock(), createElementBlock("div", _hoisted_1$m, [
24416
+ createBaseVNode("div", _hoisted_2$i, toDisplayString(_ctx.labels.similarQueries), 1),
24323
24417
  (openBlock(true), createElementBlock(Fragment, null, renderList(similarQueries.value, (similarQuery, index) => {
24324
24418
  return openBlock(), createElementBlock("div", { key: index }, [
24325
- createBaseVNode("div", _hoisted_3$b, [
24419
+ createBaseVNode("div", _hoisted_3$c, [
24326
24420
  createBaseVNode("span", null, toDisplayString(similarQueryLabel.value), 1),
24327
24421
  createBaseVNode("span", {
24328
24422
  id: "lupa-similar-query-text-component",
@@ -24338,7 +24432,7 @@ and ensure you are accounting for this risk.
24338
24432
  ]),
24339
24433
  createBaseVNode("div", _hoisted_7$1, [
24340
24434
  (openBlock(true), createElementBlock(Fragment, null, renderList(similarQuery.items, (product, index2) => {
24341
- return openBlock(), createBlock(_sfc_main$o, {
24435
+ return openBlock(), createBlock(_sfc_main$p, {
24342
24436
  style: normalizeStyle(_ctx.columnSize),
24343
24437
  key: getDocumentKey(index2, product),
24344
24438
  product,
@@ -24352,15 +24446,15 @@ and ensure you are accounting for this risk.
24352
24446
  };
24353
24447
  }
24354
24448
  });
24355
- const _hoisted_1$k = {
24449
+ const _hoisted_1$l = {
24356
24450
  key: 0,
24357
24451
  class: "lupa-results-additional-panel"
24358
24452
  };
24359
- const _hoisted_2$g = {
24453
+ const _hoisted_2$h = {
24360
24454
  class: "lupa-results-additional-panel-items",
24361
24455
  "data-cy": "lupa-results-additional-panel-items"
24362
24456
  };
24363
- const _sfc_main$m = /* @__PURE__ */ defineComponent({
24457
+ const _sfc_main$n = /* @__PURE__ */ defineComponent({
24364
24458
  __name: "AdditionalPanel",
24365
24459
  props: {
24366
24460
  panel: {},
@@ -24406,6 +24500,7 @@ and ensure you are accounting for this risk.
24406
24500
  });
24407
24501
  };
24408
24502
  const handleQueryChange = () => {
24503
+ showAll.value = false;
24409
24504
  const context = getLupaTrackingContext();
24410
24505
  const queryBody = __spreadProps2(__spreadValues2({}, context), {
24411
24506
  limit: props.panel.totalCountLimit,
@@ -24432,10 +24527,10 @@ and ensure you are accounting for this risk.
24432
24527
  handleQueryChange();
24433
24528
  });
24434
24529
  return (_ctx, _cache) => {
24435
- return hasResults.value ? (openBlock(), createElementBlock("div", _hoisted_1$k, [
24436
- createBaseVNode("div", _hoisted_2$g, [
24530
+ return hasResults.value ? (openBlock(), createElementBlock("div", _hoisted_1$l, [
24531
+ createBaseVNode("div", _hoisted_2$h, [
24437
24532
  (openBlock(true), createElementBlock(Fragment, null, renderList(visibleItems.value, (item, index) => {
24438
- return openBlock(), createBlock(_sfc_main$o, {
24533
+ return openBlock(), createBlock(_sfc_main$p, {
24439
24534
  key: index,
24440
24535
  product: item,
24441
24536
  options: _ctx.panel,
@@ -24453,11 +24548,11 @@ and ensure you are accounting for this risk.
24453
24548
  };
24454
24549
  }
24455
24550
  });
24456
- const _hoisted_1$j = {
24551
+ const _hoisted_1$k = {
24457
24552
  key: 0,
24458
24553
  class: "lupa-results-additional-panels"
24459
24554
  };
24460
- const _sfc_main$l = /* @__PURE__ */ defineComponent({
24555
+ const _sfc_main$m = /* @__PURE__ */ defineComponent({
24461
24556
  __name: "AdditionalPanels",
24462
24557
  props: {
24463
24558
  options: {},
@@ -24474,9 +24569,9 @@ and ensure you are accounting for this risk.
24474
24569
  return locationPanels.value.length > 0;
24475
24570
  });
24476
24571
  return (_ctx, _cache) => {
24477
- return isVisible.value ? (openBlock(), createElementBlock("div", _hoisted_1$j, [
24572
+ return isVisible.value ? (openBlock(), createElementBlock("div", _hoisted_1$k, [
24478
24573
  (openBlock(true), createElementBlock(Fragment, null, renderList(locationPanels.value, (panel) => {
24479
- return openBlock(), createBlock(_sfc_main$m, {
24574
+ return openBlock(), createBlock(_sfc_main$n, {
24480
24575
  key: panel.queryKey,
24481
24576
  panel,
24482
24577
  options: _ctx.sdkOptions
@@ -24493,29 +24588,29 @@ and ensure you are accounting for this risk.
24493
24588
  }
24494
24589
  return target;
24495
24590
  };
24496
- const _sfc_main$k = {};
24497
- const _hoisted_1$i = { class: "lupa-spinner-wrapper" };
24498
- const _hoisted_2$f = { class: "lupa-spinner" };
24591
+ const _sfc_main$l = {};
24592
+ const _hoisted_1$j = { class: "lupa-spinner-wrapper" };
24593
+ const _hoisted_2$g = { class: "lupa-spinner" };
24499
24594
  function _sfc_render(_ctx, _cache) {
24500
- return openBlock(), createElementBlock("div", _hoisted_1$i, [
24501
- createBaseVNode("div", _hoisted_2$f, [
24595
+ return openBlock(), createElementBlock("div", _hoisted_1$j, [
24596
+ createBaseVNode("div", _hoisted_2$g, [
24502
24597
  (openBlock(), createElementBlock(Fragment, null, renderList(12, (x2) => {
24503
24598
  return createBaseVNode("div", { key: x2 });
24504
24599
  }), 64))
24505
24600
  ])
24506
24601
  ]);
24507
24602
  }
24508
- const Spinner = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["render", _sfc_render]]);
24509
- const _hoisted_1$h = {
24603
+ const Spinner = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["render", _sfc_render]]);
24604
+ const _hoisted_1$i = {
24510
24605
  id: "lupa-search-results-similar-results",
24511
24606
  "data-cy": "lupa-search-results-similar-results"
24512
24607
  };
24513
- const _hoisted_2$e = { class: "lupa-similar-results-label" };
24514
- const _hoisted_3$a = {
24608
+ const _hoisted_2$f = { class: "lupa-similar-results-label" };
24609
+ const _hoisted_3$b = {
24515
24610
  class: "lupa-products",
24516
24611
  "data-cy": "lupa-products"
24517
24612
  };
24518
- const _sfc_main$j = /* @__PURE__ */ defineComponent({
24613
+ const _sfc_main$k = /* @__PURE__ */ defineComponent({
24519
24614
  __name: "SearchResultsSimilarResults",
24520
24615
  props: {
24521
24616
  columnSize: {},
@@ -24531,11 +24626,11 @@ and ensure you are accounting for this risk.
24531
24626
  return getProductKey(`${index}`, product, props.productCardOptions.idKey);
24532
24627
  };
24533
24628
  return (_ctx, _cache) => {
24534
- return openBlock(), createElementBlock("div", _hoisted_1$h, [
24535
- createBaseVNode("div", _hoisted_2$e, toDisplayString(_ctx.labels.similarResultsLabel), 1),
24536
- createBaseVNode("div", _hoisted_3$a, [
24629
+ return openBlock(), createElementBlock("div", _hoisted_1$i, [
24630
+ createBaseVNode("div", _hoisted_2$f, toDisplayString(_ctx.labels.similarResultsLabel), 1),
24631
+ createBaseVNode("div", _hoisted_3$b, [
24537
24632
  (openBlock(true), createElementBlock(Fragment, null, renderList(similarResults.value.items, (product, index) => {
24538
- return openBlock(), createBlock(_sfc_main$o, {
24633
+ return openBlock(), createBlock(_sfc_main$p, {
24539
24634
  style: normalizeStyle(_ctx.columnSize),
24540
24635
  key: getDocumentKey(index, product),
24541
24636
  product,
@@ -24571,15 +24666,15 @@ and ensure you are accounting for this risk.
24571
24666
  return extractFacetsRelatedSource(source, searchResults2);
24572
24667
  }
24573
24668
  };
24574
- const _hoisted_1$g = { class: "lupa-related-query-item" };
24575
- const _hoisted_2$d = { class: "lupa-related-query-image" };
24576
- const _hoisted_3$9 = { class: "lupa-related-query-label" };
24669
+ const _hoisted_1$h = { class: "lupa-related-query-item" };
24670
+ const _hoisted_2$e = { class: "lupa-related-query-image" };
24671
+ const _hoisted_3$a = { class: "lupa-related-query-label" };
24577
24672
  const _hoisted_4$5 = { class: "lupa-related-query-title" };
24578
24673
  const _hoisted_5$2 = {
24579
24674
  key: 0,
24580
24675
  class: "lupa-related-query-count"
24581
24676
  };
24582
- const _sfc_main$i = /* @__PURE__ */ defineComponent({
24677
+ const _sfc_main$j = /* @__PURE__ */ defineComponent({
24583
24678
  __name: "RelatedQueryPanel",
24584
24679
  props: {
24585
24680
  query: {},
@@ -24590,7 +24685,9 @@ and ensure you are accounting for this risk.
24590
24685
  const loading = ref(false);
24591
24686
  const relatedQueryResult = ref(null);
24592
24687
  const optionsStore = useOptionsStore();
24688
+ const searchResultStore = useSearchResultStore();
24593
24689
  const { searchResultOptions } = storeToRefs(optionsStore);
24690
+ const { searchResult } = storeToRefs(searchResultStore);
24594
24691
  const mainImage = computed(() => {
24595
24692
  var _a, _b, _c;
24596
24693
  return (_c = (_b = (_a = searchResultOptions.value) == null ? void 0 : _a.elements) == null ? void 0 : _b.find((e2) => e2.type === DocumentElementType.IMAGE)) != null ? _c : "";
@@ -24615,24 +24712,34 @@ and ensure you are accounting for this risk.
24615
24712
  var _a, _b;
24616
24713
  return (_b = (_a = relatedQueryResult.value) == null ? void 0 : _a.total) != null ? _b : 0;
24617
24714
  });
24715
+ const searchText = computed(() => {
24716
+ var _a, _b, _c;
24717
+ return ((_a = props.options.source) == null ? void 0 : _a.mode) === "filter" ? (_b = searchResult.value) == null ? void 0 : _b.searchText : (_c = props.query) == null ? void 0 : _c.toLowerCase();
24718
+ });
24719
+ const relatedQueryFilters = computed(() => {
24720
+ var _a, _b, _c;
24721
+ return ((_a = props.options.source) == null ? void 0 : _a.mode) === "filter" ? {
24722
+ [(_c = (_b = props.options) == null ? void 0 : _b.source) == null ? void 0 : _c.key]: [props.query]
24723
+ } : {};
24724
+ });
24618
24725
  const searchForRelatedQuery = () => __async2(this, null, function* () {
24619
- var _a, _b, _c, _d;
24726
+ var _a, _b, _c;
24620
24727
  if (!props.query) {
24621
24728
  return;
24622
24729
  }
24623
- const lupaQuery = { searchText: (_a = props.query) == null ? void 0 : _a.toLowerCase(), limit: 1 };
24730
+ const lupaQuery = { searchText: searchText.value, limit: 1, filters: relatedQueryFilters.value };
24624
24731
  try {
24625
24732
  loading.value = true;
24626
24733
  const result2 = yield LupaSearchSdk.query(
24627
24734
  queryKey.value,
24628
24735
  lupaQuery,
24629
- (_b = searchResultOptions.value) == null ? void 0 : _b.options
24736
+ (_a = searchResultOptions.value) == null ? void 0 : _a.options
24630
24737
  );
24631
24738
  if (result2.success) {
24632
24739
  relatedQueryResult.value = result2;
24633
24740
  }
24634
24741
  } catch (error) {
24635
- (_d = (_c = searchResultOptions.value) == null ? void 0 : _c.options) == null ? void 0 : _d.onError(error);
24742
+ (_c = (_b = searchResultOptions.value) == null ? void 0 : _b.options) == null ? void 0 : _c.onError(error);
24636
24743
  } finally {
24637
24744
  loading.value = false;
24638
24745
  }
@@ -24648,9 +24755,9 @@ and ensure you are accounting for this risk.
24648
24755
  });
24649
24756
  return (_ctx, _cache) => {
24650
24757
  var _a;
24651
- return openBlock(), createElementBlock("div", _hoisted_1$g, [
24652
- createBaseVNode("div", _hoisted_2$d, [
24653
- firstResultItem.value && image.value ? (openBlock(), createBlock(_sfc_main$1k, {
24758
+ return openBlock(), createElementBlock("div", _hoisted_1$h, [
24759
+ createBaseVNode("div", _hoisted_2$e, [
24760
+ firstResultItem.value && image.value ? (openBlock(), createBlock(_sfc_main$1l, {
24654
24761
  key: 0,
24655
24762
  "wrapper-class": "lupa-related-query-image-wrapper",
24656
24763
  "image-class": "lupa-related-query-image",
@@ -24658,7 +24765,7 @@ and ensure you are accounting for this risk.
24658
24765
  options: image.value
24659
24766
  }, null, 8, ["item", "options"])) : createCommentVNode("", true)
24660
24767
  ]),
24661
- createBaseVNode("div", _hoisted_3$9, [
24768
+ createBaseVNode("div", _hoisted_3$a, [
24662
24769
  createBaseVNode("span", _hoisted_4$5, toDisplayString(_ctx.query), 1),
24663
24770
  ((_a = _ctx.options) == null ? void 0 : _a.showCount) ? (openBlock(), createElementBlock("span", _hoisted_5$2, "(" + toDisplayString(totalItemCount.value) + ")", 1)) : createCommentVNode("", true)
24664
24771
  ])
@@ -24666,16 +24773,16 @@ and ensure you are accounting for this risk.
24666
24773
  };
24667
24774
  }
24668
24775
  });
24669
- const _hoisted_1$f = {
24776
+ const _hoisted_1$g = {
24670
24777
  key: 0,
24671
24778
  class: "lupa-related-queries"
24672
24779
  };
24673
- const _hoisted_2$c = {
24780
+ const _hoisted_2$d = {
24674
24781
  key: 0,
24675
24782
  class: "lupa-related-queries-title"
24676
24783
  };
24677
- const _hoisted_3$8 = ["onClick"];
24678
- const _sfc_main$h = /* @__PURE__ */ defineComponent({
24784
+ const _hoisted_3$9 = ["onClick"];
24785
+ const _sfc_main$i = /* @__PURE__ */ defineComponent({
24679
24786
  __name: "RelatedQueries",
24680
24787
  props: {
24681
24788
  options: {}
@@ -24684,12 +24791,18 @@ and ensure you are accounting for this risk.
24684
24791
  const props = __props;
24685
24792
  const searchResultStore = useSearchResultStore();
24686
24793
  const paramsStore = useParamsStore();
24794
+ const optionsStore = useOptionsStore();
24687
24795
  const { searchResult } = storeToRefs(searchResultStore);
24796
+ const currentSearchText = computed(() => {
24797
+ var _a, _b;
24798
+ return (_b = (_a = searchResult.value) == null ? void 0 : _a.searchText) != null ? _b : "";
24799
+ });
24688
24800
  const relatedQueries = computed(() => {
24689
24801
  if (!props.options || !searchResult.value) {
24690
24802
  return [];
24691
24803
  }
24692
- return extractRelatedSource(props.options.source, searchResult.value);
24804
+ const queries = extractRelatedSource(props.options.source, searchResult.value);
24805
+ return queries;
24693
24806
  });
24694
24807
  const hasEnoughRelatedQueries = computed(() => {
24695
24808
  return relatedQueries.value.length > 1;
@@ -24697,28 +24810,130 @@ and ensure you are accounting for this risk.
24697
24810
  const goToResults = ({ searchText }) => {
24698
24811
  paramsStore.goToResults({ searchText });
24699
24812
  };
24813
+ const handleRelatedQueryClick = (query) => {
24814
+ var _a;
24815
+ if (((_a = props.options.source) == null ? void 0 : _a.mode) === "filter") {
24816
+ handleFilter(query);
24817
+ } else {
24818
+ goToResults({ searchText: query });
24819
+ }
24820
+ };
24821
+ const handleFilter = (query) => {
24822
+ var _a, _b;
24823
+ const facet = (_b = (_a = searchResult.value) == null ? void 0 : _a.facets) == null ? void 0 : _b.find(
24824
+ (facet2) => {
24825
+ var _a2, _b2;
24826
+ return facet2.key === ((_b2 = (_a2 = props.options) == null ? void 0 : _a2.source) == null ? void 0 : _b2.key);
24827
+ }
24828
+ );
24829
+ if (!facet || facet.type !== "terms") {
24830
+ return [];
24831
+ }
24832
+ toggleTermFilter(
24833
+ paramsStore.appendParams,
24834
+ { type: "terms", key: facet.key, value: query },
24835
+ optionsStore.getQueryParamName,
24836
+ {}
24837
+ );
24838
+ };
24839
+ const getSelectedFilterClass = (query) => {
24840
+ var _a, _b, _c, _d, _e, _f;
24841
+ if (((_a = props.options.source) == null ? void 0 : _a.mode) !== "filter") {
24842
+ return "";
24843
+ }
24844
+ return Array.isArray((_c = (_b = searchResult.value) == null ? void 0 : _b.filters) == null ? void 0 : _c[props.options.source.key]) && ((_f = (_e = (_d = searchResult.value) == null ? void 0 : _d.filters) == null ? void 0 : _e[props.options.source.key]) == null ? void 0 : _f.includes(
24845
+ query
24846
+ )) ? "lupa-selected-related-query-filter" : "";
24847
+ };
24700
24848
  return (_ctx, _cache) => {
24701
24849
  var _a, _b, _c, _d;
24702
- return _ctx.options && hasEnoughRelatedQueries.value ? (openBlock(), createElementBlock("div", _hoisted_1$f, [
24703
- ((_b = (_a = _ctx.options) == null ? void 0 : _a.labels) == null ? void 0 : _b.title) ? (openBlock(), createElementBlock("h3", _hoisted_2$c, toDisplayString((_d = (_c = _ctx.options) == null ? void 0 : _c.labels) == null ? void 0 : _d.title), 1)) : createCommentVNode("", true),
24850
+ return _ctx.options && hasEnoughRelatedQueries.value ? (openBlock(), createElementBlock("div", _hoisted_1$g, [
24851
+ ((_b = (_a = _ctx.options) == null ? void 0 : _a.labels) == null ? void 0 : _b.title) ? (openBlock(), createElementBlock("h3", _hoisted_2$d, toDisplayString((_d = (_c = _ctx.options) == null ? void 0 : _c.labels) == null ? void 0 : _d.title), 1)) : createCommentVNode("", true),
24704
24852
  createBaseVNode("ul", null, [
24705
24853
  (openBlock(true), createElementBlock(Fragment, null, renderList(relatedQueries.value, (query) => {
24706
- return openBlock(), createElementBlock("li", { key: query }, [
24854
+ return openBlock(), createElementBlock("li", {
24855
+ key: query + currentSearchText.value,
24856
+ class: normalizeClass(getSelectedFilterClass(query))
24857
+ }, [
24707
24858
  createBaseVNode("a", {
24708
- onClick: ($event) => goToResults({ searchText: query })
24859
+ onClick: ($event) => handleRelatedQueryClick(query)
24709
24860
  }, [
24710
- createVNode(_sfc_main$i, {
24861
+ createVNode(_sfc_main$j, {
24711
24862
  options: _ctx.options,
24712
24863
  query
24713
24864
  }, null, 8, ["options", "query"])
24714
- ], 8, _hoisted_3$8)
24715
- ]);
24865
+ ], 8, _hoisted_3$9)
24866
+ ], 2);
24716
24867
  }), 128))
24717
24868
  ])
24718
24869
  ])) : createCommentVNode("", true);
24719
24870
  };
24720
24871
  }
24721
24872
  });
24873
+ const checkHasMatchCharacters = (option, searchText) => {
24874
+ var _a, _b;
24875
+ return (_b = (_a = option.matchCharacters) == null ? void 0 : _a.split("")) == null ? void 0 : _b.some((char) => searchText.includes(char));
24876
+ };
24877
+ const checkHasMatchWords = (option, searchText) => {
24878
+ var _a;
24879
+ return (_a = searchText.split(" ")) == null ? void 0 : _a.some((word) => {
24880
+ var _a2;
24881
+ return (_a2 = option.matchWords) == null ? void 0 : _a2.includes(word);
24882
+ });
24883
+ };
24884
+ const extractRedirectionSuggestion = (searchText = "", options) => {
24885
+ for (const option of options || []) {
24886
+ const hasMatchCharacters = option.matchCharacters;
24887
+ const hasMatchWords = option.matchWords;
24888
+ if (hasMatchCharacters && !hasMatchWords && checkHasMatchCharacters(option, searchText)) {
24889
+ return option;
24890
+ }
24891
+ if (hasMatchWords && !hasMatchCharacters && checkHasMatchWords(option, searchText)) {
24892
+ return option;
24893
+ }
24894
+ if (hasMatchCharacters && hasMatchWords && checkHasMatchCharacters(option, searchText) && checkHasMatchWords(option, searchText)) {
24895
+ return option;
24896
+ }
24897
+ }
24898
+ return null;
24899
+ };
24900
+ const _hoisted_1$f = {
24901
+ key: 0,
24902
+ class: "lupa-redirection-suggestion"
24903
+ };
24904
+ const _hoisted_2$c = { class: "lupa-redirections-suggestion-label" };
24905
+ const _hoisted_3$8 = ["href"];
24906
+ const _sfc_main$h = /* @__PURE__ */ defineComponent({
24907
+ __name: "RedirectionSuggestions",
24908
+ props: {
24909
+ options: {}
24910
+ },
24911
+ setup(__props) {
24912
+ const props = __props;
24913
+ const searchResultStore = useSearchResultStore();
24914
+ const optionsStore = useOptionsStore();
24915
+ const { searchResult } = storeToRefs(searchResultStore);
24916
+ const searchText = computed(() => searchResult.value.searchText);
24917
+ const redirectionSuggestion = computed(() => {
24918
+ return extractRedirectionSuggestion(searchText.value, props.options);
24919
+ });
24920
+ const label = computed(() => addParamsToLabel(redirectionSuggestion.value.label, searchText.value));
24921
+ const link = computed(
24922
+ () => generateResultLink(
24923
+ redirectionSuggestion.value.link,
24924
+ optionsStore.getQueryParamName,
24925
+ searchText.value
24926
+ )
24927
+ );
24928
+ return (_ctx, _cache) => {
24929
+ return redirectionSuggestion.value && label.value && link.value ? (openBlock(), createElementBlock("div", _hoisted_1$f, [
24930
+ createBaseVNode("h4", _hoisted_2$c, [
24931
+ createBaseVNode("a", { href: link.value }, toDisplayString(label.value), 9, _hoisted_3$8)
24932
+ ])
24933
+ ])) : createCommentVNode("", true);
24934
+ };
24935
+ }
24936
+ });
24722
24937
  const _hoisted_1$e = { id: "lupa-search-results-products" };
24723
24938
  const _hoisted_2$b = {
24724
24939
  class: "lupa-products",
@@ -24848,27 +25063,30 @@ and ensure you are accounting for this risk.
24848
25063
  key: 0,
24849
25064
  class: "lupa-loader"
24850
25065
  })) : createCommentVNode("", true),
24851
- createVNode(_sfc_main$l, {
25066
+ createVNode(_sfc_main$h, {
25067
+ options: _ctx.options.redirectionSuggestions
25068
+ }, null, 8, ["options"]),
25069
+ createVNode(_sfc_main$m, {
24852
25070
  options: _ctx.options,
24853
25071
  location: "top",
24854
25072
  sdkOptions: _ctx.options.options
24855
25073
  }, null, 8, ["options", "sdkOptions"]),
24856
- createVNode(_sfc_main$h, {
25074
+ createVNode(_sfc_main$i, {
24857
25075
  options: _ctx.options.relatedQueries
24858
25076
  }, null, 8, ["options"]),
24859
25077
  unref(hasResults) ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
24860
- showTopFilters.value ? (openBlock(), createBlock(_sfc_main$G, {
25078
+ showTopFilters.value ? (openBlock(), createBlock(_sfc_main$H, {
24861
25079
  key: 0,
24862
25080
  options: (_a = _ctx.options.filters) != null ? _a : {}
24863
25081
  }, null, 8, ["options"])) : createCommentVNode("", true),
24864
- showMobileFilters.value ? (openBlock(), createBlock(_sfc_main$A, {
25082
+ showMobileFilters.value ? (openBlock(), createBlock(_sfc_main$B, {
24865
25083
  key: 1,
24866
25084
  class: "lupa-toolbar-mobile",
24867
25085
  options: _ctx.options,
24868
25086
  "pagination-location": "top",
24869
25087
  onFilter: filter2
24870
25088
  }, null, 8, ["options"])) : createCommentVNode("", true),
24871
- currentFilterOptions.value && currentFilterPositionDesktop.value === "pageTop" ? (openBlock(), createBlock(_sfc_main$U, {
25089
+ currentFilterOptions.value && currentFilterPositionDesktop.value === "pageTop" ? (openBlock(), createBlock(_sfc_main$V, {
24872
25090
  key: 2,
24873
25091
  class: normalizeClass(currentFiltersClass.value),
24874
25092
  "data-cy": "lupa-search-result-filters-mobile-toolbar",
@@ -24877,12 +25095,12 @@ and ensure you are accounting for this risk.
24877
25095
  }, null, 8, ["class", "options", "expandable"])) : createCommentVNode("", true)
24878
25096
  ], 64)) : createCommentVNode("", true),
24879
25097
  unref(hasResults) ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
24880
- createVNode(_sfc_main$A, {
25098
+ createVNode(_sfc_main$B, {
24881
25099
  class: "lupa-toolbar-top",
24882
25100
  options: _ctx.options,
24883
25101
  "pagination-location": "top"
24884
25102
  }, null, 8, ["options"]),
24885
- currentFilterOptions.value && currentFilterPositionDesktop.value === "resultsTop" ? (openBlock(), createBlock(_sfc_main$U, {
25103
+ currentFilterOptions.value && currentFilterPositionDesktop.value === "resultsTop" ? (openBlock(), createBlock(_sfc_main$V, {
24886
25104
  key: 0,
24887
25105
  class: normalizeClass(currentFiltersClass.value),
24888
25106
  "data-cy": "lupa-search-result-filters-mobile-toolbar",
@@ -24898,7 +25116,7 @@ and ensure you are accounting for this risk.
24898
25116
  options: productCardOptions.value
24899
25117
  });
24900
25118
  }), 128)) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(unref(searchResult).items, (product, index) => {
24901
- return openBlock(), createBlock(_sfc_main$o, {
25119
+ return openBlock(), createBlock(_sfc_main$p, {
24902
25120
  style: normalizeStyle(columnSize.value),
24903
25121
  key: getProductKeyAction(index, product),
24904
25122
  product,
@@ -24914,12 +25132,12 @@ and ensure you are accounting for this risk.
24914
25132
  onClick: goToFirstPage
24915
25133
  }, toDisplayString(_ctx.options.labels.backToFirstPage), 1)) : createCommentVNode("", true)
24916
25134
  ])) : createCommentVNode("", true),
24917
- createVNode(_sfc_main$A, {
25135
+ createVNode(_sfc_main$B, {
24918
25136
  class: "lupa-toolbar-bottom",
24919
25137
  options: _ctx.options,
24920
25138
  "pagination-location": "bottom"
24921
25139
  }, null, 8, ["options"]),
24922
- createVNode(_sfc_main$l, {
25140
+ createVNode(_sfc_main$m, {
24923
25141
  options: _ctx.options,
24924
25142
  location: "bottom",
24925
25143
  sdkOptions: _ctx.options.options
@@ -24929,14 +25147,14 @@ and ensure you are accounting for this risk.
24929
25147
  createBaseVNode("span", null, toDisplayString(unref(currentQueryText)), 1)
24930
25148
  ])) : createCommentVNode("", true),
24931
25149
  hasSimilarQueries.value ? (openBlock(), createElementBlock("div", _hoisted_5$1, [
24932
- createVNode(_sfc_main$n, {
25150
+ createVNode(_sfc_main$o, {
24933
25151
  labels: similarQueriesLabels.value,
24934
25152
  columnSize: columnSize.value,
24935
25153
  productCardOptions: productCardOptions.value
24936
25154
  }, null, 8, ["labels", "columnSize", "productCardOptions"])
24937
25155
  ])) : createCommentVNode("", true),
24938
25156
  hasSimilarResults.value ? (openBlock(), createElementBlock("div", _hoisted_6$1, [
24939
- createVNode(_sfc_main$j, {
25157
+ createVNode(_sfc_main$k, {
24940
25158
  labels: similarResultsLabels.value,
24941
25159
  columnSize: columnSize.value,
24942
25160
  productCardOptions: productCardOptions.value
@@ -25005,14 +25223,14 @@ and ensure you are accounting for this risk.
25005
25223
  ])) : createCommentVNode("", true),
25006
25224
  createBaseVNode("div", _hoisted_4$3, [
25007
25225
  (openBlock(true), createElementBlock(Fragment, null, renderList(unref(relatedCategoryChildren), (child) => {
25008
- return openBlock(), createBlock(_sfc_main$T, {
25226
+ return openBlock(), createBlock(_sfc_main$U, {
25009
25227
  key: getCategoryKey(child),
25010
25228
  item: child,
25011
25229
  options: categoryOptions.value
25012
25230
  }, null, 8, ["item", "options"]);
25013
25231
  }), 128))
25014
25232
  ]),
25015
- createVNode(_sfc_main$A, {
25233
+ createVNode(_sfc_main$B, {
25016
25234
  class: "lupa-toolbar-mobile",
25017
25235
  "pagination-location": "top",
25018
25236
  options: _ctx.options
@@ -25244,8 +25462,8 @@ and ensure you are accounting for this risk.
25244
25462
  class: normalizeClass(["lupa-search-result-wrapper", { "lupa-search-wrapper-no-results": !unref(hasResults) }])
25245
25463
  }, [
25246
25464
  _ctx.isContainer ? (openBlock(), createElementBlock("div", _hoisted_1$c, [
25247
- createVNode(_sfc_main$Y, { labels: didYouMeanLabels.value }, null, 8, ["labels"]),
25248
- createVNode(_sfc_main$W, {
25465
+ createVNode(_sfc_main$Z, { labels: didYouMeanLabels.value }, null, 8, ["labels"]),
25466
+ createVNode(_sfc_main$X, {
25249
25467
  "show-summary": true,
25250
25468
  options: _ctx.options,
25251
25469
  "is-product-list": (_a = _ctx.isProductList) != null ? _a : false
@@ -25255,17 +25473,17 @@ and ensure you are accounting for this risk.
25255
25473
  key: 1,
25256
25474
  options: _ctx.options
25257
25475
  }, null, 8, ["options"])) : createCommentVNode("", true),
25258
- _ctx.options.filters ? (openBlock(), createBlock(_sfc_main$I, {
25476
+ _ctx.options.filters ? (openBlock(), createBlock(_sfc_main$J, {
25259
25477
  key: 2,
25260
25478
  options: _ctx.options.filters,
25261
25479
  onFilter: handleParamsChange
25262
25480
  }, null, 8, ["options"])) : createCommentVNode("", true),
25263
- unref(currentQueryText) || _ctx.isProductList ? (openBlock(), createBlock(_sfc_main$H, {
25481
+ unref(currentQueryText) || _ctx.isProductList ? (openBlock(), createBlock(_sfc_main$I, {
25264
25482
  key: 3,
25265
25483
  breadcrumbs: _ctx.options.breadcrumbs
25266
25484
  }, null, 8, ["breadcrumbs"])) : createCommentVNode("", true),
25267
25485
  isTitleResultTopPosition.value ? (openBlock(), createElementBlock("div", _hoisted_2$9, [
25268
- showFilterSidebar.value ? (openBlock(), createBlock(_sfc_main$J, {
25486
+ showFilterSidebar.value ? (openBlock(), createBlock(_sfc_main$K, {
25269
25487
  key: 0,
25270
25488
  options: (_b = _ctx.options.filters) != null ? _b : {},
25271
25489
  ref_key: "searchResultsFilters",
@@ -25273,8 +25491,8 @@ and ensure you are accounting for this risk.
25273
25491
  onFilter: handleParamsChange
25274
25492
  }, null, 8, ["options"])) : createCommentVNode("", true),
25275
25493
  createBaseVNode("div", _hoisted_3$5, [
25276
- createVNode(_sfc_main$Y, { labels: didYouMeanLabels.value }, null, 8, ["labels"]),
25277
- createVNode(_sfc_main$W, {
25494
+ createVNode(_sfc_main$Z, { labels: didYouMeanLabels.value }, null, 8, ["labels"]),
25495
+ createVNode(_sfc_main$X, {
25278
25496
  options: _ctx.options,
25279
25497
  "is-product-list": (_c = _ctx.isProductList) != null ? _c : false
25280
25498
  }, null, 8, ["options", "is-product-list"]),
@@ -25290,13 +25508,13 @@ and ensure you are accounting for this risk.
25290
25508
  }, 8, ["options", "ssr"])
25291
25509
  ])
25292
25510
  ])) : (openBlock(), createElementBlock(Fragment, { key: 5 }, [
25293
- createVNode(_sfc_main$Y, { labels: didYouMeanLabels.value }, null, 8, ["labels"]),
25294
- createVNode(_sfc_main$W, {
25511
+ createVNode(_sfc_main$Z, { labels: didYouMeanLabels.value }, null, 8, ["labels"]),
25512
+ createVNode(_sfc_main$X, {
25295
25513
  options: _ctx.options,
25296
25514
  "is-product-list": (_d = _ctx.isProductList) != null ? _d : false
25297
25515
  }, null, 8, ["options", "is-product-list"]),
25298
25516
  createBaseVNode("div", _hoisted_4$2, [
25299
- showFilterSidebar.value ? (openBlock(), createBlock(_sfc_main$J, {
25517
+ showFilterSidebar.value ? (openBlock(), createBlock(_sfc_main$K, {
25300
25518
  key: 0,
25301
25519
  options: (_e = _ctx.options.filters) != null ? _e : {},
25302
25520
  ref_key: "searchResultsFilters",
@@ -30986,7 +31204,7 @@ and ensure you are accounting for this risk.
30986
31204
  onClick: withModifiers(innerClick, ["stop"])
30987
31205
  }, [
30988
31206
  createBaseVNode("div", _hoisted_2$7, [
30989
- createVNode(_sfc_main$Z, {
31207
+ createVNode(_sfc_main$_, {
30990
31208
  options: fullSearchBoxOptions.value,
30991
31209
  "is-search-container": true,
30992
31210
  ref_key: "searchBox",
@@ -31876,7 +32094,7 @@ and ensure you are accounting for this risk.
31876
32094
  key: getProductKeyAction(index, product)
31877
32095
  }, {
31878
32096
  default: withCtx(() => [
31879
- createVNode(_sfc_main$o, {
32097
+ createVNode(_sfc_main$p, {
31880
32098
  product,
31881
32099
  options: _ctx.options,
31882
32100
  "click-tracking-settings": clickTrackingSettings.value
@@ -31889,7 +32107,7 @@ and ensure you are accounting for this risk.
31889
32107
  _: 1
31890
32108
  }, 16)) : (openBlock(), createElementBlock("div", _hoisted_3$4, [
31891
32109
  (openBlock(true), createElementBlock(Fragment, null, renderList(recommendations2.value, (product, index) => {
31892
- return openBlock(), createBlock(_sfc_main$o, {
32110
+ return openBlock(), createBlock(_sfc_main$p, {
31893
32111
  style: normalizeStyle(columnSize.value),
31894
32112
  key: getProductKeyAction(index, product),
31895
32113
  product,
@@ -32153,7 +32371,7 @@ and ensure you are accounting for this risk.
32153
32371
  createBaseVNode("a", {
32154
32372
  href: getLink(product)
32155
32373
  }, [
32156
- createVNode(_sfc_main$z, {
32374
+ createVNode(_sfc_main$A, {
32157
32375
  item: product,
32158
32376
  options: image.value
32159
32377
  }, null, 8, ["item", "options"])
@@ -32317,7 +32535,7 @@ and ensure you are accounting for this risk.
32317
32535
  return (_ctx, _cache) => {
32318
32536
  return openBlock(), createElementBlock("section", _hoisted_1$3, [
32319
32537
  (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.searchResults, (product, index) => {
32320
- return openBlock(), createBlock(_sfc_main$o, {
32538
+ return openBlock(), createBlock(_sfc_main$p, {
32321
32539
  class: "lupa-chat-product-card",
32322
32540
  key: getProductKeyAction(index, product),
32323
32541
  product,
@@ -32510,7 +32728,7 @@ and ensure you are accounting for this risk.
32510
32728
  key: 0,
32511
32729
  class: "lupasearch-chat-content"
32512
32730
  };
32513
- const _sfc_main$1t = /* @__PURE__ */ defineComponent({
32731
+ const _sfc_main$1u = /* @__PURE__ */ defineComponent({
32514
32732
  __name: "ChatContainer",
32515
32733
  props: {
32516
32734
  options: {}
@@ -38528,7 +38746,7 @@ and ensure you are accounting for this risk.
38528
38746
  };
38529
38747
  __expose({ fetch: fetch2 });
38530
38748
  return (_ctx, _cache) => {
38531
- return openBlock(), createBlock(unref(_sfc_main$Z), {
38749
+ return openBlock(), createBlock(unref(_sfc_main$_), {
38532
38750
  options: fullSearchBoxOptions.value,
38533
38751
  ref_key: "searchBox",
38534
38752
  ref: searchBox2
@@ -39083,7 +39301,7 @@ and ensure you are accounting for this risk.
39083
39301
  const instance = createVue(
39084
39302
  options.displayOptions.containerSelector,
39085
39303
  mountOptions == null ? void 0 : mountOptions.mountingBehavior,
39086
- _sfc_main$1t,
39304
+ _sfc_main$1u,
39087
39305
  {
39088
39306
  options
39089
39307
  }