@depict-ai/ui 4.7.29 → 4.7.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ES10/index.cjs +432 -438
- package/ES10/index.d.ts +100 -83
- package/ES10/index.js +470 -477
- package/latest/index.cjs +416 -422
- package/latest/index.d.ts +100 -83
- package/latest/index.js +453 -460
- package/package.json +1 -1
- package/server/ES10/index.cjs +246 -253
- package/server/ES10/index.d.ts +100 -83
- package/server/ES10/index.js +287 -295
- package/server/latest/index.cjs +229 -236
- package/server/latest/index.d.ts +100 -83
- package/server/latest/index.js +271 -279
package/latest/index.js
CHANGED
|
@@ -1,13 +1,413 @@
|
|
|
1
|
-
import { add_to_version_info as $9HbP8$add_to_version_info,
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { template as $9HbP8$template, getNextElement as $9HbP8$getNextElement, insert as $9HbP8$insert, createComponent as $9HbP8$createComponent, isServer as $9HbP8$isServer, effect as $9HbP8$effect, setAttribute as $9HbP8$setAttribute, mergeProps as $9HbP8$mergeProps, className as $9HbP8$className, spread as $9HbP8$spread, runHydrationEvents as $9HbP8$runHydrationEvents, addEventListener as $9HbP8$addEventListener, memo as $9HbP8$memo, delegateEvents as $9HbP8$delegateEvents, getNextMarker as $9HbP8$getNextMarker, classList as $9HbP8$classList, use as $9HbP8$use, style as $9HbP8$style, setProperty as $9HbP8$setProperty, Dynamic as $9HbP8$Dynamic } from "solid-js/web";
|
|
1
|
+
import { add_to_version_info as $9HbP8$add_to_version_info, layout_media_query_header as $9HbP8$layout_media_query_header, dwarn as $9HbP8$dwarn, javascript_media_query as $9HbP8$javascript_media_query, make_random_classname as $9HbP8$make_random_classname, n_col_styling_with_dist as $9HbP8$n_col_styling_with_dist, report as $9HbP8$report, slider_fading_factory as $9HbP8$slider_fading_factory, Amazing_Slider as $9HbP8$Amazing_Slider, slider_snap_css as $9HbP8$slider_snap_css, catchify as $9HbP8$catchify1, dlog as $9HbP8$dlog1, camelCasifyObject as $9HbP8$camelCasifyObject, useExpandingContainer as $9HbP8$useExpandingContainer, fetch_retry as $9HbP8$fetch_retry, base_url as $9HbP8$base_url, slider_fractional_factory as $9HbP8$slider_fractional_factory, layout_get_visible_recs_without_partial_rows as $9HbP8$layout_get_visible_recs_without_partial_rows, layout_get_total_rec_amount_for_row as $9HbP8$layout_get_total_rec_amount_for_row, observer as $9HbP8$observer, queueMacroTask as $9HbP8$queueMacroTask, findMostFrequentItem as $9HbP8$findMostFrequentItem, standard_price_format as $9HbP8$standard_price_format, instant_exec_on_suspect_history_change as $9HbP8$instant_exec_on_suspect_history_change, deparallelize_no_drop as $9HbP8$deparallelize_no_drop, ContainedImage as $9HbP8$ContainedImage, buildThresholdList as $9HbP8$buildThresholdList, make_asyncIterable_exiter as $9HbP8$make_asyncIterable_exiter, href_change_ipns as $9HbP8$href_change_ipns, base64_encode_unicode as $9HbP8$base64_encode_unicode, base64_decode_unicode as $9HbP8$base64_decode_unicode, use_href_accessor as $9HbP8$use_href_accessor, get_session_id as $9HbP8$get_session_id, add_version_query_params as $9HbP8$add_version_query_params, hex_to_rgb as $9HbP8$hex_to_rgb, relative_luminance_from_rgb as $9HbP8$relative_luminance_from_rgb, snakeCasifyObject as $9HbP8$snakeCasifyObject, sort_obj as $9HbP8$sort_obj, make_url_with_query_params as $9HbP8$make_url_with_query_params, insert_surfaces as $9HbP8$insert_surfaces, is_debug as $9HbP8$is_debug } from "@depict-ai/utilishared/latest";
|
|
2
|
+
import { template as $9HbP8$template, createComponent as $9HbP8$createComponent, getNextElement as $9HbP8$getNextElement, insert as $9HbP8$insert, effect as $9HbP8$effect, style as $9HbP8$style, spread as $9HbP8$spread, mergeProps as $9HbP8$mergeProps1, runHydrationEvents as $9HbP8$runHydrationEvents, getNextMarker as $9HbP8$getNextMarker, classList as $9HbP8$classList, className as $9HbP8$className, isServer as $9HbP8$isServer, setAttribute as $9HbP8$setAttribute, addEventListener as $9HbP8$addEventListener, memo as $9HbP8$memo, delegateEvents as $9HbP8$delegateEvents, use as $9HbP8$use, setProperty as $9HbP8$setProperty, Dynamic as $9HbP8$Dynamic } from "solid-js/web";
|
|
3
|
+
import { createEffect as $9HbP8$createEffect, createComputed as $9HbP8$createComputed, createMemo as $9HbP8$createMemo, mapArray as $9HbP8$mapArray, createSignal as $9HbP8$createSignal, Show as $9HbP8$Show, mergeProps as $9HbP8$mergeProps, createResource as $9HbP8$createResource, Suspense as $9HbP8$Suspense, onCleanup as $9HbP8$onCleanup, createUniqueId as $9HbP8$createUniqueId, createContext as $9HbP8$createContext, useContext as $9HbP8$useContext, ErrorBoundary as $9HbP8$ErrorBoundary, createRoot as $9HbP8$createRoot, untrack as $9HbP8$untrack, For as $9HbP8$For, getOwner as $9HbP8$getOwner, runWithOwner as $9HbP8$runWithOwner, createRenderEffect as $9HbP8$createRenderEffect, Index as $9HbP8$Index, splitProps as $9HbP8$splitProps, on as $9HbP8$on, batch as $9HbP8$batch, createSelector as $9HbP8$createSelector, children as $9HbP8$children, createReaction as $9HbP8$createReaction } from "solid-js";
|
|
5
4
|
import { createStore as $9HbP8$createStore, reconcile as $9HbP8$reconcile } from "solid-js/store";
|
|
5
|
+
import { dlog as $9HbP8$dlog, catchify as $9HbP8$catchify, ListenableSet as $9HbP8$ListenableSet, use_href_accessor as $9HbP8$use_href_accessor1, queueMacroTask as $9HbP8$queueMacroTask1, report as $9HbP8$report1 } from "@depict-ai/utilishared/latest";
|
|
6
6
|
|
|
7
7
|
/*! Depict.ai search and product listing SDK */
|
|
8
8
|
import { register_es_version } from "../multi_import_deduplicator.mjs";
|
|
9
9
|
register_es_version("ui", "latest");
|
|
10
|
-
const $ec291e0010116877$export$83d89fbfd8236492 = "4.7.
|
|
10
|
+
const $ec291e0010116877$export$83d89fbfd8236492 = "4.7.30";
|
|
11
|
+
function $dc9262ef6f786812$export$d9f36cf74e24d595(media_query) {
|
|
12
|
+
const signal = $9HbP8$createSignal(false);
|
|
13
|
+
$9HbP8$onCleanup($9HbP8$javascript_media_query(media_query, ({
|
|
14
|
+
matches: matches
|
|
15
|
+
}) => signal[1](matches)).remove);
|
|
16
|
+
return signal[0];
|
|
17
|
+
}
|
|
18
|
+
function $77348875ac090fcd$export$a79e666719b3647c(cols_at_size_) {
|
|
19
|
+
const size_active = $9HbP8$createMemo(() => cols_at_size_().map(([n_cols, min_width, max_width]) => {
|
|
20
|
+
const media_query = $9HbP8$layout_media_query_header(min_width, max_width).replaceAll("@media", "");
|
|
21
|
+
const matches = $dc9262ef6f786812$export$d9f36cf74e24d595(media_query);
|
|
22
|
+
return [matches, n_cols];
|
|
23
|
+
}));
|
|
24
|
+
const n_cols_currently_showing = $9HbP8$createMemo(() => {
|
|
25
|
+
try {
|
|
26
|
+
const [, n_cols_currently_showing] = size_active().find(([media_query]) => media_query());
|
|
27
|
+
return n_cols_currently_showing;
|
|
28
|
+
} catch (e) {
|
|
29
|
+
$9HbP8$dwarn("No active size found in columnsAtSize - can't render content blocks or looks");
|
|
30
|
+
return null;
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
return n_cols_currently_showing;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// Errors caused by SDK consuming code interfacing with the SDK, not the SDK itself or other Depict packages
|
|
37
|
+
class $4fd48cb976bf1789$export$e1d52e4f0c7557a1 extends Error {}
|
|
38
|
+
class $4fd48cb976bf1789$export$aa14a9f43128f61f extends $4fd48cb976bf1789$export$e1d52e4f0c7557a1 {
|
|
39
|
+
constructor(templateError) {
|
|
40
|
+
super("Uncaught error in product card template", {
|
|
41
|
+
cause: templateError
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
var $b7436a6d1fd64e3b$var$_tmpl$ = /*#__PURE__*/$9HbP8$template(`<div><!$><!/><!$><!/>`);
|
|
46
|
+
const $b7436a6d1fd64e3b$var$ExtraInfoContext = /*@__PURE__*/$9HbP8$createContext();
|
|
47
|
+
function $b7436a6d1fd64e3b$export$240ecf5363d76c0f(props) {
|
|
48
|
+
return $9HbP8$createComponent($b7436a6d1fd64e3b$var$ExtraInfoContext.Provider, {
|
|
49
|
+
get value() {
|
|
50
|
+
return props.getContext_;
|
|
51
|
+
},
|
|
52
|
+
get children() {
|
|
53
|
+
return props.children;
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
function $b7436a6d1fd64e3b$export$b69d0d92862de18b(props) {
|
|
58
|
+
const getContextFunction = $9HbP8$useContext($b7436a6d1fd64e3b$var$ExtraInfoContext);
|
|
59
|
+
return $9HbP8$ErrorBoundary({
|
|
60
|
+
fallback(err, retry) {
|
|
61
|
+
const {
|
|
62
|
+
message_: message_,
|
|
63
|
+
severity_: severity_
|
|
64
|
+
} = props;
|
|
65
|
+
let message = message_;
|
|
66
|
+
if (err instanceof (0, $4fd48cb976bf1789$export$aa14a9f43128f61f)) {
|
|
67
|
+
console.error(err.cause);
|
|
68
|
+
message = `${message}: ${err.message}`;
|
|
69
|
+
} else $9HbP8$report([err, message_], severity_, getContextFunction?.());
|
|
70
|
+
return (() => {
|
|
71
|
+
var _el$ = $9HbP8$getNextElement($b7436a6d1fd64e3b$var$_tmpl$),
|
|
72
|
+
_el$2 = _el$.firstChild,
|
|
73
|
+
[_el$3, _co$] = $9HbP8$getNextMarker(_el$2.nextSibling),
|
|
74
|
+
_el$4 = _el$3.nextSibling,
|
|
75
|
+
[_el$5, _co$2] = $9HbP8$getNextMarker(_el$4.nextSibling);
|
|
76
|
+
$9HbP8$insert(_el$, message, _el$3, _co$);
|
|
77
|
+
$9HbP8$insert(_el$, () => props.on_error_?.(retry), _el$5, _co$2);
|
|
78
|
+
$9HbP8$effect(_$p => $9HbP8$classList(_el$, Object.fromEntries(props.class_list_?.map(c => [c, true]) || []), _$p));
|
|
79
|
+
return _el$;
|
|
80
|
+
})();
|
|
81
|
+
},
|
|
82
|
+
get children() {
|
|
83
|
+
return props.children;
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
var $6dee9211e57ac31a$var$_tmpl$ = /*#__PURE__*/$9HbP8$template(`<div>`),
|
|
88
|
+
$6dee9211e57ac31a$var$_tmpl$2 = /*#__PURE__*/$9HbP8$template(`<style type=text/css>`);
|
|
89
|
+
const $6dee9211e57ac31a$export$c500183c31c2b22e = "--spans-columns";
|
|
90
|
+
function $6dee9211e57ac31a$export$ab6b147eec64fea5(props) {
|
|
91
|
+
const container_class = "x" + $9HbP8$createUniqueId();
|
|
92
|
+
const container_element_ = (() => {
|
|
93
|
+
var _el$ = $9HbP8$getNextElement($6dee9211e57ac31a$var$_tmpl$);
|
|
94
|
+
$9HbP8$spread(_el$, $9HbP8$mergeProps1(() => props.element_attributes, {
|
|
95
|
+
"classList": {
|
|
96
|
+
[container_class]: true
|
|
97
|
+
}
|
|
98
|
+
}), false, true);
|
|
99
|
+
$9HbP8$insert(_el$, () => props.children);
|
|
100
|
+
$9HbP8$runHydrationEvents();
|
|
101
|
+
return _el$;
|
|
102
|
+
})(); // Don't want this in the error boundary below, it should only be for the actual layouting
|
|
103
|
+
return $9HbP8$createComponent((0, $b7436a6d1fd64e3b$export$b69d0d92862de18b), {
|
|
104
|
+
message_: "Failed calculating css grid layout",
|
|
105
|
+
severity_: "error",
|
|
106
|
+
get children() {
|
|
107
|
+
return $6dee9211e57ac31a$export$e2f22da34aaf310a(props, container_element_, false, container_class);
|
|
108
|
+
}
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
function $6dee9211e57ac31a$export$e2f22da34aaf310a(props, container_element, insert_after_container = false, container_class) {
|
|
112
|
+
if (!container_class) {
|
|
113
|
+
// only try to add if it wasn't provided, so that we have a code path without classList when doing SSR
|
|
114
|
+
container_class = $9HbP8$make_random_classname();
|
|
115
|
+
container_element.classList.add(container_class);
|
|
116
|
+
}
|
|
117
|
+
const container_selector = `.depict .${container_class}`; // class so ppl can have id if needed
|
|
118
|
+
const col_styling = $9HbP8$createMemo(() => $6dee9211e57ac31a$var$generate_media_queried_declarations({
|
|
119
|
+
container_selector_: container_selector,
|
|
120
|
+
default_grid_spacing_text: props.grid_spacing,
|
|
121
|
+
cols_at_size_: props.cols_at_size,
|
|
122
|
+
override_vertical_spacing_: props.override_vertical_spacing,
|
|
123
|
+
top_row_shortened_by_: props.top_row_shortened_by_()
|
|
124
|
+
}));
|
|
125
|
+
const base_styling = $9HbP8$createMemo(() => {
|
|
126
|
+
return `${container_selector}{display:grid;}`;
|
|
127
|
+
});
|
|
128
|
+
const get_styling = $9HbP8$createMemo(() => base_styling() + col_styling());
|
|
129
|
+
const style_element = (() => {
|
|
130
|
+
var _el$2 = $9HbP8$getNextElement($6dee9211e57ac31a$var$_tmpl$2);
|
|
131
|
+
$9HbP8$insert(_el$2, get_styling);
|
|
132
|
+
return _el$2;
|
|
133
|
+
})(); // need to create this after set_styling has been called or else there will be no styling in the SSR'd output
|
|
134
|
+
if (insert_after_container) container_element.after(style_element);
|
|
135
|
+
return [container_element, style_element];
|
|
136
|
+
}
|
|
137
|
+
function $6dee9211e57ac31a$var$generate_media_queried_declarations({
|
|
138
|
+
container_selector_: container_selector_,
|
|
139
|
+
default_grid_spacing_text: default_grid_spacing_text,
|
|
140
|
+
cols_at_size_: cols_at_size_,
|
|
141
|
+
override_vertical_spacing_: override_vertical_spacing_,
|
|
142
|
+
top_row_shortened_by_: top_row_shortened_by_
|
|
143
|
+
}) {
|
|
144
|
+
return cols_at_size_.map(options => {
|
|
145
|
+
const [n_cols, min, max, grid_spacing_for_size] = options;
|
|
146
|
+
const main_spacing_to_use = grid_spacing_for_size || default_grid_spacing_text;
|
|
147
|
+
// See comment in else block below
|
|
148
|
+
const can_use_gap = override_vertical_spacing_ ? $6dee9211e57ac31a$var$can_use_gap_for_unit(override_vertical_spacing_) : $6dee9211e57ac31a$var$can_use_gap_for_unit(main_spacing_to_use);
|
|
149
|
+
let spacing_styling;
|
|
150
|
+
let additional_styling = ""; // outside the media query
|
|
151
|
+
if (can_use_gap) spacing_styling = `gap:${main_spacing_to_use};${override_vertical_spacing_ ? `row-gap:${override_vertical_spacing_};` : ``}`;else {
|
|
152
|
+
// 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)
|
|
153
|
+
// 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.
|
|
154
|
+
// Logical thought: use margins for the vertical spacing. But margins in grids are apparently relative to the size of the individual items in grids.
|
|
155
|
+
// 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.
|
|
156
|
+
const vertical_spacing_to_use = override_vertical_spacing_ ?? main_spacing_to_use;
|
|
157
|
+
const width_multiplier = `var(${$6dee9211e57ac31a$export$c500183c31c2b22e}, 1)`; // How many cards wide the current item is (needed because content blocks)
|
|
158
|
+
const one_item_width_exclusing_gaps = `calc(calc(100 / ${n_cols}) - calc(calc(${n_cols * 2 - 2} * calc(${$6dee9211e57ac31a$var$strip_percent_unit(vertical_spacing_to_use)} / 2)) / ${n_cols}))`; // Width of one item in percent of the whole
|
|
159
|
+
// Equation from layout.tsx, also used in CheckboxGrid. Needs half spacing for some reason
|
|
160
|
+
const this_item_width_meat = `calc(${one_item_width_exclusing_gaps} * ${width_multiplier})`; // Width of just the card
|
|
161
|
+
const this_item_width_gaps = `calc(calc(${width_multiplier} - 1) * ${$6dee9211e57ac31a$var$strip_percent_unit(vertical_spacing_to_use)})`; // Width of the gaps
|
|
162
|
+
const this_item_width = `calc(${this_item_width_meat} + ${this_item_width_gaps})`; // Width of this item including gaps
|
|
163
|
+
// 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
|
|
164
|
+
const convert_top_spacing_to_item_width_percentage = spacing => `calc(calc(100 / ${this_item_width}) * ${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)
|
|
165
|
+
spacing_styling = `column-gap:${main_spacing_to_use};`; // Still use gaps in the horizontal direction because that works flawlessly
|
|
166
|
+
// Re-use old layout code to get the correct :nth-child declarations for the top margins
|
|
167
|
+
additional_styling = $9HbP8$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_);
|
|
168
|
+
}
|
|
169
|
+
const media_query_body = `${container_selector_}{${spacing_styling}grid-template-columns:repeat(${n_cols},minmax(0,1fr));}`;
|
|
170
|
+
return `${$9HbP8$layout_media_query_header(min, max)}{${media_query_body}}${additional_styling}`;
|
|
171
|
+
}).join("");
|
|
172
|
+
}
|
|
173
|
+
function $6dee9211e57ac31a$var$can_use_gap_for_unit(spacing) {
|
|
174
|
+
const trimmed_spacing = spacing.trim();
|
|
175
|
+
return !trimmed_spacing.includes("%");
|
|
176
|
+
}
|
|
177
|
+
function $6dee9211e57ac31a$var$strip_percent_unit(css_value) {
|
|
178
|
+
return css_value.replaceAll("%", "");
|
|
179
|
+
}
|
|
180
|
+
var $d20eff0aadc28983$var$_tmpl$ = /*#__PURE__*/$9HbP8$template(`<span>`);
|
|
181
|
+
function $d20eff0aadc28983$export$acb3eaade4b23afd(props) {
|
|
182
|
+
// Work around https://github.com/solidjs/solid/issues/1980
|
|
183
|
+
return (() => {
|
|
184
|
+
var _el$ = $9HbP8$getNextElement($d20eff0aadc28983$var$_tmpl$);
|
|
185
|
+
$9HbP8$effect(_p$ => {
|
|
186
|
+
var _v$ = `${props.class || ""} depict-placeholder`,
|
|
187
|
+
_v$2 = props.style;
|
|
188
|
+
_v$ !== _p$.e && $9HbP8$className(_el$, _p$.e = _v$);
|
|
189
|
+
_p$.t = $9HbP8$style(_el$, _v$2, _p$.t);
|
|
190
|
+
return _p$;
|
|
191
|
+
}, {
|
|
192
|
+
e: undefined,
|
|
193
|
+
t: undefined
|
|
194
|
+
});
|
|
195
|
+
return _el$;
|
|
196
|
+
})();
|
|
197
|
+
}
|
|
198
|
+
function $7f60f09116a3fe61$export$3f37af283f8fb843(props) {
|
|
199
|
+
const style = $9HbP8$createMemo(() => {
|
|
200
|
+
const {
|
|
201
|
+
style: style,
|
|
202
|
+
height: height,
|
|
203
|
+
width: width,
|
|
204
|
+
aspectRatio: aspectRatio
|
|
205
|
+
} = props;
|
|
206
|
+
const is_image = aspectRatio != undefined;
|
|
207
|
+
const size_data = is_image ? {
|
|
208
|
+
width: "100%",
|
|
209
|
+
"padding-bottom": `calc(calc(1 / ${aspectRatio}) * 100%)`
|
|
210
|
+
} : {
|
|
211
|
+
width: width,
|
|
212
|
+
height: height
|
|
213
|
+
};
|
|
214
|
+
return {
|
|
215
|
+
display: "block",
|
|
216
|
+
...(style || {}),
|
|
217
|
+
...size_data
|
|
218
|
+
};
|
|
219
|
+
});
|
|
220
|
+
return $9HbP8$createComponent((0, $d20eff0aadc28983$export$acb3eaade4b23afd), {
|
|
221
|
+
get style() {
|
|
222
|
+
return style();
|
|
223
|
+
},
|
|
224
|
+
get ["class"]() {
|
|
225
|
+
return props.class;
|
|
226
|
+
}
|
|
227
|
+
});
|
|
228
|
+
}
|
|
229
|
+
var $e7a7eb102ddc0c79$var$_tmpl$ = /*#__PURE__*/$9HbP8$template(`<div class=content-block-wrapper>`);
|
|
230
|
+
function $e7a7eb102ddc0c79$export$791ef57e62e21c3f({
|
|
231
|
+
content_blocks_: incoming_content_blocks,
|
|
232
|
+
cols_at_size_: cols_at_size_,
|
|
233
|
+
set_top_row_shortened_by_: set_top_row_shortened_by_
|
|
234
|
+
}) {
|
|
235
|
+
// these are by row
|
|
236
|
+
const [content_blocks, set_content_blocks] = $9HbP8$createStore([]);
|
|
237
|
+
const n_cols_currently_showing_ = $77348875ac090fcd$export$a79e666719b3647c(cols_at_size_);
|
|
238
|
+
$9HbP8$createEffect(() => {
|
|
239
|
+
const incoming_value = incoming_content_blocks();
|
|
240
|
+
if (!incoming_value) {
|
|
241
|
+
set_content_blocks([]);
|
|
242
|
+
return;
|
|
243
|
+
}
|
|
244
|
+
set_content_blocks($9HbP8$reconcile(incoming_value, {
|
|
245
|
+
key: "content"
|
|
246
|
+
})); // key: Make moving blocks faster, see https://github.com/solidjs/solid/issues/1925#issuecomment-1769671596
|
|
247
|
+
});
|
|
248
|
+
|
|
249
|
+
const get_wrapped_blocks_ = $e7a7eb102ddc0c79$var$wrap_blocks_in_div(content_blocks, n_cols_currently_showing_);
|
|
250
|
+
$9HbP8$createComputed(() => {
|
|
251
|
+
// 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
|
|
252
|
+
const top_row_block = get_wrapped_blocks_()[0];
|
|
253
|
+
const blocks_in_top_row_taken = top_row_block?.span_columns;
|
|
254
|
+
if (blocks_in_top_row_taken == undefined) {
|
|
255
|
+
// Fall back to zero if no content block in top row, since then no blocks in top row are taken
|
|
256
|
+
set_top_row_shortened_by_(0);
|
|
257
|
+
return;
|
|
258
|
+
}
|
|
259
|
+
set_top_row_shortened_by_(blocks_in_top_row_taken - 1); // minus one because the content block wrapper also is an element
|
|
260
|
+
});
|
|
261
|
+
|
|
262
|
+
return $9HbP8$createMemo(() => $e7a7eb102ddc0c79$export$92aa5d691d588f3f({
|
|
263
|
+
wrapped_blocks_: get_wrapped_blocks_(),
|
|
264
|
+
n_cols_currently_showing_: n_cols_currently_showing_()
|
|
265
|
+
}));
|
|
266
|
+
}
|
|
267
|
+
function $e7a7eb102ddc0c79$export$92aa5d691d588f3f({
|
|
268
|
+
wrapped_blocks_: wrapped_blocks_,
|
|
269
|
+
n_cols_currently_showing_: n_cols_currently_showing_
|
|
270
|
+
}) {
|
|
271
|
+
// This computation should be quite cheap since it just moves around things into an array
|
|
272
|
+
const content_blocks_by_index = [];
|
|
273
|
+
const constructed_block_arrays = new WeakSet();
|
|
274
|
+
// Need to keep track of products displaced by blocks above when mapping rows to indexes in the actual grid
|
|
275
|
+
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
|
|
276
|
+
if (!n_cols_currently_showing_)
|
|
277
|
+
// Nope out of here if we don't know how many columns are showing
|
|
278
|
+
return content_blocks_by_index;
|
|
279
|
+
for (let i = 0; i < wrapped_blocks_.length; i++) {
|
|
280
|
+
// i = row to show at
|
|
281
|
+
const block = wrapped_blocks_[i];
|
|
282
|
+
if (!block) continue; // Array can have holes/not defined places
|
|
283
|
+
const index_of_first_item_in_row = i * n_cols_currently_showing_;
|
|
284
|
+
const index_of_last_item_in_row = index_of_first_item_in_row + n_cols_currently_showing_;
|
|
285
|
+
const {
|
|
286
|
+
span_rows: span_rows,
|
|
287
|
+
position: position,
|
|
288
|
+
span_columns: span_columns
|
|
289
|
+
} = block; // span columns is already capped in the block wrapping step (wrap_blocks_in_div)
|
|
290
|
+
let target_index;
|
|
291
|
+
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((n_cols_currently_showing_ - span_columns) / 2);else throw new Error("Invalid position for content block - must be left, right or center: " + JSON.stringify(position));
|
|
292
|
+
// Calculate displacement of us by content blocks above us
|
|
293
|
+
let displacement_by_added_blocks = 0;
|
|
294
|
+
for (let j = 0; j < i; j++) {
|
|
295
|
+
const row = displaced_products[j];
|
|
296
|
+
if (row === undefined) continue; // there were no blocks in this row
|
|
297
|
+
let displaced_items_in_row;
|
|
298
|
+
if (typeof row === "number") displaced_items_in_row = row;else {
|
|
299
|
+
displaced_items_in_row = row.filter(item => item).length;
|
|
300
|
+
displaced_products[j] = displaced_items_in_row;
|
|
301
|
+
}
|
|
302
|
+
displacement_by_added_blocks += displaced_items_in_row;
|
|
303
|
+
}
|
|
304
|
+
const index_of_us_in_row = target_index - index_of_first_item_in_row;
|
|
305
|
+
for (let j = 0; j < index_of_us_in_row; j++) if (displaced_products[i]?.[j])
|
|
306
|
+
// Add blocks in our *current* row to the displacement, but only the ones to our left
|
|
307
|
+
displacement_by_added_blocks++;
|
|
308
|
+
// Add block to output array at the correct index
|
|
309
|
+
const final_target_index = target_index - displacement_by_added_blocks;
|
|
310
|
+
const existing_block = content_blocks_by_index[final_target_index];
|
|
311
|
+
const block_content = block.content;
|
|
312
|
+
// 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
|
|
313
|
+
if (existing_block) {
|
|
314
|
+
if (constructed_block_arrays.has(existing_block))
|
|
315
|
+
// Only push to arrays we have created to not create funky bugs when there's an array in JSX.Element
|
|
316
|
+
existing_block.push(block_content);else {
|
|
317
|
+
const array = [existing_block, block_content];
|
|
318
|
+
constructed_block_arrays.add(array);
|
|
319
|
+
content_blocks_by_index[final_target_index] = array;
|
|
320
|
+
}
|
|
321
|
+
} else content_blocks_by_index[final_target_index] = block_content;
|
|
322
|
+
// Update displacement
|
|
323
|
+
for (let j = 0; j < span_rows; j++) {
|
|
324
|
+
const row = displaced_products[i + j] ||= [];
|
|
325
|
+
for (let k = index_of_us_in_row; k < index_of_us_in_row + span_columns; k++) row[k] = true;
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
return content_blocks_by_index;
|
|
329
|
+
}
|
|
330
|
+
/**
|
|
331
|
+
* 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.
|
|
332
|
+
* Then renders the content and wraps it into a div with the correct styling.
|
|
333
|
+
* Also caps span_columns to max available columns
|
|
334
|
+
*/
|
|
335
|
+
function $e7a7eb102ddc0c79$var$wrap_blocks_in_div(rendered_content_blocks, max_span_columns) {
|
|
336
|
+
const get_wrapped_blocks = $9HbP8$mapArray(() => rendered_content_blocks, block => {
|
|
337
|
+
if (!block) return;
|
|
338
|
+
const final_span_columns = $9HbP8$createMemo(() => Math.min(block.span_columns, max_span_columns() ?? Infinity));
|
|
339
|
+
// If the item spans an entire row, limit the height to 1 row since there's no concept of "rows" if there are no products beside the block
|
|
340
|
+
const final_span_rows = $9HbP8$createMemo(() => final_span_columns() === max_span_columns() ? 1 : block.span_rows);
|
|
341
|
+
const [rendering_delayed, set_rendering_delayed_] = $9HbP8$createSignal(true);
|
|
342
|
+
const content = $9HbP8$createComponent((0, $9HbP8$Show), {
|
|
343
|
+
get when() {
|
|
344
|
+
return !rendering_delayed();
|
|
345
|
+
},
|
|
346
|
+
get children() {
|
|
347
|
+
var _el$ = $9HbP8$getNextElement($e7a7eb102ddc0c79$var$_tmpl$);
|
|
348
|
+
$9HbP8$insert(_el$, $9HbP8$createComponent($e7a7eb102ddc0c79$var$RenderContent, {
|
|
349
|
+
get content() {
|
|
350
|
+
return block.content;
|
|
351
|
+
}
|
|
352
|
+
}));
|
|
353
|
+
$9HbP8$effect(_p$ => {
|
|
354
|
+
var _v$ = {
|
|
355
|
+
[(0, $6dee9211e57ac31a$export$c500183c31c2b22e)]: final_span_columns()
|
|
356
|
+
},
|
|
357
|
+
_v$2 = `span ${final_span_columns()}`,
|
|
358
|
+
_v$3 = `span ${final_span_rows()}`;
|
|
359
|
+
_p$.e = $9HbP8$style(_el$, _v$, _p$.e);
|
|
360
|
+
_v$2 !== _p$.t && ((_p$.t = _v$2) != null ? _el$.style.setProperty("grid-column", _v$2) : _el$.style.removeProperty("grid-column"));
|
|
361
|
+
_v$3 !== _p$.a && ((_p$.a = _v$3) != null ? _el$.style.setProperty("grid-row", _v$3) : _el$.style.removeProperty("grid-row"));
|
|
362
|
+
return _p$;
|
|
363
|
+
}, {
|
|
364
|
+
e: undefined,
|
|
365
|
+
t: undefined,
|
|
366
|
+
a: undefined
|
|
367
|
+
});
|
|
368
|
+
return _el$;
|
|
369
|
+
}
|
|
370
|
+
});
|
|
371
|
+
return $9HbP8$mergeProps(block, {
|
|
372
|
+
// Create content divs for the blocks with as much fine-grained diffing as possible?
|
|
373
|
+
content: () => {
|
|
374
|
+
// Sneaky on-demand rendering, so we don't render more blocks than we can show: we have the rendered value here and don't return a function that renders because if our block would be moved around we'd be guaranteed to re-render
|
|
375
|
+
// However, no need to count products to know if we should render: the <For> loops in Placeholders and render_displays will only call this function if there's actually a product here that wants to display this block
|
|
376
|
+
set_rendering_delayed_(false);
|
|
377
|
+
return content;
|
|
378
|
+
},
|
|
379
|
+
get span_columns() {
|
|
380
|
+
// Cap max width of block to the number of columns available, for everyone downstream
|
|
381
|
+
return final_span_columns();
|
|
382
|
+
},
|
|
383
|
+
get span_rows() {
|
|
384
|
+
return final_span_rows();
|
|
385
|
+
}
|
|
386
|
+
});
|
|
387
|
+
});
|
|
388
|
+
return get_wrapped_blocks;
|
|
389
|
+
}
|
|
390
|
+
/**
|
|
391
|
+
* 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.
|
|
392
|
+
*/
|
|
393
|
+
function $e7a7eb102ddc0c79$var$RenderContent(props) {
|
|
394
|
+
const [resource] = $9HbP8$createResource(() => props.content,
|
|
395
|
+
// Could be reactive
|
|
396
|
+
fn => fn());
|
|
397
|
+
$9HbP8$createEffect(() => {
|
|
398
|
+
if (resource.error) console.error("Error in content block rendering", resource.error);
|
|
399
|
+
});
|
|
400
|
+
// 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)
|
|
401
|
+
return $9HbP8$createComponent((0, $9HbP8$Suspense), {
|
|
402
|
+
get fallback() {
|
|
403
|
+
return $9HbP8$createComponent((0, $7f60f09116a3fe61$export$3f37af283f8fb843), {
|
|
404
|
+
width: "100%",
|
|
405
|
+
height: "max(100%, 400px)"
|
|
406
|
+
});
|
|
407
|
+
},
|
|
408
|
+
children: resource
|
|
409
|
+
});
|
|
410
|
+
}
|
|
11
411
|
let $4eb0a704f8f30273$var$elementsHoveredSignal;
|
|
12
412
|
let $4eb0a704f8f30273$var$consumersSignal;
|
|
13
413
|
function $4eb0a704f8f30273$export$d4d96868197be50e() {
|
|
@@ -665,64 +1065,13 @@ function $6e41f1fde994db72$var$Placeholder({
|
|
|
665
1065
|
});
|
|
666
1066
|
}
|
|
667
1067
|
|
|
668
|
-
// Errors caused by SDK consuming code interfacing with the SDK, not the SDK itself or other Depict packages
|
|
669
|
-
class $4fd48cb976bf1789$export$e1d52e4f0c7557a1 extends Error {}
|
|
670
|
-
class $4fd48cb976bf1789$export$aa14a9f43128f61f extends $4fd48cb976bf1789$export$e1d52e4f0c7557a1 {
|
|
671
|
-
constructor(templateError) {
|
|
672
|
-
super("Uncaught error in product card template", {
|
|
673
|
-
cause: templateError
|
|
674
|
-
});
|
|
675
|
-
}
|
|
676
|
-
}
|
|
677
|
-
var $b7436a6d1fd64e3b$var$_tmpl$ = /*#__PURE__*/$9HbP8$template(`<div><!$><!/><!$><!/>`);
|
|
678
|
-
const $b7436a6d1fd64e3b$var$ExtraInfoContext = /*@__PURE__*/$9HbP8$createContext();
|
|
679
|
-
function $b7436a6d1fd64e3b$export$240ecf5363d76c0f(props) {
|
|
680
|
-
return $9HbP8$createComponent($b7436a6d1fd64e3b$var$ExtraInfoContext.Provider, {
|
|
681
|
-
get value() {
|
|
682
|
-
return props.getContext_;
|
|
683
|
-
},
|
|
684
|
-
get children() {
|
|
685
|
-
return props.children;
|
|
686
|
-
}
|
|
687
|
-
});
|
|
688
|
-
}
|
|
689
|
-
function $b7436a6d1fd64e3b$export$b69d0d92862de18b(props) {
|
|
690
|
-
const getContextFunction = $9HbP8$useContext($b7436a6d1fd64e3b$var$ExtraInfoContext);
|
|
691
|
-
return $9HbP8$ErrorBoundary({
|
|
692
|
-
fallback(err, retry) {
|
|
693
|
-
const {
|
|
694
|
-
message_: message_,
|
|
695
|
-
severity_: severity_
|
|
696
|
-
} = props;
|
|
697
|
-
let message = message_;
|
|
698
|
-
if (err instanceof (0, $4fd48cb976bf1789$export$aa14a9f43128f61f)) {
|
|
699
|
-
console.error(err.cause);
|
|
700
|
-
message = `${message}: ${err.message}`;
|
|
701
|
-
} else $9HbP8$report([err, message_], severity_, getContextFunction?.());
|
|
702
|
-
return (() => {
|
|
703
|
-
var _el$ = $9HbP8$getNextElement($b7436a6d1fd64e3b$var$_tmpl$),
|
|
704
|
-
_el$2 = _el$.firstChild,
|
|
705
|
-
[_el$3, _co$] = $9HbP8$getNextMarker(_el$2.nextSibling),
|
|
706
|
-
_el$4 = _el$3.nextSibling,
|
|
707
|
-
[_el$5, _co$2] = $9HbP8$getNextMarker(_el$4.nextSibling);
|
|
708
|
-
$9HbP8$insert(_el$, message, _el$3, _co$);
|
|
709
|
-
$9HbP8$insert(_el$, () => props.on_error_?.(retry), _el$5, _co$2);
|
|
710
|
-
$9HbP8$effect(_$p => $9HbP8$classList(_el$, Object.fromEntries(props.class_list_?.map(c => [c, true]) || []), _$p));
|
|
711
|
-
return _el$;
|
|
712
|
-
})();
|
|
713
|
-
},
|
|
714
|
-
get children() {
|
|
715
|
-
return props.children;
|
|
716
|
-
}
|
|
717
|
-
});
|
|
718
|
-
}
|
|
719
1068
|
var $c8d5ff4524619fcd$var$_tmpl$ = /*#__PURE__*/$9HbP8$template(`<div>`),
|
|
720
1069
|
$c8d5ff4524619fcd$var$_tmpl$2 = /*#__PURE__*/$9HbP8$template(`<style type=text/css>`);
|
|
721
1070
|
function $c8d5ff4524619fcd$export$d21e32dfedac04be(props) {
|
|
722
1071
|
const container_class = "x" + $9HbP8$createUniqueId();
|
|
723
1072
|
const container_element_ = (() => {
|
|
724
1073
|
var _el$ = $9HbP8$getNextElement($c8d5ff4524619fcd$var$_tmpl$);
|
|
725
|
-
$9HbP8$spread(_el$, $9HbP8$
|
|
1074
|
+
$9HbP8$spread(_el$, $9HbP8$mergeProps1(() => props.element_attributes, {
|
|
726
1075
|
"classList": {
|
|
727
1076
|
[container_class]: true
|
|
728
1077
|
}
|
|
@@ -883,7 +1232,7 @@ function $c4492d24952ed731$export$d41d19e89346fa2({
|
|
|
883
1232
|
} = slider;
|
|
884
1233
|
const Layout = props => $c8d5ff4524619fcd$export$445d8d3f5f706a40(props, insert_here, true);
|
|
885
1234
|
// Do like this, so we don't have to call mergeProps ourselves
|
|
886
|
-
$9HbP8$createComponent(Layout, $9HbP8$
|
|
1235
|
+
$9HbP8$createComponent(Layout, $9HbP8$mergeProps1({
|
|
887
1236
|
rows: "all",
|
|
888
1237
|
layout: "slider"
|
|
889
1238
|
}, layout_options_));
|
|
@@ -958,78 +1307,22 @@ function $16b52438165aafe2$export$23fca46f3143581f(component, error_message) {
|
|
|
958
1307
|
dispose();
|
|
959
1308
|
});
|
|
960
1309
|
});
|
|
961
|
-
});else
|
|
962
|
-
// we're already in a root so cleanups are handled
|
|
963
|
-
return component_in_error_boundary();
|
|
964
|
-
}
|
|
965
|
-
const $011607bdf658f807$var$ListingContext = /*@__PURE__*/$9HbP8$createContext();
|
|
966
|
-
function $011607bdf658f807$export$e68cff63f76bd15b(props) {
|
|
967
|
-
const our_object = {};
|
|
968
|
-
return $9HbP8$createComponent($011607bdf658f807$var$ListingContext.Provider, {
|
|
969
|
-
value: our_object,
|
|
970
|
-
get children() {
|
|
971
|
-
return props.children;
|
|
972
|
-
}
|
|
973
|
-
});
|
|
974
|
-
}
|
|
975
|
-
function $011607bdf658f807$export$8d0c4fdbb05a2f2e() {
|
|
976
|
-
return $9HbP8$useContext($011607bdf658f807$var$ListingContext);
|
|
977
|
-
}
|
|
978
|
-
var $d20eff0aadc28983$var$_tmpl$ = /*#__PURE__*/$9HbP8$template(`<span>`);
|
|
979
|
-
function $d20eff0aadc28983$export$acb3eaade4b23afd(props) {
|
|
980
|
-
// Work around https://github.com/solidjs/solid/issues/1980
|
|
981
|
-
return (() => {
|
|
982
|
-
var _el$ = $9HbP8$getNextElement($d20eff0aadc28983$var$_tmpl$);
|
|
983
|
-
$9HbP8$effect(_p$ => {
|
|
984
|
-
var _v$ = `${props.class || ""} depict-placeholder`,
|
|
985
|
-
_v$2 = props.style;
|
|
986
|
-
_v$ !== _p$.e && $9HbP8$className(_el$, _p$.e = _v$);
|
|
987
|
-
_p$.t = $9HbP8$style(_el$, _v$2, _p$.t);
|
|
988
|
-
return _p$;
|
|
989
|
-
}, {
|
|
990
|
-
e: undefined,
|
|
991
|
-
t: undefined
|
|
992
|
-
});
|
|
993
|
-
return _el$;
|
|
994
|
-
})();
|
|
995
|
-
}
|
|
996
|
-
function $7f60f09116a3fe61$export$3f37af283f8fb843(props) {
|
|
997
|
-
const style = $9HbP8$createMemo(() => {
|
|
998
|
-
const {
|
|
999
|
-
style: style,
|
|
1000
|
-
height: height,
|
|
1001
|
-
width: width,
|
|
1002
|
-
aspectRatio: aspectRatio
|
|
1003
|
-
} = props;
|
|
1004
|
-
const is_image = aspectRatio != undefined;
|
|
1005
|
-
const size_data = is_image ? {
|
|
1006
|
-
width: "100%",
|
|
1007
|
-
"padding-bottom": `calc(calc(1 / ${aspectRatio}) * 100%)`
|
|
1008
|
-
} : {
|
|
1009
|
-
width: width,
|
|
1010
|
-
height: height
|
|
1011
|
-
};
|
|
1012
|
-
return {
|
|
1013
|
-
display: "block",
|
|
1014
|
-
...(style || {}),
|
|
1015
|
-
...size_data
|
|
1016
|
-
};
|
|
1017
|
-
});
|
|
1018
|
-
return $9HbP8$createComponent((0, $d20eff0aadc28983$export$acb3eaade4b23afd), {
|
|
1019
|
-
get style() {
|
|
1020
|
-
return style();
|
|
1021
|
-
},
|
|
1022
|
-
get ["class"]() {
|
|
1023
|
-
return props.class;
|
|
1310
|
+
});else
|
|
1311
|
+
// we're already in a root so cleanups are handled
|
|
1312
|
+
return component_in_error_boundary();
|
|
1313
|
+
}
|
|
1314
|
+
const $011607bdf658f807$var$ListingContext = /*@__PURE__*/$9HbP8$createContext();
|
|
1315
|
+
function $011607bdf658f807$export$e68cff63f76bd15b(props) {
|
|
1316
|
+
const our_object = {};
|
|
1317
|
+
return $9HbP8$createComponent($011607bdf658f807$var$ListingContext.Provider, {
|
|
1318
|
+
value: our_object,
|
|
1319
|
+
get children() {
|
|
1320
|
+
return props.children;
|
|
1024
1321
|
}
|
|
1025
1322
|
});
|
|
1026
1323
|
}
|
|
1027
|
-
function $
|
|
1028
|
-
|
|
1029
|
-
$9HbP8$onCleanup($9HbP8$javascript_media_query(media_query, ({
|
|
1030
|
-
matches: matches
|
|
1031
|
-
}) => signal[1](matches)).remove);
|
|
1032
|
-
return signal[0];
|
|
1324
|
+
function $011607bdf658f807$export$8d0c4fdbb05a2f2e() {
|
|
1325
|
+
return $9HbP8$useContext($011607bdf658f807$var$ListingContext);
|
|
1033
1326
|
}
|
|
1034
1327
|
function $d134eae24341b4a1$export$89c6019e4baa40b1(props) {
|
|
1035
1328
|
const style = $9HbP8$createMemo(() => {
|
|
@@ -1183,7 +1476,7 @@ function $e8ffe11ed01df0fe$export$6e5611bc7e57e477(props) {
|
|
|
1183
1476
|
if (loading === "force-lazy") return true;
|
|
1184
1477
|
return loading === "lazy" && !isPrioritisedImage();
|
|
1185
1478
|
});
|
|
1186
|
-
const modifiedOtherAttributes = $9HbP8$
|
|
1479
|
+
const modifiedOtherAttributes = $9HbP8$mergeProps(otherAttributes, {
|
|
1187
1480
|
get loading() {
|
|
1188
1481
|
return shouldActuallyEnableLazyLoading() ? "lazy" : undefined;
|
|
1189
1482
|
}
|
|
@@ -1253,7 +1546,7 @@ function $e8ffe11ed01df0fe$export$6e5611bc7e57e477(props) {
|
|
|
1253
1546
|
$9HbP8$onCleanup(() => prevValue && aspectRatios.delete(prevValue));
|
|
1254
1547
|
}
|
|
1255
1548
|
$9HbP8$onCleanup(() => gotCleanedUp = true);
|
|
1256
|
-
$9HbP8$spread(img, $9HbP8$
|
|
1549
|
+
$9HbP8$spread(img, $9HbP8$mergeProps(modifiedOtherAttributes), false, true);
|
|
1257
1550
|
$9HbP8$createRenderEffect(() => {
|
|
1258
1551
|
props.src;
|
|
1259
1552
|
srcJustChanged = true;
|
|
@@ -1357,7 +1650,7 @@ function $660070e2a394b3c3$export$e4b984597b71e989(props) {
|
|
|
1357
1650
|
$9HbP8$queueMacroTask(() => setCurrentImageSize()); // unset the size accessor next event loop iteration, so that all onCleanup's have time to run, since the effects run more aggressively and can create a size accessor with a cleaned up owner otherwise
|
|
1358
1651
|
});
|
|
1359
1652
|
|
|
1360
|
-
$9HbP8$insert(container, $9HbP8$createComponent((0, $e8ffe11ed01df0fe$export$6e5611bc7e57e477), $9HbP8$
|
|
1653
|
+
$9HbP8$insert(container, $9HbP8$createComponent((0, $e8ffe11ed01df0fe$export$6e5611bc7e57e477), $9HbP8$mergeProps1({
|
|
1361
1654
|
get size() {
|
|
1362
1655
|
return $9HbP8$createMemo(() => currentImageSize()?.() || 0);
|
|
1363
1656
|
},
|
|
@@ -1372,7 +1665,7 @@ function $660070e2a394b3c3$export$e4b984597b71e989(props) {
|
|
|
1372
1665
|
return container;
|
|
1373
1666
|
}
|
|
1374
1667
|
function $70bb27cc6be01fc7$export$9d4a4b669b1929ab(props) {
|
|
1375
|
-
return $9HbP8$createComponent((0, $660070e2a394b3c3$export$e4b984597b71e989), $9HbP8$
|
|
1668
|
+
return $9HbP8$createComponent((0, $660070e2a394b3c3$export$e4b984597b71e989), $9HbP8$mergeProps1(props, {
|
|
1376
1669
|
get imgProps() {
|
|
1377
1670
|
return {
|
|
1378
1671
|
...props.imgProps,
|
|
@@ -1432,7 +1725,7 @@ function $08a49ecdcd5beaca$export$b73ed90f0ee50dc3({
|
|
|
1432
1725
|
[_el$15, _co$4] = $9HbP8$getNextMarker(_el$14.nextSibling);
|
|
1433
1726
|
var _ref$ = outerRef_;
|
|
1434
1727
|
typeof _ref$ === "function" ? $9HbP8$use(_ref$, _el$) : outerRef_ = _el$;
|
|
1435
|
-
$9HbP8$spread(_el$, $9HbP8$
|
|
1728
|
+
$9HbP8$spread(_el$, $9HbP8$mergeProps1(() => enableLink() ? {
|
|
1436
1729
|
href: href()
|
|
1437
1730
|
} : {}, {
|
|
1438
1731
|
get onClick() {
|
|
@@ -1533,7 +1826,7 @@ function $08a49ecdcd5beaca$export$b73ed90f0ee50dc3({
|
|
|
1533
1826
|
disconnector();
|
|
1534
1827
|
}));
|
|
1535
1828
|
}, _el$3);
|
|
1536
|
-
$9HbP8$spread(_el$5, $9HbP8$
|
|
1829
|
+
$9HbP8$spread(_el$5, $9HbP8$mergeProps1(() => title() && {
|
|
1537
1830
|
title: title()
|
|
1538
1831
|
}), false, true);
|
|
1539
1832
|
$9HbP8$insert(_el$5, () => title() ?? $9HbP8$createComponent((0, $d134eae24341b4a1$export$89c6019e4baa40b1), {
|
|
@@ -1861,7 +2154,7 @@ function $e9d1d09be9e6471e$export$44809a8a3e867e30({
|
|
|
1861
2154
|
[_el$3, _co$] = $9HbP8$getNextMarker(_el$2.nextSibling),
|
|
1862
2155
|
_el$4 = _el$3.nextSibling,
|
|
1863
2156
|
[_el$5, _co$2] = $9HbP8$getNextMarker(_el$4.nextSibling);
|
|
1864
|
-
$9HbP8$addEventListener(_el$, "click", $9HbP8$catchify1(() => setUserWantsExpanded(prev =>
|
|
2157
|
+
$9HbP8$addEventListener(_el$, "click", $9HbP8$catchify1(() => display_() && setUserWantsExpanded(prev => !prev)), true);
|
|
1865
2158
|
$9HbP8$use(el => {
|
|
1866
2159
|
container = el;
|
|
1867
2160
|
const ro = new ResizeObserver($9HbP8$catchify1(records => {
|
|
@@ -2077,7 +2370,7 @@ function $3da8afe3ed57cf34$export$7da560f849543dff({
|
|
|
2077
2370
|
_el$6 = _el$5.nextSibling,
|
|
2078
2371
|
[_el$7, _co$2] = $9HbP8$getNextMarker(_el$6.nextSibling);
|
|
2079
2372
|
$9HbP8$insert(_el$3, (0, $a458486f22b22f63$export$a2cc176055f8f08), _el$5, _co$);
|
|
2080
|
-
$9HbP8$insert(_el$3, $9HbP8$createComponent((0, $c8d5ff4524619fcd$export$d21e32dfedac04be), $9HbP8$
|
|
2373
|
+
$9HbP8$insert(_el$3, $9HbP8$createComponent((0, $c8d5ff4524619fcd$export$d21e32dfedac04be), $9HbP8$mergeProps1({
|
|
2081
2374
|
get rows() {
|
|
2082
2375
|
return rows_object_();
|
|
2083
2376
|
},
|
|
@@ -2210,7 +2503,7 @@ function $07ef910e8ef6b783$export$2c9f9bf2092486aa(props) {
|
|
|
2210
2503
|
return $9HbP8$createComponent((0, $c4492d24952ed731$export$d41d19e89346fa2), sharedOptions);
|
|
2211
2504
|
},
|
|
2212
2505
|
get children() {
|
|
2213
|
-
return $9HbP8$createComponent((0, $3da8afe3ed57cf34$export$7da560f849543dff), $9HbP8$
|
|
2506
|
+
return $9HbP8$createComponent((0, $3da8afe3ed57cf34$export$7da560f849543dff), $9HbP8$mergeProps1(sharedOptions, {
|
|
2214
2507
|
view_more_button_: () => props.gridOptions_?.view_more_button,
|
|
2215
2508
|
max_rows_: () => props.gridOptions_?.max_rows
|
|
2216
2509
|
}));
|
|
@@ -2261,7 +2554,7 @@ async function $07ef910e8ef6b783$var$runDisplayTransformersForLooks(baseData, li
|
|
|
2261
2554
|
}) : displaysToTransform;
|
|
2262
2555
|
const transformedListings = await transformedListingsPromise;
|
|
2263
2556
|
const transformedDisplayById = Object.fromEntries(transformedProducts.map(display => [$16351e4c87b90b3d$export$548d053aba053d79(display), display]));
|
|
2264
|
-
return transformedListings.map(listing => $9HbP8$
|
|
2557
|
+
return transformedListings.map(listing => $9HbP8$mergeProps(listing, {
|
|
2265
2558
|
// use mergeProps because in preview browser we add getters in this object, that would be called too early otherwise
|
|
2266
2559
|
displays: (displayIdsPerListingId[listing.listing_id] || []).map(displayId => transformedDisplayById[displayId]).filter(v => v)
|
|
2267
2560
|
}));
|
|
@@ -3657,7 +3950,7 @@ function $5285d2814d0fac0c$export$b94867ecbd698f21({
|
|
|
3657
3950
|
when: on_back_,
|
|
3658
3951
|
get children() {
|
|
3659
3952
|
var _el$ = $9HbP8$getNextElement($5285d2814d0fac0c$var$_tmpl$);
|
|
3660
|
-
$9HbP8$spread(_el$, $9HbP8$
|
|
3953
|
+
$9HbP8$spread(_el$, $9HbP8$mergeProps1({
|
|
3661
3954
|
get onClick() {
|
|
3662
3955
|
return $9HbP8$catchify1(on_back_);
|
|
3663
3956
|
},
|
|
@@ -3679,7 +3972,7 @@ function $5285d2814d0fac0c$export$b94867ecbd698f21({
|
|
|
3679
3972
|
var _el$2 = $9HbP8$getNextElement($5285d2814d0fac0c$var$_tmpl$2);
|
|
3680
3973
|
var _ref$ = buttonInFieldRef_;
|
|
3681
3974
|
typeof _ref$ === "function" ? $9HbP8$use(_ref$, _el$2) : buttonInFieldRef_ = _el$2;
|
|
3682
|
-
$9HbP8$spread(_el$2, $9HbP8$
|
|
3975
|
+
$9HbP8$spread(_el$2, $9HbP8$mergeProps1({
|
|
3683
3976
|
get classList() {
|
|
3684
3977
|
return {
|
|
3685
3978
|
empty: searchFieldEmpty()
|
|
@@ -4464,7 +4757,7 @@ function $4ce5b8892775b62d$export$67152d26d4f56ee8({
|
|
|
4464
4757
|
const href = $9HbP8$createMemo(() => listing_()?.page_url); // <- could be made reactive getter created in displayTransformers, read it in memo here since it might create computations (for example in the preview-brower), and there's no owner in the onClick handler
|
|
4465
4758
|
const LinkToListing = props => (() => {
|
|
4466
4759
|
var _el$ = $9HbP8$getNextElement($4ce5b8892775b62d$var$_tmpl$);
|
|
4467
|
-
$9HbP8$spread(_el$, $9HbP8$
|
|
4760
|
+
$9HbP8$spread(_el$, $9HbP8$mergeProps1(props, {
|
|
4468
4761
|
get href() {
|
|
4469
4762
|
return href();
|
|
4470
4763
|
},
|
|
@@ -4858,7 +5151,7 @@ function $2f3171b02c8f4a5d$export$af1fb307bbba2417({
|
|
|
4858
5151
|
$9HbP8$createComputed($9HbP8$on(search_field_value_[0], () => !suggestions_updating_blocked() && set_selected_index(undefined), {
|
|
4859
5152
|
defer: true
|
|
4860
5153
|
})); // reset autocomplete position if query changes
|
|
4861
|
-
return [$9HbP8$createComponent((0, $903297121898e5ff$export$d4994a86c6235f72), $9HbP8$
|
|
5154
|
+
return [$9HbP8$createComponent((0, $903297121898e5ff$export$d4994a86c6235f72), $9HbP8$mergeProps1(sharedSuggestionProps, {
|
|
4862
5155
|
get title_() {
|
|
4863
5156
|
return i18n_.popular_;
|
|
4864
5157
|
},
|
|
@@ -4868,7 +5161,7 @@ function $2f3171b02c8f4a5d$export$af1fb307bbba2417({
|
|
|
4868
5161
|
return itemIndexes_.suggestionsIndex_;
|
|
4869
5162
|
},
|
|
4870
5163
|
showPlaceholders_: () => showPlaceholders() || noResults_() && !noResultsPopularSuggestions.latest
|
|
4871
|
-
})), $9HbP8$createComponent((0, $903297121898e5ff$export$d4994a86c6235f72), $9HbP8$
|
|
5164
|
+
})), $9HbP8$createComponent((0, $903297121898e5ff$export$d4994a86c6235f72), $9HbP8$mergeProps1(sharedSuggestionProps, {
|
|
4872
5165
|
get title_() {
|
|
4873
5166
|
return i18n_.previous_;
|
|
4874
5167
|
},
|
|
@@ -4885,7 +5178,7 @@ function $2f3171b02c8f4a5d$export$af1fb307bbba2417({
|
|
|
4885
5178
|
return _el$;
|
|
4886
5179
|
})(),
|
|
4887
5180
|
showPlaceholders_: () => false
|
|
4888
|
-
})), $9HbP8$createComponent((0, $903297121898e5ff$export$d4994a86c6235f72), $9HbP8$
|
|
5181
|
+
})), $9HbP8$createComponent((0, $903297121898e5ff$export$d4994a86c6235f72), $9HbP8$mergeProps1(sharedSuggestionProps, {
|
|
4889
5182
|
get title_() {
|
|
4890
5183
|
return i18n_.content_;
|
|
4891
5184
|
},
|
|
@@ -5409,7 +5702,7 @@ function $024fbc0a2d796fad$export$b2539bed5023c21c(props) {
|
|
|
5409
5702
|
return $9HbP8$createComponent($024fbc0a2d796fad$var$TabsContext.Provider, {
|
|
5410
5703
|
value: new (0, $9HbP8$ListenableSet)(),
|
|
5411
5704
|
get children() {
|
|
5412
|
-
return $9HbP8$createComponent($024fbc0a2d796fad$var$ActualTabs, $9HbP8$
|
|
5705
|
+
return $9HbP8$createComponent($024fbc0a2d796fad$var$ActualTabs, $9HbP8$mergeProps1(props, {
|
|
5413
5706
|
get children() {
|
|
5414
5707
|
return props.children;
|
|
5415
5708
|
}
|
|
@@ -5439,7 +5732,7 @@ function $024fbc0a2d796fad$var$ActualTabs(props) {
|
|
|
5439
5732
|
},
|
|
5440
5733
|
children: item => {
|
|
5441
5734
|
const weSelected = $9HbP8$createMemo(() => isSelected(item().id));
|
|
5442
|
-
return $9HbP8$createComponent((0, $9HbP8$Dynamic), $9HbP8$
|
|
5735
|
+
return $9HbP8$createComponent((0, $9HbP8$Dynamic), $9HbP8$mergeProps1({
|
|
5443
5736
|
get component() {
|
|
5444
5737
|
return props.AnchorComponent;
|
|
5445
5738
|
},
|
|
@@ -5546,7 +5839,7 @@ function $024fbc0a2d796fad$export$3e41faf802a29e71(props) {
|
|
|
5546
5839
|
if (!currentTabs) throw new Error("Tab must be a child of Tabs");
|
|
5547
5840
|
const id = $9HbP8$createUniqueId();
|
|
5548
5841
|
const ourSet = currentTabs;
|
|
5549
|
-
const extendedProps = $9HbP8$
|
|
5842
|
+
const extendedProps = $9HbP8$mergeProps({
|
|
5550
5843
|
id: id
|
|
5551
5844
|
}, props);
|
|
5552
5845
|
ourSet.add(extendedProps);
|
|
@@ -6064,14 +6357,14 @@ function $8560c919ff763930$var$ActualShopTheLookButton(props) {
|
|
|
6064
6357
|
const displayStyleValue = $9HbP8$createMemo(() => hasAnythingToShow() ? "" : "none");
|
|
6065
6358
|
const button = (() => {
|
|
6066
6359
|
var _el$2 = $9HbP8$getNextElement($8560c919ff763930$var$_tmpl$2);
|
|
6067
|
-
$9HbP8$spread(_el$2, $9HbP8$
|
|
6360
|
+
$9HbP8$spread(_el$2, $9HbP8$mergeProps1(() => localProps.buttonAttributes), false, true);
|
|
6068
6361
|
$9HbP8$insert(_el$2, () => localProps?.buttonAttributes?.children || "Shop the look");
|
|
6069
6362
|
$9HbP8$runHydrationEvents();
|
|
6070
6363
|
return _el$2;
|
|
6071
6364
|
})();
|
|
6072
6365
|
$9HbP8$createEffect(() => button.style.display = displayStyleValue()); // Set our attributes like this, so we allow total control over the button from the outside via buttonAttributes
|
|
6073
6366
|
$9HbP8$createEffect(() => !hasAnythingToShow() && closeModal()); // close modal if we ever get into the state of having it open and not having anything to show
|
|
6074
|
-
$8560c919ff763930$var$modalProps = $9HbP8$
|
|
6367
|
+
$8560c919ff763930$var$modalProps = $9HbP8$mergeProps(partForModal, {
|
|
6075
6368
|
products_to_shop_: products_to_shop_
|
|
6076
6369
|
});
|
|
6077
6370
|
button.addEventListener("click", openModal);
|
|
@@ -6792,7 +7085,7 @@ var $f8a56ba74eedd0c6$var$_tmpl$ = /*#__PURE__*/$9HbP8$template(`<svg><path d="M
|
|
|
6792
7085
|
function $f8a56ba74eedd0c6$export$f21ab0717a89c77f(props) {
|
|
6793
7086
|
return (() => {
|
|
6794
7087
|
var _el$ = $9HbP8$getNextElement($f8a56ba74eedd0c6$var$_tmpl$);
|
|
6795
|
-
$9HbP8$spread(_el$, $9HbP8$
|
|
7088
|
+
$9HbP8$spread(_el$, $9HbP8$mergeProps1(props, {
|
|
6796
7089
|
"xmlns": "http://www.w3.org/2000/svg",
|
|
6797
7090
|
"width": "11",
|
|
6798
7091
|
"height": "12"
|
|
@@ -8243,7 +8536,7 @@ const $93716a9ad0dea854$export$414f6a19d38e655c = ({
|
|
|
8243
8536
|
[_el$6, _co$] = $9HbP8$getNextMarker(_el$5.nextSibling),
|
|
8244
8537
|
_el$7 = _el$6.nextSibling,
|
|
8245
8538
|
[_el$8, _co$2] = $9HbP8$getNextMarker(_el$7.nextSibling);
|
|
8246
|
-
$9HbP8$spread(_el$2, $9HbP8$
|
|
8539
|
+
$9HbP8$spread(_el$2, $9HbP8$mergeProps1(attributes, {
|
|
8247
8540
|
get disabled() {
|
|
8248
8541
|
return $9HbP8$memo(() => !!count_zero())() && !is_selected();
|
|
8249
8542
|
},
|
|
@@ -9651,7 +9944,7 @@ class $7fa23e2a0079eca4$export$e015ed2f2950f2e3 {
|
|
|
9651
9944
|
// Filter out our transformed ancestors
|
|
9652
9945
|
const transformedAncestors = Object.fromEntries(transformerResult.filter(item => item.is_suggestion === false).map(item => [item.listing_id, item]));
|
|
9653
9946
|
// Add the now transformed ancestors into the ancestors of the listing suggestions
|
|
9654
|
-
const transformedSuggestions = transformerResult.filter(item => item.is_suggestion !== false).map(item => $9HbP8$
|
|
9947
|
+
const transformedSuggestions = transformerResult.filter(item => item.is_suggestion !== false).map(item => $9HbP8$mergeProps(item, {
|
|
9655
9948
|
// Use mergeProps instead of spread since page_url and other properties could be a getter that solid components should call
|
|
9656
9949
|
ancestors: item.ancestors.map(ancestor => {
|
|
9657
9950
|
const newAncestor = transformedAncestors[ancestor.listing_id];
|
|
@@ -10212,7 +10505,7 @@ function $172e1b898d457050$export$7de92c4c2205ebf3({
|
|
|
10212
10505
|
[_el$6, _co$2] = $9HbP8$getNextMarker(_el$5.nextSibling);
|
|
10213
10506
|
$9HbP8$insert(_el$2, () => i18n_.search_recs_title_());
|
|
10214
10507
|
$9HbP8$insert(_el$, (0, $a458486f22b22f63$export$a2cc176055f8f08), _el$4, _co$);
|
|
10215
|
-
$9HbP8$insert(_el$, $9HbP8$createComponent((0, $c8d5ff4524619fcd$export$d21e32dfedac04be), $9HbP8$
|
|
10508
|
+
$9HbP8$insert(_el$, $9HbP8$createComponent((0, $c8d5ff4524619fcd$export$d21e32dfedac04be), $9HbP8$mergeProps1({
|
|
10216
10509
|
rows: rows_object,
|
|
10217
10510
|
layout: "grid",
|
|
10218
10511
|
element_attributes: {
|
|
@@ -10920,99 +11213,6 @@ function $0449e7d49398c077$export$a1fd619a4743ca08({
|
|
|
10920
11213
|
});
|
|
10921
11214
|
return renderedDisplays_;
|
|
10922
11215
|
}
|
|
10923
|
-
var $6dee9211e57ac31a$var$_tmpl$ = /*#__PURE__*/$9HbP8$template(`<div>`),
|
|
10924
|
-
$6dee9211e57ac31a$var$_tmpl$2 = /*#__PURE__*/$9HbP8$template(`<style type=text/css>`);
|
|
10925
|
-
const $6dee9211e57ac31a$export$c500183c31c2b22e = "--spans-columns";
|
|
10926
|
-
function $6dee9211e57ac31a$export$ab6b147eec64fea5(props) {
|
|
10927
|
-
const container_class = "x" + $9HbP8$createUniqueId();
|
|
10928
|
-
const container_element_ = (() => {
|
|
10929
|
-
var _el$ = $9HbP8$getNextElement($6dee9211e57ac31a$var$_tmpl$);
|
|
10930
|
-
$9HbP8$spread(_el$, $9HbP8$mergeProps(() => props.element_attributes, {
|
|
10931
|
-
"classList": {
|
|
10932
|
-
[container_class]: true
|
|
10933
|
-
}
|
|
10934
|
-
}), false, true);
|
|
10935
|
-
$9HbP8$insert(_el$, () => props.children);
|
|
10936
|
-
$9HbP8$runHydrationEvents();
|
|
10937
|
-
return _el$;
|
|
10938
|
-
})(); // Don't want this in the error boundary below, it should only be for the actual layouting
|
|
10939
|
-
return $9HbP8$createComponent((0, $b7436a6d1fd64e3b$export$b69d0d92862de18b), {
|
|
10940
|
-
message_: "Failed calculating css grid layout",
|
|
10941
|
-
severity_: "error",
|
|
10942
|
-
get children() {
|
|
10943
|
-
return $6dee9211e57ac31a$export$e2f22da34aaf310a(props, container_element_, false, container_class);
|
|
10944
|
-
}
|
|
10945
|
-
});
|
|
10946
|
-
}
|
|
10947
|
-
function $6dee9211e57ac31a$export$e2f22da34aaf310a(props, container_element, insert_after_container = false, container_class) {
|
|
10948
|
-
if (!container_class) {
|
|
10949
|
-
// only try to add if it wasn't provided, so that we have a code path without classList when doing SSR
|
|
10950
|
-
container_class = $9HbP8$make_random_classname();
|
|
10951
|
-
container_element.classList.add(container_class);
|
|
10952
|
-
}
|
|
10953
|
-
const container_selector = `.depict .${container_class}`; // class so ppl can have id if needed
|
|
10954
|
-
const col_styling = $9HbP8$createMemo(() => $6dee9211e57ac31a$var$generate_media_queried_declarations({
|
|
10955
|
-
container_selector_: container_selector,
|
|
10956
|
-
default_grid_spacing_text: props.grid_spacing,
|
|
10957
|
-
cols_at_size_: props.cols_at_size,
|
|
10958
|
-
override_vertical_spacing_: props.override_vertical_spacing,
|
|
10959
|
-
top_row_shortened_by_: props.top_row_shortened_by_()
|
|
10960
|
-
}));
|
|
10961
|
-
const base_styling = $9HbP8$createMemo(() => {
|
|
10962
|
-
return `${container_selector}{display:grid;}`;
|
|
10963
|
-
});
|
|
10964
|
-
const get_styling = $9HbP8$createMemo(() => base_styling() + col_styling());
|
|
10965
|
-
const style_element = (() => {
|
|
10966
|
-
var _el$2 = $9HbP8$getNextElement($6dee9211e57ac31a$var$_tmpl$2);
|
|
10967
|
-
$9HbP8$insert(_el$2, get_styling);
|
|
10968
|
-
return _el$2;
|
|
10969
|
-
})(); // need to create this after set_styling has been called or else there will be no styling in the SSR'd output
|
|
10970
|
-
if (insert_after_container) container_element.after(style_element);
|
|
10971
|
-
return [container_element, style_element];
|
|
10972
|
-
}
|
|
10973
|
-
function $6dee9211e57ac31a$var$generate_media_queried_declarations({
|
|
10974
|
-
container_selector_: container_selector_,
|
|
10975
|
-
default_grid_spacing_text: default_grid_spacing_text,
|
|
10976
|
-
cols_at_size_: cols_at_size_,
|
|
10977
|
-
override_vertical_spacing_: override_vertical_spacing_,
|
|
10978
|
-
top_row_shortened_by_: top_row_shortened_by_
|
|
10979
|
-
}) {
|
|
10980
|
-
return cols_at_size_.map(options => {
|
|
10981
|
-
const [n_cols, min, max, grid_spacing_for_size] = options;
|
|
10982
|
-
const main_spacing_to_use = grid_spacing_for_size || default_grid_spacing_text;
|
|
10983
|
-
// See comment in else block below
|
|
10984
|
-
const can_use_gap = override_vertical_spacing_ ? $6dee9211e57ac31a$var$can_use_gap_for_unit(override_vertical_spacing_) : $6dee9211e57ac31a$var$can_use_gap_for_unit(main_spacing_to_use);
|
|
10985
|
-
let spacing_styling;
|
|
10986
|
-
let additional_styling = ""; // outside the media query
|
|
10987
|
-
if (can_use_gap) spacing_styling = `gap:${main_spacing_to_use};${override_vertical_spacing_ ? `row-gap:${override_vertical_spacing_};` : ``}`;else {
|
|
10988
|
-
// 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)
|
|
10989
|
-
// 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.
|
|
10990
|
-
// Logical thought: use margins for the vertical spacing. But margins in grids are apparently relative to the size of the individual items in grids.
|
|
10991
|
-
// 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.
|
|
10992
|
-
const vertical_spacing_to_use = override_vertical_spacing_ ?? main_spacing_to_use;
|
|
10993
|
-
const width_multiplier = `var(${$6dee9211e57ac31a$export$c500183c31c2b22e}, 1)`; // How many cards wide the current item is (needed because content blocks)
|
|
10994
|
-
const one_item_width_exclusing_gaps = `calc(calc(100 / ${n_cols}) - calc(calc(${n_cols * 2 - 2} * calc(${$6dee9211e57ac31a$var$strip_percent_unit(vertical_spacing_to_use)} / 2)) / ${n_cols}))`; // Width of one item in percent of the whole
|
|
10995
|
-
// Equation from layout.tsx, also used in CheckboxGrid. Needs half spacing for some reason
|
|
10996
|
-
const this_item_width_meat = `calc(${one_item_width_exclusing_gaps} * ${width_multiplier})`; // Width of just the card
|
|
10997
|
-
const this_item_width_gaps = `calc(calc(${width_multiplier} - 1) * ${$6dee9211e57ac31a$var$strip_percent_unit(vertical_spacing_to_use)})`; // Width of the gaps
|
|
10998
|
-
const this_item_width = `calc(${this_item_width_meat} + ${this_item_width_gaps})`; // Width of this item including gaps
|
|
10999
|
-
// 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
|
|
11000
|
-
const convert_top_spacing_to_item_width_percentage = spacing => `calc(calc(100 / ${this_item_width}) * ${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)
|
|
11001
|
-
spacing_styling = `column-gap:${main_spacing_to_use};`; // Still use gaps in the horizontal direction because that works flawlessly
|
|
11002
|
-
// Re-use old layout code to get the correct :nth-child declarations for the top margins
|
|
11003
|
-
additional_styling = $9HbP8$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_);
|
|
11004
|
-
}
|
|
11005
|
-
const media_query_body = `${container_selector_}{${spacing_styling}grid-template-columns:repeat(${n_cols},minmax(0,1fr));}`;
|
|
11006
|
-
return `${$9HbP8$layout_media_query_header(min, max)}{${media_query_body}}${additional_styling}`;
|
|
11007
|
-
}).join("");
|
|
11008
|
-
}
|
|
11009
|
-
function $6dee9211e57ac31a$var$can_use_gap_for_unit(spacing) {
|
|
11010
|
-
const trimmed_spacing = spacing.trim();
|
|
11011
|
-
return !trimmed_spacing.includes("%");
|
|
11012
|
-
}
|
|
11013
|
-
function $6dee9211e57ac31a$var$strip_percent_unit(css_value) {
|
|
11014
|
-
return css_value.replaceAll("%", "");
|
|
11015
|
-
}
|
|
11016
11216
|
function $15aa76e6da02e5c2$export$cb5808ba002cdeed({
|
|
11017
11217
|
layout_options_: layout_options_,
|
|
11018
11218
|
sort_or_filter_open_: sort_or_filter_open_
|
|
@@ -11035,213 +11235,6 @@ function $15aa76e6da02e5c2$export$cb5808ba002cdeed({
|
|
|
11035
11235
|
}) : when_filters_closed_cols;
|
|
11036
11236
|
});
|
|
11037
11237
|
}
|
|
11038
|
-
function $77348875ac090fcd$export$a79e666719b3647c(cols_at_size_) {
|
|
11039
|
-
const size_active = $9HbP8$createMemo(() => cols_at_size_().map(([n_cols, min_width, max_width]) => {
|
|
11040
|
-
const media_query = $9HbP8$layout_media_query_header(min_width, max_width).replaceAll("@media", "");
|
|
11041
|
-
const matches = $dc9262ef6f786812$export$d9f36cf74e24d595(media_query);
|
|
11042
|
-
return [matches, n_cols];
|
|
11043
|
-
}));
|
|
11044
|
-
const n_cols_currently_showing = $9HbP8$createMemo(() => {
|
|
11045
|
-
try {
|
|
11046
|
-
const [, n_cols_currently_showing] = size_active().find(([media_query]) => media_query());
|
|
11047
|
-
return n_cols_currently_showing;
|
|
11048
|
-
} catch (e) {
|
|
11049
|
-
$9HbP8$dwarn("No active size found in columnsAtSize - can't render content blocks or looks");
|
|
11050
|
-
return null;
|
|
11051
|
-
}
|
|
11052
|
-
});
|
|
11053
|
-
return n_cols_currently_showing;
|
|
11054
|
-
}
|
|
11055
|
-
var $e7a7eb102ddc0c79$var$_tmpl$ = /*#__PURE__*/$9HbP8$template(`<div class=content-block-wrapper>`);
|
|
11056
|
-
function $e7a7eb102ddc0c79$export$791ef57e62e21c3f({
|
|
11057
|
-
content_blocks_: incoming_content_blocks,
|
|
11058
|
-
cols_at_size_: cols_at_size_,
|
|
11059
|
-
set_top_row_shortened_by_: set_top_row_shortened_by_
|
|
11060
|
-
}) {
|
|
11061
|
-
// these are by row
|
|
11062
|
-
const [content_blocks, set_content_blocks] = $9HbP8$createStore([]);
|
|
11063
|
-
const n_cols_currently_showing_ = $77348875ac090fcd$export$a79e666719b3647c(cols_at_size_);
|
|
11064
|
-
$9HbP8$createEffect(() => {
|
|
11065
|
-
const incoming_value = incoming_content_blocks();
|
|
11066
|
-
if (!incoming_value) {
|
|
11067
|
-
set_content_blocks([]);
|
|
11068
|
-
return;
|
|
11069
|
-
}
|
|
11070
|
-
set_content_blocks($9HbP8$reconcile(incoming_value, {
|
|
11071
|
-
key: "content"
|
|
11072
|
-
})); // key: Make moving blocks faster, see https://github.com/solidjs/solid/issues/1925#issuecomment-1769671596
|
|
11073
|
-
});
|
|
11074
|
-
|
|
11075
|
-
const get_wrapped_blocks_ = $e7a7eb102ddc0c79$var$wrap_blocks_in_div(content_blocks, n_cols_currently_showing_);
|
|
11076
|
-
$9HbP8$createComputed(() => {
|
|
11077
|
-
// 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
|
|
11078
|
-
const top_row_block = get_wrapped_blocks_()[0];
|
|
11079
|
-
const blocks_in_top_row_taken = top_row_block?.span_columns;
|
|
11080
|
-
if (blocks_in_top_row_taken == undefined) {
|
|
11081
|
-
// Fall back to zero if no content block in top row, since then no blocks in top row are taken
|
|
11082
|
-
set_top_row_shortened_by_(0);
|
|
11083
|
-
return;
|
|
11084
|
-
}
|
|
11085
|
-
set_top_row_shortened_by_(blocks_in_top_row_taken - 1); // minus one because the content block wrapper also is an element
|
|
11086
|
-
});
|
|
11087
|
-
|
|
11088
|
-
return $e7a7eb102ddc0c79$var$remap_blocks_to_index({
|
|
11089
|
-
get_wrapped_blocks_: get_wrapped_blocks_,
|
|
11090
|
-
n_cols_currently_showing_: n_cols_currently_showing_
|
|
11091
|
-
});
|
|
11092
|
-
}
|
|
11093
|
-
/**
|
|
11094
|
-
* Calculate where to put each of the finished wrapped content blocks. Also limit blocks' max width.
|
|
11095
|
-
* @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
|
|
11096
|
-
*/
|
|
11097
|
-
function $e7a7eb102ddc0c79$var$remap_blocks_to_index({
|
|
11098
|
-
get_wrapped_blocks_: get_wrapped_blocks_,
|
|
11099
|
-
n_cols_currently_showing_: n_cols_currently_showing_
|
|
11100
|
-
}) {
|
|
11101
|
-
return $9HbP8$createMemo(() => {
|
|
11102
|
-
// This computation should be quite cheap since it just moves around things into an array
|
|
11103
|
-
const content_blocks_by_index = [];
|
|
11104
|
-
const constructed_block_arrays = new WeakSet();
|
|
11105
|
-
const wrapped_blocks = get_wrapped_blocks_();
|
|
11106
|
-
const cols_showing = n_cols_currently_showing_();
|
|
11107
|
-
// Need to keep track of products displaced by blocks above when mapping rows to indexes in the actual grid
|
|
11108
|
-
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
|
|
11109
|
-
if (!cols_showing)
|
|
11110
|
-
// Nope out of here if we don't know how many columns are showing
|
|
11111
|
-
return content_blocks_by_index;
|
|
11112
|
-
for (let i = 0; i < wrapped_blocks.length; i++) {
|
|
11113
|
-
// i = row to show at
|
|
11114
|
-
const block = wrapped_blocks[i];
|
|
11115
|
-
if (!block) continue; // Array can have holes/not defined places
|
|
11116
|
-
const index_of_first_item_in_row = i * cols_showing;
|
|
11117
|
-
const index_of_last_item_in_row = index_of_first_item_in_row + cols_showing;
|
|
11118
|
-
const {
|
|
11119
|
-
span_rows: span_rows,
|
|
11120
|
-
position: position,
|
|
11121
|
-
span_columns: span_columns
|
|
11122
|
-
} = block; // span columns is already capped in the block wrapping step (wrap_blocks_in_div)
|
|
11123
|
-
let target_index;
|
|
11124
|
-
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));
|
|
11125
|
-
// Calculate displacement of us by content blocks above us
|
|
11126
|
-
let displacement_by_added_blocks = 0;
|
|
11127
|
-
for (let j = 0; j < i; j++) {
|
|
11128
|
-
const row = displaced_products[j];
|
|
11129
|
-
if (row === undefined) continue; // there were no blocks in this row
|
|
11130
|
-
let displaced_items_in_row;
|
|
11131
|
-
if (typeof row === "number") displaced_items_in_row = row;else {
|
|
11132
|
-
displaced_items_in_row = row.filter(item => item).length;
|
|
11133
|
-
displaced_products[j] = displaced_items_in_row;
|
|
11134
|
-
}
|
|
11135
|
-
displacement_by_added_blocks += displaced_items_in_row;
|
|
11136
|
-
}
|
|
11137
|
-
const index_of_us_in_row = target_index - index_of_first_item_in_row;
|
|
11138
|
-
for (let j = 0; j < index_of_us_in_row; j++) if (displaced_products[i]?.[j])
|
|
11139
|
-
// Add blocks in our *current* row to the displacement, but only the ones to our left
|
|
11140
|
-
displacement_by_added_blocks++;
|
|
11141
|
-
// Add block to output array at the correct index
|
|
11142
|
-
const final_target_index = target_index - displacement_by_added_blocks;
|
|
11143
|
-
const existing_block = content_blocks_by_index[final_target_index];
|
|
11144
|
-
const block_content = block.content;
|
|
11145
|
-
// 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
|
|
11146
|
-
if (existing_block) {
|
|
11147
|
-
if (constructed_block_arrays.has(existing_block))
|
|
11148
|
-
// Only push to arrays we have created to not create funky bugs when there's an array in JSX.Element
|
|
11149
|
-
existing_block.push(block_content);else {
|
|
11150
|
-
const array = [existing_block, block_content];
|
|
11151
|
-
constructed_block_arrays.add(array);
|
|
11152
|
-
content_blocks_by_index[final_target_index] = array;
|
|
11153
|
-
}
|
|
11154
|
-
} else content_blocks_by_index[final_target_index] = block_content;
|
|
11155
|
-
// Update displacement
|
|
11156
|
-
for (let j = 0; j < span_rows; j++) {
|
|
11157
|
-
const row = displaced_products[i + j] ||= [];
|
|
11158
|
-
for (let k = index_of_us_in_row; k < index_of_us_in_row + span_columns; k++) row[k] = true;
|
|
11159
|
-
}
|
|
11160
|
-
}
|
|
11161
|
-
return content_blocks_by_index;
|
|
11162
|
-
});
|
|
11163
|
-
}
|
|
11164
|
-
/**
|
|
11165
|
-
* 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.
|
|
11166
|
-
* Then renders the content and wraps it into a div with the correct styling.
|
|
11167
|
-
* Also caps span_columns to max available columns
|
|
11168
|
-
*/
|
|
11169
|
-
function $e7a7eb102ddc0c79$var$wrap_blocks_in_div(rendered_content_blocks, max_span_columns) {
|
|
11170
|
-
const get_wrapped_blocks = $9HbP8$mapArray(() => rendered_content_blocks, block => {
|
|
11171
|
-
if (!block) return;
|
|
11172
|
-
const final_span_columns = $9HbP8$createMemo(() => Math.min(block.span_columns, max_span_columns() ?? Infinity));
|
|
11173
|
-
// If the item spans an entire row, limit the height to 1 row since there's no concept of "rows" if there are no products beside the block
|
|
11174
|
-
const final_span_rows = $9HbP8$createMemo(() => final_span_columns() === max_span_columns() ? 1 : block.span_rows);
|
|
11175
|
-
const [rendering_delayed, set_rendering_delayed_] = $9HbP8$createSignal(true);
|
|
11176
|
-
const content = $9HbP8$createComponent((0, $9HbP8$Show), {
|
|
11177
|
-
get when() {
|
|
11178
|
-
return !rendering_delayed();
|
|
11179
|
-
},
|
|
11180
|
-
get children() {
|
|
11181
|
-
var _el$ = $9HbP8$getNextElement($e7a7eb102ddc0c79$var$_tmpl$);
|
|
11182
|
-
$9HbP8$insert(_el$, $9HbP8$createComponent($e7a7eb102ddc0c79$var$RenderContent, {
|
|
11183
|
-
get content() {
|
|
11184
|
-
return block.content;
|
|
11185
|
-
}
|
|
11186
|
-
}));
|
|
11187
|
-
$9HbP8$effect(_p$ => {
|
|
11188
|
-
var _v$ = {
|
|
11189
|
-
[(0, $6dee9211e57ac31a$export$c500183c31c2b22e)]: final_span_columns()
|
|
11190
|
-
},
|
|
11191
|
-
_v$2 = `span ${final_span_columns()}`,
|
|
11192
|
-
_v$3 = `span ${final_span_rows()}`;
|
|
11193
|
-
_p$.e = $9HbP8$style(_el$, _v$, _p$.e);
|
|
11194
|
-
_v$2 !== _p$.t && ((_p$.t = _v$2) != null ? _el$.style.setProperty("grid-column", _v$2) : _el$.style.removeProperty("grid-column"));
|
|
11195
|
-
_v$3 !== _p$.a && ((_p$.a = _v$3) != null ? _el$.style.setProperty("grid-row", _v$3) : _el$.style.removeProperty("grid-row"));
|
|
11196
|
-
return _p$;
|
|
11197
|
-
}, {
|
|
11198
|
-
e: undefined,
|
|
11199
|
-
t: undefined,
|
|
11200
|
-
a: undefined
|
|
11201
|
-
});
|
|
11202
|
-
return _el$;
|
|
11203
|
-
}
|
|
11204
|
-
});
|
|
11205
|
-
return $9HbP8$mergeProps1(block, {
|
|
11206
|
-
// Create content divs for the blocks with as much fine-grained diffing as possible?
|
|
11207
|
-
content: () => {
|
|
11208
|
-
// Sneaky on-demand rendering, so we don't render more blocks than we can show: we have the rendered value here and don't return a function that renders because if our block would be moved around we'd be guaranteed to re-render
|
|
11209
|
-
// However, no need to count products to know if we should render: the <For> loops in Placeholders and render_displays will only call this function if there's actually a product here that wants to display this block
|
|
11210
|
-
set_rendering_delayed_(false);
|
|
11211
|
-
return content;
|
|
11212
|
-
},
|
|
11213
|
-
get span_columns() {
|
|
11214
|
-
// Cap max width of block to the number of columns available, for everyone downstream
|
|
11215
|
-
return final_span_columns();
|
|
11216
|
-
},
|
|
11217
|
-
get span_rows() {
|
|
11218
|
-
return final_span_rows();
|
|
11219
|
-
}
|
|
11220
|
-
});
|
|
11221
|
-
});
|
|
11222
|
-
return get_wrapped_blocks;
|
|
11223
|
-
}
|
|
11224
|
-
/**
|
|
11225
|
-
* 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.
|
|
11226
|
-
*/
|
|
11227
|
-
function $e7a7eb102ddc0c79$var$RenderContent(props) {
|
|
11228
|
-
const [resource] = $9HbP8$createResource(() => props.content,
|
|
11229
|
-
// Could be reactive
|
|
11230
|
-
fn => fn());
|
|
11231
|
-
$9HbP8$createEffect(() => {
|
|
11232
|
-
if (resource.error) console.error("Error in content block rendering", resource.error);
|
|
11233
|
-
});
|
|
11234
|
-
// 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)
|
|
11235
|
-
return $9HbP8$createComponent((0, $9HbP8$Suspense), {
|
|
11236
|
-
get fallback() {
|
|
11237
|
-
return $9HbP8$createComponent((0, $7f60f09116a3fe61$export$3f37af283f8fb843), {
|
|
11238
|
-
width: "100%",
|
|
11239
|
-
height: "max(100%, 400px)"
|
|
11240
|
-
});
|
|
11241
|
-
},
|
|
11242
|
-
children: resource
|
|
11243
|
-
});
|
|
11244
|
-
}
|
|
11245
11238
|
var $2d25e42846eac370$var$_tmpl$ = /*#__PURE__*/$9HbP8$template(`<div class=PLP-results><!$><!/><!$><!/>`);
|
|
11246
11239
|
function $2d25e42846eac370$export$3925f87b1545cfc6({
|
|
11247
11240
|
plp_results_: plp_results_,
|
|
@@ -11445,7 +11438,7 @@ function $2d25e42846eac370$export$3925f87b1545cfc6({
|
|
|
11445
11438
|
} = slider;
|
|
11446
11439
|
const Layout = props => $c8d5ff4524619fcd$export$445d8d3f5f706a40(props, insert_here, true);
|
|
11447
11440
|
// Do like this, so we don't have to call mergeProps ourselves
|
|
11448
|
-
$9HbP8$createComponent(Layout, $9HbP8$
|
|
11441
|
+
$9HbP8$createComponent(Layout, $9HbP8$mergeProps1(layout_options_, {
|
|
11449
11442
|
rows: "all",
|
|
11450
11443
|
get cols_at_size() {
|
|
11451
11444
|
return modified_cols_at_size();
|
|
@@ -11950,7 +11943,7 @@ function $757dac7f7c6c5241$export$9bf11afa910f536e({
|
|
|
11950
11943
|
get children() {
|
|
11951
11944
|
return (() => {
|
|
11952
11945
|
var _el$34 = $9HbP8$getNextElement($757dac7f7c6c5241$var$_tmpl$5);
|
|
11953
|
-
$9HbP8$insert(_el$34, $9HbP8$createComponent((0, $fab07f52c9861732$export$3f1a388cc0d8fed7), $9HbP8$
|
|
11946
|
+
$9HbP8$insert(_el$34, $9HbP8$createComponent((0, $fab07f52c9861732$export$3f1a388cc0d8fed7), $9HbP8$mergeProps1(args_for_filtering_, {
|
|
11954
11947
|
are_in_modal_: true
|
|
11955
11948
|
})));
|
|
11956
11949
|
return _el$34;
|
|
@@ -12716,7 +12709,7 @@ function $b2bf2cdcff8142d8$export$f631859cab12b342({
|
|
|
12716
12709
|
[_el$8, _co$] = $9HbP8$getNextMarker(_el$7.nextSibling),
|
|
12717
12710
|
_el$9 = _el$8.nextSibling,
|
|
12718
12711
|
[_el$10, _co$2] = $9HbP8$getNextMarker(_el$9.nextSibling);
|
|
12719
|
-
$9HbP8$insert(_el$4, $9HbP8$createComponent(LinkIfPossible, $9HbP8$
|
|
12712
|
+
$9HbP8$insert(_el$4, $9HbP8$createComponent(LinkIfPossible, $9HbP8$mergeProps1(make_link_attributes, {
|
|
12720
12713
|
tabIndex: "-1",
|
|
12721
12714
|
get children() {
|
|
12722
12715
|
return $9HbP8$createComponent((0, $190927650b4840eb$export$605674723bcc715c), {
|
|
@@ -12725,7 +12718,7 @@ function $b2bf2cdcff8142d8$export$f631859cab12b342({
|
|
|
12725
12718
|
});
|
|
12726
12719
|
}
|
|
12727
12720
|
})));
|
|
12728
|
-
$9HbP8$insert(_el$5, $9HbP8$createComponent(LinkIfPossible, $9HbP8$
|
|
12721
|
+
$9HbP8$insert(_el$5, $9HbP8$createComponent(LinkIfPossible, $9HbP8$mergeProps1({
|
|
12729
12722
|
"class": "content-title line-clamp"
|
|
12730
12723
|
}, make_link_attributes, {
|
|
12731
12724
|
get title() {
|
|
@@ -12878,7 +12871,7 @@ function $49de9d31aeea1b5e$export$6d0c9c22f6652669({
|
|
|
12878
12871
|
},
|
|
12879
12872
|
number_of_results_: num_results
|
|
12880
12873
|
}), _el$3, _co$);
|
|
12881
|
-
$9HbP8$insert(_el$, $9HbP8$createComponent((0, $c8d5ff4524619fcd$export$d21e32dfedac04be), $9HbP8$
|
|
12874
|
+
$9HbP8$insert(_el$, $9HbP8$createComponent((0, $c8d5ff4524619fcd$export$d21e32dfedac04be), $9HbP8$mergeProps1({
|
|
12882
12875
|
layout: "grid",
|
|
12883
12876
|
element_attributes: {
|
|
12884
12877
|
class: "cards"
|
|
@@ -13272,7 +13265,7 @@ function $7097477c78a89208$export$a54ec244c8863715({
|
|
|
13272
13265
|
});
|
|
13273
13266
|
const [sort_and_filter_element_, set_sort_and_filter_element_] = $9HbP8$createSignal();
|
|
13274
13267
|
const no_results_text_ = $9HbP8$createMemo(() => (search_results_()?.content_search_links?.length ? i18n_.no_products_ : i18n_.no_results_text_)());
|
|
13275
|
-
const results_for = $9HbP8$createComponent((0, $f8c929beb82c512b$export$9dd50d35b9d94fdf), $9HbP8$
|
|
13268
|
+
const results_for = $9HbP8$createComponent((0, $f8c929beb82c512b$export$9dd50d35b9d94fdf), $9HbP8$mergeProps1({
|
|
13276
13269
|
get type() {
|
|
13277
13270
|
return (0, $f8c929beb82c512b$export$2452208c79fe93ea).products;
|
|
13278
13271
|
},
|
|
@@ -15191,7 +15184,7 @@ function $df5d81d0fe61ff21$var$add_us_to_crumbs(plp_meta) {
|
|
|
15191
15184
|
return $9HbP8$createMemo(() => {
|
|
15192
15185
|
const api_value = plp_meta()?.breadcrumbs;
|
|
15193
15186
|
if (!api_value) return api_value;
|
|
15194
|
-
return [...api_value, $9HbP8$
|
|
15187
|
+
return [...api_value, $9HbP8$mergeProps(plp_meta(), {
|
|
15195
15188
|
get page_url() {
|
|
15196
15189
|
return href_accessor();
|
|
15197
15190
|
}
|
|
@@ -15297,4 +15290,4 @@ function $442f32a4d80abbde$export$e2bf8ce7779e827e(props) {
|
|
|
15297
15290
|
}, "Entire CategoryPage failed");
|
|
15298
15291
|
}
|
|
15299
15292
|
$9HbP8$add_to_version_info("ui", (0, $ec291e0010116877$export$83d89fbfd8236492));
|
|
15300
|
-
export { $4eb0a704f8f30273$export$d4d96868197be50e as useMobileHover, $5e3d278ef4c80cd7$export$54299a3c81f5425 as useVisibilityState, $f32e14878e75af51$export$eaa625fb39439e37 as useSlidableInformation, $f091294da861020c$export$80bb7300ce6a8be3 as useProductCardIsVisible, $f091294da861020c$export$f223d69ed12f5fb7 as CurrentlyIntersectingContext, $24e27fab9c821b86$export$5bad61ecde080b1f as useExpandingContainerReactive, $07ef910e8ef6b783$export$2c9f9bf2092486aa as LooksSliderOrGrid, $e9d1d09be9e6471e$export$44809a8a3e867e30 as LookCard, $4fd2ba03703a7d92$export$7e1297a3a19f10d8 as PseudoRouter, $de6ccd37192b5fc2$export$83bb9af5671e1dbe as promiseSafeStructuredClone, $90980bd87c9960f9$export$5162a71f252e6122 as preserve_items_in_history_dot_state, $90980bd87c9960f9$export$3064e1e8c6513da3 as prefixes_to_preserve_in_history_dot_state, $a281666e5c15c2ec$export$29d28dadc2d6b631 as allowNativeNavigation, $66db7a014e20802e$export$1ea76ea778b880dd as modalVersionSymbol, $136f1d4d6c7ba6ac$export$e417c49320921907 as createDeparallelizedNoDropResource, $d8dbf52fea1773e2$export$f50b88e2a00918b5 as throw_globally, $42912431795f188e$export$9265e66f26f8e383 as ClassicSearchModal, $500a16dd18ee5a71$export$b0c55aa2e87c4be7 as SearchModalV2, $70bb27cc6be01fc7$export$9d4a4b669b1929ab as ModernResponsiveContainedImage, $024fbc0a2d796fad$export$3e41faf802a29e71 as Tab, $024fbc0a2d796fad$export$b2539bed5023c21c as Tabs, $8560c919ff763930$export$d4973c31938cbfd1 as ShopTheLookButton, $ca6f574bd8772184$export$e183a13865960371 as history_dot_state_to_state, $4147651646da990a$export$916e6850778505f6 as strip_encoded_filter_and_sort, $4147651646da990a$export$58aa3f171519b6d7 as encode_filters, $4147651646da990a$export$f934fa24c3a86811 as decode_filters, $4147651646da990a$export$62acb285a7579555 as encode_sorting, $4147651646da990a$export$766e9676e74997d3 as decode_sorting, $660070e2a394b3c3$export$d7b7ab832c20e2f4 as shopifyContainedImageContextSymbol, $011607bdf658f807$export$e68cff63f76bd15b as ListingProvider, $011607bdf658f807$export$8d0c4fdbb05a2f2e as useListing, $b6440e72ed83671a$export$11354f017ddc9790 as ProductCardIndexProvider, $b6440e72ed83671a$export$e3faf4d95300054f as useProductCardIndex, $660070e2a394b3c3$export$e4b984597b71e989 as ShopifyContainedImage, $f32e14878e75af51$export$6649caad96ef8870 as SlidableItems, $2449872a62a75a20$export$ebdc3711f7e02ccd as make_accurate_width_accessor, $ee116da074deb002$export$9574e176201e5e8d as RecommendationSlider, $9ea5383493360761$export$9756467d34d91cdb as RecommendationGrid, $e8ffe11ed01df0fe$export$6e5611bc7e57e477 as ShopifyResponsiveImg, $e8ffe11ed01df0fe$export$e6fffe67d4cdd848 as makeSizeAccessor, $f18d425032111270$export$94026ee33dbabc26 as ImageContainer, $b7436a6d1fd64e3b$export$b69d0d92862de18b as SentryErrorBoundary, $b7436a6d1fd64e3b$export$240ecf5363d76c0f as ExtraSentryContextProvider, $6bb0a0c563dff4bb$export$6c6d7a51fa9aa15d as ExpandingDetails, $c16e74cfe125bb05$export$f091cbac892643a4 as accessor_of_object_to_object_with_accessor_values, $1adfe60f3a14a1d7$export$fecbb157621501bd as SelectedFilters, $fab07f52c9861732$export$3f1a388cc0d8fed7 as FilterBody, $5efb5894079b220e$export$b288c38ae3fddb56 as create_modified_filters, $c8d5ff4524619fcd$export$d21e32dfedac04be as SolidLayout, $c8d5ff4524619fcd$export$445d8d3f5f706a40 as SolidLayoutWithProvidedElement, $194bd6b8e4c59830$export$79b1565500412d9b as general_modal_abstraction, $19976a74d273070d$export$3b621d86b1566b2 as CrossIcon, $fbbadcb080ad1d4a$export$8be2714ec7f169ee as GenericSliderArrowButton, $a0f0e923bad68a9b$export$58e808b1db15d3bc as fetchDepictRecommendations, $e4615ecd1849548f$export$b91cec6bdc6b32a1 as CategoryTitle, $a6e23a834336fc19$export$824dde41348efed1 as embedded_num_products, $4b2134398dfa83fa$export$c1a6b039e689a58e as get_listings, $961b5c64bef4662f$export$f34314aa9505732e as DepictCategory, $806c97b931758897$export$ac6237957a15b3f0 as DepictSearch, $806c97b931758897$export$bde3eb976dfded9 as get_search_query_updating_blocked_signal, $806c97b931758897$export$f2dc7e4e4aa11abb as SearchPage, $4fd48cb976bf1789$export$aa14a9f43128f61f as ProductCardError, $6891c018a834cfdd$export$d86a33413558014e as open_modal_with_alignment, $bb15dfb548a7666e$export$ee1733d9a8495996 as DefaultInstantCardPlaceholder, $b6d5529b253681aa$export$b3ad617e9036868 as align_field, $b6d5529b253681aa$export$3f238c96c45e6cc6 as ALIGN_TOP, $b6d5529b253681aa$export$902f8b4a7dae5d78 as ALIGN_WIDTH_ON_MODAL, $b6d5529b253681aa$export$7895aadd1956b1c7 as ALIGN_LEFT, $b6d5529b253681aa$export$6060bc6bee850eb6 as SET_CENTERED_LEFT, $b5cccc8ee7d24677$export$6daf8749b65a1b77 as convert_sdk_cols_at_size_to_layout, $926b1b5ba2239356$export$1233ca167bf71f9a as styles_to_valid_css_string, $aea1edf92433e81e$export$fe334901e8bebd57 as disable_scrolling, $6e8944558258054f$export$d0596b5cae35ad4 as open_search_with_shift_slash, $7fa23e2a0079eca4$export$e015ed2f2950f2e3 as DepictAPI, $dc9262ef6f786812$export$d9f36cf74e24d595 as media_query_to_accessor, $6936724b9e0b98d5$export$689e204eadb33baf as setup_fast_leave, $bf52d9f9eebd1938$export$5196e4c01fa56fcb as show_toast, $8c0f86cb3e266eeb$export$a71e92cfbb498adc as SolidFormatPrice, $4ca91518c9a35379$export$828dcdd425fd3231 as connect_search_field_height_to_aligner_height, $d20eff0aadc28983$export$acb3eaade4b23afd as BasePlaceholder, $d134eae24341b4a1$export$89c6019e4baa40b1 as TextPlaceholder, $7f60f09116a3fe61$export$3f37af283f8fb843 as ImagePlaceholder, $753e9b2889a47c89$export$3ccaa27d81dd8556 as PageReplacer, $4690a06c8489dcd0$export$864d304a0bc46829 as defaultGridSpacing, $4690a06c8489dcd0$export$c3834fa86c616831 as defaultColsAtSize, $4690a06c8489dcd0$export$7bf543b9d9be2c22 as defaultCategoryTitlePlugin, $ec291e0010116877$export$83d89fbfd8236492 as version, $58b3487626e85ece$export$316f6f283ae64765 as SearchField, $feffae76d8dc0135$export$5b7c3ce0ebe51f86 as BreadCrumbs, $feffae76d8dc0135$export$de035477d6fef996 as QuickLinks, $442f32a4d80abbde$export$e2bf8ce7779e827e as CategoryPage };
|
|
15293
|
+
export { $e7a7eb102ddc0c79$export$92aa5d691d588f3f as remap_blocks_to_index, $4eb0a704f8f30273$export$d4d96868197be50e as useMobileHover, $5e3d278ef4c80cd7$export$54299a3c81f5425 as useVisibilityState, $f32e14878e75af51$export$eaa625fb39439e37 as useSlidableInformation, $f091294da861020c$export$80bb7300ce6a8be3 as useProductCardIsVisible, $f091294da861020c$export$f223d69ed12f5fb7 as CurrentlyIntersectingContext, $24e27fab9c821b86$export$5bad61ecde080b1f as useExpandingContainerReactive, $07ef910e8ef6b783$export$2c9f9bf2092486aa as LooksSliderOrGrid, $e9d1d09be9e6471e$export$44809a8a3e867e30 as LookCard, $4fd2ba03703a7d92$export$7e1297a3a19f10d8 as PseudoRouter, $de6ccd37192b5fc2$export$83bb9af5671e1dbe as promiseSafeStructuredClone, $90980bd87c9960f9$export$5162a71f252e6122 as preserve_items_in_history_dot_state, $90980bd87c9960f9$export$3064e1e8c6513da3 as prefixes_to_preserve_in_history_dot_state, $a281666e5c15c2ec$export$29d28dadc2d6b631 as allowNativeNavigation, $66db7a014e20802e$export$1ea76ea778b880dd as modalVersionSymbol, $136f1d4d6c7ba6ac$export$e417c49320921907 as createDeparallelizedNoDropResource, $d8dbf52fea1773e2$export$f50b88e2a00918b5 as throw_globally, $42912431795f188e$export$9265e66f26f8e383 as ClassicSearchModal, $500a16dd18ee5a71$export$b0c55aa2e87c4be7 as SearchModalV2, $70bb27cc6be01fc7$export$9d4a4b669b1929ab as ModernResponsiveContainedImage, $024fbc0a2d796fad$export$3e41faf802a29e71 as Tab, $024fbc0a2d796fad$export$b2539bed5023c21c as Tabs, $8560c919ff763930$export$d4973c31938cbfd1 as ShopTheLookButton, $ca6f574bd8772184$export$e183a13865960371 as history_dot_state_to_state, $4147651646da990a$export$916e6850778505f6 as strip_encoded_filter_and_sort, $4147651646da990a$export$58aa3f171519b6d7 as encode_filters, $4147651646da990a$export$f934fa24c3a86811 as decode_filters, $4147651646da990a$export$62acb285a7579555 as encode_sorting, $4147651646da990a$export$766e9676e74997d3 as decode_sorting, $660070e2a394b3c3$export$d7b7ab832c20e2f4 as shopifyContainedImageContextSymbol, $011607bdf658f807$export$e68cff63f76bd15b as ListingProvider, $011607bdf658f807$export$8d0c4fdbb05a2f2e as useListing, $b6440e72ed83671a$export$11354f017ddc9790 as ProductCardIndexProvider, $b6440e72ed83671a$export$e3faf4d95300054f as useProductCardIndex, $660070e2a394b3c3$export$e4b984597b71e989 as ShopifyContainedImage, $f32e14878e75af51$export$6649caad96ef8870 as SlidableItems, $2449872a62a75a20$export$ebdc3711f7e02ccd as make_accurate_width_accessor, $ee116da074deb002$export$9574e176201e5e8d as RecommendationSlider, $9ea5383493360761$export$9756467d34d91cdb as RecommendationGrid, $e8ffe11ed01df0fe$export$6e5611bc7e57e477 as ShopifyResponsiveImg, $e8ffe11ed01df0fe$export$e6fffe67d4cdd848 as makeSizeAccessor, $f18d425032111270$export$94026ee33dbabc26 as ImageContainer, $b7436a6d1fd64e3b$export$b69d0d92862de18b as SentryErrorBoundary, $b7436a6d1fd64e3b$export$240ecf5363d76c0f as ExtraSentryContextProvider, $6bb0a0c563dff4bb$export$6c6d7a51fa9aa15d as ExpandingDetails, $c16e74cfe125bb05$export$f091cbac892643a4 as accessor_of_object_to_object_with_accessor_values, $1adfe60f3a14a1d7$export$fecbb157621501bd as SelectedFilters, $fab07f52c9861732$export$3f1a388cc0d8fed7 as FilterBody, $5efb5894079b220e$export$b288c38ae3fddb56 as create_modified_filters, $c8d5ff4524619fcd$export$d21e32dfedac04be as SolidLayout, $c8d5ff4524619fcd$export$445d8d3f5f706a40 as SolidLayoutWithProvidedElement, $194bd6b8e4c59830$export$79b1565500412d9b as general_modal_abstraction, $19976a74d273070d$export$3b621d86b1566b2 as CrossIcon, $fbbadcb080ad1d4a$export$8be2714ec7f169ee as GenericSliderArrowButton, $a0f0e923bad68a9b$export$58e808b1db15d3bc as fetchDepictRecommendations, $e4615ecd1849548f$export$b91cec6bdc6b32a1 as CategoryTitle, $a6e23a834336fc19$export$824dde41348efed1 as embedded_num_products, $4b2134398dfa83fa$export$c1a6b039e689a58e as get_listings, $961b5c64bef4662f$export$f34314aa9505732e as DepictCategory, $806c97b931758897$export$ac6237957a15b3f0 as DepictSearch, $806c97b931758897$export$bde3eb976dfded9 as get_search_query_updating_blocked_signal, $806c97b931758897$export$f2dc7e4e4aa11abb as SearchPage, $4fd48cb976bf1789$export$aa14a9f43128f61f as ProductCardError, $6891c018a834cfdd$export$d86a33413558014e as open_modal_with_alignment, $bb15dfb548a7666e$export$ee1733d9a8495996 as DefaultInstantCardPlaceholder, $b6d5529b253681aa$export$b3ad617e9036868 as align_field, $b6d5529b253681aa$export$3f238c96c45e6cc6 as ALIGN_TOP, $b6d5529b253681aa$export$902f8b4a7dae5d78 as ALIGN_WIDTH_ON_MODAL, $b6d5529b253681aa$export$7895aadd1956b1c7 as ALIGN_LEFT, $b6d5529b253681aa$export$6060bc6bee850eb6 as SET_CENTERED_LEFT, $b5cccc8ee7d24677$export$6daf8749b65a1b77 as convert_sdk_cols_at_size_to_layout, $926b1b5ba2239356$export$1233ca167bf71f9a as styles_to_valid_css_string, $aea1edf92433e81e$export$fe334901e8bebd57 as disable_scrolling, $6e8944558258054f$export$d0596b5cae35ad4 as open_search_with_shift_slash, $7fa23e2a0079eca4$export$e015ed2f2950f2e3 as DepictAPI, $dc9262ef6f786812$export$d9f36cf74e24d595 as media_query_to_accessor, $6936724b9e0b98d5$export$689e204eadb33baf as setup_fast_leave, $bf52d9f9eebd1938$export$5196e4c01fa56fcb as show_toast, $8c0f86cb3e266eeb$export$a71e92cfbb498adc as SolidFormatPrice, $4ca91518c9a35379$export$828dcdd425fd3231 as connect_search_field_height_to_aligner_height, $d20eff0aadc28983$export$acb3eaade4b23afd as BasePlaceholder, $d134eae24341b4a1$export$89c6019e4baa40b1 as TextPlaceholder, $7f60f09116a3fe61$export$3f37af283f8fb843 as ImagePlaceholder, $753e9b2889a47c89$export$3ccaa27d81dd8556 as PageReplacer, $4690a06c8489dcd0$export$864d304a0bc46829 as defaultGridSpacing, $4690a06c8489dcd0$export$c3834fa86c616831 as defaultColsAtSize, $4690a06c8489dcd0$export$7bf543b9d9be2c22 as defaultCategoryTitlePlugin, $ec291e0010116877$export$83d89fbfd8236492 as version, $58b3487626e85ece$export$316f6f283ae64765 as SearchField, $feffae76d8dc0135$export$5b7c3ce0ebe51f86 as BreadCrumbs, $feffae76d8dc0135$export$de035477d6fef996 as QuickLinks, $442f32a4d80abbde$export$e2bf8ce7779e827e as CategoryPage };
|