@depict-ai/ui 4.7.24 → 4.7.26
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 +105 -33
- package/ES10/index.d.ts +5 -1
- package/ES10/index.js +323 -252
- package/latest/index.cjs +105 -33
- package/latest/index.d.ts +5 -1
- package/latest/index.js +323 -252
- package/package.json +1 -1
- package/server/ES10/index.cjs +76 -20
- package/server/ES10/index.d.ts +5 -1
- package/server/ES10/index.js +212 -157
- package/server/latest/index.cjs +76 -20
- package/server/latest/index.d.ts +5 -1
- package/server/latest/index.js +212 -157
package/ES10/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { add_to_version_info as $8tj43$add_to_version_info, slider_fading_factory as $8tj43$slider_fading_factory, Amazing_Slider as $8tj43$Amazing_Slider, slider_snap_css as $8tj43$slider_snap_css, catchify as $8tj43$
|
|
2
|
-
import {
|
|
1
|
+
import { add_to_version_info as $8tj43$add_to_version_info, slider_fading_factory as $8tj43$slider_fading_factory, Amazing_Slider as $8tj43$Amazing_Slider, slider_snap_css as $8tj43$slider_snap_css, catchify as $8tj43$catchify1, dlog as $8tj43$dlog1, camelCasifyObject as $8tj43$camelCasifyObject, useExpandingContainer as $8tj43$useExpandingContainer, fetch_retry as $8tj43$fetch_retry, base_url as $8tj43$base_url, dwarn as $8tj43$dwarn, slider_fractional_factory as $8tj43$slider_fractional_factory, make_random_classname as $8tj43$make_random_classname, 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, report as $8tj43$report, observer as $8tj43$observer, javascript_media_query as $8tj43$javascript_media_query, queueMacroTask as $8tj43$queueMacroTask, findMostFrequentItem as $8tj43$findMostFrequentItem, standard_price_format as $8tj43$standard_price_format, instant_exec_on_suspect_history_change as $8tj43$instant_exec_on_suspect_history_change, deparallelize_no_drop as $8tj43$deparallelize_no_drop, ContainedImage as $8tj43$ContainedImage, buildThresholdList as $8tj43$buildThresholdList, make_asyncIterable_exiter as $8tj43$make_asyncIterable_exiter, href_change_ipns as $8tj43$href_change_ipns, base64_encode_unicode as $8tj43$base64_encode_unicode, base64_decode_unicode as $8tj43$base64_decode_unicode, use_href_accessor as $8tj43$use_href_accessor, get_session_id as $8tj43$get_session_id, add_version_query_params as $8tj43$add_version_query_params, hex_to_rgb as $8tj43$hex_to_rgb, relative_luminance_from_rgb as $8tj43$relative_luminance_from_rgb, snakeCasifyObject as $8tj43$snakeCasifyObject, make_url_with_query_params as $8tj43$make_url_with_query_params, sort_obj as $8tj43$sort_obj, insert_surfaces as $8tj43$insert_surfaces, is_debug as $8tj43$is_debug } from "@depict-ai/utilishared/ES10";
|
|
2
|
+
import { dlog as $8tj43$dlog, catchify as $8tj43$catchify, ListenableSet as $8tj43$ListenableSet, use_href_accessor as $8tj43$use_href_accessor1, queueMacroTask as $8tj43$queueMacroTask1, report as $8tj43$report1 } from "@depict-ai/utilishared/ES10";
|
|
3
|
+
import { createRoot as $8tj43$createRoot, createSignal as $8tj43$createSignal, createEffect as $8tj43$createEffect, onCleanup as $8tj43$onCleanup, createContext as $8tj43$createContext, Show as $8tj43$Show, useContext as $8tj43$useContext, createMemo as $8tj43$createMemo, untrack as $8tj43$untrack, For as $8tj43$For, getOwner as $8tj43$getOwner, createResource as $8tj43$createResource, runWithOwner as $8tj43$runWithOwner, mergeProps as $8tj43$mergeProps1, Suspense as $8tj43$Suspense, createRenderEffect as $8tj43$createRenderEffect, Index as $8tj43$Index, createUniqueId as $8tj43$createUniqueId, createComputed as $8tj43$createComputed, ErrorBoundary as $8tj43$ErrorBoundary, splitProps as $8tj43$splitProps, on as $8tj43$on, batch as $8tj43$batch, createSelector as $8tj43$createSelector, children as $8tj43$children, createReaction as $8tj43$createReaction, mapArray as $8tj43$mapArray } from "solid-js";
|
|
3
4
|
import { template as $8tj43$template, getNextElement as $8tj43$getNextElement, insert as $8tj43$insert, createComponent as $8tj43$createComponent, isServer as $8tj43$isServer, effect as $8tj43$effect, setAttribute as $8tj43$setAttribute, mergeProps as $8tj43$mergeProps, className as $8tj43$className, spread as $8tj43$spread, runHydrationEvents as $8tj43$runHydrationEvents, addEventListener as $8tj43$addEventListener, memo as $8tj43$memo, delegateEvents as $8tj43$delegateEvents, getNextMarker as $8tj43$getNextMarker, classList as $8tj43$classList, use as $8tj43$use, style as $8tj43$style, setProperty as $8tj43$setProperty, Dynamic as $8tj43$Dynamic } from "solid-js/web";
|
|
4
5
|
import $8tj43$babelruntimehelpersdefineProperty from "@babel/runtime/helpers/defineProperty";
|
|
5
|
-
import { ListenableSet as $8tj43$ListenableSet, catchify as $8tj43$catchify1, use_href_accessor as $8tj43$use_href_accessor1, queueMacroTask as $8tj43$queueMacroTask1, report as $8tj43$report1 } from "@depict-ai/utilishared/ES10";
|
|
6
6
|
import $8tj43$babelruntimehelpersclassPrivateFieldSet from "@babel/runtime/helpers/classPrivateFieldSet";
|
|
7
7
|
import $8tj43$babelruntimehelpersclassPrivateFieldGet from "@babel/runtime/helpers/classPrivateFieldGet";
|
|
8
8
|
import { createStore as $8tj43$createStore, reconcile as $8tj43$reconcile } from "solid-js/store";
|
|
@@ -10,7 +10,61 @@ import { createStore as $8tj43$createStore, reconcile as $8tj43$reconcile } from
|
|
|
10
10
|
/*! Depict.ai search and product listing SDK */
|
|
11
11
|
import { register_es_version } from "../multi_import_deduplicator.mjs";
|
|
12
12
|
register_es_version("ui", "ES10");
|
|
13
|
-
const $8db9a15135765c11$export$83d89fbfd8236492 = "4.7.
|
|
13
|
+
const $8db9a15135765c11$export$83d89fbfd8236492 = "4.7.26";
|
|
14
|
+
let $715f7f2e53146662$var$elementsHoveredSignal;
|
|
15
|
+
let $715f7f2e53146662$var$consumersSignal;
|
|
16
|
+
function $715f7f2e53146662$export$d4d96868197be50e() {
|
|
17
|
+
if (!$715f7f2e53146662$var$elementsHoveredSignal || !$715f7f2e53146662$var$consumersSignal) $8tj43$createRoot(dispose => {
|
|
18
|
+
$715f7f2e53146662$var$elementsHoveredSignal = $8tj43$createSignal(new Set());
|
|
19
|
+
$715f7f2e53146662$var$consumersSignal = $8tj43$createSignal(0);
|
|
20
|
+
const [consumers] = $715f7f2e53146662$var$consumersSignal;
|
|
21
|
+
// No matter how often useMobileHover is called, only add one listener and get hovered elements once per touchmove event, for efficiency
|
|
22
|
+
$715f7f2e53146662$var$doHeavyCalculations();
|
|
23
|
+
$8tj43$createEffect(() => {
|
|
24
|
+
// No-one needs information anymore, stop listening
|
|
25
|
+
const users = consumers();
|
|
26
|
+
if (users < 1) {
|
|
27
|
+
$8tj43$dlog("Stopping to listen for mobile hover");
|
|
28
|
+
dispose();
|
|
29
|
+
$715f7f2e53146662$var$elementsHoveredSignal = undefined;
|
|
30
|
+
$715f7f2e53146662$var$consumersSignal = undefined;
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
});
|
|
34
|
+
const [elementsHovered] = $715f7f2e53146662$var$elementsHoveredSignal;
|
|
35
|
+
const [, setConsumers] = $715f7f2e53146662$var$consumersSignal;
|
|
36
|
+
setConsumers(prev => prev + 1);
|
|
37
|
+
$8tj43$onCleanup(() => setConsumers(prev => prev - 1));
|
|
38
|
+
return elementsHovered;
|
|
39
|
+
}
|
|
40
|
+
function $715f7f2e53146662$var$doHeavyCalculations() {
|
|
41
|
+
$8tj43$dlog("Starting to listen for mobile hover");
|
|
42
|
+
const [, setElementsHovered] = $715f7f2e53146662$var$elementsHoveredSignal;
|
|
43
|
+
const elementAtTouch = new Map();
|
|
44
|
+
const updateSet = () => setElementsHovered(new Set([...elementAtTouch.values()].filter(v => v)));
|
|
45
|
+
const setPositionHandler = $8tj43$catchify(evt => {
|
|
46
|
+
for (const touch of evt.changedTouches) elementAtTouch.set(touch.identifier, document.elementFromPoint(touch.clientX, touch.clientY));
|
|
47
|
+
updateSet();
|
|
48
|
+
});
|
|
49
|
+
const deleteTouchHandler = $8tj43$catchify(evt => {
|
|
50
|
+
for (const touch of evt.changedTouches) elementAtTouch.delete(touch.identifier);
|
|
51
|
+
updateSet();
|
|
52
|
+
});
|
|
53
|
+
addEventListener("touchstart", setPositionHandler, {
|
|
54
|
+
passive: true
|
|
55
|
+
});
|
|
56
|
+
addEventListener("touchend", deleteTouchHandler, {
|
|
57
|
+
passive: true
|
|
58
|
+
});
|
|
59
|
+
addEventListener("touchcancel", deleteTouchHandler, {
|
|
60
|
+
passive: true
|
|
61
|
+
});
|
|
62
|
+
$8tj43$onCleanup(() => {
|
|
63
|
+
removeEventListener("touchstart", setPositionHandler);
|
|
64
|
+
removeEventListener("touchend", deleteTouchHandler);
|
|
65
|
+
removeEventListener("touchcancel", deleteTouchHandler);
|
|
66
|
+
});
|
|
67
|
+
}
|
|
14
68
|
function $a35e6f680c5bbc60$export$54299a3c81f5425() {
|
|
15
69
|
const d = document;
|
|
16
70
|
const [isVisible, setIsVisible] = $8tj43$createSignal(d.visibilityState !== "hidden");
|
|
@@ -286,7 +340,7 @@ function $2d7bad8684bc7f44$export$43f0fb951fcb0c54(_ref) {
|
|
|
286
340
|
} catch (e) {
|
|
287
341
|
if (!$2d7bad8684bc7f44$var$printedCloneError) {
|
|
288
342
|
$2d7bad8684bc7f44$var$printedCloneError = true;
|
|
289
|
-
$8tj43$
|
|
343
|
+
$8tj43$dlog1("Can't clone display", display, " (uncloneable objects in it), make sure you don't mutate it in the template since we cache.", e);
|
|
290
344
|
}
|
|
291
345
|
}
|
|
292
346
|
let renderingResult;
|
|
@@ -386,7 +440,7 @@ function $618bd53ea0a41cd4$export$4a14175d33d81a96(_ref) {
|
|
|
386
440
|
};
|
|
387
441
|
// The following sets up an intersection observer to determine which results are in the viewport, used for the ScrollStatus indicator, knowing when to load more and any other consumer of the useProductCardIsVisible hook.
|
|
388
442
|
const shouldObserve = $8tj43$createMemo(() => alwaysObserveCards_ || listenersForIntersecting() > 0);
|
|
389
|
-
const intersection_observer = new IntersectionObserver($8tj43$
|
|
443
|
+
const intersection_observer = new IntersectionObserver($8tj43$catchify1(records => {
|
|
390
444
|
const intersectingValue = currentlyIntersecting();
|
|
391
445
|
for (let i = 0; i < records.length; i++) {
|
|
392
446
|
const record = records[i];
|
|
@@ -755,7 +809,7 @@ function $63f1f8dbcd07d3b0$export$445d8d3f5f706a40(props, container_element) {
|
|
|
755
809
|
const view_less_button_class = "l" + $8tj43$createUniqueId(); // https://github.com/solidjs/solid-docs/issues/263#issuecomment-1622388079
|
|
756
810
|
const view_more_button_container = $8tj43$createMemo(() => have_a_view_more_button() && (() => {
|
|
757
811
|
var _el$2 = $8tj43$getNextElement($63f1f8dbcd07d3b0$var$_tmpl$);
|
|
758
|
-
$8tj43$addEventListener(_el$2, "click", $8tj43$
|
|
812
|
+
$8tj43$addEventListener(_el$2, "click", $8tj43$catchify1(() => set_rows_visible()(prev => {
|
|
759
813
|
var _rows_or_empty_object2;
|
|
760
814
|
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);
|
|
761
815
|
})), true);
|
|
@@ -767,7 +821,7 @@ function $63f1f8dbcd07d3b0$export$445d8d3f5f706a40(props, container_element) {
|
|
|
767
821
|
// 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
|
|
768
822
|
const view_less_button_container = $8tj43$createMemo(() => have_a_view_less_button() && (() => {
|
|
769
823
|
var _el$3 = $8tj43$getNextElement($63f1f8dbcd07d3b0$var$_tmpl$);
|
|
770
|
-
$8tj43$addEventListener(_el$3, "click", $8tj43$
|
|
824
|
+
$8tj43$addEventListener(_el$3, "click", $8tj43$catchify1(() => set_rows_visible()(() => {
|
|
771
825
|
var _rows_or_empty_object3;
|
|
772
826
|
return (_rows_or_empty_object3 = rows_or_empty_object().start_rows) !== null && _rows_or_empty_object3 !== void 0 ? _rows_or_empty_object3 : 1;
|
|
773
827
|
})), true);
|
|
@@ -793,7 +847,7 @@ function $63f1f8dbcd07d3b0$export$445d8d3f5f706a40(props, container_element) {
|
|
|
793
847
|
}
|
|
794
848
|
update_children_count();
|
|
795
849
|
if (!(0, $8tj43$isServer)) {
|
|
796
|
-
const mutation_observer = new MutationObserver($8tj43$
|
|
850
|
+
const mutation_observer = new MutationObserver($8tj43$catchify1(update_children_count));
|
|
797
851
|
mutation_observer.observe(container_element, {
|
|
798
852
|
childList: true
|
|
799
853
|
});
|
|
@@ -1125,7 +1179,7 @@ function $6db93f70c2db1486$export$2972b890694ced75(callback, _ref) {
|
|
|
1125
1179
|
}
|
|
1126
1180
|
function $56047603f9d212b6$export$e6fffe67d4cdd848(whatToWatch) {
|
|
1127
1181
|
const [size, setSize] = $8tj43$createSignal(0);
|
|
1128
|
-
const resizeObserver = new ResizeObserver($8tj43$
|
|
1182
|
+
const resizeObserver = new ResizeObserver($8tj43$catchify1(records => {
|
|
1129
1183
|
for (let j = 0; j < records.length; j++) {
|
|
1130
1184
|
const {
|
|
1131
1185
|
width: width
|
|
@@ -1140,7 +1194,7 @@ function $56047603f9d212b6$export$e6fffe67d4cdd848(whatToWatch) {
|
|
|
1140
1194
|
let {
|
|
1141
1195
|
element: element
|
|
1142
1196
|
} = _ref;
|
|
1143
|
-
return requestAnimationFrame($8tj43$
|
|
1197
|
+
return requestAnimationFrame($8tj43$catchify1(() => resizeObserver.observe(element)));
|
|
1144
1198
|
});
|
|
1145
1199
|
$8tj43$onCleanup(() => {
|
|
1146
1200
|
resizeObserver.disconnect();
|
|
@@ -1198,7 +1252,7 @@ function $56047603f9d212b6$export$6e5611bc7e57e477(props) {
|
|
|
1198
1252
|
if (existingStack) return existingStack.add(fn);
|
|
1199
1253
|
const newStack = new Set([fn]);
|
|
1200
1254
|
if (listingContext) listingContext[$56047603f9d212b6$var$onIdleFunctionsSymbol] = newStack;
|
|
1201
|
-
const processStackWhenIdle = () => $6db93f70c2db1486$export$2972b890694ced75($8tj43$
|
|
1255
|
+
const processStackWhenIdle = () => $6db93f70c2db1486$export$2972b890694ced75($8tj43$catchify1(deadline => {
|
|
1202
1256
|
const start = performance.now();
|
|
1203
1257
|
const thirdDeadlineTime = deadline.timeRemaining() / 3; // observers coming after this take up 2-3x the time so don't use all of it
|
|
1204
1258
|
for (const fn of newStack) {
|
|
@@ -1230,7 +1284,7 @@ function $56047603f9d212b6$export$6e5611bc7e57e477(props) {
|
|
|
1230
1284
|
let prevValue;
|
|
1231
1285
|
const aspectRatios = listingContext[$56047603f9d212b6$export$f8945274f08a3105] || (listingContext[$56047603f9d212b6$export$f8945274f08a3105] = new Set());
|
|
1232
1286
|
const [, setMostPrevalentAspectRatio] = listingContext[$56047603f9d212b6$export$6066eb417ed2e9f7] || (listingContext[$56047603f9d212b6$export$6066eb417ed2e9f7] = $8tj43$createSignal());
|
|
1233
|
-
img.addEventListener("load", $8tj43$
|
|
1287
|
+
img.addEventListener("load", $8tj43$catchify1(() => {
|
|
1234
1288
|
if (props.keyRatioUpdating) {
|
|
1235
1289
|
if (!srcJustChanged) return;
|
|
1236
1290
|
srcJustChanged = false;
|
|
@@ -1264,7 +1318,7 @@ function $56047603f9d212b6$export$6e5611bc7e57e477(props) {
|
|
|
1264
1318
|
$8tj43$createEffect(() => {
|
|
1265
1319
|
if (!props.size()) return; // wait until we have a size, run every time the size changes
|
|
1266
1320
|
if (timeoutSet) return;
|
|
1267
|
-
const handler = $8tj43$
|
|
1321
|
+
const handler = $8tj43$catchify1(() => {
|
|
1268
1322
|
if (gotCleanedUp) return;
|
|
1269
1323
|
img.sizes = sizePX(); // use latest available value of props.size
|
|
1270
1324
|
if (!sizeSetFastPath) {
|
|
@@ -1401,11 +1455,11 @@ function $60ec7a29849d81db$export$a71e92cfbb498adc(props) {
|
|
|
1401
1455
|
return $8tj43$standard_price_format(props.price_, price_formatting.places_after_comma_, price_formatting.decimal_places_delimiter_, price_formatting.thousands_delimiter_);
|
|
1402
1456
|
});
|
|
1403
1457
|
}
|
|
1404
|
-
var $
|
|
1405
|
-
$
|
|
1406
|
-
$
|
|
1407
|
-
$
|
|
1408
|
-
function $
|
|
1458
|
+
var $f84b097e079b0a33$var$_tmpl$ = /*#__PURE__*/$8tj43$template(`<div class=img-wrapper>`),
|
|
1459
|
+
$f84b097e079b0a33$var$_tmpl$2 = /*#__PURE__*/$8tj43$template(`<span class="d-price original">`),
|
|
1460
|
+
$f84b097e079b0a33$var$_tmpl$3 = /*#__PURE__*/$8tj43$template(`<div class=right-part><div class=text-container><span class="d-title line-clamp"></span><span class=d-price></span><!$><!/></div><!$><!/>`),
|
|
1461
|
+
$f84b097e079b0a33$var$_tmpl$4 = /*#__PURE__*/$8tj43$template(`<a class=look-item><!$><!/><!$><!/>`);
|
|
1462
|
+
function $f84b097e079b0a33$export$b73ed90f0ee50dc3(_ref) {
|
|
1409
1463
|
let {
|
|
1410
1464
|
display_: display_,
|
|
1411
1465
|
FavoriteButton_: FavoriteButton_,
|
|
@@ -1447,7 +1501,7 @@ function $0c5b1686f971e5e7$export$b73ed90f0ee50dc3(_ref) {
|
|
|
1447
1501
|
return (_variantToUse5 = variantToUse()) === null || _variantToUse5 === void 0 ? void 0 : _variantToUse5.title;
|
|
1448
1502
|
});
|
|
1449
1503
|
return (() => {
|
|
1450
|
-
var _el$ = $8tj43$getNextElement($
|
|
1504
|
+
var _el$ = $8tj43$getNextElement($f84b097e079b0a33$var$_tmpl$4),
|
|
1451
1505
|
_el$12 = _el$.firstChild,
|
|
1452
1506
|
[_el$13, _co$3] = $8tj43$getNextMarker(_el$12.nextSibling),
|
|
1453
1507
|
_el$14 = _el$13.nextSibling,
|
|
@@ -1458,7 +1512,7 @@ function $0c5b1686f971e5e7$export$b73ed90f0ee50dc3(_ref) {
|
|
|
1458
1512
|
href: href()
|
|
1459
1513
|
} : {}, {
|
|
1460
1514
|
get onClick() {
|
|
1461
|
-
return $8tj43$
|
|
1515
|
+
return $8tj43$catchify1(event_ => {
|
|
1462
1516
|
if (enableLink()) {
|
|
1463
1517
|
pseudoRouter_.navigate_.go_to_({
|
|
1464
1518
|
new_url_: href(),
|
|
@@ -1480,7 +1534,7 @@ function $0c5b1686f971e5e7$export$b73ed90f0ee50dc3(_ref) {
|
|
|
1480
1534
|
});
|
|
1481
1535
|
},
|
|
1482
1536
|
get children() {
|
|
1483
|
-
var _el$2 = $8tj43$getNextElement($
|
|
1537
|
+
var _el$2 = $8tj43$getNextElement($f84b097e079b0a33$var$_tmpl$);
|
|
1484
1538
|
$8tj43$insert(_el$2, $8tj43$createComponent((0, $8tj43$Show), {
|
|
1485
1539
|
get when() {
|
|
1486
1540
|
return imageUrl();
|
|
@@ -1515,7 +1569,7 @@ function $0c5b1686f971e5e7$export$b73ed90f0ee50dc3(_ref) {
|
|
|
1515
1569
|
return (animationEffectExists() ? isExpandedThrottledByOurEffectRun() : userWantsExpanded()) || animationIsRunning();
|
|
1516
1570
|
},
|
|
1517
1571
|
get children() {
|
|
1518
|
-
var _el$3 = $8tj43$getNextElement($
|
|
1572
|
+
var _el$3 = $8tj43$getNextElement($f84b097e079b0a33$var$_tmpl$3),
|
|
1519
1573
|
_el$4 = _el$3.firstChild,
|
|
1520
1574
|
_el$5 = _el$4.firstChild,
|
|
1521
1575
|
_el$6 = _el$5.nextSibling,
|
|
@@ -1552,7 +1606,7 @@ function $0c5b1686f971e5e7$export$b73ed90f0ee50dc3(_ref) {
|
|
|
1552
1606
|
setAnimationEffectExists(true);
|
|
1553
1607
|
$8tj43$onCleanup(() => setAnimationEffectExists(false));
|
|
1554
1608
|
});
|
|
1555
|
-
for (const ev of ["cancel", "finish"]) textContainerAnimation.addEventListener(ev, $8tj43$
|
|
1609
|
+
for (const ev of ["cancel", "finish"]) textContainerAnimation.addEventListener(ev, $8tj43$catchify1(() => setAnimationIsRunning(false)));
|
|
1556
1610
|
disconnector();
|
|
1557
1611
|
}));
|
|
1558
1612
|
}, _el$3);
|
|
@@ -1599,7 +1653,7 @@ function $0c5b1686f971e5e7$export$b73ed90f0ee50dc3(_ref) {
|
|
|
1599
1653
|
return isOnSale();
|
|
1600
1654
|
},
|
|
1601
1655
|
get children() {
|
|
1602
|
-
var _el$7 = $8tj43$getNextElement($
|
|
1656
|
+
var _el$7 = $8tj43$getNextElement($f84b097e079b0a33$var$_tmpl$2);
|
|
1603
1657
|
$8tj43$insert(_el$7, $8tj43$createComponent((0, $8tj43$Show), {
|
|
1604
1658
|
get when() {
|
|
1605
1659
|
return variantToUse() && !originalPrice.loading;
|
|
@@ -1662,7 +1716,7 @@ async function $c4103af154850e50$var$checkIfIsAffectedByChromeBug326498383() {
|
|
|
1662
1716
|
const waitAFrame = () => new Promise(r => requestAnimationFrame(() => requestAnimationFrame(r)));
|
|
1663
1717
|
const timeoutPromise = new Promise(r => {
|
|
1664
1718
|
resolveTimeoutPromise = r;
|
|
1665
|
-
setTimeout($8tj43$
|
|
1719
|
+
setTimeout($8tj43$catchify1(() => {
|
|
1666
1720
|
r();
|
|
1667
1721
|
div.remove();
|
|
1668
1722
|
}), 500);
|
|
@@ -1694,12 +1748,12 @@ async function $c4103af154850e50$var$checkIfIsAffectedByChromeBug326498383() {
|
|
|
1694
1748
|
});
|
|
1695
1749
|
await timeoutPromise;
|
|
1696
1750
|
} catch (e) {
|
|
1697
|
-
$8tj43$
|
|
1751
|
+
$8tj43$dlog1("Failed to check if affected by chrome bug 326498383", e);
|
|
1698
1752
|
}
|
|
1699
1753
|
return isAffected;
|
|
1700
1754
|
}
|
|
1701
|
-
var $
|
|
1702
|
-
function $
|
|
1755
|
+
var $275d06a183ca0a29$var$_tmpl$ = /*#__PURE__*/$8tj43$template(`<div class=scroll-padding><div class=look-overlay>`);
|
|
1756
|
+
function $275d06a183ca0a29$export$ebf0b1d4f90c09ae(_ref) {
|
|
1703
1757
|
let {
|
|
1704
1758
|
displays_: displays_,
|
|
1705
1759
|
FavoriteButton_: FavoriteButton_,
|
|
@@ -1719,6 +1773,7 @@ function $4089a7972a508539$export$ebf0b1d4f90c09ae(_ref) {
|
|
|
1719
1773
|
const textFadeInAnimationRunning = $8tj43$createSignal(false);
|
|
1720
1774
|
const [getSecondPartAnimationRunning] = textFadeInAnimationRunning;
|
|
1721
1775
|
const [userWantsExpanded, setUserWantsExpanded] = userWantsExpandedSignal_;
|
|
1776
|
+
//const elementsHovered = useMobileHover();
|
|
1722
1777
|
$c4103af154850e50$export$7b9a0e99f0aeb2f3().then(is => isAffectedByChromeBug = is);
|
|
1723
1778
|
return $8tj43$createComponent((0, $5441862cd2f5e111$export$e68cff63f76bd15b), {
|
|
1724
1779
|
get children() {
|
|
@@ -1727,21 +1782,37 @@ function $4089a7972a508539$export$ebf0b1d4f90c09ae(_ref) {
|
|
|
1727
1782
|
return containerWidth_() || !displays_();
|
|
1728
1783
|
},
|
|
1729
1784
|
get children() {
|
|
1730
|
-
var _el$ = $8tj43$getNextElement($
|
|
1785
|
+
var _el$ = $8tj43$getNextElement($275d06a183ca0a29$var$_tmpl$),
|
|
1731
1786
|
_el$2 = _el$.firstChild;
|
|
1732
|
-
$8tj43$addEventListener(_el$2, "mouseleave", $8tj43$
|
|
1733
|
-
$8tj43$addEventListener(_el$2, "mouseenter", $8tj43$
|
|
1734
|
-
$8tj43$use(el =>
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1787
|
+
$8tj43$addEventListener(_el$2, "mouseleave", $8tj43$catchify1(() => supportsHover_() && setUserWantsExpanded(false)));
|
|
1788
|
+
$8tj43$addEventListener(_el$2, "mouseenter", $8tj43$catchify1(() => supportsHover_() && setUserWantsExpanded(true)));
|
|
1789
|
+
$8tj43$use(el => {
|
|
1790
|
+
$8tj43$createEffect(() => {
|
|
1791
|
+
if (userWantsExpanded()) return;
|
|
1792
|
+
if (isAffectedByChromeBug) {
|
|
1793
|
+
$275d06a183ca0a29$var$scrollingFunctionForChrome(el, 0, animationDuration_);
|
|
1794
|
+
return;
|
|
1795
|
+
}
|
|
1796
|
+
el.scrollTo({
|
|
1797
|
+
top: 0,
|
|
1798
|
+
behavior: "smooth"
|
|
1799
|
+
});
|
|
1743
1800
|
});
|
|
1744
|
-
|
|
1801
|
+
// createEffect(wasOpenedByHover => {
|
|
1802
|
+
// if (supportsHover_()) return;
|
|
1803
|
+
// const hovered = elementsHovered();
|
|
1804
|
+
// checkHovered: {
|
|
1805
|
+
// if (hovered.has(el)) break checkHovered;
|
|
1806
|
+
// for (const element of hovered) {
|
|
1807
|
+
// if (el.contains(element)) break checkHovered;
|
|
1808
|
+
// }
|
|
1809
|
+
// if (wasOpenedByHover) setUserWantsExpanded(false);
|
|
1810
|
+
// return;
|
|
1811
|
+
// }
|
|
1812
|
+
// setUserWantsExpanded(true);
|
|
1813
|
+
// return true;
|
|
1814
|
+
// });
|
|
1815
|
+
}, _el$2);
|
|
1745
1816
|
$8tj43$insert(_el$2, $8tj43$createComponent((0, $8tj43$Index), {
|
|
1746
1817
|
get each() {
|
|
1747
1818
|
return displays_() || Array.from({
|
|
@@ -1749,7 +1820,7 @@ function $4089a7972a508539$export$ebf0b1d4f90c09ae(_ref) {
|
|
|
1749
1820
|
});
|
|
1750
1821
|
},
|
|
1751
1822
|
children: (display, index) => {
|
|
1752
|
-
return $8tj43$createComponent((0, $
|
|
1823
|
+
return $8tj43$createComponent((0, $f84b097e079b0a33$export$b73ed90f0ee50dc3), {
|
|
1753
1824
|
pseudoRouter_: pseudoRouter_,
|
|
1754
1825
|
animationDuration_: animationDuration_,
|
|
1755
1826
|
display_: display,
|
|
@@ -1759,7 +1830,7 @@ function $4089a7972a508539$export$ebf0b1d4f90c09ae(_ref) {
|
|
|
1759
1830
|
priceFormatting_: priceFormatting_,
|
|
1760
1831
|
outerRef_: el => $8tj43$createEffect(() => {
|
|
1761
1832
|
if (index !== 0) return;
|
|
1762
|
-
const resizeObserver = new ResizeObserver($8tj43$
|
|
1833
|
+
const resizeObserver = new ResizeObserver($8tj43$catchify1(records => setLookItemHeight(records.at(-1).contentRect.height)));
|
|
1763
1834
|
resizeObserver.observe(el);
|
|
1764
1835
|
$8tj43$onCleanup(() => resizeObserver.disconnect());
|
|
1765
1836
|
})
|
|
@@ -1790,11 +1861,11 @@ function $4089a7972a508539$export$ebf0b1d4f90c09ae(_ref) {
|
|
|
1790
1861
|
/**
|
|
1791
1862
|
* Workaround for Chrome bug 326498383, adapted version of https://stackoverflow.com/a/39494245
|
|
1792
1863
|
*/
|
|
1793
|
-
function $
|
|
1864
|
+
function $275d06a183ca0a29$var$scrollingFunctionForChrome(element, targetScrollY, duration) {
|
|
1794
1865
|
let start;
|
|
1795
1866
|
const startingY = element.scrollTop;
|
|
1796
1867
|
const diff = targetScrollY - startingY;
|
|
1797
|
-
const step = $8tj43$
|
|
1868
|
+
const step = $8tj43$catchify1(timestamp => {
|
|
1798
1869
|
if (!start) start = timestamp;
|
|
1799
1870
|
// Elapsed milliseconds since start of scrolling.
|
|
1800
1871
|
const time = timestamp - start;
|
|
@@ -1807,8 +1878,8 @@ function $4089a7972a508539$var$scrollingFunctionForChrome(element, targetScrollY
|
|
|
1807
1878
|
// Bootstrap our animation - it will get called right before next frame shall be rendered.
|
|
1808
1879
|
requestAnimationFrame(step);
|
|
1809
1880
|
}
|
|
1810
|
-
var $
|
|
1811
|
-
function $
|
|
1881
|
+
var $22dd375b476673e2$var$_tmpl$ = /*#__PURE__*/$8tj43$template(`<div class=look-card><!$><!/><!$><!/>`);
|
|
1882
|
+
function $22dd375b476673e2$export$44809a8a3e867e30(_ref) {
|
|
1812
1883
|
let {
|
|
1813
1884
|
display_: display_,
|
|
1814
1885
|
expandedLooksSignal_: [expandedLooks_, setExpandedLooks],
|
|
@@ -1826,7 +1897,7 @@ function $697d8713dc82b9ab$export$44809a8a3e867e30(_ref) {
|
|
|
1826
1897
|
const index = $1e69163caedaab4e$export$e3faf4d95300054f();
|
|
1827
1898
|
const [containerWidth_, setContainerWidth] = $8tj43$createSignal();
|
|
1828
1899
|
const [containerHeight_, setContainerHeight] = $8tj43$createSignal();
|
|
1829
|
-
const clickHandler = $8tj43$
|
|
1900
|
+
const clickHandler = $8tj43$catchify1(_ref2 => {
|
|
1830
1901
|
let {
|
|
1831
1902
|
target: target
|
|
1832
1903
|
} = _ref2;
|
|
@@ -1868,15 +1939,15 @@ function $697d8713dc82b9ab$export$44809a8a3e867e30(_ref) {
|
|
|
1868
1939
|
// Close us if another look expands
|
|
1869
1940
|
$8tj43$createEffect(() => !expandedLooks_().has(us) && setUserWantsExpanded(false));
|
|
1870
1941
|
return (() => {
|
|
1871
|
-
var _el$ = $8tj43$getNextElement($
|
|
1942
|
+
var _el$ = $8tj43$getNextElement($22dd375b476673e2$var$_tmpl$),
|
|
1872
1943
|
_el$2 = _el$.firstChild,
|
|
1873
1944
|
[_el$3, _co$] = $8tj43$getNextMarker(_el$2.nextSibling),
|
|
1874
1945
|
_el$4 = _el$3.nextSibling,
|
|
1875
1946
|
[_el$5, _co$2] = $8tj43$getNextMarker(_el$4.nextSibling);
|
|
1876
|
-
$8tj43$addEventListener(_el$, "click", $8tj43$
|
|
1947
|
+
$8tj43$addEventListener(_el$, "click", $8tj43$catchify1(() => setUserWantsExpanded(prev => !prev)), true);
|
|
1877
1948
|
$8tj43$use(el => {
|
|
1878
1949
|
container = el;
|
|
1879
|
-
const ro = new ResizeObserver($8tj43$
|
|
1950
|
+
const ro = new ResizeObserver($8tj43$catchify1(records => {
|
|
1880
1951
|
const last = records.at(-1);
|
|
1881
1952
|
if (!last) return;
|
|
1882
1953
|
const {
|
|
@@ -1909,7 +1980,7 @@ function $697d8713dc82b9ab$export$44809a8a3e867e30(_ref) {
|
|
|
1909
1980
|
});
|
|
1910
1981
|
}
|
|
1911
1982
|
}), _el$3, _co$);
|
|
1912
|
-
$8tj43$insert(_el$, $8tj43$createComponent((0, $
|
|
1983
|
+
$8tj43$insert(_el$, $8tj43$createComponent((0, $275d06a183ca0a29$export$ebf0b1d4f90c09ae), {
|
|
1913
1984
|
displays_: () => {
|
|
1914
1985
|
var _display_2;
|
|
1915
1986
|
return (_display_2 = display_()) === null || _display_2 === void 0 ? void 0 : _display_2.displays;
|
|
@@ -1983,7 +2054,7 @@ class $ac571292d606f30b$export$7e1297a3a19f10d8 {
|
|
|
1983
2054
|
* @param is_replace_ if you want to replace the current URL in history instead of pushing a new one
|
|
1984
2055
|
* @param listing_id_ If you are navigating to a category and know the listing_id of, please provide it. This is for making a better devEx in js-ui
|
|
1985
2056
|
*/
|
|
1986
|
-
go_to_: $8tj43$
|
|
2057
|
+
go_to_: $8tj43$catchify1(async _ref => {
|
|
1987
2058
|
let {
|
|
1988
2059
|
new_url_: raw_new_url,
|
|
1989
2060
|
event_: event_,
|
|
@@ -2209,7 +2280,7 @@ function $bb34cd283e904784$export$2c9f9bf2092486aa(props) {
|
|
|
2209
2280
|
return $bb34cd283e904784$var$runDisplayTransformersForLooks(baseData, listings, props.displayTransformers_);
|
|
2210
2281
|
});
|
|
2211
2282
|
const sharedOptions = {
|
|
2212
|
-
product_card_template_: display => $
|
|
2283
|
+
product_card_template_: display => $22dd375b476673e2$export$44809a8a3e867e30({
|
|
2213
2284
|
display_: () => display,
|
|
2214
2285
|
FavoriteButton_: props.FavoriteButton_,
|
|
2215
2286
|
placeholderImageAspectRatio_: props.imagePlaceholderAspectRatio_,
|
|
@@ -2503,9 +2574,9 @@ const $9a693c7e832d3f18$export$b05c0ae390cf3e06 = _ref => {
|
|
|
2503
2574
|
var _selectedDueToKeyboar;
|
|
2504
2575
|
return (_selectedDueToKeyboar = selectedDueToKeyboardNavigation === null || selectedDueToKeyboardNavigation === void 0 ? void 0 : selectedDueToKeyboardNavigation()) !== null && _selectedDueToKeyboar !== void 0 ? _selectedDueToKeyboar : false;
|
|
2505
2576
|
}), _el$4);
|
|
2506
|
-
$8tj43$addEventListener(_el$4, "mouseleave", $8tj43$
|
|
2507
|
-
$8tj43$addEventListener(_el$4, "mouseenter", $8tj43$
|
|
2508
|
-
$8tj43$addEventListener(_el$4, "click", $8tj43$
|
|
2577
|
+
$8tj43$addEventListener(_el$4, "mouseleave", $8tj43$catchify1(() => set_selected_index_ === null || set_selected_index_ === void 0 ? void 0 : set_selected_index_()));
|
|
2578
|
+
$8tj43$addEventListener(_el$4, "mouseenter", $8tj43$catchify1(() => set_selected_index_ === null || set_selected_index_ === void 0 ? void 0 : set_selected_index_([keyboardNavigationGroupIndex_(), index_()])));
|
|
2579
|
+
$8tj43$addEventListener(_el$4, "click", $8tj43$catchify1(event_ => router_.navigate_.go_to_({
|
|
2509
2580
|
new_url_: href(),
|
|
2510
2581
|
is_replace_: false,
|
|
2511
2582
|
event_: event_
|
|
@@ -2634,7 +2705,7 @@ function $f7414b949aeabc90$export$62f101a8aa597bf8(_ref) {
|
|
|
2634
2705
|
// don't wait if it's the first request
|
|
2635
2706
|
write_current_instant_query(value);
|
|
2636
2707
|
clearTimeout(timeout);
|
|
2637
|
-
timeout = setTimeout($8tj43$
|
|
2708
|
+
timeout = setTimeout($8tj43$catchify1(() => write_current_instant_query(value)), 250);
|
|
2638
2709
|
});
|
|
2639
2710
|
const [search_results] = $8tj43$createResource($8tj43$createMemo(() => ({
|
|
2640
2711
|
// <-- key order important, see comment below
|
|
@@ -2642,7 +2713,7 @@ function $f7414b949aeabc90$export$62f101a8aa597bf8(_ref) {
|
|
|
2642
2713
|
market: market_(),
|
|
2643
2714
|
locale: i18n_.backend_locale_(),
|
|
2644
2715
|
query: read_current_instant_query()
|
|
2645
|
-
})), $8tj43$
|
|
2716
|
+
})), $8tj43$catchify1(async variable_data => {
|
|
2646
2717
|
return depict_api_.query({
|
|
2647
2718
|
// 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
|
|
2648
2719
|
limit: $8tj43$untrack(has_sort_or_filters_) ? max_cards : min_products_to_fetch_,
|
|
@@ -2746,7 +2817,7 @@ function $9974e016866745eb$export$c7e181728ad525f(url) {
|
|
|
2746
2817
|
return;
|
|
2747
2818
|
$9974e016866745eb$var$last_sent_value = new_value;
|
|
2748
2819
|
const args = ["depict.send", "pageview", new_value];
|
|
2749
|
-
$8tj43$
|
|
2820
|
+
$8tj43$dlog1("Calling ga with args", ...args);
|
|
2750
2821
|
// @ts-ignore
|
|
2751
2822
|
ga(...args);
|
|
2752
2823
|
}
|
|
@@ -2761,7 +2832,7 @@ function $a09bb7c652acf957$export$3340fdd8259bd4fd(_ref) {
|
|
|
2761
2832
|
if (process.env.GA === "false") return;
|
|
2762
2833
|
let debounce_timeout;
|
|
2763
2834
|
const stop_timeout = () => clearTimeout(debounce_timeout);
|
|
2764
|
-
const send_to_ga = $8tj43$
|
|
2835
|
+
const send_to_ga = $8tj43$catchify1(() => {
|
|
2765
2836
|
const fake_url = new URL(location.href);
|
|
2766
2837
|
const {
|
|
2767
2838
|
searchParams: searchParams
|
|
@@ -2774,12 +2845,12 @@ function $a09bb7c652acf957$export$3340fdd8259bd4fd(_ref) {
|
|
|
2774
2845
|
$8tj43$onCleanup(() => {
|
|
2775
2846
|
setTimeout(
|
|
2776
2847
|
// 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
|
|
2777
|
-
$8tj43$
|
|
2848
|
+
$8tj43$catchify1(() => {
|
|
2778
2849
|
if ($8tj43$untrack(get_search_query_) === $8tj43$untrack(get_search_field_value_)) stop_timeout();
|
|
2779
2850
|
}));
|
|
2780
2851
|
});
|
|
2781
2852
|
let first_call = true;
|
|
2782
|
-
$8tj43$createEffect($8tj43$
|
|
2853
|
+
$8tj43$createEffect($8tj43$catchify1(() => {
|
|
2783
2854
|
get_search_field_value_();
|
|
2784
2855
|
if (first_call) {
|
|
2785
2856
|
// we only want to do stuff when it changes
|
|
@@ -2808,7 +2879,7 @@ function $558d0596fcf0e0b0$export$50b90be27d8502d9(el, _ref, bottom_distance) {
|
|
|
2808
2879
|
[key]: new_value
|
|
2809
2880
|
});
|
|
2810
2881
|
};
|
|
2811
|
-
const is = new IntersectionObserver($8tj43$
|
|
2882
|
+
const is = new IntersectionObserver($8tj43$catchify1(_records => {
|
|
2812
2883
|
do_positioning();
|
|
2813
2884
|
}), {
|
|
2814
2885
|
threshold: $8tj43$buildThresholdList(100)
|
|
@@ -2830,7 +2901,7 @@ function $e8776b492383c292$export$91c3b6774e8be0f5(_ref) {
|
|
|
2830
2901
|
const [get_current_href, set_current_href] = $8tj43$createSignal(location.href);
|
|
2831
2902
|
const [exit_iterable, exitable_iterable] = $8tj43$make_asyncIterable_exiter((0, $8tj43$href_change_ipns));
|
|
2832
2903
|
$8tj43$onCleanup(exit_iterable);
|
|
2833
|
-
$8tj43$
|
|
2904
|
+
$8tj43$catchify1(async () => {
|
|
2834
2905
|
for await (const href of exitable_iterable)
|
|
2835
2906
|
// use native links so ppl can cmdclick/right click and open in new tab and see target URL
|
|
2836
2907
|
set_current_href(href);
|
|
@@ -2902,18 +2973,18 @@ function $01dd2bfbbae020bc$export$a146ac6fa8346a25(_ref) {
|
|
|
2902
2973
|
_el$9 = _el$5.nextSibling;
|
|
2903
2974
|
$8tj43$use(element => element.addEventListener(
|
|
2904
2975
|
// 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.
|
|
2905
|
-
"click", $8tj43$
|
|
2976
|
+
"click", $8tj43$catchify1(ev => {
|
|
2906
2977
|
if ($9b35d1384e31813a$export$29d28dadc2d6b631(ev))
|
|
2907
2978
|
// not button 0 or cmd/ctrl click
|
|
2908
2979
|
return;
|
|
2909
2980
|
ev.preventDefault();
|
|
2910
2981
|
submit_query_(item());
|
|
2911
2982
|
})), _el$4);
|
|
2912
|
-
$8tj43$addEventListener(_el$4, "mouseleave", $8tj43$
|
|
2913
|
-
$8tj43$addEventListener(_el$4, "mouseenter", $8tj43$
|
|
2983
|
+
$8tj43$addEventListener(_el$4, "mouseleave", $8tj43$catchify1(() => write_selected_index_()));
|
|
2984
|
+
$8tj43$addEventListener(_el$4, "mouseenter", $8tj43$catchify1(() => write_selected_index_([0, index])));
|
|
2914
2985
|
$8tj43$insert(_el$5, $8tj43$createComponent((0, $6d95ef50ee01d5a1$export$5d2caaa6b530761c), {}), _el$8, _co$);
|
|
2915
2986
|
$8tj43$insert(_el$6, item);
|
|
2916
|
-
$8tj43$use(element => element.addEventListener("click", $8tj43$
|
|
2987
|
+
$8tj43$use(element => element.addEventListener("click", $8tj43$catchify1(e => {
|
|
2917
2988
|
// 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.
|
|
2918
2989
|
set_unfiltered_previous_searches_(prev => {
|
|
2919
2990
|
const new_value = [...prev];
|
|
@@ -3106,7 +3177,7 @@ function $b055f9e9aeceeb48$export$e872e2339fb04a7f(_ref) {
|
|
|
3106
3177
|
});
|
|
3107
3178
|
return (() => {
|
|
3108
3179
|
var _el$ = $8tj43$getNextElement($b055f9e9aeceeb48$var$_tmpl$);
|
|
3109
|
-
$8tj43$use(element => element.addEventListener("click", $8tj43$
|
|
3180
|
+
$8tj43$use(element => element.addEventListener("click", $8tj43$catchify1(ev => {
|
|
3110
3181
|
// 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.
|
|
3111
3182
|
if (is_query()) {
|
|
3112
3183
|
if ($9b35d1384e31813a$export$29d28dadc2d6b631(ev))
|
|
@@ -3123,8 +3194,8 @@ function $b055f9e9aeceeb48$export$e872e2339fb04a7f(_ref) {
|
|
|
3123
3194
|
event_: ev
|
|
3124
3195
|
});
|
|
3125
3196
|
})), _el$);
|
|
3126
|
-
$8tj43$addEventListener(_el$, "mouseleave", $8tj43$
|
|
3127
|
-
$8tj43$addEventListener(_el$, "mouseenter", $8tj43$
|
|
3197
|
+
$8tj43$addEventListener(_el$, "mouseleave", $8tj43$catchify1(() => write_selected_index_(undefined)));
|
|
3198
|
+
$8tj43$addEventListener(_el$, "mouseenter", $8tj43$catchify1(() => write_selected_index_([autocomplete_data_index, index])));
|
|
3128
3199
|
$8tj43$insert(_el$, (() => {
|
|
3129
3200
|
var _c$ = $8tj43$memo(() => !!is_query());
|
|
3130
3201
|
return () => _c$() ? [$8tj43$createComponent((0, $8tj43$Show), {
|
|
@@ -3417,7 +3488,7 @@ function $75e33704f2a83029$var$actual_navigation_working_on_fake_data(_ref2) {
|
|
|
3417
3488
|
if (!$8tj43$untrack(() => read_updating_blocked())) previous_value = sfv;
|
|
3418
3489
|
});
|
|
3419
3490
|
const owner = $8tj43$getOwner();
|
|
3420
|
-
const handler = $8tj43$
|
|
3491
|
+
const handler = $8tj43$catchify1(_ref3 => {
|
|
3421
3492
|
let {
|
|
3422
3493
|
keyCode: keyCode
|
|
3423
3494
|
} = _ref3;
|
|
@@ -3484,7 +3555,7 @@ function $75e33704f2a83029$var$actual_navigation_working_on_fake_data(_ref2) {
|
|
|
3484
3555
|
const el = element_();
|
|
3485
3556
|
if (!el) return;
|
|
3486
3557
|
el.addEventListener("keyup", handler);
|
|
3487
|
-
$8tj43$onCleanup($8tj43$
|
|
3558
|
+
$8tj43$onCleanup($8tj43$catchify1(() => el.removeEventListener("keyup", handler)));
|
|
3488
3559
|
});
|
|
3489
3560
|
}
|
|
3490
3561
|
function $c4dee1ef44de29ca$export$af0124069c150252(_ref) {
|
|
@@ -3701,7 +3772,7 @@ let $c3820807ac1e6fd7$export$44dad306455dddf;
|
|
|
3701
3772
|
|
|
3702
3773
|
function $fc830a7ee59416ef$export$ebdc3711f7e02ccd(what_to_watch) {
|
|
3703
3774
|
const [width, setWidth] = $8tj43$createSignal();
|
|
3704
|
-
const resizeObserver = new ResizeObserver($8tj43$
|
|
3775
|
+
const resizeObserver = new ResizeObserver($8tj43$catchify1(records => {
|
|
3705
3776
|
for (let j = 0; j < records.length; j++) {
|
|
3706
3777
|
var _records$j$borderBoxS, _records$j$borderBoxS2, _records$j$borderBoxS3;
|
|
3707
3778
|
const width = (_records$j$borderBoxS = (_records$j$borderBoxS2 = records[j].borderBoxSize) === null || _records$j$borderBoxS2 === void 0 ? void 0 : (_records$j$borderBoxS3 = _records$j$borderBoxS2[0]) === null || _records$j$borderBoxS3 === void 0 ? void 0 : _records$j$borderBoxS3.inlineSize) !== null && _records$j$borderBoxS !== void 0 ? _records$j$borderBoxS : what_to_watch.getBoundingClientRect().width;
|
|
@@ -3714,7 +3785,7 @@ function $fc830a7ee59416ef$export$ebdc3711f7e02ccd(what_to_watch) {
|
|
|
3714
3785
|
let {
|
|
3715
3786
|
element: element
|
|
3716
3787
|
} = _ref;
|
|
3717
|
-
return requestAnimationFrame($8tj43$
|
|
3788
|
+
return requestAnimationFrame($8tj43$catchify1(() => {
|
|
3718
3789
|
const current_size = what_to_watch.getBoundingClientRect().width;
|
|
3719
3790
|
if (current_size)
|
|
3720
3791
|
// If element has size, set signal to that. ResizeObserver only triggers when the content is visible in some cases, but it might already have a size. This reduces size filter expanding animation jank in chrome.
|
|
@@ -3762,7 +3833,7 @@ function $584c06c09cf4609d$export$b94867ecbd698f21(_ref) {
|
|
|
3762
3833
|
let input_element;
|
|
3763
3834
|
// This is the div where we recommend (and ourselves do) attach the event listener to that opens the search modal.
|
|
3764
3835
|
let field_div;
|
|
3765
|
-
$8tj43$createEffect($8tj43$
|
|
3836
|
+
$8tj43$createEffect($8tj43$catchify1(async () => {
|
|
3766
3837
|
if (disabled_) return;
|
|
3767
3838
|
// we aren't in DOM yet unfortunately, wouldn't even be with onMount
|
|
3768
3839
|
await (0, $8tj43$observer).wait_for_element(input_element);
|
|
@@ -3783,7 +3854,7 @@ function $584c06c09cf4609d$export$b94867ecbd698f21(_ref) {
|
|
|
3783
3854
|
var _el$ = $8tj43$getNextElement($584c06c09cf4609d$var$_tmpl$);
|
|
3784
3855
|
$8tj43$spread(_el$, $8tj43$mergeProps({
|
|
3785
3856
|
get onClick() {
|
|
3786
|
-
return $8tj43$
|
|
3857
|
+
return $8tj43$catchify1(on_back_);
|
|
3787
3858
|
},
|
|
3788
3859
|
get ["aria-label"]() {
|
|
3789
3860
|
return i18n_.back_();
|
|
@@ -3813,7 +3884,7 @@ function $584c06c09cf4609d$export$b94867ecbd698f21(_ref) {
|
|
|
3813
3884
|
return isNewModal || !searchFieldEmpty() ? "" : "display: none";
|
|
3814
3885
|
},
|
|
3815
3886
|
get onClick() {
|
|
3816
|
-
return $8tj43$
|
|
3887
|
+
return $8tj43$catchify1(() => {
|
|
3817
3888
|
if (isNewModal && searchFieldEmpty()) return;
|
|
3818
3889
|
setSearchFieldValue("");
|
|
3819
3890
|
clear_filters_(true);
|
|
@@ -3870,7 +3941,7 @@ function $584c06c09cf4609d$export$b94867ecbd698f21(_ref) {
|
|
|
3870
3941
|
field_div = el;
|
|
3871
3942
|
field_element_ref_ === null || field_element_ref_ === void 0 || field_element_ref_(el);
|
|
3872
3943
|
}, _el$5);
|
|
3873
|
-
$8tj43$addEventListener(_el$5, "click", $8tj43$
|
|
3944
|
+
$8tj43$addEventListener(_el$5, "click", $8tj43$catchify1(_ref2 => {
|
|
3874
3945
|
let {
|
|
3875
3946
|
target: target,
|
|
3876
3947
|
currentTarget: currentTarget,
|
|
@@ -3902,7 +3973,7 @@ function $584c06c09cf4609d$export$b94867ecbd698f21(_ref) {
|
|
|
3902
3973
|
} = _ref3;
|
|
3903
3974
|
// 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).
|
|
3904
3975
|
if (pointerType === "mouse") {
|
|
3905
|
-
const handler = $8tj43$
|
|
3976
|
+
const handler = $8tj43$catchify1(_ref4 => {
|
|
3906
3977
|
let {
|
|
3907
3978
|
pointerType: pointerType,
|
|
3908
3979
|
target: target
|
|
@@ -3916,26 +3987,26 @@ function $584c06c09cf4609d$export$b94867ecbd698f21(_ref) {
|
|
|
3916
3987
|
$8tj43$runWithOwner(owner_of_field_element, () => $8tj43$onCleanup(() => window.removeEventListener("pointerup", handler)));
|
|
3917
3988
|
}
|
|
3918
3989
|
};
|
|
3919
|
-
$8tj43$addEventListener(_el$6, "select", $8tj43$
|
|
3990
|
+
$8tj43$addEventListener(_el$6, "select", $8tj43$catchify1(() => {
|
|
3920
3991
|
if (disabled_)
|
|
3921
3992
|
// 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
|
|
3922
3993
|
return;
|
|
3923
3994
|
if (input_element.selectionStart === 0 && input_element.selectionEnd === input_element.value.length)
|
|
3924
3995
|
// everything was selected, clear filters on next submit on next input
|
|
3925
|
-
input_element.addEventListener("input", $8tj43$
|
|
3996
|
+
input_element.addEventListener("input", $8tj43$catchify1(() => clear_filters_(false)),
|
|
3926
3997
|
// We don't count this as user triggered since it wasn't explicit
|
|
3927
3998
|
{
|
|
3928
3999
|
once: true
|
|
3929
4000
|
});
|
|
3930
4001
|
}));
|
|
3931
|
-
$8tj43$addEventListener(_el$6, "input", $8tj43$
|
|
4002
|
+
$8tj43$addEventListener(_el$6, "input", $8tj43$catchify1(() => {
|
|
3932
4003
|
const {
|
|
3933
4004
|
value: value
|
|
3934
4005
|
} = input_element;
|
|
3935
4006
|
if (!disabled_ && !value.length) clear_filters_(false); // if the user clears the whole field, reset filters on next submit
|
|
3936
4007
|
setSearchFieldValue(value);
|
|
3937
4008
|
}), true);
|
|
3938
|
-
$8tj43$addEventListener(_el$6, "keydown", $8tj43$
|
|
4009
|
+
$8tj43$addEventListener(_el$6, "keydown", $8tj43$catchify1(e => {
|
|
3939
4010
|
if (disabled_) {
|
|
3940
4011
|
if (e.key !== "Tab" && e.key !== "Shift")
|
|
3941
4012
|
// 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
|
|
@@ -3945,7 +4016,7 @@ function $584c06c09cf4609d$export$b94867ecbd698f21(_ref) {
|
|
|
3945
4016
|
if (!dont_submit) submit_query_();
|
|
3946
4017
|
}
|
|
3947
4018
|
}), true);
|
|
3948
|
-
var _ref$2 = $8tj43$
|
|
4019
|
+
var _ref$2 = $8tj43$catchify1(el => {
|
|
3949
4020
|
input_element = el;
|
|
3950
4021
|
input_field_ref_ === null || input_field_ref_ === void 0 || input_field_ref_(el);
|
|
3951
4022
|
});
|
|
@@ -3957,7 +4028,7 @@ function $584c06c09cf4609d$export$b94867ecbd698f21(_ref) {
|
|
|
3957
4028
|
when: !isNewModal,
|
|
3958
4029
|
get children() {
|
|
3959
4030
|
var _el$11 = $8tj43$getNextElement($584c06c09cf4609d$var$_tmpl$4);
|
|
3960
|
-
$8tj43$addEventListener(_el$11, "click", $8tj43$
|
|
4031
|
+
$8tj43$addEventListener(_el$11, "click", $8tj43$catchify1(() => submit_query_()), true);
|
|
3961
4032
|
$8tj43$insert(_el$11, $8tj43$createComponent((0, $ef0f18a578b32578$export$82eafebb825fc23f), {}));
|
|
3962
4033
|
$8tj43$effect(() => $8tj43$setAttribute(_el$11, "aria-label", i18n_.search_submit_button_aria_label_()));
|
|
3963
4034
|
$8tj43$runHydrationEvents();
|
|
@@ -3994,18 +4065,18 @@ function $e56d241d0f33d459$export$fe334901e8bebd57() {
|
|
|
3994
4065
|
offset: 0
|
|
3995
4066
|
}, 1);
|
|
3996
4067
|
animation.pause();
|
|
3997
|
-
const fn = $8tj43$
|
|
4068
|
+
const fn = $8tj43$catchify1(animation.play.bind(animation));
|
|
3998
4069
|
cleanup_fns.push(fn);
|
|
3999
4070
|
$8tj43$onCleanup(fn);
|
|
4000
4071
|
} catch (e) {
|
|
4001
|
-
$8tj43$
|
|
4072
|
+
$8tj43$dlog1("Probably partial keyframe error", e);
|
|
4002
4073
|
}
|
|
4003
4074
|
if (getComputedStyle(element).overflow !== "hidden") {
|
|
4004
4075
|
// safari gets special hacky treatment
|
|
4005
4076
|
const style = element.style;
|
|
4006
4077
|
const original_value = style.overflow;
|
|
4007
4078
|
style.overflow = "hidden";
|
|
4008
|
-
const fn = $8tj43$
|
|
4079
|
+
const fn = $8tj43$catchify1(() => style.overflow = original_value);
|
|
4009
4080
|
cleanup_fns.push(fn);
|
|
4010
4081
|
$8tj43$onCleanup(fn);
|
|
4011
4082
|
}
|
|
@@ -4028,8 +4099,8 @@ function $a82a41ab7188eda2$export$93d9bfd0c9c1a5b8(close_modal, search_query_url
|
|
|
4028
4099
|
let set_initial_values = false;
|
|
4029
4100
|
let old_pathname;
|
|
4030
4101
|
let old_param_value;
|
|
4031
|
-
$8tj43$onCleanup($8tj43$
|
|
4032
|
-
$8tj43$
|
|
4102
|
+
$8tj43$onCleanup($8tj43$catchify1(exit_iterable));
|
|
4103
|
+
$8tj43$catchify1(async () => {
|
|
4033
4104
|
for await (const href of exitable_iterable) {
|
|
4034
4105
|
const u_o = new URL(href);
|
|
4035
4106
|
const new_pathname = u_o.pathname;
|
|
@@ -4101,7 +4172,7 @@ function $40411f2ec772c376$var$RawClassicSearchModal(_ref) {
|
|
|
4101
4172
|
} = alignmentSignals_ || {};
|
|
4102
4173
|
const [bodyAlignmentStyle] = bodyAlignmentSignal;
|
|
4103
4174
|
const [get_modal_search_results, set_modal_search_results_] = $8tj43$createSignal();
|
|
4104
|
-
const close_on_escape_handler = $8tj43$
|
|
4175
|
+
const close_on_escape_handler = $8tj43$catchify1(_ref2 => {
|
|
4105
4176
|
let {
|
|
4106
4177
|
key: key
|
|
4107
4178
|
} = _ref2;
|
|
@@ -4127,7 +4198,7 @@ function $40411f2ec772c376$var$RawClassicSearchModal(_ref) {
|
|
|
4127
4198
|
const DiscoverMoreSection = () => (() => {
|
|
4128
4199
|
var _el$ = $8tj43$getNextElement($40411f2ec772c376$var$_tmpl$),
|
|
4129
4200
|
_el$2 = _el$.firstChild;
|
|
4130
|
-
$8tj43$addEventListener(_el$2, "click", $8tj43$
|
|
4201
|
+
$8tj43$addEventListener(_el$2, "click", $8tj43$catchify1(() => submit_query_()), true);
|
|
4131
4202
|
$8tj43$insert(_el$2, (() => {
|
|
4132
4203
|
var _c$ = $8tj43$memo(() => !!get_search_field_value_());
|
|
4133
4204
|
return () => _c$() ? i18n_.modal_view_all_results_()((() => {
|
|
@@ -4142,7 +4213,7 @@ function $40411f2ec772c376$var$RawClassicSearchModal(_ref) {
|
|
|
4142
4213
|
if (disable_scrolling_) $e56d241d0f33d459$export$fe334901e8bebd57();
|
|
4143
4214
|
$a82a41ab7188eda2$export$93d9bfd0c9c1a5b8(close_modal_, search_query_url_param_name_);
|
|
4144
4215
|
window.addEventListener("keydown", close_on_escape_handler);
|
|
4145
|
-
$8tj43$onCleanup($8tj43$
|
|
4216
|
+
$8tj43$onCleanup($8tj43$catchify1(() => window.removeEventListener("keydown", close_on_escape_handler)));
|
|
4146
4217
|
if (closing_animation_) register_closing_animation_(closing_animation_);
|
|
4147
4218
|
$a09bb7c652acf957$export$3340fdd8259bd4fd({
|
|
4148
4219
|
get_search_field_value_: get_search_field_value_,
|
|
@@ -4197,14 +4268,14 @@ function $40411f2ec772c376$var$RawClassicSearchModal(_ref) {
|
|
|
4197
4268
|
[_el$16, _co$5] = $8tj43$getNextMarker(_el$15.nextSibling),
|
|
4198
4269
|
_el$17 = _el$5.nextSibling,
|
|
4199
4270
|
[_el$18, _co$6] = $8tj43$getNextMarker(_el$17.nextSibling);
|
|
4200
|
-
$8tj43$addEventListener(_el$4, "click", $8tj43$
|
|
4271
|
+
$8tj43$addEventListener(_el$4, "click", $8tj43$catchify1(_ref3 => {
|
|
4201
4272
|
let {
|
|
4202
4273
|
target: target
|
|
4203
4274
|
} = _ref3;
|
|
4204
4275
|
if (target === modal_element) close_modal_();
|
|
4205
4276
|
}), true);
|
|
4206
4277
|
$8tj43$insert(_el$5, search_field, _el$14, _co$4);
|
|
4207
|
-
$8tj43$use(el => $8tj43$
|
|
4278
|
+
$8tj43$use(el => $8tj43$catchify1((0, $558d0596fcf0e0b0$export$50b90be27d8502d9))(el, bodyAlignmentSignal, bottom_distance_under_modal_), _el$6);
|
|
4208
4279
|
$8tj43$insert(_el$6, $8tj43$createComponent((0, $74777e8fe65b3dcb$export$b69d0d92862de18b), {
|
|
4209
4280
|
severity_: "error",
|
|
4210
4281
|
message_: "Autocomplete/suggestions failed",
|
|
@@ -4410,7 +4481,7 @@ function $2855bffe06ef7a03$var$decode_filter_data(op, encoded_data) {
|
|
|
4410
4481
|
try {
|
|
4411
4482
|
return JSON.parse($8tj43$base64_decode_unicode(encoded_data));
|
|
4412
4483
|
} catch (e) {
|
|
4413
|
-
$8tj43$
|
|
4484
|
+
$8tj43$dlog1("Failed to fallback parse filter data", op, encoded_data, e);
|
|
4414
4485
|
}
|
|
4415
4486
|
return null;
|
|
4416
4487
|
}
|
|
@@ -4471,7 +4542,7 @@ function $2855bffe06ef7a03$export$766e9676e74997d3(search_params, sorting_query_
|
|
|
4471
4542
|
field: encoded_sorting.slice(0, -$2855bffe06ef7a03$var$descending_token.length),
|
|
4472
4543
|
order: "desc"
|
|
4473
4544
|
};
|
|
4474
|
-
$8tj43$
|
|
4545
|
+
$8tj43$dlog1("Invalid sorting query param value", encoded_sorting);
|
|
4475
4546
|
return;
|
|
4476
4547
|
}
|
|
4477
4548
|
function $2855bffe06ef7a03$export$916e6850778505f6(search_params, filter_query_param_prefix, sorting_query_param) {
|
|
@@ -4549,7 +4620,7 @@ function $52efc9ae4382e25a$export$5646050d516e06bc(_ref) {
|
|
|
4549
4620
|
},
|
|
4550
4621
|
get children() {
|
|
4551
4622
|
var _el$2 = $8tj43$getNextElement($52efc9ae4382e25a$var$_tmpl$2);
|
|
4552
|
-
$8tj43$addEventListener(_el$2, "click", $8tj43$
|
|
4623
|
+
$8tj43$addEventListener(_el$2, "click", $8tj43$catchify1(ev => router_.navigate_.go_to_({
|
|
4553
4624
|
new_url_: href(),
|
|
4554
4625
|
is_replace_: false,
|
|
4555
4626
|
event_: ev,
|
|
@@ -4616,7 +4687,7 @@ function $26db6925469636a4$export$67152d26d4f56ee8(_ref) {
|
|
|
4616
4687
|
return href();
|
|
4617
4688
|
},
|
|
4618
4689
|
get onClick() {
|
|
4619
|
-
return $8tj43$
|
|
4690
|
+
return $8tj43$catchify1(ev => href() && router_.navigate_.go_to_({
|
|
4620
4691
|
new_url_: href(),
|
|
4621
4692
|
is_replace_: false,
|
|
4622
4693
|
event_: ev,
|
|
@@ -4647,8 +4718,8 @@ function $26db6925469636a4$export$67152d26d4f56ee8(_ref) {
|
|
|
4647
4718
|
[_el$8, _co$2] = $8tj43$getNextMarker(_el$7.nextSibling),
|
|
4648
4719
|
_el$4 = _el$8.nextSibling;
|
|
4649
4720
|
$8tj43$use(element => $d0883254246d3eb6$export$12761f53d7ab7f27(element, selectedDueToKeyboardNavigation), _el$2);
|
|
4650
|
-
$8tj43$addEventListener(_el$2, "mouseleave", $8tj43$
|
|
4651
|
-
$8tj43$addEventListener(_el$2, "mouseover", $8tj43$
|
|
4721
|
+
$8tj43$addEventListener(_el$2, "mouseleave", $8tj43$catchify1(() => write_selected_index_()));
|
|
4722
|
+
$8tj43$addEventListener(_el$2, "mouseover", $8tj43$catchify1(_ref2 => {
|
|
4652
4723
|
let {
|
|
4653
4724
|
target: target
|
|
4654
4725
|
} = _ref2;
|
|
@@ -4908,7 +4979,7 @@ function $5175a47d13b7c228$export$d4994a86c6235f72(_ref) {
|
|
|
4908
4979
|
var _el$7 = $8tj43$getNextElement($5175a47d13b7c228$var$_tmpl$2);
|
|
4909
4980
|
$8tj43$use(element => {
|
|
4910
4981
|
$d0883254246d3eb6$export$12761f53d7ab7f27(element, selectedDueToKeyboardNavigation);
|
|
4911
|
-
element.addEventListener("click", $8tj43$
|
|
4982
|
+
element.addEventListener("click", $8tj43$catchify1(ev => {
|
|
4912
4983
|
// 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.
|
|
4913
4984
|
const itemContents = item();
|
|
4914
4985
|
if ("page_url_" in itemContents) {
|
|
@@ -4924,8 +4995,8 @@ function $5175a47d13b7c228$export$d4994a86c6235f72(_ref) {
|
|
|
4924
4995
|
submit_query_(itemContents.title_);
|
|
4925
4996
|
}));
|
|
4926
4997
|
}, _el$7);
|
|
4927
|
-
$8tj43$addEventListener(_el$7, "mouseleave", $8tj43$
|
|
4928
|
-
$8tj43$addEventListener(_el$7, "mouseenter", $8tj43$
|
|
4998
|
+
$8tj43$addEventListener(_el$7, "mouseleave", $8tj43$catchify1(() => write_selected_index_()));
|
|
4999
|
+
$8tj43$addEventListener(_el$7, "mouseenter", $8tj43$catchify1(() => write_selected_index_([itemIndex_(), index])));
|
|
4929
5000
|
$8tj43$insert(_el$7, $8tj43$createComponent((0, $02b6641aa50ce528$export$ba17c5b7e6dda39f), {
|
|
4930
5001
|
class_: "title line-clamp",
|
|
4931
5002
|
get whole_text_to_display_() {
|
|
@@ -5048,7 +5119,7 @@ function $4acc866f8fdfc002$export$af1fb307bbba2417(_ref) {
|
|
|
5048
5119
|
},
|
|
5049
5120
|
extraTitleRowElements_: () => (() => {
|
|
5050
5121
|
var _el$ = $8tj43$getNextElement($4acc866f8fdfc002$var$_tmpl$);
|
|
5051
|
-
$8tj43$addEventListener(_el$, "click", $8tj43$
|
|
5122
|
+
$8tj43$addEventListener(_el$, "click", $8tj43$catchify1(() => set_unfiltered_previous_searches_([])), true);
|
|
5052
5123
|
$8tj43$insert(_el$, () => i18n_.clear_all_from_filter_crumbs_());
|
|
5053
5124
|
$8tj43$runHydrationEvents();
|
|
5054
5125
|
return _el$;
|
|
@@ -5199,7 +5270,7 @@ function $06fcd2a345efd24d$var$RawSearchModalV2(_ref) {
|
|
|
5199
5270
|
const random_classname_body = $8tj43$make_random_classname();
|
|
5200
5271
|
const backdropRandomClassname = $8tj43$make_random_classname();
|
|
5201
5272
|
const [get_modal_search_results_, set_modal_search_results_] = $8tj43$createSignal();
|
|
5202
|
-
const close_on_escape_handler = $8tj43$
|
|
5273
|
+
const close_on_escape_handler = $8tj43$catchify1(evt => {
|
|
5203
5274
|
if (evt.key === "Escape") {
|
|
5204
5275
|
evt.preventDefault(); // Prevent the browser from closing/cancelling the modal so our animations have time to run
|
|
5205
5276
|
close_modal_();
|
|
@@ -5302,7 +5373,7 @@ function $06fcd2a345efd24d$var$RawSearchModalV2(_ref) {
|
|
|
5302
5373
|
$8tj43$createEffect($8tj43$on(get_search_field_value_, () => {
|
|
5303
5374
|
setShowStaleListingSuggestions(true);
|
|
5304
5375
|
clearTimeout(listingSuggestionsDebounceTimeout);
|
|
5305
|
-
listingSuggestionsDebounceTimeout = setTimeout($8tj43$
|
|
5376
|
+
listingSuggestionsDebounceTimeout = setTimeout($8tj43$catchify1(() => setShowStaleListingSuggestions(false)), 350);
|
|
5306
5377
|
}, {
|
|
5307
5378
|
defer: true
|
|
5308
5379
|
}));
|
|
@@ -5440,7 +5511,7 @@ function $06fcd2a345efd24d$var$RawSearchModalV2(_ref) {
|
|
|
5440
5511
|
const discoverMoreSection = (() => {
|
|
5441
5512
|
var _el$7 = $8tj43$getNextElement($06fcd2a345efd24d$var$_tmpl$4),
|
|
5442
5513
|
_el$8 = _el$7.firstChild;
|
|
5443
|
-
$8tj43$addEventListener(_el$8, "click", $8tj43$
|
|
5514
|
+
$8tj43$addEventListener(_el$8, "click", $8tj43$catchify1(() => submit_query_()), true);
|
|
5444
5515
|
$8tj43$insert(_el$8, (() => {
|
|
5445
5516
|
var _c$ = $8tj43$memo(() => !!get_search_field_value_());
|
|
5446
5517
|
return () => _c$() ? i18n_.modal_view_all_results_()((() => {
|
|
@@ -5473,7 +5544,7 @@ function $06fcd2a345efd24d$var$RawSearchModalV2(_ref) {
|
|
|
5473
5544
|
}
|
|
5474
5545
|
});
|
|
5475
5546
|
if (setSearchFieldOuterWidth_) {
|
|
5476
|
-
const resizeObserver = new ResizeObserver($8tj43$
|
|
5547
|
+
const resizeObserver = new ResizeObserver($8tj43$catchify1(records => setSearchFieldOuterWidth_(records.at(-1).contentRect.width)));
|
|
5477
5548
|
resizeObserver.observe(search_field);
|
|
5478
5549
|
$8tj43$onCleanup(() => resizeObserver.disconnect());
|
|
5479
5550
|
}
|
|
@@ -5515,7 +5586,7 @@ function $06fcd2a345efd24d$var$RawSearchModalV2(_ref) {
|
|
|
5515
5586
|
_el$13 = _el$15.nextSibling,
|
|
5516
5587
|
_el$16 = _el$12.nextSibling,
|
|
5517
5588
|
[_el$17, _co$3] = $8tj43$getNextMarker(_el$16.nextSibling);
|
|
5518
|
-
$8tj43$addEventListener(_el$11, "click", $8tj43$
|
|
5589
|
+
$8tj43$addEventListener(_el$11, "click", $8tj43$catchify1(_ref3 => {
|
|
5519
5590
|
let {
|
|
5520
5591
|
target: target,
|
|
5521
5592
|
currentTarget: currentTarget
|
|
@@ -5524,13 +5595,13 @@ function $06fcd2a345efd24d$var$RawSearchModalV2(_ref) {
|
|
|
5524
5595
|
}), true);
|
|
5525
5596
|
$8tj43$use(element => {
|
|
5526
5597
|
// We don't have contained queries in JS so use ResizeObserver instead. This is so that the modal automatically assumes a mobile layout when aligning with a short SearchField.
|
|
5527
|
-
const resizeObserver = new ResizeObserver($8tj43$
|
|
5598
|
+
const resizeObserver = new ResizeObserver($8tj43$catchify1(records => setModalBodyWidth(records.at(-1).contentRect.width)));
|
|
5528
5599
|
resizeObserver.observe(element);
|
|
5529
5600
|
$8tj43$onCleanup(() => resizeObserver.disconnect());
|
|
5530
5601
|
}, _el$12);
|
|
5531
5602
|
$8tj43$insert(_el$12, search_field, _el$15, _co$2);
|
|
5532
5603
|
$8tj43$use(el => {
|
|
5533
|
-
$8tj43$
|
|
5604
|
+
$8tj43$catchify1((0, $558d0596fcf0e0b0$export$50b90be27d8502d9))(el, bodyAlignmentSignal, bottom_distance_under_modal_ || (() => 0.03 // 3% under SearchModalV2 by default
|
|
5534
5605
|
));
|
|
5535
5606
|
// Workaround part 2 of https://github.com/solidjs/solid/issues/2030
|
|
5536
5607
|
// We can't just re-render the components in the two different <Show> branches because <Show> would infinite loop because it depends on the resource created by the components
|
|
@@ -5608,7 +5679,7 @@ function $6a439680ae7e9ba3$var$ActualTabs(props) {
|
|
|
5608
5679
|
});
|
|
5609
5680
|
const isSelected = $8tj43$createSelector(currentlySelected);
|
|
5610
5681
|
const owner = $8tj43$getOwner();
|
|
5611
|
-
const updateTabsSignal = $8tj43$
|
|
5682
|
+
const updateTabsSignal = $8tj43$catchify(() => $8tj43$runWithOwner(owner, () => setTabsReactive([...ourTabsSet])));
|
|
5612
5683
|
const ourTabsSet = $6a439680ae7e9ba3$var$useTabs();
|
|
5613
5684
|
const location = $8tj43$use_href_accessor1();
|
|
5614
5685
|
const linkWithChangedHash = hash => {
|
|
@@ -5743,7 +5814,7 @@ function $6a439680ae7e9ba3$export$3e41faf802a29e71(props) {
|
|
|
5743
5814
|
async function $d5f1e6a0f9117286$export$79b1565500412d9b(search_modal, modal_fn_opts, parent) {
|
|
5744
5815
|
const body = parent || document.body || (await (0, $8tj43$observer).wait_for_element("body"));
|
|
5745
5816
|
let dispose_and_remove;
|
|
5746
|
-
const open_modal_ = $8tj43$
|
|
5817
|
+
const open_modal_ = $8tj43$catchify1(async function () {
|
|
5747
5818
|
let extra_options_for_modal = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
5748
5819
|
let on_dispose = arguments.length > 1 ? arguments[1] : undefined;
|
|
5749
5820
|
// Below await is very intentional,
|
|
@@ -5778,7 +5849,7 @@ async function $d5f1e6a0f9117286$export$79b1565500412d9b(search_modal, modal_fn_
|
|
|
5778
5849
|
actually_close();else if (!animation_started && closing_animation) {
|
|
5779
5850
|
var _catchify;
|
|
5780
5851
|
animation_started = +new Date();
|
|
5781
|
-
(_catchify = $8tj43$
|
|
5852
|
+
(_catchify = $8tj43$catchify1(closing_animation)()) === null || _catchify === void 0 || _catchify.then($8tj43$catchify1(actually_close));
|
|
5782
5853
|
} else actually_close();
|
|
5783
5854
|
};
|
|
5784
5855
|
return search_modal({
|
|
@@ -5791,7 +5862,7 @@ async function $d5f1e6a0f9117286$export$79b1565500412d9b(search_modal, modal_fn_
|
|
|
5791
5862
|
});
|
|
5792
5863
|
body.append(...modal_els);
|
|
5793
5864
|
});
|
|
5794
|
-
const close_modal_ = $8tj43$
|
|
5865
|
+
const close_modal_ = $8tj43$catchify1(() => {
|
|
5795
5866
|
if (dispose_and_remove) {
|
|
5796
5867
|
// modal is open
|
|
5797
5868
|
const dispose_fn = dispose_and_remove;
|
|
@@ -5808,7 +5879,7 @@ async function $d5f1e6a0f9117286$export$79b1565500412d9b(search_modal, modal_fn_
|
|
|
5808
5879
|
function $972f6bce0f9d61be$export$e183a13865960371(params_to_default_value, router_) {
|
|
5809
5880
|
const signals = {};
|
|
5810
5881
|
const entries = Object.entries(params_to_default_value);
|
|
5811
|
-
const event_handler = $8tj43$
|
|
5882
|
+
const event_handler = $8tj43$catchify1((what_happened, args) => {
|
|
5812
5883
|
// Intentionally always update our signals to the history state to allow external control of SDK state for doing things like https://linear.app/depictai/issue/X-1432/is-this-possible-with-the-depict-sdk
|
|
5813
5884
|
if (what_happened !== "popstate") return;
|
|
5814
5885
|
// Had to undo the comment above,but leaving the history. Doing this because discovering why it doesn't work is a deja-vu and I don't want to have to discover it again.
|
|
@@ -5840,8 +5911,8 @@ function $972f6bce0f9d61be$export$e183a13865960371(params_to_default_value, rout
|
|
|
5840
5911
|
});
|
|
5841
5912
|
// 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
|
|
5842
5913
|
(0, $8tj43$instant_exec_on_suspect_history_change).add(event_handler);
|
|
5843
|
-
$8tj43$onCleanup($8tj43$
|
|
5844
|
-
$8tj43$createEffect($8tj43$
|
|
5914
|
+
$8tj43$onCleanup($8tj43$catchify1(() => (0, $8tj43$instant_exec_on_suspect_history_change).delete(event_handler)));
|
|
5915
|
+
$8tj43$createEffect($8tj43$catchify1(() => $8tj43$untrack($8tj43$catchify1(() => $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
|
|
5845
5916
|
return signals;
|
|
5846
5917
|
}
|
|
5847
5918
|
function $972f6bce0f9d61be$var$history_state_change(signals, entries, state) {
|
|
@@ -5999,7 +6070,7 @@ function $0706a7702baafc06$export$6b35356958ae5587(props) {
|
|
|
5999
6070
|
// If someone clicks on a product card in the shop the look modal, close the modal the next time the href changes
|
|
6000
6071
|
for (const item of resolved()) {
|
|
6001
6072
|
if (!(item instanceof Element)) return;
|
|
6002
|
-
item.addEventListener("click", $8tj43$
|
|
6073
|
+
item.addEventListener("click", $8tj43$catchify1(() =>
|
|
6003
6074
|
// run with modal owner so we don't do stuff after the modal closes
|
|
6004
6075
|
// can't have the owner of the product card as that gets disposed if the productId changes which might be too early (before location.href has changed)
|
|
6005
6076
|
$8tj43$runWithOwner(props.modalOwner_, () => $8tj43$createEffect($8tj43$on(hrefWithoutHash, props.actually_close_modal_, {
|
|
@@ -6125,7 +6196,7 @@ function $d2a67555f75bef95$export$a3cbef418994a664(props) {
|
|
|
6125
6196
|
var _el$ = $8tj43$getNextElement($d2a67555f75bef95$var$_tmpl$3),
|
|
6126
6197
|
_el$2 = _el$.firstChild,
|
|
6127
6198
|
_el$3 = _el$2.nextSibling;
|
|
6128
|
-
var _ref$ = $8tj43$
|
|
6199
|
+
var _ref$ = $8tj43$catchify1(element => {
|
|
6129
6200
|
const disconnect = (0, $8tj43$observer).onexists(element, _ref => {
|
|
6130
6201
|
let {
|
|
6131
6202
|
element: element
|
|
@@ -6312,7 +6383,7 @@ function $6b0fd8fd20df8ccf$var$actualSetupModal() {
|
|
|
6312
6383
|
(0, $68e6625c8d51f847$export$3064e1e8c6513da3).add(history_key);
|
|
6313
6384
|
const actually_close_modal_ = () => set_history_value(false);
|
|
6314
6385
|
const owner = $8tj43$getOwner();
|
|
6315
|
-
$8tj43$
|
|
6386
|
+
$8tj43$catchify1(async () => {
|
|
6316
6387
|
const {
|
|
6317
6388
|
open_modal_: open_modal_,
|
|
6318
6389
|
close_modal_: close_modal_
|
|
@@ -6392,15 +6463,15 @@ function $ad371564683947ab$export$6c6d7a51fa9aa15d(props) {
|
|
|
6392
6463
|
$8tj43$insert(details_, [summary_, $8tj43$createComponent(ExpandingContainer, {
|
|
6393
6464
|
children: children
|
|
6394
6465
|
})], null);
|
|
6395
|
-
if (!$8tj43$untrack(is_in_dom)) (0, $8tj43$observer).wait_for_element(details_).then($8tj43$
|
|
6396
|
-
$8tj43$createEffect($8tj43$
|
|
6466
|
+
if (!$8tj43$untrack(is_in_dom)) (0, $8tj43$observer).wait_for_element(details_).then($8tj43$catchify1(() => set_is_in_dom(true)));
|
|
6467
|
+
$8tj43$createEffect($8tj43$catchify1(async () => {
|
|
6397
6468
|
const is_open = is_open_memo();
|
|
6398
6469
|
if (!is_in_dom())
|
|
6399
6470
|
// wait with setting state until we're in DOM, animation won't work otherwise
|
|
6400
6471
|
return;
|
|
6401
6472
|
if (dont_animate_if_instant_open_ && fresh_component && !timeout_started) {
|
|
6402
6473
|
timeout_started = true;
|
|
6403
|
-
setTimeout($8tj43$
|
|
6474
|
+
setTimeout($8tj43$catchify1(() => fresh_component = false));
|
|
6404
6475
|
}
|
|
6405
6476
|
if (is_open) {
|
|
6406
6477
|
details_.open = true; // open up the toggle so the animation can happen
|
|
@@ -6408,10 +6479,10 @@ function $ad371564683947ab$export$6c6d7a51fa9aa15d(props) {
|
|
|
6408
6479
|
await expand(0, do_duration);
|
|
6409
6480
|
} else {
|
|
6410
6481
|
const animation = await collapse();
|
|
6411
|
-
animation === null || animation === void 0 || animation.addEventListener("finish", $8tj43$
|
|
6482
|
+
animation === null || animation === void 0 || animation.addEventListener("finish", $8tj43$catchify1(() => details_.open = false));
|
|
6412
6483
|
}
|
|
6413
6484
|
}));
|
|
6414
|
-
details_.addEventListener("toggle", $8tj43$
|
|
6485
|
+
details_.addEventListener("toggle", $8tj43$catchify1(() => {
|
|
6415
6486
|
const {
|
|
6416
6487
|
open: open
|
|
6417
6488
|
} = details_;
|
|
@@ -6421,11 +6492,11 @@ function $ad371564683947ab$export$6c6d7a51fa9aa15d(props) {
|
|
|
6421
6492
|
}) // in case someone somehow toggles it without us intercepting it at least follow suit
|
|
6422
6493
|
);
|
|
6423
6494
|
|
|
6424
|
-
summary_.addEventListener("click", $8tj43$
|
|
6495
|
+
summary_.addEventListener("click", $8tj43$catchify1(ev => {
|
|
6425
6496
|
ev.preventDefault();
|
|
6426
6497
|
toggle();
|
|
6427
6498
|
}));
|
|
6428
|
-
summary_.addEventListener("keydown", $8tj43$
|
|
6499
|
+
summary_.addEventListener("keydown", $8tj43$catchify1(ev => {
|
|
6429
6500
|
const {
|
|
6430
6501
|
key: key
|
|
6431
6502
|
} = ev;
|
|
@@ -6465,7 +6536,7 @@ function $a61a2051e15c8d7a$export$5196e4c01fa56fcb(_ref) {
|
|
|
6465
6536
|
} = _ref;
|
|
6466
6537
|
let close_toast_;
|
|
6467
6538
|
const stay_open_promise = new Promise(r => close_toast_ = r);
|
|
6468
|
-
$8tj43$
|
|
6539
|
+
$8tj43$catchify1(async () => {
|
|
6469
6540
|
const closing_animation_duration = 300; // ms
|
|
6470
6541
|
const element = (() => {
|
|
6471
6542
|
var _el$ = $8tj43$getNextElement($a61a2051e15c8d7a$var$_tmpl$);
|
|
@@ -6476,8 +6547,8 @@ function $a61a2051e15c8d7a$export$5196e4c01fa56fcb(_ref) {
|
|
|
6476
6547
|
})();
|
|
6477
6548
|
const [, set_is_showing_toast] = $a61a2051e15c8d7a$export$22970a0140fc759c;
|
|
6478
6549
|
// if this is a memory leak the garbage collector is stupid - does someone know?
|
|
6479
|
-
for (const ev of ["pointerover", "focusin"]) element.addEventListener(ev, $8tj43$
|
|
6480
|
-
for (const ev of ["pointerout", "focusout"]) element.addEventListener(ev, $8tj43$
|
|
6550
|
+
for (const ev of ["pointerover", "focusin"]) element.addEventListener(ev, $8tj43$catchify1(() => closing_animation.pause()));
|
|
6551
|
+
for (const ev of ["pointerout", "focusout"]) element.addEventListener(ev, $8tj43$catchify1(() => closing_animation.play()));
|
|
6481
6552
|
const body = await (0, $8tj43$observer).wait_for_element("body");
|
|
6482
6553
|
const x_translate = "translateX(-50%) ";
|
|
6483
6554
|
let remove_keyboard_listener;
|
|
@@ -6502,7 +6573,7 @@ function $a61a2051e15c8d7a$export$5196e4c01fa56fcb(_ref) {
|
|
|
6502
6573
|
// let other toasts close us if they open while we're still here
|
|
6503
6574
|
$a61a2051e15c8d7a$var$closing_functions.add(close_toast_);
|
|
6504
6575
|
set_is_showing_toast(true);
|
|
6505
|
-
const handler = $8tj43$
|
|
6576
|
+
const handler = $8tj43$catchify1(_ref2 => {
|
|
6506
6577
|
let {
|
|
6507
6578
|
key: key
|
|
6508
6579
|
} = _ref2;
|
|
@@ -6615,7 +6686,7 @@ function $b4465d8d605f61e9$export$8895d39404bd2bb1(props) {
|
|
|
6615
6686
|
var _el$2 = $8tj43$getNextElement($b4465d8d605f61e9$var$_tmpl$2),
|
|
6616
6687
|
_el$3 = _el$2.firstChild,
|
|
6617
6688
|
_el$4 = _el$3.nextSibling;
|
|
6618
|
-
$8tj43$addEventListener(_el$3, "click", $8tj43$
|
|
6689
|
+
$8tj43$addEventListener(_el$3, "click", $8tj43$catchify1(() => {
|
|
6619
6690
|
set_selected_filters(previous_selected_filters);
|
|
6620
6691
|
set_expanded_hierarchical_filters(previous_expanded_hierarchical_filters);
|
|
6621
6692
|
if (previousExpandedFilters) expanded_filters_ === null || expanded_filters_ === void 0 || expanded_filters_[1](previousExpandedFilters);
|
|
@@ -6693,7 +6764,7 @@ function $4711a82d08d2021b$export$fecbb157621501bd(_ref) {
|
|
|
6693
6764
|
get children() {
|
|
6694
6765
|
return [(() => {
|
|
6695
6766
|
var _el$6 = $8tj43$getNextElement($4711a82d08d2021b$var$_tmpl$);
|
|
6696
|
-
$8tj43$addEventListener(_el$6, "click", $8tj43$
|
|
6767
|
+
$8tj43$addEventListener(_el$6, "click", $8tj43$catchify1(() =>
|
|
6697
6768
|
// click event handlers don't have an owner, carry it over
|
|
6698
6769
|
$8tj43$runWithOwner(owner, () => $b4465d8d605f61e9$export$8895d39404bd2bb1({
|
|
6699
6770
|
selected_filters_: selected_filters_,
|
|
@@ -6888,7 +6959,7 @@ function $4711a82d08d2021b$export$fecbb157621501bd(_ref) {
|
|
|
6888
6959
|
_el$28 = _el$26.firstChild,
|
|
6889
6960
|
[_el$29, _co$10] = $8tj43$getNextMarker(_el$28.nextSibling),
|
|
6890
6961
|
_el$27 = _el$29.nextSibling;
|
|
6891
|
-
$8tj43$addEventListener(_el$26, "click", $8tj43$
|
|
6962
|
+
$8tj43$addEventListener(_el$26, "click", $8tj43$catchify1(() => {
|
|
6892
6963
|
const to_remove = selected_data();
|
|
6893
6964
|
const cloned_selected_filters = [...read_selected_filters()];
|
|
6894
6965
|
cloned_selected_filters.splice(index_in_selected_filters, 1);
|
|
@@ -6944,9 +7015,9 @@ function $4711a82d08d2021b$export$fecbb157621501bd(_ref) {
|
|
|
6944
7015
|
});
|
|
6945
7016
|
const [is_in_dom, set_is_in_dom] = $8tj43$createSignal(document.documentElement.contains(outmost_element));
|
|
6946
7017
|
const hidden = $8tj43$createMemo(() => get_search_filters_open_() || get_search_sorting_open_());
|
|
6947
|
-
if (!$8tj43$untrack(is_in_dom)) (0, $8tj43$observer).wait_for_element(outmost_element).then($8tj43$
|
|
7018
|
+
if (!$8tj43$untrack(is_in_dom)) (0, $8tj43$observer).wait_for_element(outmost_element).then($8tj43$catchify1(() => set_is_in_dom(true)));
|
|
6948
7019
|
outmost_element.classList.add("selected-filters");
|
|
6949
|
-
$8tj43$createEffect($8tj43$
|
|
7020
|
+
$8tj43$createEffect($8tj43$catchify1(async () => {
|
|
6950
7021
|
if (!is_in_dom())
|
|
6951
7022
|
// wait with setting state until we're in DOM, animation won't work otherwise
|
|
6952
7023
|
return;
|
|
@@ -6984,7 +7055,7 @@ const $19e828709c7723a0$export$48513f6b9f8ce62d = props => {
|
|
|
6984
7055
|
// 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.
|
|
6985
7056
|
// 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
|
|
6986
7057
|
// Why it can't be done instantaneously I don't know.
|
|
6987
|
-
input_el.addEventListener("change", $8tj43$
|
|
7058
|
+
input_el.addEventListener("change", $8tj43$catchify1(() => requestAnimationFrame($8tj43$catchify1(() => {
|
|
6988
7059
|
if (input_el.checked !== checked()) input_el.checked = checked();
|
|
6989
7060
|
}))));
|
|
6990
7061
|
(_props$input_ref_ = props.input_ref_) === null || _props$input_ref_ === void 0 || _props$input_ref_.call(props, input_el);
|
|
@@ -7047,7 +7118,7 @@ function $3e850b2f2cca761f$export$ca21a16d65b3dd8(_ref) {
|
|
|
7047
7118
|
_el$3 = _el$.firstChild,
|
|
7048
7119
|
[_el$4, _co$] = $8tj43$getNextMarker(_el$3.nextSibling),
|
|
7049
7120
|
_el$2 = _el$4.nextSibling;
|
|
7050
|
-
$8tj43$addEventListener(_el$, "click", $8tj43$
|
|
7121
|
+
$8tj43$addEventListener(_el$, "click", $8tj43$catchify1(() => set_show_extras(p => !p)), true);
|
|
7051
7122
|
$8tj43$insert(_el$, $8tj43$createComponent((0, $ff3225aef892a467$export$f21ab0717a89c77f), {}), _el$4, _co$);
|
|
7052
7123
|
$8tj43$insert(_el$2, (() => {
|
|
7053
7124
|
var _c$ = $8tj43$memo(() => !!get_show_extras());
|
|
@@ -7168,7 +7239,7 @@ function $133484ef10e4e954$export$dd948f91abc3a1c4(_ref) {
|
|
|
7168
7239
|
}) : []);
|
|
7169
7240
|
});
|
|
7170
7241
|
$8tj43$onCleanup(() => set_view_more_button_below_group_());
|
|
7171
|
-
$8tj43$createEffect($8tj43$
|
|
7242
|
+
$8tj43$createEffect($8tj43$catchify1(async () => {
|
|
7172
7243
|
if (!togglable_rest()) {
|
|
7173
7244
|
await collapse();
|
|
7174
7245
|
return;
|
|
@@ -7181,7 +7252,7 @@ function $133484ef10e4e954$export$dd948f91abc3a1c4(_ref) {
|
|
|
7181
7252
|
[_el$3, _co$] = $8tj43$getNextMarker(_el$2.nextSibling),
|
|
7182
7253
|
_el$4 = _el$3.nextSibling,
|
|
7183
7254
|
[_el$5, _co$2] = $8tj43$getNextMarker(_el$4.nextSibling);
|
|
7184
|
-
$8tj43$addEventListener(_el$, "change", $8tj43$
|
|
7255
|
+
$8tj43$addEventListener(_el$, "change", $8tj43$catchify1(() => {
|
|
7185
7256
|
const set_filter = existing_filter();
|
|
7186
7257
|
const {
|
|
7187
7258
|
field: field,
|
|
@@ -7270,7 +7341,7 @@ function $b54fc842e721c9eb$export$430444115f70a734(_ref) {
|
|
|
7270
7341
|
_el$9 = _el$3.nextSibling,
|
|
7271
7342
|
[_el$10, _co$2] = $8tj43$getNextMarker(_el$9.nextSibling);
|
|
7272
7343
|
$8tj43$setAttribute(_el$2, "for", random_selector);
|
|
7273
|
-
$8tj43$addEventListener(_el$4, "change", $8tj43$
|
|
7344
|
+
$8tj43$addEventListener(_el$4, "change", $8tj43$catchify1(() => {
|
|
7274
7345
|
const filter_object = {
|
|
7275
7346
|
op: filter_().op,
|
|
7276
7347
|
field: filter_().field,
|
|
@@ -7365,7 +7436,7 @@ function $1e7465a8ffa97f6c$export$e0d834a0ad870cda(_ref) {
|
|
|
7365
7436
|
});
|
|
7366
7437
|
$8tj43$createComputed(() => {
|
|
7367
7438
|
clearTimeout(debounce_timeout);
|
|
7368
|
-
debounce_timeout = setTimeout($8tj43$
|
|
7439
|
+
debounce_timeout = setTimeout($8tj43$catchify1(range => $8tj43$untrack(() => {
|
|
7369
7440
|
const default_data = defaultRange();
|
|
7370
7441
|
const filter_object = {
|
|
7371
7442
|
op: filter_().op,
|
|
@@ -7444,22 +7515,22 @@ function $1e7465a8ffa97f6c$var$RangeSelector(_ref3) {
|
|
|
7444
7515
|
[_el$22, _co$6] = $8tj43$getNextMarker(_el$21.nextSibling);
|
|
7445
7516
|
var _ref$ = price_input_1;
|
|
7446
7517
|
typeof _ref$ === "function" ? $8tj43$use(_ref$, _el$4) : price_input_1 = _el$4;
|
|
7447
|
-
$8tj43$addEventListener(_el$4, "keydown", $8tj43$
|
|
7518
|
+
$8tj43$addEventListener(_el$4, "keydown", $8tj43$catchify1(_ref4 => {
|
|
7448
7519
|
let {
|
|
7449
7520
|
key: key
|
|
7450
7521
|
} = _ref4;
|
|
7451
7522
|
if (key === "Enter") $1e7465a8ffa97f6c$var$set_range_with_sanitation(min_, max_, current_range_, 0, price_input_1);
|
|
7452
7523
|
}), true);
|
|
7453
|
-
$8tj43$addEventListener(_el$4, "blur", $8tj43$
|
|
7524
|
+
$8tj43$addEventListener(_el$4, "blur", $8tj43$catchify1(() => $1e7465a8ffa97f6c$var$set_range_with_sanitation(min_, max_, current_range_, 0, price_input_1)));
|
|
7454
7525
|
var _ref$2 = price_input_2;
|
|
7455
7526
|
typeof _ref$2 === "function" ? $8tj43$use(_ref$2, _el$7) : price_input_2 = _el$7;
|
|
7456
|
-
$8tj43$addEventListener(_el$7, "keydown", $8tj43$
|
|
7527
|
+
$8tj43$addEventListener(_el$7, "keydown", $8tj43$catchify1(_ref5 => {
|
|
7457
7528
|
let {
|
|
7458
7529
|
key: key
|
|
7459
7530
|
} = _ref5;
|
|
7460
7531
|
if (key === "Enter") $1e7465a8ffa97f6c$var$set_range_with_sanitation(min_, max_, current_range_, 1, price_input_2);
|
|
7461
7532
|
}), true);
|
|
7462
|
-
$8tj43$addEventListener(_el$7, "blur", $8tj43$
|
|
7533
|
+
$8tj43$addEventListener(_el$7, "blur", $8tj43$catchify1(() => $1e7465a8ffa97f6c$var$set_range_with_sanitation(min_, max_, current_range_, 1, price_input_2)));
|
|
7463
7534
|
$8tj43$insert(_el$, $8tj43$createComponent($1e7465a8ffa97f6c$var$ExponentialSlider, {
|
|
7464
7535
|
max_: max_,
|
|
7465
7536
|
min_: min_,
|
|
@@ -7604,7 +7675,7 @@ function $1e7465a8ffa97f6c$var$LinearSlider(_ref8) {
|
|
|
7604
7675
|
return [(() => {
|
|
7605
7676
|
var _el$25 = $8tj43$getNextElement($1e7465a8ffa97f6c$var$_tmpl$2),
|
|
7606
7677
|
_el$26 = _el$25.firstChild;
|
|
7607
|
-
$8tj43$addEventListener(_el$25, "click", $8tj43$
|
|
7678
|
+
$8tj43$addEventListener(_el$25, "click", $8tj43$catchify1(e => {
|
|
7608
7679
|
const rect = clickable_slider.getBoundingClientRect();
|
|
7609
7680
|
const slider_beginning_left = rect.left;
|
|
7610
7681
|
const slider_width = rect.width;
|
|
@@ -7630,12 +7701,12 @@ function $1e7465a8ffa97f6c$var$LinearSlider(_ref8) {
|
|
|
7630
7701
|
range_input_1 = el;
|
|
7631
7702
|
set_value(range_input_1, 0);
|
|
7632
7703
|
}, _el$28);
|
|
7633
|
-
$8tj43$addEventListener(_el$28, "input", $8tj43$
|
|
7704
|
+
$8tj43$addEventListener(_el$28, "input", $8tj43$catchify1(() => $1e7465a8ffa97f6c$var$set_range_with_sanitation(min_, max_, current_range_, 0, range_input_1, offset_value_calculator_)), true);
|
|
7634
7705
|
$8tj43$use(el => {
|
|
7635
7706
|
range_input_2 = el;
|
|
7636
7707
|
set_value(range_input_2, 1);
|
|
7637
7708
|
}, _el$29);
|
|
7638
|
-
$8tj43$addEventListener(_el$29, "input", $8tj43$
|
|
7709
|
+
$8tj43$addEventListener(_el$29, "input", $8tj43$catchify1(() => $1e7465a8ffa97f6c$var$set_range_with_sanitation(min_, max_, current_range_, 1, range_input_2, offset_value_calculator_)), true);
|
|
7639
7710
|
$8tj43$effect(_p$ => {
|
|
7640
7711
|
var _v$10 = should_be_disabled_(),
|
|
7641
7712
|
_v$11 = i18n_.range_filter_low_point_aria_label_(),
|
|
@@ -8101,7 +8172,7 @@ function $0ae614c5c7babb43$export$a32086fa6616eafd(_ref) {
|
|
|
8101
8172
|
}
|
|
8102
8173
|
while (execute_when_structure_finished.length) execute_when_structure_finished.pop()();
|
|
8103
8174
|
$0ae614c5c7babb43$var$expand_until_choice(data_structure);
|
|
8104
|
-
$8tj43$
|
|
8175
|
+
$8tj43$dlog1("CheckboxHierarchicalFilter: Recomputed structured_categories", data_structure);
|
|
8105
8176
|
return data_structure;
|
|
8106
8177
|
});
|
|
8107
8178
|
const some_top_level_are_hidden = $8tj43$createMemo(() => Object.keys(structured_categories()).length > $0ae614c5c7babb43$var$max_visible_without_collapsing);
|
|
@@ -8131,7 +8202,7 @@ function $0ae614c5c7babb43$export$a32086fa6616eafd(_ref) {
|
|
|
8131
8202
|
}) : []);
|
|
8132
8203
|
});
|
|
8133
8204
|
$8tj43$onCleanup(() => set_view_more_button_below_group());
|
|
8134
|
-
$8tj43$createEffect($8tj43$
|
|
8205
|
+
$8tj43$createEffect($8tj43$catchify1(async () => {
|
|
8135
8206
|
if (!some_top_level_are_hidden()) {
|
|
8136
8207
|
await collapse();
|
|
8137
8208
|
return;
|
|
@@ -8222,7 +8293,7 @@ function $0ae614c5c7babb43$var$render_stuff(data, existing_filter, i18n_, filter
|
|
|
8222
8293
|
return (_value$is_checked_$ = (_value7 = value()) === null || _value7 === void 0 ? void 0 : (_value7$is_checked_ = _value7.is_checked_) === null || _value7$is_checked_ === void 0 ? void 0 : (_value7$is_checked_$ = _value7$is_checked_[0]) === null || _value7$is_checked_$ === void 0 ? void 0 : _value7$is_checked_$.call(_value7$is_checked_)) !== null && _value$is_checked_$ !== void 0 ? _value$is_checked_$ : false;
|
|
8223
8294
|
},
|
|
8224
8295
|
input_ref_: input => {
|
|
8225
|
-
input.addEventListener("change", $8tj43$
|
|
8296
|
+
input.addEventListener("change", $8tj43$catchify1(() => $8tj43$untrack(() => {
|
|
8226
8297
|
var _value9;
|
|
8227
8298
|
const {
|
|
8228
8299
|
checked: checked
|
|
@@ -8328,7 +8399,7 @@ function $0ae614c5c7babb43$var$batching_filter_state_syncer(props) {
|
|
|
8328
8399
|
existing_filter_: existing_filter_
|
|
8329
8400
|
} = props;
|
|
8330
8401
|
let sync_queued = false;
|
|
8331
|
-
const sync_fn = $8tj43$
|
|
8402
|
+
const sync_fn = $8tj43$catchify1(async () => {
|
|
8332
8403
|
sync_queued = false;
|
|
8333
8404
|
// if we change, update filter state - next microtask, so that "reactions" to the change can process before we send it off to the API
|
|
8334
8405
|
const set_filter = existing_filter_();
|
|
@@ -8352,7 +8423,7 @@ function $0ae614c5c7babb43$var$batching_filter_state_syncer(props) {
|
|
|
8352
8423
|
...base_object,
|
|
8353
8424
|
data: data
|
|
8354
8425
|
};
|
|
8355
|
-
$8tj43$
|
|
8426
|
+
$8tj43$dlog1("CheckboxHierarchicalFilter: Updating API state", filter_object);
|
|
8356
8427
|
const selected_filters = [...selected_filters_[0]()];
|
|
8357
8428
|
if (set_filter) selected_filters.splice(selected_filters.indexOf(set_filter), 1);
|
|
8358
8429
|
if (filter_object.data.length) selected_filters.push(filter_object);
|
|
@@ -8390,13 +8461,13 @@ function $0ae614c5c7babb43$var$create_updating_signal(_ref3) {
|
|
|
8390
8461
|
$8tj43$createComputed($8tj43$on(read_checked, trigger_sync_, {
|
|
8391
8462
|
defer: true
|
|
8392
8463
|
}));
|
|
8393
|
-
$8tj43$createComputed($8tj43$on(read_checked, $8tj43$
|
|
8464
|
+
$8tj43$createComputed($8tj43$on(read_checked, $8tj43$catchify1(new_value => {
|
|
8394
8465
|
if (updating_blocked) return;
|
|
8395
8466
|
for (const child of child_objects) child.is_checked_[1](new_value);
|
|
8396
8467
|
}), {
|
|
8397
8468
|
defer: true
|
|
8398
8469
|
}));
|
|
8399
|
-
$8tj43$createEffect($8tj43$on(get_child_object_values, $8tj43$
|
|
8470
|
+
$8tj43$createEffect($8tj43$on(get_child_object_values, $8tj43$catchify1(() => {
|
|
8400
8471
|
const all_kids_checked = get_child_object_values.every(accessor => accessor());
|
|
8401
8472
|
if (all_kids_checked === read_checked()) return;
|
|
8402
8473
|
updating_blocked = true;
|
|
@@ -8600,7 +8671,7 @@ const $830ea8efda59884e$export$414f6a19d38e655c = _ref => {
|
|
|
8600
8671
|
};
|
|
8601
8672
|
},
|
|
8602
8673
|
get onClick() {
|
|
8603
|
-
return $8tj43$
|
|
8674
|
+
return $8tj43$catchify1(() => {
|
|
8604
8675
|
const set_filter = existing_filter();
|
|
8605
8676
|
const {
|
|
8606
8677
|
field: field,
|
|
@@ -8892,7 +8963,7 @@ function $2cb856c297c53e6c$export$82ed4b28ecb67608(_ref) {
|
|
|
8892
8963
|
}) : []);
|
|
8893
8964
|
});
|
|
8894
8965
|
$8tj43$onCleanup(() => set_view_more_button_below_group_());
|
|
8895
|
-
$8tj43$createEffect($8tj43$
|
|
8966
|
+
$8tj43$createEffect($8tj43$catchify1(async () => {
|
|
8896
8967
|
if (!togglable_rest()) {
|
|
8897
8968
|
await collapse();
|
|
8898
8969
|
set_having_expanding_in_dom(false); // Once animation has finished, remove expanding from DOM
|
|
@@ -8907,7 +8978,7 @@ function $2cb856c297c53e6c$export$82ed4b28ecb67608(_ref) {
|
|
|
8907
8978
|
[_el$3, _co$] = $8tj43$getNextMarker(_el$2.nextSibling),
|
|
8908
8979
|
_el$4 = _el$3.nextSibling,
|
|
8909
8980
|
[_el$5, _co$2] = $8tj43$getNextMarker(_el$4.nextSibling);
|
|
8910
|
-
$8tj43$addEventListener(_el$, "change", $8tj43$
|
|
8981
|
+
$8tj43$addEventListener(_el$, "change", $8tj43$catchify1(() => {
|
|
8911
8982
|
const set_filter = existing_filter();
|
|
8912
8983
|
const {
|
|
8913
8984
|
field: field,
|
|
@@ -9458,7 +9529,7 @@ function $f6b0500577e1b210$var$ActualFilterBody(props) {
|
|
|
9458
9529
|
_el$11 = _el$9.firstChild,
|
|
9459
9530
|
[_el$12, _co$3] = $8tj43$getNextMarker(_el$11.nextSibling),
|
|
9460
9531
|
_el$10 = _el$12.nextSibling;
|
|
9461
|
-
$8tj43$addEventListener(_el$9, "click", $8tj43$
|
|
9532
|
+
$8tj43$addEventListener(_el$9, "click", $8tj43$catchify1(() => {
|
|
9462
9533
|
const new_filter_obj = [...props.selected_filters_[0]()];
|
|
9463
9534
|
for (const filter of filter_array_()) {
|
|
9464
9535
|
const index = new_filter_obj.findIndex(_ref3 => {
|
|
@@ -9530,7 +9601,7 @@ function $f6b0500577e1b210$var$ActualFilterBody(props) {
|
|
|
9530
9601
|
},
|
|
9531
9602
|
get children() {
|
|
9532
9603
|
var _el$29 = $8tj43$getNextElement($f6b0500577e1b210$var$_tmpl$8);
|
|
9533
|
-
$8tj43$addEventListener(_el$29, "click", $8tj43$
|
|
9604
|
+
$8tj43$addEventListener(_el$29, "click", $8tj43$catchify1(() => $b4465d8d605f61e9$export$8895d39404bd2bb1({
|
|
9534
9605
|
user_triggered_: true,
|
|
9535
9606
|
selected_filters_: props.selected_filters_,
|
|
9536
9607
|
i18n_: props.i18n_,
|
|
@@ -9728,14 +9799,14 @@ async function $50aebf5b445518eb$export$58e808b1db15d3bc(options) {
|
|
|
9728
9799
|
headers: headers
|
|
9729
9800
|
} : {}),
|
|
9730
9801
|
method: "POST"
|
|
9731
|
-
}).catch(e => $8tj43$
|
|
9802
|
+
}).catch(e => $8tj43$dlog1("fetch_retry threw", e)).then(async maybe_response => {
|
|
9732
9803
|
var _decoded;
|
|
9733
9804
|
if (!maybe_response) return [];
|
|
9734
9805
|
let decoded;
|
|
9735
9806
|
try {
|
|
9736
9807
|
decoded = await maybe_response.json();
|
|
9737
9808
|
} catch (e) {
|
|
9738
|
-
$8tj43$
|
|
9809
|
+
$8tj43$dlog1("Failed to decode JSON", e);
|
|
9739
9810
|
}
|
|
9740
9811
|
return ((_decoded = decoded) === null || _decoded === void 0 ? void 0 : _decoded.displays) || [];
|
|
9741
9812
|
});
|
|
@@ -9794,7 +9865,7 @@ const $702d7656a373973e$export$824dde41348efed1 = /*@__PURE__*/(() => {
|
|
|
9794
9865
|
|
|
9795
9866
|
const observe_to_signal = (element, setter) => {
|
|
9796
9867
|
const computed_style = getComputedStyle(element);
|
|
9797
|
-
const resize_observer = new ResizeObserver($8tj43$
|
|
9868
|
+
const resize_observer = new ResizeObserver($8tj43$catchify1(() => {
|
|
9798
9869
|
setter(element.getBoundingClientRect().width + parseFloat(computed_style.marginLeft) + parseFloat(computed_style.marginRight) + parseFloat(computed_style.borderRightWidth) + parseFloat(computed_style.borderLeftWidth));
|
|
9799
9870
|
}));
|
|
9800
9871
|
resize_observer.observe(element);
|
|
@@ -9849,7 +9920,7 @@ async function $160ea2b55d8772d2$export$c1a6b039e689a58e(merchant, market, local
|
|
|
9849
9920
|
const in_ls = localStorage[localstorage_key];
|
|
9850
9921
|
if (in_ls) localstorage_value = JSON.parse(in_ls);
|
|
9851
9922
|
} catch (e) {
|
|
9852
|
-
$8tj43$
|
|
9923
|
+
$8tj43$dlog1("Failed parsing JSON from localStorage", e);
|
|
9853
9924
|
}
|
|
9854
9925
|
const updated = (_localstorage_value = localstorage_value) === null || _localstorage_value === void 0 ? void 0 : _localstorage_value.updated;
|
|
9855
9926
|
const now = +new Date();
|
|
@@ -9893,12 +9964,12 @@ async function $160ea2b55d8772d2$var$download_categories(merchant, market, local
|
|
|
9893
9964
|
if (!fetched) return [];
|
|
9894
9965
|
try {
|
|
9895
9966
|
if (fetched.status !== 200) {
|
|
9896
|
-
$8tj43$
|
|
9967
|
+
$8tj43$dlog1("failed to fetch queries, server responded with", fetched.status, fetched, await fetched.text());
|
|
9897
9968
|
return [];
|
|
9898
9969
|
}
|
|
9899
9970
|
return await fetched.json();
|
|
9900
9971
|
} catch (e) {
|
|
9901
|
-
$8tj43$
|
|
9972
|
+
$8tj43$dlog1("failed to decode queries json", fetched, e);
|
|
9902
9973
|
return [];
|
|
9903
9974
|
}
|
|
9904
9975
|
}
|
|
@@ -10199,9 +10270,9 @@ function $284849364a6ef73a$var$_get_cache_obj_for_endpoint2(endpoint) {
|
|
|
10199
10270
|
return (_classPrivateFieldGet4 = $8tj43$babelruntimehelpersclassPrivateFieldGet(this, $284849364a6ef73a$var$_cache_objs))[endpoint] || (_classPrivateFieldGet4[endpoint] = {
|
|
10200
10271
|
in_progress_: {},
|
|
10201
10272
|
cache_: {},
|
|
10202
|
-
finalization_registry_: $8tj43$babelruntimehelpersclassPrivateFieldGet(this, $284849364a6ef73a$var$_supports_finalization_registry) ? new FinalizationRegistry($8tj43$
|
|
10273
|
+
finalization_registry_: $8tj43$babelruntimehelpersclassPrivateFieldGet(this, $284849364a6ef73a$var$_supports_finalization_registry) ? new FinalizationRegistry($8tj43$catchify1(key => {
|
|
10203
10274
|
const our_cache = $8tj43$babelruntimehelpersclassPrivateFieldGet(this, $284849364a6ef73a$var$_cache_objs)[endpoint].cache_;
|
|
10204
|
-
$8tj43$
|
|
10275
|
+
$8tj43$dlog1("[Search API]: removing", key, "from", our_cache);
|
|
10205
10276
|
delete our_cache[key];
|
|
10206
10277
|
})) : undefined
|
|
10207
10278
|
});
|
|
@@ -10338,11 +10409,11 @@ async function $284849364a6ef73a$var$_cached_request2(_ref4) {
|
|
|
10338
10409
|
result = $ed0fefda39a0f15d$export$967e966fca9515e(result);
|
|
10339
10410
|
cache_obj.cache_[body] = new WeakRef(result);
|
|
10340
10411
|
resolve_in_progress(result);
|
|
10341
|
-
setTimeout($8tj43$
|
|
10412
|
+
setTimeout($8tj43$catchify1(() => {
|
|
10342
10413
|
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
|
|
10343
10414
|
else
|
|
10344
10415
|
// delete things from cache after 5 minutes, so it doesn't get too heavy
|
|
10345
|
-
setTimeout($8tj43$
|
|
10416
|
+
setTimeout($8tj43$catchify1(() => delete cache_obj.cache_[body]), 300000);
|
|
10346
10417
|
}), 60000 // cache values for at least 60 seconds
|
|
10347
10418
|
);
|
|
10348
10419
|
|
|
@@ -10374,7 +10445,7 @@ function $9d3d794b62318ecc$export$477caf01aecaeb2a(options) {
|
|
|
10374
10445
|
const [get_selected_filters_, set_selected_filters] = selected_filters_;
|
|
10375
10446
|
const [get_has_sideways_filter_clearing_flag_, set_has_sideways_filter_clearing_flag] = sideways_filter_clearing_flag_;
|
|
10376
10447
|
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");
|
|
10377
|
-
const history_change_handler = $8tj43$
|
|
10448
|
+
const history_change_handler = $8tj43$catchify1(() => set_current_href(location.href));
|
|
10378
10449
|
const owner = $8tj43$getOwner() || $8tj43$createRoot(() => $8tj43$getOwner());
|
|
10379
10450
|
const {
|
|
10380
10451
|
sorting_query_param_: sorting_query_param_,
|
|
@@ -10421,7 +10492,7 @@ function $9d3d794b62318ecc$export$477caf01aecaeb2a(options) {
|
|
|
10421
10492
|
if (override_listing_id_query_param_names_) {
|
|
10422
10493
|
const found_override_listing_id = override_listing_id_query_param_names_.map(n => searchParams.get(n)).find(n => n);
|
|
10423
10494
|
set_override_listing_id(found_override_listing_id || null);
|
|
10424
|
-
if (found_override_listing_id) $8tj43$
|
|
10495
|
+
if (found_override_listing_id) $8tj43$dlog1("Found override query id:", found_override_listing_id); // This stuff might get confusing so better log it
|
|
10425
10496
|
}
|
|
10426
10497
|
|
|
10427
10498
|
if (hash === (0, $2855bffe06ef7a03$export$84daa4fa1471698b)) set_has_sideways_filter_clearing_flag(true);
|
|
@@ -10706,7 +10777,7 @@ function $dea31647b99a443b$export$d757d54550ebfb3d(_ref) {
|
|
|
10706
10777
|
_el$2 = _el$.firstChild,
|
|
10707
10778
|
_el$4 = _el$2.nextSibling,
|
|
10708
10779
|
[_el$5, _co$] = $8tj43$getNextMarker(_el$4.nextSibling);
|
|
10709
|
-
$8tj43$addEventListener(_el$, "click", $8tj43$
|
|
10780
|
+
$8tj43$addEventListener(_el$, "click", $8tj43$catchify1(e => {
|
|
10710
10781
|
router_.navigate_.go_to_({
|
|
10711
10782
|
new_url_: category_suggestion_().page_url,
|
|
10712
10783
|
is_replace_: false,
|
|
@@ -10871,7 +10942,7 @@ function $d8a66ba54a42eb3e$export$e026af0c7b64ea5f(_ref) {
|
|
|
10871
10942
|
}, {
|
|
10872
10943
|
defer: true
|
|
10873
10944
|
}));
|
|
10874
|
-
$8tj43$createComputed($8tj43$on(get_search_query_, $8tj43$
|
|
10945
|
+
$8tj43$createComputed($8tj43$on(get_search_query_, $8tj43$catchify1(() => {
|
|
10875
10946
|
// when a query was submitted, clear filters if clear was pressed before
|
|
10876
10947
|
const clear_value = $8tj43$untrack(get_clear_filters_next_submit);
|
|
10877
10948
|
if (clear_value) {
|
|
@@ -10898,11 +10969,11 @@ function $07d90b8270ece8de$export$84bba84a7b837187(read_search_query) {
|
|
|
10898
10969
|
const key = "depict_searches";
|
|
10899
10970
|
const previous_searches = $8tj43$createSignal(JSON.parse(ls[key] || "[]"));
|
|
10900
10971
|
const [read_previous_searches, write_previous_searches] = previous_searches;
|
|
10901
|
-
$8tj43$createEffect($8tj43$
|
|
10972
|
+
$8tj43$createEffect($8tj43$catchify1(() => {
|
|
10902
10973
|
const json_encoded = JSON.stringify(read_previous_searches());
|
|
10903
10974
|
if (ls[key] !== json_encoded) ls[key] = json_encoded;
|
|
10904
10975
|
}));
|
|
10905
|
-
$8tj43$createComputed($8tj43$
|
|
10976
|
+
$8tj43$createComputed($8tj43$catchify1(() => {
|
|
10906
10977
|
const searches = $8tj43$untrack(read_previous_searches);
|
|
10907
10978
|
const current_query = read_search_query();
|
|
10908
10979
|
if (!current_query)
|
|
@@ -10948,7 +11019,7 @@ async function $86b0ff0c85e5fc6c$export$e16630ecb9644a1c(_ref) {
|
|
|
10948
11019
|
function $33e7d1906c93db7d$export$205efb947c7ffd78(handler) {
|
|
10949
11020
|
let passive = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
10950
11021
|
let override_element = arguments.length > 2 ? arguments[2] : undefined;
|
|
10951
|
-
const catchified_handler = $8tj43$
|
|
11022
|
+
const catchified_handler = $8tj43$catchify1(handler);
|
|
10952
11023
|
const owner = $8tj43$getOwner();
|
|
10953
11024
|
// 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.
|
|
10954
11025
|
// Use observer in case that this gets called before body exists
|
|
@@ -10993,7 +11064,7 @@ function $96d57a48e7bce64f$export$181cceed5c91919e(callback, alsoRaF, passiveLis
|
|
|
10993
11064
|
$8tj43$createEffect(() => {
|
|
10994
11065
|
if (alsoRaF !== null && alsoRaF !== void 0 && alsoRaF()) {
|
|
10995
11066
|
let disposed = false;
|
|
10996
|
-
const fn = $8tj43$
|
|
11067
|
+
const fn = $8tj43$catchify1(() => {
|
|
10997
11068
|
if (disposed) return;
|
|
10998
11069
|
probablyCallCallback();
|
|
10999
11070
|
requestAnimationFrame(fn);
|
|
@@ -11006,10 +11077,10 @@ function $96d57a48e7bce64f$export$181cceed5c91919e(callback, alsoRaF, passiveLis
|
|
|
11006
11077
|
// "resize" doesn't fire sometimes when it should, also it doesn't when showing/hiding scrollbars which disabling scrolling does
|
|
11007
11078
|
// this works
|
|
11008
11079
|
// keeping resize just in case
|
|
11009
|
-
const resize_resize_observer = new ResizeObserver($8tj43$
|
|
11080
|
+
const resize_resize_observer = new ResizeObserver($8tj43$catchify1(probablyCallCallback));
|
|
11010
11081
|
resize_resize_observer.observe(document.documentElement);
|
|
11011
11082
|
(0, $8tj43$observer).wait_for_element("body").then(resize_resize_observer.observe.bind(resize_resize_observer));
|
|
11012
|
-
$8tj43$onCleanup($8tj43$
|
|
11083
|
+
$8tj43$onCleanup($8tj43$catchify1(() => resize_resize_observer.disconnect()));
|
|
11013
11084
|
return probablyCallCallback;
|
|
11014
11085
|
}
|
|
11015
11086
|
const $1308a7816c3d4f2d$export$3f238c96c45e6cc6 = 1;
|
|
@@ -11042,7 +11113,7 @@ function $1308a7816c3d4f2d$export$b3ad617e9036868(_ref, input_field, alignment,
|
|
|
11042
11113
|
}, pollAlignment);
|
|
11043
11114
|
let ro;
|
|
11044
11115
|
if (alignment & $1308a7816c3d4f2d$export$902f8b4a7dae5d78 || alignment & $1308a7816c3d4f2d$export$5097308c5200105a) {
|
|
11045
|
-
ro = new ResizeObserver($8tj43$
|
|
11116
|
+
ro = new ResizeObserver($8tj43$catchify1(records => {
|
|
11046
11117
|
records.forEach(_ref2 => {
|
|
11047
11118
|
let {
|
|
11048
11119
|
contentRect: {
|
|
@@ -11066,7 +11137,7 @@ function $1308a7816c3d4f2d$export$b3ad617e9036868(_ref, input_field, alignment,
|
|
|
11066
11137
|
}));
|
|
11067
11138
|
ro.observe(input_field);
|
|
11068
11139
|
}
|
|
11069
|
-
$8tj43$onCleanup($8tj43$
|
|
11140
|
+
$8tj43$onCleanup($8tj43$catchify1(() => {
|
|
11070
11141
|
var _ro;
|
|
11071
11142
|
return (_ro = ro) === null || _ro === void 0 ? void 0 : _ro.disconnect();
|
|
11072
11143
|
}));
|
|
@@ -11287,7 +11358,7 @@ function $b69740fc6de9f17e$export$83fd5de5504a7a67(_ref) {
|
|
|
11287
11358
|
fill: "forwards",
|
|
11288
11359
|
easing: "ease-in-out"
|
|
11289
11360
|
});
|
|
11290
|
-
animation.addEventListener("finish", $8tj43$
|
|
11361
|
+
animation.addEventListener("finish", $8tj43$catchify1(() => {
|
|
11291
11362
|
if (unpermit_when_possible) set_permitted_to_show(false);
|
|
11292
11363
|
animation = undefined;
|
|
11293
11364
|
element.style.display = "none";
|
|
@@ -11349,7 +11420,7 @@ function $94af29837186eb21$export$ef6006467f04ee41(_ref) {
|
|
|
11349
11420
|
},
|
|
11350
11421
|
get children() {
|
|
11351
11422
|
var _el$3 = $8tj43$getNextElement($94af29837186eb21$var$_tmpl$);
|
|
11352
|
-
$8tj43$addEventListener(_el$3, "click", $8tj43$
|
|
11423
|
+
$8tj43$addEventListener(_el$3, "click", $8tj43$catchify1(() => $8tj43$runWithOwner(root, () => $b4465d8d605f61e9$export$8895d39404bd2bb1({
|
|
11353
11424
|
user_triggered_: true,
|
|
11354
11425
|
selected_filters_: selected_filters_,
|
|
11355
11426
|
also_clear_sorting_: false,
|
|
@@ -11393,7 +11464,7 @@ function $6d2962bc9370f884$export$5e4aed86c12acdd9(_ref) {
|
|
|
11393
11464
|
is_first_load = true;
|
|
11394
11465
|
});
|
|
11395
11466
|
// 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
|
|
11396
|
-
$8tj43$createEffect($8tj43$
|
|
11467
|
+
$8tj43$createEffect($8tj43$catchify1(async () => {
|
|
11397
11468
|
const be_above_percentage = is_first_load ? 50 : 75; // if first load, load earlier
|
|
11398
11469
|
if (percentage_in_view_() < be_above_percentage || is_loading_more) return;
|
|
11399
11470
|
if (!get_last_cursor()) {
|
|
@@ -12154,7 +12225,7 @@ function $69602b3d8fd54c38$export$9dd50d35b9d94fdf(_ref) {
|
|
|
12154
12225
|
number_of_results_: number_of_results_,
|
|
12155
12226
|
type: type
|
|
12156
12227
|
} = _ref;
|
|
12157
|
-
const contents = $8tj43$createMemo($8tj43$
|
|
12228
|
+
const contents = $8tj43$createMemo($8tj43$catchify1(() => {
|
|
12158
12229
|
const q = get_search_query_();
|
|
12159
12230
|
return i18n_[type === $69602b3d8fd54c38$export$2452208c79fe93ea.content ? "get_showing_pages_for_" : "get_showing_results_for_"]()((() => {
|
|
12160
12231
|
var _el$ = $8tj43$getNextElement($69602b3d8fd54c38$var$_tmpl$);
|
|
@@ -12243,7 +12314,7 @@ function $cfdbd124dd09d713$export$1f1775a58da589b5(_ref) {
|
|
|
12243
12314
|
_el$13 = _el$12.nextSibling,
|
|
12244
12315
|
_el$14 = _el$13.nextSibling,
|
|
12245
12316
|
[_el$15, _co$2] = $8tj43$getNextMarker(_el$14.nextSibling);
|
|
12246
|
-
$8tj43$addEventListener(_el$12, "change", $8tj43$
|
|
12317
|
+
$8tj43$addEventListener(_el$12, "change", $8tj43$catchify1(() => set_current_sorting(item())));
|
|
12247
12318
|
$8tj43$setAttribute(_el$12, "name", title_radio_name);
|
|
12248
12319
|
$8tj43$insert(_el$11, () => item().meta.title, _el$15, _co$2);
|
|
12249
12320
|
$8tj43$effect(() => $8tj43$setProperty(_el$12, "checked", is_checked()));
|
|
@@ -12277,7 +12348,7 @@ function $cfdbd124dd09d713$export$1f1775a58da589b5(_ref) {
|
|
|
12277
12348
|
_el$19 = _el$18.nextSibling,
|
|
12278
12349
|
_el$20 = _el$19.nextSibling,
|
|
12279
12350
|
[_el$21, _co$3] = $8tj43$getNextMarker(_el$20.nextSibling);
|
|
12280
|
-
$8tj43$addEventListener(_el$18, "change", $8tj43$
|
|
12351
|
+
$8tj43$addEventListener(_el$18, "change", $8tj43$catchify1(() => set_current_sorting(c => c && {
|
|
12281
12352
|
...c,
|
|
12282
12353
|
order: order_value()
|
|
12283
12354
|
})));
|
|
@@ -12378,7 +12449,7 @@ function $082c4ed3e22f8d71$export$9bf11afa910f536e(_ref) {
|
|
|
12378
12449
|
set_search_sorting_open(true);
|
|
12379
12450
|
}
|
|
12380
12451
|
});
|
|
12381
|
-
$8tj43$onCleanup($8tj43$
|
|
12452
|
+
$8tj43$onCleanup($8tj43$catchify1(() => {
|
|
12382
12453
|
if (!sorting_expanded() && !filters_expanded()) {
|
|
12383
12454
|
set_search_filters_open(false);
|
|
12384
12455
|
set_search_sorting_open(false);
|
|
@@ -12410,16 +12481,16 @@ function $082c4ed3e22f8d71$export$9bf11afa910f536e(_ref) {
|
|
|
12410
12481
|
_el$12 = _el$14.nextSibling;
|
|
12411
12482
|
$8tj43$use(el => {
|
|
12412
12483
|
background = el;
|
|
12413
|
-
(0, $8tj43$observer).wait_for_element(el).then($8tj43$
|
|
12484
|
+
(0, $8tj43$observer).wait_for_element(el).then($8tj43$catchify1(() => {
|
|
12414
12485
|
set_background_style("transition", "all 200ms ease-in");
|
|
12415
12486
|
// For some reason this needs a requestAnimationFrame but the other modal-opening animations don't
|
|
12416
|
-
requestAnimationFrame($8tj43$
|
|
12487
|
+
requestAnimationFrame($8tj43$catchify1(() => set_background_style("opacity", "1")));
|
|
12417
12488
|
}));
|
|
12418
12489
|
}, _el$2);
|
|
12419
12490
|
$8tj43$addEventListener(_el$2, "click", dismiss_modal_, true);
|
|
12420
12491
|
$8tj43$use(el => {
|
|
12421
12492
|
dismiss_button = el;
|
|
12422
|
-
(0, $8tj43$observer).wait_for_element(el).then($8tj43$
|
|
12493
|
+
(0, $8tj43$observer).wait_for_element(el).then($8tj43$catchify1(() => {
|
|
12423
12494
|
set_button_style("transition", "all 200ms ease-in");
|
|
12424
12495
|
set_button_fraction_in(1);
|
|
12425
12496
|
}));
|
|
@@ -12433,11 +12504,11 @@ function $082c4ed3e22f8d71$export$9bf11afa910f536e(_ref) {
|
|
|
12433
12504
|
} = _ref2;
|
|
12434
12505
|
// touchstart should always only have one changed touch, track it here
|
|
12435
12506
|
if (touches >= 1) {
|
|
12436
|
-
$8tj43$
|
|
12507
|
+
$8tj43$dlog1("Got new touch", changedTouches, "ignoring"); // only support 1 touch for now
|
|
12437
12508
|
return;
|
|
12438
12509
|
}
|
|
12439
12510
|
if (target.closest($082c4ed3e22f8d71$var$no_go_selector) || target.matches($082c4ed3e22f8d71$var$no_go_selector)) {
|
|
12440
|
-
$8tj43$
|
|
12511
|
+
$8tj43$dlog1("Got touch on slider, ignoring for UX", target, changedTouches);
|
|
12441
12512
|
return;
|
|
12442
12513
|
}
|
|
12443
12514
|
set_modal_style("transition", "unset");
|
|
@@ -12453,7 +12524,7 @@ function $082c4ed3e22f8d71$export$9bf11afa910f536e(_ref) {
|
|
|
12453
12524
|
let last_move_page_y = start_page_y;
|
|
12454
12525
|
let first_move_was_downwards = false;
|
|
12455
12526
|
let distance_from_start_of_gesture = 0;
|
|
12456
|
-
const end_handler = $8tj43$
|
|
12527
|
+
const end_handler = $8tj43$catchify1(e => {
|
|
12457
12528
|
const changedTouches = e === null || e === void 0 ? void 0 : e.changedTouches;
|
|
12458
12529
|
if (changedTouches && changedTouches[0].identifier !== our_fingers_identifier)
|
|
12459
12530
|
// other finger stopped touch, ignore it
|
|
@@ -12477,7 +12548,7 @@ function $082c4ed3e22f8d71$export$9bf11afa910f536e(_ref) {
|
|
|
12477
12548
|
modal.removeEventListener("touchcancel", end_handler);
|
|
12478
12549
|
modal.removeEventListener("touchmove", move_handler);
|
|
12479
12550
|
});
|
|
12480
|
-
const move_handler = $8tj43$
|
|
12551
|
+
const move_handler = $8tj43$catchify1(e => {
|
|
12481
12552
|
const {
|
|
12482
12553
|
changedTouches: changedTouches
|
|
12483
12554
|
} = e;
|
|
@@ -12527,7 +12598,7 @@ function $082c4ed3e22f8d71$export$9bf11afa910f536e(_ref) {
|
|
|
12527
12598
|
};
|
|
12528
12599
|
$8tj43$use(el => {
|
|
12529
12600
|
modal = el;
|
|
12530
|
-
(0, $8tj43$observer).wait_for_element(el).then($8tj43$
|
|
12601
|
+
(0, $8tj43$observer).wait_for_element(el).then($8tj43$catchify1(() => {
|
|
12531
12602
|
set_modal_style("transition", "all 200ms ease-in");
|
|
12532
12603
|
set_modal_style("transform", "translateY(0)");
|
|
12533
12604
|
}));
|
|
@@ -12620,7 +12691,7 @@ function $082c4ed3e22f8d71$export$9bf11afa910f536e(_ref) {
|
|
|
12620
12691
|
},
|
|
12621
12692
|
get children() {
|
|
12622
12693
|
var _el$11 = $8tj43$getNextElement($082c4ed3e22f8d71$var$_tmpl$);
|
|
12623
|
-
$8tj43$addEventListener(_el$11, "click", $8tj43$
|
|
12694
|
+
$8tj43$addEventListener(_el$11, "click", $8tj43$catchify1(() => {
|
|
12624
12695
|
const show_toast = $b4465d8d605f61e9$export$8895d39404bd2bb1({
|
|
12625
12696
|
user_triggered_: true,
|
|
12626
12697
|
expanded_hierarchical_filters_: args_for_filtering_.expanded_hierarchical_filters_,
|
|
@@ -12630,7 +12701,7 @@ function $082c4ed3e22f8d71$export$9bf11afa910f536e(_ref) {
|
|
|
12630
12701
|
also_clear_sorting_: false,
|
|
12631
12702
|
delay_toast_: true
|
|
12632
12703
|
});
|
|
12633
|
-
cleanup_promise.then($8tj43$
|
|
12704
|
+
cleanup_promise.then($8tj43$catchify1(show_toast));
|
|
12634
12705
|
}), true);
|
|
12635
12706
|
$8tj43$insert(_el$11, () => i18n_.clear_individual_filter_());
|
|
12636
12707
|
$8tj43$runHydrationEvents();
|
|
@@ -12706,7 +12777,7 @@ function $7396052a1484264f$export$d7841e452f2e59a8(_ref) {
|
|
|
12706
12777
|
const [sorting_open, set_sorting_open] = search_sorting_open_;
|
|
12707
12778
|
const [get_current_sorting_] = current_sorting_;
|
|
12708
12779
|
const [is_small, set_is_small] = $8tj43$createSignal(false);
|
|
12709
|
-
const dismiss_modal_ = $8tj43$
|
|
12780
|
+
const dismiss_modal_ = $8tj43$catchify1(() => {
|
|
12710
12781
|
set_filters_open(false);
|
|
12711
12782
|
set_sorting_open(false);
|
|
12712
12783
|
});
|
|
@@ -12815,7 +12886,7 @@ function $7396052a1484264f$export$d7841e452f2e59a8(_ref) {
|
|
|
12815
12886
|
})());
|
|
12816
12887
|
}
|
|
12817
12888
|
});
|
|
12818
|
-
$8tj43$
|
|
12889
|
+
$8tj43$catchify1(async () => {
|
|
12819
12890
|
({
|
|
12820
12891
|
open_modal_: open_modal_,
|
|
12821
12892
|
close_modal_: close_modal_
|
|
@@ -12909,7 +12980,7 @@ function $7396052a1484264f$var$OpenFiltersButton(_ref4) {
|
|
|
12909
12980
|
return _el$15;
|
|
12910
12981
|
}
|
|
12911
12982
|
}), _el$21, _co$5);
|
|
12912
|
-
$8tj43$addEventListener(_el$16, "click", $8tj43$
|
|
12983
|
+
$8tj43$addEventListener(_el$16, "click", $8tj43$catchify1(() => $8tj43$batch(() => {
|
|
12913
12984
|
if (search_filters_open_[0]()) {
|
|
12914
12985
|
search_filters_open_[1](false);
|
|
12915
12986
|
return;
|
|
@@ -12976,7 +13047,7 @@ function $7396052a1484264f$var$OpenSortingButton(_ref5) {
|
|
|
12976
13047
|
_el$23 = _el$22.firstChild,
|
|
12977
13048
|
_el$24 = _el$23.nextSibling,
|
|
12978
13049
|
[_el$25, _co$6] = $8tj43$getNextMarker(_el$24.nextSibling);
|
|
12979
|
-
$8tj43$addEventListener(_el$22, "click", $8tj43$
|
|
13050
|
+
$8tj43$addEventListener(_el$22, "click", $8tj43$catchify1(() => $8tj43$batch(() => {
|
|
12980
13051
|
if (search_sorting_open_[0]()) {
|
|
12981
13052
|
search_sorting_open_[1](false);
|
|
12982
13053
|
return;
|
|
@@ -13094,7 +13165,7 @@ function $6a16b21155984cef$var$ActualFloatingButtons(_ref2) {
|
|
|
13094
13165
|
}
|
|
13095
13166
|
old_pos = new_pos;
|
|
13096
13167
|
});
|
|
13097
|
-
const touchstart_handler = $8tj43$
|
|
13168
|
+
const touchstart_handler = $8tj43$catchify1(e => {
|
|
13098
13169
|
is_in_touch_scroll = true;
|
|
13099
13170
|
if (e.touches.length === 1) {
|
|
13100
13171
|
// 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
|
|
@@ -13102,12 +13173,12 @@ function $6a16b21155984cef$var$ActualFloatingButtons(_ref2) {
|
|
|
13102
13173
|
diff_over_second_or_touch = 0;
|
|
13103
13174
|
}
|
|
13104
13175
|
});
|
|
13105
|
-
const touchend_handler = $8tj43$
|
|
13176
|
+
const touchend_handler = $8tj43$catchify1(e => {
|
|
13106
13177
|
if (e.touches.length === 0)
|
|
13107
13178
|
// scroll gesture of any type (pinch can also be used as scroll, etc.) ended
|
|
13108
13179
|
inertia_timeout = setTimeout(
|
|
13109
13180
|
// inertia ends after 500ms (educated guess)
|
|
13110
|
-
$8tj43$
|
|
13181
|
+
$8tj43$catchify1(() => {
|
|
13111
13182
|
is_in_touch_scroll = false;
|
|
13112
13183
|
diff_over_second_or_touch = 0;
|
|
13113
13184
|
}), 500);
|
|
@@ -13125,9 +13196,9 @@ function $6a16b21155984cef$var$ActualFloatingButtons(_ref2) {
|
|
|
13125
13196
|
const everything_closed = !get_search_filters_open_() && !get_search_sorting_open_();
|
|
13126
13197
|
if (!$8tj43$untrack(modal_is_closed) && everything_closed)
|
|
13127
13198
|
// I think the point of this is to delay the animation a bit IIRC
|
|
13128
|
-
timeout = setTimeout($8tj43$
|
|
13199
|
+
timeout = setTimeout($8tj43$catchify1(() => set_if_modal_is_closed(true)), 200);else set_if_modal_is_closed(everything_closed);
|
|
13129
13200
|
});
|
|
13130
|
-
$8tj43$createComputed($8tj43$
|
|
13201
|
+
$8tj43$createComputed($8tj43$catchify1(async () => {
|
|
13131
13202
|
const element = sort_and_filter_element_();
|
|
13132
13203
|
if (!element) return;
|
|
13133
13204
|
await (0, $8tj43$observer).wait_for_element(element);
|
|
@@ -13146,12 +13217,12 @@ function $6a16b21155984cef$var$ActualFloatingButtons(_ref2) {
|
|
|
13146
13217
|
_el$5 = _el$4.firstChild,
|
|
13147
13218
|
_el$6 = _el$4.nextSibling,
|
|
13148
13219
|
_el$7 = _el$6.firstChild;
|
|
13149
|
-
$8tj43$addEventListener(_el$2, "click", $8tj43$
|
|
13220
|
+
$8tj43$addEventListener(_el$2, "click", $8tj43$catchify1(() => {
|
|
13150
13221
|
set_search_filters_open_(true);
|
|
13151
13222
|
set_search_sorting_open_(false);
|
|
13152
13223
|
}), true);
|
|
13153
13224
|
$8tj43$insert(_el$3, $8tj43$createComponent((0, $05f67356defcdd65$export$28f6150e232898de), {}));
|
|
13154
|
-
$8tj43$addEventListener(_el$4, "click", $8tj43$
|
|
13225
|
+
$8tj43$addEventListener(_el$4, "click", $8tj43$catchify1(() => {
|
|
13155
13226
|
set_search_filters_open_(false);
|
|
13156
13227
|
set_search_sorting_open_(true);
|
|
13157
13228
|
}), true);
|
|
@@ -13162,7 +13233,7 @@ function $6a16b21155984cef$var$ActualFloatingButtons(_ref2) {
|
|
|
13162
13233
|
});
|
|
13163
13234
|
return () => _c$() ? $8tj43$createComponent((0, $79af35736fe8e5c8$export$da32f7add8a22e86), {}) : $8tj43$createComponent((0, $73e3c96bc365e0e9$export$d10e63059ddb9fd4), {});
|
|
13164
13235
|
})());
|
|
13165
|
-
$8tj43$addEventListener(_el$6, "click", $8tj43$
|
|
13236
|
+
$8tj43$addEventListener(_el$6, "click", $8tj43$catchify1(() => scrollTo({
|
|
13166
13237
|
top: 0,
|
|
13167
13238
|
behavior: "smooth"
|
|
13168
13239
|
})), true);
|
|
@@ -13194,7 +13265,7 @@ function $ec225bf1f1627ea8$export$210f130a61ac1e8d(fn) {
|
|
|
13194
13265
|
let last_queued;
|
|
13195
13266
|
let last_value;
|
|
13196
13267
|
let initial_run = true;
|
|
13197
|
-
$8tj43$createComputed($8tj43$
|
|
13268
|
+
$8tj43$createComputed($8tj43$catchify1(async () => {
|
|
13198
13269
|
last_value = fn();
|
|
13199
13270
|
if (initial_run) {
|
|
13200
13271
|
initial_run = false;
|
|
@@ -13242,7 +13313,7 @@ function $5e6abec0dab4e610$export$6e49da55e449af7c(_ref) {
|
|
|
13242
13313
|
}]); // get rid of old data the browser saves the old state and will restore it later on
|
|
13243
13314
|
};
|
|
13244
13315
|
|
|
13245
|
-
$8tj43$createComputed($8tj43$
|
|
13316
|
+
$8tj43$createComputed($8tj43$catchify1(() => {
|
|
13246
13317
|
const last_result = get_last_result_in_viewport_();
|
|
13247
13318
|
if (last_result == undefined || last_result <= 0 || last_result == Infinity) return;
|
|
13248
13319
|
if (isNaN(last_result)) {
|
|
@@ -13269,7 +13340,7 @@ function $5e6abec0dab4e610$export$6e49da55e449af7c(_ref) {
|
|
|
13269
13340
|
set_to_later = last_result;
|
|
13270
13341
|
// If a delayed push timeout is already running, just changing the value that will be pushed is sufficient
|
|
13271
13342
|
if (timeout) return;
|
|
13272
|
-
timeout = setTimeout($8tj43$
|
|
13343
|
+
timeout = setTimeout($8tj43$catchify1(() => {
|
|
13273
13344
|
timeout = undefined;
|
|
13274
13345
|
last_time_history_changed = +new Date();
|
|
13275
13346
|
set_min_results_loaded(set_to_later);
|
|
@@ -13382,7 +13453,7 @@ function $22470de5f42cc35d$export$f631859cab12b342(_ref) {
|
|
|
13382
13453
|
if (!result) return;
|
|
13383
13454
|
return {
|
|
13384
13455
|
href: result.page_url,
|
|
13385
|
-
onClick: $8tj43$
|
|
13456
|
+
onClick: $8tj43$catchify1(ev => router_.navigate_.go_to_({
|
|
13386
13457
|
new_url_: result.page_url,
|
|
13387
13458
|
is_replace_: false,
|
|
13388
13459
|
event_: ev
|
|
@@ -13816,7 +13887,7 @@ function $937791b86d3d1509$export$44f738469d5570cf(_ref) {
|
|
|
13816
13887
|
// We might only have changed the left position which align_field doesn't know about, make it poll the position for a while
|
|
13817
13888
|
setPollAlignment_(true);
|
|
13818
13889
|
if (disableResizePollingTimeout) clearTimeout(disableResizePollingTimeout);
|
|
13819
|
-
disableResizePollingTimeout = setTimeout($8tj43$
|
|
13890
|
+
disableResizePollingTimeout = setTimeout($8tj43$catchify1(() => {
|
|
13820
13891
|
setPollAlignment_(false);
|
|
13821
13892
|
disableResizePollingTimeout = undefined;
|
|
13822
13893
|
}), 1000);
|
|
@@ -13949,7 +14020,7 @@ function $da279c5a540c6846$export$a54ec244c8863715(_ref) {
|
|
|
13949
14020
|
} : {})
|
|
13950
14021
|
};
|
|
13951
14022
|
});
|
|
13952
|
-
const [search_results_] = $8tj43$createResource(search_query_base_, $8tj43$
|
|
14023
|
+
const [search_results_] = $8tj43$createResource(search_query_base_, $8tj43$catchify1(async base_query => {
|
|
13953
14024
|
set_all_products_loaded(false);
|
|
13954
14025
|
// only first page of results
|
|
13955
14026
|
return await $5e6abec0dab4e610$export$cc42dd29bf655ab6({
|
|
@@ -13997,7 +14068,7 @@ function $da279c5a540c6846$export$a54ec244c8863715(_ref) {
|
|
|
13997
14068
|
const [, setModalFieldStyle] = modal_field_style;
|
|
13998
14069
|
const [, setModalBackdropStyle] = modal_backdrop_style;
|
|
13999
14070
|
const [get_search_field_elements, set_search_field_elements] = $8tj43$createSignal();
|
|
14000
|
-
const SafeSearchField = $8tj43$
|
|
14071
|
+
const SafeSearchField = $8tj43$catchify1((0, $584c06c09cf4609d$export$b94867ecbd698f21));
|
|
14001
14072
|
const [sort_or_filter_open_, set_sort_or_filter_open_] = $8tj43$createSignal(false);
|
|
14002
14073
|
const [desktop_filter_elements_, set_desktop_filter_elements] = $8tj43$createSignal();
|
|
14003
14074
|
const n_hits = $8tj43$createMemo(() => {
|
|
@@ -14066,7 +14137,7 @@ function $da279c5a540c6846$export$a54ec244c8863715(_ref) {
|
|
|
14066
14137
|
})()));
|
|
14067
14138
|
}).remove);
|
|
14068
14139
|
$3a2bed57c9a57e21$export$d31a1a1a83ad9413(search_results_, selected_filters_);
|
|
14069
|
-
$8tj43$
|
|
14140
|
+
$8tj43$catchify1((0, $5e6abec0dab4e610$export$6e49da55e449af7c))({
|
|
14070
14141
|
scroll_restoration_data_: scroll_restoration_data_,
|
|
14071
14142
|
last_result_in_viewport_: last_result_in_viewport_,
|
|
14072
14143
|
id_: get_search_query_,
|
|
@@ -14112,8 +14183,8 @@ function $da279c5a540c6846$export$a54ec244c8863715(_ref) {
|
|
|
14112
14183
|
setModalBodyStyle({});
|
|
14113
14184
|
modalAlignmentSignalsRef_ === null || modalAlignmentSignalsRef_ === void 0 || modalAlignmentSignalsRef_(alignmentSignals_);
|
|
14114
14185
|
const [pollAlignment, setPollAlignment_] = $8tj43$createSignal(false);
|
|
14115
|
-
const align_position = $8tj43$
|
|
14116
|
-
div_with_field_class.addEventListener("click", $8tj43$
|
|
14186
|
+
const align_position = $8tj43$catchify1((0, $1308a7816c3d4f2d$export$b3ad617e9036868))(alignmentSignals_, search_field, (0, $1308a7816c3d4f2d$export$3f238c96c45e6cc6) | (0, $1308a7816c3d4f2d$export$7895aadd1956b1c7) | (modalVersionUsed_ === 1 ? (0, $1308a7816c3d4f2d$export$902f8b4a7dae5d78) : (0, $1308a7816c3d4f2d$export$6060bc6bee850eb6) | (0, $1308a7816c3d4f2d$export$5097308c5200105a)), true, pollAlignment);
|
|
14187
|
+
div_with_field_class.addEventListener("click", $8tj43$catchify1(e => {
|
|
14117
14188
|
var _target$matches, _target$closest, _on_open_, _ref4;
|
|
14118
14189
|
const target = e.target;
|
|
14119
14190
|
const sel = ".submit";
|
|
@@ -14561,7 +14632,7 @@ class $eb064bc3350276c1$export$ac6237957a15b3f0 {
|
|
|
14561
14632
|
BackIcon_: BackIcon_
|
|
14562
14633
|
});
|
|
14563
14634
|
$68e6625c8d51f847$export$5162a71f252e6122();
|
|
14564
|
-
$8tj43$
|
|
14635
|
+
$8tj43$catchify1(async () => {
|
|
14565
14636
|
const {
|
|
14566
14637
|
open_modal_: open_modal_,
|
|
14567
14638
|
close_modal_: close_modal_
|
|
@@ -14825,7 +14896,7 @@ function $eb064bc3350276c1$export$f2dc7e4e4aa11abb(props) {
|
|
|
14825
14896
|
function $37e8c97bb6876197$export$828dcdd425fd3231(aligner) {
|
|
14826
14897
|
const style_element = document.createElement("style");
|
|
14827
14898
|
document.head.append(style_element);
|
|
14828
|
-
const resize_observer = new ResizeObserver($8tj43$
|
|
14899
|
+
const resize_observer = new ResizeObserver($8tj43$catchify1(() => {
|
|
14829
14900
|
const styles = $cc64aabf2c7a1f1a$export$1233ca167bf71f9a({
|
|
14830
14901
|
".depict.plp .depict-search-modal .search-field": {
|
|
14831
14902
|
"height": "".concat(aligner === null || aligner === void 0 ? void 0 : aligner.clientHeight, "px")
|
|
@@ -14896,7 +14967,7 @@ const $169c13c0531d91d2$export$d86a33413558014e = openModalParams => {
|
|
|
14896
14967
|
}, dispose_aligner];
|
|
14897
14968
|
};
|
|
14898
14969
|
function $573c007c697a1831$export$d0596b5cae35ad4(open_search) {
|
|
14899
|
-
const handler = $8tj43$
|
|
14970
|
+
const handler = $8tj43$catchify1(e => {
|
|
14900
14971
|
const {
|
|
14901
14972
|
key: key,
|
|
14902
14973
|
target: target
|
|
@@ -14915,7 +14986,7 @@ function $573c007c697a1831$export$d0596b5cae35ad4(open_search) {
|
|
|
14915
14986
|
function $e60a76195ac6d408$export$689e204eadb33baf(pr) {
|
|
14916
14987
|
let old_url;
|
|
14917
14988
|
let disconnect_link_observer;
|
|
14918
|
-
const link_handler = $8tj43$
|
|
14989
|
+
const link_handler = $8tj43$catchify1(e => {
|
|
14919
14990
|
const link = e.currentTarget || e.target;
|
|
14920
14991
|
if (link.href === old_url) {
|
|
14921
14992
|
history.pushState(history.state, "", link.href);
|
|
@@ -14924,7 +14995,7 @@ function $e60a76195ac6d408$export$689e204eadb33baf(pr) {
|
|
|
14924
14995
|
});
|
|
14925
14996
|
let remove_added_listeners;
|
|
14926
14997
|
let resolve_remove_added_listeners;
|
|
14927
|
-
pr.addEventListener("open", $8tj43$
|
|
14998
|
+
pr.addEventListener("open", $8tj43$catchify1(() => {
|
|
14928
14999
|
remove_added_listeners = new Promise(r => resolve_remove_added_listeners = r);
|
|
14929
15000
|
disconnect_link_observer = (0, $8tj43$observer).onexists("a", async _ref => {
|
|
14930
15001
|
let {
|
|
@@ -14935,12 +15006,12 @@ function $e60a76195ac6d408$export$689e204eadb33baf(pr) {
|
|
|
14935
15006
|
element.removeEventListener("click", link_handler);
|
|
14936
15007
|
});
|
|
14937
15008
|
}));
|
|
14938
|
-
pr.addEventListener("close", $8tj43$
|
|
15009
|
+
pr.addEventListener("close", $8tj43$catchify1(() => {
|
|
14939
15010
|
var _disconnect_link_obse, _resolve_remove_added;
|
|
14940
15011
|
(_disconnect_link_obse = disconnect_link_observer) === null || _disconnect_link_obse === void 0 || _disconnect_link_obse();
|
|
14941
15012
|
(_resolve_remove_added = resolve_remove_added_listeners) === null || _resolve_remove_added === void 0 || _resolve_remove_added();
|
|
14942
15013
|
}));
|
|
14943
|
-
$8tj43$
|
|
15014
|
+
$8tj43$catchify1(async () => {
|
|
14944
15015
|
for await (const href of (0, $8tj43$href_change_ipns)) if (!pr.is_page_(new URL(href))) old_url = href;
|
|
14945
15016
|
})();
|
|
14946
15017
|
}
|
|
@@ -15038,7 +15109,7 @@ class $f9fd3017c20b774a$export$3ccaa27d81dd8556 extends EventTarget {
|
|
|
15038
15109
|
});
|
|
15039
15110
|
$f9fd3017c20b774a$var$_classPrivateFieldInitSpec(this, $f9fd3017c20b774a$var$_unload, {
|
|
15040
15111
|
writable: true,
|
|
15041
|
-
value: /*@__PURE__*/$8tj43$
|
|
15112
|
+
value: /*@__PURE__*/$8tj43$catchify1(() => {
|
|
15042
15113
|
var _classPrivateFieldGet3;
|
|
15043
15114
|
if (!$8tj43$babelruntimehelpersclassPrivateFieldGet(this, $f9fd3017c20b774a$var$_is_open)) return;
|
|
15044
15115
|
(_classPrivateFieldGet3 = $8tj43$babelruntimehelpersclassPrivateFieldGet(this, $f9fd3017c20b774a$var$_disconnect_observer)) === null || _classPrivateFieldGet3 === void 0 || _classPrivateFieldGet3.call(this);
|
|
@@ -15052,7 +15123,7 @@ class $f9fd3017c20b774a$export$3ccaa27d81dd8556 extends EventTarget {
|
|
|
15052
15123
|
});
|
|
15053
15124
|
$f9fd3017c20b774a$var$_classPrivateFieldInitSpec(this, $f9fd3017c20b774a$var$_load, {
|
|
15054
15125
|
writable: true,
|
|
15055
|
-
value: /*@__PURE__*/$8tj43$
|
|
15126
|
+
value: /*@__PURE__*/$8tj43$catchify1(async els => {
|
|
15056
15127
|
$8tj43$babelruntimehelpersclassPrivateFieldSet(this, $f9fd3017c20b774a$var$_is_open, true);
|
|
15057
15128
|
// So that #load doesn't get called again
|
|
15058
15129
|
let set_should_stay_inserted;
|
|
@@ -15116,7 +15187,7 @@ class $f9fd3017c20b774a$export$3ccaa27d81dd8556 extends EventTarget {
|
|
|
15116
15187
|
async function $f9fd3017c20b774a$var$_listen2() {
|
|
15117
15188
|
const [exit_ipns, exitable_ipns] = $8tj43$make_asyncIterable_exiter((0, $8tj43$href_change_ipns));
|
|
15118
15189
|
$8tj43$babelruntimehelpersclassPrivateFieldSet(this, $f9fd3017c20b774a$var$_stop_listening, exit_ipns);
|
|
15119
|
-
const caught_page_check_fn = $8tj43$
|
|
15190
|
+
const caught_page_check_fn = $8tj43$catchify1(this.is_page_, "page check failed");
|
|
15120
15191
|
for await (const href of exitable_ipns) {
|
|
15121
15192
|
const url = new URL(href);
|
|
15122
15193
|
if (!caught_page_check_fn(url)) {
|
|
@@ -15134,12 +15205,12 @@ function $f9fd3017c20b774a$var$_get_rendered_recs2() {
|
|
|
15134
15205
|
this.addEventListener("close", dispose, {
|
|
15135
15206
|
once: true
|
|
15136
15207
|
});
|
|
15137
|
-
return $8tj43$
|
|
15208
|
+
return $8tj43$catchify1(this.render_, "rendering failed")() || [];
|
|
15138
15209
|
});
|
|
15139
15210
|
}
|
|
15140
15211
|
function $f9fd3017c20b774a$var$_empty_page_bugfix2() {
|
|
15141
15212
|
// Called when a "page" is "opened" using PageReplacer
|
|
15142
|
-
const on_maybe_popstate = $8tj43$
|
|
15213
|
+
const on_maybe_popstate = $8tj43$catchify1(what_happened => {
|
|
15143
15214
|
if (what_happened !== "popstate") return;
|
|
15144
15215
|
const cleaned_current_url = $f9fd3017c20b774a$var$clean_url(location.href);
|
|
15145
15216
|
if (!$f9fd3017c20b774a$var$_classStaticPrivateFieldSpecGet($f9fd3017c20b774a$export$3ccaa27d81dd8556, $f9fd3017c20b774a$export$3ccaa27d81dd8556, $f9fd3017c20b774a$var$_visited_urls).has(cleaned_current_url)) {
|
|
@@ -15163,7 +15234,7 @@ function $f9fd3017c20b774a$var$_empty_page_bugfix2() {
|
|
|
15163
15234
|
PageReplacer unload itself and reveals the original document - it is expected to be the one under https://ehandel.spendrups.se/Product/1104201, but actually it is the one under /start/search - a white page.
|
|
15164
15235
|
The fix: is to remember all pages that we have visited since the creation of `window` (we do that by having a static property on PageReplacer since we assume the PageReplacer source code will only exist once on the page and will be loaded at page load, the latter assumption might be wrong, but I hope not). If we get a "popstate" event (meaning back or forwards button, not new page being pushed) to an unknown page we reload.
|
|
15165
15236
|
*/
|
|
15166
|
-
$8tj43$
|
|
15237
|
+
$8tj43$dlog1("PageReplacer: ", cleaned_current_url, " hasn't been visited since document was created, reloading since we won't be able to show this page otherwise");
|
|
15167
15238
|
location.reload();
|
|
15168
15239
|
$f9fd3017c20b774a$var$_classStaticPrivateFieldSpecSet($f9fd3017c20b774a$export$3ccaa27d81dd8556, $f9fd3017c20b774a$export$3ccaa27d81dd8556, $f9fd3017c20b774a$var$_reverting_permitted, false); // Disallow any reverting since we can't - it would flash a white page until the reload has finished.
|
|
15169
15240
|
$8tj43$babelruntimehelpersclassPrivateFieldGet(this, $f9fd3017c20b774a$var$_unload).call(this); // Call unload to "kill" the solid-js stuff quicker so that it stops updating - the user is expecting the next thing that happens to be a navigation to the actual page the URL says they're on.
|
|
@@ -15182,7 +15253,7 @@ var $f9fd3017c20b774a$var$_visited_urls = {
|
|
|
15182
15253
|
writable: true,
|
|
15183
15254
|
value: /*@__PURE__*/(() => {
|
|
15184
15255
|
// 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).
|
|
15185
|
-
$8tj43$
|
|
15256
|
+
$8tj43$catchify1(async () => {
|
|
15186
15257
|
// Static initialization blocks aren't supported in MobileSafari yet, otherwise this would be one.
|
|
15187
15258
|
// 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).
|
|
15188
15259
|
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes/Static_initialization_blocks
|
|
@@ -15239,7 +15310,7 @@ function $a3026fb727bc7550$export$316f6f283ae64765(props) {
|
|
|
15239
15310
|
field_: $8tj43$createSignal({}),
|
|
15240
15311
|
backdrop_: backdropAlignmentSignal_
|
|
15241
15312
|
};
|
|
15242
|
-
const defaultHandler = $8tj43$
|
|
15313
|
+
const defaultHandler = $8tj43$catchify1(e => {
|
|
15243
15314
|
const {
|
|
15244
15315
|
modalVersionUsed_: modalVersionUsed_
|
|
15245
15316
|
} = shared_properties;
|
|
@@ -15375,7 +15446,7 @@ function $43fbb365ed0ac99e$export$466cdc317043f6cb(_ref) {
|
|
|
15375
15446
|
$8tj43$createComputed(() => {
|
|
15376
15447
|
var _place_holdey_quickli, _place_holdey_quickli2;
|
|
15377
15448
|
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.listing_id) {
|
|
15378
|
-
if (last_was_placeholder) queueMicrotask($8tj43$
|
|
15449
|
+
if (last_was_placeholder) queueMicrotask($8tj43$catchify1(() => {
|
|
15379
15450
|
var _sliding_element;
|
|
15380
15451
|
(_sliding_element = sliding_element) === null || _sliding_element === void 0 || _sliding_element.scrollTo({
|
|
15381
15452
|
left: 0
|
|
@@ -15445,7 +15516,7 @@ function $43fbb365ed0ac99e$export$466cdc317043f6cb(_ref) {
|
|
|
15445
15516
|
} else if (!(((_intersecting_items_o = intersecting_items_object[selected_index()]) === null || _intersecting_items_o === void 0 ? void 0 : _intersecting_items_o.intersectionRatio) >= 0.95)) {
|
|
15446
15517
|
// negated larger than to handle left side of comparison being undefined
|
|
15447
15518
|
let done_work = false;
|
|
15448
|
-
$8tj43$runWithOwner(owner, () => $8tj43$createComputed($8tj43$
|
|
15519
|
+
$8tj43$runWithOwner(owner, () => $8tj43$createComputed($8tj43$catchify1(() => {
|
|
15449
15520
|
if (done_work || !Array.isArray(quicklinks_data_())) return;
|
|
15450
15521
|
const sel_index = selected_index();
|
|
15451
15522
|
const target_element = sel_index >= 0 ? sel_index : 0;
|
|
@@ -15497,7 +15568,7 @@ function $43fbb365ed0ac99e$export$466cdc317043f6cb(_ref) {
|
|
|
15497
15568
|
});
|
|
15498
15569
|
return (() => {
|
|
15499
15570
|
var _el$3 = $8tj43$getNextElement($43fbb365ed0ac99e$var$_tmpl$3);
|
|
15500
|
-
$8tj43$addEventListener(_el$3, "click", $8tj43$
|
|
15571
|
+
$8tj43$addEventListener(_el$3, "click", $8tj43$catchify1(ev => {
|
|
15501
15572
|
const url = href();
|
|
15502
15573
|
if (is_selected() && !$9b35d1384e31813a$export$29d28dadc2d6b631(ev) || !url)
|
|
15503
15574
|
// allow open currently selected one in new tab but otherwise prevent clicks
|
|
@@ -15642,7 +15713,7 @@ function $a4777acaffa35a82$export$3945d6db2dfd3d12(_ref) {
|
|
|
15642
15713
|
const handler = () => allow_filter_clearing = false;
|
|
15643
15714
|
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
|
|
15644
15715
|
$8tj43$onCleanup(() => window.removeEventListener("popstate", handler));
|
|
15645
|
-
$8tj43$createEffect($8tj43$on(crumb_data_, $8tj43$
|
|
15716
|
+
$8tj43$createEffect($8tj43$on(crumb_data_, $8tj43$catchify1(new_crumb_data => {
|
|
15646
15717
|
const id_of_new_data = id_to_query_for_();
|
|
15647
15718
|
const type_of_id_of_new_data = id_type_();
|
|
15648
15719
|
if (allow_filter_clearing && previous_crumb_data && new_crumb_data && (id_of_new_data !== id_when_we_got_previous_data.id_ || type_of_id_of_new_data !== id_when_we_got_previous_data.type_)) {
|
|
@@ -15696,7 +15767,7 @@ function $a4777acaffa35a82$var$clear_if_opened_new_tab_with_sideways_url_params_
|
|
|
15696
15767
|
// On first rendering of the CategoryPage (after we have results), check if we got to this URL by going sideways in QuickLinks and clear filters with toast if so
|
|
15697
15768
|
if (!$8tj43$untrack(get_sideways_filter_clearing_flag_)) return;
|
|
15698
15769
|
set_sideways_filter_clearing_flag_(false);
|
|
15699
|
-
$8tj43$
|
|
15770
|
+
$8tj43$dlog1("Flag to clear filters was set, clearing filters");
|
|
15700
15771
|
$8tj43$queueMacroTask(() => {
|
|
15701
15772
|
// Do it next task so that all the filters have time to populate
|
|
15702
15773
|
$b4465d8d605f61e9$export$8895d39404bd2bb1({
|
|
@@ -15825,7 +15896,7 @@ function $4b4b262708b516ee$export$f7d2f673fc2f091d(_ref) {
|
|
|
15825
15896
|
// Make "Get products in listing" request to get products in listing
|
|
15826
15897
|
const [plp_products_] = $8tj43$createResource(products_query_base_,
|
|
15827
15898
|
// 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)
|
|
15828
|
-
$8tj43$
|
|
15899
|
+
$8tj43$catchify(base_query => $5e6abec0dab4e610$export$cc42dd29bf655ab6({
|
|
15829
15900
|
id_: $8tj43$untrack(id_to_query_for_),
|
|
15830
15901
|
scroll_restoration_data_: scroll_restoration_data_,
|
|
15831
15902
|
min_products_to_fetch_: min_products_to_fetch_,
|
|
@@ -15845,7 +15916,7 @@ function $4b4b262708b516ee$export$f7d2f673fc2f091d(_ref) {
|
|
|
15845
15916
|
id_type_: id_type_()
|
|
15846
15917
|
}));
|
|
15847
15918
|
// Make "Get Listing" request to get quicklinks, breadcrumbs, title, etc
|
|
15848
|
-
const [plp_meta] = $8tj43$createResource(meta_query_base, $8tj43$
|
|
15919
|
+
const [plp_meta] = $8tj43$createResource(meta_query_base, $8tj43$catchify(query => depict_api_.get_listing(query)));
|
|
15849
15920
|
const available_sortings_ = $8tj43$createMemo(() => {
|
|
15850
15921
|
var _plp_products_, _plp_products_$sorts;
|
|
15851
15922
|
return (_plp_products_ = plp_products_()) === null || _plp_products_ === void 0 ? void 0 : (_plp_products_$sorts = _plp_products_.sorts) === null || _plp_products_$sorts === void 0 ? void 0 : _plp_products_$sorts.map(sort => {
|
|
@@ -15989,7 +16060,7 @@ function $4b4b262708b516ee$export$f7d2f673fc2f091d(_ref) {
|
|
|
15989
16060
|
filterModalParent_: filterModalParent_,
|
|
15990
16061
|
...extra_sort_and_filter_args_
|
|
15991
16062
|
});
|
|
15992
|
-
$8tj43$
|
|
16063
|
+
$8tj43$catchify((0, $5e6abec0dab4e610$export$6e49da55e449af7c))({
|
|
15993
16064
|
scroll_restoration_data_: scroll_restoration_data_,
|
|
15994
16065
|
last_result_in_viewport_: last_result_in_viewport_,
|
|
15995
16066
|
id_: id_to_query_for_,
|
|
@@ -16003,7 +16074,7 @@ function $4b4b262708b516ee$export$f7d2f673fc2f091d(_ref) {
|
|
|
16003
16074
|
$8tj43$createComputed(() => {
|
|
16004
16075
|
if (plp_products_.loading) set_can_write_scroll_restoration(false);else if (plp_products_()) set_can_write_scroll_restoration(true);
|
|
16005
16076
|
});
|
|
16006
|
-
$8tj43$createRenderEffect($8tj43$
|
|
16077
|
+
$8tj43$createRenderEffect($8tj43$catchify(async () => {
|
|
16007
16078
|
var _only_show_filters_op;
|
|
16008
16079
|
const slim = is_slim_();
|
|
16009
16080
|
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();
|
|
@@ -16294,4 +16365,4 @@ function $8821a19349c36651$export$e2bf8ce7779e827e(props) {
|
|
|
16294
16365
|
}, "Entire CategoryPage failed");
|
|
16295
16366
|
}
|
|
16296
16367
|
$8tj43$add_to_version_info("ui", (0, $8db9a15135765c11$export$83d89fbfd8236492));
|
|
16297
|
-
export { $a35e6f680c5bbc60$export$54299a3c81f5425 as useVisibilityState, $002f09d00aac50b2$export$eaa625fb39439e37 as useSlidableInformation, $618bd53ea0a41cd4$export$80bb7300ce6a8be3 as useProductCardIsVisible, $618bd53ea0a41cd4$export$f223d69ed12f5fb7 as CurrentlyIntersectingContext, $8e8b179489080711$export$5bad61ecde080b1f as useExpandingContainerReactive, $bb34cd283e904784$export$2c9f9bf2092486aa as LooksSliderOrGrid, $
|
|
16368
|
+
export { $715f7f2e53146662$export$d4d96868197be50e as useMobileHover, $a35e6f680c5bbc60$export$54299a3c81f5425 as useVisibilityState, $002f09d00aac50b2$export$eaa625fb39439e37 as useSlidableInformation, $618bd53ea0a41cd4$export$80bb7300ce6a8be3 as useProductCardIsVisible, $618bd53ea0a41cd4$export$f223d69ed12f5fb7 as CurrentlyIntersectingContext, $8e8b179489080711$export$5bad61ecde080b1f as useExpandingContainerReactive, $bb34cd283e904784$export$2c9f9bf2092486aa as LooksSliderOrGrid, $22dd375b476673e2$export$44809a8a3e867e30 as LookCard, $ac571292d606f30b$export$7e1297a3a19f10d8 as PseudoRouter, $6d75ec14f537c37f$export$83bb9af5671e1dbe as promiseSafeStructuredClone, $68e6625c8d51f847$export$5162a71f252e6122 as preserve_items_in_history_dot_state, $68e6625c8d51f847$export$3064e1e8c6513da3 as prefixes_to_preserve_in_history_dot_state, $9b35d1384e31813a$export$29d28dadc2d6b631 as allowNativeNavigation, $b026fa9c9c904a98$export$1ea76ea778b880dd as modalVersionSymbol, $a604a8ffa4e4c03f$export$e417c49320921907 as createDeparallelizedNoDropResource, $01c33966d9ddb108$export$f50b88e2a00918b5 as throw_globally, $40411f2ec772c376$export$9265e66f26f8e383 as ClassicSearchModal, $06fcd2a345efd24d$export$b0c55aa2e87c4be7 as SearchModalV2, $98688279b9059f50$export$9d4a4b669b1929ab as ModernResponsiveContainedImage, $6a439680ae7e9ba3$export$3e41faf802a29e71 as Tab, $6a439680ae7e9ba3$export$b2539bed5023c21c as Tabs, $6b0fd8fd20df8ccf$export$d4973c31938cbfd1 as ShopTheLookButton, $972f6bce0f9d61be$export$e183a13865960371 as history_dot_state_to_state, $2855bffe06ef7a03$export$916e6850778505f6 as strip_encoded_filter_and_sort, $2855bffe06ef7a03$export$58aa3f171519b6d7 as encode_filters, $2855bffe06ef7a03$export$f934fa24c3a86811 as decode_filters, $2855bffe06ef7a03$export$62acb285a7579555 as encode_sorting, $2855bffe06ef7a03$export$766e9676e74997d3 as decode_sorting, $4df489344a0f97c7$export$d7b7ab832c20e2f4 as shopifyContainedImageContextSymbol, $5441862cd2f5e111$export$e68cff63f76bd15b as ListingProvider, $5441862cd2f5e111$export$8d0c4fdbb05a2f2e as useListing, $1e69163caedaab4e$export$11354f017ddc9790 as ProductCardIndexProvider, $1e69163caedaab4e$export$e3faf4d95300054f as useProductCardIndex, $4df489344a0f97c7$export$e4b984597b71e989 as ShopifyContainedImage, $002f09d00aac50b2$export$6649caad96ef8870 as SlidableItems, $fc830a7ee59416ef$export$ebdc3711f7e02ccd as make_accurate_width_accessor, $d5d7e58c5c9d8db0$export$9574e176201e5e8d as RecommendationSlider, $b432b11321ad4c97$export$9756467d34d91cdb as RecommendationGrid, $56047603f9d212b6$export$6e5611bc7e57e477 as ShopifyResponsiveImg, $56047603f9d212b6$export$e6fffe67d4cdd848 as makeSizeAccessor, $801e8845d3fa3653$export$94026ee33dbabc26 as ImageContainer, $74777e8fe65b3dcb$export$b69d0d92862de18b as SentryErrorBoundary, $74777e8fe65b3dcb$export$240ecf5363d76c0f as ExtraSentryContextProvider, $ad371564683947ab$export$6c6d7a51fa9aa15d as ExpandingDetails, $e18ab2868df26f40$export$f091cbac892643a4 as accessor_of_object_to_object_with_accessor_values, $4711a82d08d2021b$export$fecbb157621501bd as SelectedFilters, $f6b0500577e1b210$export$3f1a388cc0d8fed7 as FilterBody, $44aa24b1bb793549$export$b288c38ae3fddb56 as create_modified_filters, $63f1f8dbcd07d3b0$export$d21e32dfedac04be as SolidLayout, $63f1f8dbcd07d3b0$export$445d8d3f5f706a40 as SolidLayoutWithProvidedElement, $d5f1e6a0f9117286$export$79b1565500412d9b as general_modal_abstraction, $9783d437ad61594c$export$3b621d86b1566b2 as CrossIcon, $ca6ab5f08bd28bca$export$8be2714ec7f169ee as GenericSliderArrowButton, $50aebf5b445518eb$export$58e808b1db15d3bc as fetchDepictRecommendations, $fa332ea03168857c$export$b91cec6bdc6b32a1 as CategoryTitle, $702d7656a373973e$export$824dde41348efed1 as embedded_num_products, $160ea2b55d8772d2$export$c1a6b039e689a58e as get_listings, $f5f54892fd0c7d9f$export$f34314aa9505732e as DepictCategory, $eb064bc3350276c1$export$ac6237957a15b3f0 as DepictSearch, $eb064bc3350276c1$export$bde3eb976dfded9 as get_search_query_updating_blocked_signal, $eb064bc3350276c1$export$f2dc7e4e4aa11abb as SearchPage, $f3b7124b76123e44$export$aa14a9f43128f61f as ProductCardError, $169c13c0531d91d2$export$d86a33413558014e as open_modal_with_alignment, $5eaa00b951637e96$export$ee1733d9a8495996 as DefaultInstantCardPlaceholder, $1308a7816c3d4f2d$export$b3ad617e9036868 as align_field, $1308a7816c3d4f2d$export$3f238c96c45e6cc6 as ALIGN_TOP, $1308a7816c3d4f2d$export$902f8b4a7dae5d78 as ALIGN_WIDTH_ON_MODAL, $1308a7816c3d4f2d$export$7895aadd1956b1c7 as ALIGN_LEFT, $1308a7816c3d4f2d$export$6060bc6bee850eb6 as SET_CENTERED_LEFT, $a9c7ba6087881ac2$export$6daf8749b65a1b77 as convert_sdk_cols_at_size_to_layout, $cc64aabf2c7a1f1a$export$1233ca167bf71f9a as styles_to_valid_css_string, $e56d241d0f33d459$export$fe334901e8bebd57 as disable_scrolling, $573c007c697a1831$export$d0596b5cae35ad4 as open_search_with_shift_slash, $284849364a6ef73a$export$e015ed2f2950f2e3 as DepictAPI, $00a5b94f0c11efbb$export$d9f36cf74e24d595 as media_query_to_accessor, $e60a76195ac6d408$export$689e204eadb33baf as setup_fast_leave, $a61a2051e15c8d7a$export$5196e4c01fa56fcb as show_toast, $60ec7a29849d81db$export$a71e92cfbb498adc as SolidFormatPrice, $37e8c97bb6876197$export$828dcdd425fd3231 as connect_search_field_height_to_aligner_height, $bc2337c9a05ecd18$export$acb3eaade4b23afd as BasePlaceholder, $ceafb6fb91c6f394$export$89c6019e4baa40b1 as TextPlaceholder, $3ab4aa97880fb88d$export$3f37af283f8fb843 as ImagePlaceholder, $f9fd3017c20b774a$export$3ccaa27d81dd8556 as PageReplacer, $d399250dfa491636$export$864d304a0bc46829 as defaultGridSpacing, $d399250dfa491636$export$c3834fa86c616831 as defaultColsAtSize, $d399250dfa491636$export$7bf543b9d9be2c22 as defaultCategoryTitlePlugin, $8db9a15135765c11$export$83d89fbfd8236492 as version, $a3026fb727bc7550$export$316f6f283ae64765 as SearchField, $62a8813a51fbd22f$export$5b7c3ce0ebe51f86 as BreadCrumbs, $62a8813a51fbd22f$export$de035477d6fef996 as QuickLinks, $8821a19349c36651$export$e2bf8ce7779e827e as CategoryPage };
|