@depict-ai/ui 3.0.3 → 3.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/ES10/index.cjs CHANGED
@@ -83,7 +83,7 @@ $parcel$export(module.exports, "defaultColsAtSize", () => $33eed84f447aa0c0$expo
83
83
  $parcel$export(module.exports, "defaultCategoryTitlePlugin", () => $33eed84f447aa0c0$export$7bf543b9d9be2c22);
84
84
  $parcel$export(module.exports, "version", () => $aa1938dec50d6c12$export$83d89fbfd8236492);
85
85
  /*! Depict.ai search and product listing SDK */
86
- const $aa1938dec50d6c12$export$83d89fbfd8236492 = "3.0.3";
86
+ const $aa1938dec50d6c12$export$83d89fbfd8236492 = "3.0.4";
87
87
  const $9d19451330d04c3c$var$_tmpl$ = /*#__PURE__*/$52FdA$solidjsweb.template(`<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 14 26"><path d="M2 24.656c-.078 0-.156-.016-.234-.047s-.133-.066-.187-.129c-.117-.117-.176-.258-.176-.422s.059-.305.176-.422l10.371-10.371L1.578 2.883c-.117-.117-.176-.258-.176-.422s.059-.305.176-.422.258-.176.422-.176.305.059.422.176l10.805 10.793a.59.59 0 0 1 .176.434c0 .172-.059.305-.176.422L2.422 24.48a.42.42 0 0 1-.199.129.54.54 0 0 1-.223.047zm0 0"fill=#0f0f0f>`);
88
88
  function $9d19451330d04c3c$export$8be2714ec7f169ee() {
89
89
  let props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
@@ -469,12 +469,12 @@ class $73014ff36186a4dd$export$7e1297a3a19f10d8 {
469
469
  * Vue has async router that needs to be awaited (it navigates after a microtask)
470
470
  * This standardises waiting for all kinds of routers
471
471
  */
472
- constructor(on_navigation, listing_id_state_key) {
472
+ constructor(on_navigation, listing_query_state_key) {
473
473
  $73014ff36186a4dd$var$_classPrivateMethodInitSpec(this, $73014ff36186a4dd$var$_get_navigation_happened_promise);
474
474
  $73014ff36186a4dd$var$_classPrivateMethodInitSpec(this, $73014ff36186a4dd$var$_dont_attempt_navigation);
475
475
  $73014ff36186a4dd$var$_classPrivateMethodInitSpec(this, $73014ff36186a4dd$var$_throwing_on_navigation);
476
476
  $parcel$interopDefault($52FdA$babelruntimehelpersdefineProperty)(this, "on_navigation_", void 0);
477
- $parcel$interopDefault($52FdA$babelruntimehelpersdefineProperty)(this, "listing_id_state_key", void 0);
477
+ $parcel$interopDefault($52FdA$babelruntimehelpersdefineProperty)(this, "listing_query_state_key", void 0);
478
478
  $parcel$interopDefault($52FdA$babelruntimehelpersdefineProperty)(this, "navigate_", {
479
479
  /**
480
480
  * Call this if you *just* want to replace the state object in history.state
@@ -498,7 +498,7 @@ class $73014ff36186a4dd$export$7e1297a3a19f10d8 {
498
498
  event_: event_,
499
499
  force_spa_navigation_: force_spa_navigation_,
500
500
  is_replace_: is_replace_,
501
- listing_id_: listing_id_,
501
+ listing_query_: listing_query_,
502
502
  scroll = true
503
503
  } = _ref;
504
504
  const new_url_ = raw_new_url instanceof URL ? raw_new_url : new URL(raw_new_url, location.origin);
@@ -519,10 +519,10 @@ class $73014ff36186a4dd$export$7e1297a3a19f10d8 {
519
519
  if (force_spa_navigation_ && wants_hard_navigation) {
520
520
  // Don't allow hard navigation if we're forcing SPA navigation, which we do for things where PageReplacer can be used for performance
521
521
  const new_state = history.state;
522
- if (listing_id_) {
522
+ if (listing_query_) {
523
523
  // In JS-UI we need to know the listing_id of the current category, therefore push it into state
524
- if (!this.listing_id_state_key) $52FdA$depictaiutilishared.report(new Error("listing_id_state_key is not set"), "error");
525
- new_state[this.listing_id_state_key] = listing_id_;
524
+ if (!this.listing_query_state_key) $52FdA$depictaiutilishared.report(new Error("listing_query_state_key is not set"), "error");
525
+ new_state[this.listing_query_state_key] = listing_query_;
526
526
  }
527
527
  history[is_replace_ ? "replaceState" : "pushState"](new_state, "", new_url_);
528
528
  } else $73014ff36186a4dd$var$_classPrivateMethodGet(this, $73014ff36186a4dd$var$_throwing_on_navigation, $73014ff36186a4dd$var$_throwing_on_navigation2).call(this, {
@@ -533,7 +533,7 @@ class $73014ff36186a4dd$export$7e1297a3a19f10d8 {
533
533
  await promise;
534
534
  })
535
535
  });
536
- this.listing_id_state_key = listing_id_state_key;
536
+ this.listing_query_state_key = listing_query_state_key;
537
537
  this.on_navigation_ = on_navigation;
538
538
  }
539
539
  }
@@ -5830,6 +5830,8 @@ function $b3dc12c672c9df24$export$967e966fca9515e(api_response) {
5830
5830
  }
5831
5831
  return api_response;
5832
5832
  }
5833
+ const $c3739e86187f2054$export$74ee7529ce0f8a00 = "listingId";
5834
+ const $c3739e86187f2054$export$5aae649db1b959fc = "externalId";
5833
5835
  function $e270e9f953fcbc58$var$_classPrivateMethodInitSpec(obj, privateSet) {
5834
5836
  $e270e9f953fcbc58$var$_checkPrivateRedeclaration(obj, privateSet);
5835
5837
  privateSet.add(obj);
@@ -5938,9 +5940,14 @@ class $e270e9f953fcbc58$export$e015ed2f2950f2e3 {
5938
5940
  })
5939
5941
  });
5940
5942
  }
5941
- async get_listing(input_req) {
5943
+ async get_listing(_ref) {
5944
+ let {
5945
+ id_type_: id_type_,
5946
+ id_to_query_for_: id_to_query_for_,
5947
+ ...input_req
5948
+ } = _ref;
5942
5949
  return await $e270e9f953fcbc58$var$_classPrivateMethodGet(this, $e270e9f953fcbc58$var$_cached_request, $e270e9f953fcbc58$var$_cached_request2).call(this, {
5943
- endpoint_: $e270e9f953fcbc58$var$v3_base_url + "listings/" + encodeURIComponent(input_req.listing_id),
5950
+ endpoint_: $e270e9f953fcbc58$var$v3_base_url + "listings/" + (id_type_ === $c3739e86187f2054$export$5aae649db1b959fc ? "external_id/" : "") + encodeURIComponent(id_to_query_for_),
5944
5951
  input_req_: input_req,
5945
5952
  fallback_response_: () => ({
5946
5953
  listing_id: "",
@@ -5954,20 +5961,18 @@ class $e270e9f953fcbc58$export$e015ed2f2950f2e3 {
5954
5961
  "quick_links": [],
5955
5962
  failed: true
5956
5963
  }),
5957
- method_: "GET",
5958
- delete_key_before_sending_: "listing_id" // this goes into the path, but we still need to have it in the request object until the last second as we want to include it as a key when caching requests
5964
+ method_: "GET"
5959
5965
  });
5960
5966
  }
5961
-
5962
- async get_listing_products(input_req) {
5963
- const listing_id = input_req.listing_id; // listing_id goes into the path
5964
- const cloned_request = {
5965
- ...input_req
5966
- };
5967
- delete cloned_request["listing_id"];
5967
+ async get_listing_products(_ref2) {
5968
+ let {
5969
+ id_to_query_for_: id_to_query_for_,
5970
+ id_type_: id_type_,
5971
+ ...input_req_
5972
+ } = _ref2;
5968
5973
  return await $e270e9f953fcbc58$var$_classPrivateMethodGet(this, $e270e9f953fcbc58$var$_cached_request, $e270e9f953fcbc58$var$_cached_request2).call(this, {
5969
- endpoint_: $e270e9f953fcbc58$var$v3_base_url + "listings/" + encodeURIComponent(listing_id) + "/products",
5970
- input_req_: input_req,
5974
+ endpoint_: $e270e9f953fcbc58$var$v3_base_url + "listings/" + (id_type_ === $c3739e86187f2054$export$5aae649db1b959fc ? "external_id/" : "") + encodeURIComponent(id_to_query_for_) + "/products",
5975
+ input_req_: input_req_,
5971
5976
  fallback_response_: () => ({
5972
5977
  "n_hits": 0,
5973
5978
  "displays": [],
@@ -6005,7 +6010,7 @@ async function $e270e9f953fcbc58$var$_run_url_creator_for_suggest2(merchant, mar
6005
6010
  const category_transformer = (_this$display_transfo = this.display_transformers) === null || _this$display_transfo === void 0 ? void 0 : _this$display_transfo.categories;
6006
6011
  if (!category_transformer) return response;
6007
6012
  // find category suggestions, run thing with them, and then replace them
6008
- const category_suggestions = response.suggestions.filter(suggestion => suggestion.type === "category");
6013
+ const category_suggestions = response.suggestions.filter(suggestion => suggestion.type === "listing");
6009
6014
  const transformed_category_suggestions = await category_transformer({
6010
6015
  market: market,
6011
6016
  merchant: merchant,
@@ -6051,15 +6056,14 @@ async function $e270e9f953fcbc58$var$_run_display_transformers_for_rest2(merchan
6051
6056
  });
6052
6057
  return input_data;
6053
6058
  }
6054
- async function $e270e9f953fcbc58$var$_cached_request2(_ref) {
6059
+ async function $e270e9f953fcbc58$var$_cached_request2(_ref3) {
6055
6060
  var _classPrivateFieldGet5, _cache_obj$cache_$bod, _cache_obj$cache_$bod2;
6056
6061
  let {
6057
6062
  endpoint_: endpoint_,
6058
6063
  input_req_: input_req_,
6059
6064
  fallback_response_: fallback_response_,
6060
- method_ = "POST",
6061
- delete_key_before_sending_: delete_key_before_sending_ // only supported for GET requests
6062
- } = _ref;
6065
+ method_ = "POST"
6066
+ } = _ref3;
6063
6067
  const cache_obj = $e270e9f953fcbc58$var$_classPrivateMethodGet(this, $e270e9f953fcbc58$var$_get_cache_obj_for_endpoint, $e270e9f953fcbc58$var$_get_cache_obj_for_endpoint2).call(this, endpoint_);
6064
6068
  const with_ids = $parcel$interopDefault($52FdA$babelruntimehelpersclassPrivateFieldGet)(this, $e270e9f953fcbc58$var$_add_ids_to_request).call(this, input_req_);
6065
6069
  const metaData = await ((_classPrivateFieldGet5 = $parcel$interopDefault($52FdA$babelruntimehelpersclassPrivateFieldGet)(this, $e270e9f953fcbc58$var$_get_metadata)) === null || _classPrivateFieldGet5 === void 0 ? void 0 : _classPrivateFieldGet5.call(this));
@@ -6076,7 +6080,6 @@ async function $e270e9f953fcbc58$var$_cached_request2(_ref) {
6076
6080
  cache_obj.in_progress_[body] = new Promise(r => resolve_in_progress = r);
6077
6081
  try {
6078
6082
  const is_post = method_ === "POST";
6079
- if (!is_post && delete_key_before_sending_) delete sorted_request[delete_key_before_sending_];
6080
6083
  const url_to_request = is_post ? endpoint_ : $52FdA$depictaiutilishared.make_url_with_query_params(endpoint_, sorted_request);
6081
6084
  const api_response = await $52FdA$depictaiutilishared.fetch_retry($52FdA$depictaiutilishared.add_version_query_params(url_to_request), {
6082
6085
  method: method_,
@@ -6450,7 +6453,7 @@ function $19438fea513c9d01$export$5e4aed86c12acdd9(_ref) {
6450
6453
  // After first load, always just load 20 since people might just be browsing the top ones still
6451
6454
  min_products_to_fetch_ : now - last_loaded < 10000 ? min_products_to_fetch_ * 5 : min_products_to_fetch_;
6452
6455
  // dlog("loading ", number_of_results_to_load, "products, because it was", now - last_loaded, "ms since last load");
6453
- const api_response = await depict_api_["listing_id" in base_part ? "get_listing_products" : "query"]({
6456
+ const api_response = await depict_api_["query" in base_part ? "query" : "get_listing_products"]({
6454
6457
  cursor: get_last_cursor(),
6455
6458
  limit: number_of_results_to_load,
6456
6459
  ...base_part
@@ -8184,16 +8187,16 @@ function $1c819dc9d820a149$export$5646050d516e06bc(_ref) {
8184
8187
  },
8185
8188
  get children() {
8186
8189
  const _el$2 = $52FdA$solidjsweb.getNextElement($1c819dc9d820a149$var$_tmpl$2);
8187
- $52FdA$solidjsweb.addEventListener(_el$2, "click", $52FdA$depictaiutilishared.catchify(ev => {
8188
- var _display_accessor2;
8189
- return router_.navigate_.go_to_({
8190
- new_url_: href(),
8191
- is_replace_: false,
8192
- event_: ev,
8193
- force_spa_navigation_: true,
8194
- listing_id_: (_display_accessor2 = display_accessor()) === null || _display_accessor2 === void 0 ? void 0 : _display_accessor2.listing_id
8195
- });
8196
- }), true);
8190
+ $52FdA$solidjsweb.addEventListener(_el$2, "click", $52FdA$depictaiutilishared.catchify(ev => router_.navigate_.go_to_({
8191
+ new_url_: href(),
8192
+ is_replace_: false,
8193
+ event_: ev,
8194
+ force_spa_navigation_: true,
8195
+ listing_query_: {
8196
+ id: display_accessor().listing_id,
8197
+ type: $c3739e86187f2054$export$74ee7529ce0f8a00
8198
+ }
8199
+ })), true);
8197
8200
  $52FdA$solidjsweb.insert(_el$2, () => display_accessor().title);
8198
8201
  $52FdA$solidjsweb.effect(() => $52FdA$solidjsweb.setAttribute(_el$2, "href", href()));
8199
8202
  $52FdA$solidjsweb.runHydrationEvents();
@@ -8224,11 +8227,12 @@ function $21a004c2e7bd4c16$export$466cdc317043f6cb(_ref) {
8224
8227
  let {
8225
8228
  quicklinks_data_: quicklinks_data_,
8226
8229
  router_: router_,
8227
- current_listing_id_: current_listing_id_,
8230
+ id_to_query_for_: id_to_query_for_,
8228
8231
  breadcrumb_data_: breadcrumb_data_,
8229
8232
  i18n_: i18n_,
8230
8233
  sorting_query_param_: sorting_query_param_,
8231
- filter_query_param_prefix_: filter_query_param_prefix_
8234
+ filter_query_param_prefix_: filter_query_param_prefix_,
8235
+ id_type_: id_type_
8232
8236
  } = _ref;
8233
8237
  let scrolling_logic_ran_for_listing_id = false;
8234
8238
  let last_scroll_position;
@@ -8236,13 +8240,13 @@ function $21a004c2e7bd4c16$export$466cdc317043f6cb(_ref) {
8236
8240
  let last_was_placeholder = false;
8237
8241
  let sliding_element;
8238
8242
  $52FdA$solidjs.createComputed(() => {
8239
- current_listing_id_();
8243
+ id_to_query_for_();
8240
8244
  scrolling_logic_ran_for_listing_id = false;
8241
8245
  });
8242
8246
  const place_holdey_quicklinks_data = $52FdA$solidjs.createMemo(() => quicklinks_data_() || [,,,]);
8243
8247
  const selected_index = $52FdA$solidjs.createMemo(() => {
8244
8248
  var _quicklinks_data_;
8245
- return (_quicklinks_data_ = quicklinks_data_()) === null || _quicklinks_data_ === void 0 ? void 0 : _quicklinks_data_.findIndex(item => item.listing_id === current_listing_id_());
8249
+ return (_quicklinks_data_ = quicklinks_data_()) === null || _quicklinks_data_ === void 0 ? void 0 : _quicklinks_data_.findIndex(item => item[id_type_() === $c3739e86187f2054$export$5aae649db1b959fc ? "external_id" : "listing_id"] === id_to_query_for_());
8246
8250
  }); // this will be -1 when viewing child categories
8247
8251
  const scrollpos_per_listing_id = {};
8248
8252
  const mutation_plugins = [function () {
@@ -8252,7 +8256,7 @@ function $21a004c2e7bd4c16$export$466cdc317043f6cb(_ref) {
8252
8256
  } = this.insert_here;
8253
8257
  if (scrollLeft > 0) {
8254
8258
  last_scroll_position = scrollLeft;
8255
- const current_id = $52FdA$solidjs.untrack(current_listing_id_);
8259
+ const current_id = $52FdA$solidjs.untrack(id_to_query_for_);
8256
8260
  // make sure to not save position where selected item isn't in viewport
8257
8261
  const current_selected_index = $52FdA$solidjs.untrack(selected_index);
8258
8262
  const intersecting_thing = this.intersecting_items_object[current_selected_index];
@@ -8318,7 +8322,7 @@ function $21a004c2e7bd4c16$export$466cdc317043f6cb(_ref) {
8318
8322
  equals: false
8319
8323
  }), new_data => {
8320
8324
  const quicklinks_data = quicklinks_data_(); // this signal should have updated by now since this is a createEffect
8321
- const current_id = current_listing_id_();
8325
+ const current_id = id_to_query_for_();
8322
8326
  if (!new_data || !quicklinks_data || !current_id) return;
8323
8327
  const owner = $52FdA$solidjs.getOwner();
8324
8328
  queueMicrotask(() => {
@@ -8368,13 +8372,9 @@ function $21a004c2e7bd4c16$export$466cdc317043f6cb(_ref) {
8368
8372
  // Solution: instead of not adding the state to the url, add a flag to the link if it's a sibling and then display the toast on load if the flag is set
8369
8373
  const is_sibling = $52FdA$solidjs.createMemo(() => {
8370
8374
  var _quicklinks_data_2;
8371
- const current_id = current_listing_id_();
8372
- return (_quicklinks_data_2 = quicklinks_data_()) === null || _quicklinks_data_2 === void 0 ? void 0 : _quicklinks_data_2.some(_ref3 => {
8373
- let {
8374
- listing_id: listing_id
8375
- } = _ref3;
8376
- return listing_id === current_id;
8377
- });
8375
+ const current_id = id_to_query_for_();
8376
+ const lookForId = id_type_() === $c3739e86187f2054$export$5aae649db1b959fc ? "external_id" : "listing_id";
8377
+ return (_quicklinks_data_2 = quicklinks_data_()) === null || _quicklinks_data_2 === void 0 ? void 0 : _quicklinks_data_2.some(quickLink => quickLink[lookForId] === current_id);
8378
8378
  });
8379
8379
  const href = $52FdA$solidjs.createMemo(() => {
8380
8380
  var _display_accessor;
@@ -8394,20 +8394,20 @@ function $21a004c2e7bd4c16$export$466cdc317043f6cb(_ref) {
8394
8394
  const url = href();
8395
8395
  if (is_selected() && !ev.metaKey && !ev.ctrlKey && !ev.button || !url)
8396
8396
  // allow open currently selected one in new tab but otherwise prevent clicks
8397
- ev.preventDefault();else if (href()) {
8398
- var _display_accessor2;
8399
- router_.navigate_.go_to_({
8400
- new_url_: url,
8401
- is_replace_: false,
8402
- event_: ev,
8403
- force_spa_navigation_: true,
8404
- listing_id_: (_display_accessor2 = display_accessor()) === null || _display_accessor2 === void 0 ? void 0 : _display_accessor2.listing_id
8405
- });
8406
- }
8397
+ ev.preventDefault();else if (href()) router_.navigate_.go_to_({
8398
+ new_url_: url,
8399
+ is_replace_: false,
8400
+ event_: ev,
8401
+ force_spa_navigation_: true,
8402
+ listing_query_: {
8403
+ id: display_accessor().listing_id,
8404
+ type: $c3739e86187f2054$export$74ee7529ce0f8a00
8405
+ }
8406
+ });
8407
8407
  }), true);
8408
8408
  $52FdA$solidjsweb.insert(_el$3, () => {
8409
- var _display_accessor3;
8410
- return ((_display_accessor3 = display_accessor()) === null || _display_accessor3 === void 0 ? void 0 : _display_accessor3.title) || $52FdA$solidjsweb.createComponent((0, $a7f7d416e6f61504$export$89c6019e4baa40b1), {
8409
+ var _display_accessor2;
8410
+ return ((_display_accessor2 = display_accessor()) === null || _display_accessor2 === void 0 ? void 0 : _display_accessor2.title) || $52FdA$solidjsweb.createComponent((0, $a7f7d416e6f61504$export$89c6019e4baa40b1), {
8411
8411
  height: "1em",
8412
8412
  width: "10ch"
8413
8413
  });
@@ -8569,13 +8569,14 @@ let $c95c6dd9e93acd82$export$44dad306455dddf;
8569
8569
  function $8b366fdb0c76194d$export$3945d6db2dfd3d12(_ref) {
8570
8570
  let {
8571
8571
  crumb_data_: crumb_data_,
8572
- listing_id_: listing_id_,
8572
+ id_to_query_for_: id_to_query_for_,
8573
8573
  i18n_: i18n_,
8574
8574
  selected_filters_: selected_filters_,
8575
8575
  local_filter_cache_: local_filter_cache_,
8576
8576
  expanded_hierarchical_filters_: expanded_hierarchical_filters_,
8577
8577
  plp_results_: plp_results_,
8578
- sideways_filter_clearing_flag_: sideways_filter_clearing_flag_
8578
+ sideways_filter_clearing_flag_: sideways_filter_clearing_flag_,
8579
+ id_type_: id_type_
8579
8580
  } = _ref;
8580
8581
  // If we just got opened in a new tab, clear filters instantly and remove the flag
8581
8582
  $8b366fdb0c76194d$var$clear_if_opened_new_tab_with_sideways_url_params_flag({
@@ -8586,17 +8587,21 @@ function $8b366fdb0c76194d$export$3945d6db2dfd3d12(_ref) {
8586
8587
  i18n_: i18n_,
8587
8588
  sideways_filter_clearing_flag_: sideways_filter_clearing_flag_
8588
8589
  });
8589
- // Code below is for when we're already open and the user navigates to a new category
8590
+ // The code below is for when we're already open and the user navigates to a new category
8590
8591
  let previous_crumb_data = $52FdA$solidjs.untrack(crumb_data_);
8591
- let listing_id_when_we_got_previous_data = $52FdA$solidjs.untrack(listing_id_);
8592
+ let id_when_we_got_previous_data = {
8593
+ id_: $52FdA$solidjs.untrack(id_to_query_for_),
8594
+ type_: $52FdA$solidjs.untrack(id_type_)
8595
+ };
8592
8596
  let allow_filter_clearing = true; // set to false when going backwards/forwards
8593
8597
  // temporarily disable filter clearing when going backwards/forwards
8594
8598
  const handler = () => allow_filter_clearing = false;
8595
8599
  window.addEventListener("popstate", handler); // popstate only gets called when using back/forwards button of browser or the history navigate to achieve the same, but not on pushState or replaceState
8596
8600
  $52FdA$solidjs.onCleanup(() => window.removeEventListener("popstate", handler));
8597
8601
  $52FdA$solidjs.createEffect($52FdA$solidjs.on(crumb_data_, $52FdA$depictaiutilishared.catchify(new_crumb_data => {
8598
- const listing_id_of_new_data = listing_id_();
8599
- if (allow_filter_clearing && previous_crumb_data && new_crumb_data && listing_id_of_new_data !== listing_id_when_we_got_previous_data) {
8602
+ const id_of_new_data = id_to_query_for_();
8603
+ const type_of_id_of_new_data = id_type_();
8604
+ if (allow_filter_clearing && previous_crumb_data && new_crumb_data && (id_of_new_data !== id_when_we_got_previous_data.id_ || type_of_id_of_new_data !== id_when_we_got_previous_data.type_)) {
8600
8605
  const previous_length = previous_crumb_data.length;
8601
8606
  const new_length = new_crumb_data.length;
8602
8607
  const went_upwards = new_length < previous_length;
@@ -8622,7 +8627,10 @@ function $8b366fdb0c76194d$export$3945d6db2dfd3d12(_ref) {
8622
8627
  sideways_filter_clearing_flag_[1](false);
8623
8628
  }
8624
8629
  }
8625
- listing_id_when_we_got_previous_data = listing_id_of_new_data;
8630
+ id_when_we_got_previous_data = {
8631
+ id_: id_of_new_data,
8632
+ type_: type_of_id_of_new_data
8633
+ };
8626
8634
  previous_crumb_data = new_crumb_data;
8627
8635
  if (!allow_filter_clearing) allow_filter_clearing = true;
8628
8636
  })));
@@ -8655,7 +8663,7 @@ function $8b366fdb0c76194d$var$clear_if_opened_new_tab_with_sideways_url_params_
8655
8663
  });
8656
8664
  tracking_function_for_plp_results(plp_results_);
8657
8665
  }
8658
- const $c3a7faae6f2b93c9$var$_tmpl$ = /*#__PURE__*/$52FdA$solidjsweb.template(`<div class=statement style=white-space:pre-wrap>No listingId specified, this is probably unintentional. Make sure to create (and insert) the CategoryPage *after* you have specified a listingId.`),
8666
+ const $c3a7faae6f2b93c9$var$_tmpl$ = /*#__PURE__*/$52FdA$solidjsweb.template(`<div class=statement style=white-space:pre-wrap>No listingId specified, this is probably unintentional. Make sure to create (and insert) the CategoryPage *after* you have specified a listingId/externalId.`),
8659
8667
  $c3a7faae6f2b93c9$var$_tmpl$2 = /*#__PURE__*/$52FdA$solidjsweb.template(`<div class=buttons><button class="ok major">`);
8660
8668
  function $c3a7faae6f2b93c9$export$7af06a63c5a976c9(el, listing_id, i18n_) {
8661
8669
  if (!(0, $52FdA$depictaiutilishared.is_debug)) return; // Just to make sure we don't show this in production
@@ -8667,7 +8675,7 @@ function $c3a7faae6f2b93c9$export$7af06a63c5a976c9(el, listing_id, i18n_) {
8667
8675
  return $52FdA$solidjs.runWithOwner(owner, () => $52FdA$solidjs.createEffect(() => {
8668
8676
  if (!document.documentElement.contains(element)) return;
8669
8677
  if (!listing_id()) {
8670
- const warning = "No listingId specified, this is probably unintentional. Make sure to create (and insert) the CategoryPage *after* you have specified a listingId.";
8678
+ const warning = "No listingId specified, this is probably unintentional. Make sure to create (and insert) the CategoryPage *after* you have specified a listingId/externalId.";
8671
8679
  $52FdA$depictaiutilishared.dwarn(warning);
8672
8680
  const {
8673
8681
  close_toast_: close_toast_
@@ -8727,8 +8735,8 @@ function $ede6c70ecdca46fe$export$f7d2f673fc2f091d(_ref) {
8727
8735
  var _on_filters_construct;
8728
8736
  let {
8729
8737
  depict_api_: depict_api_,
8730
- listing_id_: listing_id_,
8731
- meta_title_suffix_: meta_title_suffix_,
8738
+ id_to_query_for_: id_to_query_for_,
8739
+ id_type_: id_type_,
8732
8740
  current_sorting_: current_sorting_,
8733
8741
  min_products_to_fetch_: min_products_to_fetch_,
8734
8742
  category_filters_open_: category_filters_open_,
@@ -8781,7 +8789,8 @@ function $ede6c70ecdca46fe$export$f7d2f673fc2f091d(_ref) {
8781
8789
  merchant: merchant_(),
8782
8790
  market: market_(),
8783
8791
  locale: backend_locale_(),
8784
- listing_id: listing_id_(),
8792
+ id_to_query_for_: id_to_query_for_(),
8793
+ id_type_: id_type_(),
8785
8794
  ...(f.length ? {
8786
8795
  filters: f
8787
8796
  } : {}),
@@ -8793,8 +8802,8 @@ function $ede6c70ecdca46fe$export$f7d2f673fc2f091d(_ref) {
8793
8802
  // Make "Get products in listing" request to get products in listing
8794
8803
  const [plp_products_] = $52FdA$solidjs.createResource(products_query_base_,
8795
8804
  // only first page of results, unless the history state says we should load more (can't do that in load more thing, I tested, they need to be added at once for the browser to not give up scroll restoration)
8796
- $52FdA$depictaiutilishared.catchify(base_query => $fef4890f1f8e0544$export$cc42dd29bf655ab6({
8797
- id_: $52FdA$solidjs.untrack(listing_id_),
8805
+ $52FdA$depictaiutilisharedlatest.catchify(base_query => $fef4890f1f8e0544$export$cc42dd29bf655ab6({
8806
+ id_: $52FdA$solidjs.untrack(id_to_query_for_),
8798
8807
  scroll_restoration_data_: scroll_restoration_data_,
8799
8808
  min_products_to_fetch_: min_products_to_fetch_,
8800
8809
  make_request_: (limit, cursor) => depict_api_.get_listing_products({
@@ -8809,10 +8818,11 @@ function $ede6c70ecdca46fe$export$f7d2f673fc2f091d(_ref) {
8809
8818
  merchant: merchant_(),
8810
8819
  market: market_(),
8811
8820
  locale: backend_locale_(),
8812
- listing_id: listing_id_()
8821
+ id_to_query_for_: id_to_query_for_(),
8822
+ id_type_: id_type_()
8813
8823
  }));
8814
8824
  // Make "Get Listing" request to get quicklinks, breadcrumbs, title, etc
8815
- const [plp_meta] = $52FdA$solidjs.createResource(meta_query_base, $52FdA$depictaiutilishared.catchify(query => depict_api_.get_listing(query)));
8825
+ const [plp_meta] = $52FdA$solidjs.createResource(meta_query_base, $52FdA$depictaiutilisharedlatest.catchify(query => depict_api_.get_listing(query)));
8816
8826
  const available_sortings_ = $52FdA$solidjs.createMemo(() => {
8817
8827
  var _plp_products_, _plp_products_$sorts;
8818
8828
  return (_plp_products_ = plp_products_()) === null || _plp_products_ === void 0 ? void 0 : (_plp_products_$sorts = _plp_products_.sorts) === null || _plp_products_$sorts === void 0 ? void 0 : _plp_products_$sorts.map(sort => {
@@ -8836,17 +8846,6 @@ function $ede6c70ecdca46fe$export$f7d2f673fc2f091d(_ref) {
8836
8846
  var _plp_meta2;
8837
8847
  return (_plp_meta2 = plp_meta()) === null || _plp_meta2 === void 0 ? void 0 : _plp_meta2.quick_links;
8838
8848
  });
8839
- const meta_tag_data_ = $52FdA$solidjs.createMemo(() => {
8840
- var _plp_meta3;
8841
- if ((_plp_meta3 = plp_meta()) !== null && _plp_meta3 !== void 0 && _plp_meta3.replace_meta_tags) {
8842
- var _plp_meta4, _plp_meta5;
8843
- return {
8844
- title: ((_plp_meta4 = plp_meta()) === null || _plp_meta4 === void 0 ? void 0 : _plp_meta4.title) + (meta_title_suffix_() || ""),
8845
- description: (_plp_meta5 = plp_meta()) === null || _plp_meta5 === void 0 ? void 0 : _plp_meta5.description
8846
- };
8847
- }
8848
- });
8849
- $52FdA$depictaiutilishared.edit_current_page_meta_tags(meta_tag_data_);
8850
8849
  const [sort_or_filter_open_, set_sort_or_filter_open_] = $52FdA$solidjs.createSignal(false);
8851
8850
  const [desktop_filter_elements_, set_desktop_filter_elements] = $52FdA$solidjs.createSignal();
8852
8851
  const formatted_number_of_results_ = $068bde7fa83ac02c$export$92f2da32c6e7e7ee({
@@ -8920,7 +8919,7 @@ function $ede6c70ecdca46fe$export$f7d2f673fc2f091d(_ref) {
8920
8919
  }));
8921
8920
  results_for = make_product_count_();
8922
8921
  } else {
8923
- $52FdA$depictaiutilishared.report(new Error("Unrecognised category_title_type, UI will look messed up"), "error");
8922
+ $52FdA$depictaiutilisharedlatest.report(new Error("Unrecognised category_title_type, UI will look messed up"), "error");
8924
8923
  results_for = $52FdA$solidjsweb.getNextElement($ede6c70ecdca46fe$var$_tmpl$2);
8925
8924
  }
8926
8925
  const filters_opener = $f70cc6dfcadf0fd5$export$d7841e452f2e59a8({
@@ -8942,17 +8941,17 @@ function $ede6c70ecdca46fe$export$f7d2f673fc2f091d(_ref) {
8942
8941
  number_of_rendered_selected_filters_items_: number_of_rendered_selected_filters_items_,
8943
8942
  ...extra_sort_and_filter_args_
8944
8943
  });
8945
- $52FdA$depictaiutilishared.catchify((0, $fef4890f1f8e0544$export$6e49da55e449af7c))({
8944
+ $52FdA$depictaiutilisharedlatest.catchify((0, $fef4890f1f8e0544$export$6e49da55e449af7c))({
8946
8945
  scroll_restoration_data_: scroll_restoration_data_,
8947
8946
  last_result_in_viewport_: last_result_in_viewport_,
8948
- id_: listing_id_,
8947
+ id_: id_to_query_for_,
8949
8948
  can_write_scroll_restoration_: can_write_scroll_restoration_
8950
8949
  });
8951
8950
  (_on_filters_construct = on_filters_constructed_) === null || _on_filters_construct === void 0 || _on_filters_construct();
8952
8951
  $52FdA$solidjs.createComputed(() => {
8953
8952
  if (plp_products_.loading) set_can_write_scroll_restoration(false);else if (plp_products_()) set_can_write_scroll_restoration(true);
8954
8953
  });
8955
- $52FdA$solidjs.createRenderEffect($52FdA$depictaiutilishared.catchify(async () => {
8954
+ $52FdA$solidjs.createRenderEffect($52FdA$depictaiutilisharedlatest.catchify(async () => {
8956
8955
  var _only_show_filters_op;
8957
8956
  const slim = is_slim_();
8958
8957
  const only_show_filters_opener = (_only_show_filters_op = only_show_filters_opener_) === null || _only_show_filters_op === void 0 ? void 0 : _only_show_filters_op();
@@ -8975,14 +8974,15 @@ function $ede6c70ecdca46fe$export$f7d2f673fc2f091d(_ref) {
8975
8974
  available_filters_: available_filters_
8976
8975
  });
8977
8976
  $8b366fdb0c76194d$export$3945d6db2dfd3d12({
8978
- listing_id_: listing_id_,
8977
+ id_to_query_for_: id_to_query_for_,
8979
8978
  crumb_data_: crumb_data_,
8980
8979
  i18n_: i18n_,
8981
8980
  selected_filters_: selected_filters_,
8982
8981
  local_filter_cache_: local_filter_cache_,
8983
8982
  expanded_hierarchical_filters_: expanded_hierarchical_filters_,
8984
8983
  plp_results_: plp_products_,
8985
- sideways_filter_clearing_flag_: sideways_filter_clearing_flag_
8984
+ sideways_filter_clearing_flag_: sideways_filter_clearing_flag_,
8985
+ id_type_: id_type_
8986
8986
  });
8987
8987
  get_breadcrumb_accessor_ === null || get_breadcrumb_accessor_ === void 0 || get_breadcrumb_accessor_(crumb_data_);
8988
8988
  get_quicklinks_accessor_ === null || get_quicklinks_accessor_ === void 0 || get_quicklinks_accessor_(quicklinks_data_);
@@ -9005,7 +9005,7 @@ function $ede6c70ecdca46fe$export$f7d2f673fc2f091d(_ref) {
9005
9005
  [_el$28, _co$11] = $52FdA$solidjsweb.getNextMarker(_el$27.nextSibling),
9006
9006
  _el$29 = _el$28.nextSibling,
9007
9007
  [_el$30, _co$12] = $52FdA$solidjsweb.getNextMarker(_el$29.nextSibling);
9008
- $52FdA$solidjsweb.use(el => process.env.NODE_ENV === "development" && $c3a7faae6f2b93c9$export$7af06a63c5a976c9(el, listing_id_, i18n_), _el$13);
9008
+ $52FdA$solidjsweb.use(el => process.env.NODE_ENV === "development" && $c3a7faae6f2b93c9$export$7af06a63c5a976c9(el, id_to_query_for_, i18n_), _el$13);
9009
9009
  $52FdA$solidjsweb.insert(_el$14, $52FdA$solidjsweb.createComponent((0, $52FdA$solidjs.Show), {
9010
9010
  get when() {
9011
9011
  return show_breadcrumbs_();
@@ -9027,7 +9027,8 @@ function $ede6c70ecdca46fe$export$f7d2f673fc2f091d(_ref) {
9027
9027
  get children() {
9028
9028
  return $52FdA$solidjsweb.createComponent((0, $21a004c2e7bd4c16$export$466cdc317043f6cb), {
9029
9029
  quicklinks_data_: quicklinks_data_,
9030
- current_listing_id_: listing_id_,
9030
+ id_to_query_for_: id_to_query_for_,
9031
+ id_type_: id_type_,
9031
9032
  router_: router_,
9032
9033
  breadcrumb_data_: crumb_data_,
9033
9034
  i18n_: i18n_,
@@ -9082,7 +9083,7 @@ function $ede6c70ecdca46fe$export$f7d2f673fc2f091d(_ref) {
9082
9083
  sort_or_filter_open_: sort_or_filter_open_,
9083
9084
  desktop_filter_elements_: desktop_filter_elements_,
9084
9085
  content_blocks_by_row_: content_blocks_by_row_,
9085
- id_currently_querying_for_: listing_id_,
9086
+ id_currently_querying_for_: id_to_query_for_,
9086
9087
  no_results_options_: {
9087
9088
  selected_filters_: selected_filters_,
9088
9089
  expanded_hierarchical_filters_: expanded_hierarchical_filters_,
@@ -9131,10 +9132,10 @@ function $ede6c70ecdca46fe$export$f7d2f673fc2f091d(_ref) {
9131
9132
  * Adds the current page as last breadcrumb to the breadcrumb trail
9132
9133
  */
9133
9134
  function $ede6c70ecdca46fe$var$add_us_to_crumbs(plp_meta, title) {
9134
- const href_accessor = $52FdA$depictaiutilishared.use_href_accessor();
9135
+ const href_accessor = $52FdA$depictaiutilisharedlatest.use_href_accessor();
9135
9136
  return $52FdA$solidjs.createMemo(() => {
9136
- var _plp_meta6;
9137
- const api_value = (_plp_meta6 = plp_meta()) === null || _plp_meta6 === void 0 ? void 0 : _plp_meta6.breadcrumbs;
9137
+ var _plp_meta3;
9138
+ const api_value = (_plp_meta3 = plp_meta()) === null || _plp_meta3 === void 0 ? void 0 : _plp_meta3.breadcrumbs;
9138
9139
  if (!api_value) return api_value;
9139
9140
  return [...api_value, {
9140
9141
  get listing_id() {
@@ -9148,6 +9149,12 @@ function $ede6c70ecdca46fe$var$add_us_to_crumbs(plp_meta, title) {
9148
9149
  },
9149
9150
  get slug() {
9150
9151
  return plp_meta().slug;
9152
+ },
9153
+ get listing_type() {
9154
+ return plp_meta().listing_type;
9155
+ },
9156
+ get external_id() {
9157
+ return plp_meta().external_id;
9151
9158
  }
9152
9159
  }];
9153
9160
  });
@@ -9357,8 +9364,7 @@ var $9cbefc32b9dab36d$var$_router = /*#__PURE__*/new WeakMap();
9357
9364
  var $9cbefc32b9dab36d$var$_localization_signal = /*#__PURE__*/new WeakMap();
9358
9365
  var $9cbefc32b9dab36d$var$_merchant_signal = /*#__PURE__*/new WeakMap();
9359
9366
  var $9cbefc32b9dab36d$var$_market_signal = /*#__PURE__*/new WeakMap();
9360
- var $9cbefc32b9dab36d$var$_listing_id_signal = /*#__PURE__*/new WeakMap();
9361
- var $9cbefc32b9dab36d$var$_meta_title_suffix_ = /*#__PURE__*/new WeakMap();
9367
+ var $9cbefc32b9dab36d$var$_listing_query_signal = /*#__PURE__*/new WeakMap();
9362
9368
  var $9cbefc32b9dab36d$var$_disable_override_listing_id = /*#__PURE__*/new WeakMap();
9363
9369
  class $9cbefc32b9dab36d$export$f34314aa9505732e {
9364
9370
  get localization() {
@@ -9368,11 +9374,11 @@ class $9cbefc32b9dab36d$export$f34314aa9505732e {
9368
9374
  set localization(locale_obj) {
9369
9375
  $parcel$interopDefault($52FdA$babelruntimehelpersclassPrivateFieldGet)(this, $9cbefc32b9dab36d$var$_localization_signal)[1](locale_obj);
9370
9376
  }
9371
- get listing_id() {
9372
- return $parcel$interopDefault($52FdA$babelruntimehelpersclassPrivateFieldGet)(this, $9cbefc32b9dab36d$var$_listing_id_signal)[0]();
9377
+ get listing_query() {
9378
+ return $parcel$interopDefault($52FdA$babelruntimehelpersclassPrivateFieldGet)(this, $9cbefc32b9dab36d$var$_listing_query_signal)[0]();
9373
9379
  }
9374
- set listing_id(id) {
9375
- $parcel$interopDefault($52FdA$babelruntimehelpersclassPrivateFieldGet)(this, $9cbefc32b9dab36d$var$_listing_id_signal)[1](id);
9380
+ set listing_query(query) {
9381
+ $parcel$interopDefault($52FdA$babelruntimehelpersclassPrivateFieldGet)(this, $9cbefc32b9dab36d$var$_listing_query_signal)[1](query);
9376
9382
  }
9377
9383
  get merchant() {
9378
9384
  return $parcel$interopDefault($52FdA$babelruntimehelpersclassPrivateFieldGet)(this, $9cbefc32b9dab36d$var$_merchant_signal)[0]();
@@ -9386,12 +9392,6 @@ class $9cbefc32b9dab36d$export$f34314aa9505732e {
9386
9392
  set market(market) {
9387
9393
  $parcel$interopDefault($52FdA$babelruntimehelpersclassPrivateFieldGet)(this, $9cbefc32b9dab36d$var$_market_signal)[1](market);
9388
9394
  }
9389
- get meta_title_suffix() {
9390
- return $parcel$interopDefault($52FdA$babelruntimehelpersclassPrivateFieldGet)(this, $9cbefc32b9dab36d$var$_meta_title_suffix_)[0]();
9391
- }
9392
- set meta_title_suffix(new_suffix) {
9393
- $parcel$interopDefault($52FdA$babelruntimehelpersclassPrivateFieldGet)(this, $9cbefc32b9dab36d$var$_meta_title_suffix_)[1](new_suffix);
9394
- }
9395
9395
  get disable_override_listing_id() {
9396
9396
  return $parcel$interopDefault($52FdA$babelruntimehelpersclassPrivateFieldGet)(this, $9cbefc32b9dab36d$var$_disable_override_listing_id)[0]();
9397
9397
  }
@@ -9411,7 +9411,7 @@ class $9cbefc32b9dab36d$export$f34314aa9505732e {
9411
9411
  on_navigation: on_navigation,
9412
9412
  display_transformers: display_transformers,
9413
9413
  unique_instance_key_for_state = "",
9414
- listing_id_state_key: listing_id_state_key,
9414
+ listing_query_state_key: listing_query_state_key,
9415
9415
  ...props_on_class
9416
9416
  } = _ref2;
9417
9417
  $9cbefc32b9dab36d$var$_classPrivateFieldInitSpec(this, $9cbefc32b9dab36d$var$_router, {
@@ -9430,13 +9430,9 @@ class $9cbefc32b9dab36d$export$f34314aa9505732e {
9430
9430
  writable: true,
9431
9431
  value: $52FdA$solidjs.createSignal()
9432
9432
  });
9433
- $9cbefc32b9dab36d$var$_classPrivateFieldInitSpec(this, $9cbefc32b9dab36d$var$_listing_id_signal, {
9433
+ $9cbefc32b9dab36d$var$_classPrivateFieldInitSpec(this, $9cbefc32b9dab36d$var$_listing_query_signal, {
9434
9434
  writable: true,
9435
- value: $52FdA$solidjs.createSignal("")
9436
- });
9437
- $9cbefc32b9dab36d$var$_classPrivateFieldInitSpec(this, $9cbefc32b9dab36d$var$_meta_title_suffix_, {
9438
- writable: true,
9439
- value: $52FdA$solidjs.createSignal()
9435
+ value: $52FdA$solidjs.createSignal({})
9440
9436
  });
9441
9437
  $9cbefc32b9dab36d$var$_classPrivateFieldInitSpec(this, $9cbefc32b9dab36d$var$_disable_override_listing_id, {
9442
9438
  writable: true,
@@ -9449,7 +9445,7 @@ class $9cbefc32b9dab36d$export$f34314aa9505732e {
9449
9445
  throw new Error("You can only have one instance of DepictCategory with the same uniqueInstanceKeyForState");
9450
9446
  Object.assign(this, props_on_class); // set initial signal values
9451
9447
  $cfcd56242923775d$export$5162a71f252e6122();
9452
- $parcel$interopDefault($52FdA$babelruntimehelpersclassPrivateFieldSet)(this, $9cbefc32b9dab36d$var$_router, new (0, $73014ff36186a4dd$export$7e1297a3a19f10d8)("hard_navigation", listing_id_state_key));
9448
+ $parcel$interopDefault($52FdA$babelruntimehelpersclassPrivateFieldSet)(this, $9cbefc32b9dab36d$var$_router, new (0, $73014ff36186a4dd$export$7e1297a3a19f10d8)("hard_navigation", listing_query_state_key));
9453
9449
  if (on_navigation) $parcel$interopDefault($52FdA$babelruntimehelpersclassPrivateFieldGet)(this, $9cbefc32b9dab36d$var$_router).on_navigation_ = on_navigation;
9454
9450
  const override_listing_id_query_param_names_ = ["listing_id_" + unique_instance_key_for_state, "listing_id"]; // If you're wondering why this is an array https://gitlab.com/depict-ai/depict.ai/-/merge_requests/7958#note_1511700842
9455
9451
  const sorting_query_param_ = "sorting" + unique_instance_key_for_state;
@@ -9518,14 +9514,16 @@ function $9cbefc32b9dab36d$export$e2bf8ce7779e827e(props) {
9518
9514
  category_title: category_title
9519
9515
  } = props;
9520
9516
  const shared_properties = $9cbefc32b9dab36d$var$get_shared_properties(depict_category);
9517
+ const diffableListingQuery = $52FdA$solidjs.createMemo(() => Object.values(depict_category.listing_query).join(""));
9521
9518
  return $d05611ff6b8c8357$export$23fca46f3143581f(() => {
9522
9519
  $52FdA$solidjs.createEffect(prev => {
9523
9520
  // this is here (and not on DepictCategory) so that people also know when PageReplacer removes the page, it's intended to help people replace their own content when a depict page is navigated, see https://depictaiworkspace.slack.com/archives/C04M8MGCF3K/p1691670636155369
9524
- const id = depict_category.listing_id; // <- this is a reactive getter
9525
- $bdea39a75c454f4f$export$f50b88e2a00918b5(props.on_listing_id_change)(id, prev);
9526
- return id;
9521
+ diffableListingQuery(); // Only re-run this effect when the listing query *actually* changes (not just the object reference)
9522
+ const newId = $52FdA$solidjs.untrack(() => depict_category.listing_query);
9523
+ $bdea39a75c454f4f$export$f50b88e2a00918b5(props.on_listing_query_change)(newId, prev);
9524
+ return newId;
9527
9525
  });
9528
- $52FdA$solidjs.onCleanup(() => $bdea39a75c454f4f$export$f50b88e2a00918b5(props.on_listing_id_change)());
9526
+ $52FdA$solidjs.onCleanup(() => $bdea39a75c454f4f$export$f50b88e2a00918b5(props.on_listing_query_change)());
9529
9527
  const grid_spacing_override = $52FdA$solidjs.createMemo(() => {
9530
9528
  const {
9531
9529
  grid_spacing: grid_spacing
@@ -9566,8 +9564,8 @@ function $9cbefc32b9dab36d$export$e2bf8ce7779e827e(props) {
9566
9564
  depict_api_: depict_api_,
9567
9565
  min_products_to_fetch_: $9cbefc32b9dab36d$var$min_products_to_fetch_,
9568
9566
  local_filter_cache_: local_filter_cache_,
9569
- listing_id_: $52FdA$solidjs.createMemo(() => !depict_category.disable_override_listing_id && override_listing_id_accessor_() || depict_category.listing_id),
9570
- meta_title_suffix_: () => depict_category.meta_title_suffix,
9567
+ id_to_query_for_: $52FdA$solidjs.createMemo(() => !depict_category.disable_override_listing_id && override_listing_id_accessor_() || depict_category.listing_query.id),
9568
+ id_type_: $52FdA$solidjs.createMemo(() => !depict_category.disable_override_listing_id && override_listing_id_accessor_() ? $c3739e86187f2054$export$74ee7529ce0f8a00 : depict_category.listing_query.type),
9571
9569
  i18n_: i18n_,
9572
9570
  show_quicklinks_: $52FdA$solidjs.createMemo(() => {
9573
9571
  var _props$show_quicklink;
@@ -9635,13 +9633,16 @@ function $9cbefc32b9dab36d$export$de035477d6fef996(_ref4) {
9635
9633
  sorting_query_param_: sorting_query_param_,
9636
9634
  filter_query_param_prefix_: filter_query_param_prefix_
9637
9635
  } = $9cbefc32b9dab36d$var$get_shared_properties(depict_category);
9636
+ const id_to_query_for_ = $52FdA$solidjs.createMemo(() => depict_category.listing_query.id);
9637
+ const id_type_ = $52FdA$solidjs.createMemo(() => depict_category.listing_query.type);
9638
9638
  return $52FdA$solidjsweb.createComponent($9cbefc32b9dab36d$var$InExternalAreaDiv, {
9639
9639
  get children() {
9640
9640
  return $21a004c2e7bd4c16$export$466cdc317043f6cb({
9641
9641
  i18n_: i18n_,
9642
9642
  quicklinks_data_: quicklinks_data_,
9643
9643
  router_: router_,
9644
- current_listing_id_: () => depict_category.listing_id,
9644
+ id_type_: id_type_,
9645
+ id_to_query_for_: id_to_query_for_,
9645
9646
  breadcrumb_data_: breadcrumb_data_,
9646
9647
  sorting_query_param_: sorting_query_param_,
9647
9648
  filter_query_param_prefix_: filter_query_param_prefix_
@@ -10827,7 +10828,7 @@ function $0677d509ad208e22$export$e872e2339fb04a7f(_ref) {
10827
10828
  const _el$3 = $52FdA$solidjsweb.getNextElement($0677d509ad208e22$var$_tmpl$3);
10828
10829
  $52FdA$solidjsweb.insert(_el$3, $52FdA$solidjs.createMemo(() => {
10829
10830
  if (input_obj().type === "content") return i18n_.content_();
10830
- if (input_obj().category_type === "brand") return i18n_.brand_();
10831
+ if (input_obj().listing_type === "brand") return i18n_.brand_();
10831
10832
  return i18n_.category_();
10832
10833
  }));
10833
10834
  return _el$3;
@@ -11096,7 +11097,7 @@ function $1a7b2e0cdf65293a$var$actual_navigation_working_on_fake_data(_ref2) {
11096
11097
  url.searchParams.set(search_query_param_name_, title);
11097
11098
  return $1730e5b4d47679a3$export$1efe1013da60d0e4(e, url.href);
11098
11099
  }));
11099
- } else if ((selected_entry === null || selected_entry === void 0 ? void 0 : selected_entry.type) == "category" || (selected_entry === null || selected_entry === void 0 ? void 0 : selected_entry.type) === "content") $52FdA$solidjs.runWithOwner(owner, () => override_on_enter_for_this_entry(e => {
11100
+ } else if ((selected_entry === null || selected_entry === void 0 ? void 0 : selected_entry.type) == "listing" || (selected_entry === null || selected_entry === void 0 ? void 0 : selected_entry.type) === "content") $52FdA$solidjs.runWithOwner(owner, () => override_on_enter_for_this_entry(e => {
11100
11101
  const {
11101
11102
  page_url: page_url
11102
11103
  } = selected_entry;
@@ -11648,7 +11649,7 @@ function $e3ac79dbd744c1c1$export$c05a196222ba1302(_ref) {
11648
11649
  } = _ref;
11649
11650
  const category_suggestions_ = $52FdA$solidjs.createMemo(() => {
11650
11651
  var _suggestions_;
11651
- return (_suggestions_ = suggestions_()) === null || _suggestions_ === void 0 ? void 0 : _suggestions_.suggestions.filter(s => s.type === "category");
11652
+ return (_suggestions_ = suggestions_()) === null || _suggestions_ === void 0 ? void 0 : _suggestions_.suggestions.filter(s => s.type === "listing");
11652
11653
  });
11653
11654
  return $52FdA$solidjsweb.createComponent((0, $52FdA$solidjs.Show), {
11654
11655
  get when() {