@depict-ai/ui 1.4.20 → 1.4.21
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 +2 -3
- package/ES10/index.d.ts +1 -1
- package/ES10/index.js +156 -157
- package/latest/index.cjs +2 -3
- package/latest/index.d.ts +1 -1
- package/latest/index.js +156 -157
- package/package.json +1 -1
- package/server/ES10/index.cjs +2 -3
- package/server/ES10/index.d.ts +1 -1
- package/server/ES10/index.js +97 -98
- package/server/latest/index.cjs +2 -3
- package/server/latest/index.d.ts +1 -1
- package/server/latest/index.js +97 -98
package/latest/index.js
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import { add_to_version_info as $9HbP8$add_to_version_info,
|
|
1
|
+
import { add_to_version_info as $9HbP8$add_to_version_info, catchify as $9HbP8$catchify, is_safari as $9HbP8$is_safari, report as $9HbP8$report, observer as $9HbP8$observer, useExpandingContainer as $9HbP8$useExpandingContainer, standard_price_format as $9HbP8$standard_price_format, Amazing_Slider as $9HbP8$Amazing_Slider, slider_snap_css as $9HbP8$slider_snap_css, slider_fading_factory as $9HbP8$slider_fading_factory, make_random_classname as $9HbP8$make_random_classname, dlog as $9HbP8$dlog, hex_to_rgb as $9HbP8$hex_to_rgb, relative_luminance_from_rgb as $9HbP8$relative_luminance_from_rgb, javascript_media_query as $9HbP8$javascript_media_query, n_col_styling_with_dist as $9HbP8$n_col_styling_with_dist, 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, layout_media_query_header as $9HbP8$layout_media_query_header, fetch_recs as $9HbP8$fetch_recs, snakeCasifyObject as $9HbP8$snakeCasifyObject, instant_exec_on_suspect_history_change as $9HbP8$instant_exec_on_suspect_history_change, base_url as $9HbP8$base_url, get_depict_id as $9HbP8$get_depict_id, get_user_id as $9HbP8$get_user_id, get_session_id as $9HbP8$get_session_id, sort_obj as $9HbP8$sort_obj, fetch_retry as $9HbP8$fetch_retry, add_version_query_params as $9HbP8$add_version_query_params, dwarn as $9HbP8$dwarn, make_url_with_query_params as $9HbP8$make_url_with_query_params, edit_current_page_meta_tags as $9HbP8$edit_current_page_meta_tags, use_href_accessor as $9HbP8$use_href_accessor, base64_encode_unicode as $9HbP8$base64_encode_unicode, base64_decode_unicode as $9HbP8$base64_decode_unicode, queueMacroTask as $9HbP8$queueMacroTask, is_debug as $9HbP8$is_debug, make_asyncIterable_exiter as $9HbP8$make_asyncIterable_exiter, href_change_ipns as $9HbP8$href_change_ipns, ContainedImage as $9HbP8$ContainedImage, buildThresholdList as $9HbP8$buildThresholdList, deparallelize_no_drop as $9HbP8$deparallelize_no_drop, insert_surfaces as $9HbP8$insert_surfaces } from "@depict-ai/utilishared/latest";
|
|
2
2
|
import { template as $9HbP8$template, getNextElement as $9HbP8$getNextElement, spread as $9HbP8$spread, mergeProps as $9HbP8$mergeProps, runHydrationEvents as $9HbP8$runHydrationEvents, effect as $9HbP8$effect, style as $9HbP8$style, insert as $9HbP8$insert, classList as $9HbP8$classList, createComponent as $9HbP8$createComponent, getNextMarker as $9HbP8$getNextMarker, addEventListener as $9HbP8$addEventListener, memo as $9HbP8$memo, delegateEvents as $9HbP8$delegateEvents, setAttribute as $9HbP8$setAttribute, Dynamic as $9HbP8$Dynamic, use as $9HbP8$use, className as $9HbP8$className, isServer as $9HbP8$isServer } from "solid-js/web";
|
|
3
|
-
import { catchify as $9HbP8$catchify } from "@depict-ai/utilishared/latest/latest";
|
|
4
3
|
import { createSignal as $9HbP8$createSignal, onCleanup as $9HbP8$onCleanup, ErrorBoundary as $9HbP8$ErrorBoundary, createMemo as $9HbP8$createMemo, untrack as $9HbP8$untrack, createEffect as $9HbP8$createEffect, getOwner as $9HbP8$getOwner, Show as $9HbP8$Show, runWithOwner as $9HbP8$runWithOwner, Index as $9HbP8$Index, createRoot as $9HbP8$createRoot, on as $9HbP8$on, For as $9HbP8$For, createRenderEffect as $9HbP8$createRenderEffect, createComputed as $9HbP8$createComputed, batch as $9HbP8$batch, createResource as $9HbP8$createResource, createReaction as $9HbP8$createReaction, Suspense as $9HbP8$Suspense } from "solid-js";
|
|
5
4
|
|
|
6
5
|
/*! Depict.ai search and product listing SDK */
|
|
7
6
|
import { register_es_version } from "../multi_import_deduplicator.mjs";
|
|
8
7
|
register_es_version("ui", "latest");
|
|
9
|
-
const $ec291e0010116877$export$83d89fbfd8236492 = "1.4.
|
|
8
|
+
const $ec291e0010116877$export$83d89fbfd8236492 = "1.4.21";
|
|
10
9
|
const $e8ffe11ed01df0fe$var$_tmpl$ = /*#__PURE__*/$9HbP8$template(`<img>`, 1);
|
|
11
10
|
function $e8ffe11ed01df0fe$export$e6fffe67d4cdd848(whatToWatch) {
|
|
12
11
|
const [size, setSize] = $9HbP8$createSignal(0);
|
|
@@ -149,15 +148,15 @@ function $6bb0a0c563dff4bb$export$6c6d7a51fa9aa15d(props) {
|
|
|
149
148
|
$9HbP8$insert(details_, [summary_, $9HbP8$createComponent(ExpandingContainer, {
|
|
150
149
|
children: children
|
|
151
150
|
})], null);
|
|
152
|
-
if (!$9HbP8$untrack(is_in_dom)) (0, $9HbP8$observer).wait_for_element(details_).then($9HbP8$
|
|
153
|
-
$9HbP8$createEffect($9HbP8$
|
|
151
|
+
if (!$9HbP8$untrack(is_in_dom)) (0, $9HbP8$observer).wait_for_element(details_).then($9HbP8$catchify(() => set_is_in_dom(true)));
|
|
152
|
+
$9HbP8$createEffect($9HbP8$catchify(async () => {
|
|
154
153
|
const is_open = is_open_memo();
|
|
155
154
|
if (!is_in_dom())
|
|
156
155
|
// wait with setting state until we're in DOM, animation won't work otherwise
|
|
157
156
|
return;
|
|
158
157
|
if (dont_animate_if_instant_open_ && fresh_component && !timeout_started) {
|
|
159
158
|
timeout_started = true;
|
|
160
|
-
setTimeout($9HbP8$
|
|
159
|
+
setTimeout($9HbP8$catchify(() => fresh_component = false));
|
|
161
160
|
}
|
|
162
161
|
if (is_open) {
|
|
163
162
|
details_.open = true; // open up the toggle so the animation can happen
|
|
@@ -165,10 +164,10 @@ function $6bb0a0c563dff4bb$export$6c6d7a51fa9aa15d(props) {
|
|
|
165
164
|
await expand(0, do_duration);
|
|
166
165
|
} else {
|
|
167
166
|
const animation = await collapse();
|
|
168
|
-
animation?.addEventListener("finish", $9HbP8$
|
|
167
|
+
animation?.addEventListener("finish", $9HbP8$catchify(() => details_.open = false));
|
|
169
168
|
}
|
|
170
169
|
}));
|
|
171
|
-
details_.addEventListener("toggle", $9HbP8$
|
|
170
|
+
details_.addEventListener("toggle", $9HbP8$catchify(() => {
|
|
172
171
|
const {
|
|
173
172
|
open: open
|
|
174
173
|
} = details_;
|
|
@@ -178,11 +177,11 @@ function $6bb0a0c563dff4bb$export$6c6d7a51fa9aa15d(props) {
|
|
|
178
177
|
}) // in case someone somehow toggles it without us intercepting it at least follow suit
|
|
179
178
|
);
|
|
180
179
|
|
|
181
|
-
summary_.addEventListener("click", $9HbP8$
|
|
180
|
+
summary_.addEventListener("click", $9HbP8$catchify(ev => {
|
|
182
181
|
ev.preventDefault();
|
|
183
182
|
toggle();
|
|
184
183
|
}));
|
|
185
|
-
summary_.addEventListener("keydown", $9HbP8$
|
|
184
|
+
summary_.addEventListener("keydown", $9HbP8$catchify(ev => {
|
|
186
185
|
const {
|
|
187
186
|
key: key
|
|
188
187
|
} = ev;
|
|
@@ -275,7 +274,7 @@ function $bf52d9f9eebd1938$export$5196e4c01fa56fcb({
|
|
|
275
274
|
}) {
|
|
276
275
|
let close_toast_;
|
|
277
276
|
const stay_open_promise = new Promise(r => close_toast_ = r);
|
|
278
|
-
$9HbP8$
|
|
277
|
+
$9HbP8$catchify(async () => {
|
|
279
278
|
const closing_animation_duration = 300; // ms
|
|
280
279
|
const element = (() => {
|
|
281
280
|
const _el$ = $9HbP8$getNextElement($bf52d9f9eebd1938$var$_tmpl$);
|
|
@@ -286,8 +285,8 @@ function $bf52d9f9eebd1938$export$5196e4c01fa56fcb({
|
|
|
286
285
|
})();
|
|
287
286
|
const [, set_is_showing_toast] = $bf52d9f9eebd1938$export$22970a0140fc759c;
|
|
288
287
|
// if this is a memory leak the garbage collector is stupid - does someone know?
|
|
289
|
-
for (const ev of ["pointerover", "focusin"]) element.addEventListener(ev, $9HbP8$
|
|
290
|
-
for (const ev of ["pointerout", "focusout"]) element.addEventListener(ev, $9HbP8$
|
|
288
|
+
for (const ev of ["pointerover", "focusin"]) element.addEventListener(ev, $9HbP8$catchify(() => closing_animation.pause()));
|
|
289
|
+
for (const ev of ["pointerout", "focusout"]) element.addEventListener(ev, $9HbP8$catchify(() => closing_animation.play()));
|
|
291
290
|
const body = await (0, $9HbP8$observer).wait_for_element("body");
|
|
292
291
|
const x_translate = "translateX(-50%) ";
|
|
293
292
|
let remove_keyboard_listener;
|
|
@@ -312,7 +311,7 @@ function $bf52d9f9eebd1938$export$5196e4c01fa56fcb({
|
|
|
312
311
|
// let other toasts close us if they open while we're still here
|
|
313
312
|
$bf52d9f9eebd1938$var$closing_functions.add(close_toast_);
|
|
314
313
|
set_is_showing_toast(true);
|
|
315
|
-
const handler = $9HbP8$
|
|
314
|
+
const handler = $9HbP8$catchify(({
|
|
316
315
|
key: key
|
|
317
316
|
}) => {
|
|
318
317
|
if (key === "Escape")
|
|
@@ -418,7 +417,7 @@ function $e9342fb3ac73a54a$export$8895d39404bd2bb1(props) {
|
|
|
418
417
|
const _el$2 = $9HbP8$getNextElement($e9342fb3ac73a54a$var$_tmpl$2),
|
|
419
418
|
_el$3 = _el$2.firstChild,
|
|
420
419
|
_el$4 = _el$3.nextSibling;
|
|
421
|
-
$9HbP8$addEventListener(_el$3, "click", $9HbP8$
|
|
420
|
+
$9HbP8$addEventListener(_el$3, "click", $9HbP8$catchify(() => {
|
|
422
421
|
set_selected_filters(previous_selected_filters);
|
|
423
422
|
set_expanded_hierarchical_filters(previous_expanded_hierarchical_filters);
|
|
424
423
|
if (also_clear_sorting_ && previous_sorting) props.current_sorting_[1](previous_sorting);
|
|
@@ -499,7 +498,7 @@ function $1adfe60f3a14a1d7$export$fecbb157621501bd({
|
|
|
499
498
|
get children() {
|
|
500
499
|
return [(() => {
|
|
501
500
|
const _el$6 = $9HbP8$getNextElement($1adfe60f3a14a1d7$var$_tmpl$);
|
|
502
|
-
$9HbP8$addEventListener(_el$6, "click", $9HbP8$
|
|
501
|
+
$9HbP8$addEventListener(_el$6, "click", $9HbP8$catchify(() =>
|
|
503
502
|
// click event handlers don't have an owner, carry it over
|
|
504
503
|
$9HbP8$runWithOwner(owner, () => $e9342fb3ac73a54a$export$8895d39404bd2bb1({
|
|
505
504
|
selected_filters_: selected_filters_,
|
|
@@ -683,7 +682,7 @@ function $1adfe60f3a14a1d7$export$fecbb157621501bd({
|
|
|
683
682
|
_el$28 = _el$26.firstChild,
|
|
684
683
|
[_el$29, _co$10] = $9HbP8$getNextMarker(_el$28.nextSibling),
|
|
685
684
|
_el$27 = _el$29.nextSibling;
|
|
686
|
-
$9HbP8$addEventListener(_el$26, "click", $9HbP8$
|
|
685
|
+
$9HbP8$addEventListener(_el$26, "click", $9HbP8$catchify(() => {
|
|
687
686
|
const to_remove = selected_data();
|
|
688
687
|
const cloned_selected_filters = [...read_selected_filters()];
|
|
689
688
|
cloned_selected_filters.splice(index_in_selected_filters, 1);
|
|
@@ -739,9 +738,9 @@ function $1adfe60f3a14a1d7$export$fecbb157621501bd({
|
|
|
739
738
|
});
|
|
740
739
|
const [is_in_dom, set_is_in_dom] = $9HbP8$createSignal(document.documentElement.contains(outmost_element));
|
|
741
740
|
const hidden = $9HbP8$createMemo(() => get_search_filters_open_() || get_search_sorting_open_());
|
|
742
|
-
if (!$9HbP8$untrack(is_in_dom)) (0, $9HbP8$observer).wait_for_element(outmost_element).then($9HbP8$
|
|
741
|
+
if (!$9HbP8$untrack(is_in_dom)) (0, $9HbP8$observer).wait_for_element(outmost_element).then($9HbP8$catchify(() => set_is_in_dom(true)));
|
|
743
742
|
outmost_element.classList.add("selected-filters");
|
|
744
|
-
$9HbP8$createEffect($9HbP8$
|
|
743
|
+
$9HbP8$createEffect($9HbP8$catchify(async () => {
|
|
745
744
|
if (!is_in_dom())
|
|
746
745
|
// wait with setting state until we're in DOM, animation won't work otherwise
|
|
747
746
|
return;
|
|
@@ -778,7 +777,7 @@ const $87c712b5b33f24f7$export$48513f6b9f8ce62d = props => {
|
|
|
778
777
|
// 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.
|
|
779
778
|
// 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
|
|
780
779
|
// Why it can't be done instantaneously I don't know.
|
|
781
|
-
input_el.addEventListener("change", $9HbP8$
|
|
780
|
+
input_el.addEventListener("change", $9HbP8$catchify(() => requestAnimationFrame($9HbP8$catchify(() => {
|
|
782
781
|
if (input_el.checked !== checked()) input_el.checked = checked();
|
|
783
782
|
}))));
|
|
784
783
|
props.input_ref_?.(input_el);
|
|
@@ -834,7 +833,7 @@ function $67b173f9db427028$export$ca21a16d65b3dd8({
|
|
|
834
833
|
_el$3 = _el$.firstChild,
|
|
835
834
|
[_el$4, _co$] = $9HbP8$getNextMarker(_el$3.nextSibling),
|
|
836
835
|
_el$2 = _el$4.nextSibling;
|
|
837
|
-
$9HbP8$addEventListener(_el$, "click", $9HbP8$
|
|
836
|
+
$9HbP8$addEventListener(_el$, "click", $9HbP8$catchify(() => set_show_extras(p => !p)), true);
|
|
838
837
|
$9HbP8$insert(_el$, $9HbP8$createComponent((0, $f8a56ba74eedd0c6$export$f21ab0717a89c77f), {}), _el$4, _co$);
|
|
839
838
|
$9HbP8$insert(_el$2, (() => {
|
|
840
839
|
const _c$ = $9HbP8$memo(() => !!get_show_extras());
|
|
@@ -924,7 +923,7 @@ function $a4601e6bea3ed1e6$export$dd948f91abc3a1c4({
|
|
|
924
923
|
i18n_: i18n_
|
|
925
924
|
}) : []);
|
|
926
925
|
});
|
|
927
|
-
$9HbP8$createEffect($9HbP8$
|
|
926
|
+
$9HbP8$createEffect($9HbP8$catchify(async () => {
|
|
928
927
|
if (!togglable_rest()) {
|
|
929
928
|
await collapse();
|
|
930
929
|
return;
|
|
@@ -937,7 +936,7 @@ function $a4601e6bea3ed1e6$export$dd948f91abc3a1c4({
|
|
|
937
936
|
[_el$3, _co$] = $9HbP8$getNextMarker(_el$2.nextSibling),
|
|
938
937
|
_el$4 = _el$3.nextSibling,
|
|
939
938
|
[_el$5, _co$2] = $9HbP8$getNextMarker(_el$4.nextSibling);
|
|
940
|
-
$9HbP8$addEventListener(_el$, "change", $9HbP8$
|
|
939
|
+
$9HbP8$addEventListener(_el$, "change", $9HbP8$catchify(() => {
|
|
941
940
|
const set_filter = existing_filter();
|
|
942
941
|
const {
|
|
943
942
|
field: field,
|
|
@@ -1005,7 +1004,7 @@ function $eb8d9bf3b5700c26$export$430444115f70a734({
|
|
|
1005
1004
|
_el$9 = _el$3.nextSibling,
|
|
1006
1005
|
[_el$10, _co$2] = $9HbP8$getNextMarker(_el$9.nextSibling);
|
|
1007
1006
|
$9HbP8$setAttribute(_el$2, "for", random_selector);
|
|
1008
|
-
$9HbP8$addEventListener(_el$4, "change", $9HbP8$
|
|
1007
|
+
$9HbP8$addEventListener(_el$4, "change", $9HbP8$catchify(() => {
|
|
1009
1008
|
const filter_object = {
|
|
1010
1009
|
op: filter_().op,
|
|
1011
1010
|
field: filter_().field,
|
|
@@ -1071,7 +1070,7 @@ function $a6b08770e164eced$export$e0d834a0ad870cda({
|
|
|
1071
1070
|
});
|
|
1072
1071
|
$9HbP8$createComputed(() => {
|
|
1073
1072
|
clearTimeout(debounce_timeout);
|
|
1074
|
-
debounce_timeout = setTimeout($9HbP8$
|
|
1073
|
+
debounce_timeout = setTimeout($9HbP8$catchify(range => $9HbP8$untrack(() => {
|
|
1075
1074
|
const default_data = filter_().data;
|
|
1076
1075
|
const filter_object = {
|
|
1077
1076
|
op: filter_().op,
|
|
@@ -1148,20 +1147,20 @@ function $a6b08770e164eced$var$RangeSelector({
|
|
|
1148
1147
|
[_el$22, _co$6] = $9HbP8$getNextMarker(_el$21.nextSibling);
|
|
1149
1148
|
const _ref$ = price_input_1;
|
|
1150
1149
|
typeof _ref$ === "function" ? $9HbP8$use(_ref$, _el$4) : price_input_1 = _el$4;
|
|
1151
|
-
$9HbP8$addEventListener(_el$4, "keydown", $9HbP8$
|
|
1150
|
+
$9HbP8$addEventListener(_el$4, "keydown", $9HbP8$catchify(({
|
|
1152
1151
|
key: key
|
|
1153
1152
|
}) => {
|
|
1154
1153
|
if (key === "Enter") $a6b08770e164eced$var$set_range_with_sanitation(min_, max_, current_range_, 0, price_input_1);
|
|
1155
1154
|
}), true);
|
|
1156
|
-
$9HbP8$addEventListener(_el$4, "blur", $9HbP8$
|
|
1155
|
+
$9HbP8$addEventListener(_el$4, "blur", $9HbP8$catchify(() => $a6b08770e164eced$var$set_range_with_sanitation(min_, max_, current_range_, 0, price_input_1)));
|
|
1157
1156
|
const _ref$2 = price_input_2;
|
|
1158
1157
|
typeof _ref$2 === "function" ? $9HbP8$use(_ref$2, _el$7) : price_input_2 = _el$7;
|
|
1159
|
-
$9HbP8$addEventListener(_el$7, "keydown", $9HbP8$
|
|
1158
|
+
$9HbP8$addEventListener(_el$7, "keydown", $9HbP8$catchify(({
|
|
1160
1159
|
key: key
|
|
1161
1160
|
}) => {
|
|
1162
1161
|
if (key === "Enter") $a6b08770e164eced$var$set_range_with_sanitation(min_, max_, current_range_, 1, price_input_2);
|
|
1163
1162
|
}), true);
|
|
1164
|
-
$9HbP8$addEventListener(_el$7, "blur", $9HbP8$
|
|
1163
|
+
$9HbP8$addEventListener(_el$7, "blur", $9HbP8$catchify(() => $a6b08770e164eced$var$set_range_with_sanitation(min_, max_, current_range_, 1, price_input_2)));
|
|
1165
1164
|
$9HbP8$insert(_el$, $9HbP8$createComponent($a6b08770e164eced$var$ExponentialSlider, {
|
|
1166
1165
|
max_: max_,
|
|
1167
1166
|
min_: min_,
|
|
@@ -1281,7 +1280,7 @@ function $a6b08770e164eced$var$LinearSlider({
|
|
|
1281
1280
|
return [(() => {
|
|
1282
1281
|
const _el$25 = $9HbP8$getNextElement($a6b08770e164eced$var$_tmpl$2),
|
|
1283
1282
|
_el$26 = _el$25.firstChild;
|
|
1284
|
-
$9HbP8$addEventListener(_el$25, "click", $9HbP8$
|
|
1283
|
+
$9HbP8$addEventListener(_el$25, "click", $9HbP8$catchify(e => {
|
|
1285
1284
|
const rect = clickable_slider.getBoundingClientRect();
|
|
1286
1285
|
const slider_beginning_left = rect.left;
|
|
1287
1286
|
const slider_width = rect.width;
|
|
@@ -1307,12 +1306,12 @@ function $a6b08770e164eced$var$LinearSlider({
|
|
|
1307
1306
|
range_input_1 = el;
|
|
1308
1307
|
set_value(range_input_1, 0);
|
|
1309
1308
|
}, _el$28);
|
|
1310
|
-
$9HbP8$addEventListener(_el$28, "input", $9HbP8$
|
|
1309
|
+
$9HbP8$addEventListener(_el$28, "input", $9HbP8$catchify(() => $a6b08770e164eced$var$set_range_with_sanitation(min_, max_, current_range_, 0, range_input_1, offset_value_calculator_)), true);
|
|
1311
1310
|
$9HbP8$use(el => {
|
|
1312
1311
|
range_input_2 = el;
|
|
1313
1312
|
set_value(range_input_2, 1);
|
|
1314
1313
|
}, _el$29);
|
|
1315
|
-
$9HbP8$addEventListener(_el$29, "input", $9HbP8$
|
|
1314
|
+
$9HbP8$addEventListener(_el$29, "input", $9HbP8$catchify(() => $a6b08770e164eced$var$set_range_with_sanitation(min_, max_, current_range_, 1, range_input_2, offset_value_calculator_)), true);
|
|
1316
1315
|
$9HbP8$effect(_p$ => {
|
|
1317
1316
|
const _v$7 = i18n_.range_filter_low_point_aria_label_(),
|
|
1318
1317
|
_v$8 = min_(),
|
|
@@ -1383,7 +1382,7 @@ function $0b6bc2f8309efa8a$export$e5c2828934226505({
|
|
|
1383
1382
|
return _el$;
|
|
1384
1383
|
})();
|
|
1385
1384
|
const [is_in_dom, set_is_in_dom] = $9HbP8$createSignal(false);
|
|
1386
|
-
(0, $9HbP8$observer).wait_for_element(outer_div).then($9HbP8$
|
|
1385
|
+
(0, $9HbP8$observer).wait_for_element(outer_div).then($9HbP8$catchify(() => set_is_in_dom(true)));
|
|
1387
1386
|
$9HbP8$createEffect(() => {
|
|
1388
1387
|
if (!is_in_dom())
|
|
1389
1388
|
// wait for us to being in DOM as animations don't work otherwise
|
|
@@ -1536,7 +1535,7 @@ function $1c8cac76cb67e9af$export$a32086fa6616eafd({
|
|
|
1536
1535
|
i18n_: i18n_
|
|
1537
1536
|
}) : []);
|
|
1538
1537
|
});
|
|
1539
|
-
$9HbP8$createEffect($9HbP8$
|
|
1538
|
+
$9HbP8$createEffect($9HbP8$catchify(async () => {
|
|
1540
1539
|
if (!some_top_level_are_hidden()) {
|
|
1541
1540
|
await collapse();
|
|
1542
1541
|
return;
|
|
@@ -1595,7 +1594,7 @@ function $1c8cac76cb67e9af$var$render_stuff(data, existing_filter, i18n_) {
|
|
|
1595
1594
|
return value()?.is_checked_?.[0]?.() ?? false;
|
|
1596
1595
|
},
|
|
1597
1596
|
input_ref_: input => {
|
|
1598
|
-
input.addEventListener("change", $9HbP8$
|
|
1597
|
+
input.addEventListener("change", $9HbP8$catchify(() => $9HbP8$untrack(() => {
|
|
1599
1598
|
const {
|
|
1600
1599
|
checked: checked
|
|
1601
1600
|
} = input;
|
|
@@ -1680,7 +1679,7 @@ function $1c8cac76cb67e9af$var$batching_filter_state_syncer(props) {
|
|
|
1680
1679
|
existing_filter_: existing_filter_
|
|
1681
1680
|
} = props;
|
|
1682
1681
|
let sync_queued = false;
|
|
1683
|
-
const sync_fn = $9HbP8$
|
|
1682
|
+
const sync_fn = $9HbP8$catchify(async () => {
|
|
1684
1683
|
sync_queued = false;
|
|
1685
1684
|
// if we change, update filter state - next microtask, so that "reactions" to the change can process before we send it off to the API
|
|
1686
1685
|
const set_filter = existing_filter_();
|
|
@@ -1737,13 +1736,13 @@ function $1c8cac76cb67e9af$var$create_updating_signal({
|
|
|
1737
1736
|
$9HbP8$createComputed($9HbP8$on(read_checked, trigger_sync_, {
|
|
1738
1737
|
defer: true
|
|
1739
1738
|
}));
|
|
1740
|
-
$9HbP8$createComputed($9HbP8$on(read_checked, $9HbP8$
|
|
1739
|
+
$9HbP8$createComputed($9HbP8$on(read_checked, $9HbP8$catchify(new_value => {
|
|
1741
1740
|
if (updating_blocked) return;
|
|
1742
1741
|
for (const child of child_objects) child.is_checked_[1](new_value);
|
|
1743
1742
|
}), {
|
|
1744
1743
|
defer: true
|
|
1745
1744
|
}));
|
|
1746
|
-
$9HbP8$createEffect($9HbP8$on(get_child_object_values, $9HbP8$
|
|
1745
|
+
$9HbP8$createEffect($9HbP8$on(get_child_object_values, $9HbP8$catchify(() => {
|
|
1747
1746
|
const all_kids_checked = get_child_object_values.every(accessor => accessor());
|
|
1748
1747
|
if (all_kids_checked === read_checked()) return;
|
|
1749
1748
|
updating_blocked = true;
|
|
@@ -1865,7 +1864,7 @@ const $93716a9ad0dea854$export$414f6a19d38e655c = ({
|
|
|
1865
1864
|
const is_selected = $9HbP8$createMemo(() => existing_filter()?.data?.includes(value().value_));
|
|
1866
1865
|
return (() => {
|
|
1867
1866
|
const _el$2 = $9HbP8$getNextElement($93716a9ad0dea854$var$_tmpl$2);
|
|
1868
|
-
$9HbP8$addEventListener(_el$2, "click", $9HbP8$
|
|
1867
|
+
$9HbP8$addEventListener(_el$2, "click", $9HbP8$catchify(() => {
|
|
1869
1868
|
const set_filter = existing_filter();
|
|
1870
1869
|
const {
|
|
1871
1870
|
field: field,
|
|
@@ -2019,7 +2018,7 @@ function $e731d52d97444b7c$export$82ed4b28ecb67608({
|
|
|
2019
2018
|
i18n_: i18n_
|
|
2020
2019
|
}) : []);
|
|
2021
2020
|
});
|
|
2022
|
-
$9HbP8$createEffect($9HbP8$
|
|
2021
|
+
$9HbP8$createEffect($9HbP8$catchify(async () => {
|
|
2023
2022
|
if (!togglable_rest()) {
|
|
2024
2023
|
await collapse();
|
|
2025
2024
|
set_having_expanding_in_dom(false); // Once animation has finished, remove expanding from DOM
|
|
@@ -2034,7 +2033,7 @@ function $e731d52d97444b7c$export$82ed4b28ecb67608({
|
|
|
2034
2033
|
[_el$3, _co$] = $9HbP8$getNextMarker(_el$2.nextSibling),
|
|
2035
2034
|
_el$4 = _el$3.nextSibling,
|
|
2036
2035
|
[_el$5, _co$2] = $9HbP8$getNextMarker(_el$4.nextSibling);
|
|
2037
|
-
$9HbP8$addEventListener(_el$, "change", $9HbP8$
|
|
2036
|
+
$9HbP8$addEventListener(_el$, "change", $9HbP8$catchify(() => {
|
|
2038
2037
|
const set_filter = existing_filter();
|
|
2039
2038
|
const {
|
|
2040
2039
|
field: field,
|
|
@@ -2424,7 +2423,7 @@ function $fab07f52c9861732$var$ActualFilterBody(props) {
|
|
|
2424
2423
|
_el$7 = _el$5.firstChild,
|
|
2425
2424
|
[_el$8, _co$] = $9HbP8$getNextMarker(_el$7.nextSibling),
|
|
2426
2425
|
_el$6 = _el$8.nextSibling;
|
|
2427
|
-
$9HbP8$addEventListener(_el$5, "click", $9HbP8$
|
|
2426
|
+
$9HbP8$addEventListener(_el$5, "click", $9HbP8$catchify(() => {
|
|
2428
2427
|
const new_filter_obj = [...props.selected_filters_[0]()];
|
|
2429
2428
|
for (const filter of filter_array_()) {
|
|
2430
2429
|
const index = new_filter_obj.findIndex(({
|
|
@@ -2490,7 +2489,7 @@ function $fab07f52c9861732$var$ActualFilterBody(props) {
|
|
|
2490
2489
|
},
|
|
2491
2490
|
get children() {
|
|
2492
2491
|
const _el$25 = $9HbP8$getNextElement($fab07f52c9861732$var$_tmpl$8);
|
|
2493
|
-
$9HbP8$addEventListener(_el$25, "click", $9HbP8$
|
|
2492
|
+
$9HbP8$addEventListener(_el$25, "click", $9HbP8$catchify(() => $e9342fb3ac73a54a$export$8895d39404bd2bb1({
|
|
2494
2493
|
user_triggered_: true,
|
|
2495
2494
|
selected_filters_: props.selected_filters_,
|
|
2496
2495
|
i18n_: props.i18n_,
|
|
@@ -2695,7 +2694,7 @@ function $c8d5ff4524619fcd$var$ActualSolidLayout(props, container_element) {
|
|
|
2695
2694
|
const view_less_button_class = $9HbP8$make_random_classname();
|
|
2696
2695
|
const view_more_button_container = $9HbP8$createMemo(() => have_a_view_more_button() && (() => {
|
|
2697
2696
|
const _el$2 = $9HbP8$getNextElement($c8d5ff4524619fcd$var$_tmpl$);
|
|
2698
|
-
$9HbP8$addEventListener(_el$2, "click", $9HbP8$
|
|
2697
|
+
$9HbP8$addEventListener(_el$2, "click", $9HbP8$catchify(() => set_rows_visible()(prev => prev + (rows_or_empty_object().rows_per_click ?? 1))), true);
|
|
2699
2698
|
$9HbP8$className(_el$2, `load-more-container ${view_more_button_class}`);
|
|
2700
2699
|
$9HbP8$insert(_el$2, () => rows_or_empty_object().button);
|
|
2701
2700
|
$9HbP8$runHydrationEvents();
|
|
@@ -2704,7 +2703,7 @@ function $c8d5ff4524619fcd$var$ActualSolidLayout(props, container_element) {
|
|
|
2704
2703
|
// 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
|
|
2705
2704
|
const view_less_button_container = $9HbP8$createMemo(() => have_a_view_less_button() && (() => {
|
|
2706
2705
|
const _el$3 = $9HbP8$getNextElement($c8d5ff4524619fcd$var$_tmpl$);
|
|
2707
|
-
$9HbP8$addEventListener(_el$3, "click", $9HbP8$
|
|
2706
|
+
$9HbP8$addEventListener(_el$3, "click", $9HbP8$catchify(() => set_rows_visible()(() => rows_or_empty_object().start_rows ?? 1)), true);
|
|
2708
2707
|
$9HbP8$className(_el$3, `load-less-container ${view_less_button_class}`);
|
|
2709
2708
|
$9HbP8$insert(_el$3, () => rows_or_empty_object().view_less_button);
|
|
2710
2709
|
$9HbP8$runHydrationEvents();
|
|
@@ -2725,7 +2724,7 @@ function $c8d5ff4524619fcd$var$ActualSolidLayout(props, container_element) {
|
|
|
2725
2724
|
return;
|
|
2726
2725
|
}
|
|
2727
2726
|
update_children_count();
|
|
2728
|
-
const mutation_observer = new MutationObserver($9HbP8$
|
|
2727
|
+
const mutation_observer = new MutationObserver($9HbP8$catchify(update_children_count));
|
|
2729
2728
|
mutation_observer.observe(container_element, {
|
|
2730
2729
|
childList: true
|
|
2731
2730
|
});
|
|
@@ -2788,7 +2787,7 @@ async function $194bd6b8e4c59830$export$79b1565500412d9b(search_modal, modal_fn_
|
|
|
2788
2787
|
// Animation broke, close it this time
|
|
2789
2788
|
actually_close();else if (!animation_started && closing_animation) {
|
|
2790
2789
|
animation_started = +new Date();
|
|
2791
|
-
$9HbP8$
|
|
2790
|
+
$9HbP8$catchify(closing_animation)()?.then($9HbP8$catchify(actually_close));
|
|
2792
2791
|
} else actually_close();
|
|
2793
2792
|
};
|
|
2794
2793
|
return search_modal({
|
|
@@ -2829,7 +2828,7 @@ async function $c58717f39bf51647$export$58e808b1db15d3bc({
|
|
|
2829
2828
|
function $ca6f574bd8772184$export$e183a13865960371(params_to_default_value, router_) {
|
|
2830
2829
|
const signals = {};
|
|
2831
2830
|
const entries = Object.entries(params_to_default_value);
|
|
2832
|
-
const event_handler = $9HbP8$
|
|
2831
|
+
const event_handler = $9HbP8$catchify((what_happened, args) => {
|
|
2833
2832
|
if (what_happened == "popstate") $ca6f574bd8772184$var$history_state_change(signals, entries, args.state);
|
|
2834
2833
|
});
|
|
2835
2834
|
// createRenderEffect because we need the instant execution so the signals always contain values, even before solid's render phase
|
|
@@ -2853,8 +2852,8 @@ function $ca6f574bd8772184$export$e183a13865960371(params_to_default_value, rout
|
|
|
2853
2852
|
});
|
|
2854
2853
|
// 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
|
|
2855
2854
|
(0, $9HbP8$instant_exec_on_suspect_history_change).add(event_handler);
|
|
2856
|
-
$9HbP8$onCleanup($9HbP8$
|
|
2857
|
-
$9HbP8$createEffect($9HbP8$
|
|
2855
|
+
$9HbP8$onCleanup($9HbP8$catchify(() => (0, $9HbP8$instant_exec_on_suspect_history_change).delete(event_handler)));
|
|
2856
|
+
$9HbP8$createEffect($9HbP8$catchify(() => $9HbP8$untrack($9HbP8$catchify(() => $ca6f574bd8772184$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
|
|
2858
2857
|
return signals;
|
|
2859
2858
|
}
|
|
2860
2859
|
function $ca6f574bd8772184$var$history_state_change(signals, entries, state) {
|
|
@@ -2967,7 +2966,7 @@ class $7fa23e2a0079eca4$export$e015ed2f2950f2e3 {
|
|
|
2967
2966
|
return this.#cache_objs[endpoint] ||= {
|
|
2968
2967
|
in_progress_: {},
|
|
2969
2968
|
cache_: {},
|
|
2970
|
-
finalization_registry_: this.#supports_finalization_registry ? new FinalizationRegistry($9HbP8$
|
|
2969
|
+
finalization_registry_: this.#supports_finalization_registry ? new FinalizationRegistry($9HbP8$catchify(key => {
|
|
2971
2970
|
const our_cache = this.#cache_objs[endpoint].cache_;
|
|
2972
2971
|
$9HbP8$dlog("[Search API]: removing", key, "from", our_cache);
|
|
2973
2972
|
delete our_cache[key];
|
|
@@ -3115,11 +3114,11 @@ class $7fa23e2a0079eca4$export$e015ed2f2950f2e3 {
|
|
|
3115
3114
|
result = $e5014ccd0b76d9f4$export$967e966fca9515e(result);
|
|
3116
3115
|
cache_obj.cache_[body] = new WeakRef(result);
|
|
3117
3116
|
resolve_in_progress(result);
|
|
3118
|
-
setTimeout($9HbP8$
|
|
3117
|
+
setTimeout($9HbP8$catchify(() => {
|
|
3119
3118
|
if (this.#supports_finalization_registry) cache_obj.finalization_registry_.register(result, body); // delete key from cache when value (WeakRefs) are collected
|
|
3120
3119
|
else
|
|
3121
3120
|
// delete things from cache after 5 minutes, so it doesn't get too heavy
|
|
3122
|
-
setTimeout($9HbP8$
|
|
3121
|
+
setTimeout($9HbP8$catchify(() => delete cache_obj.cache_[body]), 300000);
|
|
3123
3122
|
}), 60000 // cache values for at least 60 seconds
|
|
3124
3123
|
);
|
|
3125
3124
|
|
|
@@ -3268,7 +3267,7 @@ function $511cc0abd9a64ce8$export$92f2da32c6e7e7ee({
|
|
|
3268
3267
|
});
|
|
3269
3268
|
}
|
|
3270
3269
|
function $8f9120a1ca151e6a$export$205efb947c7ffd78(handler, passive = true) {
|
|
3271
|
-
const catchified_handler = $9HbP8$
|
|
3270
|
+
const catchified_handler = $9HbP8$catchify(handler);
|
|
3272
3271
|
const owner = $9HbP8$getOwner();
|
|
3273
3272
|
// 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.
|
|
3274
3273
|
// Use observer in case that this gets called before body exists
|
|
@@ -3385,7 +3384,7 @@ function $6db49ca163afa2c3$export$83fd5de5504a7a67({
|
|
|
3385
3384
|
fill: "forwards",
|
|
3386
3385
|
easing: "ease-in-out"
|
|
3387
3386
|
});
|
|
3388
|
-
animation.addEventListener("finish", $9HbP8$
|
|
3387
|
+
animation.addEventListener("finish", $9HbP8$catchify(() => {
|
|
3389
3388
|
if (unpermit_when_possible) set_permitted_to_show(false);
|
|
3390
3389
|
animation = undefined;
|
|
3391
3390
|
element.style.display = "none";
|
|
@@ -3446,7 +3445,7 @@ function $598245ecfe38f34b$export$ef6006467f04ee41({
|
|
|
3446
3445
|
},
|
|
3447
3446
|
get children() {
|
|
3448
3447
|
const _el$3 = $9HbP8$getNextElement($598245ecfe38f34b$var$_tmpl$);
|
|
3449
|
-
$9HbP8$addEventListener(_el$3, "click", $9HbP8$
|
|
3448
|
+
$9HbP8$addEventListener(_el$3, "click", $9HbP8$catchify(() => $9HbP8$runWithOwner(root, () => $e9342fb3ac73a54a$export$8895d39404bd2bb1({
|
|
3450
3449
|
user_triggered_: true,
|
|
3451
3450
|
selected_filters_: selected_filters_,
|
|
3452
3451
|
also_clear_sorting_: false,
|
|
@@ -3578,7 +3577,7 @@ function $056f6ac0a6caa919$export$5e4aed86c12acdd9({
|
|
|
3578
3577
|
last_loaded = +new Date();
|
|
3579
3578
|
is_first_load = true;
|
|
3580
3579
|
});
|
|
3581
|
-
$9HbP8$createEffect($9HbP8$
|
|
3580
|
+
$9HbP8$createEffect($9HbP8$catchify(async () => {
|
|
3582
3581
|
const be_above_percentage = is_first_load ? 50 : 75; // if first load, load earlier
|
|
3583
3582
|
if (percentage_in_view_() < be_above_percentage || is_loading_more) return;
|
|
3584
3583
|
if (!get_last_cursor()) {
|
|
@@ -3748,7 +3747,7 @@ function $0449e7d49398c077$export$a1fd619a4743ca08({
|
|
|
3748
3747
|
const target_to_index_map = new Map();
|
|
3749
3748
|
const index_to_target_map_ = new Map();
|
|
3750
3749
|
const currently_intersecting = new Set();
|
|
3751
|
-
const intersection_observer = new IntersectionObserver($9HbP8$
|
|
3750
|
+
const intersection_observer = new IntersectionObserver($9HbP8$catchify(records => {
|
|
3752
3751
|
for (let i = 0; i < records.length; i++) {
|
|
3753
3752
|
const record = records[i];
|
|
3754
3753
|
const {
|
|
@@ -4067,7 +4066,7 @@ function $68a258a92b88f02f$export$1f1775a58da589b5({
|
|
|
4067
4066
|
_el$13 = _el$12.nextSibling,
|
|
4068
4067
|
_el$14 = _el$13.nextSibling,
|
|
4069
4068
|
[_el$15, _co$2] = $9HbP8$getNextMarker(_el$14.nextSibling);
|
|
4070
|
-
$9HbP8$addEventListener(_el$12, "change", $9HbP8$
|
|
4069
|
+
$9HbP8$addEventListener(_el$12, "change", $9HbP8$catchify(() => set_current_sorting(item())));
|
|
4071
4070
|
$9HbP8$setAttribute(_el$12, "name", title_radio_name);
|
|
4072
4071
|
$9HbP8$insert(_el$11, () => item().meta.title, _el$15, _co$2);
|
|
4073
4072
|
$9HbP8$effect(() => _el$12.checked = is_checked());
|
|
@@ -4096,7 +4095,7 @@ function $68a258a92b88f02f$export$1f1775a58da589b5({
|
|
|
4096
4095
|
_el$19 = _el$18.nextSibling,
|
|
4097
4096
|
_el$20 = _el$19.nextSibling,
|
|
4098
4097
|
[_el$21, _co$3] = $9HbP8$getNextMarker(_el$20.nextSibling);
|
|
4099
|
-
$9HbP8$addEventListener(_el$18, "change", $9HbP8$
|
|
4098
|
+
$9HbP8$addEventListener(_el$18, "change", $9HbP8$catchify(() => set_current_sorting(c => c && {
|
|
4100
4099
|
...c,
|
|
4101
4100
|
order: order_value()
|
|
4102
4101
|
})));
|
|
@@ -4124,7 +4123,7 @@ function $aea1edf92433e81e$export$fe334901e8bebd57() {
|
|
|
4124
4123
|
offset: 0
|
|
4125
4124
|
}, 1);
|
|
4126
4125
|
animation.pause();
|
|
4127
|
-
const fn = $9HbP8$
|
|
4126
|
+
const fn = $9HbP8$catchify(animation.play.bind(animation));
|
|
4128
4127
|
cleanup_fns.push(fn);
|
|
4129
4128
|
$9HbP8$onCleanup(fn);
|
|
4130
4129
|
} catch (e) {
|
|
@@ -4135,7 +4134,7 @@ function $aea1edf92433e81e$export$fe334901e8bebd57() {
|
|
|
4135
4134
|
const style = element.style;
|
|
4136
4135
|
const original_value = style.overflow;
|
|
4137
4136
|
style.overflow = "hidden";
|
|
4138
|
-
const fn = $9HbP8$
|
|
4137
|
+
const fn = $9HbP8$catchify(() => style.overflow = original_value);
|
|
4139
4138
|
cleanup_fns.push(fn);
|
|
4140
4139
|
$9HbP8$onCleanup(fn);
|
|
4141
4140
|
}
|
|
@@ -4218,7 +4217,7 @@ function $757dac7f7c6c5241$export$9bf11afa910f536e({
|
|
|
4218
4217
|
set_search_sorting_open(true);
|
|
4219
4218
|
}
|
|
4220
4219
|
});
|
|
4221
|
-
$9HbP8$onCleanup($9HbP8$
|
|
4220
|
+
$9HbP8$onCleanup($9HbP8$catchify(() => {
|
|
4222
4221
|
if (!sorting_expanded() && !filters_expanded()) {
|
|
4223
4222
|
set_search_filters_open(false);
|
|
4224
4223
|
set_search_sorting_open(false);
|
|
@@ -4250,7 +4249,7 @@ function $757dac7f7c6c5241$export$9bf11afa910f536e({
|
|
|
4250
4249
|
_el$12 = _el$14.nextSibling;
|
|
4251
4250
|
$9HbP8$use(el => {
|
|
4252
4251
|
background = el;
|
|
4253
|
-
(0, $9HbP8$observer).wait_for_element(el).then($9HbP8$
|
|
4252
|
+
(0, $9HbP8$observer).wait_for_element(el).then($9HbP8$catchify(() => {
|
|
4254
4253
|
set_background_style("transition", "all 200ms ease-in");
|
|
4255
4254
|
set_background_style("opacity", "1");
|
|
4256
4255
|
}));
|
|
@@ -4258,7 +4257,7 @@ function $757dac7f7c6c5241$export$9bf11afa910f536e({
|
|
|
4258
4257
|
$9HbP8$addEventListener(_el$2, "click", dismiss_modal_, true);
|
|
4259
4258
|
$9HbP8$use(el => {
|
|
4260
4259
|
dismiss_button = el;
|
|
4261
|
-
(0, $9HbP8$observer).wait_for_element(el).then($9HbP8$
|
|
4260
|
+
(0, $9HbP8$observer).wait_for_element(el).then($9HbP8$catchify(() => {
|
|
4262
4261
|
set_button_style("transition", "all 200ms ease-in");
|
|
4263
4262
|
set_button_fraction_in(1);
|
|
4264
4263
|
}));
|
|
@@ -4291,7 +4290,7 @@ function $757dac7f7c6c5241$export$9bf11afa910f536e({
|
|
|
4291
4290
|
let last_move_page_y = start_page_y;
|
|
4292
4291
|
let first_move_was_downwards = false;
|
|
4293
4292
|
let distance_from_start_of_gesture = 0;
|
|
4294
|
-
const end_handler = $9HbP8$
|
|
4293
|
+
const end_handler = $9HbP8$catchify(e => {
|
|
4295
4294
|
const changedTouches = e?.changedTouches;
|
|
4296
4295
|
if (changedTouches && changedTouches[0].identifier !== our_fingers_identifier)
|
|
4297
4296
|
// other finger stopped touch, ignore it
|
|
@@ -4315,7 +4314,7 @@ function $757dac7f7c6c5241$export$9bf11afa910f536e({
|
|
|
4315
4314
|
modal.removeEventListener("touchcancel", end_handler);
|
|
4316
4315
|
modal.removeEventListener("touchmove", move_handler);
|
|
4317
4316
|
});
|
|
4318
|
-
const move_handler = $9HbP8$
|
|
4317
|
+
const move_handler = $9HbP8$catchify(e => {
|
|
4319
4318
|
const {
|
|
4320
4319
|
changedTouches: changedTouches
|
|
4321
4320
|
} = e;
|
|
@@ -4365,7 +4364,7 @@ function $757dac7f7c6c5241$export$9bf11afa910f536e({
|
|
|
4365
4364
|
};
|
|
4366
4365
|
$9HbP8$use(el => {
|
|
4367
4366
|
modal = el;
|
|
4368
|
-
(0, $9HbP8$observer).wait_for_element(el).then($9HbP8$
|
|
4367
|
+
(0, $9HbP8$observer).wait_for_element(el).then($9HbP8$catchify(() => {
|
|
4369
4368
|
set_modal_style("transition", "all 200ms ease-in");
|
|
4370
4369
|
set_modal_style("transform", "translateY(0)");
|
|
4371
4370
|
}));
|
|
@@ -4447,7 +4446,7 @@ function $757dac7f7c6c5241$export$9bf11afa910f536e({
|
|
|
4447
4446
|
},
|
|
4448
4447
|
get children() {
|
|
4449
4448
|
const _el$11 = $9HbP8$getNextElement($757dac7f7c6c5241$var$_tmpl$);
|
|
4450
|
-
$9HbP8$addEventListener(_el$11, "click", $9HbP8$
|
|
4449
|
+
$9HbP8$addEventListener(_el$11, "click", $9HbP8$catchify(() => {
|
|
4451
4450
|
const show_toast = $e9342fb3ac73a54a$export$8895d39404bd2bb1({
|
|
4452
4451
|
user_triggered_: true,
|
|
4453
4452
|
expanded_hierarchical_filters_: args_for_filtering_.expanded_hierarchical_filters_,
|
|
@@ -4457,7 +4456,7 @@ function $757dac7f7c6c5241$export$9bf11afa910f536e({
|
|
|
4457
4456
|
also_clear_sorting_: false,
|
|
4458
4457
|
delay_toast_: true
|
|
4459
4458
|
});
|
|
4460
|
-
cleanup_promise.then($9HbP8$
|
|
4459
|
+
cleanup_promise.then($9HbP8$catchify(show_toast));
|
|
4461
4460
|
}), true);
|
|
4462
4461
|
$9HbP8$insert(_el$11, () => i18n_.clear_individual_filter_());
|
|
4463
4462
|
$9HbP8$runHydrationEvents();
|
|
@@ -4530,7 +4529,7 @@ function $cdea4cf8c5c071ef$export$d7841e452f2e59a8({
|
|
|
4530
4529
|
const [sorting_open, set_sorting_open] = search_sorting_open_;
|
|
4531
4530
|
const [get_current_sorting_] = current_sorting_;
|
|
4532
4531
|
const [is_small, set_is_small] = $9HbP8$createSignal(false);
|
|
4533
|
-
const dismiss_modal_ = $9HbP8$
|
|
4532
|
+
const dismiss_modal_ = $9HbP8$catchify(() => {
|
|
4534
4533
|
set_filters_open(false);
|
|
4535
4534
|
set_sorting_open(false);
|
|
4536
4535
|
});
|
|
@@ -4611,7 +4610,7 @@ function $cdea4cf8c5c071ef$export$d7841e452f2e59a8({
|
|
|
4611
4610
|
})());
|
|
4612
4611
|
}
|
|
4613
4612
|
});
|
|
4614
|
-
$9HbP8$
|
|
4613
|
+
$9HbP8$catchify(async () => {
|
|
4615
4614
|
({
|
|
4616
4615
|
open_modal_: open_modal_,
|
|
4617
4616
|
close_modal_: close_modal_
|
|
@@ -4688,7 +4687,7 @@ function $cdea4cf8c5c071ef$var$OpenFiltersButton({
|
|
|
4688
4687
|
return _el$15;
|
|
4689
4688
|
}
|
|
4690
4689
|
}), _el$21, _co$5);
|
|
4691
|
-
$9HbP8$addEventListener(_el$16, "click", $9HbP8$
|
|
4690
|
+
$9HbP8$addEventListener(_el$16, "click", $9HbP8$catchify(() => $9HbP8$batch(() => {
|
|
4692
4691
|
if (search_filters_open_[0]()) {
|
|
4693
4692
|
search_filters_open_[1](false);
|
|
4694
4693
|
return;
|
|
@@ -4749,7 +4748,7 @@ function $cdea4cf8c5c071ef$var$OpenSortingButton({
|
|
|
4749
4748
|
_el$23 = _el$22.firstChild,
|
|
4750
4749
|
_el$24 = _el$23.nextSibling,
|
|
4751
4750
|
[_el$25, _co$6] = $9HbP8$getNextMarker(_el$24.nextSibling);
|
|
4752
|
-
$9HbP8$addEventListener(_el$22, "click", $9HbP8$
|
|
4751
|
+
$9HbP8$addEventListener(_el$22, "click", $9HbP8$catchify(() => $9HbP8$batch(() => {
|
|
4753
4752
|
if (search_sorting_open_[0]()) {
|
|
4754
4753
|
search_sorting_open_[1](false);
|
|
4755
4754
|
return;
|
|
@@ -4856,7 +4855,7 @@ function $0b0380f75d729d63$var$ActualFloatingButtons({
|
|
|
4856
4855
|
}
|
|
4857
4856
|
old_pos = new_pos;
|
|
4858
4857
|
});
|
|
4859
|
-
const touchstart_handler = $9HbP8$
|
|
4858
|
+
const touchstart_handler = $9HbP8$catchify(e => {
|
|
4860
4859
|
is_in_touch_scroll = true;
|
|
4861
4860
|
if (e.touches.length === 1) {
|
|
4862
4861
|
// 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
|
|
@@ -4864,12 +4863,12 @@ function $0b0380f75d729d63$var$ActualFloatingButtons({
|
|
|
4864
4863
|
diff_over_second_or_touch = 0;
|
|
4865
4864
|
}
|
|
4866
4865
|
});
|
|
4867
|
-
const touchend_handler = $9HbP8$
|
|
4866
|
+
const touchend_handler = $9HbP8$catchify(e => {
|
|
4868
4867
|
if (e.touches.length === 0)
|
|
4869
4868
|
// scroll gesture of any type (pinch can also be used as scroll, etc.) ended
|
|
4870
4869
|
inertia_timeout = setTimeout(
|
|
4871
4870
|
// inertia ends after 500ms (educated guess)
|
|
4872
|
-
$9HbP8$
|
|
4871
|
+
$9HbP8$catchify(() => {
|
|
4873
4872
|
is_in_touch_scroll = false;
|
|
4874
4873
|
diff_over_second_or_touch = 0;
|
|
4875
4874
|
}), 500);
|
|
@@ -4887,9 +4886,9 @@ function $0b0380f75d729d63$var$ActualFloatingButtons({
|
|
|
4887
4886
|
const everything_closed = !get_search_filters_open_() && !get_search_sorting_open_();
|
|
4888
4887
|
if (!$9HbP8$untrack(modal_is_closed) && everything_closed)
|
|
4889
4888
|
// I think the point of this is to delay the animation a bit IIRC
|
|
4890
|
-
timeout = setTimeout($9HbP8$
|
|
4889
|
+
timeout = setTimeout($9HbP8$catchify(() => set_if_modal_is_closed(true)), 200);else set_if_modal_is_closed(everything_closed);
|
|
4891
4890
|
});
|
|
4892
|
-
$9HbP8$createComputed($9HbP8$
|
|
4891
|
+
$9HbP8$createComputed($9HbP8$catchify(async () => {
|
|
4893
4892
|
const element = sort_and_filter_element_();
|
|
4894
4893
|
if (!element) return;
|
|
4895
4894
|
await (0, $9HbP8$observer).wait_for_element(element);
|
|
@@ -4908,12 +4907,12 @@ function $0b0380f75d729d63$var$ActualFloatingButtons({
|
|
|
4908
4907
|
_el$5 = _el$4.firstChild,
|
|
4909
4908
|
_el$6 = _el$4.nextSibling,
|
|
4910
4909
|
_el$7 = _el$6.firstChild;
|
|
4911
|
-
$9HbP8$addEventListener(_el$2, "click", $9HbP8$
|
|
4910
|
+
$9HbP8$addEventListener(_el$2, "click", $9HbP8$catchify(() => {
|
|
4912
4911
|
set_search_filters_open_(true);
|
|
4913
4912
|
set_search_sorting_open_(false);
|
|
4914
4913
|
}), true);
|
|
4915
4914
|
$9HbP8$insert(_el$3, $9HbP8$createComponent((0, $b9bf7fce0ae60241$export$28f6150e232898de), {}));
|
|
4916
|
-
$9HbP8$addEventListener(_el$4, "click", $9HbP8$
|
|
4915
|
+
$9HbP8$addEventListener(_el$4, "click", $9HbP8$catchify(() => {
|
|
4917
4916
|
set_search_filters_open_(false);
|
|
4918
4917
|
set_search_sorting_open_(true);
|
|
4919
4918
|
}), true);
|
|
@@ -4921,7 +4920,7 @@ function $0b0380f75d729d63$var$ActualFloatingButtons({
|
|
|
4921
4920
|
const _c$ = $9HbP8$memo(() => current_sorting_[0]()?.order === "asc");
|
|
4922
4921
|
return () => _c$() ? $9HbP8$createComponent((0, $e1bb71e65e01a3a0$export$da32f7add8a22e86), {}) : $9HbP8$createComponent((0, $05fbe84eb34564ec$export$d10e63059ddb9fd4), {});
|
|
4923
4922
|
})());
|
|
4924
|
-
$9HbP8$addEventListener(_el$6, "click", $9HbP8$
|
|
4923
|
+
$9HbP8$addEventListener(_el$6, "click", $9HbP8$catchify(() => scrollTo({
|
|
4925
4924
|
top: 0,
|
|
4926
4925
|
behavior: "smooth"
|
|
4927
4926
|
})), true);
|
|
@@ -5162,7 +5161,7 @@ function $dfa5b6f7c5e421df$export$5646050d516e06bc({
|
|
|
5162
5161
|
},
|
|
5163
5162
|
get children() {
|
|
5164
5163
|
const _el$2 = $9HbP8$getNextElement($dfa5b6f7c5e421df$var$_tmpl$2);
|
|
5165
|
-
$9HbP8$addEventListener(_el$2, "click", $9HbP8$
|
|
5164
|
+
$9HbP8$addEventListener(_el$2, "click", $9HbP8$catchify(ev => router_.navigate_.go_to_({
|
|
5166
5165
|
new_url_: href(),
|
|
5167
5166
|
is_replace_: false,
|
|
5168
5167
|
event_: ev,
|
|
@@ -5234,7 +5233,7 @@ function $06edf3aec9073663$export$466cdc317043f6cb({
|
|
|
5234
5233
|
}];
|
|
5235
5234
|
$9HbP8$createComputed(() => {
|
|
5236
5235
|
if (place_holdey_quicklinks_data()?.[0]?.query_id) {
|
|
5237
|
-
if (last_was_placeholder) queueMicrotask($9HbP8$
|
|
5236
|
+
if (last_was_placeholder) queueMicrotask($9HbP8$catchify(() => {
|
|
5238
5237
|
sliding_element?.scrollTo({
|
|
5239
5238
|
left: 0
|
|
5240
5239
|
}); // for some reason we land one element to the right after placeholder rendering otherwise
|
|
@@ -5301,7 +5300,7 @@ function $06edf3aec9073663$export$466cdc317043f6cb({
|
|
|
5301
5300
|
} else if (!(intersecting_items_object[selected_index()]?.intersectionRatio >= 0.95)) {
|
|
5302
5301
|
// negated larger than to handle left side of comparison being undefined
|
|
5303
5302
|
let done_work = false;
|
|
5304
|
-
$9HbP8$runWithOwner(owner, () => $9HbP8$createComputed($9HbP8$
|
|
5303
|
+
$9HbP8$runWithOwner(owner, () => $9HbP8$createComputed($9HbP8$catchify(() => {
|
|
5305
5304
|
if (done_work || !Array.isArray(quicklinks_data_())) return;
|
|
5306
5305
|
const sel_index = selected_index();
|
|
5307
5306
|
const target_element = sel_index >= 0 ? sel_index : 0;
|
|
@@ -5349,7 +5348,7 @@ function $06edf3aec9073663$export$466cdc317043f6cb({
|
|
|
5349
5348
|
}));
|
|
5350
5349
|
return (() => {
|
|
5351
5350
|
const _el$3 = $9HbP8$getNextElement($06edf3aec9073663$var$_tmpl$3);
|
|
5352
|
-
$9HbP8$addEventListener(_el$3, "click", $9HbP8$
|
|
5351
|
+
$9HbP8$addEventListener(_el$3, "click", $9HbP8$catchify(ev => {
|
|
5353
5352
|
const url = href();
|
|
5354
5353
|
if (is_selected() && !ev.metaKey && !ev.ctrlKey && !ev.button || !url)
|
|
5355
5354
|
// allow open currently selected one in new tab but otherwise prevent clicks
|
|
@@ -5408,7 +5407,7 @@ function $641bba2917fe862b$export$6e49da55e449af7c({
|
|
|
5408
5407
|
}]); // get rid of old data the browser saves the old state and will restore it later on
|
|
5409
5408
|
};
|
|
5410
5409
|
|
|
5411
|
-
$9HbP8$createComputed($9HbP8$
|
|
5410
|
+
$9HbP8$createComputed($9HbP8$catchify(() => {
|
|
5412
5411
|
const last_result = get_last_result_in_viewport_();
|
|
5413
5412
|
if (last_result == undefined || last_result <= 0 || last_result == Infinity) return;
|
|
5414
5413
|
if (isNaN(last_result)) {
|
|
@@ -5435,7 +5434,7 @@ function $641bba2917fe862b$export$6e49da55e449af7c({
|
|
|
5435
5434
|
set_to_later = last_result;
|
|
5436
5435
|
// If a delayed push timeout is already running, just changing the value that will be pushed is sufficient
|
|
5437
5436
|
if (timeout) return;
|
|
5438
|
-
timeout = setTimeout($9HbP8$
|
|
5437
|
+
timeout = setTimeout($9HbP8$catchify(() => {
|
|
5439
5438
|
timeout = undefined;
|
|
5440
5439
|
last_time_history_changed = +new Date();
|
|
5441
5440
|
set_min_results_loaded(set_to_later);
|
|
@@ -5478,7 +5477,7 @@ function $587cd61972788655$export$210f130a61ac1e8d(fn) {
|
|
|
5478
5477
|
let last_queued;
|
|
5479
5478
|
let last_value;
|
|
5480
5479
|
let initial_run = true;
|
|
5481
|
-
$9HbP8$createComputed($9HbP8$
|
|
5480
|
+
$9HbP8$createComputed($9HbP8$catchify(async () => {
|
|
5482
5481
|
last_value = fn();
|
|
5483
5482
|
if (initial_run) {
|
|
5484
5483
|
initial_run = false;
|
|
@@ -5538,7 +5537,7 @@ function $e7fce80abe608e01$export$3945d6db2dfd3d12({
|
|
|
5538
5537
|
const handler = () => allow_filter_clearing = false;
|
|
5539
5538
|
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
|
|
5540
5539
|
$9HbP8$onCleanup(() => window.removeEventListener("popstate", handler));
|
|
5541
|
-
$9HbP8$createEffect($9HbP8$on(crumb_data_, $9HbP8$
|
|
5540
|
+
$9HbP8$createEffect($9HbP8$on(crumb_data_, $9HbP8$catchify(new_crumb_data => {
|
|
5542
5541
|
const query_id_of_new_data = query_id_();
|
|
5543
5542
|
if (allow_filter_clearing && previous_crumb_data && new_crumb_data && query_id_of_new_data !== query_id_when_we_got_previous_data) {
|
|
5544
5543
|
const previous_length = previous_crumb_data.length;
|
|
@@ -5723,7 +5722,7 @@ function $df5d81d0fe61ff21$export$f7d2f673fc2f091d({
|
|
|
5723
5722
|
});
|
|
5724
5723
|
const [plp_results_] = $9HbP8$createResource(query_base_,
|
|
5725
5724
|
// 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)
|
|
5726
|
-
$9HbP8$
|
|
5725
|
+
$9HbP8$catchify(base_query => $641bba2917fe862b$export$cc42dd29bf655ab6({
|
|
5727
5726
|
id_: $9HbP8$untrack(query_id_),
|
|
5728
5727
|
scroll_restoration_data_: scroll_restoration_data_,
|
|
5729
5728
|
min_products_to_fetch_: min_products_to_fetch_,
|
|
@@ -5841,7 +5840,7 @@ function $df5d81d0fe61ff21$export$f7d2f673fc2f091d({
|
|
|
5841
5840
|
number_of_rendered_selected_filters_items_: number_of_rendered_selected_filters_items_,
|
|
5842
5841
|
...extra_sort_and_filter_args_
|
|
5843
5842
|
});
|
|
5844
|
-
$9HbP8$
|
|
5843
|
+
$9HbP8$catchify((0, $641bba2917fe862b$export$6e49da55e449af7c))({
|
|
5845
5844
|
scroll_restoration_data_: scroll_restoration_data_,
|
|
5846
5845
|
last_result_in_viewport_: last_result_in_viewport_,
|
|
5847
5846
|
id_: query_id_,
|
|
@@ -5851,7 +5850,7 @@ function $df5d81d0fe61ff21$export$f7d2f673fc2f091d({
|
|
|
5851
5850
|
$9HbP8$createComputed(() => {
|
|
5852
5851
|
if (plp_results_.loading) set_can_write_scroll_restoration(false);else if (plp_results_()) set_can_write_scroll_restoration(true);
|
|
5853
5852
|
});
|
|
5854
|
-
$9HbP8$createRenderEffect($9HbP8$
|
|
5853
|
+
$9HbP8$createRenderEffect($9HbP8$catchify(async () => {
|
|
5855
5854
|
const slim = is_slim_();
|
|
5856
5855
|
const only_show_filters_opener = only_show_filters_opener_?.();
|
|
5857
5856
|
const owner = $9HbP8$getOwner();
|
|
@@ -6097,7 +6096,7 @@ function $ccd5db07a3a069c5$export$477caf01aecaeb2a(options) {
|
|
|
6097
6096
|
const [get_selected_filters_, set_selected_filters] = selected_filters_;
|
|
6098
6097
|
const [get_has_sideways_filter_clearing_flag_, set_has_sideways_filter_clearing_flag] = sideways_filter_clearing_flag_;
|
|
6099
6098
|
const [get_current_href, set_current_href] = $9HbP8$createSignal(globalThis?.location?.href ?? "https://example.com");
|
|
6100
|
-
const history_change_handler = $9HbP8$
|
|
6099
|
+
const history_change_handler = $9HbP8$catchify(() => set_current_href(location.href));
|
|
6101
6100
|
const owner = $9HbP8$getOwner() || $9HbP8$createRoot(() => $9HbP8$getOwner());
|
|
6102
6101
|
const {
|
|
6103
6102
|
sorting_query_param_: sorting_query_param_,
|
|
@@ -6267,7 +6266,7 @@ class $4fd2ba03703a7d92$export$7e1297a3a19f10d8 {
|
|
|
6267
6266
|
* @param is_replace_ if you want to replace the current URL in history instead of pushing a new one
|
|
6268
6267
|
* @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
|
|
6269
6268
|
*/
|
|
6270
|
-
go_to_: $9HbP8$
|
|
6269
|
+
go_to_: $9HbP8$catchify(async ({
|
|
6271
6270
|
new_url_: raw_new_url,
|
|
6272
6271
|
event_: event_,
|
|
6273
6272
|
force_spa_navigation_: force_spa_navigation_,
|
|
@@ -6688,7 +6687,7 @@ const $a6e23a834336fc19$export$824dde41348efed1 = /*@__PURE__*/(() => {
|
|
|
6688
6687
|
|
|
6689
6688
|
const observe_to_signal = (element, setter) => {
|
|
6690
6689
|
const computed_style = getComputedStyle(element);
|
|
6691
|
-
const resize_observer = new ResizeObserver($9HbP8$
|
|
6690
|
+
const resize_observer = new ResizeObserver($9HbP8$catchify(() => {
|
|
6692
6691
|
setter(element.getBoundingClientRect().width + parseFloat(computed_style.marginLeft) + parseFloat(computed_style.marginRight) + parseFloat(computed_style.borderRightWidth) + parseFloat(computed_style.borderLeftWidth));
|
|
6693
6692
|
}));
|
|
6694
6693
|
resize_observer.observe(element);
|
|
@@ -6857,7 +6856,7 @@ function $897bd4a76f611b38$export$d757d54550ebfb3d({
|
|
|
6857
6856
|
_el$2 = _el$.firstChild,
|
|
6858
6857
|
_el$4 = _el$2.nextSibling,
|
|
6859
6858
|
[_el$5, _co$] = $9HbP8$getNextMarker(_el$4.nextSibling);
|
|
6860
|
-
$9HbP8$addEventListener(_el$, "click", $9HbP8$
|
|
6859
|
+
$9HbP8$addEventListener(_el$, "click", $9HbP8$catchify(e => {
|
|
6861
6860
|
router_.navigate_.go_to_({
|
|
6862
6861
|
new_url_: category_suggestion_().page_url,
|
|
6863
6862
|
is_replace_: false,
|
|
@@ -6915,7 +6914,7 @@ function $5285d2814d0fac0c$export$b94867ecbd698f21({
|
|
|
6915
6914
|
let input_element;
|
|
6916
6915
|
// This is the div where we recommend (and ourselves do) attach the event listener to that opens the search modal.
|
|
6917
6916
|
let field_div;
|
|
6918
|
-
$9HbP8$createEffect($9HbP8$
|
|
6917
|
+
$9HbP8$createEffect($9HbP8$catchify(async () => {
|
|
6919
6918
|
if (disabled_) return;
|
|
6920
6919
|
// we aren't in DOM yet unfortunately, wouldn't even be with onMount
|
|
6921
6920
|
await (0, $9HbP8$observer).wait_for_element(input_element);
|
|
@@ -6935,7 +6934,7 @@ function $5285d2814d0fac0c$export$b94867ecbd698f21({
|
|
|
6935
6934
|
when: on_back_,
|
|
6936
6935
|
get children() {
|
|
6937
6936
|
const _el$2 = $9HbP8$getNextElement($5285d2814d0fac0c$var$_tmpl$);
|
|
6938
|
-
$9HbP8$addEventListener(_el$2, "click", $9HbP8$
|
|
6937
|
+
$9HbP8$addEventListener(_el$2, "click", $9HbP8$catchify(on_back_), true);
|
|
6939
6938
|
$9HbP8$insert(_el$2, $9HbP8$createComponent((0, $22e59517c2ec94d3$export$1c641004b5485fed), {}));
|
|
6940
6939
|
$9HbP8$effect(() => $9HbP8$setAttribute(_el$2, "aria-label", i18n_.back_()));
|
|
6941
6940
|
$9HbP8$runHydrationEvents();
|
|
@@ -6951,7 +6950,7 @@ function $5285d2814d0fac0c$export$b94867ecbd698f21({
|
|
|
6951
6950
|
}) => {
|
|
6952
6951
|
// 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).
|
|
6953
6952
|
if (pointerType === "mouse") {
|
|
6954
|
-
const handler = $9HbP8$
|
|
6953
|
+
const handler = $9HbP8$catchify(({
|
|
6955
6954
|
pointerType: pointerType,
|
|
6956
6955
|
target: target
|
|
6957
6956
|
}) => {
|
|
@@ -6964,26 +6963,26 @@ function $5285d2814d0fac0c$export$b94867ecbd698f21({
|
|
|
6964
6963
|
if (owner_of_field_element) $9HbP8$runWithOwner(owner_of_field_element, () => $9HbP8$onCleanup(() => window.removeEventListener("pointerup", handler)));
|
|
6965
6964
|
}
|
|
6966
6965
|
};
|
|
6967
|
-
$9HbP8$addEventListener(_el$4, "select", $9HbP8$
|
|
6966
|
+
$9HbP8$addEventListener(_el$4, "select", $9HbP8$catchify(() => {
|
|
6968
6967
|
if (disabled_)
|
|
6969
6968
|
// 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
|
|
6970
6969
|
return;
|
|
6971
6970
|
if (input_element.selectionStart === 0 && input_element.selectionEnd === input_element.value.length)
|
|
6972
6971
|
// everything was selected, clear filters on next submit on next input
|
|
6973
|
-
input_element.addEventListener("input", $9HbP8$
|
|
6972
|
+
input_element.addEventListener("input", $9HbP8$catchify(() => clear_filters_(false)),
|
|
6974
6973
|
// We don't count this as user triggered since it wasn't explicit
|
|
6975
6974
|
{
|
|
6976
6975
|
once: true
|
|
6977
6976
|
});
|
|
6978
6977
|
}));
|
|
6979
|
-
$9HbP8$addEventListener(_el$4, "input", $9HbP8$
|
|
6978
|
+
$9HbP8$addEventListener(_el$4, "input", $9HbP8$catchify(() => {
|
|
6980
6979
|
const {
|
|
6981
6980
|
value: value
|
|
6982
6981
|
} = input_element;
|
|
6983
6982
|
if (!disabled_ && !value.length) clear_filters_(false); // if the user clears the whole field, reset filters on next submit
|
|
6984
6983
|
search_field_value_[1](value);
|
|
6985
6984
|
}), true);
|
|
6986
|
-
$9HbP8$addEventListener(_el$4, "keydown", $9HbP8$
|
|
6985
|
+
$9HbP8$addEventListener(_el$4, "keydown", $9HbP8$catchify(e => {
|
|
6987
6986
|
if (disabled_) {
|
|
6988
6987
|
if (e.key !== "Tab" && e.key !== "Shift")
|
|
6989
6988
|
// 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
|
|
@@ -6993,19 +6992,19 @@ function $5285d2814d0fac0c$export$b94867ecbd698f21({
|
|
|
6993
6992
|
if (!dont_submit) submit_query_();
|
|
6994
6993
|
}
|
|
6995
6994
|
}), true);
|
|
6996
|
-
const _ref$ = $9HbP8$
|
|
6995
|
+
const _ref$ = $9HbP8$catchify(el => {
|
|
6997
6996
|
input_element = el;
|
|
6998
6997
|
input_field_ref_?.(el);
|
|
6999
6998
|
});
|
|
7000
6999
|
typeof _ref$ === "function" && $9HbP8$use(_ref$, _el$4);
|
|
7001
7000
|
_el$4.classList.toggle("has-adjacent-back-button", !!on_back_);
|
|
7002
|
-
$9HbP8$addEventListener(_el$5, "click", $9HbP8$
|
|
7001
|
+
$9HbP8$addEventListener(_el$5, "click", $9HbP8$catchify(() => {
|
|
7003
7002
|
search_field_value_[1]("");
|
|
7004
7003
|
clear_filters_(true);
|
|
7005
7004
|
if (!disabled_) input_element.focus();
|
|
7006
7005
|
}), true);
|
|
7007
7006
|
$9HbP8$insert(_el$5, $9HbP8$createComponent((0, $19976a74d273070d$export$3b621d86b1566b2), {}));
|
|
7008
|
-
$9HbP8$addEventListener(_el$6, "click", $9HbP8$
|
|
7007
|
+
$9HbP8$addEventListener(_el$6, "click", $9HbP8$catchify(() => submit_query_()), true);
|
|
7009
7008
|
$9HbP8$insert(_el$6, $9HbP8$createComponent((0, $16f0ed5ea30d8d9c$export$82eafebb825fc23f), {}));
|
|
7010
7009
|
$9HbP8$effect(_p$ => {
|
|
7011
7010
|
const _v$ = i18n_.search_field_field_aria_label_(),
|
|
@@ -7136,7 +7135,7 @@ function $b6d5529b253681aa$export$b3ad617e9036868(modal_body_style, input_field,
|
|
|
7136
7135
|
};
|
|
7137
7136
|
let ro;
|
|
7138
7137
|
if (one_axies_only !== "top") {
|
|
7139
|
-
ro = new ResizeObserver($9HbP8$
|
|
7138
|
+
ro = new ResizeObserver($9HbP8$catchify(records => {
|
|
7140
7139
|
records.forEach(({
|
|
7141
7140
|
contentRect: {
|
|
7142
7141
|
width: width
|
|
@@ -7157,10 +7156,10 @@ function $b6d5529b253681aa$export$b3ad617e9036868(modal_body_style, input_field,
|
|
|
7157
7156
|
// "resize" doesn't fire sometimes when it should, also it doesn't when showing/hiding scrollbars which disabling scrolling does
|
|
7158
7157
|
// this works
|
|
7159
7158
|
// keeping resize just in case
|
|
7160
|
-
const resize_resize_observer = new ResizeObserver($9HbP8$
|
|
7159
|
+
const resize_resize_observer = new ResizeObserver($9HbP8$catchify(align_position));
|
|
7161
7160
|
resize_resize_observer.observe(document.documentElement);
|
|
7162
7161
|
(0, $9HbP8$observer).wait_for_element("body").then(resize_resize_observer.observe.bind(resize_resize_observer));
|
|
7163
|
-
$9HbP8$onCleanup($9HbP8$
|
|
7162
|
+
$9HbP8$onCleanup($9HbP8$catchify(() => {
|
|
7164
7163
|
ro?.disconnect();
|
|
7165
7164
|
resize_resize_observer.disconnect();
|
|
7166
7165
|
}));
|
|
@@ -7188,7 +7187,7 @@ function $48d7e4a9707315b6$export$e026af0c7b64ea5f({
|
|
|
7188
7187
|
}, {
|
|
7189
7188
|
defer: true
|
|
7190
7189
|
}));
|
|
7191
|
-
$9HbP8$createComputed($9HbP8$on(get_search_query_, $9HbP8$
|
|
7190
|
+
$9HbP8$createComputed($9HbP8$on(get_search_query_, $9HbP8$catchify(() => {
|
|
7192
7191
|
// when a query was submitted, clear filters if clear was pressed before
|
|
7193
7192
|
const clear_value = $9HbP8$untrack(get_clear_filters_next_submit);
|
|
7194
7193
|
if (clear_value) {
|
|
@@ -7213,11 +7212,11 @@ function $21f51c14cb3f586f$export$84bba84a7b837187(read_search_query) {
|
|
|
7213
7212
|
const key = "depict_searches";
|
|
7214
7213
|
const previous_searches = $9HbP8$createSignal(JSON.parse(ls[key] || "[]"));
|
|
7215
7214
|
const [read_previous_searches, write_previous_searches] = previous_searches;
|
|
7216
|
-
$9HbP8$createEffect($9HbP8$
|
|
7215
|
+
$9HbP8$createEffect($9HbP8$catchify(() => {
|
|
7217
7216
|
const json_encoded = JSON.stringify(read_previous_searches());
|
|
7218
7217
|
if (ls[key] !== json_encoded) ls[key] = json_encoded;
|
|
7219
7218
|
}));
|
|
7220
|
-
$9HbP8$createComputed($9HbP8$
|
|
7219
|
+
$9HbP8$createComputed($9HbP8$catchify(() => {
|
|
7221
7220
|
const searches = $9HbP8$untrack(read_previous_searches);
|
|
7222
7221
|
const current_query = read_search_query();
|
|
7223
7222
|
if (!current_query)
|
|
@@ -7322,7 +7321,7 @@ const $e003be2a50d9e5bc$export$b05c0ae390cf3e06 = (display_or_variant_container,
|
|
|
7322
7321
|
[_el$21, _co$6] = $9HbP8$getNextMarker(_el$20.nextSibling),
|
|
7323
7322
|
_el$22 = _el$21.nextSibling,
|
|
7324
7323
|
[_el$23, _co$7] = $9HbP8$getNextMarker(_el$22.nextSibling);
|
|
7325
|
-
$9HbP8$addEventListener(_el$, "click", $9HbP8$
|
|
7324
|
+
$9HbP8$addEventListener(_el$, "click", $9HbP8$catchify(event_ => router_.navigate_.go_to_({
|
|
7326
7325
|
new_url_: href(),
|
|
7327
7326
|
is_replace_: false,
|
|
7328
7327
|
event_: event_
|
|
@@ -7416,13 +7415,13 @@ function $eea41f703612261b$export$62f101a8aa597bf8({
|
|
|
7416
7415
|
// don't wait if it's the first request
|
|
7417
7416
|
write_current_instant_query(value);
|
|
7418
7417
|
clearTimeout(timeout);
|
|
7419
|
-
timeout = setTimeout($9HbP8$
|
|
7418
|
+
timeout = setTimeout($9HbP8$catchify(() => write_current_instant_query(value)), 250);
|
|
7420
7419
|
});
|
|
7421
7420
|
const [search_results] = $9HbP8$createResource($9HbP8$createMemo(() => ({
|
|
7422
7421
|
tenant: tenant_(),
|
|
7423
7422
|
market: market_(),
|
|
7424
7423
|
query: read_current_instant_query()
|
|
7425
|
-
})), $9HbP8$
|
|
7424
|
+
})), $9HbP8$catchify(variable_data => {
|
|
7426
7425
|
return depict_api_.query({
|
|
7427
7426
|
// 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
|
|
7428
7427
|
limit: $9HbP8$untrack(has_sort_or_filters_) ? max_cards : min_products_to_fetch_,
|
|
@@ -7500,7 +7499,7 @@ function $4ceabea39c9a56ac$export$50b90be27d8502d9(el, [get_style_props, set_sty
|
|
|
7500
7499
|
[key]: new_value
|
|
7501
7500
|
});
|
|
7502
7501
|
};
|
|
7503
|
-
const is = new IntersectionObserver($9HbP8$
|
|
7502
|
+
const is = new IntersectionObserver($9HbP8$catchify(_records => {
|
|
7504
7503
|
do_positioning();
|
|
7505
7504
|
}), {
|
|
7506
7505
|
threshold: $9HbP8$buildThresholdList(100)
|
|
@@ -7521,7 +7520,7 @@ function $a36cbc4f68bfd590$export$91c3b6774e8be0f5({
|
|
|
7521
7520
|
const [get_current_href, set_current_href] = $9HbP8$createSignal(location.href);
|
|
7522
7521
|
const [exit_iterable, exitable_iterable] = $9HbP8$make_asyncIterable_exiter((0, $9HbP8$href_change_ipns));
|
|
7523
7522
|
$9HbP8$onCleanup(exit_iterable);
|
|
7524
|
-
$9HbP8$
|
|
7523
|
+
$9HbP8$catchify(async () => {
|
|
7525
7524
|
for await (const href of exitable_iterable)
|
|
7526
7525
|
// use native links so ppl can cmdclick/right click and open in new tab and see target URL
|
|
7527
7526
|
set_current_href(href);
|
|
@@ -7591,18 +7590,18 @@ function $7ad3a93cbe6fa208$export$a146ac6fa8346a25({
|
|
|
7591
7590
|
_el$9 = _el$5.nextSibling;
|
|
7592
7591
|
$9HbP8$use(element => element.addEventListener(
|
|
7593
7592
|
// 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.
|
|
7594
|
-
"click", $9HbP8$
|
|
7593
|
+
"click", $9HbP8$catchify(ev => {
|
|
7595
7594
|
if (ev.button || ev.metaKey || ev.ctrlKey)
|
|
7596
7595
|
// not button 0 or cmd/ctrl click
|
|
7597
7596
|
return;
|
|
7598
7597
|
ev.preventDefault();
|
|
7599
7598
|
submit_query_(item());
|
|
7600
7599
|
})), _el$4);
|
|
7601
|
-
$9HbP8$addEventListener(_el$4, "mouseleave", $9HbP8$
|
|
7602
|
-
$9HbP8$addEventListener(_el$4, "mouseenter", $9HbP8$
|
|
7600
|
+
$9HbP8$addEventListener(_el$4, "mouseleave", $9HbP8$catchify(() => write_selected_index_(undefined)));
|
|
7601
|
+
$9HbP8$addEventListener(_el$4, "mouseenter", $9HbP8$catchify(() => write_selected_index_([0, index])));
|
|
7603
7602
|
$9HbP8$insert(_el$5, $9HbP8$createComponent((0, $694b7f90501fea4c$export$5d2caaa6b530761c), {}), _el$8, _co$);
|
|
7604
7603
|
$9HbP8$insert(_el$6, item);
|
|
7605
|
-
$9HbP8$use(element => element.addEventListener("click", $9HbP8$
|
|
7604
|
+
$9HbP8$use(element => element.addEventListener("click", $9HbP8$catchify(e => {
|
|
7606
7605
|
// 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.
|
|
7607
7606
|
set_unfiltered_previous_searches_(prev => {
|
|
7608
7607
|
const new_value = [...prev];
|
|
@@ -7772,7 +7771,7 @@ function $cea52f6b24092f05$export$e872e2339fb04a7f({
|
|
|
7772
7771
|
const is_selected = $9HbP8$createMemo(() => read_selected_index_()?.[0] === autocomplete_data_index && read_selected_index_()?.[1] === index);
|
|
7773
7772
|
return (() => {
|
|
7774
7773
|
const _el$ = $9HbP8$getNextElement($cea52f6b24092f05$var$_tmpl$);
|
|
7775
|
-
$9HbP8$use(element => element.addEventListener("click", $9HbP8$
|
|
7774
|
+
$9HbP8$use(element => element.addEventListener("click", $9HbP8$catchify(ev => {
|
|
7776
7775
|
// 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.
|
|
7777
7776
|
if (is_query()) {
|
|
7778
7777
|
if (ev.button || ev.metaKey || ev.ctrlKey)
|
|
@@ -7788,8 +7787,8 @@ function $cea52f6b24092f05$export$e872e2339fb04a7f({
|
|
|
7788
7787
|
event_: ev
|
|
7789
7788
|
});
|
|
7790
7789
|
})), _el$);
|
|
7791
|
-
$9HbP8$addEventListener(_el$, "mouseleave", $9HbP8$
|
|
7792
|
-
$9HbP8$addEventListener(_el$, "mouseenter", $9HbP8$
|
|
7790
|
+
$9HbP8$addEventListener(_el$, "mouseleave", $9HbP8$catchify(() => write_selected_index_(undefined)));
|
|
7791
|
+
$9HbP8$addEventListener(_el$, "mouseenter", $9HbP8$catchify(() => write_selected_index_([autocomplete_data_index, index])));
|
|
7793
7792
|
$9HbP8$insert(_el$, (() => {
|
|
7794
7793
|
const _c$ = $9HbP8$memo(() => !!is_query());
|
|
7795
7794
|
return () => _c$() ? [$9HbP8$createComponent((0, $9HbP8$Show), {
|
|
@@ -8078,7 +8077,7 @@ function $15f380f0ce2812cc$var$actual_navigation_working_on_fake_data({
|
|
|
8078
8077
|
if (!$9HbP8$untrack(() => read_updating_blocked())) previous_value = sfv;
|
|
8079
8078
|
});
|
|
8080
8079
|
const owner = $9HbP8$getOwner();
|
|
8081
|
-
const handler = $9HbP8$
|
|
8080
|
+
const handler = $9HbP8$catchify(({
|
|
8082
8081
|
keyCode: keyCode
|
|
8083
8082
|
}) => $9HbP8$untrack(() => {
|
|
8084
8083
|
const up = keyCode === 38;
|
|
@@ -8138,7 +8137,7 @@ function $15f380f0ce2812cc$var$actual_navigation_working_on_fake_data({
|
|
|
8138
8137
|
const el = element_();
|
|
8139
8138
|
if (!el) return;
|
|
8140
8139
|
el.addEventListener("keyup", handler);
|
|
8141
|
-
$9HbP8$onCleanup($9HbP8$
|
|
8140
|
+
$9HbP8$onCleanup($9HbP8$catchify(() => el.removeEventListener("keyup", handler)));
|
|
8142
8141
|
});
|
|
8143
8142
|
}
|
|
8144
8143
|
function $1ae0eaca6ada9753$export$af0124069c150252({
|
|
@@ -8336,7 +8335,7 @@ function $c64d28ca12452b21$export$3340fdd8259bd4fd({
|
|
|
8336
8335
|
if (process.env.GA === "false") return;
|
|
8337
8336
|
let debounce_timeout;
|
|
8338
8337
|
const stop_timeout = () => clearTimeout(debounce_timeout);
|
|
8339
|
-
const send_to_ga = $9HbP8$
|
|
8338
|
+
const send_to_ga = $9HbP8$catchify(() => {
|
|
8340
8339
|
const fake_url = new URL(location.href);
|
|
8341
8340
|
const {
|
|
8342
8341
|
searchParams: searchParams
|
|
@@ -8349,12 +8348,12 @@ function $c64d28ca12452b21$export$3340fdd8259bd4fd({
|
|
|
8349
8348
|
$9HbP8$onCleanup(() => {
|
|
8350
8349
|
setTimeout(
|
|
8351
8350
|
// 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
|
|
8352
|
-
$9HbP8$
|
|
8351
|
+
$9HbP8$catchify(() => {
|
|
8353
8352
|
if ($9HbP8$untrack(get_search_query_) === $9HbP8$untrack(get_search_field_value_)) stop_timeout();
|
|
8354
8353
|
}));
|
|
8355
8354
|
});
|
|
8356
8355
|
let first_call = true;
|
|
8357
|
-
$9HbP8$createEffect($9HbP8$
|
|
8356
|
+
$9HbP8$createEffect($9HbP8$catchify(() => {
|
|
8358
8357
|
get_search_field_value_();
|
|
8359
8358
|
if (first_call) {
|
|
8360
8359
|
// we only want to do stuff when it changes
|
|
@@ -8428,7 +8427,7 @@ function $fabfda1230351b1a$export$1c593cbd6f1e10bc({
|
|
|
8428
8427
|
const [input_field, set_input_field] = $9HbP8$createSignal();
|
|
8429
8428
|
const [get_search_field_value_] = search_field_value_;
|
|
8430
8429
|
const [get_modal_search_results, set_modal_search_results_] = $9HbP8$createSignal();
|
|
8431
|
-
const close_on_escape_handler = $9HbP8$
|
|
8430
|
+
const close_on_escape_handler = $9HbP8$catchify(({
|
|
8432
8431
|
key: key
|
|
8433
8432
|
}) => {
|
|
8434
8433
|
if (key === "Escape") close_modal_();
|
|
@@ -8442,7 +8441,7 @@ function $fabfda1230351b1a$export$1c593cbd6f1e10bc({
|
|
|
8442
8441
|
const DiscoverMoreSection = () => (() => {
|
|
8443
8442
|
const _el$ = $9HbP8$getNextElement($fabfda1230351b1a$var$_tmpl$),
|
|
8444
8443
|
_el$2 = _el$.firstChild;
|
|
8445
|
-
$9HbP8$addEventListener(_el$2, "click", $9HbP8$
|
|
8444
|
+
$9HbP8$addEventListener(_el$2, "click", $9HbP8$catchify(() => submit_query_()), true);
|
|
8446
8445
|
$9HbP8$insert(_el$2, (() => {
|
|
8447
8446
|
const _c$ = $9HbP8$memo(() => !!get_search_field_value_());
|
|
8448
8447
|
return () => _c$() ? i18n_.modal_view_all_results_()((() => {
|
|
@@ -8457,7 +8456,7 @@ function $fabfda1230351b1a$export$1c593cbd6f1e10bc({
|
|
|
8457
8456
|
if (disable_scrolling_) $aea1edf92433e81e$export$fe334901e8bebd57();
|
|
8458
8457
|
$fabfda1230351b1a$var$close_modal_when_navigating_away(close_modal_, search_query_url_param_name_);
|
|
8459
8458
|
window.addEventListener("keydown", close_on_escape_handler);
|
|
8460
|
-
$9HbP8$onCleanup($9HbP8$
|
|
8459
|
+
$9HbP8$onCleanup($9HbP8$catchify(() => window.removeEventListener("keydown", close_on_escape_handler)));
|
|
8461
8460
|
if (closing_animation_) register_closing_animation_(closing_animation_);
|
|
8462
8461
|
$c64d28ca12452b21$export$3340fdd8259bd4fd({
|
|
8463
8462
|
get_search_field_value_: get_search_field_value_,
|
|
@@ -8509,13 +8508,13 @@ function $fabfda1230351b1a$export$1c593cbd6f1e10bc({
|
|
|
8509
8508
|
[_el$16, _co$5] = $9HbP8$getNextMarker(_el$15.nextSibling),
|
|
8510
8509
|
_el$17 = _el$5.nextSibling,
|
|
8511
8510
|
[_el$18, _co$6] = $9HbP8$getNextMarker(_el$17.nextSibling);
|
|
8512
|
-
$9HbP8$addEventListener(_el$4, "click", $9HbP8$
|
|
8511
|
+
$9HbP8$addEventListener(_el$4, "click", $9HbP8$catchify(({
|
|
8513
8512
|
target: target
|
|
8514
8513
|
}) => {
|
|
8515
8514
|
if (target === modal_element) close_modal_();
|
|
8516
8515
|
}), true);
|
|
8517
8516
|
$9HbP8$insert(_el$5, search_field, _el$14, _co$4);
|
|
8518
|
-
$9HbP8$use(el => $9HbP8$
|
|
8517
|
+
$9HbP8$use(el => $9HbP8$catchify((0, $4ceabea39c9a56ac$export$50b90be27d8502d9))(el, style_props_, bottom_distance_under_modal_), _el$6);
|
|
8519
8518
|
$9HbP8$insert(_el$6, $9HbP8$createComponent((0, $b7436a6d1fd64e3b$export$b69d0d92862de18b), {
|
|
8520
8519
|
severity_: "error",
|
|
8521
8520
|
message_: "Autocomplete/suggestions failed",
|
|
@@ -8614,8 +8613,8 @@ function $fabfda1230351b1a$var$close_modal_when_navigating_away(close_modal, sea
|
|
|
8614
8613
|
let set_initial_values = false;
|
|
8615
8614
|
let old_pathname;
|
|
8616
8615
|
let old_param_value;
|
|
8617
|
-
$9HbP8$onCleanup($9HbP8$
|
|
8618
|
-
$9HbP8$
|
|
8616
|
+
$9HbP8$onCleanup($9HbP8$catchify(exit_iterable));
|
|
8617
|
+
$9HbP8$catchify(async () => {
|
|
8619
8618
|
for await (const href of exitable_iterable) {
|
|
8620
8619
|
const u_o = new URL(href);
|
|
8621
8620
|
const new_pathname = u_o.pathname;
|
|
@@ -8687,7 +8686,7 @@ function $f8c929beb82c512b$export$9dd50d35b9d94fdf({
|
|
|
8687
8686
|
number_of_results_: number_of_results_,
|
|
8688
8687
|
type: type
|
|
8689
8688
|
}) {
|
|
8690
|
-
const contents = $9HbP8$createMemo($9HbP8$
|
|
8689
|
+
const contents = $9HbP8$createMemo($9HbP8$catchify(() => {
|
|
8691
8690
|
const q = get_search_query_();
|
|
8692
8691
|
return i18n_[type === $f8c929beb82c512b$export$2452208c79fe93ea.content ? "get_showing_pages_for_" : "get_showing_results_for_"]()((() => {
|
|
8693
8692
|
const _el$ = $9HbP8$getNextElement($f8c929beb82c512b$var$_tmpl$);
|
|
@@ -8961,7 +8960,7 @@ function $b2bf2cdcff8142d8$export$f631859cab12b342({
|
|
|
8961
8960
|
if (!result) return;
|
|
8962
8961
|
return {
|
|
8963
8962
|
href: result.page_url,
|
|
8964
|
-
onClick: $9HbP8$
|
|
8963
|
+
onClick: $9HbP8$catchify(ev => router_.navigate_.go_to_({
|
|
8965
8964
|
new_url_: result.page_url,
|
|
8966
8965
|
is_replace_: false,
|
|
8967
8966
|
event_: ev
|
|
@@ -9267,7 +9266,7 @@ function $7097477c78a89208$export$a54ec244c8863715({
|
|
|
9267
9266
|
} : {})
|
|
9268
9267
|
};
|
|
9269
9268
|
});
|
|
9270
|
-
const [search_results_] = $9HbP8$createResource(search_query_base_, $9HbP8$
|
|
9269
|
+
const [search_results_] = $9HbP8$createResource(search_query_base_, $9HbP8$catchify(async base_query => {
|
|
9271
9270
|
set_all_products_loaded(false);
|
|
9272
9271
|
// only first page of results
|
|
9273
9272
|
return await $641bba2917fe862b$export$cc42dd29bf655ab6({
|
|
@@ -9295,7 +9294,7 @@ function $7097477c78a89208$export$a54ec244c8863715({
|
|
|
9295
9294
|
const available_filters_ = $9HbP8$createMemo(() => search_results_()?.filters);
|
|
9296
9295
|
const modal_body_style = $9HbP8$createSignal({});
|
|
9297
9296
|
const [get_search_field_elements, set_search_field_elements] = $9HbP8$createSignal();
|
|
9298
|
-
const SafeSearchField = $9HbP8$
|
|
9297
|
+
const SafeSearchField = $9HbP8$catchify((0, $5285d2814d0fac0c$export$b94867ecbd698f21));
|
|
9299
9298
|
const [sort_or_filter_open_, set_sort_or_filter_open_] = $9HbP8$createSignal(false);
|
|
9300
9299
|
const [desktop_filter_elements_, set_desktop_filter_elements] = $9HbP8$createSignal();
|
|
9301
9300
|
const n_hits = $9HbP8$createMemo(() => search_results_()?.n_hits);
|
|
@@ -9352,7 +9351,7 @@ function $7097477c78a89208$export$a54ec244c8863715({
|
|
|
9352
9351
|
})()));
|
|
9353
9352
|
}).remove);
|
|
9354
9353
|
$2ab89d64b7f1d5ef$export$d31a1a1a83ad9413(search_results_, selected_filters_);
|
|
9355
|
-
$9HbP8$
|
|
9354
|
+
$9HbP8$catchify((0, $641bba2917fe862b$export$6e49da55e449af7c))({
|
|
9356
9355
|
scroll_restoration_data_: scroll_restoration_data_,
|
|
9357
9356
|
last_result_in_viewport_: last_result_in_viewport_,
|
|
9358
9357
|
id_: get_search_query_,
|
|
@@ -9390,8 +9389,8 @@ function $7097477c78a89208$export$a54ec244c8863715({
|
|
|
9390
9389
|
if (!search_field) break add_input_field;
|
|
9391
9390
|
modal_body_style[1]({});
|
|
9392
9391
|
modal_body_style_ref_?.(modal_body_style);
|
|
9393
|
-
const align_position = $9HbP8$
|
|
9394
|
-
div_with_field_class.addEventListener("click", $9HbP8$
|
|
9392
|
+
const align_position = $9HbP8$catchify((0, $b6d5529b253681aa$export$b3ad617e9036868))(modal_body_style, search_field, undefined, true);
|
|
9393
|
+
div_with_field_class.addEventListener("click", $9HbP8$catchify(e => {
|
|
9395
9394
|
const target = e.target;
|
|
9396
9395
|
const sel = ".submit";
|
|
9397
9396
|
if (target?.matches?.(sel) || target?.closest?.(sel))
|
|
@@ -9583,7 +9582,7 @@ function $7097477c78a89208$export$a54ec244c8863715({
|
|
|
9583
9582
|
function $4ca91518c9a35379$export$828dcdd425fd3231(aligner) {
|
|
9584
9583
|
const style_element = document.createElement("style");
|
|
9585
9584
|
document.head.append(style_element);
|
|
9586
|
-
const resize_observer = new ResizeObserver($9HbP8$
|
|
9585
|
+
const resize_observer = new ResizeObserver($9HbP8$catchify(() => {
|
|
9587
9586
|
const styles = $926b1b5ba2239356$export$1233ca167bf71f9a({
|
|
9588
9587
|
".depict.plp .depict-search-modal .search-field": {
|
|
9589
9588
|
"height": `${aligner?.clientHeight}px`
|
|
@@ -9746,7 +9745,7 @@ class $806c97b931758897$export$ac6237957a15b3f0 {
|
|
|
9746
9745
|
selected_filters_: selected_filters_
|
|
9747
9746
|
});
|
|
9748
9747
|
$90980bd87c9960f9$export$5162a71f252e6122();
|
|
9749
|
-
$9HbP8$
|
|
9748
|
+
$9HbP8$catchify(async () => {
|
|
9750
9749
|
const {
|
|
9751
9750
|
open_modal_: open_modal_,
|
|
9752
9751
|
close_modal_: close_modal_
|
|
@@ -10013,7 +10012,7 @@ function $806c97b931758897$export$316f6f283ae64765(props) {
|
|
|
10013
10012
|
const style_props_ = $9HbP8$createSignal({
|
|
10014
10013
|
position: "fixed"
|
|
10015
10014
|
});
|
|
10016
|
-
const defaultHandler = $9HbP8$
|
|
10015
|
+
const defaultHandler = $9HbP8$catchify(() => {
|
|
10017
10016
|
// 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.
|
|
10018
10017
|
const selected_text_range_ = [input_element.selectionStart, input_element.selectionEnd];
|
|
10019
10018
|
const {
|
|
@@ -10105,7 +10104,7 @@ const $6891c018a834cfdd$export$d86a33413558014e = openModalParams => {
|
|
|
10105
10104
|
}, dispose_aligner];
|
|
10106
10105
|
};
|
|
10107
10106
|
function $6e8944558258054f$export$d0596b5cae35ad4(open_search) {
|
|
10108
|
-
const handler = $9HbP8$
|
|
10107
|
+
const handler = $9HbP8$catchify(e => {
|
|
10109
10108
|
const {
|
|
10110
10109
|
key: key,
|
|
10111
10110
|
target: target
|
|
@@ -10124,7 +10123,7 @@ function $6e8944558258054f$export$d0596b5cae35ad4(open_search) {
|
|
|
10124
10123
|
function $6936724b9e0b98d5$export$689e204eadb33baf(pr) {
|
|
10125
10124
|
let old_url;
|
|
10126
10125
|
let disconnect_link_observer;
|
|
10127
|
-
const link_handler = $9HbP8$
|
|
10126
|
+
const link_handler = $9HbP8$catchify(e => {
|
|
10128
10127
|
const link = e.currentTarget || e.target;
|
|
10129
10128
|
if (link.href === old_url) {
|
|
10130
10129
|
history.pushState(history.state, "", link.href);
|
|
@@ -10133,7 +10132,7 @@ function $6936724b9e0b98d5$export$689e204eadb33baf(pr) {
|
|
|
10133
10132
|
});
|
|
10134
10133
|
let remove_added_listeners;
|
|
10135
10134
|
let resolve_remove_added_listeners;
|
|
10136
|
-
pr.addEventListener("open", $9HbP8$
|
|
10135
|
+
pr.addEventListener("open", $9HbP8$catchify(() => {
|
|
10137
10136
|
remove_added_listeners = new Promise(r => resolve_remove_added_listeners = r);
|
|
10138
10137
|
disconnect_link_observer = (0, $9HbP8$observer).onexists("a", async ({
|
|
10139
10138
|
element: element
|
|
@@ -10143,11 +10142,11 @@ function $6936724b9e0b98d5$export$689e204eadb33baf(pr) {
|
|
|
10143
10142
|
element.removeEventListener("click", link_handler);
|
|
10144
10143
|
});
|
|
10145
10144
|
}));
|
|
10146
|
-
pr.addEventListener("close", $9HbP8$
|
|
10145
|
+
pr.addEventListener("close", $9HbP8$catchify(() => {
|
|
10147
10146
|
disconnect_link_observer?.();
|
|
10148
10147
|
resolve_remove_added_listeners?.();
|
|
10149
10148
|
}));
|
|
10150
|
-
$9HbP8$
|
|
10149
|
+
$9HbP8$catchify(async () => {
|
|
10151
10150
|
for await (const href of (0, $9HbP8$href_change_ipns)) if (!pr.is_page_(new URL(href))) old_url = href;
|
|
10152
10151
|
})();
|
|
10153
10152
|
}
|
|
@@ -10159,7 +10158,7 @@ class $753e9b2889a47c89$export$3ccaa27d81dd8556 extends EventTarget {
|
|
|
10159
10158
|
static #reverting_permitted = true;
|
|
10160
10159
|
static #visited_urls = (() => {
|
|
10161
10160
|
// 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).
|
|
10162
|
-
$9HbP8$
|
|
10161
|
+
$9HbP8$catchify(async () => {
|
|
10163
10162
|
// Static initialization blocks aren't supported in MobileSafari yet, otherwise this would be one.
|
|
10164
10163
|
// 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).
|
|
10165
10164
|
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes/Static_initialization_blocks
|
|
@@ -10177,7 +10176,7 @@ class $753e9b2889a47c89$export$3ccaa27d81dd8556 extends EventTarget {
|
|
|
10177
10176
|
async #listen() {
|
|
10178
10177
|
const [exit_ipns, exitable_ipns] = $9HbP8$make_asyncIterable_exiter((0, $9HbP8$href_change_ipns));
|
|
10179
10178
|
this.#stop_listening = exit_ipns;
|
|
10180
|
-
const caught_page_check_fn = $9HbP8$
|
|
10179
|
+
const caught_page_check_fn = $9HbP8$catchify(this.is_page_, "page check failed");
|
|
10181
10180
|
for await (const href of exitable_ipns) {
|
|
10182
10181
|
const url = new URL(href);
|
|
10183
10182
|
if (!caught_page_check_fn(url)) {
|
|
@@ -10195,17 +10194,17 @@ class $753e9b2889a47c89$export$3ccaa27d81dd8556 extends EventTarget {
|
|
|
10195
10194
|
this.addEventListener("close", dispose, {
|
|
10196
10195
|
once: true
|
|
10197
10196
|
});
|
|
10198
|
-
return $9HbP8$
|
|
10197
|
+
return $9HbP8$catchify(this.render_, "rendering failed")() || [];
|
|
10199
10198
|
});
|
|
10200
10199
|
}
|
|
10201
|
-
#unload = $9HbP8$
|
|
10200
|
+
#unload = $9HbP8$catchify(() => {
|
|
10202
10201
|
if (!this.#is_open) return;
|
|
10203
10202
|
this.#disconnect_observer?.();
|
|
10204
10203
|
if ($753e9b2889a47c89$export$3ccaa27d81dd8556.#reverting_permitted) while (this.#revert_fns.length) this.#revert_fns.pop()?.();
|
|
10205
10204
|
this.#is_open = false;
|
|
10206
10205
|
this.dispatchEvent(new CustomEvent("close"));
|
|
10207
10206
|
}, "failed to close page");
|
|
10208
|
-
#load = $9HbP8$
|
|
10207
|
+
#load = $9HbP8$catchify(async els => {
|
|
10209
10208
|
this.#is_open = true;
|
|
10210
10209
|
// So that #load doesn't get called again
|
|
10211
10210
|
let set_should_stay_inserted;
|