@depict-ai/ui 1.4.20 → 1.4.22
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 +5 -3
- package/ES10/index.d.ts +1 -1
- package/ES10/index.js +159 -157
- package/latest/index.cjs +5 -3
- package/latest/index.d.ts +1 -1
- package/latest/index.js +159 -157
- package/package.json +1 -1
- package/server/ES10/index.cjs +5 -3
- package/server/ES10/index.d.ts +1 -1
- package/server/ES10/index.js +100 -98
- package/server/latest/index.cjs +5 -3
- package/server/latest/index.d.ts +1 -1
- package/server/latest/index.js +100 -98
package/ES10/index.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { add_to_version_info as $8tj43$add_to_version_info,
|
|
1
|
+
import { add_to_version_info as $8tj43$add_to_version_info, catchify as $8tj43$catchify, is_safari as $8tj43$is_safari, report as $8tj43$report, observer as $8tj43$observer, useExpandingContainer as $8tj43$useExpandingContainer, standard_price_format as $8tj43$standard_price_format, Amazing_Slider as $8tj43$Amazing_Slider, slider_snap_css as $8tj43$slider_snap_css, slider_fading_factory as $8tj43$slider_fading_factory, make_random_classname as $8tj43$make_random_classname, dlog as $8tj43$dlog, hex_to_rgb as $8tj43$hex_to_rgb, relative_luminance_from_rgb as $8tj43$relative_luminance_from_rgb, javascript_media_query as $8tj43$javascript_media_query, n_col_styling_with_dist as $8tj43$n_col_styling_with_dist, layout_get_visible_recs_without_partial_rows as $8tj43$layout_get_visible_recs_without_partial_rows, layout_get_total_rec_amount_for_row as $8tj43$layout_get_total_rec_amount_for_row, layout_media_query_header as $8tj43$layout_media_query_header, fetch_recs as $8tj43$fetch_recs, snakeCasifyObject as $8tj43$snakeCasifyObject, instant_exec_on_suspect_history_change as $8tj43$instant_exec_on_suspect_history_change, base_url as $8tj43$base_url, get_depict_id as $8tj43$get_depict_id, get_user_id as $8tj43$get_user_id, get_session_id as $8tj43$get_session_id, make_url_with_query_params as $8tj43$make_url_with_query_params, fetch_retry as $8tj43$fetch_retry, add_version_query_params as $8tj43$add_version_query_params, dwarn as $8tj43$dwarn, sort_obj as $8tj43$sort_obj, edit_current_page_meta_tags as $8tj43$edit_current_page_meta_tags, use_href_accessor as $8tj43$use_href_accessor, base64_encode_unicode as $8tj43$base64_encode_unicode, base64_decode_unicode as $8tj43$base64_decode_unicode, queueMacroTask as $8tj43$queueMacroTask, is_debug as $8tj43$is_debug, make_asyncIterable_exiter as $8tj43$make_asyncIterable_exiter, href_change_ipns as $8tj43$href_change_ipns, ContainedImage as $8tj43$ContainedImage, buildThresholdList as $8tj43$buildThresholdList, deparallelize_no_drop as $8tj43$deparallelize_no_drop, insert_surfaces as $8tj43$insert_surfaces } from "@depict-ai/utilishared/ES10";
|
|
2
2
|
import { template as $8tj43$template, getNextElement as $8tj43$getNextElement, spread as $8tj43$spread, mergeProps as $8tj43$mergeProps, runHydrationEvents as $8tj43$runHydrationEvents, effect as $8tj43$effect, style as $8tj43$style, insert as $8tj43$insert, classList as $8tj43$classList, createComponent as $8tj43$createComponent, getNextMarker as $8tj43$getNextMarker, addEventListener as $8tj43$addEventListener, memo as $8tj43$memo, delegateEvents as $8tj43$delegateEvents, setAttribute as $8tj43$setAttribute, Dynamic as $8tj43$Dynamic, use as $8tj43$use, className as $8tj43$className, isServer as $8tj43$isServer } from "solid-js/web";
|
|
3
|
-
import { catchify as $8tj43$catchify } from "@depict-ai/utilishared/latest/ES10";
|
|
4
3
|
import { createSignal as $8tj43$createSignal, onCleanup as $8tj43$onCleanup, ErrorBoundary as $8tj43$ErrorBoundary, createMemo as $8tj43$createMemo, untrack as $8tj43$untrack, createEffect as $8tj43$createEffect, getOwner as $8tj43$getOwner, Show as $8tj43$Show, runWithOwner as $8tj43$runWithOwner, Index as $8tj43$Index, createRoot as $8tj43$createRoot, on as $8tj43$on, For as $8tj43$For, createRenderEffect as $8tj43$createRenderEffect, createComputed as $8tj43$createComputed, batch as $8tj43$batch, createResource as $8tj43$createResource, createReaction as $8tj43$createReaction, Suspense as $8tj43$Suspense } from "solid-js";
|
|
5
4
|
import $8tj43$babelruntimehelpersclassPrivateFieldSet from "@babel/runtime/helpers/classPrivateFieldSet";
|
|
6
5
|
import $8tj43$babelruntimehelpersclassPrivateFieldGet from "@babel/runtime/helpers/classPrivateFieldGet";
|
|
@@ -9,7 +8,7 @@ import $8tj43$babelruntimehelpersdefineProperty from "@babel/runtime/helpers/def
|
|
|
9
8
|
/*! Depict.ai search and product listing SDK */
|
|
10
9
|
import { register_es_version } from "../multi_import_deduplicator.mjs";
|
|
11
10
|
register_es_version("ui", "ES10");
|
|
12
|
-
const $8db9a15135765c11$export$83d89fbfd8236492 = "1.4.
|
|
11
|
+
const $8db9a15135765c11$export$83d89fbfd8236492 = "1.4.22";
|
|
13
12
|
const $56047603f9d212b6$var$_tmpl$ = /*#__PURE__*/$8tj43$template(`<img>`, 1);
|
|
14
13
|
function $56047603f9d212b6$export$e6fffe67d4cdd848(whatToWatch) {
|
|
15
14
|
const [size, setSize] = $8tj43$createSignal(0);
|
|
@@ -158,15 +157,15 @@ function $ad371564683947ab$export$6c6d7a51fa9aa15d(props) {
|
|
|
158
157
|
$8tj43$insert(details_, [summary_, $8tj43$createComponent(ExpandingContainer, {
|
|
159
158
|
children: children
|
|
160
159
|
})], null);
|
|
161
|
-
if (!$8tj43$untrack(is_in_dom)) (0, $8tj43$observer).wait_for_element(details_).then($8tj43$
|
|
162
|
-
$8tj43$createEffect($8tj43$
|
|
160
|
+
if (!$8tj43$untrack(is_in_dom)) (0, $8tj43$observer).wait_for_element(details_).then($8tj43$catchify(() => set_is_in_dom(true)));
|
|
161
|
+
$8tj43$createEffect($8tj43$catchify(async () => {
|
|
163
162
|
const is_open = is_open_memo();
|
|
164
163
|
if (!is_in_dom())
|
|
165
164
|
// wait with setting state until we're in DOM, animation won't work otherwise
|
|
166
165
|
return;
|
|
167
166
|
if (dont_animate_if_instant_open_ && fresh_component && !timeout_started) {
|
|
168
167
|
timeout_started = true;
|
|
169
|
-
setTimeout($8tj43$
|
|
168
|
+
setTimeout($8tj43$catchify(() => fresh_component = false));
|
|
170
169
|
}
|
|
171
170
|
if (is_open) {
|
|
172
171
|
details_.open = true; // open up the toggle so the animation can happen
|
|
@@ -174,10 +173,10 @@ function $ad371564683947ab$export$6c6d7a51fa9aa15d(props) {
|
|
|
174
173
|
await expand(0, do_duration);
|
|
175
174
|
} else {
|
|
176
175
|
const animation = await collapse();
|
|
177
|
-
animation === null || animation === void 0 || animation.addEventListener("finish", $8tj43$
|
|
176
|
+
animation === null || animation === void 0 || animation.addEventListener("finish", $8tj43$catchify(() => details_.open = false));
|
|
178
177
|
}
|
|
179
178
|
}));
|
|
180
|
-
details_.addEventListener("toggle", $8tj43$
|
|
179
|
+
details_.addEventListener("toggle", $8tj43$catchify(() => {
|
|
181
180
|
const {
|
|
182
181
|
open: open
|
|
183
182
|
} = details_;
|
|
@@ -187,11 +186,11 @@ function $ad371564683947ab$export$6c6d7a51fa9aa15d(props) {
|
|
|
187
186
|
}) // in case someone somehow toggles it without us intercepting it at least follow suit
|
|
188
187
|
);
|
|
189
188
|
|
|
190
|
-
summary_.addEventListener("click", $8tj43$
|
|
189
|
+
summary_.addEventListener("click", $8tj43$catchify(ev => {
|
|
191
190
|
ev.preventDefault();
|
|
192
191
|
toggle();
|
|
193
192
|
}));
|
|
194
|
-
summary_.addEventListener("keydown", $8tj43$
|
|
193
|
+
summary_.addEventListener("keydown", $8tj43$catchify(ev => {
|
|
195
194
|
const {
|
|
196
195
|
key: key
|
|
197
196
|
} = ev;
|
|
@@ -288,7 +287,7 @@ function $a61a2051e15c8d7a$export$5196e4c01fa56fcb(_ref) {
|
|
|
288
287
|
} = _ref;
|
|
289
288
|
let close_toast_;
|
|
290
289
|
const stay_open_promise = new Promise(r => close_toast_ = r);
|
|
291
|
-
$8tj43$
|
|
290
|
+
$8tj43$catchify(async () => {
|
|
292
291
|
const closing_animation_duration = 300; // ms
|
|
293
292
|
const element = (() => {
|
|
294
293
|
const _el$ = $8tj43$getNextElement($a61a2051e15c8d7a$var$_tmpl$);
|
|
@@ -299,8 +298,8 @@ function $a61a2051e15c8d7a$export$5196e4c01fa56fcb(_ref) {
|
|
|
299
298
|
})();
|
|
300
299
|
const [, set_is_showing_toast] = $a61a2051e15c8d7a$export$22970a0140fc759c;
|
|
301
300
|
// if this is a memory leak the garbage collector is stupid - does someone know?
|
|
302
|
-
for (const ev of ["pointerover", "focusin"]) element.addEventListener(ev, $8tj43$
|
|
303
|
-
for (const ev of ["pointerout", "focusout"]) element.addEventListener(ev, $8tj43$
|
|
301
|
+
for (const ev of ["pointerover", "focusin"]) element.addEventListener(ev, $8tj43$catchify(() => closing_animation.pause()));
|
|
302
|
+
for (const ev of ["pointerout", "focusout"]) element.addEventListener(ev, $8tj43$catchify(() => closing_animation.play()));
|
|
304
303
|
const body = await (0, $8tj43$observer).wait_for_element("body");
|
|
305
304
|
const x_translate = "translateX(-50%) ";
|
|
306
305
|
let remove_keyboard_listener;
|
|
@@ -325,7 +324,7 @@ function $a61a2051e15c8d7a$export$5196e4c01fa56fcb(_ref) {
|
|
|
325
324
|
// let other toasts close us if they open while we're still here
|
|
326
325
|
$a61a2051e15c8d7a$var$closing_functions.add(close_toast_);
|
|
327
326
|
set_is_showing_toast(true);
|
|
328
|
-
const handler = $8tj43$
|
|
327
|
+
const handler = $8tj43$catchify(_ref2 => {
|
|
329
328
|
let {
|
|
330
329
|
key: key
|
|
331
330
|
} = _ref2;
|
|
@@ -432,7 +431,7 @@ function $b4465d8d605f61e9$export$8895d39404bd2bb1(props) {
|
|
|
432
431
|
const _el$2 = $8tj43$getNextElement($b4465d8d605f61e9$var$_tmpl$2),
|
|
433
432
|
_el$3 = _el$2.firstChild,
|
|
434
433
|
_el$4 = _el$3.nextSibling;
|
|
435
|
-
$8tj43$addEventListener(_el$3, "click", $8tj43$
|
|
434
|
+
$8tj43$addEventListener(_el$3, "click", $8tj43$catchify(() => {
|
|
436
435
|
set_selected_filters(previous_selected_filters);
|
|
437
436
|
set_expanded_hierarchical_filters(previous_expanded_hierarchical_filters);
|
|
438
437
|
if (also_clear_sorting_ && previous_sorting) props.current_sorting_[1](previous_sorting);
|
|
@@ -515,7 +514,7 @@ function $4711a82d08d2021b$export$fecbb157621501bd(_ref) {
|
|
|
515
514
|
get children() {
|
|
516
515
|
return [(() => {
|
|
517
516
|
const _el$6 = $8tj43$getNextElement($4711a82d08d2021b$var$_tmpl$);
|
|
518
|
-
$8tj43$addEventListener(_el$6, "click", $8tj43$
|
|
517
|
+
$8tj43$addEventListener(_el$6, "click", $8tj43$catchify(() =>
|
|
519
518
|
// click event handlers don't have an owner, carry it over
|
|
520
519
|
$8tj43$runWithOwner(owner, () => $b4465d8d605f61e9$export$8895d39404bd2bb1({
|
|
521
520
|
selected_filters_: selected_filters_,
|
|
@@ -712,7 +711,7 @@ function $4711a82d08d2021b$export$fecbb157621501bd(_ref) {
|
|
|
712
711
|
_el$28 = _el$26.firstChild,
|
|
713
712
|
[_el$29, _co$10] = $8tj43$getNextMarker(_el$28.nextSibling),
|
|
714
713
|
_el$27 = _el$29.nextSibling;
|
|
715
|
-
$8tj43$addEventListener(_el$26, "click", $8tj43$
|
|
714
|
+
$8tj43$addEventListener(_el$26, "click", $8tj43$catchify(() => {
|
|
716
715
|
const to_remove = selected_data();
|
|
717
716
|
const cloned_selected_filters = [...read_selected_filters()];
|
|
718
717
|
cloned_selected_filters.splice(index_in_selected_filters, 1);
|
|
@@ -768,9 +767,9 @@ function $4711a82d08d2021b$export$fecbb157621501bd(_ref) {
|
|
|
768
767
|
});
|
|
769
768
|
const [is_in_dom, set_is_in_dom] = $8tj43$createSignal(document.documentElement.contains(outmost_element));
|
|
770
769
|
const hidden = $8tj43$createMemo(() => get_search_filters_open_() || get_search_sorting_open_());
|
|
771
|
-
if (!$8tj43$untrack(is_in_dom)) (0, $8tj43$observer).wait_for_element(outmost_element).then($8tj43$
|
|
770
|
+
if (!$8tj43$untrack(is_in_dom)) (0, $8tj43$observer).wait_for_element(outmost_element).then($8tj43$catchify(() => set_is_in_dom(true)));
|
|
772
771
|
outmost_element.classList.add("selected-filters");
|
|
773
|
-
$8tj43$createEffect($8tj43$
|
|
772
|
+
$8tj43$createEffect($8tj43$catchify(async () => {
|
|
774
773
|
if (!is_in_dom())
|
|
775
774
|
// wait with setting state until we're in DOM, animation won't work otherwise
|
|
776
775
|
return;
|
|
@@ -808,7 +807,7 @@ const $6b73914551534ea8$export$48513f6b9f8ce62d = props => {
|
|
|
808
807
|
// The reason for that being that we re-use the checkboxes. That means if one box was unchecked by the user and then removed, the "checked" value of "another" checkbox (that now had position 0) had changed to 0 (because the user unchecked the box with position 0) while solid js still believed that it was checked because it's checked signal hadn't changed.
|
|
809
808
|
// I've worked around this by restoring the state of the checkbox to what it is in solid js a bit after it was changed
|
|
810
809
|
// Why it can't be done instantaneously I don't know.
|
|
811
|
-
input_el.addEventListener("change", $8tj43$
|
|
810
|
+
input_el.addEventListener("change", $8tj43$catchify(() => requestAnimationFrame($8tj43$catchify(() => {
|
|
812
811
|
if (input_el.checked !== checked()) input_el.checked = checked();
|
|
813
812
|
}))));
|
|
814
813
|
(_props$input_ref_ = props.input_ref_) === null || _props$input_ref_ === void 0 || _props$input_ref_.call(props, input_el);
|
|
@@ -868,7 +867,7 @@ function $3e850b2f2cca761f$export$ca21a16d65b3dd8(_ref) {
|
|
|
868
867
|
_el$3 = _el$.firstChild,
|
|
869
868
|
[_el$4, _co$] = $8tj43$getNextMarker(_el$3.nextSibling),
|
|
870
869
|
_el$2 = _el$4.nextSibling;
|
|
871
|
-
$8tj43$addEventListener(_el$, "click", $8tj43$
|
|
870
|
+
$8tj43$addEventListener(_el$, "click", $8tj43$catchify(() => set_show_extras(p => !p)), true);
|
|
872
871
|
$8tj43$insert(_el$, $8tj43$createComponent((0, $ff3225aef892a467$export$f21ab0717a89c77f), {}), _el$4, _co$);
|
|
873
872
|
$8tj43$insert(_el$2, (() => {
|
|
874
873
|
const _c$ = $8tj43$memo(() => !!get_show_extras());
|
|
@@ -966,7 +965,7 @@ function $133484ef10e4e954$export$dd948f91abc3a1c4(_ref) {
|
|
|
966
965
|
i18n_: i18n_
|
|
967
966
|
}) : []);
|
|
968
967
|
});
|
|
969
|
-
$8tj43$createEffect($8tj43$
|
|
968
|
+
$8tj43$createEffect($8tj43$catchify(async () => {
|
|
970
969
|
if (!togglable_rest()) {
|
|
971
970
|
await collapse();
|
|
972
971
|
return;
|
|
@@ -979,7 +978,7 @@ function $133484ef10e4e954$export$dd948f91abc3a1c4(_ref) {
|
|
|
979
978
|
[_el$3, _co$] = $8tj43$getNextMarker(_el$2.nextSibling),
|
|
980
979
|
_el$4 = _el$3.nextSibling,
|
|
981
980
|
[_el$5, _co$2] = $8tj43$getNextMarker(_el$4.nextSibling);
|
|
982
|
-
$8tj43$addEventListener(_el$, "change", $8tj43$
|
|
981
|
+
$8tj43$addEventListener(_el$, "change", $8tj43$catchify(() => {
|
|
983
982
|
const set_filter = existing_filter();
|
|
984
983
|
const {
|
|
985
984
|
field: field,
|
|
@@ -1060,7 +1059,7 @@ function $b54fc842e721c9eb$export$430444115f70a734(_ref) {
|
|
|
1060
1059
|
_el$9 = _el$3.nextSibling,
|
|
1061
1060
|
[_el$10, _co$2] = $8tj43$getNextMarker(_el$9.nextSibling);
|
|
1062
1061
|
$8tj43$setAttribute(_el$2, "for", random_selector);
|
|
1063
|
-
$8tj43$addEventListener(_el$4, "change", $8tj43$
|
|
1062
|
+
$8tj43$addEventListener(_el$4, "change", $8tj43$catchify(() => {
|
|
1064
1063
|
const filter_object = {
|
|
1065
1064
|
op: filter_().op,
|
|
1066
1065
|
field: filter_().field,
|
|
@@ -1133,7 +1132,7 @@ function $1e7465a8ffa97f6c$export$e0d834a0ad870cda(_ref) {
|
|
|
1133
1132
|
});
|
|
1134
1133
|
$8tj43$createComputed(() => {
|
|
1135
1134
|
clearTimeout(debounce_timeout);
|
|
1136
|
-
debounce_timeout = setTimeout($8tj43$
|
|
1135
|
+
debounce_timeout = setTimeout($8tj43$catchify(range => $8tj43$untrack(() => {
|
|
1137
1136
|
const default_data = filter_().data;
|
|
1138
1137
|
const filter_object = {
|
|
1139
1138
|
op: filter_().op,
|
|
@@ -1211,22 +1210,22 @@ function $1e7465a8ffa97f6c$var$RangeSelector(_ref3) {
|
|
|
1211
1210
|
[_el$22, _co$6] = $8tj43$getNextMarker(_el$21.nextSibling);
|
|
1212
1211
|
const _ref$ = price_input_1;
|
|
1213
1212
|
typeof _ref$ === "function" ? $8tj43$use(_ref$, _el$4) : price_input_1 = _el$4;
|
|
1214
|
-
$8tj43$addEventListener(_el$4, "keydown", $8tj43$
|
|
1213
|
+
$8tj43$addEventListener(_el$4, "keydown", $8tj43$catchify(_ref4 => {
|
|
1215
1214
|
let {
|
|
1216
1215
|
key: key
|
|
1217
1216
|
} = _ref4;
|
|
1218
1217
|
if (key === "Enter") $1e7465a8ffa97f6c$var$set_range_with_sanitation(min_, max_, current_range_, 0, price_input_1);
|
|
1219
1218
|
}), true);
|
|
1220
|
-
$8tj43$addEventListener(_el$4, "blur", $8tj43$
|
|
1219
|
+
$8tj43$addEventListener(_el$4, "blur", $8tj43$catchify(() => $1e7465a8ffa97f6c$var$set_range_with_sanitation(min_, max_, current_range_, 0, price_input_1)));
|
|
1221
1220
|
const _ref$2 = price_input_2;
|
|
1222
1221
|
typeof _ref$2 === "function" ? $8tj43$use(_ref$2, _el$7) : price_input_2 = _el$7;
|
|
1223
|
-
$8tj43$addEventListener(_el$7, "keydown", $8tj43$
|
|
1222
|
+
$8tj43$addEventListener(_el$7, "keydown", $8tj43$catchify(_ref5 => {
|
|
1224
1223
|
let {
|
|
1225
1224
|
key: key
|
|
1226
1225
|
} = _ref5;
|
|
1227
1226
|
if (key === "Enter") $1e7465a8ffa97f6c$var$set_range_with_sanitation(min_, max_, current_range_, 1, price_input_2);
|
|
1228
1227
|
}), true);
|
|
1229
|
-
$8tj43$addEventListener(_el$7, "blur", $8tj43$
|
|
1228
|
+
$8tj43$addEventListener(_el$7, "blur", $8tj43$catchify(() => $1e7465a8ffa97f6c$var$set_range_with_sanitation(min_, max_, current_range_, 1, price_input_2)));
|
|
1230
1229
|
$8tj43$insert(_el$, $8tj43$createComponent($1e7465a8ffa97f6c$var$ExponentialSlider, {
|
|
1231
1230
|
max_: max_,
|
|
1232
1231
|
min_: min_,
|
|
@@ -1354,7 +1353,7 @@ function $1e7465a8ffa97f6c$var$LinearSlider(_ref9) {
|
|
|
1354
1353
|
return [(() => {
|
|
1355
1354
|
const _el$25 = $8tj43$getNextElement($1e7465a8ffa97f6c$var$_tmpl$2),
|
|
1356
1355
|
_el$26 = _el$25.firstChild;
|
|
1357
|
-
$8tj43$addEventListener(_el$25, "click", $8tj43$
|
|
1356
|
+
$8tj43$addEventListener(_el$25, "click", $8tj43$catchify(e => {
|
|
1358
1357
|
const rect = clickable_slider.getBoundingClientRect();
|
|
1359
1358
|
const slider_beginning_left = rect.left;
|
|
1360
1359
|
const slider_width = rect.width;
|
|
@@ -1380,12 +1379,12 @@ function $1e7465a8ffa97f6c$var$LinearSlider(_ref9) {
|
|
|
1380
1379
|
range_input_1 = el;
|
|
1381
1380
|
set_value(range_input_1, 0);
|
|
1382
1381
|
}, _el$28);
|
|
1383
|
-
$8tj43$addEventListener(_el$28, "input", $8tj43$
|
|
1382
|
+
$8tj43$addEventListener(_el$28, "input", $8tj43$catchify(() => $1e7465a8ffa97f6c$var$set_range_with_sanitation(min_, max_, current_range_, 0, range_input_1, offset_value_calculator_)), true);
|
|
1384
1383
|
$8tj43$use(el => {
|
|
1385
1384
|
range_input_2 = el;
|
|
1386
1385
|
set_value(range_input_2, 1);
|
|
1387
1386
|
}, _el$29);
|
|
1388
|
-
$8tj43$addEventListener(_el$29, "input", $8tj43$
|
|
1387
|
+
$8tj43$addEventListener(_el$29, "input", $8tj43$catchify(() => $1e7465a8ffa97f6c$var$set_range_with_sanitation(min_, max_, current_range_, 1, range_input_2, offset_value_calculator_)), true);
|
|
1389
1388
|
$8tj43$effect(_p$ => {
|
|
1390
1389
|
const _v$7 = i18n_.range_filter_low_point_aria_label_(),
|
|
1391
1390
|
_v$8 = min_(),
|
|
@@ -1458,7 +1457,7 @@ function $457279ff15864cb9$export$e5c2828934226505(_ref) {
|
|
|
1458
1457
|
return _el$;
|
|
1459
1458
|
})();
|
|
1460
1459
|
const [is_in_dom, set_is_in_dom] = $8tj43$createSignal(false);
|
|
1461
|
-
(0, $8tj43$observer).wait_for_element(outer_div).then($8tj43$
|
|
1460
|
+
(0, $8tj43$observer).wait_for_element(outer_div).then($8tj43$catchify(() => set_is_in_dom(true)));
|
|
1462
1461
|
$8tj43$createEffect(() => {
|
|
1463
1462
|
if (!is_in_dom())
|
|
1464
1463
|
// wait for us to being in DOM as animations don't work otherwise
|
|
@@ -1616,7 +1615,7 @@ function $0ae614c5c7babb43$export$a32086fa6616eafd(_ref) {
|
|
|
1616
1615
|
i18n_: i18n_
|
|
1617
1616
|
}) : []);
|
|
1618
1617
|
});
|
|
1619
|
-
$8tj43$createEffect($8tj43$
|
|
1618
|
+
$8tj43$createEffect($8tj43$catchify(async () => {
|
|
1620
1619
|
if (!some_top_level_are_hidden()) {
|
|
1621
1620
|
await collapse();
|
|
1622
1621
|
return;
|
|
@@ -1683,7 +1682,7 @@ function $0ae614c5c7babb43$var$render_stuff(data, existing_filter, i18n_) {
|
|
|
1683
1682
|
return (_value$is_checked_$ = (_value6 = value()) === null || _value6 === void 0 ? void 0 : (_value6$is_checked_ = _value6.is_checked_) === null || _value6$is_checked_ === void 0 ? void 0 : (_value6$is_checked_$ = _value6$is_checked_[0]) === null || _value6$is_checked_$ === void 0 ? void 0 : _value6$is_checked_$.call(_value6$is_checked_)) !== null && _value$is_checked_$ !== void 0 ? _value$is_checked_$ : false;
|
|
1684
1683
|
},
|
|
1685
1684
|
input_ref_: input => {
|
|
1686
|
-
input.addEventListener("change", $8tj43$
|
|
1685
|
+
input.addEventListener("change", $8tj43$catchify(() => $8tj43$untrack(() => {
|
|
1687
1686
|
var _value8;
|
|
1688
1687
|
const {
|
|
1689
1688
|
checked: checked
|
|
@@ -1782,7 +1781,7 @@ function $0ae614c5c7babb43$var$batching_filter_state_syncer(props) {
|
|
|
1782
1781
|
existing_filter_: existing_filter_
|
|
1783
1782
|
} = props;
|
|
1784
1783
|
let sync_queued = false;
|
|
1785
|
-
const sync_fn = $8tj43$
|
|
1784
|
+
const sync_fn = $8tj43$catchify(async () => {
|
|
1786
1785
|
sync_queued = false;
|
|
1787
1786
|
// if we change, update filter state - next microtask, so that "reactions" to the change can process before we send it off to the API
|
|
1788
1787
|
const set_filter = existing_filter_();
|
|
@@ -1844,13 +1843,13 @@ function $0ae614c5c7babb43$var$create_updating_signal(_ref3) {
|
|
|
1844
1843
|
$8tj43$createComputed($8tj43$on(read_checked, trigger_sync_, {
|
|
1845
1844
|
defer: true
|
|
1846
1845
|
}));
|
|
1847
|
-
$8tj43$createComputed($8tj43$on(read_checked, $8tj43$
|
|
1846
|
+
$8tj43$createComputed($8tj43$on(read_checked, $8tj43$catchify(new_value => {
|
|
1848
1847
|
if (updating_blocked) return;
|
|
1849
1848
|
for (const child of child_objects) child.is_checked_[1](new_value);
|
|
1850
1849
|
}), {
|
|
1851
1850
|
defer: true
|
|
1852
1851
|
}));
|
|
1853
|
-
$8tj43$createEffect($8tj43$on(get_child_object_values, $8tj43$
|
|
1852
|
+
$8tj43$createEffect($8tj43$on(get_child_object_values, $8tj43$catchify(() => {
|
|
1854
1853
|
const all_kids_checked = get_child_object_values.every(accessor => accessor());
|
|
1855
1854
|
if (all_kids_checked === read_checked()) return;
|
|
1856
1855
|
updating_blocked = true;
|
|
@@ -1991,7 +1990,7 @@ const $830ea8efda59884e$export$414f6a19d38e655c = _ref => {
|
|
|
1991
1990
|
});
|
|
1992
1991
|
return (() => {
|
|
1993
1992
|
const _el$2 = $8tj43$getNextElement($830ea8efda59884e$var$_tmpl$2);
|
|
1994
|
-
$8tj43$addEventListener(_el$2, "click", $8tj43$
|
|
1993
|
+
$8tj43$addEventListener(_el$2, "click", $8tj43$catchify(() => {
|
|
1995
1994
|
const set_filter = existing_filter();
|
|
1996
1995
|
const {
|
|
1997
1996
|
field: field,
|
|
@@ -2160,7 +2159,7 @@ function $2cb856c297c53e6c$export$82ed4b28ecb67608(_ref) {
|
|
|
2160
2159
|
i18n_: i18n_
|
|
2161
2160
|
}) : []);
|
|
2162
2161
|
});
|
|
2163
|
-
$8tj43$createEffect($8tj43$
|
|
2162
|
+
$8tj43$createEffect($8tj43$catchify(async () => {
|
|
2164
2163
|
if (!togglable_rest()) {
|
|
2165
2164
|
await collapse();
|
|
2166
2165
|
set_having_expanding_in_dom(false); // Once animation has finished, remove expanding from DOM
|
|
@@ -2175,7 +2174,7 @@ function $2cb856c297c53e6c$export$82ed4b28ecb67608(_ref) {
|
|
|
2175
2174
|
[_el$3, _co$] = $8tj43$getNextMarker(_el$2.nextSibling),
|
|
2176
2175
|
_el$4 = _el$3.nextSibling,
|
|
2177
2176
|
[_el$5, _co$2] = $8tj43$getNextMarker(_el$4.nextSibling);
|
|
2178
|
-
$8tj43$addEventListener(_el$, "change", $8tj43$
|
|
2177
|
+
$8tj43$addEventListener(_el$, "change", $8tj43$catchify(() => {
|
|
2179
2178
|
const set_filter = existing_filter();
|
|
2180
2179
|
const {
|
|
2181
2180
|
field: field,
|
|
@@ -2589,7 +2588,7 @@ function $f6b0500577e1b210$var$ActualFilterBody(props) {
|
|
|
2589
2588
|
_el$7 = _el$5.firstChild,
|
|
2590
2589
|
[_el$8, _co$] = $8tj43$getNextMarker(_el$7.nextSibling),
|
|
2591
2590
|
_el$6 = _el$8.nextSibling;
|
|
2592
|
-
$8tj43$addEventListener(_el$5, "click", $8tj43$
|
|
2591
|
+
$8tj43$addEventListener(_el$5, "click", $8tj43$catchify(() => {
|
|
2593
2592
|
const new_filter_obj = [...props.selected_filters_[0]()];
|
|
2594
2593
|
for (const filter of filter_array_()) {
|
|
2595
2594
|
const index = new_filter_obj.findIndex(_ref2 => {
|
|
@@ -2661,7 +2660,7 @@ function $f6b0500577e1b210$var$ActualFilterBody(props) {
|
|
|
2661
2660
|
},
|
|
2662
2661
|
get children() {
|
|
2663
2662
|
const _el$25 = $8tj43$getNextElement($f6b0500577e1b210$var$_tmpl$8);
|
|
2664
|
-
$8tj43$addEventListener(_el$25, "click", $8tj43$
|
|
2663
|
+
$8tj43$addEventListener(_el$25, "click", $8tj43$catchify(() => $b4465d8d605f61e9$export$8895d39404bd2bb1({
|
|
2665
2664
|
user_triggered_: true,
|
|
2666
2665
|
selected_filters_: props.selected_filters_,
|
|
2667
2666
|
i18n_: props.i18n_,
|
|
@@ -2892,7 +2891,7 @@ function $63f1f8dbcd07d3b0$var$ActualSolidLayout(props, container_element) {
|
|
|
2892
2891
|
const view_less_button_class = $8tj43$make_random_classname();
|
|
2893
2892
|
const view_more_button_container = $8tj43$createMemo(() => have_a_view_more_button() && (() => {
|
|
2894
2893
|
const _el$2 = $8tj43$getNextElement($63f1f8dbcd07d3b0$var$_tmpl$);
|
|
2895
|
-
$8tj43$addEventListener(_el$2, "click", $8tj43$
|
|
2894
|
+
$8tj43$addEventListener(_el$2, "click", $8tj43$catchify(() => set_rows_visible()(prev => {
|
|
2896
2895
|
var _rows_or_empty_object2;
|
|
2897
2896
|
return prev + ((_rows_or_empty_object2 = rows_or_empty_object().rows_per_click) !== null && _rows_or_empty_object2 !== void 0 ? _rows_or_empty_object2 : 1);
|
|
2898
2897
|
})), true);
|
|
@@ -2904,7 +2903,7 @@ function $63f1f8dbcd07d3b0$var$ActualSolidLayout(props, container_element) {
|
|
|
2904
2903
|
// We need to have duplicate buttons because which ones is shown depends on the number of rows visible and therefore on the viewport size and therefore on the css media queries
|
|
2905
2904
|
const view_less_button_container = $8tj43$createMemo(() => have_a_view_less_button() && (() => {
|
|
2906
2905
|
const _el$3 = $8tj43$getNextElement($63f1f8dbcd07d3b0$var$_tmpl$);
|
|
2907
|
-
$8tj43$addEventListener(_el$3, "click", $8tj43$
|
|
2906
|
+
$8tj43$addEventListener(_el$3, "click", $8tj43$catchify(() => set_rows_visible()(() => {
|
|
2908
2907
|
var _rows_or_empty_object3;
|
|
2909
2908
|
return (_rows_or_empty_object3 = rows_or_empty_object().start_rows) !== null && _rows_or_empty_object3 !== void 0 ? _rows_or_empty_object3 : 1;
|
|
2910
2909
|
})), true);
|
|
@@ -2928,7 +2927,7 @@ function $63f1f8dbcd07d3b0$var$ActualSolidLayout(props, container_element) {
|
|
|
2928
2927
|
return;
|
|
2929
2928
|
}
|
|
2930
2929
|
update_children_count();
|
|
2931
|
-
const mutation_observer = new MutationObserver($8tj43$
|
|
2930
|
+
const mutation_observer = new MutationObserver($8tj43$catchify(update_children_count));
|
|
2932
2931
|
mutation_observer.observe(container_element, {
|
|
2933
2932
|
childList: true
|
|
2934
2933
|
});
|
|
@@ -2994,7 +2993,7 @@ async function $d5f1e6a0f9117286$export$79b1565500412d9b(search_modal, modal_fn_
|
|
|
2994
2993
|
actually_close();else if (!animation_started && closing_animation) {
|
|
2995
2994
|
var _catchify;
|
|
2996
2995
|
animation_started = +new Date();
|
|
2997
|
-
(_catchify = $8tj43$
|
|
2996
|
+
(_catchify = $8tj43$catchify(closing_animation)()) === null || _catchify === void 0 || _catchify.then($8tj43$catchify(actually_close));
|
|
2998
2997
|
} else actually_close();
|
|
2999
2998
|
};
|
|
3000
2999
|
return search_modal({
|
|
@@ -3036,7 +3035,7 @@ async function $5c5732ef44f05b26$export$58e808b1db15d3bc(_ref) {
|
|
|
3036
3035
|
function $972f6bce0f9d61be$export$e183a13865960371(params_to_default_value, router_) {
|
|
3037
3036
|
const signals = {};
|
|
3038
3037
|
const entries = Object.entries(params_to_default_value);
|
|
3039
|
-
const event_handler = $8tj43$
|
|
3038
|
+
const event_handler = $8tj43$catchify((what_happened, args) => {
|
|
3040
3039
|
if (what_happened == "popstate") $972f6bce0f9d61be$var$history_state_change(signals, entries, args.state);
|
|
3041
3040
|
});
|
|
3042
3041
|
// createRenderEffect because we need the instant execution so the signals always contain values, even before solid's render phase
|
|
@@ -3061,8 +3060,8 @@ function $972f6bce0f9d61be$export$e183a13865960371(params_to_default_value, rout
|
|
|
3061
3060
|
});
|
|
3062
3061
|
// history_dot_state_to_state needs to update after its signals after url_state does BUT in the same task (might even have to be in the same tick in the microtask queue). If we'd use window.addEventListener("popstate") it would be guaranteed to be too late since each event listener has its own task
|
|
3063
3062
|
(0, $8tj43$instant_exec_on_suspect_history_change).add(event_handler);
|
|
3064
|
-
$8tj43$onCleanup($8tj43$
|
|
3065
|
-
$8tj43$createEffect($8tj43$
|
|
3063
|
+
$8tj43$onCleanup($8tj43$catchify(() => (0, $8tj43$instant_exec_on_suspect_history_change).delete(event_handler)));
|
|
3064
|
+
$8tj43$createEffect($8tj43$catchify(() => $8tj43$untrack($8tj43$catchify(() => $972f6bce0f9d61be$var$history_state_change(signals, entries, history.state))))); // we need this to run after reading the initial state from history.state to write the defaults to history.state
|
|
3066
3065
|
return signals;
|
|
3067
3066
|
}
|
|
3068
3067
|
function $972f6bce0f9d61be$var$history_state_change(signals, entries, state) {
|
|
@@ -3316,7 +3315,7 @@ function $284849364a6ef73a$var$_get_cache_obj_for_endpoint2(endpoint) {
|
|
|
3316
3315
|
return (_classPrivateFieldGet5 = $8tj43$babelruntimehelpersclassPrivateFieldGet(this, $284849364a6ef73a$var$_cache_objs))[endpoint] || (_classPrivateFieldGet5[endpoint] = {
|
|
3317
3316
|
in_progress_: {},
|
|
3318
3317
|
cache_: {},
|
|
3319
|
-
finalization_registry_: $8tj43$babelruntimehelpersclassPrivateFieldGet(this, $284849364a6ef73a$var$_supports_finalization_registry) ? new FinalizationRegistry($8tj43$
|
|
3318
|
+
finalization_registry_: $8tj43$babelruntimehelpersclassPrivateFieldGet(this, $284849364a6ef73a$var$_supports_finalization_registry) ? new FinalizationRegistry($8tj43$catchify(key => {
|
|
3320
3319
|
const our_cache = $8tj43$babelruntimehelpersclassPrivateFieldGet(this, $284849364a6ef73a$var$_cache_objs)[endpoint].cache_;
|
|
3321
3320
|
$8tj43$dlog("[Search API]: removing", key, "from", our_cache);
|
|
3322
3321
|
delete our_cache[key];
|
|
@@ -3453,11 +3452,11 @@ async function $284849364a6ef73a$var$_cached_post_request2(endpoint, input_req,
|
|
|
3453
3452
|
result = $ed0fefda39a0f15d$export$967e966fca9515e(result);
|
|
3454
3453
|
cache_obj.cache_[body] = new WeakRef(result);
|
|
3455
3454
|
resolve_in_progress(result);
|
|
3456
|
-
setTimeout($8tj43$
|
|
3455
|
+
setTimeout($8tj43$catchify(() => {
|
|
3457
3456
|
if ($8tj43$babelruntimehelpersclassPrivateFieldGet(this, $284849364a6ef73a$var$_supports_finalization_registry)) cache_obj.finalization_registry_.register(result, body); // delete key from cache when value (WeakRefs) are collected
|
|
3458
3457
|
else
|
|
3459
3458
|
// delete things from cache after 5 minutes, so it doesn't get too heavy
|
|
3460
|
-
setTimeout($8tj43$
|
|
3459
|
+
setTimeout($8tj43$catchify(() => delete cache_obj.cache_[body]), 300000);
|
|
3461
3460
|
}), 60000 // cache values for at least 60 seconds
|
|
3462
3461
|
);
|
|
3463
3462
|
|
|
@@ -3548,7 +3547,7 @@ function $43fbdca0f726a34b$export$92f2da32c6e7e7ee(_ref) {
|
|
|
3548
3547
|
}
|
|
3549
3548
|
function $33e7d1906c93db7d$export$205efb947c7ffd78(handler) {
|
|
3550
3549
|
let passive = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
3551
|
-
const catchified_handler = $8tj43$
|
|
3550
|
+
const catchified_handler = $8tj43$catchify(handler);
|
|
3552
3551
|
const owner = $8tj43$getOwner();
|
|
3553
3552
|
// Some customers (e.g. equestrian) have `height: 100%` and/or `overflow-x: hidden` on the body, which means that scroll events won't get dispatched on `window`. The pages who get it on <body> won't get it on `window` and vice-versa, so there shouldn't be a worry about duplicate calling of the handler.
|
|
3554
3553
|
// Use observer in case that this gets called before body exists
|
|
@@ -3667,7 +3666,7 @@ function $b69740fc6de9f17e$export$83fd5de5504a7a67(_ref) {
|
|
|
3667
3666
|
fill: "forwards",
|
|
3668
3667
|
easing: "ease-in-out"
|
|
3669
3668
|
});
|
|
3670
|
-
animation.addEventListener("finish", $8tj43$
|
|
3669
|
+
animation.addEventListener("finish", $8tj43$catchify(() => {
|
|
3671
3670
|
if (unpermit_when_possible) set_permitted_to_show(false);
|
|
3672
3671
|
animation = undefined;
|
|
3673
3672
|
element.style.display = "none";
|
|
@@ -3729,7 +3728,7 @@ function $94af29837186eb21$export$ef6006467f04ee41(_ref) {
|
|
|
3729
3728
|
},
|
|
3730
3729
|
get children() {
|
|
3731
3730
|
const _el$3 = $8tj43$getNextElement($94af29837186eb21$var$_tmpl$);
|
|
3732
|
-
$8tj43$addEventListener(_el$3, "click", $8tj43$
|
|
3731
|
+
$8tj43$addEventListener(_el$3, "click", $8tj43$catchify(() => $8tj43$runWithOwner(root, () => $b4465d8d605f61e9$export$8895d39404bd2bb1({
|
|
3733
3732
|
user_triggered_: true,
|
|
3734
3733
|
selected_filters_: selected_filters_,
|
|
3735
3734
|
also_clear_sorting_: false,
|
|
@@ -3869,7 +3868,8 @@ function $6d2962bc9370f884$export$5e4aed86c12acdd9(_ref) {
|
|
|
3869
3868
|
last_loaded = +new Date();
|
|
3870
3869
|
is_first_load = true;
|
|
3871
3870
|
});
|
|
3872
|
-
|
|
3871
|
+
// percentage_in_view_ has equals: false so it should update even when set to the same value. That is to make sure that if the user bounces around below the "viewport" of our product listing we still start fetching as soon as is_loading_more becomes false again and we get IntersectionObserverEntries
|
|
3872
|
+
$8tj43$createEffect($8tj43$catchify(async () => {
|
|
3873
3873
|
const be_above_percentage = is_first_load ? 50 : 75; // if first load, load earlier
|
|
3874
3874
|
if (percentage_in_view_() < be_above_percentage || is_loading_more) return;
|
|
3875
3875
|
if (!get_last_cursor()) {
|
|
@@ -3941,6 +3941,8 @@ function $e6dd9dfff4603d8c$export$63dd0350f8559dda(_ref) {
|
|
|
3941
3941
|
// No product card in view and not after last card, assume first card
|
|
3942
3942
|
return 0;
|
|
3943
3943
|
return last / displays_by_key_().size * 100;
|
|
3944
|
+
}, undefined, {
|
|
3945
|
+
equals: false
|
|
3944
3946
|
});
|
|
3945
3947
|
}
|
|
3946
3948
|
|
|
@@ -4042,7 +4044,7 @@ function $45a8953d760b5e58$export$a1fd619a4743ca08(_ref) {
|
|
|
4042
4044
|
const target_to_index_map = new Map();
|
|
4043
4045
|
const index_to_target_map_ = new Map();
|
|
4044
4046
|
const currently_intersecting = new Set();
|
|
4045
|
-
const intersection_observer = new IntersectionObserver($8tj43$
|
|
4047
|
+
const intersection_observer = new IntersectionObserver($8tj43$catchify(records => {
|
|
4046
4048
|
for (let i = 0; i < records.length; i++) {
|
|
4047
4049
|
const record = records[i];
|
|
4048
4050
|
const {
|
|
@@ -4379,7 +4381,7 @@ function $cfdbd124dd09d713$export$1f1775a58da589b5(_ref) {
|
|
|
4379
4381
|
_el$13 = _el$12.nextSibling,
|
|
4380
4382
|
_el$14 = _el$13.nextSibling,
|
|
4381
4383
|
[_el$15, _co$2] = $8tj43$getNextMarker(_el$14.nextSibling);
|
|
4382
|
-
$8tj43$addEventListener(_el$12, "change", $8tj43$
|
|
4384
|
+
$8tj43$addEventListener(_el$12, "change", $8tj43$catchify(() => set_current_sorting(item())));
|
|
4383
4385
|
$8tj43$setAttribute(_el$12, "name", title_radio_name);
|
|
4384
4386
|
$8tj43$insert(_el$11, () => item().meta.title, _el$15, _co$2);
|
|
4385
4387
|
$8tj43$effect(() => _el$12.checked = is_checked());
|
|
@@ -4413,7 +4415,7 @@ function $cfdbd124dd09d713$export$1f1775a58da589b5(_ref) {
|
|
|
4413
4415
|
_el$19 = _el$18.nextSibling,
|
|
4414
4416
|
_el$20 = _el$19.nextSibling,
|
|
4415
4417
|
[_el$21, _co$3] = $8tj43$getNextMarker(_el$20.nextSibling);
|
|
4416
|
-
$8tj43$addEventListener(_el$18, "change", $8tj43$
|
|
4418
|
+
$8tj43$addEventListener(_el$18, "change", $8tj43$catchify(() => set_current_sorting(c => c && {
|
|
4417
4419
|
...c,
|
|
4418
4420
|
order: order_value()
|
|
4419
4421
|
})));
|
|
@@ -4444,7 +4446,7 @@ function $e56d241d0f33d459$export$fe334901e8bebd57() {
|
|
|
4444
4446
|
offset: 0
|
|
4445
4447
|
}, 1);
|
|
4446
4448
|
animation.pause();
|
|
4447
|
-
const fn = $8tj43$
|
|
4449
|
+
const fn = $8tj43$catchify(animation.play.bind(animation));
|
|
4448
4450
|
cleanup_fns.push(fn);
|
|
4449
4451
|
$8tj43$onCleanup(fn);
|
|
4450
4452
|
} catch (e) {
|
|
@@ -4455,7 +4457,7 @@ function $e56d241d0f33d459$export$fe334901e8bebd57() {
|
|
|
4455
4457
|
const style = element.style;
|
|
4456
4458
|
const original_value = style.overflow;
|
|
4457
4459
|
style.overflow = "hidden";
|
|
4458
|
-
const fn = $8tj43$
|
|
4460
|
+
const fn = $8tj43$catchify(() => style.overflow = original_value);
|
|
4459
4461
|
cleanup_fns.push(fn);
|
|
4460
4462
|
$8tj43$onCleanup(fn);
|
|
4461
4463
|
}
|
|
@@ -4541,7 +4543,7 @@ function $082c4ed3e22f8d71$export$9bf11afa910f536e(_ref) {
|
|
|
4541
4543
|
set_search_sorting_open(true);
|
|
4542
4544
|
}
|
|
4543
4545
|
});
|
|
4544
|
-
$8tj43$onCleanup($8tj43$
|
|
4546
|
+
$8tj43$onCleanup($8tj43$catchify(() => {
|
|
4545
4547
|
if (!sorting_expanded() && !filters_expanded()) {
|
|
4546
4548
|
set_search_filters_open(false);
|
|
4547
4549
|
set_search_sorting_open(false);
|
|
@@ -4573,7 +4575,7 @@ function $082c4ed3e22f8d71$export$9bf11afa910f536e(_ref) {
|
|
|
4573
4575
|
_el$12 = _el$14.nextSibling;
|
|
4574
4576
|
$8tj43$use(el => {
|
|
4575
4577
|
background = el;
|
|
4576
|
-
(0, $8tj43$observer).wait_for_element(el).then($8tj43$
|
|
4578
|
+
(0, $8tj43$observer).wait_for_element(el).then($8tj43$catchify(() => {
|
|
4577
4579
|
set_background_style("transition", "all 200ms ease-in");
|
|
4578
4580
|
set_background_style("opacity", "1");
|
|
4579
4581
|
}));
|
|
@@ -4581,7 +4583,7 @@ function $082c4ed3e22f8d71$export$9bf11afa910f536e(_ref) {
|
|
|
4581
4583
|
$8tj43$addEventListener(_el$2, "click", dismiss_modal_, true);
|
|
4582
4584
|
$8tj43$use(el => {
|
|
4583
4585
|
dismiss_button = el;
|
|
4584
|
-
(0, $8tj43$observer).wait_for_element(el).then($8tj43$
|
|
4586
|
+
(0, $8tj43$observer).wait_for_element(el).then($8tj43$catchify(() => {
|
|
4585
4587
|
set_button_style("transition", "all 200ms ease-in");
|
|
4586
4588
|
set_button_fraction_in(1);
|
|
4587
4589
|
}));
|
|
@@ -4615,7 +4617,7 @@ function $082c4ed3e22f8d71$export$9bf11afa910f536e(_ref) {
|
|
|
4615
4617
|
let last_move_page_y = start_page_y;
|
|
4616
4618
|
let first_move_was_downwards = false;
|
|
4617
4619
|
let distance_from_start_of_gesture = 0;
|
|
4618
|
-
const end_handler = $8tj43$
|
|
4620
|
+
const end_handler = $8tj43$catchify(e => {
|
|
4619
4621
|
const changedTouches = e === null || e === void 0 ? void 0 : e.changedTouches;
|
|
4620
4622
|
if (changedTouches && changedTouches[0].identifier !== our_fingers_identifier)
|
|
4621
4623
|
// other finger stopped touch, ignore it
|
|
@@ -4639,7 +4641,7 @@ function $082c4ed3e22f8d71$export$9bf11afa910f536e(_ref) {
|
|
|
4639
4641
|
modal.removeEventListener("touchcancel", end_handler);
|
|
4640
4642
|
modal.removeEventListener("touchmove", move_handler);
|
|
4641
4643
|
});
|
|
4642
|
-
const move_handler = $8tj43$
|
|
4644
|
+
const move_handler = $8tj43$catchify(e => {
|
|
4643
4645
|
const {
|
|
4644
4646
|
changedTouches: changedTouches
|
|
4645
4647
|
} = e;
|
|
@@ -4689,7 +4691,7 @@ function $082c4ed3e22f8d71$export$9bf11afa910f536e(_ref) {
|
|
|
4689
4691
|
};
|
|
4690
4692
|
$8tj43$use(el => {
|
|
4691
4693
|
modal = el;
|
|
4692
|
-
(0, $8tj43$observer).wait_for_element(el).then($8tj43$
|
|
4694
|
+
(0, $8tj43$observer).wait_for_element(el).then($8tj43$catchify(() => {
|
|
4693
4695
|
set_modal_style("transition", "all 200ms ease-in");
|
|
4694
4696
|
set_modal_style("transform", "translateY(0)");
|
|
4695
4697
|
}));
|
|
@@ -4775,7 +4777,7 @@ function $082c4ed3e22f8d71$export$9bf11afa910f536e(_ref) {
|
|
|
4775
4777
|
},
|
|
4776
4778
|
get children() {
|
|
4777
4779
|
const _el$11 = $8tj43$getNextElement($082c4ed3e22f8d71$var$_tmpl$);
|
|
4778
|
-
$8tj43$addEventListener(_el$11, "click", $8tj43$
|
|
4780
|
+
$8tj43$addEventListener(_el$11, "click", $8tj43$catchify(() => {
|
|
4779
4781
|
const show_toast = $b4465d8d605f61e9$export$8895d39404bd2bb1({
|
|
4780
4782
|
user_triggered_: true,
|
|
4781
4783
|
expanded_hierarchical_filters_: args_for_filtering_.expanded_hierarchical_filters_,
|
|
@@ -4785,7 +4787,7 @@ function $082c4ed3e22f8d71$export$9bf11afa910f536e(_ref) {
|
|
|
4785
4787
|
also_clear_sorting_: false,
|
|
4786
4788
|
delay_toast_: true
|
|
4787
4789
|
});
|
|
4788
|
-
cleanup_promise.then($8tj43$
|
|
4790
|
+
cleanup_promise.then($8tj43$catchify(show_toast));
|
|
4789
4791
|
}), true);
|
|
4790
4792
|
$8tj43$insert(_el$11, () => i18n_.clear_individual_filter_());
|
|
4791
4793
|
$8tj43$runHydrationEvents();
|
|
@@ -4859,7 +4861,7 @@ function $7396052a1484264f$export$d7841e452f2e59a8(_ref) {
|
|
|
4859
4861
|
const [sorting_open, set_sorting_open] = search_sorting_open_;
|
|
4860
4862
|
const [get_current_sorting_] = current_sorting_;
|
|
4861
4863
|
const [is_small, set_is_small] = $8tj43$createSignal(false);
|
|
4862
|
-
const dismiss_modal_ = $8tj43$
|
|
4864
|
+
const dismiss_modal_ = $8tj43$catchify(() => {
|
|
4863
4865
|
set_filters_open(false);
|
|
4864
4866
|
set_sorting_open(false);
|
|
4865
4867
|
});
|
|
@@ -4957,7 +4959,7 @@ function $7396052a1484264f$export$d7841e452f2e59a8(_ref) {
|
|
|
4957
4959
|
})());
|
|
4958
4960
|
}
|
|
4959
4961
|
});
|
|
4960
|
-
$8tj43$
|
|
4962
|
+
$8tj43$catchify(async () => {
|
|
4961
4963
|
({
|
|
4962
4964
|
open_modal_: open_modal_,
|
|
4963
4965
|
close_modal_: close_modal_
|
|
@@ -5038,7 +5040,7 @@ function $7396052a1484264f$var$OpenFiltersButton(_ref3) {
|
|
|
5038
5040
|
return _el$15;
|
|
5039
5041
|
}
|
|
5040
5042
|
}), _el$21, _co$5);
|
|
5041
|
-
$8tj43$addEventListener(_el$16, "click", $8tj43$
|
|
5043
|
+
$8tj43$addEventListener(_el$16, "click", $8tj43$catchify(() => $8tj43$batch(() => {
|
|
5042
5044
|
if (search_filters_open_[0]()) {
|
|
5043
5045
|
search_filters_open_[1](false);
|
|
5044
5046
|
return;
|
|
@@ -5100,7 +5102,7 @@ function $7396052a1484264f$var$OpenSortingButton(_ref4) {
|
|
|
5100
5102
|
_el$23 = _el$22.firstChild,
|
|
5101
5103
|
_el$24 = _el$23.nextSibling,
|
|
5102
5104
|
[_el$25, _co$6] = $8tj43$getNextMarker(_el$24.nextSibling);
|
|
5103
|
-
$8tj43$addEventListener(_el$22, "click", $8tj43$
|
|
5105
|
+
$8tj43$addEventListener(_el$22, "click", $8tj43$catchify(() => $8tj43$batch(() => {
|
|
5104
5106
|
if (search_sorting_open_[0]()) {
|
|
5105
5107
|
search_sorting_open_[1](false);
|
|
5106
5108
|
return;
|
|
@@ -5218,7 +5220,7 @@ function $6a16b21155984cef$var$ActualFloatingButtons(_ref2) {
|
|
|
5218
5220
|
}
|
|
5219
5221
|
old_pos = new_pos;
|
|
5220
5222
|
});
|
|
5221
|
-
const touchstart_handler = $8tj43$
|
|
5223
|
+
const touchstart_handler = $8tj43$catchify(e => {
|
|
5222
5224
|
is_in_touch_scroll = true;
|
|
5223
5225
|
if (e.touches.length === 1) {
|
|
5224
5226
|
// we had no touches but then we got some. Adding a new touch cancels the inertia. We are in a new touch so do reset the diff
|
|
@@ -5226,12 +5228,12 @@ function $6a16b21155984cef$var$ActualFloatingButtons(_ref2) {
|
|
|
5226
5228
|
diff_over_second_or_touch = 0;
|
|
5227
5229
|
}
|
|
5228
5230
|
});
|
|
5229
|
-
const touchend_handler = $8tj43$
|
|
5231
|
+
const touchend_handler = $8tj43$catchify(e => {
|
|
5230
5232
|
if (e.touches.length === 0)
|
|
5231
5233
|
// scroll gesture of any type (pinch can also be used as scroll, etc.) ended
|
|
5232
5234
|
inertia_timeout = setTimeout(
|
|
5233
5235
|
// inertia ends after 500ms (educated guess)
|
|
5234
|
-
$8tj43$
|
|
5236
|
+
$8tj43$catchify(() => {
|
|
5235
5237
|
is_in_touch_scroll = false;
|
|
5236
5238
|
diff_over_second_or_touch = 0;
|
|
5237
5239
|
}), 500);
|
|
@@ -5249,9 +5251,9 @@ function $6a16b21155984cef$var$ActualFloatingButtons(_ref2) {
|
|
|
5249
5251
|
const everything_closed = !get_search_filters_open_() && !get_search_sorting_open_();
|
|
5250
5252
|
if (!$8tj43$untrack(modal_is_closed) && everything_closed)
|
|
5251
5253
|
// I think the point of this is to delay the animation a bit IIRC
|
|
5252
|
-
timeout = setTimeout($8tj43$
|
|
5254
|
+
timeout = setTimeout($8tj43$catchify(() => set_if_modal_is_closed(true)), 200);else set_if_modal_is_closed(everything_closed);
|
|
5253
5255
|
});
|
|
5254
|
-
$8tj43$createComputed($8tj43$
|
|
5256
|
+
$8tj43$createComputed($8tj43$catchify(async () => {
|
|
5255
5257
|
const element = sort_and_filter_element_();
|
|
5256
5258
|
if (!element) return;
|
|
5257
5259
|
await (0, $8tj43$observer).wait_for_element(element);
|
|
@@ -5270,12 +5272,12 @@ function $6a16b21155984cef$var$ActualFloatingButtons(_ref2) {
|
|
|
5270
5272
|
_el$5 = _el$4.firstChild,
|
|
5271
5273
|
_el$6 = _el$4.nextSibling,
|
|
5272
5274
|
_el$7 = _el$6.firstChild;
|
|
5273
|
-
$8tj43$addEventListener(_el$2, "click", $8tj43$
|
|
5275
|
+
$8tj43$addEventListener(_el$2, "click", $8tj43$catchify(() => {
|
|
5274
5276
|
set_search_filters_open_(true);
|
|
5275
5277
|
set_search_sorting_open_(false);
|
|
5276
5278
|
}), true);
|
|
5277
5279
|
$8tj43$insert(_el$3, $8tj43$createComponent((0, $05f67356defcdd65$export$28f6150e232898de), {}));
|
|
5278
|
-
$8tj43$addEventListener(_el$4, "click", $8tj43$
|
|
5280
|
+
$8tj43$addEventListener(_el$4, "click", $8tj43$catchify(() => {
|
|
5279
5281
|
set_search_filters_open_(false);
|
|
5280
5282
|
set_search_sorting_open_(true);
|
|
5281
5283
|
}), true);
|
|
@@ -5286,7 +5288,7 @@ function $6a16b21155984cef$var$ActualFloatingButtons(_ref2) {
|
|
|
5286
5288
|
});
|
|
5287
5289
|
return () => _c$() ? $8tj43$createComponent((0, $79af35736fe8e5c8$export$da32f7add8a22e86), {}) : $8tj43$createComponent((0, $73e3c96bc365e0e9$export$d10e63059ddb9fd4), {});
|
|
5288
5290
|
})());
|
|
5289
|
-
$8tj43$addEventListener(_el$6, "click", $8tj43$
|
|
5291
|
+
$8tj43$addEventListener(_el$6, "click", $8tj43$catchify(() => scrollTo({
|
|
5290
5292
|
top: 0,
|
|
5291
5293
|
behavior: "smooth"
|
|
5292
5294
|
})), true);
|
|
@@ -5539,7 +5541,7 @@ function $52efc9ae4382e25a$export$5646050d516e06bc(_ref) {
|
|
|
5539
5541
|
},
|
|
5540
5542
|
get children() {
|
|
5541
5543
|
const _el$2 = $8tj43$getNextElement($52efc9ae4382e25a$var$_tmpl$2);
|
|
5542
|
-
$8tj43$addEventListener(_el$2, "click", $8tj43$
|
|
5544
|
+
$8tj43$addEventListener(_el$2, "click", $8tj43$catchify(ev => {
|
|
5543
5545
|
var _display_accessor2;
|
|
5544
5546
|
return router_.navigate_.go_to_({
|
|
5545
5547
|
new_url_: href(),
|
|
@@ -5619,7 +5621,7 @@ function $43fbb365ed0ac99e$export$466cdc317043f6cb(_ref) {
|
|
|
5619
5621
|
$8tj43$createComputed(() => {
|
|
5620
5622
|
var _place_holdey_quickli, _place_holdey_quickli2;
|
|
5621
5623
|
if ((_place_holdey_quickli = place_holdey_quicklinks_data()) !== null && _place_holdey_quickli !== void 0 && (_place_holdey_quickli2 = _place_holdey_quickli[0]) !== null && _place_holdey_quickli2 !== void 0 && _place_holdey_quickli2.query_id) {
|
|
5622
|
-
if (last_was_placeholder) queueMicrotask($8tj43$
|
|
5624
|
+
if (last_was_placeholder) queueMicrotask($8tj43$catchify(() => {
|
|
5623
5625
|
var _sliding_element;
|
|
5624
5626
|
(_sliding_element = sliding_element) === null || _sliding_element === void 0 || _sliding_element.scrollTo({
|
|
5625
5627
|
left: 0
|
|
@@ -5689,7 +5691,7 @@ function $43fbb365ed0ac99e$export$466cdc317043f6cb(_ref) {
|
|
|
5689
5691
|
} else if (!(((_intersecting_items_o = intersecting_items_object[selected_index()]) === null || _intersecting_items_o === void 0 ? void 0 : _intersecting_items_o.intersectionRatio) >= 0.95)) {
|
|
5690
5692
|
// negated larger than to handle left side of comparison being undefined
|
|
5691
5693
|
let done_work = false;
|
|
5692
|
-
$8tj43$runWithOwner(owner, () => $8tj43$createComputed($8tj43$
|
|
5694
|
+
$8tj43$runWithOwner(owner, () => $8tj43$createComputed($8tj43$catchify(() => {
|
|
5693
5695
|
if (done_work || !Array.isArray(quicklinks_data_())) return;
|
|
5694
5696
|
const sel_index = selected_index();
|
|
5695
5697
|
const target_element = sel_index >= 0 ? sel_index : 0;
|
|
@@ -5745,7 +5747,7 @@ function $43fbb365ed0ac99e$export$466cdc317043f6cb(_ref) {
|
|
|
5745
5747
|
});
|
|
5746
5748
|
return (() => {
|
|
5747
5749
|
const _el$3 = $8tj43$getNextElement($43fbb365ed0ac99e$var$_tmpl$3);
|
|
5748
|
-
$8tj43$addEventListener(_el$3, "click", $8tj43$
|
|
5750
|
+
$8tj43$addEventListener(_el$3, "click", $8tj43$catchify(ev => {
|
|
5749
5751
|
const url = href();
|
|
5750
5752
|
if (is_selected() && !ev.metaKey && !ev.ctrlKey && !ev.button || !url)
|
|
5751
5753
|
// allow open currently selected one in new tab but otherwise prevent clicks
|
|
@@ -5811,7 +5813,7 @@ function $5e6abec0dab4e610$export$6e49da55e449af7c(_ref) {
|
|
|
5811
5813
|
}]); // get rid of old data the browser saves the old state and will restore it later on
|
|
5812
5814
|
};
|
|
5813
5815
|
|
|
5814
|
-
$8tj43$createComputed($8tj43$
|
|
5816
|
+
$8tj43$createComputed($8tj43$catchify(() => {
|
|
5815
5817
|
const last_result = get_last_result_in_viewport_();
|
|
5816
5818
|
if (last_result == undefined || last_result <= 0 || last_result == Infinity) return;
|
|
5817
5819
|
if (isNaN(last_result)) {
|
|
@@ -5838,7 +5840,7 @@ function $5e6abec0dab4e610$export$6e49da55e449af7c(_ref) {
|
|
|
5838
5840
|
set_to_later = last_result;
|
|
5839
5841
|
// If a delayed push timeout is already running, just changing the value that will be pushed is sufficient
|
|
5840
5842
|
if (timeout) return;
|
|
5841
|
-
timeout = setTimeout($8tj43$
|
|
5843
|
+
timeout = setTimeout($8tj43$catchify(() => {
|
|
5842
5844
|
timeout = undefined;
|
|
5843
5845
|
last_time_history_changed = +new Date();
|
|
5844
5846
|
set_min_results_loaded(set_to_later);
|
|
@@ -5886,7 +5888,7 @@ function $ec225bf1f1627ea8$export$210f130a61ac1e8d(fn) {
|
|
|
5886
5888
|
let last_queued;
|
|
5887
5889
|
let last_value;
|
|
5888
5890
|
let initial_run = true;
|
|
5889
|
-
$8tj43$createComputed($8tj43$
|
|
5891
|
+
$8tj43$createComputed($8tj43$catchify(async () => {
|
|
5890
5892
|
last_value = fn();
|
|
5891
5893
|
if (initial_run) {
|
|
5892
5894
|
initial_run = false;
|
|
@@ -5947,7 +5949,7 @@ function $a4777acaffa35a82$export$3945d6db2dfd3d12(_ref) {
|
|
|
5947
5949
|
const handler = () => allow_filter_clearing = false;
|
|
5948
5950
|
window.addEventListener("popstate", handler); // popstate only gets called when using back/forwards button of browser or the history navigate to achieve the same, but not on pushState or replaceState
|
|
5949
5951
|
$8tj43$onCleanup(() => window.removeEventListener("popstate", handler));
|
|
5950
|
-
$8tj43$createEffect($8tj43$on(crumb_data_, $8tj43$
|
|
5952
|
+
$8tj43$createEffect($8tj43$on(crumb_data_, $8tj43$catchify(new_crumb_data => {
|
|
5951
5953
|
const query_id_of_new_data = query_id_();
|
|
5952
5954
|
if (allow_filter_clearing && previous_crumb_data && new_crumb_data && query_id_of_new_data !== query_id_when_we_got_previous_data) {
|
|
5953
5955
|
const previous_length = previous_crumb_data.length;
|
|
@@ -6143,7 +6145,7 @@ function $4b4b262708b516ee$export$f7d2f673fc2f091d(_ref) {
|
|
|
6143
6145
|
});
|
|
6144
6146
|
const [plp_results_] = $8tj43$createResource(query_base_,
|
|
6145
6147
|
// only first page of results, unless the history state says we should load more (can't do that in load more thing, I tested, they need to be added at once for the browser to not give up scroll restoration)
|
|
6146
|
-
$8tj43$
|
|
6148
|
+
$8tj43$catchify(base_query => $5e6abec0dab4e610$export$cc42dd29bf655ab6({
|
|
6147
6149
|
id_: $8tj43$untrack(query_id_),
|
|
6148
6150
|
scroll_restoration_data_: scroll_restoration_data_,
|
|
6149
6151
|
min_products_to_fetch_: min_products_to_fetch_,
|
|
@@ -6287,7 +6289,7 @@ function $4b4b262708b516ee$export$f7d2f673fc2f091d(_ref) {
|
|
|
6287
6289
|
number_of_rendered_selected_filters_items_: number_of_rendered_selected_filters_items_,
|
|
6288
6290
|
...extra_sort_and_filter_args_
|
|
6289
6291
|
});
|
|
6290
|
-
$8tj43$
|
|
6292
|
+
$8tj43$catchify((0, $5e6abec0dab4e610$export$6e49da55e449af7c))({
|
|
6291
6293
|
scroll_restoration_data_: scroll_restoration_data_,
|
|
6292
6294
|
last_result_in_viewport_: last_result_in_viewport_,
|
|
6293
6295
|
id_: query_id_,
|
|
@@ -6297,7 +6299,7 @@ function $4b4b262708b516ee$export$f7d2f673fc2f091d(_ref) {
|
|
|
6297
6299
|
$8tj43$createComputed(() => {
|
|
6298
6300
|
if (plp_results_.loading) set_can_write_scroll_restoration(false);else if (plp_results_()) set_can_write_scroll_restoration(true);
|
|
6299
6301
|
});
|
|
6300
|
-
$8tj43$createRenderEffect($8tj43$
|
|
6302
|
+
$8tj43$createRenderEffect($8tj43$catchify(async () => {
|
|
6301
6303
|
var _only_show_filters_op;
|
|
6302
6304
|
const slim = is_slim_();
|
|
6303
6305
|
const only_show_filters_opener = (_only_show_filters_op = only_show_filters_opener_) === null || _only_show_filters_op === void 0 ? void 0 : _only_show_filters_op();
|
|
@@ -6553,7 +6555,7 @@ function $9d3d794b62318ecc$export$477caf01aecaeb2a(options) {
|
|
|
6553
6555
|
const [get_selected_filters_, set_selected_filters] = selected_filters_;
|
|
6554
6556
|
const [get_has_sideways_filter_clearing_flag_, set_has_sideways_filter_clearing_flag] = sideways_filter_clearing_flag_;
|
|
6555
6557
|
const [get_current_href, set_current_href] = $8tj43$createSignal((_globalThis$location$ = globalThis === null || globalThis === void 0 ? void 0 : (_globalThis$location = globalThis.location) === null || _globalThis$location === void 0 ? void 0 : _globalThis$location.href) !== null && _globalThis$location$ !== void 0 ? _globalThis$location$ : "https://example.com");
|
|
6556
|
-
const history_change_handler = $8tj43$
|
|
6558
|
+
const history_change_handler = $8tj43$catchify(() => set_current_href(location.href));
|
|
6557
6559
|
const owner = $8tj43$getOwner() || $8tj43$createRoot(() => $8tj43$getOwner());
|
|
6558
6560
|
const {
|
|
6559
6561
|
sorting_query_param_: sorting_query_param_,
|
|
@@ -6725,7 +6727,7 @@ class $ac571292d606f30b$export$7e1297a3a19f10d8 {
|
|
|
6725
6727
|
* @param is_replace_ if you want to replace the current URL in history instead of pushing a new one
|
|
6726
6728
|
* @param category_query_id_ If you are navigating to a category and know the query_id of, please provide it. This is for making a better devEx in js-ui
|
|
6727
6729
|
*/
|
|
6728
|
-
go_to_: $8tj43$
|
|
6730
|
+
go_to_: $8tj43$catchify(async _ref => {
|
|
6729
6731
|
let {
|
|
6730
6732
|
new_url_: raw_new_url,
|
|
6731
6733
|
event_: event_,
|
|
@@ -7251,7 +7253,7 @@ const $702d7656a373973e$export$824dde41348efed1 = /*@__PURE__*/(() => {
|
|
|
7251
7253
|
|
|
7252
7254
|
const observe_to_signal = (element, setter) => {
|
|
7253
7255
|
const computed_style = getComputedStyle(element);
|
|
7254
|
-
const resize_observer = new ResizeObserver($8tj43$
|
|
7256
|
+
const resize_observer = new ResizeObserver($8tj43$catchify(() => {
|
|
7255
7257
|
setter(element.getBoundingClientRect().width + parseFloat(computed_style.marginLeft) + parseFloat(computed_style.marginRight) + parseFloat(computed_style.borderRightWidth) + parseFloat(computed_style.borderLeftWidth));
|
|
7256
7258
|
}));
|
|
7257
7259
|
resize_observer.observe(element);
|
|
@@ -7423,7 +7425,7 @@ function $dea31647b99a443b$export$d757d54550ebfb3d(_ref) {
|
|
|
7423
7425
|
_el$2 = _el$.firstChild,
|
|
7424
7426
|
_el$4 = _el$2.nextSibling,
|
|
7425
7427
|
[_el$5, _co$] = $8tj43$getNextMarker(_el$4.nextSibling);
|
|
7426
|
-
$8tj43$addEventListener(_el$, "click", $8tj43$
|
|
7428
|
+
$8tj43$addEventListener(_el$, "click", $8tj43$catchify(e => {
|
|
7427
7429
|
router_.navigate_.go_to_({
|
|
7428
7430
|
new_url_: category_suggestion_().page_url,
|
|
7429
7431
|
is_replace_: false,
|
|
@@ -7483,7 +7485,7 @@ function $584c06c09cf4609d$export$b94867ecbd698f21(_ref) {
|
|
|
7483
7485
|
let input_element;
|
|
7484
7486
|
// This is the div where we recommend (and ourselves do) attach the event listener to that opens the search modal.
|
|
7485
7487
|
let field_div;
|
|
7486
|
-
$8tj43$createEffect($8tj43$
|
|
7488
|
+
$8tj43$createEffect($8tj43$catchify(async () => {
|
|
7487
7489
|
if (disabled_) return;
|
|
7488
7490
|
// we aren't in DOM yet unfortunately, wouldn't even be with onMount
|
|
7489
7491
|
await (0, $8tj43$observer).wait_for_element(input_element);
|
|
@@ -7503,7 +7505,7 @@ function $584c06c09cf4609d$export$b94867ecbd698f21(_ref) {
|
|
|
7503
7505
|
when: on_back_,
|
|
7504
7506
|
get children() {
|
|
7505
7507
|
const _el$2 = $8tj43$getNextElement($584c06c09cf4609d$var$_tmpl$);
|
|
7506
|
-
$8tj43$addEventListener(_el$2, "click", $8tj43$
|
|
7508
|
+
$8tj43$addEventListener(_el$2, "click", $8tj43$catchify(on_back_), true);
|
|
7507
7509
|
$8tj43$insert(_el$2, $8tj43$createComponent((0, $ecc323d9c29305ee$export$1c641004b5485fed), {}));
|
|
7508
7510
|
$8tj43$effect(() => $8tj43$setAttribute(_el$2, "aria-label", i18n_.back_()));
|
|
7509
7511
|
$8tj43$runHydrationEvents();
|
|
@@ -7520,7 +7522,7 @@ function $584c06c09cf4609d$export$b94867ecbd698f21(_ref) {
|
|
|
7520
7522
|
} = _ref2;
|
|
7521
7523
|
// When selecting text with a mouse we want a SearchField to be focussed even when releasing the mouse outside the .field element (we assume the event listener which opens the modal is attached to that).
|
|
7522
7524
|
if (pointerType === "mouse") {
|
|
7523
|
-
const handler = $8tj43$
|
|
7525
|
+
const handler = $8tj43$catchify(_ref3 => {
|
|
7524
7526
|
let {
|
|
7525
7527
|
pointerType: pointerType,
|
|
7526
7528
|
target: target
|
|
@@ -7534,26 +7536,26 @@ function $584c06c09cf4609d$export$b94867ecbd698f21(_ref) {
|
|
|
7534
7536
|
if (owner_of_field_element) $8tj43$runWithOwner(owner_of_field_element, () => $8tj43$onCleanup(() => window.removeEventListener("pointerup", handler)));
|
|
7535
7537
|
}
|
|
7536
7538
|
};
|
|
7537
|
-
$8tj43$addEventListener(_el$4, "select", $8tj43$
|
|
7539
|
+
$8tj43$addEventListener(_el$4, "select", $8tj43$catchify(() => {
|
|
7538
7540
|
if (disabled_)
|
|
7539
7541
|
// just in case. The field not actually being disabled when being disabled_ is so that you can focus it and open the modal. We don't want any of the other input-field-interaction features to work
|
|
7540
7542
|
return;
|
|
7541
7543
|
if (input_element.selectionStart === 0 && input_element.selectionEnd === input_element.value.length)
|
|
7542
7544
|
// everything was selected, clear filters on next submit on next input
|
|
7543
|
-
input_element.addEventListener("input", $8tj43$
|
|
7545
|
+
input_element.addEventListener("input", $8tj43$catchify(() => clear_filters_(false)),
|
|
7544
7546
|
// We don't count this as user triggered since it wasn't explicit
|
|
7545
7547
|
{
|
|
7546
7548
|
once: true
|
|
7547
7549
|
});
|
|
7548
7550
|
}));
|
|
7549
|
-
$8tj43$addEventListener(_el$4, "input", $8tj43$
|
|
7551
|
+
$8tj43$addEventListener(_el$4, "input", $8tj43$catchify(() => {
|
|
7550
7552
|
const {
|
|
7551
7553
|
value: value
|
|
7552
7554
|
} = input_element;
|
|
7553
7555
|
if (!disabled_ && !value.length) clear_filters_(false); // if the user clears the whole field, reset filters on next submit
|
|
7554
7556
|
search_field_value_[1](value);
|
|
7555
7557
|
}), true);
|
|
7556
|
-
$8tj43$addEventListener(_el$4, "keydown", $8tj43$
|
|
7558
|
+
$8tj43$addEventListener(_el$4, "keydown", $8tj43$catchify(e => {
|
|
7557
7559
|
if (disabled_) {
|
|
7558
7560
|
if (e.key !== "Tab" && e.key !== "Shift")
|
|
7559
7561
|
// alow tab-selecting the input field and then open the modal when the user start writing but also to move past the field with tab
|
|
@@ -7563,19 +7565,19 @@ function $584c06c09cf4609d$export$b94867ecbd698f21(_ref) {
|
|
|
7563
7565
|
if (!dont_submit) submit_query_();
|
|
7564
7566
|
}
|
|
7565
7567
|
}), true);
|
|
7566
|
-
const _ref$ = $8tj43$
|
|
7568
|
+
const _ref$ = $8tj43$catchify(el => {
|
|
7567
7569
|
input_element = el;
|
|
7568
7570
|
input_field_ref_ === null || input_field_ref_ === void 0 || input_field_ref_(el);
|
|
7569
7571
|
});
|
|
7570
7572
|
typeof _ref$ === "function" && $8tj43$use(_ref$, _el$4);
|
|
7571
7573
|
_el$4.classList.toggle("has-adjacent-back-button", !!on_back_);
|
|
7572
|
-
$8tj43$addEventListener(_el$5, "click", $8tj43$
|
|
7574
|
+
$8tj43$addEventListener(_el$5, "click", $8tj43$catchify(() => {
|
|
7573
7575
|
search_field_value_[1]("");
|
|
7574
7576
|
clear_filters_(true);
|
|
7575
7577
|
if (!disabled_) input_element.focus();
|
|
7576
7578
|
}), true);
|
|
7577
7579
|
$8tj43$insert(_el$5, $8tj43$createComponent((0, $9783d437ad61594c$export$3b621d86b1566b2), {}));
|
|
7578
|
-
$8tj43$addEventListener(_el$6, "click", $8tj43$
|
|
7580
|
+
$8tj43$addEventListener(_el$6, "click", $8tj43$catchify(() => submit_query_()), true);
|
|
7579
7581
|
$8tj43$insert(_el$6, $8tj43$createComponent((0, $ef0f18a578b32578$export$82eafebb825fc23f), {}));
|
|
7580
7582
|
$8tj43$effect(_p$ => {
|
|
7581
7583
|
const _v$ = i18n_.search_field_field_aria_label_(),
|
|
@@ -7717,7 +7719,7 @@ function $1308a7816c3d4f2d$export$b3ad617e9036868(modal_body_style, input_field,
|
|
|
7717
7719
|
};
|
|
7718
7720
|
let ro;
|
|
7719
7721
|
if (one_axies_only !== "top") {
|
|
7720
|
-
ro = new ResizeObserver($8tj43$
|
|
7722
|
+
ro = new ResizeObserver($8tj43$catchify(records => {
|
|
7721
7723
|
records.forEach(_ref => {
|
|
7722
7724
|
let {
|
|
7723
7725
|
contentRect: {
|
|
@@ -7739,10 +7741,10 @@ function $1308a7816c3d4f2d$export$b3ad617e9036868(modal_body_style, input_field,
|
|
|
7739
7741
|
// "resize" doesn't fire sometimes when it should, also it doesn't when showing/hiding scrollbars which disabling scrolling does
|
|
7740
7742
|
// this works
|
|
7741
7743
|
// keeping resize just in case
|
|
7742
|
-
const resize_resize_observer = new ResizeObserver($8tj43$
|
|
7744
|
+
const resize_resize_observer = new ResizeObserver($8tj43$catchify(align_position));
|
|
7743
7745
|
resize_resize_observer.observe(document.documentElement);
|
|
7744
7746
|
(0, $8tj43$observer).wait_for_element("body").then(resize_resize_observer.observe.bind(resize_resize_observer));
|
|
7745
|
-
$8tj43$onCleanup($8tj43$
|
|
7747
|
+
$8tj43$onCleanup($8tj43$catchify(() => {
|
|
7746
7748
|
var _ro;
|
|
7747
7749
|
(_ro = ro) === null || _ro === void 0 || _ro.disconnect();
|
|
7748
7750
|
resize_resize_observer.disconnect();
|
|
@@ -7772,7 +7774,7 @@ function $d8a66ba54a42eb3e$export$e026af0c7b64ea5f(_ref) {
|
|
|
7772
7774
|
}, {
|
|
7773
7775
|
defer: true
|
|
7774
7776
|
}));
|
|
7775
|
-
$8tj43$createComputed($8tj43$on(get_search_query_, $8tj43$
|
|
7777
|
+
$8tj43$createComputed($8tj43$on(get_search_query_, $8tj43$catchify(() => {
|
|
7776
7778
|
// when a query was submitted, clear filters if clear was pressed before
|
|
7777
7779
|
const clear_value = $8tj43$untrack(get_clear_filters_next_submit);
|
|
7778
7780
|
if (clear_value) {
|
|
@@ -7797,11 +7799,11 @@ function $07d90b8270ece8de$export$84bba84a7b837187(read_search_query) {
|
|
|
7797
7799
|
const key = "depict_searches";
|
|
7798
7800
|
const previous_searches = $8tj43$createSignal(JSON.parse(ls[key] || "[]"));
|
|
7799
7801
|
const [read_previous_searches, write_previous_searches] = previous_searches;
|
|
7800
|
-
$8tj43$createEffect($8tj43$
|
|
7802
|
+
$8tj43$createEffect($8tj43$catchify(() => {
|
|
7801
7803
|
const json_encoded = JSON.stringify(read_previous_searches());
|
|
7802
7804
|
if (ls[key] !== json_encoded) ls[key] = json_encoded;
|
|
7803
7805
|
}));
|
|
7804
|
-
$8tj43$createComputed($8tj43$
|
|
7806
|
+
$8tj43$createComputed($8tj43$catchify(() => {
|
|
7805
7807
|
const searches = $8tj43$untrack(read_previous_searches);
|
|
7806
7808
|
const current_query = read_search_query();
|
|
7807
7809
|
if (!current_query)
|
|
@@ -7910,7 +7912,7 @@ const $9a693c7e832d3f18$export$b05c0ae390cf3e06 = (display_or_variant_container,
|
|
|
7910
7912
|
[_el$21, _co$6] = $8tj43$getNextMarker(_el$20.nextSibling),
|
|
7911
7913
|
_el$22 = _el$21.nextSibling,
|
|
7912
7914
|
[_el$23, _co$7] = $8tj43$getNextMarker(_el$22.nextSibling);
|
|
7913
|
-
$8tj43$addEventListener(_el$, "click", $8tj43$
|
|
7915
|
+
$8tj43$addEventListener(_el$, "click", $8tj43$catchify(event_ => router_.navigate_.go_to_({
|
|
7914
7916
|
new_url_: href(),
|
|
7915
7917
|
is_replace_: false,
|
|
7916
7918
|
event_: event_
|
|
@@ -8005,13 +8007,13 @@ function $f7414b949aeabc90$export$62f101a8aa597bf8(_ref) {
|
|
|
8005
8007
|
// don't wait if it's the first request
|
|
8006
8008
|
write_current_instant_query(value);
|
|
8007
8009
|
clearTimeout(timeout);
|
|
8008
|
-
timeout = setTimeout($8tj43$
|
|
8010
|
+
timeout = setTimeout($8tj43$catchify(() => write_current_instant_query(value)), 250);
|
|
8009
8011
|
});
|
|
8010
8012
|
const [search_results] = $8tj43$createResource($8tj43$createMemo(() => ({
|
|
8011
8013
|
tenant: tenant_(),
|
|
8012
8014
|
market: market_(),
|
|
8013
8015
|
query: read_current_instant_query()
|
|
8014
|
-
})), $8tj43$
|
|
8016
|
+
})), $8tj43$catchify(variable_data => {
|
|
8015
8017
|
return depict_api_.query({
|
|
8016
8018
|
// here it is (unfortunately) important that the keys in the object are in the same order as in SearchPage.tsx, because when JSON-encoding them to compare for caching the strings will be different otherwise
|
|
8017
8019
|
limit: $8tj43$untrack(has_sort_or_filters_) ? max_cards : min_products_to_fetch_,
|
|
@@ -8097,7 +8099,7 @@ function $558d0596fcf0e0b0$export$50b90be27d8502d9(el, _ref, bottom_distance) {
|
|
|
8097
8099
|
[key]: new_value
|
|
8098
8100
|
});
|
|
8099
8101
|
};
|
|
8100
|
-
const is = new IntersectionObserver($8tj43$
|
|
8102
|
+
const is = new IntersectionObserver($8tj43$catchify(_records => {
|
|
8101
8103
|
do_positioning();
|
|
8102
8104
|
}), {
|
|
8103
8105
|
threshold: $8tj43$buildThresholdList(100)
|
|
@@ -8119,7 +8121,7 @@ function $e8776b492383c292$export$91c3b6774e8be0f5(_ref) {
|
|
|
8119
8121
|
const [get_current_href, set_current_href] = $8tj43$createSignal(location.href);
|
|
8120
8122
|
const [exit_iterable, exitable_iterable] = $8tj43$make_asyncIterable_exiter((0, $8tj43$href_change_ipns));
|
|
8121
8123
|
$8tj43$onCleanup(exit_iterable);
|
|
8122
|
-
$8tj43$
|
|
8124
|
+
$8tj43$catchify(async () => {
|
|
8123
8125
|
for await (const href of exitable_iterable)
|
|
8124
8126
|
// use native links so ppl can cmdclick/right click and open in new tab and see target URL
|
|
8125
8127
|
set_current_href(href);
|
|
@@ -8190,18 +8192,18 @@ function $494c9ad553139dbc$export$a146ac6fa8346a25(_ref) {
|
|
|
8190
8192
|
_el$9 = _el$5.nextSibling;
|
|
8191
8193
|
$8tj43$use(element => element.addEventListener(
|
|
8192
8194
|
// Viskan's Oscar Jacobson site requires us to add the event listener normally here. They do too much when this element is clicked. We work around it by blocking the event and just dispatching it non-bubbling on this element.
|
|
8193
|
-
"click", $8tj43$
|
|
8195
|
+
"click", $8tj43$catchify(ev => {
|
|
8194
8196
|
if (ev.button || ev.metaKey || ev.ctrlKey)
|
|
8195
8197
|
// not button 0 or cmd/ctrl click
|
|
8196
8198
|
return;
|
|
8197
8199
|
ev.preventDefault();
|
|
8198
8200
|
submit_query_(item());
|
|
8199
8201
|
})), _el$4);
|
|
8200
|
-
$8tj43$addEventListener(_el$4, "mouseleave", $8tj43$
|
|
8201
|
-
$8tj43$addEventListener(_el$4, "mouseenter", $8tj43$
|
|
8202
|
+
$8tj43$addEventListener(_el$4, "mouseleave", $8tj43$catchify(() => write_selected_index_(undefined)));
|
|
8203
|
+
$8tj43$addEventListener(_el$4, "mouseenter", $8tj43$catchify(() => write_selected_index_([0, index])));
|
|
8202
8204
|
$8tj43$insert(_el$5, $8tj43$createComponent((0, $6d95ef50ee01d5a1$export$5d2caaa6b530761c), {}), _el$8, _co$);
|
|
8203
8205
|
$8tj43$insert(_el$6, item);
|
|
8204
|
-
$8tj43$use(element => element.addEventListener("click", $8tj43$
|
|
8206
|
+
$8tj43$use(element => element.addEventListener("click", $8tj43$catchify(e => {
|
|
8205
8207
|
// Viskan's Oscar Jacobson site requires us to add the event listener normally here. They do too much when this element is clicked. We work around it by blocking the event and just dispatching it non-bubbling on this element.
|
|
8206
8208
|
set_unfiltered_previous_searches_(prev => {
|
|
8207
8209
|
const new_value = [...prev];
|
|
@@ -8387,7 +8389,7 @@ function $40dd3f46f55d62ba$export$e872e2339fb04a7f(_ref) {
|
|
|
8387
8389
|
});
|
|
8388
8390
|
return (() => {
|
|
8389
8391
|
const _el$ = $8tj43$getNextElement($40dd3f46f55d62ba$var$_tmpl$);
|
|
8390
|
-
$8tj43$use(element => element.addEventListener("click", $8tj43$
|
|
8392
|
+
$8tj43$use(element => element.addEventListener("click", $8tj43$catchify(ev => {
|
|
8391
8393
|
// Viskan's Oscar Jacobson site requires us to add the event listener normally here. They do too much when this element is clicked. We work around it by blocking the event and just dispatching it non-bubbling on this element.
|
|
8392
8394
|
if (is_query()) {
|
|
8393
8395
|
if (ev.button || ev.metaKey || ev.ctrlKey)
|
|
@@ -8403,8 +8405,8 @@ function $40dd3f46f55d62ba$export$e872e2339fb04a7f(_ref) {
|
|
|
8403
8405
|
event_: ev
|
|
8404
8406
|
});
|
|
8405
8407
|
})), _el$);
|
|
8406
|
-
$8tj43$addEventListener(_el$, "mouseleave", $8tj43$
|
|
8407
|
-
$8tj43$addEventListener(_el$, "mouseenter", $8tj43$
|
|
8408
|
+
$8tj43$addEventListener(_el$, "mouseleave", $8tj43$catchify(() => write_selected_index_(undefined)));
|
|
8409
|
+
$8tj43$addEventListener(_el$, "mouseenter", $8tj43$catchify(() => write_selected_index_([autocomplete_data_index, index])));
|
|
8408
8410
|
$8tj43$insert(_el$, (() => {
|
|
8409
8411
|
const _c$ = $8tj43$memo(() => !!is_query());
|
|
8410
8412
|
return () => _c$() ? [$8tj43$createComponent((0, $8tj43$Show), {
|
|
@@ -8700,7 +8702,7 @@ function $2ebb1d6ae6763f7a$var$actual_navigation_working_on_fake_data(_ref2) {
|
|
|
8700
8702
|
if (!$8tj43$untrack(() => read_updating_blocked())) previous_value = sfv;
|
|
8701
8703
|
});
|
|
8702
8704
|
const owner = $8tj43$getOwner();
|
|
8703
|
-
const handler = $8tj43$
|
|
8705
|
+
const handler = $8tj43$catchify(_ref3 => {
|
|
8704
8706
|
let {
|
|
8705
8707
|
keyCode: keyCode
|
|
8706
8708
|
} = _ref3;
|
|
@@ -8763,7 +8765,7 @@ function $2ebb1d6ae6763f7a$var$actual_navigation_working_on_fake_data(_ref2) {
|
|
|
8763
8765
|
const el = element_();
|
|
8764
8766
|
if (!el) return;
|
|
8765
8767
|
el.addEventListener("keyup", handler);
|
|
8766
|
-
$8tj43$onCleanup($8tj43$
|
|
8768
|
+
$8tj43$onCleanup($8tj43$catchify(() => el.removeEventListener("keyup", handler)));
|
|
8767
8769
|
});
|
|
8768
8770
|
}
|
|
8769
8771
|
function $c4dee1ef44de29ca$export$af0124069c150252(_ref) {
|
|
@@ -8972,7 +8974,7 @@ function $a09bb7c652acf957$export$3340fdd8259bd4fd(_ref) {
|
|
|
8972
8974
|
if (process.env.GA === "false") return;
|
|
8973
8975
|
let debounce_timeout;
|
|
8974
8976
|
const stop_timeout = () => clearTimeout(debounce_timeout);
|
|
8975
|
-
const send_to_ga = $8tj43$
|
|
8977
|
+
const send_to_ga = $8tj43$catchify(() => {
|
|
8976
8978
|
const fake_url = new URL(location.href);
|
|
8977
8979
|
const {
|
|
8978
8980
|
searchParams: searchParams
|
|
@@ -8985,12 +8987,12 @@ function $a09bb7c652acf957$export$3340fdd8259bd4fd(_ref) {
|
|
|
8985
8987
|
$8tj43$onCleanup(() => {
|
|
8986
8988
|
setTimeout(
|
|
8987
8989
|
// do it next event loop because search_field_value_ is wrong this one and search_query might be too because we want the old value to be put into the history entry and a framework like NextJS might take some time to navigate
|
|
8988
|
-
$8tj43$
|
|
8990
|
+
$8tj43$catchify(() => {
|
|
8989
8991
|
if ($8tj43$untrack(get_search_query_) === $8tj43$untrack(get_search_field_value_)) stop_timeout();
|
|
8990
8992
|
}));
|
|
8991
8993
|
});
|
|
8992
8994
|
let first_call = true;
|
|
8993
|
-
$8tj43$createEffect($8tj43$
|
|
8995
|
+
$8tj43$createEffect($8tj43$catchify(() => {
|
|
8994
8996
|
get_search_field_value_();
|
|
8995
8997
|
if (first_call) {
|
|
8996
8998
|
// we only want to do stuff when it changes
|
|
@@ -9071,7 +9073,7 @@ function $e82132ed97521828$export$1c593cbd6f1e10bc(_ref) {
|
|
|
9071
9073
|
const [input_field, set_input_field] = $8tj43$createSignal();
|
|
9072
9074
|
const [get_search_field_value_] = search_field_value_;
|
|
9073
9075
|
const [get_modal_search_results, set_modal_search_results_] = $8tj43$createSignal();
|
|
9074
|
-
const close_on_escape_handler = $8tj43$
|
|
9076
|
+
const close_on_escape_handler = $8tj43$catchify(_ref2 => {
|
|
9075
9077
|
let {
|
|
9076
9078
|
key: key
|
|
9077
9079
|
} = _ref2;
|
|
@@ -9086,7 +9088,7 @@ function $e82132ed97521828$export$1c593cbd6f1e10bc(_ref) {
|
|
|
9086
9088
|
const DiscoverMoreSection = () => (() => {
|
|
9087
9089
|
const _el$ = $8tj43$getNextElement($e82132ed97521828$var$_tmpl$),
|
|
9088
9090
|
_el$2 = _el$.firstChild;
|
|
9089
|
-
$8tj43$addEventListener(_el$2, "click", $8tj43$
|
|
9091
|
+
$8tj43$addEventListener(_el$2, "click", $8tj43$catchify(() => submit_query_()), true);
|
|
9090
9092
|
$8tj43$insert(_el$2, (() => {
|
|
9091
9093
|
const _c$ = $8tj43$memo(() => !!get_search_field_value_());
|
|
9092
9094
|
return () => _c$() ? i18n_.modal_view_all_results_()((() => {
|
|
@@ -9101,7 +9103,7 @@ function $e82132ed97521828$export$1c593cbd6f1e10bc(_ref) {
|
|
|
9101
9103
|
if (disable_scrolling_) $e56d241d0f33d459$export$fe334901e8bebd57();
|
|
9102
9104
|
$e82132ed97521828$var$close_modal_when_navigating_away(close_modal_, search_query_url_param_name_);
|
|
9103
9105
|
window.addEventListener("keydown", close_on_escape_handler);
|
|
9104
|
-
$8tj43$onCleanup($8tj43$
|
|
9106
|
+
$8tj43$onCleanup($8tj43$catchify(() => window.removeEventListener("keydown", close_on_escape_handler)));
|
|
9105
9107
|
if (closing_animation_) register_closing_animation_(closing_animation_);
|
|
9106
9108
|
$a09bb7c652acf957$export$3340fdd8259bd4fd({
|
|
9107
9109
|
get_search_field_value_: get_search_field_value_,
|
|
@@ -9156,14 +9158,14 @@ function $e82132ed97521828$export$1c593cbd6f1e10bc(_ref) {
|
|
|
9156
9158
|
[_el$16, _co$5] = $8tj43$getNextMarker(_el$15.nextSibling),
|
|
9157
9159
|
_el$17 = _el$5.nextSibling,
|
|
9158
9160
|
[_el$18, _co$6] = $8tj43$getNextMarker(_el$17.nextSibling);
|
|
9159
|
-
$8tj43$addEventListener(_el$4, "click", $8tj43$
|
|
9161
|
+
$8tj43$addEventListener(_el$4, "click", $8tj43$catchify(_ref3 => {
|
|
9160
9162
|
let {
|
|
9161
9163
|
target: target
|
|
9162
9164
|
} = _ref3;
|
|
9163
9165
|
if (target === modal_element) close_modal_();
|
|
9164
9166
|
}), true);
|
|
9165
9167
|
$8tj43$insert(_el$5, search_field, _el$14, _co$4);
|
|
9166
|
-
$8tj43$use(el => $8tj43$
|
|
9168
|
+
$8tj43$use(el => $8tj43$catchify((0, $558d0596fcf0e0b0$export$50b90be27d8502d9))(el, style_props_, bottom_distance_under_modal_), _el$6);
|
|
9167
9169
|
$8tj43$insert(_el$6, $8tj43$createComponent((0, $74777e8fe65b3dcb$export$b69d0d92862de18b), {
|
|
9168
9170
|
severity_: "error",
|
|
9169
9171
|
message_: "Autocomplete/suggestions failed",
|
|
@@ -9262,8 +9264,8 @@ function $e82132ed97521828$var$close_modal_when_navigating_away(close_modal, sea
|
|
|
9262
9264
|
let set_initial_values = false;
|
|
9263
9265
|
let old_pathname;
|
|
9264
9266
|
let old_param_value;
|
|
9265
|
-
$8tj43$onCleanup($8tj43$
|
|
9266
|
-
$8tj43$
|
|
9267
|
+
$8tj43$onCleanup($8tj43$catchify(exit_iterable));
|
|
9268
|
+
$8tj43$catchify(async () => {
|
|
9267
9269
|
for await (const href of exitable_iterable) {
|
|
9268
9270
|
const u_o = new URL(href);
|
|
9269
9271
|
const new_pathname = u_o.pathname;
|
|
@@ -9341,7 +9343,7 @@ function $69602b3d8fd54c38$export$9dd50d35b9d94fdf(_ref) {
|
|
|
9341
9343
|
number_of_results_: number_of_results_,
|
|
9342
9344
|
type: type
|
|
9343
9345
|
} = _ref;
|
|
9344
|
-
const contents = $8tj43$createMemo($8tj43$
|
|
9346
|
+
const contents = $8tj43$createMemo($8tj43$catchify(() => {
|
|
9345
9347
|
const q = get_search_query_();
|
|
9346
9348
|
return i18n_[type === $69602b3d8fd54c38$export$2452208c79fe93ea.content ? "get_showing_pages_for_" : "get_showing_results_for_"]()((() => {
|
|
9347
9349
|
const _el$ = $8tj43$getNextElement($69602b3d8fd54c38$var$_tmpl$);
|
|
@@ -9629,7 +9631,7 @@ function $22470de5f42cc35d$export$f631859cab12b342(_ref) {
|
|
|
9629
9631
|
if (!result) return;
|
|
9630
9632
|
return {
|
|
9631
9633
|
href: result.page_url,
|
|
9632
|
-
onClick: $8tj43$
|
|
9634
|
+
onClick: $8tj43$catchify(ev => router_.navigate_.go_to_({
|
|
9633
9635
|
new_url_: result.page_url,
|
|
9634
9636
|
is_replace_: false,
|
|
9635
9637
|
event_: ev
|
|
@@ -9958,7 +9960,7 @@ function $da279c5a540c6846$export$a54ec244c8863715(_ref) {
|
|
|
9958
9960
|
} : {})
|
|
9959
9961
|
};
|
|
9960
9962
|
});
|
|
9961
|
-
const [search_results_] = $8tj43$createResource(search_query_base_, $8tj43$
|
|
9963
|
+
const [search_results_] = $8tj43$createResource(search_query_base_, $8tj43$catchify(async base_query => {
|
|
9962
9964
|
set_all_products_loaded(false);
|
|
9963
9965
|
// only first page of results
|
|
9964
9966
|
return await $5e6abec0dab4e610$export$cc42dd29bf655ab6({
|
|
@@ -9995,7 +9997,7 @@ function $da279c5a540c6846$export$a54ec244c8863715(_ref) {
|
|
|
9995
9997
|
});
|
|
9996
9998
|
const modal_body_style = $8tj43$createSignal({});
|
|
9997
9999
|
const [get_search_field_elements, set_search_field_elements] = $8tj43$createSignal();
|
|
9998
|
-
const SafeSearchField = $8tj43$
|
|
10000
|
+
const SafeSearchField = $8tj43$catchify((0, $584c06c09cf4609d$export$b94867ecbd698f21));
|
|
9999
10001
|
const [sort_or_filter_open_, set_sort_or_filter_open_] = $8tj43$createSignal(false);
|
|
10000
10002
|
const [desktop_filter_elements_, set_desktop_filter_elements] = $8tj43$createSignal();
|
|
10001
10003
|
const n_hits = $8tj43$createMemo(() => {
|
|
@@ -10059,7 +10061,7 @@ function $da279c5a540c6846$export$a54ec244c8863715(_ref) {
|
|
|
10059
10061
|
})()));
|
|
10060
10062
|
}).remove);
|
|
10061
10063
|
$3a2bed57c9a57e21$export$d31a1a1a83ad9413(search_results_, selected_filters_);
|
|
10062
|
-
$8tj43$
|
|
10064
|
+
$8tj43$catchify((0, $5e6abec0dab4e610$export$6e49da55e449af7c))({
|
|
10063
10065
|
scroll_restoration_data_: scroll_restoration_data_,
|
|
10064
10066
|
last_result_in_viewport_: last_result_in_viewport_,
|
|
10065
10067
|
id_: get_search_query_,
|
|
@@ -10098,8 +10100,8 @@ function $da279c5a540c6846$export$a54ec244c8863715(_ref) {
|
|
|
10098
10100
|
if (!search_field) break add_input_field;
|
|
10099
10101
|
modal_body_style[1]({});
|
|
10100
10102
|
modal_body_style_ref_ === null || modal_body_style_ref_ === void 0 || modal_body_style_ref_(modal_body_style);
|
|
10101
|
-
const align_position = $8tj43$
|
|
10102
|
-
div_with_field_class.addEventListener("click", $8tj43$
|
|
10103
|
+
const align_position = $8tj43$catchify((0, $1308a7816c3d4f2d$export$b3ad617e9036868))(modal_body_style, search_field, undefined, true);
|
|
10104
|
+
div_with_field_class.addEventListener("click", $8tj43$catchify(e => {
|
|
10103
10105
|
var _target$matches, _target$closest, _on_open_, _ref4;
|
|
10104
10106
|
const target = e.target;
|
|
10105
10107
|
const sel = ".submit";
|
|
@@ -10302,7 +10304,7 @@ function $da279c5a540c6846$export$a54ec244c8863715(_ref) {
|
|
|
10302
10304
|
function $37e8c97bb6876197$export$828dcdd425fd3231(aligner) {
|
|
10303
10305
|
const style_element = document.createElement("style");
|
|
10304
10306
|
document.head.append(style_element);
|
|
10305
|
-
const resize_observer = new ResizeObserver($8tj43$
|
|
10307
|
+
const resize_observer = new ResizeObserver($8tj43$catchify(() => {
|
|
10306
10308
|
const styles = $cc64aabf2c7a1f1a$export$1233ca167bf71f9a({
|
|
10307
10309
|
".depict.plp .depict-search-modal .search-field": {
|
|
10308
10310
|
"height": "".concat(aligner === null || aligner === void 0 ? void 0 : aligner.clientHeight, "px")
|
|
@@ -10529,7 +10531,7 @@ class $eb064bc3350276c1$export$ac6237957a15b3f0 {
|
|
|
10529
10531
|
selected_filters_: selected_filters_
|
|
10530
10532
|
});
|
|
10531
10533
|
$68e6625c8d51f847$export$5162a71f252e6122();
|
|
10532
|
-
$8tj43$
|
|
10534
|
+
$8tj43$catchify(async () => {
|
|
10533
10535
|
const {
|
|
10534
10536
|
open_modal_: open_modal_,
|
|
10535
10537
|
close_modal_: close_modal_
|
|
@@ -10814,7 +10816,7 @@ function $eb064bc3350276c1$export$316f6f283ae64765(props) {
|
|
|
10814
10816
|
const style_props_ = $8tj43$createSignal({
|
|
10815
10817
|
position: "fixed"
|
|
10816
10818
|
});
|
|
10817
|
-
const defaultHandler = $8tj43$
|
|
10819
|
+
const defaultHandler = $8tj43$catchify(() => {
|
|
10818
10820
|
// When selecting text in the SearchField that's in the page we want the same selection to persist. It doesn't by itself, since the SearchModal has an entirely different SearchField. Therefore, we manually copy the selection over.
|
|
10819
10821
|
const selected_text_range_ = [input_element.selectionStart, input_element.selectionEnd];
|
|
10820
10822
|
const {
|
|
@@ -10907,7 +10909,7 @@ const $169c13c0531d91d2$export$d86a33413558014e = openModalParams => {
|
|
|
10907
10909
|
}, dispose_aligner];
|
|
10908
10910
|
};
|
|
10909
10911
|
function $573c007c697a1831$export$d0596b5cae35ad4(open_search) {
|
|
10910
|
-
const handler = $8tj43$
|
|
10912
|
+
const handler = $8tj43$catchify(e => {
|
|
10911
10913
|
const {
|
|
10912
10914
|
key: key,
|
|
10913
10915
|
target: target
|
|
@@ -10926,7 +10928,7 @@ function $573c007c697a1831$export$d0596b5cae35ad4(open_search) {
|
|
|
10926
10928
|
function $e60a76195ac6d408$export$689e204eadb33baf(pr) {
|
|
10927
10929
|
let old_url;
|
|
10928
10930
|
let disconnect_link_observer;
|
|
10929
|
-
const link_handler = $8tj43$
|
|
10931
|
+
const link_handler = $8tj43$catchify(e => {
|
|
10930
10932
|
const link = e.currentTarget || e.target;
|
|
10931
10933
|
if (link.href === old_url) {
|
|
10932
10934
|
history.pushState(history.state, "", link.href);
|
|
@@ -10935,7 +10937,7 @@ function $e60a76195ac6d408$export$689e204eadb33baf(pr) {
|
|
|
10935
10937
|
});
|
|
10936
10938
|
let remove_added_listeners;
|
|
10937
10939
|
let resolve_remove_added_listeners;
|
|
10938
|
-
pr.addEventListener("open", $8tj43$
|
|
10940
|
+
pr.addEventListener("open", $8tj43$catchify(() => {
|
|
10939
10941
|
remove_added_listeners = new Promise(r => resolve_remove_added_listeners = r);
|
|
10940
10942
|
disconnect_link_observer = (0, $8tj43$observer).onexists("a", async _ref => {
|
|
10941
10943
|
let {
|
|
@@ -10946,12 +10948,12 @@ function $e60a76195ac6d408$export$689e204eadb33baf(pr) {
|
|
|
10946
10948
|
element.removeEventListener("click", link_handler);
|
|
10947
10949
|
});
|
|
10948
10950
|
}));
|
|
10949
|
-
pr.addEventListener("close", $8tj43$
|
|
10951
|
+
pr.addEventListener("close", $8tj43$catchify(() => {
|
|
10950
10952
|
var _disconnect_link_obse, _resolve_remove_added;
|
|
10951
10953
|
(_disconnect_link_obse = disconnect_link_observer) === null || _disconnect_link_obse === void 0 || _disconnect_link_obse();
|
|
10952
10954
|
(_resolve_remove_added = resolve_remove_added_listeners) === null || _resolve_remove_added === void 0 || _resolve_remove_added();
|
|
10953
10955
|
}));
|
|
10954
|
-
$8tj43$
|
|
10956
|
+
$8tj43$catchify(async () => {
|
|
10955
10957
|
for await (const href of (0, $8tj43$href_change_ipns)) if (!pr.is_page_(new URL(href))) old_url = href;
|
|
10956
10958
|
})();
|
|
10957
10959
|
}
|
|
@@ -11049,7 +11051,7 @@ class $f9fd3017c20b774a$export$3ccaa27d81dd8556 extends EventTarget {
|
|
|
11049
11051
|
});
|
|
11050
11052
|
$f9fd3017c20b774a$var$_classPrivateFieldInitSpec(this, $f9fd3017c20b774a$var$_unload, {
|
|
11051
11053
|
writable: true,
|
|
11052
|
-
value: $8tj43$
|
|
11054
|
+
value: $8tj43$catchify(() => {
|
|
11053
11055
|
var _classPrivateFieldGet3;
|
|
11054
11056
|
if (!$8tj43$babelruntimehelpersclassPrivateFieldGet(this, $f9fd3017c20b774a$var$_is_open)) return;
|
|
11055
11057
|
(_classPrivateFieldGet3 = $8tj43$babelruntimehelpersclassPrivateFieldGet(this, $f9fd3017c20b774a$var$_disconnect_observer)) === null || _classPrivateFieldGet3 === void 0 || _classPrivateFieldGet3.call(this);
|
|
@@ -11063,7 +11065,7 @@ class $f9fd3017c20b774a$export$3ccaa27d81dd8556 extends EventTarget {
|
|
|
11063
11065
|
});
|
|
11064
11066
|
$f9fd3017c20b774a$var$_classPrivateFieldInitSpec(this, $f9fd3017c20b774a$var$_load, {
|
|
11065
11067
|
writable: true,
|
|
11066
|
-
value: $8tj43$
|
|
11068
|
+
value: $8tj43$catchify(async els => {
|
|
11067
11069
|
$8tj43$babelruntimehelpersclassPrivateFieldSet(this, $f9fd3017c20b774a$var$_is_open, true);
|
|
11068
11070
|
// So that #load doesn't get called again
|
|
11069
11071
|
let set_should_stay_inserted;
|
|
@@ -11127,7 +11129,7 @@ class $f9fd3017c20b774a$export$3ccaa27d81dd8556 extends EventTarget {
|
|
|
11127
11129
|
async function $f9fd3017c20b774a$var$_listen2() {
|
|
11128
11130
|
const [exit_ipns, exitable_ipns] = $8tj43$make_asyncIterable_exiter((0, $8tj43$href_change_ipns));
|
|
11129
11131
|
$8tj43$babelruntimehelpersclassPrivateFieldSet(this, $f9fd3017c20b774a$var$_stop_listening, exit_ipns);
|
|
11130
|
-
const caught_page_check_fn = $8tj43$
|
|
11132
|
+
const caught_page_check_fn = $8tj43$catchify(this.is_page_, "page check failed");
|
|
11131
11133
|
for await (const href of exitable_ipns) {
|
|
11132
11134
|
const url = new URL(href);
|
|
11133
11135
|
if (!caught_page_check_fn(url)) {
|
|
@@ -11145,7 +11147,7 @@ function $f9fd3017c20b774a$var$_get_rendered_recs2() {
|
|
|
11145
11147
|
this.addEventListener("close", dispose, {
|
|
11146
11148
|
once: true
|
|
11147
11149
|
});
|
|
11148
|
-
return $8tj43$
|
|
11150
|
+
return $8tj43$catchify(this.render_, "rendering failed")() || [];
|
|
11149
11151
|
});
|
|
11150
11152
|
}
|
|
11151
11153
|
function $f9fd3017c20b774a$var$_empty_page_bugfix2() {
|
|
@@ -11193,7 +11195,7 @@ var $f9fd3017c20b774a$var$_visited_urls = {
|
|
|
11193
11195
|
writable: true,
|
|
11194
11196
|
value: (() => {
|
|
11195
11197
|
// Keep track of all URLs that have been visited since the document that was initially loaded (loaded means the process where the browser creates a new `document` and `window` object).
|
|
11196
|
-
$8tj43$
|
|
11198
|
+
$8tj43$catchify(async () => {
|
|
11197
11199
|
// Static initialization blocks aren't supported in MobileSafari yet, otherwise this would be one.
|
|
11198
11200
|
// I don't think we want to ship a library that users are *forced* to transpile, it should run in the newest version of all major browsers. So we'll just use a function wrapper for now (adding "last 1 ios version" to the build target does a bunch of other unneeded transpilations).
|
|
11199
11201
|
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes/Static_initialization_blocks
|