@depict-ai/ui 2.0.26 → 2.1.1

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.
@@ -1,14 +1,15 @@
1
1
  import { add_to_version_info as $b8hua$add_to_version_info, base64_encode_unicode as $b8hua$base64_encode_unicode, base64_decode_unicode as $b8hua$base64_decode_unicode, dlog as $b8hua$dlog, queueMacroTask as $b8hua$queueMacroTask, catchify as $b8hua$catchify, is_safari as $b8hua$is_safari, observer as $b8hua$observer, Amazing_Slider as $b8hua$Amazing_Slider, slider_snap_css as $b8hua$slider_snap_css, slider_fading_factory as $b8hua$slider_fading_factory, slider_fractional_factory as $b8hua$slider_fractional_factory, camelCasifyObject as $b8hua$camelCasifyObject, make_random_classname as $b8hua$make_random_classname, n_col_styling_with_dist as $b8hua$n_col_styling_with_dist, layout_get_visible_recs_without_partial_rows as $b8hua$layout_get_visible_recs_without_partial_rows, layout_get_total_rec_amount_for_row as $b8hua$layout_get_total_rec_amount_for_row, layout_media_query_header as $b8hua$layout_media_query_header, report as $b8hua$report, useExpandingContainer as $b8hua$useExpandingContainer, standard_price_format as $b8hua$standard_price_format, hex_to_rgb as $b8hua$hex_to_rgb, relative_luminance_from_rgb as $b8hua$relative_luminance_from_rgb, fetch_recs as $b8hua$fetch_recs, snakeCasifyObject as $b8hua$snakeCasifyObject, instant_exec_on_suspect_history_change as $b8hua$instant_exec_on_suspect_history_change, base_url as $b8hua$base_url, get_depict_id as $b8hua$get_depict_id, get_user_id as $b8hua$get_user_id, get_session_id as $b8hua$get_session_id, make_url_with_query_params as $b8hua$make_url_with_query_params, fetch_retry as $b8hua$fetch_retry, add_version_query_params as $b8hua$add_version_query_params, dwarn as $b8hua$dwarn, sort_obj as $b8hua$sort_obj, edit_current_page_meta_tags as $b8hua$edit_current_page_meta_tags, javascript_media_query as $b8hua$javascript_media_query, use_href_accessor as $b8hua$use_href_accessor, make_asyncIterable_exiter as $b8hua$make_asyncIterable_exiter, href_change_ipns as $b8hua$href_change_ipns, ContainedImage as $b8hua$ContainedImage, deparallelize_no_drop as $b8hua$deparallelize_no_drop, ListenableSet as $b8hua$ListenableSet, insert_surfaces as $b8hua$insert_surfaces } from "@depict-ai/utilishared/ES10";
2
- import { createComponent as $b8hua$createComponent, ssr as $b8hua$ssr, ssrHydrationKey as $b8hua$ssrHydrationKey, ssrStyle as $b8hua$ssrStyle, ssrElement as $b8hua$ssrElement, escape as $b8hua$escape, insert as $b8hua$insert, ssrAttribute as $b8hua$ssrAttribute, mergeProps as $b8hua$mergeProps, isServer as $b8hua$isServer, ssrClassList as $b8hua$ssrClassList, Dynamic as $b8hua$Dynamic } from "solid-js/web";
3
- import { createSignal as $b8hua$createSignal, getOwner as $b8hua$getOwner, createEffect as $b8hua$createEffect, runWithOwner as $b8hua$runWithOwner, onCleanup as $b8hua$onCleanup, createMemo as $b8hua$createMemo, createContext as $b8hua$createContext, useContext as $b8hua$useContext, createResource as $b8hua$createResource, Suspense as $b8hua$Suspense, Show as $b8hua$Show, createRenderEffect as $b8hua$createRenderEffect, createRoot as $b8hua$createRoot, For as $b8hua$For, createUniqueId as $b8hua$createUniqueId, untrack as $b8hua$untrack, createComputed as $b8hua$createComputed, ErrorBoundary as $b8hua$ErrorBoundary, Index as $b8hua$Index, on as $b8hua$on, batch as $b8hua$batch, createReaction as $b8hua$createReaction } from "solid-js";
2
+ import { createComponent as $b8hua$createComponent, ssr as $b8hua$ssr, ssrHydrationKey as $b8hua$ssrHydrationKey, ssrStyle as $b8hua$ssrStyle, ssrElement as $b8hua$ssrElement, mergeProps as $b8hua$mergeProps, escape as $b8hua$escape, insert as $b8hua$insert, ssrAttribute as $b8hua$ssrAttribute, isServer as $b8hua$isServer, ssrClassList as $b8hua$ssrClassList, Dynamic as $b8hua$Dynamic } from "solid-js/web";
3
+ import { createSignal as $b8hua$createSignal, getOwner as $b8hua$getOwner, createEffect as $b8hua$createEffect, runWithOwner as $b8hua$runWithOwner, onCleanup as $b8hua$onCleanup, createMemo as $b8hua$createMemo, createContext as $b8hua$createContext, useContext as $b8hua$useContext, createResource as $b8hua$createResource, Suspense as $b8hua$Suspense, Show as $b8hua$Show, untrack as $b8hua$untrack, createRenderEffect as $b8hua$createRenderEffect, Index as $b8hua$Index, createRoot as $b8hua$createRoot, For as $b8hua$For, createUniqueId as $b8hua$createUniqueId, createComputed as $b8hua$createComputed, ErrorBoundary as $b8hua$ErrorBoundary, on as $b8hua$on, batch as $b8hua$batch, createReaction as $b8hua$createReaction, mapArray as $b8hua$mapArray, mergeProps as $b8hua$mergeProps1 } from "solid-js";
4
4
  import $b8hua$babelruntimehelpersclassPrivateFieldSet from "@babel/runtime/helpers/classPrivateFieldSet";
5
5
  import $b8hua$babelruntimehelpersclassPrivateFieldGet from "@babel/runtime/helpers/classPrivateFieldGet";
6
6
  import $b8hua$babelruntimehelpersdefineProperty from "@babel/runtime/helpers/defineProperty";
7
+ import { createStore as $b8hua$createStore, reconcile as $b8hua$reconcile } from "solid-js/store";
7
8
 
8
9
  /*! Depict.ai search and product listing SDK */
9
10
  import { register_es_version } from "../../multi_import_deduplicator.mjs";
10
11
  register_es_version("ui", "ES10");
11
- const $8db9a15135765c11$export$83d89fbfd8236492 = "2.0.26";
12
+ const $8db9a15135765c11$export$83d89fbfd8236492 = "2.1.1";
12
13
  const $2855bffe06ef7a03$var$fallback_operator = "in";
13
14
  const $2855bffe06ef7a03$var$fallback_token = "";
14
15
  const $2855bffe06ef7a03$var$legacy_filter_prefix = "filter_";
@@ -253,10 +254,10 @@ function $56047603f9d212b6$export$6e5611bc7e57e477(props) {
253
254
  srcset: srcset
254
255
  };
255
256
  });
256
- return $b8hua$ssrElement("img", () => ({
257
- ...otherOptions,
258
- ...src_options(),
259
- "sizes": props.size() + "px"
257
+ return $b8hua$ssrElement("img", $b8hua$mergeProps(otherOptions, src_options, {
258
+ get sizes() {
259
+ return props.size() + "px";
260
+ }
260
261
  }), undefined, true);
261
262
  }
262
263
  function $56047603f9d212b6$var$make_srcset(url, resolutions) {
@@ -414,7 +415,7 @@ const $a9c7ba6087881ac2$export$6daf8749b65a1b77 = cols_at_size => {
414
415
  return $a9c7ba6087881ac2$var$transform_elements(sorted_cols_at_size);
415
416
  };
416
417
  function $ca55612a53dbbdd2$export$a2cc176055f8f08() {
417
- const text = "Please try setting `columnsAtSize` on the `SearchPage`/`CategoryPage` components to change the grid before setting it with CSS. If you do with CSS, set `columnsAtSize` to an empty array to ensure no declarations created by the SDK leak through.";
418
+ const text = "Please try setting `columnsAtSize`/`gridSpacing` on the `SearchPage`/`CategoryPage` components to change the grid before setting it with CSS. If you do with CSS, set `columnsAtSize` to an empty array to ensure no declarations created by the SDK leak through.";
418
419
  return (0, $b8hua$isServer) ? {
419
420
  t: "<!-- ".concat(text, " -->")
420
421
  } : document.createComment(text);
@@ -436,12 +437,13 @@ let $bdd80c7862246dc2$var$rendering_cached_placeholder_element;
436
437
  function $bdd80c7862246dc2$export$f33414a4df0afd3f(_ref) {
437
438
  let {
438
439
  product_card_template_: product_card_template_,
439
- num_placeholders_: num_placeholders_
440
+ num_placeholders_: num_placeholders_,
441
+ content_blocks_: content_blocks_
440
442
  } = _ref;
441
- const [get_elements, set_elements] = $b8hua$createSignal([]);
442
- let existing_num = 0;
443
+ const [num_to_actually_show, set_num_to_actually_show] = $b8hua$createSignal($b8hua$untrack(num_placeholders_));
443
444
  if (0, $b8hua$isServer)
444
445
  // want to render simple placeholders on server, effects don't run there
446
+ // FIXME when adding proper SSR: also SSR content blocks
445
447
  return $b8hua$createMemo(() => Array.from({
446
448
  length: num_placeholders_()
447
449
  }).map(() => {
@@ -450,19 +452,33 @@ function $bdd80c7862246dc2$export$f33414a4df0afd3f(_ref) {
450
452
  if (typeof (template_result === null || template_result === void 0 ? void 0 : template_result.then) !== "function") return template_result;
451
453
  }));
452
454
  $b8hua$createRenderEffect(() => {
455
+ const existing_num = num_to_actually_show();
453
456
  const to_add = num_placeholders_() - existing_num;
454
457
  if (to_add <= 0) return;
455
458
  // Below comment is from when we used recommendation renderer and manual DOM manipulation for this, but I'm still scared to remove placeholders and mess up scroll restoration, so I'm keeping the way it worked. Otherwise, <Index> could be used which would be far more elegant.
456
459
  // We don't need to remove placeholders, only need to add. The reason for that is that chrome restores the scroll position once all tasks queued as reaction of the "popstate" events have been completed in the task queue. That means that we need to get the placeholders in fast, or we might lose scroll position if the previous site was shorter.
457
460
  // The query id and the amount might update in separate tasks because one comes from href_change_ipns and the other one from another "popstate" listener. Therefore, we need to be able to dynamically add more placeholders. I'm not entirely sure about this anymore though, since we have the scroll position on a per-id basis it might work anyway but THIS WORKS, and I've been working on this bug for 3 hours so let's just keep it this way.
458
- set_elements(prev => [...prev, ...Array.from({
459
- length: to_add
460
- }).map(() => $bdd80c7862246dc2$var$Placeholder({
461
- product_card_template_: product_card_template_
462
- }))]);
463
- existing_num += to_add;
461
+ // Above comments were from when we added elements in this createRenderEffect. Now I changed it to just increment the number and render them from an <Index> instead, so I can add content blocks better
462
+ // Functionality should be the same
463
+ set_num_to_actually_show(existing_num + to_add);
464
+ });
465
+ return $b8hua$createComponent((0, $b8hua$Index), {
466
+ get each() {
467
+ return Array.from({
468
+ length: num_to_actually_show()
469
+ });
470
+ },
471
+ children: (_item, index) => {
472
+ const possible_content_block = $b8hua$createMemo(() => {
473
+ var _content_blocks_, _content_blocks_2;
474
+ return content_blocks_ === null || content_blocks_ === void 0 ? void 0 : (_content_blocks_ = content_blocks_()) === null || _content_blocks_ === void 0 ? void 0 : (_content_blocks_2 = _content_blocks_()) === null || _content_blocks_2 === void 0 ? void 0 : _content_blocks_2[index];
475
+ });
476
+ // Show content block before product card, so it's *at* that index
477
+ return [possible_content_block, $bdd80c7862246dc2$var$Placeholder({
478
+ product_card_template_: product_card_template_
479
+ })]; // https://github.com/solidjs/solid/releases/tag/v1.7.0
480
+ }
464
481
  });
465
- return get_elements; // https://github.com/solidjs/solid/releases/tag/v1.7.0
466
482
  }
467
483
  /**
468
484
  * Get one placeholder element. It will be cloned for each placeholder for ultimate performance even when solid-js isn't rendering the placeholders.
@@ -553,7 +569,8 @@ function $2d7bad8684bc7f44$export$43f0fb951fcb0c54(_ref) {
553
569
  merchant_: merchant_,
554
570
  market_: market_,
555
571
  product_card_template_: product_card_template_,
556
- do_per_elements_: do_per_elements_
572
+ do_per_elements_: do_per_elements_,
573
+ content_blocks_: content_blocks_
557
574
  } = _ref;
558
575
  return $b8hua$createComponent((0, $b8hua$For), {
559
576
  get each() {
@@ -561,6 +578,10 @@ function $2d7bad8684bc7f44$export$43f0fb951fcb0c54(_ref) {
561
578
  },
562
579
  children: (product_id, index) => {
563
580
  const owner = $b8hua$getOwner();
581
+ const possible_content_block = $b8hua$createMemo(() => {
582
+ var _content_blocks_, _content_blocks_2;
583
+ return content_blocks_ === null || content_blocks_ === void 0 ? void 0 : (_content_blocks_ = content_blocks_()) === null || _content_blocks_ === void 0 ? void 0 : (_content_blocks_2 = _content_blocks_()) === null || _content_blocks_2 === void 0 ? void 0 : _content_blocks_2[index()];
584
+ });
564
585
  const display_accessor = $b8hua$createMemo(prev => {
565
586
  const new_display = displays_by_key_().get(product_id);
566
587
  if (prev && $2d7bad8684bc7f44$var$deep_equal(prev, new_display))
@@ -614,7 +635,9 @@ function $2d7bad8684bc7f44$export$43f0fb951fcb0c54(_ref) {
614
635
  }
615
636
  do_per_elements_ === null || do_per_elements_ === void 0 || do_per_elements_(elements, index);
616
637
  });
617
- return product_card_resource; // https://github.com/solidjs/solid/releases/tag/v1.7.0
638
+ return [
639
+ // Show content block before product card, so it's *at* that index
640
+ possible_content_block, product_card_resource]; // https://github.com/solidjs/solid/releases/tag/v1.7.0
618
641
  }
619
642
  });
620
643
  }
@@ -677,9 +700,8 @@ const $63f1f8dbcd07d3b0$var$_tmpl$ = ["<div", ' class="', '">', "</div>"],
677
700
  $63f1f8dbcd07d3b0$var$_tmpl$2 = ["<style", ' type="text/css">', "</style>"];
678
701
  function $63f1f8dbcd07d3b0$export$d21e32dfedac04be(props) {
679
702
  const container_class = "x" + $b8hua$createUniqueId();
680
- const container_element_ = $b8hua$ssrElement("div", () => ({
681
- ...props.element_attributes,
682
- "classList": {
703
+ const container_element_ = $b8hua$ssrElement("div", $b8hua$mergeProps(() => props.element_attributes, {
704
+ classList: {
683
705
  [container_class]: true
684
706
  }
685
707
  }), () => $b8hua$escape(props.children), true); // Don't want this in the error boundary below, it should only be for the actual layouting
@@ -919,7 +941,7 @@ function $d5d7e58c5c9d8db0$export$9574e176201e5e8d(props) {
919
941
  })));
920
942
  }, "RecommendationSlider failed");
921
943
  }
922
- const $e3efeb558d952696$var$_tmpl$ = ["<div", ' class="recommendation-grid"><!--#-->', "<!--/--><!--#-->", "<!--/--></div>"];
944
+ const $e3efeb558d952696$var$_tmpl$ = ["<div", ' class="recommendation-grid"><!--$-->', "<!--/--><!--$-->", "<!--/--></div>"];
923
945
  function $e3efeb558d952696$export$7da560f849543dff(_ref) {
924
946
  let {
925
947
  recommendations_resource_: recommendations_resource_,
@@ -1149,12 +1171,11 @@ function $60ec7a29849d81db$export$a71e92cfbb498adc(props) {
1149
1171
  const $9783d437ad61594c$var$_tmpl$ = '<path d="M11.669 10.531l9.156-9.156a.78.78 0 0 0 .237-.569c0-.221-.079-.412-.237-.569A.8.8 0 0 0 20.24 0a.77.77 0 0 0-.569.237l-9.14 9.14-9.14-9.14A.79.79 0 0 0 .807 0a.77.77 0 0 0-.569.237A.78.78 0 0 0 0 .807a.77.77 0 0 0 .237.569l9.156 9.156-9.156 9.14c-.159.157-.237.349-.237.569s.079.412.237.569c.085.085.174.148.268.19a1.095 1.095 0 0 0 .316.048.894.894 0 0 0 .285-.048.84.84 0 0 0 .285-.19l9.139-9.14 9.14 9.14a.894.894 0 0 0 .268.19 1.049 1.049 0 0 0 .301.048.941.941 0 0 0 .301-.048.84.84 0 0 0 .285-.19.78.78 0 0 0 .237-.569c0-.221-.079-.412-.237-.569z"></path>';
1150
1172
  function $9783d437ad61594c$export$3b621d86b1566b2() {
1151
1173
  let props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
1152
- return $b8hua$ssrElement("svg", () => ({
1153
- ...props,
1154
- "xmlns": "http://www.w3.org/2000/svg",
1155
- "width": "21.064",
1156
- "height": "21.047",
1157
- "viewBox": "0 0 21.064 21.064"
1174
+ return $b8hua$ssrElement("svg", $b8hua$mergeProps(props, {
1175
+ xmlns: "http://www.w3.org/2000/svg",
1176
+ width: "21.064",
1177
+ height: "21.047",
1178
+ viewBox: "0 0 21.064 21.064"
1158
1179
  }), () => $b8hua$ssr($9783d437ad61594c$var$_tmpl$), true);
1159
1180
  }
1160
1181
 
@@ -1166,9 +1187,9 @@ function $af5d8e0b7d97a7f6$export$325f75597868c4f0(stuff) {
1166
1187
  return stuff.toLowerCase();
1167
1188
  }
1168
1189
  const $4711a82d08d2021b$var$_tmpl$ = ["<button", ' class="clear-all-filters minor">', "</button>"],
1169
- $4711a82d08d2021b$var$_tmpl$2 = ["<div", ' class="inner"><span class="title"><!--#-->', "<!--/-->: </span><!--#-->", "<!--/--></div>"],
1170
- $4711a82d08d2021b$var$_tmpl$3 = ["<button", ' class="clear-filter major"><!--#-->', "<!--/--><span><!--#-->", "<!--/--><!--#-->", "<!--/--><!--#-->", "<!--/--> – <!--#-->", "<!--/--><!--#-->", "<!--/--><!--#-->", "<!--/--></span></button>"],
1171
- $4711a82d08d2021b$var$_tmpl$4 = ["<button", ' class="clear-filter major"><!--#-->', "<!--/--><span>", "</span></button>"];
1190
+ $4711a82d08d2021b$var$_tmpl$2 = ["<div", ' class="inner"><span class="title"><!--$-->', "<!--/-->: </span><!--$-->", "<!--/--></div>"],
1191
+ $4711a82d08d2021b$var$_tmpl$3 = ["<button", ' class="clear-filter major"><!--$-->', "<!--/--><span><!--$-->", "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--> – <!--$-->", "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--></span></button>"],
1192
+ $4711a82d08d2021b$var$_tmpl$4 = ["<button", ' class="clear-filter major"><!--$-->', "<!--/--><span>", "</span></button>"];
1172
1193
  function $4711a82d08d2021b$export$fecbb157621501bd(_ref) {
1173
1194
  let {
1174
1195
  number_of_rendered_selected_filters_items_: number_of_rendered_selected_filters_items_,
@@ -1276,25 +1297,23 @@ function $4711a82d08d2021b$export$fecbb157621501bd(_ref) {
1276
1297
  return ((_matching_filter2 = matching_filter()) === null || _matching_filter2 === void 0 ? void 0 : _matching_filter2.op) !== "inrange";
1277
1298
  },
1278
1299
  get fallback() {
1279
- return (() => {
1280
- number_of_rendered_selected_filters_items_[1](prev => prev + 1);
1281
- $b8hua$onCleanup(() => number_of_rendered_selected_filters_items_[1](prev => prev - 1));
1282
- return $b8hua$ssr($4711a82d08d2021b$var$_tmpl$3, $b8hua$ssrHydrationKey(), $b8hua$escape($b8hua$createComponent((0, $9783d437ad61594c$export$3b621d86b1566b2), {})), $b8hua$escape(price_formatting_().pre_), $b8hua$escape($b8hua$createComponent((0, $60ec7a29849d81db$export$a71e92cfbb498adc), {
1283
- get price_() {
1284
- return filter().data[0];
1285
- },
1286
- get price_formatting_() {
1287
- return price_formatting_();
1288
- }
1289
- })), $b8hua$escape(price_formatting_().post_), $b8hua$escape(price_formatting_().pre_), $b8hua$escape($b8hua$createComponent((0, $60ec7a29849d81db$export$a71e92cfbb498adc), {
1290
- get price_() {
1291
- return filter().data[1];
1292
- },
1293
- get price_formatting_() {
1294
- return price_formatting_();
1295
- }
1296
- })), $b8hua$escape(price_formatting_().post_));
1297
- })();
1300
+ number_of_rendered_selected_filters_items_[1](prev => prev + 1);
1301
+ $b8hua$onCleanup(() => number_of_rendered_selected_filters_items_[1](prev => prev - 1));
1302
+ return $b8hua$ssr($4711a82d08d2021b$var$_tmpl$3, $b8hua$ssrHydrationKey(), $b8hua$escape($b8hua$createComponent((0, $9783d437ad61594c$export$3b621d86b1566b2), {})), $b8hua$escape(price_formatting_().pre_), $b8hua$escape($b8hua$createComponent((0, $60ec7a29849d81db$export$a71e92cfbb498adc), {
1303
+ get price_() {
1304
+ return filter().data[0];
1305
+ },
1306
+ get price_formatting_() {
1307
+ return price_formatting_();
1308
+ }
1309
+ })), $b8hua$escape(price_formatting_().post_), $b8hua$escape(price_formatting_().pre_), $b8hua$escape($b8hua$createComponent((0, $60ec7a29849d81db$export$a71e92cfbb498adc), {
1310
+ get price_() {
1311
+ return filter().data[1];
1312
+ },
1313
+ get price_formatting_() {
1314
+ return price_formatting_();
1315
+ }
1316
+ })), $b8hua$escape(price_formatting_().post_));
1298
1317
  },
1299
1318
  get children() {
1300
1319
  return $b8hua$createComponent((0, $b8hua$Index), {
@@ -1383,7 +1402,7 @@ function $4711a82d08d2021b$export$fecbb157621501bd(_ref) {
1383
1402
  return outmost_element;
1384
1403
  }
1385
1404
  const $19e828709c7723a0$var$_tmpl$ = ["<span", ' class="count">', "</span>"],
1386
- $19e828709c7723a0$var$_tmpl$2 = ["<label", ' class="', '"', '><div class="left"><input type="checkbox"', "", "", '><span class="custom-indicator"></span><span class="text line-clamp">', "</span></div><!--#-->", "<!--/--></label>"];
1405
+ $19e828709c7723a0$var$_tmpl$2 = ["<label", ' class="', '"', '><div class="left"><input type="checkbox"', "", "", '><span class="custom-indicator"></span><span class="text line-clamp">', "</span></div><!--$-->", "<!--/--></label>"];
1387
1406
  const $19e828709c7723a0$export$48513f6b9f8ce62d = props => {
1388
1407
  // It seems like there's no diffing without memos here (since we often just have computations in the getters above that update to the same result often because their dependencies change with unrelated changes often), so put memos here to avoid unneeded DOM changes
1389
1408
  const count = $b8hua$createMemo(() => props.count_);
@@ -1404,14 +1423,13 @@ const $19e828709c7723a0$export$48513f6b9f8ce62d = props => {
1404
1423
  };
1405
1424
  const $ff3225aef892a467$var$_tmpl$ = '<path d="M10.173 5.548H5.5V.875c0-.075-.027-.14-.081-.193S5.301.601 5.226.601s-.14.027-.193.081-.081.118-.081.193v4.673H.274c-.075 0-.14.027-.193.081A.27.27 0 0 0 0 5.827c0 .075.027.14.081.193s.118.081.193.081h4.678v4.673c0 .075.027.14.081.193s.118.081.193.081.14-.027.193-.081.081-.118.081-.193V6.101h4.673a.27.27 0 0 0 .199-.081c.054-.054.08-.118.08-.193a.27.27 0 0 0-.279-.279z" fill="#000"></path>';
1406
1425
  function $ff3225aef892a467$export$f21ab0717a89c77f(props) {
1407
- return $b8hua$ssrElement("svg", () => ({
1408
- ...props,
1409
- "xmlns": "http://www.w3.org/2000/svg",
1410
- "width": "11",
1411
- "height": "12"
1426
+ return $b8hua$ssrElement("svg", $b8hua$mergeProps(props, {
1427
+ xmlns: "http://www.w3.org/2000/svg",
1428
+ width: "11",
1429
+ height: "12"
1412
1430
  }), () => $b8hua$ssr($ff3225aef892a467$var$_tmpl$), true);
1413
1431
  }
1414
- const $3e850b2f2cca761f$var$_tmpl$ = ["<button", ' type="button" class="', '"><!--#-->', "<!--/--><span>", "</span></button>"];
1432
+ const $3e850b2f2cca761f$var$_tmpl$ = ["<button", ' type="button" class="', '"><!--$-->', "<!--/--><span>", "</span></button>"];
1415
1433
  function $3e850b2f2cca761f$export$ca21a16d65b3dd8(_ref) {
1416
1434
  let {
1417
1435
  show_extras_: [get_show_extras, set_show_extras],
@@ -1419,7 +1437,7 @@ function $3e850b2f2cca761f$export$ca21a16d65b3dd8(_ref) {
1419
1437
  } = _ref;
1420
1438
  return $b8hua$ssr($3e850b2f2cca761f$var$_tmpl$, $b8hua$ssrHydrationKey(), "expand-filter ".concat(get_show_extras() ? "expanded" : ""), $b8hua$escape($b8hua$createComponent((0, $ff3225aef892a467$export$f21ab0717a89c77f), {})), get_show_extras() ? $b8hua$escape(i18n_.view_less_()) : $b8hua$escape(i18n_.view_more_()));
1421
1439
  }
1422
- const $133484ef10e4e954$var$_tmpl$ = ["<form", ' class="checkboxes"><!--#-->', "<!--/--><!--#-->", "<!--/--></form>"];
1440
+ const $133484ef10e4e954$var$_tmpl$ = ["<form", ' class="checkboxes"><!--$-->', "<!--/--><!--$-->", "<!--/--></form>"];
1423
1441
  const $133484ef10e4e954$var$max_visible_without_collapsing = 15;
1424
1442
  const $133484ef10e4e954$var$show_non_collapsible_when_collapsed = 4;
1425
1443
  function $133484ef10e4e954$export$dd948f91abc3a1c4(_ref) {
@@ -1526,7 +1544,7 @@ function $133484ef10e4e954$export$dd948f91abc3a1c4(_ref) {
1526
1544
  }
1527
1545
  const $b54fc842e721c9eb$var$_tmpl$ = ["<form", ' class="radios">', "</form>"],
1528
1546
  $b54fc842e721c9eb$var$_tmpl$2 = ["<span", ' class="count">', "</span>"],
1529
- $b54fc842e721c9eb$var$_tmpl$3 = ["<label", ' class="', '"', '><div class="left"><input type="radio"', "", '><span class="custom-indicator"></span><!--#-->', "<!--/--></div><!--#-->", "<!--/--></label>"];
1547
+ $b54fc842e721c9eb$var$_tmpl$3 = ["<label", ' class="', '"', '><div class="left"><input type="radio"', "", '><span class="custom-indicator"></span><!--$-->', "<!--/--></div><!--$-->", "<!--/--></label>"];
1530
1548
  function $b54fc842e721c9eb$export$430444115f70a734(_ref) {
1531
1549
  let {
1532
1550
  selected_filters_: selected_filters_,
@@ -1579,7 +1597,7 @@ function $b54fc842e721c9eb$export$430444115f70a734(_ref) {
1579
1597
  }
1580
1598
  })));
1581
1599
  }
1582
- const $1e7465a8ffa97f6c$var$_tmpl$ = ["<div", ' class="', '"><div class="input-group"><div class="field"><input', ' type="number"', '></div><div class="separator">-</div><div class="field"><input', ' type="number"', "></div></div><!--#-->", '<!--/--><div class="value-text"><span class="min"><!--#-->', "<!--/--><!--#-->", "<!--/--><!--#-->", '<!--/--></span><span class="max"><!--#-->', "<!--/--><!--#-->", "<!--/--><!--#-->", "<!--/--></span></div></div>"],
1600
+ const $1e7465a8ffa97f6c$var$_tmpl$ = ["<div", ' class="', '"><div class="input-group"><div class="field"><input', ' type="number"', '></div><div class="separator">-</div><div class="field"><input', ' type="number"', "></div></div><!--$-->", '<!--/--><div class="value-text"><span class="min"><!--$-->', "<!--/--><!--$-->", "<!--/--><!--$-->", '<!--/--></span><span class="max"><!--$-->', "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--></span></div></div>"],
1583
1601
  $1e7465a8ffa97f6c$var$_tmpl$2 = ["<div", ' class="slider"><div class="progress" style="', '"></div></div>'],
1584
1602
  $1e7465a8ffa97f6c$var$_tmpl$3 = ["<div", ' class="range-group"><input', ' type="range"', ' step="any"><input', ' type="range"', ' step="any"></div>'];
1585
1603
  function $1e7465a8ffa97f6c$export$e0d834a0ad870cda(_ref) {
@@ -1817,10 +1835,10 @@ function $457279ff15864cb9$export$e5c2828934226505(_ref) {
1817
1835
  });
1818
1836
  return outer_div;
1819
1837
  }
1820
- const $0ae614c5c7babb43$var$_tmpl$ = ["<form", ' class="', '"><!--#-->', "<!--/--><!--#-->", "<!--/--></form>"],
1821
- $0ae614c5c7babb43$var$_tmpl$2 = ["<div", ' class="', '"><!--#-->', "<!--/--><!--#-->", "<!--/--></div>"],
1838
+ const $0ae614c5c7babb43$var$_tmpl$ = ["<form", ' class="', '"><!--$-->', "<!--/--><!--$-->", "<!--/--></form>"],
1839
+ $0ae614c5c7babb43$var$_tmpl$2 = ["<div", ' class="', '"><!--$-->', "<!--/--><!--$-->", "<!--/--></div>"],
1822
1840
  $0ae614c5c7babb43$var$_tmpl$3 = ["<details", "></details>"],
1823
- $0ae614c5c7babb43$var$_tmpl$4 = ["<summary", ' class="category-parent"><div class="summary"><span class="', '">', "</span><!--#-->", "<!--/--></div></summary>"];
1841
+ $0ae614c5c7babb43$var$_tmpl$4 = ["<summary", ' class="category-parent"><div class="summary"><span class="', '">', "</span><!--$-->", "<!--/--></div></summary>"];
1824
1842
  const $0ae614c5c7babb43$var$max_visible_without_collapsing = 15;
1825
1843
  const $0ae614c5c7babb43$var$show_non_collapsible_when_collapsed = 4;
1826
1844
  function $0ae614c5c7babb43$export$a32086fa6616eafd(_ref) {
@@ -2331,15 +2349,18 @@ const $830ea8efda59884e$export$414f6a19d38e655c = _ref => {
2331
2349
  const current_value = $af5d8e0b7d97a7f6$export$325f75597868c4f0(value().value_);
2332
2350
  return !!(data !== null && data !== void 0 && data.some(item => $af5d8e0b7d97a7f6$export$325f75597868c4f0(item) === current_value));
2333
2351
  });
2334
- const MakeButton = attributes => $b8hua$ssrElement("button", () => ({
2335
- ...attributes,
2336
- "disabled": value().count_ === 0 && !is_selected(),
2337
- "classList": {
2338
- minor: !is_selected(),
2339
- major: is_selected(),
2340
- "major-minor-transition": true
2352
+ const MakeButton = attributes => $b8hua$ssrElement("button", $b8hua$mergeProps(attributes, {
2353
+ get disabled() {
2354
+ return value().count_ === 0 && !is_selected();
2355
+ },
2356
+ get classList() {
2357
+ return {
2358
+ minor: !is_selected(),
2359
+ major: is_selected(),
2360
+ "major-minor-transition": true
2361
+ };
2341
2362
  }
2342
- }), () => ["<!--#-->", $b8hua$escape(value().value_), "<!--/-->", "<!--#-->", $b8hua$escape($b8hua$createComponent((0, $b8hua$Show), {
2363
+ }), () => ["<!--$-->", $b8hua$escape(value().value_), "<!--/-->", "<!--$-->", $b8hua$escape($b8hua$createComponent((0, $b8hua$Show), {
2343
2364
  get when() {
2344
2365
  return value().count_ != undefined;
2345
2366
  },
@@ -2428,7 +2449,7 @@ function $830ea8efda59884e$var$adjust_sizes(container_width, sizes, set_cols_at_
2428
2449
  overrides: column_to_row_result
2429
2450
  }]]);
2430
2451
  }
2431
- const $2cb856c297c53e6c$var$_tmpl$ = ["<form", ' class="checkbox-color"><!--#-->', "<!--/--><!--#-->", "<!--/--></form>"];
2452
+ const $2cb856c297c53e6c$var$_tmpl$ = ["<form", ' class="checkbox-color"><!--$-->', "<!--/--><!--$-->", "<!--/--></form>"];
2432
2453
  const $2cb856c297c53e6c$var$max_visible_without_collapsing = 30;
2433
2454
  const $2cb856c297c53e6c$var$show_non_collapsible_when_collapsed = 8;
2434
2455
  function $2cb856c297c53e6c$export$82ed4b28ecb67608(_ref) {
@@ -2592,14 +2613,13 @@ var $d2988f745661df9c$export$2e2bcd8739ae039 = {
2592
2613
  const $905f44be08b7378e$var$_tmpl$ = '<path d="M4.617 12.738a.48.48 0 0 1-.164-.027c-.051-.023-.094-.055-.129-.098L.125 8.414A.39.39 0 0 1 0 8.117c0-.113.039-.211.125-.293s.18-.125.293-.125.215.043.297.125l3.902 3.902L16.086.262c.082-.082.18-.125.297-.125s.211.043.293.125.125.184.125.301-.043.215-.125.297L4.914 12.613c-.039.043-.086.078-.141.098s-.102.027-.156.027zm0 0"></path>';
2593
2614
  function $905f44be08b7378e$export$f2ca6fc699ca1fb4() {
2594
2615
  let props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
2595
- return $b8hua$ssrElement("svg", () => ({
2596
- "xmlns": "http://www.w3.org/2000/svg",
2597
- "width": "16.8",
2598
- "height": "14",
2599
- ...props
2600
- }), () => $b8hua$ssr($905f44be08b7378e$var$_tmpl$), true);
2601
- }
2602
- const $d0ff304c14f50521$var$_tmpl$ = ["<span", ' class="show-selected" aria-hidden="true"><span>', "</span><!--#-->", "<!--/--></span>"];
2616
+ return $b8hua$ssrElement("svg", $b8hua$mergeProps({
2617
+ xmlns: "http://www.w3.org/2000/svg",
2618
+ width: "16.8",
2619
+ height: "14"
2620
+ }, props), () => $b8hua$ssr($905f44be08b7378e$var$_tmpl$), true);
2621
+ }
2622
+ const $d0ff304c14f50521$var$_tmpl$ = ["<span", ' class="show-selected" aria-hidden="true"><span>', "</span><!--$-->", "<!--/--></span>"];
2603
2623
  function $d0ff304c14f50521$export$53c59af873b303c9(_ref) {
2604
2624
  let {
2605
2625
  selected_filters_in_group_: selected_filters_in_group_,
@@ -2746,11 +2766,11 @@ function $ceafb6fb91c6f394$export$89c6019e4baa40b1(props) {
2746
2766
  });
2747
2767
  }
2748
2768
  const $f6b0500577e1b210$var$_tmpl$ = ["<div", ' class="filter-collapsible">', "</div>"],
2749
- $f6b0500577e1b210$var$_tmpl$2 = ["<button", ' class="clear-group"><!--#-->', "<!--/--><span>", "</span></button>"],
2750
- $f6b0500577e1b210$var$_tmpl$3 = ["<div", ' class="view-more-clear"><!--#-->', "<!--/--><!--#-->", "<!--/--></div>"],
2751
- $f6b0500577e1b210$var$_tmpl$4 = ["<div", ' class="filter-collapsible-body"><div class="filter-part">', "</div><!--#-->", "<!--/--></div>"],
2769
+ $f6b0500577e1b210$var$_tmpl$2 = ["<button", ' class="clear-group"><!--$-->', "<!--/--><span>", "</span></button>"],
2770
+ $f6b0500577e1b210$var$_tmpl$3 = ["<div", ' class="view-more-clear"><!--$-->', "<!--/--><!--$-->", "<!--/--></div>"],
2771
+ $f6b0500577e1b210$var$_tmpl$4 = ["<div", ' class="filter-collapsible-body"><div class="filter-part">', "</div><!--$-->", "<!--/--></div>"],
2752
2772
  $f6b0500577e1b210$var$_tmpl$5 = ["<details", ' class="filter-collapsible"', "></details>"],
2753
- $f6b0500577e1b210$var$_tmpl$6 = ["<summary", ' class="filter-group-summary"><div class="summary"><span>', '</span><div class="selected-w-sign"><!--#-->', "<!--/--><!--#-->", "<!--/--></div></div></summary>"],
2773
+ $f6b0500577e1b210$var$_tmpl$6 = ["<summary", ' class="filter-group-summary"><div class="summary"><span>', '</span><div class="selected-w-sign"><!--$-->', "<!--/--><!--$-->", "<!--/--></div></div></summary>"],
2754
2774
  $f6b0500577e1b210$var$_tmpl$7 = ["<div", ' class="ungrouped">', "</div>"],
2755
2775
  $f6b0500577e1b210$var$_tmpl$8 = ["<button", ' class="clear-all-filters major">', "</button>"];
2756
2776
  function $f6b0500577e1b210$export$3f1a388cc0d8fed7(props) {
@@ -3709,7 +3729,7 @@ function $33e7d1906c93db7d$export$205efb947c7ffd78(handler) {
3709
3729
  $b8hua$onCleanup(() => removeEventListener(event, catchified_handler));
3710
3730
  }
3711
3731
  }
3712
- const $b69740fc6de9f17e$var$_tmpl$ = ["<div", ' class="scroll-status" style="display:none"><span class="text"><b>', "</b> – <b>", "</b> <!--#-->", "<!--/--> <b>", "</b></span></div>"];
3732
+ const $b69740fc6de9f17e$var$_tmpl$ = ["<div", ' class="scroll-status" style="display:none"><span class="text"><b>', "</b> – <b>", "</b> <!--$-->", "<!--/--> <b>", "</b></span></div>"];
3713
3733
  function $b69740fc6de9f17e$export$83fd5de5504a7a67(_ref) {
3714
3734
  let {
3715
3735
  formatted_number_of_results_: formatted_number_of_results_,
@@ -3830,7 +3850,7 @@ function $b69740fc6de9f17e$export$83fd5de5504a7a67(_ref) {
3830
3850
  })), $b8hua$escape(of_()), $b8hua$escape(count_to_show()));
3831
3851
  }
3832
3852
  const $94af29837186eb21$var$_tmpl$ = ["<a", ' class="hint" href="javascript:void(0)">', "</a>"],
3833
- $94af29837186eb21$var$_tmpl$2 = ["<div", ' class="no-results"><div class="text">', "</div><!--#-->", "<!--/--></div>"];
3853
+ $94af29837186eb21$var$_tmpl$2 = ["<div", ' class="no-results"><div class="text">', "</div><!--$-->", "<!--/--></div>"];
3834
3854
  function $94af29837186eb21$export$ef6006467f04ee41(_ref) {
3835
3855
  let {
3836
3856
  i18n_: i18n_,
@@ -3968,7 +3988,9 @@ function $45a8953d760b5e58$export$a1fd619a4743ca08(_ref) {
3968
3988
  min_products_to_fetch_: min_products_to_fetch_,
3969
3989
  query_base_: query_base_,
3970
3990
  depict_api_: depict_api_,
3971
- is_loading_: is_loading_
3991
+ is_loading_: is_loading_,
3992
+ content_blocks_: content_blocks_,
3993
+ set_number_loaded_displays_: set_number_loaded_displays_
3972
3994
  } = _ref;
3973
3995
  // The following sets up an intersection observer to determine which results are in the viewport, used for the ScrollStatus indicator and knowing when to load more
3974
3996
  const target_to_index_map = new Map();
@@ -4015,11 +4037,13 @@ function $45a8953d760b5e58$export$a1fd619a4743ca08(_ref) {
4015
4037
  query_base_: query_base_,
4016
4038
  depict_api_: depict_api_
4017
4039
  });
4040
+ $b8hua$createComputed(() => set_number_loaded_displays_(displays_by_key_().size));
4018
4041
  return $2d7bad8684bc7f44$export$43f0fb951fcb0c54({
4019
4042
  displays_by_key_: displays_by_key_,
4020
4043
  merchant_: merchant_,
4021
4044
  market_: market_,
4022
4045
  product_card_template_: product_card_template_,
4046
+ content_blocks_: content_blocks_,
4023
4047
  do_per_elements_: (elements, index_accessor) =>
4024
4048
  // Adds/removes elements from the "results in viewport" intersection observer above
4025
4049
  $b8hua$createEffect(() => {
@@ -4041,7 +4065,337 @@ function $45a8953d760b5e58$export$a1fd619a4743ca08(_ref) {
4041
4065
  })
4042
4066
  });
4043
4067
  }
4044
- const $7faea0096f14b59b$var$_tmpl$ = ["<div", ' class="', '"><!--#-->', "<!--/--><!--#-->", "<!--/--></div>"];
4068
+ const $64d94dcaa058dc7b$var$_tmpl$ = ["<style", ' type="text/css">', "</style>"];
4069
+ const $64d94dcaa058dc7b$export$c500183c31c2b22e = "--spans-columns";
4070
+ function $64d94dcaa058dc7b$export$ab6b147eec64fea5(props) {
4071
+ const container_class = "x" + $b8hua$createUniqueId();
4072
+ const container_element_ = $b8hua$ssrElement("div", $b8hua$mergeProps(() => props.element_attributes, {
4073
+ classList: {
4074
+ [container_class]: true
4075
+ }
4076
+ }), () => $b8hua$escape(props.children), true); // Don't want this in the error boundary below, it should only be for the actual layouting
4077
+ return $b8hua$createComponent((0, $74777e8fe65b3dcb$export$b69d0d92862de18b), {
4078
+ message_: "Failed calculating css grid layout",
4079
+ severity_: "error",
4080
+ get children() {
4081
+ return $64d94dcaa058dc7b$export$e2f22da34aaf310a(props, container_element_, false, container_class);
4082
+ }
4083
+ });
4084
+ }
4085
+ function $64d94dcaa058dc7b$export$e2f22da34aaf310a(props, container_element) {
4086
+ let insert_after_container = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
4087
+ let container_class = arguments.length > 3 ? arguments[3] : undefined;
4088
+ if (!container_class) {
4089
+ // only try to add if it wasn't provided, so that we have a code path without classList when doing SSR
4090
+ container_class = $b8hua$make_random_classname();
4091
+ container_element.classList.add(container_class);
4092
+ }
4093
+ const container_selector = ".depict .".concat(container_class); // class so ppl can have id if needed
4094
+ const col_styling = $b8hua$createMemo(() => $64d94dcaa058dc7b$var$generate_media_queried_declarations({
4095
+ container_selector_: container_selector,
4096
+ default_grid_spacing_text: props.grid_spacing,
4097
+ cols_at_size_: props.cols_at_size,
4098
+ override_vertical_spacing_: props.override_vertical_spacing,
4099
+ top_row_shortened_by_: props.top_row_shortened_by_()
4100
+ }));
4101
+ const base_styling = $b8hua$createMemo(() => {
4102
+ return "".concat(container_selector, "{display:grid;}");
4103
+ });
4104
+ const get_styling = $b8hua$createMemo(() => base_styling() + col_styling());
4105
+ const style_element = $b8hua$ssr($64d94dcaa058dc7b$var$_tmpl$, $b8hua$ssrHydrationKey(), get_styling); // need to create this after set_styling has been called or else there will be no styling in the SSR'd output
4106
+ if (insert_after_container) container_element.after(style_element);
4107
+ return [container_element, style_element];
4108
+ }
4109
+ function $64d94dcaa058dc7b$var$generate_media_queried_declarations(_ref) {
4110
+ let {
4111
+ container_selector_: container_selector_,
4112
+ default_grid_spacing_text: default_grid_spacing_text,
4113
+ cols_at_size_: cols_at_size_,
4114
+ override_vertical_spacing_: override_vertical_spacing_,
4115
+ top_row_shortened_by_: top_row_shortened_by_
4116
+ } = _ref;
4117
+ return cols_at_size_.map(options => {
4118
+ const [n_cols, min, max, grid_spacing_for_size] = options;
4119
+ const spacing_to_use = grid_spacing_for_size || default_grid_spacing_text;
4120
+ // See comment in else block below
4121
+ const can_use_gap = $64d94dcaa058dc7b$var$can_use_gap_for_unit(spacing_to_use) && (!override_vertical_spacing_ || $64d94dcaa058dc7b$var$can_use_gap_for_unit(override_vertical_spacing_));
4122
+ let spacing_styling;
4123
+ let additional_styling = ""; // outside the media query
4124
+ if (can_use_gap) spacing_styling = "gap:".concat(spacing_to_use, ";").concat(override_vertical_spacing_ ? "row-gap:".concat(override_vertical_spacing_, ";") : "");else {
4125
+ // When using percent units, which our default styling does (because convenient) and our interface relies on (hard to specify different gaps for different screen sizes)
4126
+ // row gaps in grids are relative to the whole height of the grid, maybe see also https://stackoverflow.com/a/53563865. The issue with that is that as we load more products, the gap grows. Also, it breaks existing integrations.
4127
+ // Logical thought: use margins for the vertical spacing. But margins in grids are apparently relative to the size of the individual items in grids.
4128
+ // Given that, and that content blocks can be of different width, we have to do some complicated calculations to convert the provided gap, which is in gap of the total container width, to a margin of the individual items.
4129
+ const width_multiplier = "var(".concat($64d94dcaa058dc7b$export$c500183c31c2b22e, ", 1)"); // How many cards wide the current item is (needed because content blocks)
4130
+ const one_item_width_exclusing_gaps = "calc(calc(100 / ".concat(n_cols, ") - calc(calc(").concat(n_cols * 2 - 2, " * calc(").concat($64d94dcaa058dc7b$var$strip_percent_unit(spacing_to_use), " / 2)) / ").concat(n_cols, "))"); // Width of one item in percent of the whole
4131
+ // Equation from layout.tsx, also used in CheckboxGrid. Needs half spacing for some reason
4132
+ const this_item_width_meat = "calc(".concat(one_item_width_exclusing_gaps, " * ").concat(width_multiplier, ")"); // Width of just the card
4133
+ const this_item_width_gaps = "calc(calc(".concat(width_multiplier, " - 1) * ").concat($64d94dcaa058dc7b$var$strip_percent_unit(spacing_to_use), ")"); // Width of the gaps
4134
+ const this_item_width = "calc(".concat(this_item_width_meat, " + ").concat(this_item_width_gaps, ")"); // Width of this item including gaps
4135
+ // this_item_width needs to be unitless, and since plain css can't do calc(40% / 5%) which would become unitless we need to strip all units in the calculations before
4136
+ const convert_top_spacing_to_item_width_percentage = spacing => "calc(calc(100 / ".concat(this_item_width, ") * ").concat(spacing, ")"); // Now finally we can convert the desired spacing to a percentage of this individual item's width (including gaps that would be there but aren't because content blocks span them)
4137
+ spacing_styling = "column-gap:".concat(spacing_to_use, ";"); // Still use gaps in the horizontal direction because that works flawlessly
4138
+ // Re-use old layout code to get the correct :nth-child declarations for the top margins
4139
+ additional_styling = $b8hua$n_col_styling_with_dist(container_selector_ + ">", convert_top_spacing_to_item_width_percentage(default_grid_spacing_text), [[n_cols, min, max, grid_spacing_for_size ? convert_top_spacing_to_item_width_percentage(grid_spacing_for_size) : null]], "grid", override_vertical_spacing_ ? convert_top_spacing_to_item_width_percentage(override_vertical_spacing_) : override_vertical_spacing_, top_row_shortened_by_);
4140
+ }
4141
+ const media_query_body = "".concat(container_selector_, "{").concat(spacing_styling, "grid-template-columns:repeat(").concat(n_cols, ",minmax(0,1fr));}");
4142
+ return "".concat($b8hua$layout_media_query_header(min, max), "{").concat(media_query_body, "}").concat(additional_styling);
4143
+ }).join("");
4144
+ }
4145
+ function $64d94dcaa058dc7b$var$can_use_gap_for_unit(spacing) {
4146
+ const trimmed_spacing = spacing.trim();
4147
+ return !trimmed_spacing.includes("%");
4148
+ }
4149
+ function $64d94dcaa058dc7b$var$strip_percent_unit(css_value) {
4150
+ return css_value.replaceAll("%", "");
4151
+ }
4152
+ function $b2dbaafb23d00c7f$export$cb5808ba002cdeed(_ref) {
4153
+ let {
4154
+ layout_options_: layout_options_,
4155
+ sort_or_filter_open_: sort_or_filter_open_
4156
+ } = _ref;
4157
+ return $b8hua$createMemo(() => {
4158
+ const layout_options = layout_options_();
4159
+ // Add grid styling that changes when filters get opened/closed
4160
+ const when_filters_closed_cols = layout_options.cols_at_size;
4161
+ return sort_or_filter_open_() ? when_filters_closed_cols.map(row => {
4162
+ const [num_cols_default,,,, override_cols] = row;
4163
+ const cloned_row = [...row];
4164
+ // @ts-ignore
4165
+ cloned_row[0] = num_cols_default - 1;
4166
+ if (override_cols)
4167
+ // @ts-ignore
4168
+ cloned_row[4] = {
4169
+ overrides: Object.fromEntries(Object.entries(override_cols.overrides).map(_ref2 => {
4170
+ let [row, column] = _ref2;
4171
+ return [row, column - 1];
4172
+ }))
4173
+ };
4174
+ return cloned_row;
4175
+ }) : when_filters_closed_cols;
4176
+ });
4177
+ }
4178
+ function $8244fdad249f8d5f$export$a79e666719b3647c(cols_at_size_) {
4179
+ const size_active = $b8hua$createMemo(() => cols_at_size_().map(_ref => {
4180
+ let [n_cols, min_width, max_width] = _ref;
4181
+ const media_query = $b8hua$layout_media_query_header(min_width, max_width).replaceAll("@media", "");
4182
+ const matches = $00a5b94f0c11efbb$export$d9f36cf74e24d595(media_query);
4183
+ return [matches, n_cols];
4184
+ }));
4185
+ const n_cols_currently_showing = $b8hua$createMemo(() => {
4186
+ try {
4187
+ const [, n_cols_currently_showing] = size_active().find(_ref2 => {
4188
+ let [media_query] = _ref2;
4189
+ return media_query();
4190
+ });
4191
+ return n_cols_currently_showing;
4192
+ } catch (e) {
4193
+ $b8hua$dwarn("No active size found in columnsAtSize - can't render content blocks");
4194
+ return null;
4195
+ }
4196
+ });
4197
+ return n_cols_currently_showing;
4198
+ }
4199
+ function $3ab4aa97880fb88d$export$3f37af283f8fb843(props) {
4200
+ const style = $b8hua$createMemo(() => {
4201
+ const {
4202
+ style: style,
4203
+ height: height,
4204
+ width: width,
4205
+ aspectRatio: aspectRatio
4206
+ } = props;
4207
+ const is_image = aspectRatio != undefined;
4208
+ const size_data = is_image ? {
4209
+ width: "100%",
4210
+ "padding-bottom": 1 / aspectRatio * 100 + "%"
4211
+ } : {
4212
+ width: width,
4213
+ height: height
4214
+ };
4215
+ return {
4216
+ display: "block",
4217
+ ...(style || {}),
4218
+ ...size_data
4219
+ };
4220
+ });
4221
+ return $b8hua$createComponent((0, $bc2337c9a05ecd18$export$acb3eaade4b23afd), {
4222
+ get style() {
4223
+ return style();
4224
+ },
4225
+ get ["class"]() {
4226
+ return props.class;
4227
+ }
4228
+ });
4229
+ }
4230
+ const $ff7feae4dddd6073$var$_tmpl$ = ["<div", ' class="content-block-wrapper" style="', '">', "</div>"];
4231
+ function $ff7feae4dddd6073$export$791ef57e62e21c3f(_ref) {
4232
+ let {
4233
+ content_blocks_: incoming_content_blocks,
4234
+ cols_at_size_: cols_at_size_,
4235
+ number_of_items_shown_: number_of_items_shown_,
4236
+ set_top_row_shortened_by_: set_top_row_shortened_by_
4237
+ } = _ref;
4238
+ // these are by row
4239
+ const [content_blocks, set_content_blocks] = $b8hua$createStore([]);
4240
+ const n_cols_currently_showing_ = $8244fdad249f8d5f$export$a79e666719b3647c(cols_at_size_);
4241
+ const products_to_rows = products => {
4242
+ const cols_currently_showing = n_cols_currently_showing_();
4243
+ if (cols_currently_showing === null) return 0;
4244
+ return Math.ceil(products / cols_currently_showing);
4245
+ };
4246
+ const showing_rows = $b8hua$createMemo(() => products_to_rows(number_of_items_shown_()));
4247
+ $b8hua$createEffect(() => {
4248
+ const incoming_value = incoming_content_blocks();
4249
+ if (!incoming_value) {
4250
+ set_content_blocks([]);
4251
+ return;
4252
+ }
4253
+ const capped_value = incoming_value.slice(0, showing_rows()); // Don't show more content blocks than we have rows
4254
+ set_content_blocks($b8hua$reconcile(capped_value, {
4255
+ key: "content"
4256
+ })); // key: Make moving blocks faster, see https://github.com/solidjs/solid/issues/1925#issuecomment-1769671596
4257
+ });
4258
+
4259
+ const get_wrapped_blocks_ = $ff7feae4dddd6073$var$wrap_blocks_in_div(content_blocks, n_cols_currently_showing_);
4260
+ $b8hua$createComputed(() => {
4261
+ // Update our styling if a content block forces some items that should be in the top row into a lower one, so we can generate margin-top declarations for them
4262
+ const top_row_block = get_wrapped_blocks_()[0];
4263
+ const blocks_in_top_row_taken = top_row_block === null || top_row_block === void 0 ? void 0 : top_row_block.span_columns;
4264
+ if (blocks_in_top_row_taken == undefined) {
4265
+ // Fall back to zero if no content block in top row, since then no blocks in top row are taken
4266
+ set_top_row_shortened_by_(0);
4267
+ return;
4268
+ }
4269
+ set_top_row_shortened_by_(blocks_in_top_row_taken - 1); // minus one because the content block wrapper also is an element
4270
+ });
4271
+
4272
+ return $ff7feae4dddd6073$var$remap_blocks_to_index({
4273
+ get_wrapped_blocks_: get_wrapped_blocks_,
4274
+ n_cols_currently_showing_: n_cols_currently_showing_
4275
+ });
4276
+ }
4277
+ /**
4278
+ * Calculate where to put each of the finished wrapped content blocks. Also limit blocks' max width.
4279
+ * @returns an array where index is index of the blocks in the "displays array" and value is the content block (elements) to show at that index
4280
+ */
4281
+ function $ff7feae4dddd6073$var$remap_blocks_to_index(_ref2) {
4282
+ let {
4283
+ get_wrapped_blocks_: get_wrapped_blocks_,
4284
+ n_cols_currently_showing_: n_cols_currently_showing_
4285
+ } = _ref2;
4286
+ return $b8hua$createMemo(() => {
4287
+ // This computation should be quite cheap since it just moves around things into an array
4288
+ const content_blocks_by_index = [];
4289
+ const constructed_block_arrays = new WeakSet();
4290
+ const wrapped_blocks = get_wrapped_blocks_();
4291
+ const cols_showing = n_cols_currently_showing_();
4292
+ // Need to keep track of products displaced by blocks above when mapping rows to indexes in the actual grid
4293
+ const displaced_products = []; // undefined = is product, true = is content block if number instead of tuple number indicates content blocks in that row. Index in first array is row, index in second array is column
4294
+ for (let i = 0; i < wrapped_blocks.length; i++) {
4295
+ // i = row to show at
4296
+ const block = wrapped_blocks[i];
4297
+ if (!block) continue; // Array can have holes/not defined places
4298
+ const index_of_first_item_in_row = i * cols_showing;
4299
+ const index_of_last_item_in_row = index_of_first_item_in_row + cols_showing;
4300
+ const {
4301
+ span_rows: span_rows,
4302
+ position: position,
4303
+ span_columns: span_columns
4304
+ } = block; // span columns is already capped in the block wrapping step (wrap_blocks_in_div)
4305
+ let target_index;
4306
+ if (position === "left") target_index = index_of_first_item_in_row;else if (position === "right") target_index = index_of_last_item_in_row - span_columns;else if (position === "center") target_index = index_of_first_item_in_row + Math.floor((cols_showing - span_columns) / 2);else throw new Error("Invalid position for content block - must be left, right or center: " + JSON.stringify(position));
4307
+ // Calculate displacement of us by content blocks above us
4308
+ let displacement_by_added_blocks = 0;
4309
+ for (let j = 0; j < i; j++) {
4310
+ const row = displaced_products[j];
4311
+ if (row === undefined) continue; // there were no blocks in this row
4312
+ let items_in_row;
4313
+ if (typeof row === "number") items_in_row = row;else {
4314
+ items_in_row = row.filter(item => item).length;
4315
+ displaced_products[j] = items_in_row;
4316
+ }
4317
+ displacement_by_added_blocks += items_in_row;
4318
+ }
4319
+ const index_of_us_in_row = target_index - index_of_first_item_in_row;
4320
+ for (let j = 0; j < index_of_us_in_row; j++) {
4321
+ var _displaced_products$i;
4322
+ if ((_displaced_products$i = displaced_products[i]) !== null && _displaced_products$i !== void 0 && _displaced_products$i[j])
4323
+ // Add blocks in our *current* row to the displacement, but only the ones to our left
4324
+ displacement_by_added_blocks++;
4325
+ }
4326
+ // Add block to output array at the correct index
4327
+ const final_target_index = target_index - displacement_by_added_blocks;
4328
+ const existing_block = content_blocks_by_index[final_target_index];
4329
+ const block_content = block.content;
4330
+ // If two blocks want to exist at the same location (can happen, for example if one block wants to be at the end of a row and the other one at the start of the next row) add an array with both
4331
+ if (existing_block) {
4332
+ if (constructed_block_arrays.has(existing_block))
4333
+ // Only push to arrays we have created to not create funky bugs when there's an array in JSX.Element
4334
+ existing_block.push(block_content);else {
4335
+ const array = [existing_block, block_content];
4336
+ constructed_block_arrays.add(array);
4337
+ content_blocks_by_index[final_target_index] = array;
4338
+ }
4339
+ } else content_blocks_by_index[final_target_index] = block_content;
4340
+ // Update displacement
4341
+ for (let j = 0; j < span_rows; j++) {
4342
+ var _ref3;
4343
+ const row = displaced_products[_ref3 = i + j] || (displaced_products[_ref3] = []);
4344
+ for (let k = index_of_us_in_row; k < index_of_us_in_row + span_columns; k++) row[k] = true;
4345
+ }
4346
+ }
4347
+ return content_blocks_by_index;
4348
+ });
4349
+ }
4350
+ /**
4351
+ * Takes a store that contains an array from where index is number of row and value is the result of executing the content block rendering function.
4352
+ * Then renders the content and wraps it into a div with the correct styling.
4353
+ * Also caps span_columns to max available columns
4354
+ */
4355
+ function $ff7feae4dddd6073$var$wrap_blocks_in_div(rendered_content_blocks, max_span_columns) {
4356
+ const get_wrapped_blocks = $b8hua$mapArray(() => rendered_content_blocks, block => {
4357
+ if (!block) return;
4358
+ const get_span_columns = () => {
4359
+ var _max_span_columns;
4360
+ return Math.min(block.span_columns, (_max_span_columns = max_span_columns()) !== null && _max_span_columns !== void 0 ? _max_span_columns : Infinity);
4361
+ };
4362
+ return $b8hua$mergeProps1(block, {
4363
+ // Create content divs for the blocks with as much fine-grained diffing as possible?
4364
+ content: $b8hua$ssr($ff7feae4dddd6073$var$_tmpl$, $b8hua$ssrHydrationKey(), "grid-column:" + "span ".concat($b8hua$escape(get_span_columns(), true)) + (";grid-row:" + "span ".concat($b8hua$escape(block.span_rows, true))) + (";spans_columns_variable_name:" + $b8hua$escape(get_span_columns(), true)), $b8hua$escape($b8hua$createComponent($ff7feae4dddd6073$var$RenderContent, {
4365
+ get content() {
4366
+ return block.content;
4367
+ }
4368
+ }))),
4369
+ get span_columns() {
4370
+ // Cap max width of block to the number of columns available, for everyone downstream
4371
+ return get_span_columns();
4372
+ }
4373
+ });
4374
+ });
4375
+ return get_wrapped_blocks;
4376
+ }
4377
+ /**
4378
+ * Basically adds support for async content block functions and shows a rudimentary placeholder if rendering is delayed. Required due to react having a rendering delay.
4379
+ */
4380
+ function $ff7feae4dddd6073$var$RenderContent(props) {
4381
+ const [resource] = $b8hua$createResource(() => props.content,
4382
+ // Could be reactive
4383
+ fn => fn());
4384
+ $b8hua$createEffect(() => {
4385
+ if (resource.error) console.error("Error in content block rendering", resource.error);
4386
+ });
4387
+ // The suspense is for when there's an async content block (which we have to support due to react having a rendering delay) so that we can show some height while it's loading (should kinda never be visible)
4388
+ return $b8hua$createComponent((0, $b8hua$Suspense), {
4389
+ get fallback() {
4390
+ return $b8hua$createComponent((0, $3ab4aa97880fb88d$export$3f37af283f8fb843), {
4391
+ width: "100%",
4392
+ height: "max(100%, 400px)"
4393
+ });
4394
+ },
4395
+ children: resource
4396
+ });
4397
+ }
4398
+ const $7faea0096f14b59b$var$_tmpl$ = ["<div", ' class="', '"><!--$-->', "<!--/--><!--$-->", "<!--/--></div>"];
4045
4399
  function $7faea0096f14b59b$export$3925f87b1545cfc6(_ref) {
4046
4400
  let {
4047
4401
  plp_results_: plp_results_,
@@ -4057,7 +4411,8 @@ function $7faea0096f14b59b$export$3925f87b1545cfc6(_ref) {
4057
4411
  sort_or_filter_open_: sort_or_filter_open_,
4058
4412
  product_card_template_: product_card_template_,
4059
4413
  layout_options_: layout_options_,
4060
- id_currently_querying_for_: id_currently_querying_for_
4414
+ id_currently_querying_for_: id_currently_querying_for_,
4415
+ content_blocks_by_row_: content_blocks_by_row_
4061
4416
  } = _ref;
4062
4417
  // The plp_results_ resource will be delayed because we're using createBatchedMemo to not make triplicate API requests, but we need to show the placeholders before already to match Chrome and Firefox's "content has to be there, ready for scroll restoration, before all popstate tasks have been completed"-requirement
4063
4418
  const is_loading_ = $b8hua$createMemo(() => plp_results_.loading || query_base_.loading);
@@ -4100,24 +4455,37 @@ function $7faea0096f14b59b$export$3925f87b1545cfc6(_ref) {
4100
4455
  let is_just_after_plp_results_update = false;
4101
4456
  let fallback_is_alive = false;
4102
4457
  const [get_should_have_placeholders_rendered, set_should_have_placeholders_rendered] = $b8hua$createSignal(true);
4458
+ const [top_row_shortened_by_, set_top_row_shortened_by_] = $b8hua$createSignal(0);
4459
+ const [product_card_suspense_is_in_fallback, set_product_card_suspense_is_in_fallback] = $b8hua$createSignal(false);
4460
+ const [number_loaded_displays, set_number_loaded_displays_] = $b8hua$createSignal(0);
4461
+ const modified_cols_at_size = $b2dbaafb23d00c7f$export$cb5808ba002cdeed({
4462
+ layout_options_: layout_options_,
4463
+ sort_or_filter_open_: sort_or_filter_open_
4464
+ });
4465
+ const num_placeholders_ = $b8hua$createMemo(() => {
4466
+ var _get_scroll_restorati, _get_scroll_restorati2;
4467
+ // Can't use the data out of request_base for the id because request_base is too late, we need the correct amount of placeholders before the browser has restored the scroll state after processing all popstate events
4468
+ return (0, $981356a8bf29ad72$export$6c9030e511152266) + ((_get_scroll_restorati = (_get_scroll_restorati2 = get_scroll_restoration_data().find(_ref2 => {
4469
+ let {
4470
+ for_id: for_id
4471
+ } = _ref2;
4472
+ return for_id === id_currently_querying_for_();
4473
+ })) === null || _get_scroll_restorati2 === void 0 ? void 0 : _get_scroll_restorati2.min_results_loaded) !== null && _get_scroll_restorati !== void 0 ? _get_scroll_restorati : min_products_to_fetch_);
4474
+ });
4475
+ const number_of_items_shown_ = $b8hua$createMemo(() => is_loading_() || product_card_suspense_is_in_fallback() ? num_placeholders_() : number_loaded_displays());
4476
+ const doesnt_have_content_blocks = $b8hua$createMemo(() => !content_blocks_by_row_());
4477
+ const content_blocks_ = $b8hua$createMemo(() => doesnt_have_content_blocks() ? () => [] : $ff7feae4dddd6073$export$791ef57e62e21c3f({
4478
+ content_blocks_: content_blocks_by_row_,
4479
+ cols_at_size_: modified_cols_at_size,
4480
+ number_of_items_shown_: number_of_items_shown_,
4481
+ set_top_row_shortened_by_: set_top_row_shortened_by_
4482
+ }));
4103
4483
  const rendered_placeholders = $b8hua$createMemo(() => get_should_have_placeholders_rendered() ? $bdd80c7862246dc2$export$f33414a4df0afd3f({
4484
+ content_blocks_: content_blocks_,
4104
4485
  product_card_template_: product_card_template_,
4105
- num_placeholders_: $b8hua$createMemo(() => {
4106
- var _get_scroll_restorati, _get_scroll_restorati2;
4107
- // Can't use the data out of request_base for the id because request_base is too late, we need the correct amount of placeholders before the browser has restored the scroll state after processing all popstate events
4108
- return (0, $981356a8bf29ad72$export$6c9030e511152266) + ((_get_scroll_restorati = (_get_scroll_restorati2 = get_scroll_restoration_data().find(_ref2 => {
4109
- let {
4110
- for_id: for_id
4111
- } = _ref2;
4112
- return for_id === id_currently_querying_for_();
4113
- })) === null || _get_scroll_restorati2 === void 0 ? void 0 : _get_scroll_restorati2.min_results_loaded) !== null && _get_scroll_restorati !== void 0 ? _get_scroll_restorati : min_products_to_fetch_);
4114
- })
4486
+ num_placeholders_: num_placeholders_
4115
4487
  }) : undefined);
4116
4488
  const [get_suspense_is_blocked, set_suspense_is_blocked] = $b8hua$createSignal(false);
4117
- const modified_cols_at_size = $7faea0096f14b59b$var$make_modified_cols_at_size({
4118
- layout_options_: layout_options_,
4119
- sort_or_filter_open_: sort_or_filter_open_
4120
- });
4121
4489
  const block_suspense_if_needed = () => {
4122
4490
  if (!is_just_after_plp_results_update) return;
4123
4491
  is_just_after_plp_results_update = false;
@@ -4147,18 +4515,18 @@ function $7faea0096f14b59b$export$3925f87b1545cfc6(_ref) {
4147
4515
  */
4148
4516
  const product_cards_when_data = $b8hua$createComponent((0, $b8hua$Suspense), {
4149
4517
  get fallback() {
4150
- return (() => {
4151
- fallback_is_alive = true;
4152
- $b8hua$onCleanup(block_suspense_if_needed); // Block suspense after initial run every time after we fetch
4153
- return $b8hua$createMemo(() => {
4154
- // We need to be able to block the suspense since when async product cards are *rendering* we want to show the placeholders on initial load but not when loading more
4155
- // In future we could have individual suspense's for each product card, but that's too much for now
4156
- if (get_suspense_is_blocked()) return suspense_contents;
4157
- set_should_have_placeholders_rendered(true); // just in case
4158
- $b8hua$onCleanup(() => set_should_have_placeholders_rendered(false));
4159
- return rendered_placeholders; // I lifted the placeholders into the memo since we don't want to re-render them when switching from <Show> to <Suspense>
4160
- });
4161
- })();
4518
+ fallback_is_alive = true;
4519
+ $b8hua$onCleanup(block_suspense_if_needed); // Block suspense after initial run every time after we fetch
4520
+ set_product_card_suspense_is_in_fallback(true); // Here for the content block code that needs to know how many items we're displaying
4521
+ $b8hua$onCleanup(() => set_product_card_suspense_is_in_fallback(false));
4522
+ return $b8hua$createMemo(() => {
4523
+ // We need to be able to block the suspense since when async product cards are *rendering* we want to show the placeholders on initial load but not when loading more
4524
+ // In future we could have individual suspense's for each product card, but that's too much for now
4525
+ if (get_suspense_is_blocked()) return suspense_contents;
4526
+ set_should_have_placeholders_rendered(true); // just in case
4527
+ $b8hua$onCleanup(() => set_should_have_placeholders_rendered(false));
4528
+ return rendered_placeholders; // I lifted the placeholders into the memo since we don't want to re-render them when switching from <Show> to <Suspense>
4529
+ });
4162
4530
  },
4163
4531
 
4164
4532
  get children() {
@@ -4174,37 +4542,64 @@ function $7faea0096f14b59b$export$3925f87b1545cfc6(_ref) {
4174
4542
  min_products_to_fetch_: min_products_to_fetch_,
4175
4543
  query_base_: query_base_,
4176
4544
  depict_api_: depict_api_,
4177
- is_loading_: is_loading_
4545
+ is_loading_: is_loading_,
4546
+ content_blocks_: content_blocks_,
4547
+ set_number_loaded_displays_: set_number_loaded_displays_
4178
4548
  });
4179
4549
  $b8hua$onCleanup(() => suspense_contents = undefined);
4180
4550
  return suspense_contents;
4181
4551
  })();
4182
4552
  }
4183
4553
  });
4184
- return [$ca55612a53dbbdd2$export$a2cc176055f8f08(), $b8hua$createComponent((0, $63f1f8dbcd07d3b0$export$d21e32dfedac04be), {
4185
- get cols_at_size() {
4186
- return modified_cols_at_size();
4554
+ /* This Show is so that we show placeholders while query_base is loading and because it's cumbersome to ensure that everything that directly accesses the plp_results_ resource is within the <Suspense> boundary */
4555
+ const listing_contents = $b8hua$createComponent((0, $b8hua$Show), {
4556
+ get when() {
4557
+ return !is_loading_();
4187
4558
  },
4188
- get override_vertical_spacing() {
4189
- return layout_options_().override_vertical_spacing;
4559
+ get fallback() {
4560
+ return rendered_placeholders();
4190
4561
  },
4191
- get grid_spacing() {
4192
- return layout_options_().grid_spacing;
4562
+ children: product_cards_when_data
4563
+ });
4564
+ return [$ca55612a53dbbdd2$export$a2cc176055f8f08(), $b8hua$createComponent((0, $b8hua$Show), {
4565
+ get when() {
4566
+ return doesnt_have_content_blocks();
4193
4567
  },
4194
- rows: "all",
4195
- layout: "grid",
4196
- element_attributes: {
4197
- class: "cards"
4568
+ get fallback() {
4569
+ return $b8hua$createComponent((0, $64d94dcaa058dc7b$export$ab6b147eec64fea5), {
4570
+ get cols_at_size() {
4571
+ return modified_cols_at_size();
4572
+ },
4573
+ get override_vertical_spacing() {
4574
+ return layout_options_().override_vertical_spacing;
4575
+ },
4576
+ get grid_spacing() {
4577
+ return layout_options_().grid_spacing;
4578
+ },
4579
+ element_attributes: {
4580
+ class: "cards css-grid"
4581
+ },
4582
+ top_row_shortened_by_: top_row_shortened_by_,
4583
+ children: listing_contents
4584
+ });
4198
4585
  },
4199
4586
  get children() {
4200
- return $b8hua$createComponent((0, $b8hua$Show), {
4201
- get when() {
4202
- return !is_loading_();
4587
+ return $b8hua$createComponent((0, $63f1f8dbcd07d3b0$export$d21e32dfedac04be), {
4588
+ get cols_at_size() {
4589
+ return modified_cols_at_size();
4203
4590
  },
4204
- get fallback() {
4205
- return rendered_placeholders();
4591
+ get override_vertical_spacing() {
4592
+ return layout_options_().override_vertical_spacing;
4206
4593
  },
4207
- children: product_cards_when_data
4594
+ get grid_spacing() {
4595
+ return layout_options_().grid_spacing;
4596
+ },
4597
+ rows: "all",
4598
+ layout: "grid",
4599
+ element_attributes: {
4600
+ class: "cards"
4601
+ },
4602
+ children: listing_contents
4208
4603
  });
4209
4604
  }
4210
4605
  })];
@@ -4213,40 +4608,10 @@ function $7faea0096f14b59b$export$3925f87b1545cfc6(_ref) {
4213
4608
  }
4214
4609
  })), $b8hua$escape(desktop_filter_elements_()));
4215
4610
  }
4216
- /**
4217
- * Changes cols_at_size depending on if filters are open or not so one card less is shown when the filters are open
4218
- * This function is special to the actual PLPResults.
4219
- */
4220
- function $7faea0096f14b59b$var$make_modified_cols_at_size(_ref3) {
4221
- let {
4222
- layout_options_: layout_options_,
4223
- sort_or_filter_open_: sort_or_filter_open_
4224
- } = _ref3;
4225
- return $b8hua$createMemo(() => {
4226
- const layout_options = layout_options_();
4227
- // Add grid styling that changes when filters get opened/closed
4228
- const when_filters_closed_cols = layout_options.cols_at_size;
4229
- return sort_or_filter_open_() ? when_filters_closed_cols.map(row => {
4230
- const [num_cols_default,,,, override_cols] = row;
4231
- const cloned_row = [...row];
4232
- // @ts-ignore
4233
- cloned_row[0] = num_cols_default - 1;
4234
- if (override_cols)
4235
- // @ts-ignore
4236
- cloned_row[4] = {
4237
- overrides: Object.fromEntries(Object.entries(override_cols.overrides).map(_ref4 => {
4238
- let [row, column] = _ref4;
4239
- return [row, column - 1];
4240
- }))
4241
- };
4242
- return cloned_row;
4243
- }) : when_filters_closed_cols;
4244
- });
4245
- }
4246
4611
  const $cfdbd124dd09d713$var$_tmpl$ = ["<div", ' class="sorting-attributes">', "</div>"],
4247
4612
  $cfdbd124dd09d713$var$_tmpl$2 = ["<div", ' class="sorting-direction">', "</div>"],
4248
- $cfdbd124dd09d713$var$_tmpl$3 = ["<div", '><div class="input-row"><input type="radio"', '><span class="custom-indicator"></span><!--#-->', "<!--/--></div></div>"],
4249
- $cfdbd124dd09d713$var$_tmpl$4 = ["<div", '><label class="input-row"><input type="radio"', "", '><span class="custom-indicator"></span><!--#-->', "<!--/--></label></div>"];
4613
+ $cfdbd124dd09d713$var$_tmpl$3 = ["<div", '><div class="input-row"><input type="radio"', '><span class="custom-indicator"></span><!--$-->', "<!--/--></div></div>"],
4614
+ $cfdbd124dd09d713$var$_tmpl$4 = ["<div", '><label class="input-row"><input type="radio"', "", '><span class="custom-indicator"></span><!--$-->', "<!--/--></label></div>"];
4250
4615
  function $cfdbd124dd09d713$export$1f1775a58da589b5(_ref) {
4251
4616
  let {
4252
4617
  available_sortings_: available_sortings_,
@@ -4354,24 +4719,22 @@ const $79af35736fe8e5c8$var$_tmpl$ = '<path d="M6.199 10.254a.35.35 0 0 0-.496 0
4354
4719
  $79af35736fe8e5c8$var$_tmpl$2 = '<path d="M10.852 6.301H8.051a.35.35 0 0 1-.352-.352V4.551a.35.35 0 0 1 .352-.352h2.801a.35.35 0 0 1 .348.352v1.398a.35.35 0 0 1-.348.352zm-2.453-.699H10.5v-.703H8.398zm3.851 3.5H8.051c-.195 0-.352-.16-.352-.352V7.352A.35.35 0 0 1 8.051 7h4.199c.191 0 .352.156.352.352V8.75c0 .191-.16.352-.352.352zm-3.852-.703h3.5V7.7h-3.5zm5.25 3.499H8.051a.35.35 0 0 1-.352-.348v-1.402a.35.35 0 0 1 .352-.348h5.598a.35.35 0 0 1 .352.348v1.402a.35.35 0 0 1-.352.348zm-5.25-.699H13.3V10.5H8.398zm0 0"></path>';
4355
4720
  function $79af35736fe8e5c8$export$da32f7add8a22e86() {
4356
4721
  let props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
4357
- return $b8hua$ssrElement("svg", () => ({
4358
- "xmlns": "http://www.w3.org/2000/svg",
4359
- "width": "14",
4360
- "height": "14",
4361
- "class": "sort-icon",
4362
- ...props
4363
- }), () => [$b8hua$ssr($79af35736fe8e5c8$var$_tmpl$), $b8hua$ssr($79af35736fe8e5c8$var$_tmpl$2)], true);
4722
+ return $b8hua$ssrElement("svg", $b8hua$mergeProps({
4723
+ xmlns: "http://www.w3.org/2000/svg",
4724
+ width: "14",
4725
+ height: "14",
4726
+ "class": "sort-icon"
4727
+ }, props), () => [$b8hua$ssr($79af35736fe8e5c8$var$_tmpl$), $b8hua$ssr($79af35736fe8e5c8$var$_tmpl$2)], true);
4364
4728
  }
4365
4729
  const $73e3c96bc365e0e9$var$_tmpl$ = '<path d="M6.199 10.254a.35.35 0 0 0-.496 0L3.5 12.453V.348a.35.35 0 0 0-.7 0v12.105L.598 10.254c-.137-.137-.359-.137-.492 0a.35.35 0 0 0 0 .492l2.797 2.801a.35.35 0 0 0 .496 0L6.2 10.746c.137-.137.137-.355 0-.492zm3.25 1.644H8.051a.35.35 0 0 1-.352-.348v-1.402a.35.35 0 0 1 .352-.348h1.398a.35.35 0 0 1 .352.348v1.402a.35.35 0 0 1-.352.348zm-1.051-.699h.703V10.5h-.703zm2.454-2.097H8.051c-.195 0-.352-.16-.352-.352V7.352A.35.35 0 0 1 8.051 7h2.801a.35.35 0 0 1 .348.352V8.75c0 .191-.156.352-.348.352zm-2.453-.703H10.5V7.7H8.398zm3.851-2.098H8.051a.35.35 0 0 1-.352-.352V4.551a.35.35 0 0 1 .352-.352h4.199c.191 0 .352.156.352.352v1.398c0 .195-.16.352-.352.352zm-3.852-.699h3.5v-.703h-3.5zm5.25-2.102H8.051a.35.35 0 0 1-.352-.352V1.75c0-.191.156-.352.352-.352h5.598c.195 0 .352.16.352.352v1.398a.35.35 0 0 1-.352.352zm-5.25-.699H13.3v-.699H8.398zm0 0"></path>';
4366
4730
  function $73e3c96bc365e0e9$export$d10e63059ddb9fd4() {
4367
4731
  let props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
4368
- return $b8hua$ssrElement("svg", () => ({
4369
- "xmlns": "http://www.w3.org/2000/svg",
4370
- "width": "14",
4371
- "height": "14",
4372
- "class": "sort-icon",
4373
- ...props
4374
- }), () => $b8hua$ssr($73e3c96bc365e0e9$var$_tmpl$), true);
4732
+ return $b8hua$ssrElement("svg", $b8hua$mergeProps({
4733
+ xmlns: "http://www.w3.org/2000/svg",
4734
+ width: "14",
4735
+ height: "14",
4736
+ "class": "sort-icon"
4737
+ }, props), () => $b8hua$ssr($73e3c96bc365e0e9$var$_tmpl$), true);
4375
4738
  }
4376
4739
  const $05f67356defcdd65$var$_tmpl$ = ["<svg", ' xmlns="http://www.w3.org/2000/svg" width="14" height="15" class="filter-icon"><path d="M1.75 14.697c-.096 0-.178-.034-.246-.103s-.103-.15-.103-.246V8.75c0-.096.034-.178.103-.246s.15-.103.246-.103.178.034.246.103.103.15.103.246v5.599c0 .096-.034.178-.103.246s-.15.103-.246.103zm0-9.796c-.096 0-.178-.034-.246-.103s-.103-.15-.103-.246v-3.5c0-.1.034-.185.103-.253s.15-.103.246-.103.178.034.246.103.103.153.103.253v3.5c0 .096-.034.178-.103.246s-.15.103-.246.103zm.697 2.796H1.053c-.292 0-.54-.103-.745-.308S0 6.938 0 6.651s.103-.54.308-.745.453-.308.745-.308h1.395c.292 0 .54.103.745.308s.308.453.308.745-.103.533-.308.738-.453.308-.745.308zM1.053 6.303c-.1 0-.185.034-.253.103s-.103.15-.103.246.034.178.103.246S.952 7 1.053 7h1.395c.1 0 .185-.034.253-.103s.103-.15.103-.246-.034-.178-.103-.246-.153-.103-.253-.103H1.053zm5.599 8.395c-.096 0-.178-.034-.246-.103s-.103-.15-.103-.246v-2.796c0-.1.034-.184.103-.253s.15-.102.246-.102.178.034.246.102.103.153.103.253v2.796c0 .096-.034.178-.103.246s-.15.103-.246.103zm0-7c-.096 0-.178-.034-.246-.103s-.103-.15-.103-.246V1.053c0-.1.034-.185.103-.253s.15-.103.246-.103.178.034.246.103S7 .952 7 1.053v6.296c0 .096-.034.178-.103.246s-.15.103-.246.103zm.697 2.803H5.947c-.287 0-.533-.102-.738-.308s-.308-.453-.308-.745.103-.533.308-.738.451-.308.738-.308h1.401c.292 0 .54.103.745.308s.308.451.308.738-.103.54-.308.745-.453.308-.745.308zM5.947 9.099c-.096 0-.178.034-.246.103s-.103.15-.103.246.034.185.103.253.15.103.246.103h1.401c.096 0 .178-.034.246-.103s.103-.153.103-.253-.034-.178-.103-.246-.15-.103-.246-.103H5.947zm5.605 5.599c-.1 0-.184-.034-.253-.103s-.102-.15-.102-.246v-7c0-.096.034-.178.102-.246S11.453 7 11.553 7s.178.034.246.103.103.15.103.246v7c0 .096-.034.178-.103.246s-.15.103-.246.103zm0-11.197c-.1 0-.184-.034-.253-.103s-.102-.15-.102-.246V1.053c0-.1.034-.185.102-.253s.153-.103.253-.103.178.034.246.103.103.153.103.253v2.099c0 .096-.034.178-.103.246s-.15.103-.246.103zm.697 2.803h-1.401c-.287 0-.533-.103-.738-.308s-.308-.453-.308-.745.103-.54.308-.745.451-.308.738-.308h1.401c.292 0 .54.103.745.308s.308.453.308.745-.102.54-.308.745-.453.308-.745.308zm-1.401-1.401c-.096 0-.178.034-.246.103s-.102.15-.102.246.034.178.102.246.15.103.246.103h1.401c.096 0 .178-.034.246-.103s.102-.15.102-.246-.034-.178-.102-.246-.15-.103-.246-.103h-1.401z"></path></svg>'];
4377
4740
  function $05f67356defcdd65$export$28f6150e232898de() {
@@ -4387,9 +4750,9 @@ function $6fcb97029a69ec44$export$50f68cc9882e36a4(args_for_filtering) {
4387
4750
  return ((_args_for_filtering$a = args_for_filtering.available_filters_()) === null || _args_for_filtering$a === void 0 ? void 0 : _args_for_filtering$a.length) === 0 && !((_args_for_filtering$s = args_for_filtering.selected_filters_[0]()) !== null && _args_for_filtering$s !== void 0 && _args_for_filtering$s.length);
4388
4751
  }
4389
4752
  const $082c4ed3e22f8d71$var$_tmpl$ = ["<button", ' class="clear minor">', "</button>"],
4390
- $082c4ed3e22f8d71$var$_tmpl$2 = ["<div", ' class="depict plp" id="depict-filter-sort-mobile-modal-container"><div class="depict-filter-sort-modal-backdrop"></div><button class="dismiss-modal"', ">", '</button><div class="filter-sort-modal"><div class="body" style="', '"><!--#-->', "<!--/--><!--#-->", '<!--/--></div><div class="bottom-row"><!--#-->', '<!--/--><button class="show-results major">', "</button></div></div></div>"],
4753
+ $082c4ed3e22f8d71$var$_tmpl$2 = ["<div", ' class="depict plp" id="depict-filter-sort-mobile-modal-container"><div class="depict-filter-sort-modal-backdrop"></div><button class="dismiss-modal"', ">", '</button><div class="filter-sort-modal"><div class="body" style="', '"><!--$-->', "<!--/--><!--$-->", '<!--/--></div><div class="bottom-row"><!--$-->', '<!--/--><button class="show-results major">', "</button></div></div></div>"],
4391
4754
  $082c4ed3e22f8d71$var$_tmpl$3 = ["<details", ' class="sorting"></details>'],
4392
- $082c4ed3e22f8d71$var$_tmpl$4 = ["<summary", ' class="sort-filter-summary"><div class="summary"><div class="left-els"><!--#-->', "<!--/--><span>", "</span></div><!--#-->", "<!--/--></div></summary>"],
4755
+ $082c4ed3e22f8d71$var$_tmpl$4 = ["<summary", ' class="sort-filter-summary"><div class="summary"><div class="left-els"><!--$-->', "<!--/--><span>", "</span></div><!--$-->", "<!--/--></div></summary>"],
4393
4756
  $082c4ed3e22f8d71$var$_tmpl$5 = ["<div", ' class="body">', "</div>"],
4394
4757
  $082c4ed3e22f8d71$var$_tmpl$6 = ["<details", ' class="filters"></details>'],
4395
4758
  $082c4ed3e22f8d71$var$_tmpl$7 = ["<b", ">", "</b>"];
@@ -4504,10 +4867,10 @@ function $bce10e104a1dd893$export$cb808a3c41736d8e() {
4504
4867
  }
4505
4868
  const $7396052a1484264f$var$_tmpl$ = ["<div", ' class="filters"><div class="body">', "</div></div>"],
4506
4869
  $7396052a1484264f$var$_tmpl$2 = ["<div", ' class="sorting"><div class="body">', "</div></div>"],
4507
- $7396052a1484264f$var$_tmpl$3 = ["<div", ' class="sort-and-filter-buttons"><div class="outer"><div class="inner"><!--#-->', "<!--/--><!--#-->", "<!--/--><!--#-->", "<!--/--></div></div></div>"],
4870
+ $7396052a1484264f$var$_tmpl$3 = ["<div", ' class="sort-and-filter-buttons"><div class="outer"><div class="inner"><!--$-->', "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--></div></div></div>"],
4508
4871
  $7396052a1484264f$var$_tmpl$4 = ["<span", ' class="num-filters" style="', '">', "</span>"],
4509
- $7396052a1484264f$var$_tmpl$5 = ["<div", ' class="open-filters-button-container" style="', '"><!--#-->', "<!--/--><button", ' class="', '" type="button"', ' style="', '"><!--#-->', "<!--/--><span>", "</span></button></div>"],
4510
- $7396052a1484264f$var$_tmpl$6 = ["<button", ' class="', '"', ' style="', '"><span>', "</span><!--#-->", "<!--/--></button>"];
4872
+ $7396052a1484264f$var$_tmpl$5 = ["<div", ' class="open-filters-button-container" style="', '"><!--$-->', "<!--/--><button", ' class="', '" type="button"', ' style="', '"><!--$-->', "<!--/--><span>", "</span></button></div>"],
4873
+ $7396052a1484264f$var$_tmpl$6 = ["<button", ' class="', '"', ' style="', '"><span>', "</span><!--$-->", "<!--/--></button>"];
4511
4874
  function $7396052a1484264f$export$d7841e452f2e59a8(_ref) {
4512
4875
  let {
4513
4876
  current_sorting_: current_sorting_,
@@ -5487,10 +5850,10 @@ function $3a2bed57c9a57e21$export$d31a1a1a83ad9413(plp_results_, _ref) {
5487
5850
  set_selected_filters(new_filters);
5488
5851
  });
5489
5852
  }
5490
- const $4b4b262708b516ee$var$_tmpl$ = ["<div", ' class="product-count"><!--#-->', "<!--/--> <!--#-->", "<!--/--></div>"],
5853
+ const $4b4b262708b516ee$var$_tmpl$ = ["<div", ' class="product-count"><!--$-->', "<!--/--> <!--$-->", "<!--/--></div>"],
5491
5854
  $4b4b262708b516ee$var$_tmpl$2 = ["<div", "></div>"],
5492
- $4b4b262708b516ee$var$_tmpl$3 = ["<div", ' class="filter-results-for-one-row"><!--#-->', "<!--/--><!--#-->", "<!--/--></div>"],
5493
- $4b4b262708b516ee$var$_tmpl$4 = ["<div", ' class="depict plp category"><div class="listing-page"><!--#-->', "<!--/--><!--#-->", "<!--/--><!--#-->", "<!--/--><!--#-->", "<!--/--><!--#-->", "<!--/--><!--#-->", "<!--/--></div><!--#-->", "<!--/--><!--#-->", "<!--/--></div>"];
5855
+ $4b4b262708b516ee$var$_tmpl$3 = ["<div", ' class="filter-results-for-one-row"><!--$-->', "<!--/--><!--$-->", "<!--/--></div>"],
5856
+ $4b4b262708b516ee$var$_tmpl$4 = ["<div", ' class="depict plp category"><div class="listing-page"><!--$-->', "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--></div><!--$-->", "<!--/--><!--$-->", "<!--/--></div>"];
5494
5857
  function $4b4b262708b516ee$export$f7d2f673fc2f091d(_ref) {
5495
5858
  var _on_filters_construct;
5496
5859
  let {
@@ -5520,7 +5883,8 @@ function $4b4b262708b516ee$export$f7d2f673fc2f091d(_ref) {
5520
5883
  product_card_template_: product_card_template_,
5521
5884
  sideways_filter_clearing_flag_: sideways_filter_clearing_flag_,
5522
5885
  sorting_query_param_: sorting_query_param_,
5523
- filter_query_param_prefix_: filter_query_param_prefix_
5886
+ filter_query_param_prefix_: filter_query_param_prefix_,
5887
+ content_blocks_by_row_: content_blocks_by_row_
5524
5888
  } = _ref;
5525
5889
  let results_for;
5526
5890
  let only_show_filters_opener_;
@@ -5796,6 +6160,7 @@ function $4b4b262708b516ee$export$f7d2f673fc2f091d(_ref) {
5796
6160
  product_card_template_: product_card_template_,
5797
6161
  sort_or_filter_open_: sort_or_filter_open_,
5798
6162
  desktop_filter_elements_: desktop_filter_elements_,
6163
+ content_blocks_by_row_: content_blocks_by_row_,
5799
6164
  id_currently_querying_for_: query_id_,
5800
6165
  no_results_options_: {
5801
6166
  selected_filters_: selected_filters_,
@@ -6402,6 +6767,7 @@ function $f5f54892fd0c7d9f$export$e2bf8ce7779e827e(props) {
6402
6767
  expanded_hierarchical_filters_: expanded_hierarchical_filters_,
6403
6768
  selected_filters_: selected_filters_,
6404
6769
  sideways_filter_clearing_flag_: sideways_filter_clearing_flag_,
6770
+ content_blocks_by_row_: () => props.content_blocks_by_row,
6405
6771
  scroll_restoration_data_: scroll_restoration_data_,
6406
6772
  layout_options_: $b8hua$createMemo(() => ({
6407
6773
  cols_at_size: $a9c7ba6087881ac2$export$6daf8749b65a1b77(props.cols_at_size),
@@ -6467,7 +6833,7 @@ function $f5f54892fd0c7d9f$var$get_shared_properties(depict_category) {
6467
6833
  if (!shared_properties) throw new Error("Can't connect to provided DepictCategory instance");
6468
6834
  return shared_properties;
6469
6835
  }
6470
- const $fa332ea03168857c$var$_tmpl$ = ["<div", ' class="category-title"><h1 class="title">', '</h1><span class="explanation"> — <!--#-->', "<!--/--></span></div>"];
6836
+ const $fa332ea03168857c$var$_tmpl$ = ["<div", ' class="category-title"><h1 class="title">', '</h1><span class="explanation"> — <!--$-->', "<!--/--></span></div>"];
6471
6837
  const $fa332ea03168857c$export$b91cec6bdc6b32a1 = /*@__PURE__*/(() => {
6472
6838
  const actual_function = _ref => {
6473
6839
  let {
@@ -6483,7 +6849,7 @@ const $fa332ea03168857c$export$b91cec6bdc6b32a1 = /*@__PURE__*/(() => {
6483
6849
  actual_function[(0, $ec8a6e10026dcff9$export$5c28802497c8a83c)] = "simple";
6484
6850
  return actual_function;
6485
6851
  })();
6486
- const $702d7656a373973e$var$_tmpl$ = ["<div", ' class="sort-and-filter-buttons fake" aria-hidden="true" style="position:absolute;z-index:-1;pointer-events:none;opacity:0"><div class="outer"><div class="inner"><!--#-->', "<!--/--><!--#-->", "<!--/--><!--#-->", "<!--/--></div></div></div>"];
6852
+ const $702d7656a373973e$var$_tmpl$ = ["<div", ' class="sort-and-filter-buttons fake" aria-hidden="true" style="position:absolute;z-index:-1;pointer-events:none;opacity:0"><div class="outer"><div class="inner"><!--$-->', "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--></div></div></div>"];
6487
6853
  const $702d7656a373973e$export$824dde41348efed1 = /*@__PURE__*/(() => {
6488
6854
  const actual_function = _ref => {
6489
6855
  let {
@@ -6634,37 +7000,6 @@ async function $96fd967c5b358ead$var$download_categories(tenant, market, type) {
6634
7000
  return [];
6635
7001
  }
6636
7002
  }
6637
- function $3ab4aa97880fb88d$export$3f37af283f8fb843(props) {
6638
- const style = $b8hua$createMemo(() => {
6639
- const {
6640
- style: style,
6641
- height: height,
6642
- width: width,
6643
- aspectRatio: aspectRatio
6644
- } = props;
6645
- const is_image = aspectRatio != undefined;
6646
- const size_data = is_image ? {
6647
- width: "100%",
6648
- "padding-bottom": 1 / aspectRatio * 100 + "%"
6649
- } : {
6650
- width: width,
6651
- height: height
6652
- };
6653
- return {
6654
- display: "block",
6655
- ...(style || {}),
6656
- ...size_data
6657
- };
6658
- });
6659
- return $b8hua$createComponent((0, $bc2337c9a05ecd18$export$acb3eaade4b23afd), {
6660
- get style() {
6661
- return style();
6662
- },
6663
- get ["class"]() {
6664
- return props.class;
6665
- }
6666
- });
6667
- }
6668
7003
  const $5eaa00b951637e96$var$_tmpl$ = ["<div", ' class="instant-card"><div class="img-part">', '</div><div class="right-part"><div class="title-brand-tagline"><span class="title">', "</span></div></div></div>"];
6669
7004
  function $5eaa00b951637e96$export$ee1733d9a8495996() {
6670
7005
  return $b8hua$ssr($5eaa00b951637e96$var$_tmpl$, $b8hua$ssrHydrationKey(), $b8hua$escape($b8hua$createComponent((0, $3ab4aa97880fb88d$export$3f37af283f8fb843), {
@@ -6675,7 +7010,7 @@ function $5eaa00b951637e96$export$ee1733d9a8495996() {
6675
7010
  })));
6676
7011
  }
6677
7012
  const $dea31647b99a443b$var$_tmpl$ = ["<span", ' class="parent-title">', "</span>"],
6678
- $dea31647b99a443b$var$_tmpl$2 = ["<a", ' class="category-suggestion"', '><span class="title">', "</span><!--#-->", "<!--/--></a>"];
7013
+ $dea31647b99a443b$var$_tmpl$2 = ["<a", ' class="category-suggestion"', '><span class="title">', "</span><!--$-->", "<!--/--></a>"];
6679
7014
  function $dea31647b99a443b$export$d757d54550ebfb3d(_ref) {
6680
7015
  let {
6681
7016
  category_suggestion_: category_suggestion_,
@@ -6697,15 +7032,14 @@ function $ecc323d9c29305ee$export$1c641004b5485fed() {
6697
7032
  const $ef0f18a578b32578$var$_tmpl$ = '<path d="M19.811 20.174l-6.234-6.809a7.96 7.96 0 0 0 .923-1.179c.274-.424.502-.865.687-1.323a8.04 8.04 0 0 0 .42-1.436 7.88 7.88 0 0 0 .144-1.507c0-.526-.051-1.042-.154-1.548-.096-.506-.243-.995-.441-1.466s-.441-.919-.728-1.343a8.28 8.28 0 0 0-.984-1.21 7.86 7.86 0 0 0-1.2-.984A7.56 7.56 0 0 0 10.89.651C10.418.453 9.929.302 9.423.2S8.401.046 7.875.046 6.833.097 6.327.2 5.332.453 4.86.651a7.56 7.56 0 0 0-1.354.718c-.431.287-.831.615-1.2.984a8.28 8.28 0 0 0-.984 1.21 7.73 7.73 0 0 0-.728 1.343c-.198.472-.349.96-.451 1.466A8.31 8.31 0 0 0 0 7.921a8.31 8.31 0 0 0 .144 1.548c.103.506.253.995.451 1.466a8.08 8.08 0 0 0 .728 1.354 7.86 7.86 0 0 0 .984 1.2 7.54 7.54 0 0 0 1.2.995c.431.287.882.53 1.354.728.472.191.96.338 1.466.441a8.31 8.31 0 0 0 1.548.144c.451 0 .896-.038 1.333-.113a7.83 7.83 0 0 0 1.282-.328 7.55 7.55 0 0 0 1.2-.533 8.08 8.08 0 0 0 1.107-.749l6.245 6.809a.45.45 0 0 0 .174.123.55.55 0 0 0 .205.041.61.61 0 0 0 .195-.031c.061-.021.116-.055.164-.102.109-.096.164-.219.164-.369.007-.144-.038-.267-.133-.369zM1.046 7.921c0-.937.178-1.818.533-2.646.362-.834.851-1.559 1.466-2.174.622-.615 1.347-1.101 2.174-1.456.827-.362 1.712-.543 2.656-.543s1.829.181 2.656.543c.827.355 1.548.841 2.164 1.456.622.615 1.111 1.34 1.466 2.174a6.52 6.52 0 0 1 .543 2.646c0 .943-.181 1.829-.543 2.656a6.89 6.89 0 0 1-1.466 2.174c-.615.615-1.336 1.104-2.164 1.466-.827.356-1.712.533-2.656.533s-1.829-.178-2.656-.533c-.827-.362-1.552-.851-2.174-1.466-.615-.622-1.104-1.347-1.466-2.174-.355-.827-.533-1.712-.533-2.656z"></path>';
6698
7033
  function $ef0f18a578b32578$export$82eafebb825fc23f() {
6699
7034
  let props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
6700
- return $b8hua$ssrElement("svg", () => ({
6701
- ...props,
6702
- "xmlns": "http://www.w3.org/2000/svg",
6703
- "width": "20",
6704
- "height": "22"
7035
+ return $b8hua$ssrElement("svg", $b8hua$mergeProps(props, {
7036
+ xmlns: "http://www.w3.org/2000/svg",
7037
+ width: "20",
7038
+ height: "22"
6705
7039
  }), () => $b8hua$ssr($ef0f18a578b32578$var$_tmpl$), true);
6706
7040
  }
6707
7041
  const $584c06c09cf4609d$var$_tmpl$ = ["<button", ' class="back" type="button"', ">", "</button>"],
6708
- $584c06c09cf4609d$var$_tmpl$2 = ["<div", ' class="search-field"><!--#-->', '<!--/--><div class="field"><input class="', '" tabindex="0"', '><button type="button" class="clear"', ' style="', '">', '</button></div><button class="submit major" type="button"', ">", "</button></div>"];
7042
+ $584c06c09cf4609d$var$_tmpl$2 = ["<div", ' class="search-field"><!--$-->', '<!--/--><div class="field"><input class="', '" tabindex="0"', '><button type="button" class="clear"', ' style="', '">', '</button></div><button class="submit major" type="button"', ">", "</button></div>"];
6709
7043
  function $584c06c09cf4609d$export$b94867ecbd698f21(_ref) {
6710
7044
  let {
6711
7045
  search_field_value_: search_field_value_,
@@ -6737,7 +7071,7 @@ function $584c06c09cf4609d$export$b94867ecbd698f21(_ref) {
6737
7071
  }
6738
7072
  })), "query ".concat(!!on_back_ ? "has-adjacent-back-button" : ""), $b8hua$ssrAttribute("aria-label", $b8hua$escape(i18n_.search_field_field_aria_label_(), true), false) + $b8hua$ssrAttribute("value", $b8hua$escape(search_field_value_[0](), true), false) + $b8hua$ssrAttribute("placeholder", $b8hua$escape(i18n_.placeholder_text_(), true), false), $b8hua$ssrAttribute("title", $b8hua$escape(i18n_.clear_filters_query_sorting_after_submit_(), true), false), $b8hua$ssrStyle($b8hua$createMemo(() => search_field_value_[0]() ? "" : "display: none")()), $b8hua$escape($b8hua$createComponent((0, $9783d437ad61594c$export$3b621d86b1566b2), {})), $b8hua$ssrAttribute("aria-label", $b8hua$escape(i18n_.search_submit_button_aria_label_(), true), false), $b8hua$escape($b8hua$createComponent((0, $ef0f18a578b32578$export$82eafebb825fc23f), {})));
6739
7073
  }
6740
- const $8ef6232475d44150$var$_tmpl$ = ["<div", ' class="search-recs"><h3 class="search-recs-title">', "</h3><!--#-->", "<!--/--><!--#-->", "<!--/--></div>"],
7074
+ const $8ef6232475d44150$var$_tmpl$ = ["<div", ' class="search-recs"><h3 class="search-recs-title">', "</h3><!--$-->", "<!--/--><!--$-->", "<!--/--></div>"],
6741
7075
  $8ef6232475d44150$var$_tmpl$2 = ["<button", ' class="show-more major" type="button">', "</button>"];
6742
7076
  const $8ef6232475d44150$export$1c8c715550dc689d = 2;
6743
7077
  function $8ef6232475d44150$export$7de92c4c2205ebf3(_ref) {
@@ -6979,8 +7313,8 @@ async function $86b0ff0c85e5fc6c$export$e16630ecb9644a1c(_ref) {
6979
7313
  const $b65f93acbf91da56$export$27b710c08412a7ad = obj => {
6980
7314
  return Object.fromEntries(Object.keys(obj).map(key => [key, obj[key]()]));
6981
7315
  };
6982
- const $9a693c7e832d3f18$var$_tmpl$ = ["<span", ' class="orig price"><!--#-->', "<!--/--><!--#-->", "<!--/--><!--#-->", "<!--/--></span>"],
6983
- $9a693c7e832d3f18$var$_tmpl$2 = ["<a", ' class="instant-card"', '><div class="img-part">', '</div><div class="right-part"><div class="title-brand-tagline"><span class="brand">', '</span><span class="title line-clamp">', "</span><!--#-->", '<!--/--></div><div class="price-container"><!--#-->', '<!--/--><span class="', '"><!--#-->', "<!--/--><!--#-->", "<!--/--><!--#-->", "<!--/--></span></div></div></a>"],
7316
+ const $9a693c7e832d3f18$var$_tmpl$ = ["<span", ' class="orig price"><!--$-->', "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--></span>"],
7317
+ $9a693c7e832d3f18$var$_tmpl$2 = ["<a", ' class="instant-card"', '><div class="img-part">', '</div><div class="right-part"><div class="title-brand-tagline"><span class="brand">', '</span><span class="title line-clamp">', "</span><!--$-->", '<!--/--></div><div class="price-container"><!--$-->', '<!--/--><span class="', '"><!--$-->', "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--></span></div></div></a>"],
6984
7318
  $9a693c7e832d3f18$var$_tmpl$3 = ["<div", ' class="tagline">', "</div>"];
6985
7319
  const $9a693c7e832d3f18$export$b05c0ae390cf3e06 = (display_or_variant_container, _ref, router_) => {
6986
7320
  let {
@@ -7164,7 +7498,7 @@ function $6d95ef50ee01d5a1$export$5d2caaa6b530761c() {
7164
7498
  return $b8hua$ssr($6d95ef50ee01d5a1$var$_tmpl$, $b8hua$ssrHydrationKey());
7165
7499
  }
7166
7500
  const $494c9ad553139dbc$var$_tmpl$ = ["<div", ' class="previous-searches"><h2 class="text">', '</h2><div class="list">', "</div></div>"],
7167
- $494c9ad553139dbc$var$_tmpl$2 = ["<a", ' class="', '"', '><div class="left"><!--#-->', '<!--/--><span class="line-clamp"', ">", '</span></div><button class="delete"', ">", "</button></a>"];
7501
+ $494c9ad553139dbc$var$_tmpl$2 = ["<a", ' class="', '"', '><div class="left"><!--$-->', '<!--/--><span class="line-clamp"', ">", '</span></div><button class="delete"', ">", "</button></a>"];
7168
7502
  function $494c9ad553139dbc$export$a146ac6fa8346a25(_ref) {
7169
7503
  let {
7170
7504
  text_: text_,
@@ -7271,23 +7605,22 @@ function $02b6641aa50ce528$export$ba17c5b7e6dda39f(_ref) {
7271
7605
  const $3c5e15c6ee4227a9$var$_tmpl$ = '<path d="M56 26.455a13.71 13.71 0 0 0-9.578 3.967A13.71 13.71 0 0 0 42.455 40v176a13.71 13.71 0 0 0 3.967 9.578A13.71 13.71 0 0 0 56 229.545h144A13.71 13.71 0 0 0 213.545 216V88a2.456 2.456 0 0 1 0-.002c.001-1.452-.597-2.895-1.623-3.922l-55.998-55.998a5.61 5.61 0 0 0-3.922-1.623 2.456 2.456 0 0 1-.002 0zm0 11.09h88A2.456 2.456 0 0 1 146.455 40v48c0 2.903 2.642 5.545 5.545 5.545h48A2.456 2.456 0 0 1 202.455 96v120a2.456 2.456 0 0 1-2.455 2.455H56A2.456 2.456 0 0 1 53.545 216V40A2.456 2.456 0 0 1 56 37.545zm103.061 11.498a2.456 2.456 0 0 1 2.676.531l28.689 28.689a2.456 2.456 0 0 1-1.736 4.191H160A2.456 2.456 0 0 1 157.545 80V51.311a2.456 2.456 0 0 1 1.516-2.268zM96 130.455c-2.903 0-5.545 2.642-5.545 5.545s2.642 5.545 5.545 5.545h64c2.903 0 5.545-2.642 5.545-5.545s-2.642-5.545-5.545-5.545zm0 32c-2.903 0-5.545 2.642-5.545 5.545s2.642 5.545 5.545 5.545h64c2.903 0 5.545-2.642 5.545-5.545s-2.642-5.545-5.545-5.545z"></path>';
7272
7606
  function $3c5e15c6ee4227a9$export$605674723bcc715c() {
7273
7607
  let props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
7274
- return $b8hua$ssrElement("svg", () => ({
7275
- "xmlns": "http://www.w3.org/2000/svg",
7276
- "width": "32",
7277
- "height": "32",
7278
- "viewBox": "0 0 256 256",
7279
- ...props
7280
- }), () => $b8hua$ssr($3c5e15c6ee4227a9$var$_tmpl$), true);
7608
+ return $b8hua$ssrElement("svg", $b8hua$mergeProps({
7609
+ xmlns: "http://www.w3.org/2000/svg",
7610
+ width: "32",
7611
+ height: "32",
7612
+ viewBox: "0 0 256 256"
7613
+ }, props), () => $b8hua$ssr($3c5e15c6ee4227a9$var$_tmpl$), true);
7281
7614
  }
7282
7615
  const $40dd3f46f55d62ba$var$_tmpl$ = ["<a", ' class="', '"', ">", "</a>"],
7283
7616
  $40dd3f46f55d62ba$var$_tmpl$2 = ["<div", ' class="search-icon">', "</div>"],
7284
7617
  $40dd3f46f55d62ba$var$_tmpl$3 = ["<span", ' class="type">', "</span>"],
7285
- $40dd3f46f55d62ba$var$_tmpl$4 = ["<div", ' class="with-parent-title"><!--#-->', '<!--/--><span class="value line-clamp">', "</span></div>"],
7286
- $40dd3f46f55d62ba$var$_tmpl$5 = ["<div", ' class="with-icon"><!--#-->', "<!--/--><!--#-->", "<!--/--></div>"],
7618
+ $40dd3f46f55d62ba$var$_tmpl$4 = ["<div", ' class="with-parent-title"><!--$-->', '<!--/--><span class="value line-clamp">', "</span></div>"],
7619
+ $40dd3f46f55d62ba$var$_tmpl$5 = ["<div", ' class="with-icon"><!--$-->', "<!--/--><!--$-->", "<!--/--></div>"],
7287
7620
  $40dd3f46f55d62ba$var$_tmpl$6 = ["<h2", ' class="text">', "</h2>"],
7288
- $40dd3f46f55d62ba$var$_tmpl$7 = ["<div", ' class="suggestion-container query"><!--#-->', "<!--/--><!--#-->", "<!--/--></div>"],
7621
+ $40dd3f46f55d62ba$var$_tmpl$7 = ["<div", ' class="suggestion-container query"><!--$-->', "<!--/--><!--$-->", "<!--/--></div>"],
7289
7622
  $40dd3f46f55d62ba$var$_tmpl$8 = ["<div", ' class="suggestion-container page">', "</div>"],
7290
- $40dd3f46f55d62ba$var$_tmpl$9 = ["<div", ' class="', '"><!--#-->', "<!--/--><!--#-->", "<!--/--><!--#-->", "<!--/--></div>"];
7623
+ $40dd3f46f55d62ba$var$_tmpl$9 = ["<div", ' class="', '"><!--$-->', "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--></div>"];
7291
7624
  function $40dd3f46f55d62ba$export$e872e2339fb04a7f(_ref) {
7292
7625
  let {
7293
7626
  suggestion_memo_: suggestion_memo_,
@@ -7878,8 +8211,8 @@ function $a86e71c0015bd8ab$export$f021bdedd3ec901a(props) {
7878
8211
  }
7879
8212
  const $e82132ed97521828$var$_tmpl$ = ["<div", ' class="discover-more"><button class="major" type="button">', "</button></div>"],
7880
8213
  $e82132ed97521828$var$_tmpl$2 = ["<b", ">", "</b>"],
7881
- $e82132ed97521828$var$_tmpl$3 = ["<div", ' class="', '"><div class="', '"><!--#-->', '<!--/--><div class="padded"><!--#-->', "<!--/--><!--#-->", "<!--/--><!--#-->", "<!--/--></div><!--#-->", "<!--/--></div><!--#-->", "<!--/--></div>"],
7882
- $e82132ed97521828$var$_tmpl$4 = ["<div", ' class="', '"><div class="depict-search-modal-backdrop"></div><!--#-->', "<!--/--></div>"];
8214
+ $e82132ed97521828$var$_tmpl$3 = ["<div", ' class="', '"><div class="', '"><!--$-->', '<!--/--><div class="padded"><!--$-->', "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--></div><!--$-->", "<!--/--></div><!--$-->", "<!--/--></div>"],
8215
+ $e82132ed97521828$var$_tmpl$4 = ["<div", ' class="', '"><div class="depict-search-modal-backdrop"></div><!--$-->', "<!--/--></div>"];
7883
8216
  function $e82132ed97521828$export$1c593cbd6f1e10bc(_ref) {
7884
8217
  let {
7885
8218
  search_field_value_: props_search_field_value,
@@ -8384,7 +8717,7 @@ function $f3a159279dc1a8fb$var$segment_text(text, matched_strings) {
8384
8717
  return output;
8385
8718
  }
8386
8719
  const $22470de5f42cc35d$var$_tmpl$ = ["<div", ' class="description line-clamp">', "</div>"],
8387
- $22470de5f42cc35d$var$_tmpl$2 = ["<div", ' class="content-card"><div class="image">', '</div><div class="info"><!--#-->', "<!--/--><!--#-->", "<!--/--></div></div>"];
8720
+ $22470de5f42cc35d$var$_tmpl$2 = ["<div", ' class="content-card"><div class="image">', '</div><div class="info"><!--$-->', "<!--/--><!--$-->", "<!--/--></div></div>"];
8388
8721
  function $22470de5f42cc35d$export$f631859cab12b342(_ref) {
8389
8722
  let {
8390
8723
  router_: router_,
@@ -8524,7 +8857,7 @@ function $ad4f3c9872fbeb48$export$4405d077f0a20494(_ref) {
8524
8857
  children: () => $b8hua$createComponent((0, $22470de5f42cc35d$export$f631859cab12b342), {})
8525
8858
  });
8526
8859
  }
8527
- const $d53ebed6f63304e4$var$_tmpl$ = ["<div", ' class="content-results" style="', '"><!--#-->', "<!--/--><!--#-->", "<!--/--></div>"],
8860
+ const $d53ebed6f63304e4$var$_tmpl$ = ["<div", ' class="content-results" style="', '"><!--$-->', "<!--/--><!--$-->", "<!--/--></div>"],
8528
8861
  $d53ebed6f63304e4$var$_tmpl$2 = ["<button", ' class="view-more">', "</button>"],
8529
8862
  $d53ebed6f63304e4$var$_tmpl$3 = ["<button", ' class="view-less">', "</button>"];
8530
8863
  const $d53ebed6f63304e4$export$70ceae36059a1036 = 1;
@@ -8620,8 +8953,8 @@ function $d53ebed6f63304e4$var$make_state_saved_rows(_ref2, i18n_) {
8620
8953
  }));
8621
8954
  return rows;
8622
8955
  }
8623
- const $da279c5a540c6846$var$_tmpl$ = ["<div", ' class="filter-results-for-one-row"><!--#-->', "<!--/--><!--#-->", "<!--/--></div>"],
8624
- $da279c5a540c6846$var$_tmpl$2 = ["<div", ' class="depict plp search"><div class="listing-page"><!--#-->', "<!--/--><!--#-->", "<!--/--><!--#-->", "<!--/--><!--#-->", "<!--/--><!--#-->", "<!--/--><!--#-->", "<!--/--><!--#-->", "<!--/--></div><!--#-->", "<!--/--><!--#-->", "<!--/--></div>"];
8956
+ const $da279c5a540c6846$var$_tmpl$ = ["<div", ' class="filter-results-for-one-row"><!--$-->', "<!--/--><!--$-->", "<!--/--></div>"],
8957
+ $da279c5a540c6846$var$_tmpl$2 = ["<div", ' class="depict plp search"><div class="listing-page"><!--$-->', "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--></div><!--$-->", "<!--/--><!--$-->", "<!--/--></div>"];
8625
8958
  function $da279c5a540c6846$export$a54ec244c8863715(_ref) {
8626
8959
  let {
8627
8960
  depict_api_: depict_api_,
@@ -8655,7 +8988,8 @@ function $da279c5a540c6846$export$a54ec244c8863715(_ref) {
8655
8988
  router_: router_,
8656
8989
  content_results_rows_: content_results_rows_,
8657
8990
  content_layout_options_: content_layout_options_,
8658
- content_search_enabled_: content_search_enabled_
8991
+ content_search_enabled_: content_search_enabled_,
8992
+ content_blocks_by_row_: content_blocks_by_row_
8659
8993
  } = _ref;
8660
8994
  const [get_sorting] = current_sorting_;
8661
8995
  const all_products_loaded_ = $b8hua$createSignal(false);
@@ -8921,6 +9255,7 @@ function $da279c5a540c6846$export$a54ec244c8863715(_ref) {
8921
9255
  layout_options_: layout_options_,
8922
9256
  sort_or_filter_open_: sort_or_filter_open_,
8923
9257
  id_currently_querying_for_: get_search_query_,
9258
+ content_blocks_by_row_: content_blocks_by_row_,
8924
9259
  no_results_options_: {
8925
9260
  selected_filters_: selected_filters_,
8926
9261
  expanded_hierarchical_filters_: expanded_hierarchical_filters_,
@@ -9448,6 +9783,7 @@ function $eb064bc3350276c1$export$f2dc7e4e4aa11abb(props) {
9448
9783
  search_sorting_open_: state_.sorting_open,
9449
9784
  expanded_filters_: state_.expanded_filters,
9450
9785
  content_results_rows_: state_.content_results_rows,
9786
+ content_blocks_by_row_: () => props.content_blocks_by_row,
9451
9787
  router_: shared_properties.router_,
9452
9788
  make_category_suggestion_card_: shared_properties.enable_category_suggestions_ ? category_suggestion_ => {
9453
9789
  return $dea31647b99a443b$export$d757d54550ebfb3d({