@depict-ai/ui 4.7.23 → 4.7.25
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 +129 -45
- package/ES10/index.d.ts +5 -1
- package/ES10/index.js +347 -264
- package/latest/index.cjs +129 -45
- package/latest/index.d.ts +5 -1
- package/latest/index.js +347 -264
- package/package.json +1 -1
- package/server/ES10/index.cjs +100 -32
- package/server/ES10/index.d.ts +5 -1
- package/server/ES10/index.js +236 -169
- package/server/latest/index.cjs +100 -32
- package/server/latest/index.d.ts +5 -1
- package/server/latest/index.js +236 -169
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,68 @@ 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.25";
|
|
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, $715f7f2e53146662$var$getElementAtTouch(touch));
|
|
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("touchmove", setPositionHandler, {
|
|
57
|
+
passive: true
|
|
58
|
+
});
|
|
59
|
+
addEventListener("touchend", deleteTouchHandler, {
|
|
60
|
+
passive: true
|
|
61
|
+
});
|
|
62
|
+
addEventListener("touchcancel", deleteTouchHandler, {
|
|
63
|
+
passive: true
|
|
64
|
+
});
|
|
65
|
+
$8tj43$onCleanup(() => {
|
|
66
|
+
removeEventListener("touchstart", setPositionHandler);
|
|
67
|
+
removeEventListener("touchmove", setPositionHandler);
|
|
68
|
+
removeEventListener("touchend", deleteTouchHandler);
|
|
69
|
+
removeEventListener("touchcancel", deleteTouchHandler);
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
function $715f7f2e53146662$var$getElementAtTouch(touch) {
|
|
73
|
+
return document.elementFromPoint(touch.clientX, touch.clientY);
|
|
74
|
+
}
|
|
14
75
|
function $a35e6f680c5bbc60$export$54299a3c81f5425() {
|
|
15
76
|
const d = document;
|
|
16
77
|
const [isVisible, setIsVisible] = $8tj43$createSignal(d.visibilityState !== "hidden");
|
|
@@ -286,7 +347,7 @@ function $2d7bad8684bc7f44$export$43f0fb951fcb0c54(_ref) {
|
|
|
286
347
|
} catch (e) {
|
|
287
348
|
if (!$2d7bad8684bc7f44$var$printedCloneError) {
|
|
288
349
|
$2d7bad8684bc7f44$var$printedCloneError = true;
|
|
289
|
-
$8tj43$
|
|
350
|
+
$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
351
|
}
|
|
291
352
|
}
|
|
292
353
|
let renderingResult;
|
|
@@ -386,7 +447,7 @@ function $618bd53ea0a41cd4$export$4a14175d33d81a96(_ref) {
|
|
|
386
447
|
};
|
|
387
448
|
// 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
449
|
const shouldObserve = $8tj43$createMemo(() => alwaysObserveCards_ || listenersForIntersecting() > 0);
|
|
389
|
-
const intersection_observer = new IntersectionObserver($8tj43$
|
|
450
|
+
const intersection_observer = new IntersectionObserver($8tj43$catchify1(records => {
|
|
390
451
|
const intersectingValue = currentlyIntersecting();
|
|
391
452
|
for (let i = 0; i < records.length; i++) {
|
|
392
453
|
const record = records[i];
|
|
@@ -755,7 +816,7 @@ function $63f1f8dbcd07d3b0$export$445d8d3f5f706a40(props, container_element) {
|
|
|
755
816
|
const view_less_button_class = "l" + $8tj43$createUniqueId(); // https://github.com/solidjs/solid-docs/issues/263#issuecomment-1622388079
|
|
756
817
|
const view_more_button_container = $8tj43$createMemo(() => have_a_view_more_button() && (() => {
|
|
757
818
|
var _el$2 = $8tj43$getNextElement($63f1f8dbcd07d3b0$var$_tmpl$);
|
|
758
|
-
$8tj43$addEventListener(_el$2, "click", $8tj43$
|
|
819
|
+
$8tj43$addEventListener(_el$2, "click", $8tj43$catchify1(() => set_rows_visible()(prev => {
|
|
759
820
|
var _rows_or_empty_object2;
|
|
760
821
|
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
822
|
})), true);
|
|
@@ -767,7 +828,7 @@ function $63f1f8dbcd07d3b0$export$445d8d3f5f706a40(props, container_element) {
|
|
|
767
828
|
// 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
829
|
const view_less_button_container = $8tj43$createMemo(() => have_a_view_less_button() && (() => {
|
|
769
830
|
var _el$3 = $8tj43$getNextElement($63f1f8dbcd07d3b0$var$_tmpl$);
|
|
770
|
-
$8tj43$addEventListener(_el$3, "click", $8tj43$
|
|
831
|
+
$8tj43$addEventListener(_el$3, "click", $8tj43$catchify1(() => set_rows_visible()(() => {
|
|
771
832
|
var _rows_or_empty_object3;
|
|
772
833
|
return (_rows_or_empty_object3 = rows_or_empty_object().start_rows) !== null && _rows_or_empty_object3 !== void 0 ? _rows_or_empty_object3 : 1;
|
|
773
834
|
})), true);
|
|
@@ -793,7 +854,7 @@ function $63f1f8dbcd07d3b0$export$445d8d3f5f706a40(props, container_element) {
|
|
|
793
854
|
}
|
|
794
855
|
update_children_count();
|
|
795
856
|
if (!(0, $8tj43$isServer)) {
|
|
796
|
-
const mutation_observer = new MutationObserver($8tj43$
|
|
857
|
+
const mutation_observer = new MutationObserver($8tj43$catchify1(update_children_count));
|
|
797
858
|
mutation_observer.observe(container_element, {
|
|
798
859
|
childList: true
|
|
799
860
|
});
|
|
@@ -1125,7 +1186,7 @@ function $6db93f70c2db1486$export$2972b890694ced75(callback, _ref) {
|
|
|
1125
1186
|
}
|
|
1126
1187
|
function $56047603f9d212b6$export$e6fffe67d4cdd848(whatToWatch) {
|
|
1127
1188
|
const [size, setSize] = $8tj43$createSignal(0);
|
|
1128
|
-
const resizeObserver = new ResizeObserver($8tj43$
|
|
1189
|
+
const resizeObserver = new ResizeObserver($8tj43$catchify1(records => {
|
|
1129
1190
|
for (let j = 0; j < records.length; j++) {
|
|
1130
1191
|
const {
|
|
1131
1192
|
width: width
|
|
@@ -1140,7 +1201,7 @@ function $56047603f9d212b6$export$e6fffe67d4cdd848(whatToWatch) {
|
|
|
1140
1201
|
let {
|
|
1141
1202
|
element: element
|
|
1142
1203
|
} = _ref;
|
|
1143
|
-
return requestAnimationFrame($8tj43$
|
|
1204
|
+
return requestAnimationFrame($8tj43$catchify1(() => resizeObserver.observe(element)));
|
|
1144
1205
|
});
|
|
1145
1206
|
$8tj43$onCleanup(() => {
|
|
1146
1207
|
resizeObserver.disconnect();
|
|
@@ -1198,7 +1259,7 @@ function $56047603f9d212b6$export$6e5611bc7e57e477(props) {
|
|
|
1198
1259
|
if (existingStack) return existingStack.add(fn);
|
|
1199
1260
|
const newStack = new Set([fn]);
|
|
1200
1261
|
if (listingContext) listingContext[$56047603f9d212b6$var$onIdleFunctionsSymbol] = newStack;
|
|
1201
|
-
const processStackWhenIdle = () => $6db93f70c2db1486$export$2972b890694ced75($8tj43$
|
|
1262
|
+
const processStackWhenIdle = () => $6db93f70c2db1486$export$2972b890694ced75($8tj43$catchify1(deadline => {
|
|
1202
1263
|
const start = performance.now();
|
|
1203
1264
|
const thirdDeadlineTime = deadline.timeRemaining() / 3; // observers coming after this take up 2-3x the time so don't use all of it
|
|
1204
1265
|
for (const fn of newStack) {
|
|
@@ -1230,7 +1291,7 @@ function $56047603f9d212b6$export$6e5611bc7e57e477(props) {
|
|
|
1230
1291
|
let prevValue;
|
|
1231
1292
|
const aspectRatios = listingContext[$56047603f9d212b6$export$f8945274f08a3105] || (listingContext[$56047603f9d212b6$export$f8945274f08a3105] = new Set());
|
|
1232
1293
|
const [, setMostPrevalentAspectRatio] = listingContext[$56047603f9d212b6$export$6066eb417ed2e9f7] || (listingContext[$56047603f9d212b6$export$6066eb417ed2e9f7] = $8tj43$createSignal());
|
|
1233
|
-
img.addEventListener("load", $8tj43$
|
|
1294
|
+
img.addEventListener("load", $8tj43$catchify1(() => {
|
|
1234
1295
|
if (props.keyRatioUpdating) {
|
|
1235
1296
|
if (!srcJustChanged) return;
|
|
1236
1297
|
srcJustChanged = false;
|
|
@@ -1264,7 +1325,7 @@ function $56047603f9d212b6$export$6e5611bc7e57e477(props) {
|
|
|
1264
1325
|
$8tj43$createEffect(() => {
|
|
1265
1326
|
if (!props.size()) return; // wait until we have a size, run every time the size changes
|
|
1266
1327
|
if (timeoutSet) return;
|
|
1267
|
-
const handler = $8tj43$
|
|
1328
|
+
const handler = $8tj43$catchify1(() => {
|
|
1268
1329
|
if (gotCleanedUp) return;
|
|
1269
1330
|
img.sizes = sizePX(); // use latest available value of props.size
|
|
1270
1331
|
if (!sizeSetFastPath) {
|
|
@@ -1401,11 +1462,11 @@ function $60ec7a29849d81db$export$a71e92cfbb498adc(props) {
|
|
|
1401
1462
|
return $8tj43$standard_price_format(props.price_, price_formatting.places_after_comma_, price_formatting.decimal_places_delimiter_, price_formatting.thousands_delimiter_);
|
|
1402
1463
|
});
|
|
1403
1464
|
}
|
|
1404
|
-
var $
|
|
1405
|
-
$
|
|
1406
|
-
$
|
|
1407
|
-
$
|
|
1408
|
-
function $
|
|
1465
|
+
var $f84b097e079b0a33$var$_tmpl$ = /*#__PURE__*/$8tj43$template(`<div class=img-wrapper>`),
|
|
1466
|
+
$f84b097e079b0a33$var$_tmpl$2 = /*#__PURE__*/$8tj43$template(`<span class="d-price original">`),
|
|
1467
|
+
$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><!$><!/>`),
|
|
1468
|
+
$f84b097e079b0a33$var$_tmpl$4 = /*#__PURE__*/$8tj43$template(`<a class=look-item><!$><!/><!$><!/>`);
|
|
1469
|
+
function $f84b097e079b0a33$export$b73ed90f0ee50dc3(_ref) {
|
|
1409
1470
|
let {
|
|
1410
1471
|
display_: display_,
|
|
1411
1472
|
FavoriteButton_: FavoriteButton_,
|
|
@@ -1447,7 +1508,7 @@ function $0c5b1686f971e5e7$export$b73ed90f0ee50dc3(_ref) {
|
|
|
1447
1508
|
return (_variantToUse5 = variantToUse()) === null || _variantToUse5 === void 0 ? void 0 : _variantToUse5.title;
|
|
1448
1509
|
});
|
|
1449
1510
|
return (() => {
|
|
1450
|
-
var _el$ = $8tj43$getNextElement($
|
|
1511
|
+
var _el$ = $8tj43$getNextElement($f84b097e079b0a33$var$_tmpl$4),
|
|
1451
1512
|
_el$12 = _el$.firstChild,
|
|
1452
1513
|
[_el$13, _co$3] = $8tj43$getNextMarker(_el$12.nextSibling),
|
|
1453
1514
|
_el$14 = _el$13.nextSibling,
|
|
@@ -1458,7 +1519,7 @@ function $0c5b1686f971e5e7$export$b73ed90f0ee50dc3(_ref) {
|
|
|
1458
1519
|
href: href()
|
|
1459
1520
|
} : {}, {
|
|
1460
1521
|
get onClick() {
|
|
1461
|
-
return $8tj43$
|
|
1522
|
+
return $8tj43$catchify1(event_ => {
|
|
1462
1523
|
if (enableLink()) {
|
|
1463
1524
|
pseudoRouter_.navigate_.go_to_({
|
|
1464
1525
|
new_url_: href(),
|
|
@@ -1480,7 +1541,7 @@ function $0c5b1686f971e5e7$export$b73ed90f0ee50dc3(_ref) {
|
|
|
1480
1541
|
});
|
|
1481
1542
|
},
|
|
1482
1543
|
get children() {
|
|
1483
|
-
var _el$2 = $8tj43$getNextElement($
|
|
1544
|
+
var _el$2 = $8tj43$getNextElement($f84b097e079b0a33$var$_tmpl$);
|
|
1484
1545
|
$8tj43$insert(_el$2, $8tj43$createComponent((0, $8tj43$Show), {
|
|
1485
1546
|
get when() {
|
|
1486
1547
|
return imageUrl();
|
|
@@ -1515,7 +1576,7 @@ function $0c5b1686f971e5e7$export$b73ed90f0ee50dc3(_ref) {
|
|
|
1515
1576
|
return (animationEffectExists() ? isExpandedThrottledByOurEffectRun() : userWantsExpanded()) || animationIsRunning();
|
|
1516
1577
|
},
|
|
1517
1578
|
get children() {
|
|
1518
|
-
var _el$3 = $8tj43$getNextElement($
|
|
1579
|
+
var _el$3 = $8tj43$getNextElement($f84b097e079b0a33$var$_tmpl$3),
|
|
1519
1580
|
_el$4 = _el$3.firstChild,
|
|
1520
1581
|
_el$5 = _el$4.firstChild,
|
|
1521
1582
|
_el$6 = _el$5.nextSibling,
|
|
@@ -1552,7 +1613,7 @@ function $0c5b1686f971e5e7$export$b73ed90f0ee50dc3(_ref) {
|
|
|
1552
1613
|
setAnimationEffectExists(true);
|
|
1553
1614
|
$8tj43$onCleanup(() => setAnimationEffectExists(false));
|
|
1554
1615
|
});
|
|
1555
|
-
for (const ev of ["cancel", "finish"]) textContainerAnimation.addEventListener(ev, $8tj43$
|
|
1616
|
+
for (const ev of ["cancel", "finish"]) textContainerAnimation.addEventListener(ev, $8tj43$catchify1(() => setAnimationIsRunning(false)));
|
|
1556
1617
|
disconnector();
|
|
1557
1618
|
}));
|
|
1558
1619
|
}, _el$3);
|
|
@@ -1599,7 +1660,7 @@ function $0c5b1686f971e5e7$export$b73ed90f0ee50dc3(_ref) {
|
|
|
1599
1660
|
return isOnSale();
|
|
1600
1661
|
},
|
|
1601
1662
|
get children() {
|
|
1602
|
-
var _el$7 = $8tj43$getNextElement($
|
|
1663
|
+
var _el$7 = $8tj43$getNextElement($f84b097e079b0a33$var$_tmpl$2);
|
|
1603
1664
|
$8tj43$insert(_el$7, $8tj43$createComponent((0, $8tj43$Show), {
|
|
1604
1665
|
get when() {
|
|
1605
1666
|
return variantToUse() && !originalPrice.loading;
|
|
@@ -1662,7 +1723,7 @@ async function $c4103af154850e50$var$checkIfIsAffectedByChromeBug326498383() {
|
|
|
1662
1723
|
const waitAFrame = () => new Promise(r => requestAnimationFrame(() => requestAnimationFrame(r)));
|
|
1663
1724
|
const timeoutPromise = new Promise(r => {
|
|
1664
1725
|
resolveTimeoutPromise = r;
|
|
1665
|
-
setTimeout($8tj43$
|
|
1726
|
+
setTimeout($8tj43$catchify1(() => {
|
|
1666
1727
|
r();
|
|
1667
1728
|
div.remove();
|
|
1668
1729
|
}), 500);
|
|
@@ -1694,12 +1755,12 @@ async function $c4103af154850e50$var$checkIfIsAffectedByChromeBug326498383() {
|
|
|
1694
1755
|
});
|
|
1695
1756
|
await timeoutPromise;
|
|
1696
1757
|
} catch (e) {
|
|
1697
|
-
$8tj43$
|
|
1758
|
+
$8tj43$dlog1("Failed to check if affected by chrome bug 326498383", e);
|
|
1698
1759
|
}
|
|
1699
1760
|
return isAffected;
|
|
1700
1761
|
}
|
|
1701
|
-
var $
|
|
1702
|
-
function $
|
|
1762
|
+
var $275d06a183ca0a29$var$_tmpl$ = /*#__PURE__*/$8tj43$template(`<div class=scroll-padding><div class=look-overlay>`);
|
|
1763
|
+
function $275d06a183ca0a29$export$ebf0b1d4f90c09ae(_ref) {
|
|
1703
1764
|
let {
|
|
1704
1765
|
displays_: displays_,
|
|
1705
1766
|
FavoriteButton_: FavoriteButton_,
|
|
@@ -1719,6 +1780,7 @@ function $4089a7972a508539$export$ebf0b1d4f90c09ae(_ref) {
|
|
|
1719
1780
|
const textFadeInAnimationRunning = $8tj43$createSignal(false);
|
|
1720
1781
|
const [getSecondPartAnimationRunning] = textFadeInAnimationRunning;
|
|
1721
1782
|
const [userWantsExpanded, setUserWantsExpanded] = userWantsExpandedSignal_;
|
|
1783
|
+
//const elementsHovered = useMobileHover();
|
|
1722
1784
|
$c4103af154850e50$export$7b9a0e99f0aeb2f3().then(is => isAffectedByChromeBug = is);
|
|
1723
1785
|
return $8tj43$createComponent((0, $5441862cd2f5e111$export$e68cff63f76bd15b), {
|
|
1724
1786
|
get children() {
|
|
@@ -1727,21 +1789,37 @@ function $4089a7972a508539$export$ebf0b1d4f90c09ae(_ref) {
|
|
|
1727
1789
|
return containerWidth_() || !displays_();
|
|
1728
1790
|
},
|
|
1729
1791
|
get children() {
|
|
1730
|
-
var _el$ = $8tj43$getNextElement($
|
|
1792
|
+
var _el$ = $8tj43$getNextElement($275d06a183ca0a29$var$_tmpl$),
|
|
1731
1793
|
_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
|
-
|
|
1794
|
+
$8tj43$addEventListener(_el$2, "mouseleave", $8tj43$catchify1(() => supportsHover_() && setUserWantsExpanded(false)));
|
|
1795
|
+
$8tj43$addEventListener(_el$2, "mouseenter", $8tj43$catchify1(() => supportsHover_() && setUserWantsExpanded(true)));
|
|
1796
|
+
$8tj43$use(el => {
|
|
1797
|
+
$8tj43$createEffect(() => {
|
|
1798
|
+
if (userWantsExpanded()) return;
|
|
1799
|
+
if (isAffectedByChromeBug) {
|
|
1800
|
+
$275d06a183ca0a29$var$scrollingFunctionForChrome(el, 0, animationDuration_);
|
|
1801
|
+
return;
|
|
1802
|
+
}
|
|
1803
|
+
el.scrollTo({
|
|
1804
|
+
top: 0,
|
|
1805
|
+
behavior: "smooth"
|
|
1806
|
+
});
|
|
1743
1807
|
});
|
|
1744
|
-
|
|
1808
|
+
// createEffect(wasOpenedByHover => {
|
|
1809
|
+
// if (supportsHover_()) return;
|
|
1810
|
+
// const hovered = elementsHovered();
|
|
1811
|
+
// checkHovered: {
|
|
1812
|
+
// if (hovered.has(el)) break checkHovered;
|
|
1813
|
+
// for (const element of hovered) {
|
|
1814
|
+
// if (el.contains(element)) break checkHovered;
|
|
1815
|
+
// }
|
|
1816
|
+
// if (wasOpenedByHover) setUserWantsExpanded(false);
|
|
1817
|
+
// return;
|
|
1818
|
+
// }
|
|
1819
|
+
// setUserWantsExpanded(true);
|
|
1820
|
+
// return true;
|
|
1821
|
+
// });
|
|
1822
|
+
}, _el$2);
|
|
1745
1823
|
$8tj43$insert(_el$2, $8tj43$createComponent((0, $8tj43$Index), {
|
|
1746
1824
|
get each() {
|
|
1747
1825
|
return displays_() || Array.from({
|
|
@@ -1749,7 +1827,7 @@ function $4089a7972a508539$export$ebf0b1d4f90c09ae(_ref) {
|
|
|
1749
1827
|
});
|
|
1750
1828
|
},
|
|
1751
1829
|
children: (display, index) => {
|
|
1752
|
-
return $8tj43$createComponent((0, $
|
|
1830
|
+
return $8tj43$createComponent((0, $f84b097e079b0a33$export$b73ed90f0ee50dc3), {
|
|
1753
1831
|
pseudoRouter_: pseudoRouter_,
|
|
1754
1832
|
animationDuration_: animationDuration_,
|
|
1755
1833
|
display_: display,
|
|
@@ -1759,7 +1837,7 @@ function $4089a7972a508539$export$ebf0b1d4f90c09ae(_ref) {
|
|
|
1759
1837
|
priceFormatting_: priceFormatting_,
|
|
1760
1838
|
outerRef_: el => $8tj43$createEffect(() => {
|
|
1761
1839
|
if (index !== 0) return;
|
|
1762
|
-
const resizeObserver = new ResizeObserver($8tj43$
|
|
1840
|
+
const resizeObserver = new ResizeObserver($8tj43$catchify1(records => setLookItemHeight(records.at(-1).contentRect.height)));
|
|
1763
1841
|
resizeObserver.observe(el);
|
|
1764
1842
|
$8tj43$onCleanup(() => resizeObserver.disconnect());
|
|
1765
1843
|
})
|
|
@@ -1790,11 +1868,11 @@ function $4089a7972a508539$export$ebf0b1d4f90c09ae(_ref) {
|
|
|
1790
1868
|
/**
|
|
1791
1869
|
* Workaround for Chrome bug 326498383, adapted version of https://stackoverflow.com/a/39494245
|
|
1792
1870
|
*/
|
|
1793
|
-
function $
|
|
1871
|
+
function $275d06a183ca0a29$var$scrollingFunctionForChrome(element, targetScrollY, duration) {
|
|
1794
1872
|
let start;
|
|
1795
1873
|
const startingY = element.scrollTop;
|
|
1796
1874
|
const diff = targetScrollY - startingY;
|
|
1797
|
-
const step = $8tj43$
|
|
1875
|
+
const step = $8tj43$catchify1(timestamp => {
|
|
1798
1876
|
if (!start) start = timestamp;
|
|
1799
1877
|
// Elapsed milliseconds since start of scrolling.
|
|
1800
1878
|
const time = timestamp - start;
|
|
@@ -1807,8 +1885,8 @@ function $4089a7972a508539$var$scrollingFunctionForChrome(element, targetScrollY
|
|
|
1807
1885
|
// Bootstrap our animation - it will get called right before next frame shall be rendered.
|
|
1808
1886
|
requestAnimationFrame(step);
|
|
1809
1887
|
}
|
|
1810
|
-
var $
|
|
1811
|
-
function $
|
|
1888
|
+
var $22dd375b476673e2$var$_tmpl$ = /*#__PURE__*/$8tj43$template(`<div class=look-card><!$><!/><!$><!/>`);
|
|
1889
|
+
function $22dd375b476673e2$export$44809a8a3e867e30(_ref) {
|
|
1812
1890
|
let {
|
|
1813
1891
|
display_: display_,
|
|
1814
1892
|
expandedLooksSignal_: [expandedLooks_, setExpandedLooks],
|
|
@@ -1826,7 +1904,7 @@ function $697d8713dc82b9ab$export$44809a8a3e867e30(_ref) {
|
|
|
1826
1904
|
const index = $1e69163caedaab4e$export$e3faf4d95300054f();
|
|
1827
1905
|
const [containerWidth_, setContainerWidth] = $8tj43$createSignal();
|
|
1828
1906
|
const [containerHeight_, setContainerHeight] = $8tj43$createSignal();
|
|
1829
|
-
const clickHandler = $8tj43$
|
|
1907
|
+
const clickHandler = $8tj43$catchify1(_ref2 => {
|
|
1830
1908
|
let {
|
|
1831
1909
|
target: target
|
|
1832
1910
|
} = _ref2;
|
|
@@ -1868,15 +1946,15 @@ function $697d8713dc82b9ab$export$44809a8a3e867e30(_ref) {
|
|
|
1868
1946
|
// Close us if another look expands
|
|
1869
1947
|
$8tj43$createEffect(() => !expandedLooks_().has(us) && setUserWantsExpanded(false));
|
|
1870
1948
|
return (() => {
|
|
1871
|
-
var _el$ = $8tj43$getNextElement($
|
|
1949
|
+
var _el$ = $8tj43$getNextElement($22dd375b476673e2$var$_tmpl$),
|
|
1872
1950
|
_el$2 = _el$.firstChild,
|
|
1873
1951
|
[_el$3, _co$] = $8tj43$getNextMarker(_el$2.nextSibling),
|
|
1874
1952
|
_el$4 = _el$3.nextSibling,
|
|
1875
1953
|
[_el$5, _co$2] = $8tj43$getNextMarker(_el$4.nextSibling);
|
|
1876
|
-
$8tj43$addEventListener(_el$, "click", $8tj43$
|
|
1954
|
+
$8tj43$addEventListener(_el$, "click", $8tj43$catchify1(() => setUserWantsExpanded(prev => !prev)), true);
|
|
1877
1955
|
$8tj43$use(el => {
|
|
1878
1956
|
container = el;
|
|
1879
|
-
const ro = new ResizeObserver($8tj43$
|
|
1957
|
+
const ro = new ResizeObserver($8tj43$catchify1(records => {
|
|
1880
1958
|
const last = records.at(-1);
|
|
1881
1959
|
if (!last) return;
|
|
1882
1960
|
const {
|
|
@@ -1909,7 +1987,7 @@ function $697d8713dc82b9ab$export$44809a8a3e867e30(_ref) {
|
|
|
1909
1987
|
});
|
|
1910
1988
|
}
|
|
1911
1989
|
}), _el$3, _co$);
|
|
1912
|
-
$8tj43$insert(_el$, $8tj43$createComponent((0, $
|
|
1990
|
+
$8tj43$insert(_el$, $8tj43$createComponent((0, $275d06a183ca0a29$export$ebf0b1d4f90c09ae), {
|
|
1913
1991
|
displays_: () => {
|
|
1914
1992
|
var _display_2;
|
|
1915
1993
|
return (_display_2 = display_()) === null || _display_2 === void 0 ? void 0 : _display_2.displays;
|
|
@@ -1983,7 +2061,7 @@ class $ac571292d606f30b$export$7e1297a3a19f10d8 {
|
|
|
1983
2061
|
* @param is_replace_ if you want to replace the current URL in history instead of pushing a new one
|
|
1984
2062
|
* @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
2063
|
*/
|
|
1986
|
-
go_to_: $8tj43$
|
|
2064
|
+
go_to_: $8tj43$catchify1(async _ref => {
|
|
1987
2065
|
let {
|
|
1988
2066
|
new_url_: raw_new_url,
|
|
1989
2067
|
event_: event_,
|
|
@@ -2209,7 +2287,7 @@ function $bb34cd283e904784$export$2c9f9bf2092486aa(props) {
|
|
|
2209
2287
|
return $bb34cd283e904784$var$runDisplayTransformersForLooks(baseData, listings, props.displayTransformers_);
|
|
2210
2288
|
});
|
|
2211
2289
|
const sharedOptions = {
|
|
2212
|
-
product_card_template_: display => $
|
|
2290
|
+
product_card_template_: display => $22dd375b476673e2$export$44809a8a3e867e30({
|
|
2213
2291
|
display_: () => display,
|
|
2214
2292
|
FavoriteButton_: props.FavoriteButton_,
|
|
2215
2293
|
placeholderImageAspectRatio_: props.imagePlaceholderAspectRatio_,
|
|
@@ -2503,9 +2581,9 @@ const $9a693c7e832d3f18$export$b05c0ae390cf3e06 = _ref => {
|
|
|
2503
2581
|
var _selectedDueToKeyboar;
|
|
2504
2582
|
return (_selectedDueToKeyboar = selectedDueToKeyboardNavigation === null || selectedDueToKeyboardNavigation === void 0 ? void 0 : selectedDueToKeyboardNavigation()) !== null && _selectedDueToKeyboar !== void 0 ? _selectedDueToKeyboar : false;
|
|
2505
2583
|
}), _el$4);
|
|
2506
|
-
$8tj43$addEventListener(_el$4, "mouseleave", $8tj43$
|
|
2507
|
-
$8tj43$addEventListener(_el$4, "mouseenter", $8tj43$
|
|
2508
|
-
$8tj43$addEventListener(_el$4, "click", $8tj43$
|
|
2584
|
+
$8tj43$addEventListener(_el$4, "mouseleave", $8tj43$catchify1(() => set_selected_index_ === null || set_selected_index_ === void 0 ? void 0 : set_selected_index_()));
|
|
2585
|
+
$8tj43$addEventListener(_el$4, "mouseenter", $8tj43$catchify1(() => set_selected_index_ === null || set_selected_index_ === void 0 ? void 0 : set_selected_index_([keyboardNavigationGroupIndex_(), index_()])));
|
|
2586
|
+
$8tj43$addEventListener(_el$4, "click", $8tj43$catchify1(event_ => router_.navigate_.go_to_({
|
|
2509
2587
|
new_url_: href(),
|
|
2510
2588
|
is_replace_: false,
|
|
2511
2589
|
event_: event_
|
|
@@ -2634,7 +2712,7 @@ function $f7414b949aeabc90$export$62f101a8aa597bf8(_ref) {
|
|
|
2634
2712
|
// don't wait if it's the first request
|
|
2635
2713
|
write_current_instant_query(value);
|
|
2636
2714
|
clearTimeout(timeout);
|
|
2637
|
-
timeout = setTimeout($8tj43$
|
|
2715
|
+
timeout = setTimeout($8tj43$catchify1(() => write_current_instant_query(value)), 250);
|
|
2638
2716
|
});
|
|
2639
2717
|
const [search_results] = $8tj43$createResource($8tj43$createMemo(() => ({
|
|
2640
2718
|
// <-- key order important, see comment below
|
|
@@ -2642,7 +2720,7 @@ function $f7414b949aeabc90$export$62f101a8aa597bf8(_ref) {
|
|
|
2642
2720
|
market: market_(),
|
|
2643
2721
|
locale: i18n_.backend_locale_(),
|
|
2644
2722
|
query: read_current_instant_query()
|
|
2645
|
-
})), $8tj43$
|
|
2723
|
+
})), $8tj43$catchify1(async variable_data => {
|
|
2646
2724
|
return depict_api_.query({
|
|
2647
2725
|
// 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
2726
|
limit: $8tj43$untrack(has_sort_or_filters_) ? max_cards : min_products_to_fetch_,
|
|
@@ -2746,7 +2824,7 @@ function $9974e016866745eb$export$c7e181728ad525f(url) {
|
|
|
2746
2824
|
return;
|
|
2747
2825
|
$9974e016866745eb$var$last_sent_value = new_value;
|
|
2748
2826
|
const args = ["depict.send", "pageview", new_value];
|
|
2749
|
-
$8tj43$
|
|
2827
|
+
$8tj43$dlog1("Calling ga with args", ...args);
|
|
2750
2828
|
// @ts-ignore
|
|
2751
2829
|
ga(...args);
|
|
2752
2830
|
}
|
|
@@ -2761,7 +2839,7 @@ function $a09bb7c652acf957$export$3340fdd8259bd4fd(_ref) {
|
|
|
2761
2839
|
if (process.env.GA === "false") return;
|
|
2762
2840
|
let debounce_timeout;
|
|
2763
2841
|
const stop_timeout = () => clearTimeout(debounce_timeout);
|
|
2764
|
-
const send_to_ga = $8tj43$
|
|
2842
|
+
const send_to_ga = $8tj43$catchify1(() => {
|
|
2765
2843
|
const fake_url = new URL(location.href);
|
|
2766
2844
|
const {
|
|
2767
2845
|
searchParams: searchParams
|
|
@@ -2774,12 +2852,12 @@ function $a09bb7c652acf957$export$3340fdd8259bd4fd(_ref) {
|
|
|
2774
2852
|
$8tj43$onCleanup(() => {
|
|
2775
2853
|
setTimeout(
|
|
2776
2854
|
// 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$
|
|
2855
|
+
$8tj43$catchify1(() => {
|
|
2778
2856
|
if ($8tj43$untrack(get_search_query_) === $8tj43$untrack(get_search_field_value_)) stop_timeout();
|
|
2779
2857
|
}));
|
|
2780
2858
|
});
|
|
2781
2859
|
let first_call = true;
|
|
2782
|
-
$8tj43$createEffect($8tj43$
|
|
2860
|
+
$8tj43$createEffect($8tj43$catchify1(() => {
|
|
2783
2861
|
get_search_field_value_();
|
|
2784
2862
|
if (first_call) {
|
|
2785
2863
|
// we only want to do stuff when it changes
|
|
@@ -2808,7 +2886,7 @@ function $558d0596fcf0e0b0$export$50b90be27d8502d9(el, _ref, bottom_distance) {
|
|
|
2808
2886
|
[key]: new_value
|
|
2809
2887
|
});
|
|
2810
2888
|
};
|
|
2811
|
-
const is = new IntersectionObserver($8tj43$
|
|
2889
|
+
const is = new IntersectionObserver($8tj43$catchify1(_records => {
|
|
2812
2890
|
do_positioning();
|
|
2813
2891
|
}), {
|
|
2814
2892
|
threshold: $8tj43$buildThresholdList(100)
|
|
@@ -2830,7 +2908,7 @@ function $e8776b492383c292$export$91c3b6774e8be0f5(_ref) {
|
|
|
2830
2908
|
const [get_current_href, set_current_href] = $8tj43$createSignal(location.href);
|
|
2831
2909
|
const [exit_iterable, exitable_iterable] = $8tj43$make_asyncIterable_exiter((0, $8tj43$href_change_ipns));
|
|
2832
2910
|
$8tj43$onCleanup(exit_iterable);
|
|
2833
|
-
$8tj43$
|
|
2911
|
+
$8tj43$catchify1(async () => {
|
|
2834
2912
|
for await (const href of exitable_iterable)
|
|
2835
2913
|
// use native links so ppl can cmdclick/right click and open in new tab and see target URL
|
|
2836
2914
|
set_current_href(href);
|
|
@@ -2902,18 +2980,18 @@ function $01dd2bfbbae020bc$export$a146ac6fa8346a25(_ref) {
|
|
|
2902
2980
|
_el$9 = _el$5.nextSibling;
|
|
2903
2981
|
$8tj43$use(element => element.addEventListener(
|
|
2904
2982
|
// 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$
|
|
2983
|
+
"click", $8tj43$catchify1(ev => {
|
|
2906
2984
|
if ($9b35d1384e31813a$export$29d28dadc2d6b631(ev))
|
|
2907
2985
|
// not button 0 or cmd/ctrl click
|
|
2908
2986
|
return;
|
|
2909
2987
|
ev.preventDefault();
|
|
2910
2988
|
submit_query_(item());
|
|
2911
2989
|
})), _el$4);
|
|
2912
|
-
$8tj43$addEventListener(_el$4, "mouseleave", $8tj43$
|
|
2913
|
-
$8tj43$addEventListener(_el$4, "mouseenter", $8tj43$
|
|
2990
|
+
$8tj43$addEventListener(_el$4, "mouseleave", $8tj43$catchify1(() => write_selected_index_()));
|
|
2991
|
+
$8tj43$addEventListener(_el$4, "mouseenter", $8tj43$catchify1(() => write_selected_index_([0, index])));
|
|
2914
2992
|
$8tj43$insert(_el$5, $8tj43$createComponent((0, $6d95ef50ee01d5a1$export$5d2caaa6b530761c), {}), _el$8, _co$);
|
|
2915
2993
|
$8tj43$insert(_el$6, item);
|
|
2916
|
-
$8tj43$use(element => element.addEventListener("click", $8tj43$
|
|
2994
|
+
$8tj43$use(element => element.addEventListener("click", $8tj43$catchify1(e => {
|
|
2917
2995
|
// 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
2996
|
set_unfiltered_previous_searches_(prev => {
|
|
2919
2997
|
const new_value = [...prev];
|
|
@@ -3106,7 +3184,7 @@ function $b055f9e9aeceeb48$export$e872e2339fb04a7f(_ref) {
|
|
|
3106
3184
|
});
|
|
3107
3185
|
return (() => {
|
|
3108
3186
|
var _el$ = $8tj43$getNextElement($b055f9e9aeceeb48$var$_tmpl$);
|
|
3109
|
-
$8tj43$use(element => element.addEventListener("click", $8tj43$
|
|
3187
|
+
$8tj43$use(element => element.addEventListener("click", $8tj43$catchify1(ev => {
|
|
3110
3188
|
// 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
3189
|
if (is_query()) {
|
|
3112
3190
|
if ($9b35d1384e31813a$export$29d28dadc2d6b631(ev))
|
|
@@ -3123,8 +3201,8 @@ function $b055f9e9aeceeb48$export$e872e2339fb04a7f(_ref) {
|
|
|
3123
3201
|
event_: ev
|
|
3124
3202
|
});
|
|
3125
3203
|
})), _el$);
|
|
3126
|
-
$8tj43$addEventListener(_el$, "mouseleave", $8tj43$
|
|
3127
|
-
$8tj43$addEventListener(_el$, "mouseenter", $8tj43$
|
|
3204
|
+
$8tj43$addEventListener(_el$, "mouseleave", $8tj43$catchify1(() => write_selected_index_(undefined)));
|
|
3205
|
+
$8tj43$addEventListener(_el$, "mouseenter", $8tj43$catchify1(() => write_selected_index_([autocomplete_data_index, index])));
|
|
3128
3206
|
$8tj43$insert(_el$, (() => {
|
|
3129
3207
|
var _c$ = $8tj43$memo(() => !!is_query());
|
|
3130
3208
|
return () => _c$() ? [$8tj43$createComponent((0, $8tj43$Show), {
|
|
@@ -3417,7 +3495,7 @@ function $75e33704f2a83029$var$actual_navigation_working_on_fake_data(_ref2) {
|
|
|
3417
3495
|
if (!$8tj43$untrack(() => read_updating_blocked())) previous_value = sfv;
|
|
3418
3496
|
});
|
|
3419
3497
|
const owner = $8tj43$getOwner();
|
|
3420
|
-
const handler = $8tj43$
|
|
3498
|
+
const handler = $8tj43$catchify1(_ref3 => {
|
|
3421
3499
|
let {
|
|
3422
3500
|
keyCode: keyCode
|
|
3423
3501
|
} = _ref3;
|
|
@@ -3484,7 +3562,7 @@ function $75e33704f2a83029$var$actual_navigation_working_on_fake_data(_ref2) {
|
|
|
3484
3562
|
const el = element_();
|
|
3485
3563
|
if (!el) return;
|
|
3486
3564
|
el.addEventListener("keyup", handler);
|
|
3487
|
-
$8tj43$onCleanup($8tj43$
|
|
3565
|
+
$8tj43$onCleanup($8tj43$catchify1(() => el.removeEventListener("keyup", handler)));
|
|
3488
3566
|
});
|
|
3489
3567
|
}
|
|
3490
3568
|
function $c4dee1ef44de29ca$export$af0124069c150252(_ref) {
|
|
@@ -3701,7 +3779,7 @@ let $c3820807ac1e6fd7$export$44dad306455dddf;
|
|
|
3701
3779
|
|
|
3702
3780
|
function $fc830a7ee59416ef$export$ebdc3711f7e02ccd(what_to_watch) {
|
|
3703
3781
|
const [width, setWidth] = $8tj43$createSignal();
|
|
3704
|
-
const resizeObserver = new ResizeObserver($8tj43$
|
|
3782
|
+
const resizeObserver = new ResizeObserver($8tj43$catchify1(records => {
|
|
3705
3783
|
for (let j = 0; j < records.length; j++) {
|
|
3706
3784
|
var _records$j$borderBoxS, _records$j$borderBoxS2, _records$j$borderBoxS3;
|
|
3707
3785
|
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 +3792,7 @@ function $fc830a7ee59416ef$export$ebdc3711f7e02ccd(what_to_watch) {
|
|
|
3714
3792
|
let {
|
|
3715
3793
|
element: element
|
|
3716
3794
|
} = _ref;
|
|
3717
|
-
return requestAnimationFrame($8tj43$
|
|
3795
|
+
return requestAnimationFrame($8tj43$catchify1(() => {
|
|
3718
3796
|
const current_size = what_to_watch.getBoundingClientRect().width;
|
|
3719
3797
|
if (current_size)
|
|
3720
3798
|
// 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 +3840,7 @@ function $584c06c09cf4609d$export$b94867ecbd698f21(_ref) {
|
|
|
3762
3840
|
let input_element;
|
|
3763
3841
|
// This is the div where we recommend (and ourselves do) attach the event listener to that opens the search modal.
|
|
3764
3842
|
let field_div;
|
|
3765
|
-
$8tj43$createEffect($8tj43$
|
|
3843
|
+
$8tj43$createEffect($8tj43$catchify1(async () => {
|
|
3766
3844
|
if (disabled_) return;
|
|
3767
3845
|
// we aren't in DOM yet unfortunately, wouldn't even be with onMount
|
|
3768
3846
|
await (0, $8tj43$observer).wait_for_element(input_element);
|
|
@@ -3783,7 +3861,7 @@ function $584c06c09cf4609d$export$b94867ecbd698f21(_ref) {
|
|
|
3783
3861
|
var _el$ = $8tj43$getNextElement($584c06c09cf4609d$var$_tmpl$);
|
|
3784
3862
|
$8tj43$spread(_el$, $8tj43$mergeProps({
|
|
3785
3863
|
get onClick() {
|
|
3786
|
-
return $8tj43$
|
|
3864
|
+
return $8tj43$catchify1(on_back_);
|
|
3787
3865
|
},
|
|
3788
3866
|
get ["aria-label"]() {
|
|
3789
3867
|
return i18n_.back_();
|
|
@@ -3813,7 +3891,7 @@ function $584c06c09cf4609d$export$b94867ecbd698f21(_ref) {
|
|
|
3813
3891
|
return isNewModal || !searchFieldEmpty() ? "" : "display: none";
|
|
3814
3892
|
},
|
|
3815
3893
|
get onClick() {
|
|
3816
|
-
return $8tj43$
|
|
3894
|
+
return $8tj43$catchify1(() => {
|
|
3817
3895
|
if (isNewModal && searchFieldEmpty()) return;
|
|
3818
3896
|
setSearchFieldValue("");
|
|
3819
3897
|
clear_filters_(true);
|
|
@@ -3870,7 +3948,7 @@ function $584c06c09cf4609d$export$b94867ecbd698f21(_ref) {
|
|
|
3870
3948
|
field_div = el;
|
|
3871
3949
|
field_element_ref_ === null || field_element_ref_ === void 0 || field_element_ref_(el);
|
|
3872
3950
|
}, _el$5);
|
|
3873
|
-
$8tj43$addEventListener(_el$5, "click", $8tj43$
|
|
3951
|
+
$8tj43$addEventListener(_el$5, "click", $8tj43$catchify1(_ref2 => {
|
|
3874
3952
|
let {
|
|
3875
3953
|
target: target,
|
|
3876
3954
|
currentTarget: currentTarget,
|
|
@@ -3902,7 +3980,7 @@ function $584c06c09cf4609d$export$b94867ecbd698f21(_ref) {
|
|
|
3902
3980
|
} = _ref3;
|
|
3903
3981
|
// 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
3982
|
if (pointerType === "mouse") {
|
|
3905
|
-
const handler = $8tj43$
|
|
3983
|
+
const handler = $8tj43$catchify1(_ref4 => {
|
|
3906
3984
|
let {
|
|
3907
3985
|
pointerType: pointerType,
|
|
3908
3986
|
target: target
|
|
@@ -3916,26 +3994,26 @@ function $584c06c09cf4609d$export$b94867ecbd698f21(_ref) {
|
|
|
3916
3994
|
$8tj43$runWithOwner(owner_of_field_element, () => $8tj43$onCleanup(() => window.removeEventListener("pointerup", handler)));
|
|
3917
3995
|
}
|
|
3918
3996
|
};
|
|
3919
|
-
$8tj43$addEventListener(_el$6, "select", $8tj43$
|
|
3997
|
+
$8tj43$addEventListener(_el$6, "select", $8tj43$catchify1(() => {
|
|
3920
3998
|
if (disabled_)
|
|
3921
3999
|
// 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
4000
|
return;
|
|
3923
4001
|
if (input_element.selectionStart === 0 && input_element.selectionEnd === input_element.value.length)
|
|
3924
4002
|
// everything was selected, clear filters on next submit on next input
|
|
3925
|
-
input_element.addEventListener("input", $8tj43$
|
|
4003
|
+
input_element.addEventListener("input", $8tj43$catchify1(() => clear_filters_(false)),
|
|
3926
4004
|
// We don't count this as user triggered since it wasn't explicit
|
|
3927
4005
|
{
|
|
3928
4006
|
once: true
|
|
3929
4007
|
});
|
|
3930
4008
|
}));
|
|
3931
|
-
$8tj43$addEventListener(_el$6, "input", $8tj43$
|
|
4009
|
+
$8tj43$addEventListener(_el$6, "input", $8tj43$catchify1(() => {
|
|
3932
4010
|
const {
|
|
3933
4011
|
value: value
|
|
3934
4012
|
} = input_element;
|
|
3935
4013
|
if (!disabled_ && !value.length) clear_filters_(false); // if the user clears the whole field, reset filters on next submit
|
|
3936
4014
|
setSearchFieldValue(value);
|
|
3937
4015
|
}), true);
|
|
3938
|
-
$8tj43$addEventListener(_el$6, "keydown", $8tj43$
|
|
4016
|
+
$8tj43$addEventListener(_el$6, "keydown", $8tj43$catchify1(e => {
|
|
3939
4017
|
if (disabled_) {
|
|
3940
4018
|
if (e.key !== "Tab" && e.key !== "Shift")
|
|
3941
4019
|
// 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 +4023,7 @@ function $584c06c09cf4609d$export$b94867ecbd698f21(_ref) {
|
|
|
3945
4023
|
if (!dont_submit) submit_query_();
|
|
3946
4024
|
}
|
|
3947
4025
|
}), true);
|
|
3948
|
-
var _ref$2 = $8tj43$
|
|
4026
|
+
var _ref$2 = $8tj43$catchify1(el => {
|
|
3949
4027
|
input_element = el;
|
|
3950
4028
|
input_field_ref_ === null || input_field_ref_ === void 0 || input_field_ref_(el);
|
|
3951
4029
|
});
|
|
@@ -3957,7 +4035,7 @@ function $584c06c09cf4609d$export$b94867ecbd698f21(_ref) {
|
|
|
3957
4035
|
when: !isNewModal,
|
|
3958
4036
|
get children() {
|
|
3959
4037
|
var _el$11 = $8tj43$getNextElement($584c06c09cf4609d$var$_tmpl$4);
|
|
3960
|
-
$8tj43$addEventListener(_el$11, "click", $8tj43$
|
|
4038
|
+
$8tj43$addEventListener(_el$11, "click", $8tj43$catchify1(() => submit_query_()), true);
|
|
3961
4039
|
$8tj43$insert(_el$11, $8tj43$createComponent((0, $ef0f18a578b32578$export$82eafebb825fc23f), {}));
|
|
3962
4040
|
$8tj43$effect(() => $8tj43$setAttribute(_el$11, "aria-label", i18n_.search_submit_button_aria_label_()));
|
|
3963
4041
|
$8tj43$runHydrationEvents();
|
|
@@ -3994,18 +4072,18 @@ function $e56d241d0f33d459$export$fe334901e8bebd57() {
|
|
|
3994
4072
|
offset: 0
|
|
3995
4073
|
}, 1);
|
|
3996
4074
|
animation.pause();
|
|
3997
|
-
const fn = $8tj43$
|
|
4075
|
+
const fn = $8tj43$catchify1(animation.play.bind(animation));
|
|
3998
4076
|
cleanup_fns.push(fn);
|
|
3999
4077
|
$8tj43$onCleanup(fn);
|
|
4000
4078
|
} catch (e) {
|
|
4001
|
-
$8tj43$
|
|
4079
|
+
$8tj43$dlog1("Probably partial keyframe error", e);
|
|
4002
4080
|
}
|
|
4003
4081
|
if (getComputedStyle(element).overflow !== "hidden") {
|
|
4004
4082
|
// safari gets special hacky treatment
|
|
4005
4083
|
const style = element.style;
|
|
4006
4084
|
const original_value = style.overflow;
|
|
4007
4085
|
style.overflow = "hidden";
|
|
4008
|
-
const fn = $8tj43$
|
|
4086
|
+
const fn = $8tj43$catchify1(() => style.overflow = original_value);
|
|
4009
4087
|
cleanup_fns.push(fn);
|
|
4010
4088
|
$8tj43$onCleanup(fn);
|
|
4011
4089
|
}
|
|
@@ -4028,8 +4106,8 @@ function $a82a41ab7188eda2$export$93d9bfd0c9c1a5b8(close_modal, search_query_url
|
|
|
4028
4106
|
let set_initial_values = false;
|
|
4029
4107
|
let old_pathname;
|
|
4030
4108
|
let old_param_value;
|
|
4031
|
-
$8tj43$onCleanup($8tj43$
|
|
4032
|
-
$8tj43$
|
|
4109
|
+
$8tj43$onCleanup($8tj43$catchify1(exit_iterable));
|
|
4110
|
+
$8tj43$catchify1(async () => {
|
|
4033
4111
|
for await (const href of exitable_iterable) {
|
|
4034
4112
|
const u_o = new URL(href);
|
|
4035
4113
|
const new_pathname = u_o.pathname;
|
|
@@ -4101,7 +4179,7 @@ function $40411f2ec772c376$var$RawClassicSearchModal(_ref) {
|
|
|
4101
4179
|
} = alignmentSignals_ || {};
|
|
4102
4180
|
const [bodyAlignmentStyle] = bodyAlignmentSignal;
|
|
4103
4181
|
const [get_modal_search_results, set_modal_search_results_] = $8tj43$createSignal();
|
|
4104
|
-
const close_on_escape_handler = $8tj43$
|
|
4182
|
+
const close_on_escape_handler = $8tj43$catchify1(_ref2 => {
|
|
4105
4183
|
let {
|
|
4106
4184
|
key: key
|
|
4107
4185
|
} = _ref2;
|
|
@@ -4127,7 +4205,7 @@ function $40411f2ec772c376$var$RawClassicSearchModal(_ref) {
|
|
|
4127
4205
|
const DiscoverMoreSection = () => (() => {
|
|
4128
4206
|
var _el$ = $8tj43$getNextElement($40411f2ec772c376$var$_tmpl$),
|
|
4129
4207
|
_el$2 = _el$.firstChild;
|
|
4130
|
-
$8tj43$addEventListener(_el$2, "click", $8tj43$
|
|
4208
|
+
$8tj43$addEventListener(_el$2, "click", $8tj43$catchify1(() => submit_query_()), true);
|
|
4131
4209
|
$8tj43$insert(_el$2, (() => {
|
|
4132
4210
|
var _c$ = $8tj43$memo(() => !!get_search_field_value_());
|
|
4133
4211
|
return () => _c$() ? i18n_.modal_view_all_results_()((() => {
|
|
@@ -4142,7 +4220,7 @@ function $40411f2ec772c376$var$RawClassicSearchModal(_ref) {
|
|
|
4142
4220
|
if (disable_scrolling_) $e56d241d0f33d459$export$fe334901e8bebd57();
|
|
4143
4221
|
$a82a41ab7188eda2$export$93d9bfd0c9c1a5b8(close_modal_, search_query_url_param_name_);
|
|
4144
4222
|
window.addEventListener("keydown", close_on_escape_handler);
|
|
4145
|
-
$8tj43$onCleanup($8tj43$
|
|
4223
|
+
$8tj43$onCleanup($8tj43$catchify1(() => window.removeEventListener("keydown", close_on_escape_handler)));
|
|
4146
4224
|
if (closing_animation_) register_closing_animation_(closing_animation_);
|
|
4147
4225
|
$a09bb7c652acf957$export$3340fdd8259bd4fd({
|
|
4148
4226
|
get_search_field_value_: get_search_field_value_,
|
|
@@ -4197,14 +4275,14 @@ function $40411f2ec772c376$var$RawClassicSearchModal(_ref) {
|
|
|
4197
4275
|
[_el$16, _co$5] = $8tj43$getNextMarker(_el$15.nextSibling),
|
|
4198
4276
|
_el$17 = _el$5.nextSibling,
|
|
4199
4277
|
[_el$18, _co$6] = $8tj43$getNextMarker(_el$17.nextSibling);
|
|
4200
|
-
$8tj43$addEventListener(_el$4, "click", $8tj43$
|
|
4278
|
+
$8tj43$addEventListener(_el$4, "click", $8tj43$catchify1(_ref3 => {
|
|
4201
4279
|
let {
|
|
4202
4280
|
target: target
|
|
4203
4281
|
} = _ref3;
|
|
4204
4282
|
if (target === modal_element) close_modal_();
|
|
4205
4283
|
}), true);
|
|
4206
4284
|
$8tj43$insert(_el$5, search_field, _el$14, _co$4);
|
|
4207
|
-
$8tj43$use(el => $8tj43$
|
|
4285
|
+
$8tj43$use(el => $8tj43$catchify1((0, $558d0596fcf0e0b0$export$50b90be27d8502d9))(el, bodyAlignmentSignal, bottom_distance_under_modal_), _el$6);
|
|
4208
4286
|
$8tj43$insert(_el$6, $8tj43$createComponent((0, $74777e8fe65b3dcb$export$b69d0d92862de18b), {
|
|
4209
4287
|
severity_: "error",
|
|
4210
4288
|
message_: "Autocomplete/suggestions failed",
|
|
@@ -4410,7 +4488,7 @@ function $2855bffe06ef7a03$var$decode_filter_data(op, encoded_data) {
|
|
|
4410
4488
|
try {
|
|
4411
4489
|
return JSON.parse($8tj43$base64_decode_unicode(encoded_data));
|
|
4412
4490
|
} catch (e) {
|
|
4413
|
-
$8tj43$
|
|
4491
|
+
$8tj43$dlog1("Failed to fallback parse filter data", op, encoded_data, e);
|
|
4414
4492
|
}
|
|
4415
4493
|
return null;
|
|
4416
4494
|
}
|
|
@@ -4471,7 +4549,7 @@ function $2855bffe06ef7a03$export$766e9676e74997d3(search_params, sorting_query_
|
|
|
4471
4549
|
field: encoded_sorting.slice(0, -$2855bffe06ef7a03$var$descending_token.length),
|
|
4472
4550
|
order: "desc"
|
|
4473
4551
|
};
|
|
4474
|
-
$8tj43$
|
|
4552
|
+
$8tj43$dlog1("Invalid sorting query param value", encoded_sorting);
|
|
4475
4553
|
return;
|
|
4476
4554
|
}
|
|
4477
4555
|
function $2855bffe06ef7a03$export$916e6850778505f6(search_params, filter_query_param_prefix, sorting_query_param) {
|
|
@@ -4479,7 +4557,7 @@ function $2855bffe06ef7a03$export$916e6850778505f6(search_params, filter_query_p
|
|
|
4479
4557
|
const keys = [...search_params.keys()];
|
|
4480
4558
|
for (const key of keys) if (key.startsWith(filter_query_param_prefix) || key === sorting_query_param || key.startsWith($2855bffe06ef7a03$var$legacy_filter_prefix)) search_params.delete(key);
|
|
4481
4559
|
}
|
|
4482
|
-
const $2855bffe06ef7a03$export$
|
|
4560
|
+
const $2855bffe06ef7a03$export$84daa4fa1471698b = "#went_sideways_clear_filters";
|
|
4483
4561
|
function $2855bffe06ef7a03$export$43cd1e747fecd42e(_ref2) {
|
|
4484
4562
|
let {
|
|
4485
4563
|
to_url_: to_url_,
|
|
@@ -4494,9 +4572,13 @@ function $2855bffe06ef7a03$export$43cd1e747fecd42e(_ref2) {
|
|
|
4494
4572
|
const {
|
|
4495
4573
|
searchParams: searchParams
|
|
4496
4574
|
} = url_object;
|
|
4497
|
-
|
|
4575
|
+
let transferredAnyFilters = false;
|
|
4498
4576
|
if (from_search_params_.has(sorting_query_param_)) searchParams.set(sorting_query_param_, from_search_params_.get(sorting_query_param_));
|
|
4499
|
-
for (const key of from_search_params_.keys()) if (key.startsWith(filter_query_param_prefix_))
|
|
4577
|
+
for (const key of from_search_params_.keys()) if (key.startsWith(filter_query_param_prefix_)) {
|
|
4578
|
+
searchParams.set(key, from_search_params_.get(key));
|
|
4579
|
+
transferredAnyFilters = true;
|
|
4580
|
+
}
|
|
4581
|
+
if (set_clearing_flag_ && transferredAnyFilters) url_object.hash = $2855bffe06ef7a03$export$84daa4fa1471698b;
|
|
4500
4582
|
if (was_url_object) return url_object;
|
|
4501
4583
|
return url_object.href;
|
|
4502
4584
|
}
|
|
@@ -4545,7 +4627,7 @@ function $52efc9ae4382e25a$export$5646050d516e06bc(_ref) {
|
|
|
4545
4627
|
},
|
|
4546
4628
|
get children() {
|
|
4547
4629
|
var _el$2 = $8tj43$getNextElement($52efc9ae4382e25a$var$_tmpl$2);
|
|
4548
|
-
$8tj43$addEventListener(_el$2, "click", $8tj43$
|
|
4630
|
+
$8tj43$addEventListener(_el$2, "click", $8tj43$catchify1(ev => router_.navigate_.go_to_({
|
|
4549
4631
|
new_url_: href(),
|
|
4550
4632
|
is_replace_: false,
|
|
4551
4633
|
event_: ev,
|
|
@@ -4612,7 +4694,7 @@ function $26db6925469636a4$export$67152d26d4f56ee8(_ref) {
|
|
|
4612
4694
|
return href();
|
|
4613
4695
|
},
|
|
4614
4696
|
get onClick() {
|
|
4615
|
-
return $8tj43$
|
|
4697
|
+
return $8tj43$catchify1(ev => href() && router_.navigate_.go_to_({
|
|
4616
4698
|
new_url_: href(),
|
|
4617
4699
|
is_replace_: false,
|
|
4618
4700
|
event_: ev,
|
|
@@ -4643,8 +4725,8 @@ function $26db6925469636a4$export$67152d26d4f56ee8(_ref) {
|
|
|
4643
4725
|
[_el$8, _co$2] = $8tj43$getNextMarker(_el$7.nextSibling),
|
|
4644
4726
|
_el$4 = _el$8.nextSibling;
|
|
4645
4727
|
$8tj43$use(element => $d0883254246d3eb6$export$12761f53d7ab7f27(element, selectedDueToKeyboardNavigation), _el$2);
|
|
4646
|
-
$8tj43$addEventListener(_el$2, "mouseleave", $8tj43$
|
|
4647
|
-
$8tj43$addEventListener(_el$2, "mouseover", $8tj43$
|
|
4728
|
+
$8tj43$addEventListener(_el$2, "mouseleave", $8tj43$catchify1(() => write_selected_index_()));
|
|
4729
|
+
$8tj43$addEventListener(_el$2, "mouseover", $8tj43$catchify1(_ref2 => {
|
|
4648
4730
|
let {
|
|
4649
4731
|
target: target
|
|
4650
4732
|
} = _ref2;
|
|
@@ -4904,7 +4986,7 @@ function $5175a47d13b7c228$export$d4994a86c6235f72(_ref) {
|
|
|
4904
4986
|
var _el$7 = $8tj43$getNextElement($5175a47d13b7c228$var$_tmpl$2);
|
|
4905
4987
|
$8tj43$use(element => {
|
|
4906
4988
|
$d0883254246d3eb6$export$12761f53d7ab7f27(element, selectedDueToKeyboardNavigation);
|
|
4907
|
-
element.addEventListener("click", $8tj43$
|
|
4989
|
+
element.addEventListener("click", $8tj43$catchify1(ev => {
|
|
4908
4990
|
// 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.
|
|
4909
4991
|
const itemContents = item();
|
|
4910
4992
|
if ("page_url_" in itemContents) {
|
|
@@ -4920,8 +5002,8 @@ function $5175a47d13b7c228$export$d4994a86c6235f72(_ref) {
|
|
|
4920
5002
|
submit_query_(itemContents.title_);
|
|
4921
5003
|
}));
|
|
4922
5004
|
}, _el$7);
|
|
4923
|
-
$8tj43$addEventListener(_el$7, "mouseleave", $8tj43$
|
|
4924
|
-
$8tj43$addEventListener(_el$7, "mouseenter", $8tj43$
|
|
5005
|
+
$8tj43$addEventListener(_el$7, "mouseleave", $8tj43$catchify1(() => write_selected_index_()));
|
|
5006
|
+
$8tj43$addEventListener(_el$7, "mouseenter", $8tj43$catchify1(() => write_selected_index_([itemIndex_(), index])));
|
|
4925
5007
|
$8tj43$insert(_el$7, $8tj43$createComponent((0, $02b6641aa50ce528$export$ba17c5b7e6dda39f), {
|
|
4926
5008
|
class_: "title line-clamp",
|
|
4927
5009
|
get whole_text_to_display_() {
|
|
@@ -5044,7 +5126,7 @@ function $4acc866f8fdfc002$export$af1fb307bbba2417(_ref) {
|
|
|
5044
5126
|
},
|
|
5045
5127
|
extraTitleRowElements_: () => (() => {
|
|
5046
5128
|
var _el$ = $8tj43$getNextElement($4acc866f8fdfc002$var$_tmpl$);
|
|
5047
|
-
$8tj43$addEventListener(_el$, "click", $8tj43$
|
|
5129
|
+
$8tj43$addEventListener(_el$, "click", $8tj43$catchify1(() => set_unfiltered_previous_searches_([])), true);
|
|
5048
5130
|
$8tj43$insert(_el$, () => i18n_.clear_all_from_filter_crumbs_());
|
|
5049
5131
|
$8tj43$runHydrationEvents();
|
|
5050
5132
|
return _el$;
|
|
@@ -5195,7 +5277,7 @@ function $06fcd2a345efd24d$var$RawSearchModalV2(_ref) {
|
|
|
5195
5277
|
const random_classname_body = $8tj43$make_random_classname();
|
|
5196
5278
|
const backdropRandomClassname = $8tj43$make_random_classname();
|
|
5197
5279
|
const [get_modal_search_results_, set_modal_search_results_] = $8tj43$createSignal();
|
|
5198
|
-
const close_on_escape_handler = $8tj43$
|
|
5280
|
+
const close_on_escape_handler = $8tj43$catchify1(evt => {
|
|
5199
5281
|
if (evt.key === "Escape") {
|
|
5200
5282
|
evt.preventDefault(); // Prevent the browser from closing/cancelling the modal so our animations have time to run
|
|
5201
5283
|
close_modal_();
|
|
@@ -5298,7 +5380,7 @@ function $06fcd2a345efd24d$var$RawSearchModalV2(_ref) {
|
|
|
5298
5380
|
$8tj43$createEffect($8tj43$on(get_search_field_value_, () => {
|
|
5299
5381
|
setShowStaleListingSuggestions(true);
|
|
5300
5382
|
clearTimeout(listingSuggestionsDebounceTimeout);
|
|
5301
|
-
listingSuggestionsDebounceTimeout = setTimeout($8tj43$
|
|
5383
|
+
listingSuggestionsDebounceTimeout = setTimeout($8tj43$catchify1(() => setShowStaleListingSuggestions(false)), 350);
|
|
5302
5384
|
}, {
|
|
5303
5385
|
defer: true
|
|
5304
5386
|
}));
|
|
@@ -5436,7 +5518,7 @@ function $06fcd2a345efd24d$var$RawSearchModalV2(_ref) {
|
|
|
5436
5518
|
const discoverMoreSection = (() => {
|
|
5437
5519
|
var _el$7 = $8tj43$getNextElement($06fcd2a345efd24d$var$_tmpl$4),
|
|
5438
5520
|
_el$8 = _el$7.firstChild;
|
|
5439
|
-
$8tj43$addEventListener(_el$8, "click", $8tj43$
|
|
5521
|
+
$8tj43$addEventListener(_el$8, "click", $8tj43$catchify1(() => submit_query_()), true);
|
|
5440
5522
|
$8tj43$insert(_el$8, (() => {
|
|
5441
5523
|
var _c$ = $8tj43$memo(() => !!get_search_field_value_());
|
|
5442
5524
|
return () => _c$() ? i18n_.modal_view_all_results_()((() => {
|
|
@@ -5469,7 +5551,7 @@ function $06fcd2a345efd24d$var$RawSearchModalV2(_ref) {
|
|
|
5469
5551
|
}
|
|
5470
5552
|
});
|
|
5471
5553
|
if (setSearchFieldOuterWidth_) {
|
|
5472
|
-
const resizeObserver = new ResizeObserver($8tj43$
|
|
5554
|
+
const resizeObserver = new ResizeObserver($8tj43$catchify1(records => setSearchFieldOuterWidth_(records.at(-1).contentRect.width)));
|
|
5473
5555
|
resizeObserver.observe(search_field);
|
|
5474
5556
|
$8tj43$onCleanup(() => resizeObserver.disconnect());
|
|
5475
5557
|
}
|
|
@@ -5511,7 +5593,7 @@ function $06fcd2a345efd24d$var$RawSearchModalV2(_ref) {
|
|
|
5511
5593
|
_el$13 = _el$15.nextSibling,
|
|
5512
5594
|
_el$16 = _el$12.nextSibling,
|
|
5513
5595
|
[_el$17, _co$3] = $8tj43$getNextMarker(_el$16.nextSibling);
|
|
5514
|
-
$8tj43$addEventListener(_el$11, "click", $8tj43$
|
|
5596
|
+
$8tj43$addEventListener(_el$11, "click", $8tj43$catchify1(_ref3 => {
|
|
5515
5597
|
let {
|
|
5516
5598
|
target: target,
|
|
5517
5599
|
currentTarget: currentTarget
|
|
@@ -5520,13 +5602,13 @@ function $06fcd2a345efd24d$var$RawSearchModalV2(_ref) {
|
|
|
5520
5602
|
}), true);
|
|
5521
5603
|
$8tj43$use(element => {
|
|
5522
5604
|
// 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.
|
|
5523
|
-
const resizeObserver = new ResizeObserver($8tj43$
|
|
5605
|
+
const resizeObserver = new ResizeObserver($8tj43$catchify1(records => setModalBodyWidth(records.at(-1).contentRect.width)));
|
|
5524
5606
|
resizeObserver.observe(element);
|
|
5525
5607
|
$8tj43$onCleanup(() => resizeObserver.disconnect());
|
|
5526
5608
|
}, _el$12);
|
|
5527
5609
|
$8tj43$insert(_el$12, search_field, _el$15, _co$2);
|
|
5528
5610
|
$8tj43$use(el => {
|
|
5529
|
-
$8tj43$
|
|
5611
|
+
$8tj43$catchify1((0, $558d0596fcf0e0b0$export$50b90be27d8502d9))(el, bodyAlignmentSignal, bottom_distance_under_modal_ || (() => 0.03 // 3% under SearchModalV2 by default
|
|
5530
5612
|
));
|
|
5531
5613
|
// Workaround part 2 of https://github.com/solidjs/solid/issues/2030
|
|
5532
5614
|
// 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
|
|
@@ -5604,7 +5686,7 @@ function $6a439680ae7e9ba3$var$ActualTabs(props) {
|
|
|
5604
5686
|
});
|
|
5605
5687
|
const isSelected = $8tj43$createSelector(currentlySelected);
|
|
5606
5688
|
const owner = $8tj43$getOwner();
|
|
5607
|
-
const updateTabsSignal = $8tj43$
|
|
5689
|
+
const updateTabsSignal = $8tj43$catchify(() => $8tj43$runWithOwner(owner, () => setTabsReactive([...ourTabsSet])));
|
|
5608
5690
|
const ourTabsSet = $6a439680ae7e9ba3$var$useTabs();
|
|
5609
5691
|
const location = $8tj43$use_href_accessor1();
|
|
5610
5692
|
const linkWithChangedHash = hash => {
|
|
@@ -5739,7 +5821,7 @@ function $6a439680ae7e9ba3$export$3e41faf802a29e71(props) {
|
|
|
5739
5821
|
async function $d5f1e6a0f9117286$export$79b1565500412d9b(search_modal, modal_fn_opts, parent) {
|
|
5740
5822
|
const body = parent || document.body || (await (0, $8tj43$observer).wait_for_element("body"));
|
|
5741
5823
|
let dispose_and_remove;
|
|
5742
|
-
const open_modal_ = $8tj43$
|
|
5824
|
+
const open_modal_ = $8tj43$catchify1(async function () {
|
|
5743
5825
|
let extra_options_for_modal = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
5744
5826
|
let on_dispose = arguments.length > 1 ? arguments[1] : undefined;
|
|
5745
5827
|
// Below await is very intentional,
|
|
@@ -5774,7 +5856,7 @@ async function $d5f1e6a0f9117286$export$79b1565500412d9b(search_modal, modal_fn_
|
|
|
5774
5856
|
actually_close();else if (!animation_started && closing_animation) {
|
|
5775
5857
|
var _catchify;
|
|
5776
5858
|
animation_started = +new Date();
|
|
5777
|
-
(_catchify = $8tj43$
|
|
5859
|
+
(_catchify = $8tj43$catchify1(closing_animation)()) === null || _catchify === void 0 || _catchify.then($8tj43$catchify1(actually_close));
|
|
5778
5860
|
} else actually_close();
|
|
5779
5861
|
};
|
|
5780
5862
|
return search_modal({
|
|
@@ -5787,7 +5869,7 @@ async function $d5f1e6a0f9117286$export$79b1565500412d9b(search_modal, modal_fn_
|
|
|
5787
5869
|
});
|
|
5788
5870
|
body.append(...modal_els);
|
|
5789
5871
|
});
|
|
5790
|
-
const close_modal_ = $8tj43$
|
|
5872
|
+
const close_modal_ = $8tj43$catchify1(() => {
|
|
5791
5873
|
if (dispose_and_remove) {
|
|
5792
5874
|
// modal is open
|
|
5793
5875
|
const dispose_fn = dispose_and_remove;
|
|
@@ -5804,7 +5886,7 @@ async function $d5f1e6a0f9117286$export$79b1565500412d9b(search_modal, modal_fn_
|
|
|
5804
5886
|
function $972f6bce0f9d61be$export$e183a13865960371(params_to_default_value, router_) {
|
|
5805
5887
|
const signals = {};
|
|
5806
5888
|
const entries = Object.entries(params_to_default_value);
|
|
5807
|
-
const event_handler = $8tj43$
|
|
5889
|
+
const event_handler = $8tj43$catchify1((what_happened, args) => {
|
|
5808
5890
|
// 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
|
|
5809
5891
|
if (what_happened !== "popstate") return;
|
|
5810
5892
|
// 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.
|
|
@@ -5836,8 +5918,8 @@ function $972f6bce0f9d61be$export$e183a13865960371(params_to_default_value, rout
|
|
|
5836
5918
|
});
|
|
5837
5919
|
// 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
|
|
5838
5920
|
(0, $8tj43$instant_exec_on_suspect_history_change).add(event_handler);
|
|
5839
|
-
$8tj43$onCleanup($8tj43$
|
|
5840
|
-
$8tj43$createEffect($8tj43$
|
|
5921
|
+
$8tj43$onCleanup($8tj43$catchify1(() => (0, $8tj43$instant_exec_on_suspect_history_change).delete(event_handler)));
|
|
5922
|
+
$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
|
|
5841
5923
|
return signals;
|
|
5842
5924
|
}
|
|
5843
5925
|
function $972f6bce0f9d61be$var$history_state_change(signals, entries, state) {
|
|
@@ -5995,7 +6077,7 @@ function $0706a7702baafc06$export$6b35356958ae5587(props) {
|
|
|
5995
6077
|
// If someone clicks on a product card in the shop the look modal, close the modal the next time the href changes
|
|
5996
6078
|
for (const item of resolved()) {
|
|
5997
6079
|
if (!(item instanceof Element)) return;
|
|
5998
|
-
item.addEventListener("click", $8tj43$
|
|
6080
|
+
item.addEventListener("click", $8tj43$catchify1(() =>
|
|
5999
6081
|
// run with modal owner so we don't do stuff after the modal closes
|
|
6000
6082
|
// 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)
|
|
6001
6083
|
$8tj43$runWithOwner(props.modalOwner_, () => $8tj43$createEffect($8tj43$on(hrefWithoutHash, props.actually_close_modal_, {
|
|
@@ -6121,7 +6203,7 @@ function $d2a67555f75bef95$export$a3cbef418994a664(props) {
|
|
|
6121
6203
|
var _el$ = $8tj43$getNextElement($d2a67555f75bef95$var$_tmpl$3),
|
|
6122
6204
|
_el$2 = _el$.firstChild,
|
|
6123
6205
|
_el$3 = _el$2.nextSibling;
|
|
6124
|
-
var _ref$ = $8tj43$
|
|
6206
|
+
var _ref$ = $8tj43$catchify1(element => {
|
|
6125
6207
|
const disconnect = (0, $8tj43$observer).onexists(element, _ref => {
|
|
6126
6208
|
let {
|
|
6127
6209
|
element: element
|
|
@@ -6308,7 +6390,7 @@ function $6b0fd8fd20df8ccf$var$actualSetupModal() {
|
|
|
6308
6390
|
(0, $68e6625c8d51f847$export$3064e1e8c6513da3).add(history_key);
|
|
6309
6391
|
const actually_close_modal_ = () => set_history_value(false);
|
|
6310
6392
|
const owner = $8tj43$getOwner();
|
|
6311
|
-
$8tj43$
|
|
6393
|
+
$8tj43$catchify1(async () => {
|
|
6312
6394
|
const {
|
|
6313
6395
|
open_modal_: open_modal_,
|
|
6314
6396
|
close_modal_: close_modal_
|
|
@@ -6388,15 +6470,15 @@ function $ad371564683947ab$export$6c6d7a51fa9aa15d(props) {
|
|
|
6388
6470
|
$8tj43$insert(details_, [summary_, $8tj43$createComponent(ExpandingContainer, {
|
|
6389
6471
|
children: children
|
|
6390
6472
|
})], null);
|
|
6391
|
-
if (!$8tj43$untrack(is_in_dom)) (0, $8tj43$observer).wait_for_element(details_).then($8tj43$
|
|
6392
|
-
$8tj43$createEffect($8tj43$
|
|
6473
|
+
if (!$8tj43$untrack(is_in_dom)) (0, $8tj43$observer).wait_for_element(details_).then($8tj43$catchify1(() => set_is_in_dom(true)));
|
|
6474
|
+
$8tj43$createEffect($8tj43$catchify1(async () => {
|
|
6393
6475
|
const is_open = is_open_memo();
|
|
6394
6476
|
if (!is_in_dom())
|
|
6395
6477
|
// wait with setting state until we're in DOM, animation won't work otherwise
|
|
6396
6478
|
return;
|
|
6397
6479
|
if (dont_animate_if_instant_open_ && fresh_component && !timeout_started) {
|
|
6398
6480
|
timeout_started = true;
|
|
6399
|
-
setTimeout($8tj43$
|
|
6481
|
+
setTimeout($8tj43$catchify1(() => fresh_component = false));
|
|
6400
6482
|
}
|
|
6401
6483
|
if (is_open) {
|
|
6402
6484
|
details_.open = true; // open up the toggle so the animation can happen
|
|
@@ -6404,10 +6486,10 @@ function $ad371564683947ab$export$6c6d7a51fa9aa15d(props) {
|
|
|
6404
6486
|
await expand(0, do_duration);
|
|
6405
6487
|
} else {
|
|
6406
6488
|
const animation = await collapse();
|
|
6407
|
-
animation === null || animation === void 0 || animation.addEventListener("finish", $8tj43$
|
|
6489
|
+
animation === null || animation === void 0 || animation.addEventListener("finish", $8tj43$catchify1(() => details_.open = false));
|
|
6408
6490
|
}
|
|
6409
6491
|
}));
|
|
6410
|
-
details_.addEventListener("toggle", $8tj43$
|
|
6492
|
+
details_.addEventListener("toggle", $8tj43$catchify1(() => {
|
|
6411
6493
|
const {
|
|
6412
6494
|
open: open
|
|
6413
6495
|
} = details_;
|
|
@@ -6417,11 +6499,11 @@ function $ad371564683947ab$export$6c6d7a51fa9aa15d(props) {
|
|
|
6417
6499
|
}) // in case someone somehow toggles it without us intercepting it at least follow suit
|
|
6418
6500
|
);
|
|
6419
6501
|
|
|
6420
|
-
summary_.addEventListener("click", $8tj43$
|
|
6502
|
+
summary_.addEventListener("click", $8tj43$catchify1(ev => {
|
|
6421
6503
|
ev.preventDefault();
|
|
6422
6504
|
toggle();
|
|
6423
6505
|
}));
|
|
6424
|
-
summary_.addEventListener("keydown", $8tj43$
|
|
6506
|
+
summary_.addEventListener("keydown", $8tj43$catchify1(ev => {
|
|
6425
6507
|
const {
|
|
6426
6508
|
key: key
|
|
6427
6509
|
} = ev;
|
|
@@ -6461,7 +6543,7 @@ function $a61a2051e15c8d7a$export$5196e4c01fa56fcb(_ref) {
|
|
|
6461
6543
|
} = _ref;
|
|
6462
6544
|
let close_toast_;
|
|
6463
6545
|
const stay_open_promise = new Promise(r => close_toast_ = r);
|
|
6464
|
-
$8tj43$
|
|
6546
|
+
$8tj43$catchify1(async () => {
|
|
6465
6547
|
const closing_animation_duration = 300; // ms
|
|
6466
6548
|
const element = (() => {
|
|
6467
6549
|
var _el$ = $8tj43$getNextElement($a61a2051e15c8d7a$var$_tmpl$);
|
|
@@ -6472,8 +6554,8 @@ function $a61a2051e15c8d7a$export$5196e4c01fa56fcb(_ref) {
|
|
|
6472
6554
|
})();
|
|
6473
6555
|
const [, set_is_showing_toast] = $a61a2051e15c8d7a$export$22970a0140fc759c;
|
|
6474
6556
|
// if this is a memory leak the garbage collector is stupid - does someone know?
|
|
6475
|
-
for (const ev of ["pointerover", "focusin"]) element.addEventListener(ev, $8tj43$
|
|
6476
|
-
for (const ev of ["pointerout", "focusout"]) element.addEventListener(ev, $8tj43$
|
|
6557
|
+
for (const ev of ["pointerover", "focusin"]) element.addEventListener(ev, $8tj43$catchify1(() => closing_animation.pause()));
|
|
6558
|
+
for (const ev of ["pointerout", "focusout"]) element.addEventListener(ev, $8tj43$catchify1(() => closing_animation.play()));
|
|
6477
6559
|
const body = await (0, $8tj43$observer).wait_for_element("body");
|
|
6478
6560
|
const x_translate = "translateX(-50%) ";
|
|
6479
6561
|
let remove_keyboard_listener;
|
|
@@ -6498,7 +6580,7 @@ function $a61a2051e15c8d7a$export$5196e4c01fa56fcb(_ref) {
|
|
|
6498
6580
|
// let other toasts close us if they open while we're still here
|
|
6499
6581
|
$a61a2051e15c8d7a$var$closing_functions.add(close_toast_);
|
|
6500
6582
|
set_is_showing_toast(true);
|
|
6501
|
-
const handler = $8tj43$
|
|
6583
|
+
const handler = $8tj43$catchify1(_ref2 => {
|
|
6502
6584
|
let {
|
|
6503
6585
|
key: key
|
|
6504
6586
|
} = _ref2;
|
|
@@ -6611,7 +6693,7 @@ function $b4465d8d605f61e9$export$8895d39404bd2bb1(props) {
|
|
|
6611
6693
|
var _el$2 = $8tj43$getNextElement($b4465d8d605f61e9$var$_tmpl$2),
|
|
6612
6694
|
_el$3 = _el$2.firstChild,
|
|
6613
6695
|
_el$4 = _el$3.nextSibling;
|
|
6614
|
-
$8tj43$addEventListener(_el$3, "click", $8tj43$
|
|
6696
|
+
$8tj43$addEventListener(_el$3, "click", $8tj43$catchify1(() => {
|
|
6615
6697
|
set_selected_filters(previous_selected_filters);
|
|
6616
6698
|
set_expanded_hierarchical_filters(previous_expanded_hierarchical_filters);
|
|
6617
6699
|
if (previousExpandedFilters) expanded_filters_ === null || expanded_filters_ === void 0 || expanded_filters_[1](previousExpandedFilters);
|
|
@@ -6689,7 +6771,7 @@ function $4711a82d08d2021b$export$fecbb157621501bd(_ref) {
|
|
|
6689
6771
|
get children() {
|
|
6690
6772
|
return [(() => {
|
|
6691
6773
|
var _el$6 = $8tj43$getNextElement($4711a82d08d2021b$var$_tmpl$);
|
|
6692
|
-
$8tj43$addEventListener(_el$6, "click", $8tj43$
|
|
6774
|
+
$8tj43$addEventListener(_el$6, "click", $8tj43$catchify1(() =>
|
|
6693
6775
|
// click event handlers don't have an owner, carry it over
|
|
6694
6776
|
$8tj43$runWithOwner(owner, () => $b4465d8d605f61e9$export$8895d39404bd2bb1({
|
|
6695
6777
|
selected_filters_: selected_filters_,
|
|
@@ -6884,7 +6966,7 @@ function $4711a82d08d2021b$export$fecbb157621501bd(_ref) {
|
|
|
6884
6966
|
_el$28 = _el$26.firstChild,
|
|
6885
6967
|
[_el$29, _co$10] = $8tj43$getNextMarker(_el$28.nextSibling),
|
|
6886
6968
|
_el$27 = _el$29.nextSibling;
|
|
6887
|
-
$8tj43$addEventListener(_el$26, "click", $8tj43$
|
|
6969
|
+
$8tj43$addEventListener(_el$26, "click", $8tj43$catchify1(() => {
|
|
6888
6970
|
const to_remove = selected_data();
|
|
6889
6971
|
const cloned_selected_filters = [...read_selected_filters()];
|
|
6890
6972
|
cloned_selected_filters.splice(index_in_selected_filters, 1);
|
|
@@ -6940,9 +7022,9 @@ function $4711a82d08d2021b$export$fecbb157621501bd(_ref) {
|
|
|
6940
7022
|
});
|
|
6941
7023
|
const [is_in_dom, set_is_in_dom] = $8tj43$createSignal(document.documentElement.contains(outmost_element));
|
|
6942
7024
|
const hidden = $8tj43$createMemo(() => get_search_filters_open_() || get_search_sorting_open_());
|
|
6943
|
-
if (!$8tj43$untrack(is_in_dom)) (0, $8tj43$observer).wait_for_element(outmost_element).then($8tj43$
|
|
7025
|
+
if (!$8tj43$untrack(is_in_dom)) (0, $8tj43$observer).wait_for_element(outmost_element).then($8tj43$catchify1(() => set_is_in_dom(true)));
|
|
6944
7026
|
outmost_element.classList.add("selected-filters");
|
|
6945
|
-
$8tj43$createEffect($8tj43$
|
|
7027
|
+
$8tj43$createEffect($8tj43$catchify1(async () => {
|
|
6946
7028
|
if (!is_in_dom())
|
|
6947
7029
|
// wait with setting state until we're in DOM, animation won't work otherwise
|
|
6948
7030
|
return;
|
|
@@ -6980,7 +7062,7 @@ const $19e828709c7723a0$export$48513f6b9f8ce62d = props => {
|
|
|
6980
7062
|
// 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.
|
|
6981
7063
|
// 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
|
|
6982
7064
|
// Why it can't be done instantaneously I don't know.
|
|
6983
|
-
input_el.addEventListener("change", $8tj43$
|
|
7065
|
+
input_el.addEventListener("change", $8tj43$catchify1(() => requestAnimationFrame($8tj43$catchify1(() => {
|
|
6984
7066
|
if (input_el.checked !== checked()) input_el.checked = checked();
|
|
6985
7067
|
}))));
|
|
6986
7068
|
(_props$input_ref_ = props.input_ref_) === null || _props$input_ref_ === void 0 || _props$input_ref_.call(props, input_el);
|
|
@@ -7043,7 +7125,7 @@ function $3e850b2f2cca761f$export$ca21a16d65b3dd8(_ref) {
|
|
|
7043
7125
|
_el$3 = _el$.firstChild,
|
|
7044
7126
|
[_el$4, _co$] = $8tj43$getNextMarker(_el$3.nextSibling),
|
|
7045
7127
|
_el$2 = _el$4.nextSibling;
|
|
7046
|
-
$8tj43$addEventListener(_el$, "click", $8tj43$
|
|
7128
|
+
$8tj43$addEventListener(_el$, "click", $8tj43$catchify1(() => set_show_extras(p => !p)), true);
|
|
7047
7129
|
$8tj43$insert(_el$, $8tj43$createComponent((0, $ff3225aef892a467$export$f21ab0717a89c77f), {}), _el$4, _co$);
|
|
7048
7130
|
$8tj43$insert(_el$2, (() => {
|
|
7049
7131
|
var _c$ = $8tj43$memo(() => !!get_show_extras());
|
|
@@ -7164,7 +7246,7 @@ function $133484ef10e4e954$export$dd948f91abc3a1c4(_ref) {
|
|
|
7164
7246
|
}) : []);
|
|
7165
7247
|
});
|
|
7166
7248
|
$8tj43$onCleanup(() => set_view_more_button_below_group_());
|
|
7167
|
-
$8tj43$createEffect($8tj43$
|
|
7249
|
+
$8tj43$createEffect($8tj43$catchify1(async () => {
|
|
7168
7250
|
if (!togglable_rest()) {
|
|
7169
7251
|
await collapse();
|
|
7170
7252
|
return;
|
|
@@ -7177,7 +7259,7 @@ function $133484ef10e4e954$export$dd948f91abc3a1c4(_ref) {
|
|
|
7177
7259
|
[_el$3, _co$] = $8tj43$getNextMarker(_el$2.nextSibling),
|
|
7178
7260
|
_el$4 = _el$3.nextSibling,
|
|
7179
7261
|
[_el$5, _co$2] = $8tj43$getNextMarker(_el$4.nextSibling);
|
|
7180
|
-
$8tj43$addEventListener(_el$, "change", $8tj43$
|
|
7262
|
+
$8tj43$addEventListener(_el$, "change", $8tj43$catchify1(() => {
|
|
7181
7263
|
const set_filter = existing_filter();
|
|
7182
7264
|
const {
|
|
7183
7265
|
field: field,
|
|
@@ -7266,7 +7348,7 @@ function $b54fc842e721c9eb$export$430444115f70a734(_ref) {
|
|
|
7266
7348
|
_el$9 = _el$3.nextSibling,
|
|
7267
7349
|
[_el$10, _co$2] = $8tj43$getNextMarker(_el$9.nextSibling);
|
|
7268
7350
|
$8tj43$setAttribute(_el$2, "for", random_selector);
|
|
7269
|
-
$8tj43$addEventListener(_el$4, "change", $8tj43$
|
|
7351
|
+
$8tj43$addEventListener(_el$4, "change", $8tj43$catchify1(() => {
|
|
7270
7352
|
const filter_object = {
|
|
7271
7353
|
op: filter_().op,
|
|
7272
7354
|
field: filter_().field,
|
|
@@ -7361,7 +7443,7 @@ function $1e7465a8ffa97f6c$export$e0d834a0ad870cda(_ref) {
|
|
|
7361
7443
|
});
|
|
7362
7444
|
$8tj43$createComputed(() => {
|
|
7363
7445
|
clearTimeout(debounce_timeout);
|
|
7364
|
-
debounce_timeout = setTimeout($8tj43$
|
|
7446
|
+
debounce_timeout = setTimeout($8tj43$catchify1(range => $8tj43$untrack(() => {
|
|
7365
7447
|
const default_data = defaultRange();
|
|
7366
7448
|
const filter_object = {
|
|
7367
7449
|
op: filter_().op,
|
|
@@ -7440,22 +7522,22 @@ function $1e7465a8ffa97f6c$var$RangeSelector(_ref3) {
|
|
|
7440
7522
|
[_el$22, _co$6] = $8tj43$getNextMarker(_el$21.nextSibling);
|
|
7441
7523
|
var _ref$ = price_input_1;
|
|
7442
7524
|
typeof _ref$ === "function" ? $8tj43$use(_ref$, _el$4) : price_input_1 = _el$4;
|
|
7443
|
-
$8tj43$addEventListener(_el$4, "keydown", $8tj43$
|
|
7525
|
+
$8tj43$addEventListener(_el$4, "keydown", $8tj43$catchify1(_ref4 => {
|
|
7444
7526
|
let {
|
|
7445
7527
|
key: key
|
|
7446
7528
|
} = _ref4;
|
|
7447
7529
|
if (key === "Enter") $1e7465a8ffa97f6c$var$set_range_with_sanitation(min_, max_, current_range_, 0, price_input_1);
|
|
7448
7530
|
}), true);
|
|
7449
|
-
$8tj43$addEventListener(_el$4, "blur", $8tj43$
|
|
7531
|
+
$8tj43$addEventListener(_el$4, "blur", $8tj43$catchify1(() => $1e7465a8ffa97f6c$var$set_range_with_sanitation(min_, max_, current_range_, 0, price_input_1)));
|
|
7450
7532
|
var _ref$2 = price_input_2;
|
|
7451
7533
|
typeof _ref$2 === "function" ? $8tj43$use(_ref$2, _el$7) : price_input_2 = _el$7;
|
|
7452
|
-
$8tj43$addEventListener(_el$7, "keydown", $8tj43$
|
|
7534
|
+
$8tj43$addEventListener(_el$7, "keydown", $8tj43$catchify1(_ref5 => {
|
|
7453
7535
|
let {
|
|
7454
7536
|
key: key
|
|
7455
7537
|
} = _ref5;
|
|
7456
7538
|
if (key === "Enter") $1e7465a8ffa97f6c$var$set_range_with_sanitation(min_, max_, current_range_, 1, price_input_2);
|
|
7457
7539
|
}), true);
|
|
7458
|
-
$8tj43$addEventListener(_el$7, "blur", $8tj43$
|
|
7540
|
+
$8tj43$addEventListener(_el$7, "blur", $8tj43$catchify1(() => $1e7465a8ffa97f6c$var$set_range_with_sanitation(min_, max_, current_range_, 1, price_input_2)));
|
|
7459
7541
|
$8tj43$insert(_el$, $8tj43$createComponent($1e7465a8ffa97f6c$var$ExponentialSlider, {
|
|
7460
7542
|
max_: max_,
|
|
7461
7543
|
min_: min_,
|
|
@@ -7600,7 +7682,7 @@ function $1e7465a8ffa97f6c$var$LinearSlider(_ref8) {
|
|
|
7600
7682
|
return [(() => {
|
|
7601
7683
|
var _el$25 = $8tj43$getNextElement($1e7465a8ffa97f6c$var$_tmpl$2),
|
|
7602
7684
|
_el$26 = _el$25.firstChild;
|
|
7603
|
-
$8tj43$addEventListener(_el$25, "click", $8tj43$
|
|
7685
|
+
$8tj43$addEventListener(_el$25, "click", $8tj43$catchify1(e => {
|
|
7604
7686
|
const rect = clickable_slider.getBoundingClientRect();
|
|
7605
7687
|
const slider_beginning_left = rect.left;
|
|
7606
7688
|
const slider_width = rect.width;
|
|
@@ -7626,12 +7708,12 @@ function $1e7465a8ffa97f6c$var$LinearSlider(_ref8) {
|
|
|
7626
7708
|
range_input_1 = el;
|
|
7627
7709
|
set_value(range_input_1, 0);
|
|
7628
7710
|
}, _el$28);
|
|
7629
|
-
$8tj43$addEventListener(_el$28, "input", $8tj43$
|
|
7711
|
+
$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);
|
|
7630
7712
|
$8tj43$use(el => {
|
|
7631
7713
|
range_input_2 = el;
|
|
7632
7714
|
set_value(range_input_2, 1);
|
|
7633
7715
|
}, _el$29);
|
|
7634
|
-
$8tj43$addEventListener(_el$29, "input", $8tj43$
|
|
7716
|
+
$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);
|
|
7635
7717
|
$8tj43$effect(_p$ => {
|
|
7636
7718
|
var _v$10 = should_be_disabled_(),
|
|
7637
7719
|
_v$11 = i18n_.range_filter_low_point_aria_label_(),
|
|
@@ -8097,7 +8179,7 @@ function $0ae614c5c7babb43$export$a32086fa6616eafd(_ref) {
|
|
|
8097
8179
|
}
|
|
8098
8180
|
while (execute_when_structure_finished.length) execute_when_structure_finished.pop()();
|
|
8099
8181
|
$0ae614c5c7babb43$var$expand_until_choice(data_structure);
|
|
8100
|
-
$8tj43$
|
|
8182
|
+
$8tj43$dlog1("CheckboxHierarchicalFilter: Recomputed structured_categories", data_structure);
|
|
8101
8183
|
return data_structure;
|
|
8102
8184
|
});
|
|
8103
8185
|
const some_top_level_are_hidden = $8tj43$createMemo(() => Object.keys(structured_categories()).length > $0ae614c5c7babb43$var$max_visible_without_collapsing);
|
|
@@ -8127,7 +8209,7 @@ function $0ae614c5c7babb43$export$a32086fa6616eafd(_ref) {
|
|
|
8127
8209
|
}) : []);
|
|
8128
8210
|
});
|
|
8129
8211
|
$8tj43$onCleanup(() => set_view_more_button_below_group());
|
|
8130
|
-
$8tj43$createEffect($8tj43$
|
|
8212
|
+
$8tj43$createEffect($8tj43$catchify1(async () => {
|
|
8131
8213
|
if (!some_top_level_are_hidden()) {
|
|
8132
8214
|
await collapse();
|
|
8133
8215
|
return;
|
|
@@ -8218,7 +8300,7 @@ function $0ae614c5c7babb43$var$render_stuff(data, existing_filter, i18n_, filter
|
|
|
8218
8300
|
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;
|
|
8219
8301
|
},
|
|
8220
8302
|
input_ref_: input => {
|
|
8221
|
-
input.addEventListener("change", $8tj43$
|
|
8303
|
+
input.addEventListener("change", $8tj43$catchify1(() => $8tj43$untrack(() => {
|
|
8222
8304
|
var _value9;
|
|
8223
8305
|
const {
|
|
8224
8306
|
checked: checked
|
|
@@ -8324,7 +8406,7 @@ function $0ae614c5c7babb43$var$batching_filter_state_syncer(props) {
|
|
|
8324
8406
|
existing_filter_: existing_filter_
|
|
8325
8407
|
} = props;
|
|
8326
8408
|
let sync_queued = false;
|
|
8327
|
-
const sync_fn = $8tj43$
|
|
8409
|
+
const sync_fn = $8tj43$catchify1(async () => {
|
|
8328
8410
|
sync_queued = false;
|
|
8329
8411
|
// if we change, update filter state - next microtask, so that "reactions" to the change can process before we send it off to the API
|
|
8330
8412
|
const set_filter = existing_filter_();
|
|
@@ -8348,7 +8430,7 @@ function $0ae614c5c7babb43$var$batching_filter_state_syncer(props) {
|
|
|
8348
8430
|
...base_object,
|
|
8349
8431
|
data: data
|
|
8350
8432
|
};
|
|
8351
|
-
$8tj43$
|
|
8433
|
+
$8tj43$dlog1("CheckboxHierarchicalFilter: Updating API state", filter_object);
|
|
8352
8434
|
const selected_filters = [...selected_filters_[0]()];
|
|
8353
8435
|
if (set_filter) selected_filters.splice(selected_filters.indexOf(set_filter), 1);
|
|
8354
8436
|
if (filter_object.data.length) selected_filters.push(filter_object);
|
|
@@ -8386,13 +8468,13 @@ function $0ae614c5c7babb43$var$create_updating_signal(_ref3) {
|
|
|
8386
8468
|
$8tj43$createComputed($8tj43$on(read_checked, trigger_sync_, {
|
|
8387
8469
|
defer: true
|
|
8388
8470
|
}));
|
|
8389
|
-
$8tj43$createComputed($8tj43$on(read_checked, $8tj43$
|
|
8471
|
+
$8tj43$createComputed($8tj43$on(read_checked, $8tj43$catchify1(new_value => {
|
|
8390
8472
|
if (updating_blocked) return;
|
|
8391
8473
|
for (const child of child_objects) child.is_checked_[1](new_value);
|
|
8392
8474
|
}), {
|
|
8393
8475
|
defer: true
|
|
8394
8476
|
}));
|
|
8395
|
-
$8tj43$createEffect($8tj43$on(get_child_object_values, $8tj43$
|
|
8477
|
+
$8tj43$createEffect($8tj43$on(get_child_object_values, $8tj43$catchify1(() => {
|
|
8396
8478
|
const all_kids_checked = get_child_object_values.every(accessor => accessor());
|
|
8397
8479
|
if (all_kids_checked === read_checked()) return;
|
|
8398
8480
|
updating_blocked = true;
|
|
@@ -8596,7 +8678,7 @@ const $830ea8efda59884e$export$414f6a19d38e655c = _ref => {
|
|
|
8596
8678
|
};
|
|
8597
8679
|
},
|
|
8598
8680
|
get onClick() {
|
|
8599
|
-
return $8tj43$
|
|
8681
|
+
return $8tj43$catchify1(() => {
|
|
8600
8682
|
const set_filter = existing_filter();
|
|
8601
8683
|
const {
|
|
8602
8684
|
field: field,
|
|
@@ -8888,7 +8970,7 @@ function $2cb856c297c53e6c$export$82ed4b28ecb67608(_ref) {
|
|
|
8888
8970
|
}) : []);
|
|
8889
8971
|
});
|
|
8890
8972
|
$8tj43$onCleanup(() => set_view_more_button_below_group_());
|
|
8891
|
-
$8tj43$createEffect($8tj43$
|
|
8973
|
+
$8tj43$createEffect($8tj43$catchify1(async () => {
|
|
8892
8974
|
if (!togglable_rest()) {
|
|
8893
8975
|
await collapse();
|
|
8894
8976
|
set_having_expanding_in_dom(false); // Once animation has finished, remove expanding from DOM
|
|
@@ -8903,7 +8985,7 @@ function $2cb856c297c53e6c$export$82ed4b28ecb67608(_ref) {
|
|
|
8903
8985
|
[_el$3, _co$] = $8tj43$getNextMarker(_el$2.nextSibling),
|
|
8904
8986
|
_el$4 = _el$3.nextSibling,
|
|
8905
8987
|
[_el$5, _co$2] = $8tj43$getNextMarker(_el$4.nextSibling);
|
|
8906
|
-
$8tj43$addEventListener(_el$, "change", $8tj43$
|
|
8988
|
+
$8tj43$addEventListener(_el$, "change", $8tj43$catchify1(() => {
|
|
8907
8989
|
const set_filter = existing_filter();
|
|
8908
8990
|
const {
|
|
8909
8991
|
field: field,
|
|
@@ -9454,7 +9536,7 @@ function $f6b0500577e1b210$var$ActualFilterBody(props) {
|
|
|
9454
9536
|
_el$11 = _el$9.firstChild,
|
|
9455
9537
|
[_el$12, _co$3] = $8tj43$getNextMarker(_el$11.nextSibling),
|
|
9456
9538
|
_el$10 = _el$12.nextSibling;
|
|
9457
|
-
$8tj43$addEventListener(_el$9, "click", $8tj43$
|
|
9539
|
+
$8tj43$addEventListener(_el$9, "click", $8tj43$catchify1(() => {
|
|
9458
9540
|
const new_filter_obj = [...props.selected_filters_[0]()];
|
|
9459
9541
|
for (const filter of filter_array_()) {
|
|
9460
9542
|
const index = new_filter_obj.findIndex(_ref3 => {
|
|
@@ -9526,7 +9608,7 @@ function $f6b0500577e1b210$var$ActualFilterBody(props) {
|
|
|
9526
9608
|
},
|
|
9527
9609
|
get children() {
|
|
9528
9610
|
var _el$29 = $8tj43$getNextElement($f6b0500577e1b210$var$_tmpl$8);
|
|
9529
|
-
$8tj43$addEventListener(_el$29, "click", $8tj43$
|
|
9611
|
+
$8tj43$addEventListener(_el$29, "click", $8tj43$catchify1(() => $b4465d8d605f61e9$export$8895d39404bd2bb1({
|
|
9530
9612
|
user_triggered_: true,
|
|
9531
9613
|
selected_filters_: props.selected_filters_,
|
|
9532
9614
|
i18n_: props.i18n_,
|
|
@@ -9724,14 +9806,14 @@ async function $50aebf5b445518eb$export$58e808b1db15d3bc(options) {
|
|
|
9724
9806
|
headers: headers
|
|
9725
9807
|
} : {}),
|
|
9726
9808
|
method: "POST"
|
|
9727
|
-
}).catch(e => $8tj43$
|
|
9809
|
+
}).catch(e => $8tj43$dlog1("fetch_retry threw", e)).then(async maybe_response => {
|
|
9728
9810
|
var _decoded;
|
|
9729
9811
|
if (!maybe_response) return [];
|
|
9730
9812
|
let decoded;
|
|
9731
9813
|
try {
|
|
9732
9814
|
decoded = await maybe_response.json();
|
|
9733
9815
|
} catch (e) {
|
|
9734
|
-
$8tj43$
|
|
9816
|
+
$8tj43$dlog1("Failed to decode JSON", e);
|
|
9735
9817
|
}
|
|
9736
9818
|
return ((_decoded = decoded) === null || _decoded === void 0 ? void 0 : _decoded.displays) || [];
|
|
9737
9819
|
});
|
|
@@ -9790,7 +9872,7 @@ const $702d7656a373973e$export$824dde41348efed1 = /*@__PURE__*/(() => {
|
|
|
9790
9872
|
|
|
9791
9873
|
const observe_to_signal = (element, setter) => {
|
|
9792
9874
|
const computed_style = getComputedStyle(element);
|
|
9793
|
-
const resize_observer = new ResizeObserver($8tj43$
|
|
9875
|
+
const resize_observer = new ResizeObserver($8tj43$catchify1(() => {
|
|
9794
9876
|
setter(element.getBoundingClientRect().width + parseFloat(computed_style.marginLeft) + parseFloat(computed_style.marginRight) + parseFloat(computed_style.borderRightWidth) + parseFloat(computed_style.borderLeftWidth));
|
|
9795
9877
|
}));
|
|
9796
9878
|
resize_observer.observe(element);
|
|
@@ -9845,7 +9927,7 @@ async function $160ea2b55d8772d2$export$c1a6b039e689a58e(merchant, market, local
|
|
|
9845
9927
|
const in_ls = localStorage[localstorage_key];
|
|
9846
9928
|
if (in_ls) localstorage_value = JSON.parse(in_ls);
|
|
9847
9929
|
} catch (e) {
|
|
9848
|
-
$8tj43$
|
|
9930
|
+
$8tj43$dlog1("Failed parsing JSON from localStorage", e);
|
|
9849
9931
|
}
|
|
9850
9932
|
const updated = (_localstorage_value = localstorage_value) === null || _localstorage_value === void 0 ? void 0 : _localstorage_value.updated;
|
|
9851
9933
|
const now = +new Date();
|
|
@@ -9889,12 +9971,12 @@ async function $160ea2b55d8772d2$var$download_categories(merchant, market, local
|
|
|
9889
9971
|
if (!fetched) return [];
|
|
9890
9972
|
try {
|
|
9891
9973
|
if (fetched.status !== 200) {
|
|
9892
|
-
$8tj43$
|
|
9974
|
+
$8tj43$dlog1("failed to fetch queries, server responded with", fetched.status, fetched, await fetched.text());
|
|
9893
9975
|
return [];
|
|
9894
9976
|
}
|
|
9895
9977
|
return await fetched.json();
|
|
9896
9978
|
} catch (e) {
|
|
9897
|
-
$8tj43$
|
|
9979
|
+
$8tj43$dlog1("failed to decode queries json", fetched, e);
|
|
9898
9980
|
return [];
|
|
9899
9981
|
}
|
|
9900
9982
|
}
|
|
@@ -10195,9 +10277,9 @@ function $284849364a6ef73a$var$_get_cache_obj_for_endpoint2(endpoint) {
|
|
|
10195
10277
|
return (_classPrivateFieldGet4 = $8tj43$babelruntimehelpersclassPrivateFieldGet(this, $284849364a6ef73a$var$_cache_objs))[endpoint] || (_classPrivateFieldGet4[endpoint] = {
|
|
10196
10278
|
in_progress_: {},
|
|
10197
10279
|
cache_: {},
|
|
10198
|
-
finalization_registry_: $8tj43$babelruntimehelpersclassPrivateFieldGet(this, $284849364a6ef73a$var$_supports_finalization_registry) ? new FinalizationRegistry($8tj43$
|
|
10280
|
+
finalization_registry_: $8tj43$babelruntimehelpersclassPrivateFieldGet(this, $284849364a6ef73a$var$_supports_finalization_registry) ? new FinalizationRegistry($8tj43$catchify1(key => {
|
|
10199
10281
|
const our_cache = $8tj43$babelruntimehelpersclassPrivateFieldGet(this, $284849364a6ef73a$var$_cache_objs)[endpoint].cache_;
|
|
10200
|
-
$8tj43$
|
|
10282
|
+
$8tj43$dlog1("[Search API]: removing", key, "from", our_cache);
|
|
10201
10283
|
delete our_cache[key];
|
|
10202
10284
|
})) : undefined
|
|
10203
10285
|
});
|
|
@@ -10334,11 +10416,11 @@ async function $284849364a6ef73a$var$_cached_request2(_ref4) {
|
|
|
10334
10416
|
result = $ed0fefda39a0f15d$export$967e966fca9515e(result);
|
|
10335
10417
|
cache_obj.cache_[body] = new WeakRef(result);
|
|
10336
10418
|
resolve_in_progress(result);
|
|
10337
|
-
setTimeout($8tj43$
|
|
10419
|
+
setTimeout($8tj43$catchify1(() => {
|
|
10338
10420
|
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
|
|
10339
10421
|
else
|
|
10340
10422
|
// delete things from cache after 5 minutes, so it doesn't get too heavy
|
|
10341
|
-
setTimeout($8tj43$
|
|
10423
|
+
setTimeout($8tj43$catchify1(() => delete cache_obj.cache_[body]), 300000);
|
|
10342
10424
|
}), 60000 // cache values for at least 60 seconds
|
|
10343
10425
|
);
|
|
10344
10426
|
|
|
@@ -10370,7 +10452,7 @@ function $9d3d794b62318ecc$export$477caf01aecaeb2a(options) {
|
|
|
10370
10452
|
const [get_selected_filters_, set_selected_filters] = selected_filters_;
|
|
10371
10453
|
const [get_has_sideways_filter_clearing_flag_, set_has_sideways_filter_clearing_flag] = sideways_filter_clearing_flag_;
|
|
10372
10454
|
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");
|
|
10373
|
-
const history_change_handler = $8tj43$
|
|
10455
|
+
const history_change_handler = $8tj43$catchify1(() => set_current_href(location.href));
|
|
10374
10456
|
const owner = $8tj43$getOwner() || $8tj43$createRoot(() => $8tj43$getOwner());
|
|
10375
10457
|
const {
|
|
10376
10458
|
sorting_query_param_: sorting_query_param_,
|
|
@@ -10381,7 +10463,8 @@ function $9d3d794b62318ecc$export$477caf01aecaeb2a(options) {
|
|
|
10381
10463
|
$8tj43$onCleanup(() => (0, $8tj43$instant_exec_on_suspect_history_change).delete(history_change_handler));
|
|
10382
10464
|
$8tj43$createComputed(() => {
|
|
10383
10465
|
const {
|
|
10384
|
-
searchParams: searchParams
|
|
10466
|
+
searchParams: searchParams,
|
|
10467
|
+
hash: hash
|
|
10385
10468
|
} = new URL(get_current_href());
|
|
10386
10469
|
$8tj43$batch(() => {
|
|
10387
10470
|
const found_sorting = $2855bffe06ef7a03$export$766e9676e74997d3(searchParams, sorting_query_param_);
|
|
@@ -10416,10 +10499,10 @@ function $9d3d794b62318ecc$export$477caf01aecaeb2a(options) {
|
|
|
10416
10499
|
if (override_listing_id_query_param_names_) {
|
|
10417
10500
|
const found_override_listing_id = override_listing_id_query_param_names_.map(n => searchParams.get(n)).find(n => n);
|
|
10418
10501
|
set_override_listing_id(found_override_listing_id || null);
|
|
10419
|
-
if (found_override_listing_id) $8tj43$
|
|
10502
|
+
if (found_override_listing_id) $8tj43$dlog1("Found override query id:", found_override_listing_id); // This stuff might get confusing so better log it
|
|
10420
10503
|
}
|
|
10421
10504
|
|
|
10422
|
-
if (
|
|
10505
|
+
if (hash === (0, $2855bffe06ef7a03$export$84daa4fa1471698b)) set_has_sideways_filter_clearing_flag(true);
|
|
10423
10506
|
if (!writer_started) {
|
|
10424
10507
|
// The owner here is the createComputed which gets disposed the next time the computation runs - but we actually just want to delay the start of the href_writer until our signals contain the current value of the URL, therefore the runWithOwner
|
|
10425
10508
|
$8tj43$runWithOwner(owner, () => $9d3d794b62318ecc$var$start_href_writer({
|
|
@@ -10462,24 +10545,24 @@ function $9d3d794b62318ecc$var$start_href_writer(_ref3) {
|
|
|
10462
10545
|
} = _ref3;
|
|
10463
10546
|
$8tj43$createEffect($8tj43$on([get_sorting_, get_selected_filters_, get_has_sideways_filter_clearing_flag_], _ref4 => {
|
|
10464
10547
|
let [sorting, filters, has_sideways_filter_clearing_flag] = _ref4;
|
|
10465
|
-
const
|
|
10466
|
-
const
|
|
10548
|
+
const url_object = new URL(location.href);
|
|
10549
|
+
const unmodified_search_params = [...url_object.searchParams];
|
|
10550
|
+
const unmodified_hash = url_object.hash;
|
|
10467
10551
|
const {
|
|
10468
10552
|
searchParams: searchParams
|
|
10469
10553
|
} = url_object;
|
|
10470
10554
|
$2855bffe06ef7a03$export$916e6850778505f6(searchParams, filter_query_param_prefix_, sorting_query_param_);
|
|
10471
10555
|
$2855bffe06ef7a03$export$62acb285a7579555(sorting, searchParams, sorting_query_param_);
|
|
10472
10556
|
$2855bffe06ef7a03$export$58aa3f171519b6d7(filters, searchParams, filter_query_param_prefix_);
|
|
10473
|
-
if (!has_sideways_filter_clearing_flag) $9d3d794b62318ecc$var$delete_sideways_param_flag(
|
|
10557
|
+
if (!has_sideways_filter_clearing_flag) $9d3d794b62318ecc$var$delete_sideways_param_flag(url_object);
|
|
10474
10558
|
// We can't just check if the URL is equal since sometimes the order of the parameters in the URL changes (randomly?) so we need to compare them one by one
|
|
10475
|
-
const unmodified_search_params = [...new URL(current_href).searchParams];
|
|
10476
10559
|
const new_search_params = [...searchParams];
|
|
10477
10560
|
// Having the array middle step because if we'd check the "size" property of the map the algorithm could be fooled if there were two query parameters with the same key
|
|
10478
10561
|
const new_search_params_map = new Map(new_search_params);
|
|
10479
10562
|
if (unmodified_search_params.length !== new_search_params.length || !unmodified_search_params.every(_ref5 => {
|
|
10480
10563
|
let [key, value] = _ref5;
|
|
10481
10564
|
return new_search_params_map.get(key) === value;
|
|
10482
|
-
}))
|
|
10565
|
+
}) || unmodified_hash !== url_object.hash)
|
|
10483
10566
|
// Only update URL if it actually changed
|
|
10484
10567
|
router_.navigate_.go_to_({
|
|
10485
10568
|
is_replace_: true,
|
|
@@ -10491,8 +10574,8 @@ function $9d3d794b62318ecc$var$start_href_writer(_ref3) {
|
|
|
10491
10574
|
defer: true
|
|
10492
10575
|
}));
|
|
10493
10576
|
}
|
|
10494
|
-
function $9d3d794b62318ecc$var$delete_sideways_param_flag(
|
|
10495
|
-
if (
|
|
10577
|
+
function $9d3d794b62318ecc$var$delete_sideways_param_flag(url_object) {
|
|
10578
|
+
if (url_object.hash === (0, $2855bffe06ef7a03$export$84daa4fa1471698b)) url_object.hash = "";
|
|
10496
10579
|
}
|
|
10497
10580
|
function $f5f54892fd0c7d9f$var$_classPrivateFieldInitSpec(obj, privateMap, value) {
|
|
10498
10581
|
$f5f54892fd0c7d9f$var$_checkPrivateRedeclaration(obj, privateMap);
|
|
@@ -10701,7 +10784,7 @@ function $dea31647b99a443b$export$d757d54550ebfb3d(_ref) {
|
|
|
10701
10784
|
_el$2 = _el$.firstChild,
|
|
10702
10785
|
_el$4 = _el$2.nextSibling,
|
|
10703
10786
|
[_el$5, _co$] = $8tj43$getNextMarker(_el$4.nextSibling);
|
|
10704
|
-
$8tj43$addEventListener(_el$, "click", $8tj43$
|
|
10787
|
+
$8tj43$addEventListener(_el$, "click", $8tj43$catchify1(e => {
|
|
10705
10788
|
router_.navigate_.go_to_({
|
|
10706
10789
|
new_url_: category_suggestion_().page_url,
|
|
10707
10790
|
is_replace_: false,
|
|
@@ -10866,7 +10949,7 @@ function $d8a66ba54a42eb3e$export$e026af0c7b64ea5f(_ref) {
|
|
|
10866
10949
|
}, {
|
|
10867
10950
|
defer: true
|
|
10868
10951
|
}));
|
|
10869
|
-
$8tj43$createComputed($8tj43$on(get_search_query_, $8tj43$
|
|
10952
|
+
$8tj43$createComputed($8tj43$on(get_search_query_, $8tj43$catchify1(() => {
|
|
10870
10953
|
// when a query was submitted, clear filters if clear was pressed before
|
|
10871
10954
|
const clear_value = $8tj43$untrack(get_clear_filters_next_submit);
|
|
10872
10955
|
if (clear_value) {
|
|
@@ -10893,11 +10976,11 @@ function $07d90b8270ece8de$export$84bba84a7b837187(read_search_query) {
|
|
|
10893
10976
|
const key = "depict_searches";
|
|
10894
10977
|
const previous_searches = $8tj43$createSignal(JSON.parse(ls[key] || "[]"));
|
|
10895
10978
|
const [read_previous_searches, write_previous_searches] = previous_searches;
|
|
10896
|
-
$8tj43$createEffect($8tj43$
|
|
10979
|
+
$8tj43$createEffect($8tj43$catchify1(() => {
|
|
10897
10980
|
const json_encoded = JSON.stringify(read_previous_searches());
|
|
10898
10981
|
if (ls[key] !== json_encoded) ls[key] = json_encoded;
|
|
10899
10982
|
}));
|
|
10900
|
-
$8tj43$createComputed($8tj43$
|
|
10983
|
+
$8tj43$createComputed($8tj43$catchify1(() => {
|
|
10901
10984
|
const searches = $8tj43$untrack(read_previous_searches);
|
|
10902
10985
|
const current_query = read_search_query();
|
|
10903
10986
|
if (!current_query)
|
|
@@ -10943,7 +11026,7 @@ async function $86b0ff0c85e5fc6c$export$e16630ecb9644a1c(_ref) {
|
|
|
10943
11026
|
function $33e7d1906c93db7d$export$205efb947c7ffd78(handler) {
|
|
10944
11027
|
let passive = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
10945
11028
|
let override_element = arguments.length > 2 ? arguments[2] : undefined;
|
|
10946
|
-
const catchified_handler = $8tj43$
|
|
11029
|
+
const catchified_handler = $8tj43$catchify1(handler);
|
|
10947
11030
|
const owner = $8tj43$getOwner();
|
|
10948
11031
|
// 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.
|
|
10949
11032
|
// Use observer in case that this gets called before body exists
|
|
@@ -10988,7 +11071,7 @@ function $96d57a48e7bce64f$export$181cceed5c91919e(callback, alsoRaF, passiveLis
|
|
|
10988
11071
|
$8tj43$createEffect(() => {
|
|
10989
11072
|
if (alsoRaF !== null && alsoRaF !== void 0 && alsoRaF()) {
|
|
10990
11073
|
let disposed = false;
|
|
10991
|
-
const fn = $8tj43$
|
|
11074
|
+
const fn = $8tj43$catchify1(() => {
|
|
10992
11075
|
if (disposed) return;
|
|
10993
11076
|
probablyCallCallback();
|
|
10994
11077
|
requestAnimationFrame(fn);
|
|
@@ -11001,10 +11084,10 @@ function $96d57a48e7bce64f$export$181cceed5c91919e(callback, alsoRaF, passiveLis
|
|
|
11001
11084
|
// "resize" doesn't fire sometimes when it should, also it doesn't when showing/hiding scrollbars which disabling scrolling does
|
|
11002
11085
|
// this works
|
|
11003
11086
|
// keeping resize just in case
|
|
11004
|
-
const resize_resize_observer = new ResizeObserver($8tj43$
|
|
11087
|
+
const resize_resize_observer = new ResizeObserver($8tj43$catchify1(probablyCallCallback));
|
|
11005
11088
|
resize_resize_observer.observe(document.documentElement);
|
|
11006
11089
|
(0, $8tj43$observer).wait_for_element("body").then(resize_resize_observer.observe.bind(resize_resize_observer));
|
|
11007
|
-
$8tj43$onCleanup($8tj43$
|
|
11090
|
+
$8tj43$onCleanup($8tj43$catchify1(() => resize_resize_observer.disconnect()));
|
|
11008
11091
|
return probablyCallCallback;
|
|
11009
11092
|
}
|
|
11010
11093
|
const $1308a7816c3d4f2d$export$3f238c96c45e6cc6 = 1;
|
|
@@ -11037,7 +11120,7 @@ function $1308a7816c3d4f2d$export$b3ad617e9036868(_ref, input_field, alignment,
|
|
|
11037
11120
|
}, pollAlignment);
|
|
11038
11121
|
let ro;
|
|
11039
11122
|
if (alignment & $1308a7816c3d4f2d$export$902f8b4a7dae5d78 || alignment & $1308a7816c3d4f2d$export$5097308c5200105a) {
|
|
11040
|
-
ro = new ResizeObserver($8tj43$
|
|
11123
|
+
ro = new ResizeObserver($8tj43$catchify1(records => {
|
|
11041
11124
|
records.forEach(_ref2 => {
|
|
11042
11125
|
let {
|
|
11043
11126
|
contentRect: {
|
|
@@ -11061,7 +11144,7 @@ function $1308a7816c3d4f2d$export$b3ad617e9036868(_ref, input_field, alignment,
|
|
|
11061
11144
|
}));
|
|
11062
11145
|
ro.observe(input_field);
|
|
11063
11146
|
}
|
|
11064
|
-
$8tj43$onCleanup($8tj43$
|
|
11147
|
+
$8tj43$onCleanup($8tj43$catchify1(() => {
|
|
11065
11148
|
var _ro;
|
|
11066
11149
|
return (_ro = ro) === null || _ro === void 0 ? void 0 : _ro.disconnect();
|
|
11067
11150
|
}));
|
|
@@ -11282,7 +11365,7 @@ function $b69740fc6de9f17e$export$83fd5de5504a7a67(_ref) {
|
|
|
11282
11365
|
fill: "forwards",
|
|
11283
11366
|
easing: "ease-in-out"
|
|
11284
11367
|
});
|
|
11285
|
-
animation.addEventListener("finish", $8tj43$
|
|
11368
|
+
animation.addEventListener("finish", $8tj43$catchify1(() => {
|
|
11286
11369
|
if (unpermit_when_possible) set_permitted_to_show(false);
|
|
11287
11370
|
animation = undefined;
|
|
11288
11371
|
element.style.display = "none";
|
|
@@ -11344,7 +11427,7 @@ function $94af29837186eb21$export$ef6006467f04ee41(_ref) {
|
|
|
11344
11427
|
},
|
|
11345
11428
|
get children() {
|
|
11346
11429
|
var _el$3 = $8tj43$getNextElement($94af29837186eb21$var$_tmpl$);
|
|
11347
|
-
$8tj43$addEventListener(_el$3, "click", $8tj43$
|
|
11430
|
+
$8tj43$addEventListener(_el$3, "click", $8tj43$catchify1(() => $8tj43$runWithOwner(root, () => $b4465d8d605f61e9$export$8895d39404bd2bb1({
|
|
11348
11431
|
user_triggered_: true,
|
|
11349
11432
|
selected_filters_: selected_filters_,
|
|
11350
11433
|
also_clear_sorting_: false,
|
|
@@ -11388,7 +11471,7 @@ function $6d2962bc9370f884$export$5e4aed86c12acdd9(_ref) {
|
|
|
11388
11471
|
is_first_load = true;
|
|
11389
11472
|
});
|
|
11390
11473
|
// 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
|
|
11391
|
-
$8tj43$createEffect($8tj43$
|
|
11474
|
+
$8tj43$createEffect($8tj43$catchify1(async () => {
|
|
11392
11475
|
const be_above_percentage = is_first_load ? 50 : 75; // if first load, load earlier
|
|
11393
11476
|
if (percentage_in_view_() < be_above_percentage || is_loading_more) return;
|
|
11394
11477
|
if (!get_last_cursor()) {
|
|
@@ -12149,7 +12232,7 @@ function $69602b3d8fd54c38$export$9dd50d35b9d94fdf(_ref) {
|
|
|
12149
12232
|
number_of_results_: number_of_results_,
|
|
12150
12233
|
type: type
|
|
12151
12234
|
} = _ref;
|
|
12152
|
-
const contents = $8tj43$createMemo($8tj43$
|
|
12235
|
+
const contents = $8tj43$createMemo($8tj43$catchify1(() => {
|
|
12153
12236
|
const q = get_search_query_();
|
|
12154
12237
|
return i18n_[type === $69602b3d8fd54c38$export$2452208c79fe93ea.content ? "get_showing_pages_for_" : "get_showing_results_for_"]()((() => {
|
|
12155
12238
|
var _el$ = $8tj43$getNextElement($69602b3d8fd54c38$var$_tmpl$);
|
|
@@ -12238,7 +12321,7 @@ function $cfdbd124dd09d713$export$1f1775a58da589b5(_ref) {
|
|
|
12238
12321
|
_el$13 = _el$12.nextSibling,
|
|
12239
12322
|
_el$14 = _el$13.nextSibling,
|
|
12240
12323
|
[_el$15, _co$2] = $8tj43$getNextMarker(_el$14.nextSibling);
|
|
12241
|
-
$8tj43$addEventListener(_el$12, "change", $8tj43$
|
|
12324
|
+
$8tj43$addEventListener(_el$12, "change", $8tj43$catchify1(() => set_current_sorting(item())));
|
|
12242
12325
|
$8tj43$setAttribute(_el$12, "name", title_radio_name);
|
|
12243
12326
|
$8tj43$insert(_el$11, () => item().meta.title, _el$15, _co$2);
|
|
12244
12327
|
$8tj43$effect(() => $8tj43$setProperty(_el$12, "checked", is_checked()));
|
|
@@ -12272,7 +12355,7 @@ function $cfdbd124dd09d713$export$1f1775a58da589b5(_ref) {
|
|
|
12272
12355
|
_el$19 = _el$18.nextSibling,
|
|
12273
12356
|
_el$20 = _el$19.nextSibling,
|
|
12274
12357
|
[_el$21, _co$3] = $8tj43$getNextMarker(_el$20.nextSibling);
|
|
12275
|
-
$8tj43$addEventListener(_el$18, "change", $8tj43$
|
|
12358
|
+
$8tj43$addEventListener(_el$18, "change", $8tj43$catchify1(() => set_current_sorting(c => c && {
|
|
12276
12359
|
...c,
|
|
12277
12360
|
order: order_value()
|
|
12278
12361
|
})));
|
|
@@ -12373,7 +12456,7 @@ function $082c4ed3e22f8d71$export$9bf11afa910f536e(_ref) {
|
|
|
12373
12456
|
set_search_sorting_open(true);
|
|
12374
12457
|
}
|
|
12375
12458
|
});
|
|
12376
|
-
$8tj43$onCleanup($8tj43$
|
|
12459
|
+
$8tj43$onCleanup($8tj43$catchify1(() => {
|
|
12377
12460
|
if (!sorting_expanded() && !filters_expanded()) {
|
|
12378
12461
|
set_search_filters_open(false);
|
|
12379
12462
|
set_search_sorting_open(false);
|
|
@@ -12405,16 +12488,16 @@ function $082c4ed3e22f8d71$export$9bf11afa910f536e(_ref) {
|
|
|
12405
12488
|
_el$12 = _el$14.nextSibling;
|
|
12406
12489
|
$8tj43$use(el => {
|
|
12407
12490
|
background = el;
|
|
12408
|
-
(0, $8tj43$observer).wait_for_element(el).then($8tj43$
|
|
12491
|
+
(0, $8tj43$observer).wait_for_element(el).then($8tj43$catchify1(() => {
|
|
12409
12492
|
set_background_style("transition", "all 200ms ease-in");
|
|
12410
12493
|
// For some reason this needs a requestAnimationFrame but the other modal-opening animations don't
|
|
12411
|
-
requestAnimationFrame($8tj43$
|
|
12494
|
+
requestAnimationFrame($8tj43$catchify1(() => set_background_style("opacity", "1")));
|
|
12412
12495
|
}));
|
|
12413
12496
|
}, _el$2);
|
|
12414
12497
|
$8tj43$addEventListener(_el$2, "click", dismiss_modal_, true);
|
|
12415
12498
|
$8tj43$use(el => {
|
|
12416
12499
|
dismiss_button = el;
|
|
12417
|
-
(0, $8tj43$observer).wait_for_element(el).then($8tj43$
|
|
12500
|
+
(0, $8tj43$observer).wait_for_element(el).then($8tj43$catchify1(() => {
|
|
12418
12501
|
set_button_style("transition", "all 200ms ease-in");
|
|
12419
12502
|
set_button_fraction_in(1);
|
|
12420
12503
|
}));
|
|
@@ -12428,11 +12511,11 @@ function $082c4ed3e22f8d71$export$9bf11afa910f536e(_ref) {
|
|
|
12428
12511
|
} = _ref2;
|
|
12429
12512
|
// touchstart should always only have one changed touch, track it here
|
|
12430
12513
|
if (touches >= 1) {
|
|
12431
|
-
$8tj43$
|
|
12514
|
+
$8tj43$dlog1("Got new touch", changedTouches, "ignoring"); // only support 1 touch for now
|
|
12432
12515
|
return;
|
|
12433
12516
|
}
|
|
12434
12517
|
if (target.closest($082c4ed3e22f8d71$var$no_go_selector) || target.matches($082c4ed3e22f8d71$var$no_go_selector)) {
|
|
12435
|
-
$8tj43$
|
|
12518
|
+
$8tj43$dlog1("Got touch on slider, ignoring for UX", target, changedTouches);
|
|
12436
12519
|
return;
|
|
12437
12520
|
}
|
|
12438
12521
|
set_modal_style("transition", "unset");
|
|
@@ -12448,7 +12531,7 @@ function $082c4ed3e22f8d71$export$9bf11afa910f536e(_ref) {
|
|
|
12448
12531
|
let last_move_page_y = start_page_y;
|
|
12449
12532
|
let first_move_was_downwards = false;
|
|
12450
12533
|
let distance_from_start_of_gesture = 0;
|
|
12451
|
-
const end_handler = $8tj43$
|
|
12534
|
+
const end_handler = $8tj43$catchify1(e => {
|
|
12452
12535
|
const changedTouches = e === null || e === void 0 ? void 0 : e.changedTouches;
|
|
12453
12536
|
if (changedTouches && changedTouches[0].identifier !== our_fingers_identifier)
|
|
12454
12537
|
// other finger stopped touch, ignore it
|
|
@@ -12472,7 +12555,7 @@ function $082c4ed3e22f8d71$export$9bf11afa910f536e(_ref) {
|
|
|
12472
12555
|
modal.removeEventListener("touchcancel", end_handler);
|
|
12473
12556
|
modal.removeEventListener("touchmove", move_handler);
|
|
12474
12557
|
});
|
|
12475
|
-
const move_handler = $8tj43$
|
|
12558
|
+
const move_handler = $8tj43$catchify1(e => {
|
|
12476
12559
|
const {
|
|
12477
12560
|
changedTouches: changedTouches
|
|
12478
12561
|
} = e;
|
|
@@ -12522,7 +12605,7 @@ function $082c4ed3e22f8d71$export$9bf11afa910f536e(_ref) {
|
|
|
12522
12605
|
};
|
|
12523
12606
|
$8tj43$use(el => {
|
|
12524
12607
|
modal = el;
|
|
12525
|
-
(0, $8tj43$observer).wait_for_element(el).then($8tj43$
|
|
12608
|
+
(0, $8tj43$observer).wait_for_element(el).then($8tj43$catchify1(() => {
|
|
12526
12609
|
set_modal_style("transition", "all 200ms ease-in");
|
|
12527
12610
|
set_modal_style("transform", "translateY(0)");
|
|
12528
12611
|
}));
|
|
@@ -12615,7 +12698,7 @@ function $082c4ed3e22f8d71$export$9bf11afa910f536e(_ref) {
|
|
|
12615
12698
|
},
|
|
12616
12699
|
get children() {
|
|
12617
12700
|
var _el$11 = $8tj43$getNextElement($082c4ed3e22f8d71$var$_tmpl$);
|
|
12618
|
-
$8tj43$addEventListener(_el$11, "click", $8tj43$
|
|
12701
|
+
$8tj43$addEventListener(_el$11, "click", $8tj43$catchify1(() => {
|
|
12619
12702
|
const show_toast = $b4465d8d605f61e9$export$8895d39404bd2bb1({
|
|
12620
12703
|
user_triggered_: true,
|
|
12621
12704
|
expanded_hierarchical_filters_: args_for_filtering_.expanded_hierarchical_filters_,
|
|
@@ -12625,7 +12708,7 @@ function $082c4ed3e22f8d71$export$9bf11afa910f536e(_ref) {
|
|
|
12625
12708
|
also_clear_sorting_: false,
|
|
12626
12709
|
delay_toast_: true
|
|
12627
12710
|
});
|
|
12628
|
-
cleanup_promise.then($8tj43$
|
|
12711
|
+
cleanup_promise.then($8tj43$catchify1(show_toast));
|
|
12629
12712
|
}), true);
|
|
12630
12713
|
$8tj43$insert(_el$11, () => i18n_.clear_individual_filter_());
|
|
12631
12714
|
$8tj43$runHydrationEvents();
|
|
@@ -12701,7 +12784,7 @@ function $7396052a1484264f$export$d7841e452f2e59a8(_ref) {
|
|
|
12701
12784
|
const [sorting_open, set_sorting_open] = search_sorting_open_;
|
|
12702
12785
|
const [get_current_sorting_] = current_sorting_;
|
|
12703
12786
|
const [is_small, set_is_small] = $8tj43$createSignal(false);
|
|
12704
|
-
const dismiss_modal_ = $8tj43$
|
|
12787
|
+
const dismiss_modal_ = $8tj43$catchify1(() => {
|
|
12705
12788
|
set_filters_open(false);
|
|
12706
12789
|
set_sorting_open(false);
|
|
12707
12790
|
});
|
|
@@ -12810,7 +12893,7 @@ function $7396052a1484264f$export$d7841e452f2e59a8(_ref) {
|
|
|
12810
12893
|
})());
|
|
12811
12894
|
}
|
|
12812
12895
|
});
|
|
12813
|
-
$8tj43$
|
|
12896
|
+
$8tj43$catchify1(async () => {
|
|
12814
12897
|
({
|
|
12815
12898
|
open_modal_: open_modal_,
|
|
12816
12899
|
close_modal_: close_modal_
|
|
@@ -12904,7 +12987,7 @@ function $7396052a1484264f$var$OpenFiltersButton(_ref4) {
|
|
|
12904
12987
|
return _el$15;
|
|
12905
12988
|
}
|
|
12906
12989
|
}), _el$21, _co$5);
|
|
12907
|
-
$8tj43$addEventListener(_el$16, "click", $8tj43$
|
|
12990
|
+
$8tj43$addEventListener(_el$16, "click", $8tj43$catchify1(() => $8tj43$batch(() => {
|
|
12908
12991
|
if (search_filters_open_[0]()) {
|
|
12909
12992
|
search_filters_open_[1](false);
|
|
12910
12993
|
return;
|
|
@@ -12971,7 +13054,7 @@ function $7396052a1484264f$var$OpenSortingButton(_ref5) {
|
|
|
12971
13054
|
_el$23 = _el$22.firstChild,
|
|
12972
13055
|
_el$24 = _el$23.nextSibling,
|
|
12973
13056
|
[_el$25, _co$6] = $8tj43$getNextMarker(_el$24.nextSibling);
|
|
12974
|
-
$8tj43$addEventListener(_el$22, "click", $8tj43$
|
|
13057
|
+
$8tj43$addEventListener(_el$22, "click", $8tj43$catchify1(() => $8tj43$batch(() => {
|
|
12975
13058
|
if (search_sorting_open_[0]()) {
|
|
12976
13059
|
search_sorting_open_[1](false);
|
|
12977
13060
|
return;
|
|
@@ -13089,7 +13172,7 @@ function $6a16b21155984cef$var$ActualFloatingButtons(_ref2) {
|
|
|
13089
13172
|
}
|
|
13090
13173
|
old_pos = new_pos;
|
|
13091
13174
|
});
|
|
13092
|
-
const touchstart_handler = $8tj43$
|
|
13175
|
+
const touchstart_handler = $8tj43$catchify1(e => {
|
|
13093
13176
|
is_in_touch_scroll = true;
|
|
13094
13177
|
if (e.touches.length === 1) {
|
|
13095
13178
|
// 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
|
|
@@ -13097,12 +13180,12 @@ function $6a16b21155984cef$var$ActualFloatingButtons(_ref2) {
|
|
|
13097
13180
|
diff_over_second_or_touch = 0;
|
|
13098
13181
|
}
|
|
13099
13182
|
});
|
|
13100
|
-
const touchend_handler = $8tj43$
|
|
13183
|
+
const touchend_handler = $8tj43$catchify1(e => {
|
|
13101
13184
|
if (e.touches.length === 0)
|
|
13102
13185
|
// scroll gesture of any type (pinch can also be used as scroll, etc.) ended
|
|
13103
13186
|
inertia_timeout = setTimeout(
|
|
13104
13187
|
// inertia ends after 500ms (educated guess)
|
|
13105
|
-
$8tj43$
|
|
13188
|
+
$8tj43$catchify1(() => {
|
|
13106
13189
|
is_in_touch_scroll = false;
|
|
13107
13190
|
diff_over_second_or_touch = 0;
|
|
13108
13191
|
}), 500);
|
|
@@ -13120,9 +13203,9 @@ function $6a16b21155984cef$var$ActualFloatingButtons(_ref2) {
|
|
|
13120
13203
|
const everything_closed = !get_search_filters_open_() && !get_search_sorting_open_();
|
|
13121
13204
|
if (!$8tj43$untrack(modal_is_closed) && everything_closed)
|
|
13122
13205
|
// I think the point of this is to delay the animation a bit IIRC
|
|
13123
|
-
timeout = setTimeout($8tj43$
|
|
13206
|
+
timeout = setTimeout($8tj43$catchify1(() => set_if_modal_is_closed(true)), 200);else set_if_modal_is_closed(everything_closed);
|
|
13124
13207
|
});
|
|
13125
|
-
$8tj43$createComputed($8tj43$
|
|
13208
|
+
$8tj43$createComputed($8tj43$catchify1(async () => {
|
|
13126
13209
|
const element = sort_and_filter_element_();
|
|
13127
13210
|
if (!element) return;
|
|
13128
13211
|
await (0, $8tj43$observer).wait_for_element(element);
|
|
@@ -13141,12 +13224,12 @@ function $6a16b21155984cef$var$ActualFloatingButtons(_ref2) {
|
|
|
13141
13224
|
_el$5 = _el$4.firstChild,
|
|
13142
13225
|
_el$6 = _el$4.nextSibling,
|
|
13143
13226
|
_el$7 = _el$6.firstChild;
|
|
13144
|
-
$8tj43$addEventListener(_el$2, "click", $8tj43$
|
|
13227
|
+
$8tj43$addEventListener(_el$2, "click", $8tj43$catchify1(() => {
|
|
13145
13228
|
set_search_filters_open_(true);
|
|
13146
13229
|
set_search_sorting_open_(false);
|
|
13147
13230
|
}), true);
|
|
13148
13231
|
$8tj43$insert(_el$3, $8tj43$createComponent((0, $05f67356defcdd65$export$28f6150e232898de), {}));
|
|
13149
|
-
$8tj43$addEventListener(_el$4, "click", $8tj43$
|
|
13232
|
+
$8tj43$addEventListener(_el$4, "click", $8tj43$catchify1(() => {
|
|
13150
13233
|
set_search_filters_open_(false);
|
|
13151
13234
|
set_search_sorting_open_(true);
|
|
13152
13235
|
}), true);
|
|
@@ -13157,7 +13240,7 @@ function $6a16b21155984cef$var$ActualFloatingButtons(_ref2) {
|
|
|
13157
13240
|
});
|
|
13158
13241
|
return () => _c$() ? $8tj43$createComponent((0, $79af35736fe8e5c8$export$da32f7add8a22e86), {}) : $8tj43$createComponent((0, $73e3c96bc365e0e9$export$d10e63059ddb9fd4), {});
|
|
13159
13242
|
})());
|
|
13160
|
-
$8tj43$addEventListener(_el$6, "click", $8tj43$
|
|
13243
|
+
$8tj43$addEventListener(_el$6, "click", $8tj43$catchify1(() => scrollTo({
|
|
13161
13244
|
top: 0,
|
|
13162
13245
|
behavior: "smooth"
|
|
13163
13246
|
})), true);
|
|
@@ -13189,7 +13272,7 @@ function $ec225bf1f1627ea8$export$210f130a61ac1e8d(fn) {
|
|
|
13189
13272
|
let last_queued;
|
|
13190
13273
|
let last_value;
|
|
13191
13274
|
let initial_run = true;
|
|
13192
|
-
$8tj43$createComputed($8tj43$
|
|
13275
|
+
$8tj43$createComputed($8tj43$catchify1(async () => {
|
|
13193
13276
|
last_value = fn();
|
|
13194
13277
|
if (initial_run) {
|
|
13195
13278
|
initial_run = false;
|
|
@@ -13237,7 +13320,7 @@ function $5e6abec0dab4e610$export$6e49da55e449af7c(_ref) {
|
|
|
13237
13320
|
}]); // get rid of old data the browser saves the old state and will restore it later on
|
|
13238
13321
|
};
|
|
13239
13322
|
|
|
13240
|
-
$8tj43$createComputed($8tj43$
|
|
13323
|
+
$8tj43$createComputed($8tj43$catchify1(() => {
|
|
13241
13324
|
const last_result = get_last_result_in_viewport_();
|
|
13242
13325
|
if (last_result == undefined || last_result <= 0 || last_result == Infinity) return;
|
|
13243
13326
|
if (isNaN(last_result)) {
|
|
@@ -13264,7 +13347,7 @@ function $5e6abec0dab4e610$export$6e49da55e449af7c(_ref) {
|
|
|
13264
13347
|
set_to_later = last_result;
|
|
13265
13348
|
// If a delayed push timeout is already running, just changing the value that will be pushed is sufficient
|
|
13266
13349
|
if (timeout) return;
|
|
13267
|
-
timeout = setTimeout($8tj43$
|
|
13350
|
+
timeout = setTimeout($8tj43$catchify1(() => {
|
|
13268
13351
|
timeout = undefined;
|
|
13269
13352
|
last_time_history_changed = +new Date();
|
|
13270
13353
|
set_min_results_loaded(set_to_later);
|
|
@@ -13377,7 +13460,7 @@ function $22470de5f42cc35d$export$f631859cab12b342(_ref) {
|
|
|
13377
13460
|
if (!result) return;
|
|
13378
13461
|
return {
|
|
13379
13462
|
href: result.page_url,
|
|
13380
|
-
onClick: $8tj43$
|
|
13463
|
+
onClick: $8tj43$catchify1(ev => router_.navigate_.go_to_({
|
|
13381
13464
|
new_url_: result.page_url,
|
|
13382
13465
|
is_replace_: false,
|
|
13383
13466
|
event_: ev
|
|
@@ -13811,7 +13894,7 @@ function $937791b86d3d1509$export$44f738469d5570cf(_ref) {
|
|
|
13811
13894
|
// We might only have changed the left position which align_field doesn't know about, make it poll the position for a while
|
|
13812
13895
|
setPollAlignment_(true);
|
|
13813
13896
|
if (disableResizePollingTimeout) clearTimeout(disableResizePollingTimeout);
|
|
13814
|
-
disableResizePollingTimeout = setTimeout($8tj43$
|
|
13897
|
+
disableResizePollingTimeout = setTimeout($8tj43$catchify1(() => {
|
|
13815
13898
|
setPollAlignment_(false);
|
|
13816
13899
|
disableResizePollingTimeout = undefined;
|
|
13817
13900
|
}), 1000);
|
|
@@ -13944,7 +14027,7 @@ function $da279c5a540c6846$export$a54ec244c8863715(_ref) {
|
|
|
13944
14027
|
} : {})
|
|
13945
14028
|
};
|
|
13946
14029
|
});
|
|
13947
|
-
const [search_results_] = $8tj43$createResource(search_query_base_, $8tj43$
|
|
14030
|
+
const [search_results_] = $8tj43$createResource(search_query_base_, $8tj43$catchify1(async base_query => {
|
|
13948
14031
|
set_all_products_loaded(false);
|
|
13949
14032
|
// only first page of results
|
|
13950
14033
|
return await $5e6abec0dab4e610$export$cc42dd29bf655ab6({
|
|
@@ -13992,7 +14075,7 @@ function $da279c5a540c6846$export$a54ec244c8863715(_ref) {
|
|
|
13992
14075
|
const [, setModalFieldStyle] = modal_field_style;
|
|
13993
14076
|
const [, setModalBackdropStyle] = modal_backdrop_style;
|
|
13994
14077
|
const [get_search_field_elements, set_search_field_elements] = $8tj43$createSignal();
|
|
13995
|
-
const SafeSearchField = $8tj43$
|
|
14078
|
+
const SafeSearchField = $8tj43$catchify1((0, $584c06c09cf4609d$export$b94867ecbd698f21));
|
|
13996
14079
|
const [sort_or_filter_open_, set_sort_or_filter_open_] = $8tj43$createSignal(false);
|
|
13997
14080
|
const [desktop_filter_elements_, set_desktop_filter_elements] = $8tj43$createSignal();
|
|
13998
14081
|
const n_hits = $8tj43$createMemo(() => {
|
|
@@ -14061,7 +14144,7 @@ function $da279c5a540c6846$export$a54ec244c8863715(_ref) {
|
|
|
14061
14144
|
})()));
|
|
14062
14145
|
}).remove);
|
|
14063
14146
|
$3a2bed57c9a57e21$export$d31a1a1a83ad9413(search_results_, selected_filters_);
|
|
14064
|
-
$8tj43$
|
|
14147
|
+
$8tj43$catchify1((0, $5e6abec0dab4e610$export$6e49da55e449af7c))({
|
|
14065
14148
|
scroll_restoration_data_: scroll_restoration_data_,
|
|
14066
14149
|
last_result_in_viewport_: last_result_in_viewport_,
|
|
14067
14150
|
id_: get_search_query_,
|
|
@@ -14107,8 +14190,8 @@ function $da279c5a540c6846$export$a54ec244c8863715(_ref) {
|
|
|
14107
14190
|
setModalBodyStyle({});
|
|
14108
14191
|
modalAlignmentSignalsRef_ === null || modalAlignmentSignalsRef_ === void 0 || modalAlignmentSignalsRef_(alignmentSignals_);
|
|
14109
14192
|
const [pollAlignment, setPollAlignment_] = $8tj43$createSignal(false);
|
|
14110
|
-
const align_position = $8tj43$
|
|
14111
|
-
div_with_field_class.addEventListener("click", $8tj43$
|
|
14193
|
+
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);
|
|
14194
|
+
div_with_field_class.addEventListener("click", $8tj43$catchify1(e => {
|
|
14112
14195
|
var _target$matches, _target$closest, _on_open_, _ref4;
|
|
14113
14196
|
const target = e.target;
|
|
14114
14197
|
const sel = ".submit";
|
|
@@ -14556,7 +14639,7 @@ class $eb064bc3350276c1$export$ac6237957a15b3f0 {
|
|
|
14556
14639
|
BackIcon_: BackIcon_
|
|
14557
14640
|
});
|
|
14558
14641
|
$68e6625c8d51f847$export$5162a71f252e6122();
|
|
14559
|
-
$8tj43$
|
|
14642
|
+
$8tj43$catchify1(async () => {
|
|
14560
14643
|
const {
|
|
14561
14644
|
open_modal_: open_modal_,
|
|
14562
14645
|
close_modal_: close_modal_
|
|
@@ -14820,7 +14903,7 @@ function $eb064bc3350276c1$export$f2dc7e4e4aa11abb(props) {
|
|
|
14820
14903
|
function $37e8c97bb6876197$export$828dcdd425fd3231(aligner) {
|
|
14821
14904
|
const style_element = document.createElement("style");
|
|
14822
14905
|
document.head.append(style_element);
|
|
14823
|
-
const resize_observer = new ResizeObserver($8tj43$
|
|
14906
|
+
const resize_observer = new ResizeObserver($8tj43$catchify1(() => {
|
|
14824
14907
|
const styles = $cc64aabf2c7a1f1a$export$1233ca167bf71f9a({
|
|
14825
14908
|
".depict.plp .depict-search-modal .search-field": {
|
|
14826
14909
|
"height": "".concat(aligner === null || aligner === void 0 ? void 0 : aligner.clientHeight, "px")
|
|
@@ -14891,7 +14974,7 @@ const $169c13c0531d91d2$export$d86a33413558014e = openModalParams => {
|
|
|
14891
14974
|
}, dispose_aligner];
|
|
14892
14975
|
};
|
|
14893
14976
|
function $573c007c697a1831$export$d0596b5cae35ad4(open_search) {
|
|
14894
|
-
const handler = $8tj43$
|
|
14977
|
+
const handler = $8tj43$catchify1(e => {
|
|
14895
14978
|
const {
|
|
14896
14979
|
key: key,
|
|
14897
14980
|
target: target
|
|
@@ -14910,7 +14993,7 @@ function $573c007c697a1831$export$d0596b5cae35ad4(open_search) {
|
|
|
14910
14993
|
function $e60a76195ac6d408$export$689e204eadb33baf(pr) {
|
|
14911
14994
|
let old_url;
|
|
14912
14995
|
let disconnect_link_observer;
|
|
14913
|
-
const link_handler = $8tj43$
|
|
14996
|
+
const link_handler = $8tj43$catchify1(e => {
|
|
14914
14997
|
const link = e.currentTarget || e.target;
|
|
14915
14998
|
if (link.href === old_url) {
|
|
14916
14999
|
history.pushState(history.state, "", link.href);
|
|
@@ -14919,7 +15002,7 @@ function $e60a76195ac6d408$export$689e204eadb33baf(pr) {
|
|
|
14919
15002
|
});
|
|
14920
15003
|
let remove_added_listeners;
|
|
14921
15004
|
let resolve_remove_added_listeners;
|
|
14922
|
-
pr.addEventListener("open", $8tj43$
|
|
15005
|
+
pr.addEventListener("open", $8tj43$catchify1(() => {
|
|
14923
15006
|
remove_added_listeners = new Promise(r => resolve_remove_added_listeners = r);
|
|
14924
15007
|
disconnect_link_observer = (0, $8tj43$observer).onexists("a", async _ref => {
|
|
14925
15008
|
let {
|
|
@@ -14930,12 +15013,12 @@ function $e60a76195ac6d408$export$689e204eadb33baf(pr) {
|
|
|
14930
15013
|
element.removeEventListener("click", link_handler);
|
|
14931
15014
|
});
|
|
14932
15015
|
}));
|
|
14933
|
-
pr.addEventListener("close", $8tj43$
|
|
15016
|
+
pr.addEventListener("close", $8tj43$catchify1(() => {
|
|
14934
15017
|
var _disconnect_link_obse, _resolve_remove_added;
|
|
14935
15018
|
(_disconnect_link_obse = disconnect_link_observer) === null || _disconnect_link_obse === void 0 || _disconnect_link_obse();
|
|
14936
15019
|
(_resolve_remove_added = resolve_remove_added_listeners) === null || _resolve_remove_added === void 0 || _resolve_remove_added();
|
|
14937
15020
|
}));
|
|
14938
|
-
$8tj43$
|
|
15021
|
+
$8tj43$catchify1(async () => {
|
|
14939
15022
|
for await (const href of (0, $8tj43$href_change_ipns)) if (!pr.is_page_(new URL(href))) old_url = href;
|
|
14940
15023
|
})();
|
|
14941
15024
|
}
|
|
@@ -15033,7 +15116,7 @@ class $f9fd3017c20b774a$export$3ccaa27d81dd8556 extends EventTarget {
|
|
|
15033
15116
|
});
|
|
15034
15117
|
$f9fd3017c20b774a$var$_classPrivateFieldInitSpec(this, $f9fd3017c20b774a$var$_unload, {
|
|
15035
15118
|
writable: true,
|
|
15036
|
-
value: /*@__PURE__*/$8tj43$
|
|
15119
|
+
value: /*@__PURE__*/$8tj43$catchify1(() => {
|
|
15037
15120
|
var _classPrivateFieldGet3;
|
|
15038
15121
|
if (!$8tj43$babelruntimehelpersclassPrivateFieldGet(this, $f9fd3017c20b774a$var$_is_open)) return;
|
|
15039
15122
|
(_classPrivateFieldGet3 = $8tj43$babelruntimehelpersclassPrivateFieldGet(this, $f9fd3017c20b774a$var$_disconnect_observer)) === null || _classPrivateFieldGet3 === void 0 || _classPrivateFieldGet3.call(this);
|
|
@@ -15047,7 +15130,7 @@ class $f9fd3017c20b774a$export$3ccaa27d81dd8556 extends EventTarget {
|
|
|
15047
15130
|
});
|
|
15048
15131
|
$f9fd3017c20b774a$var$_classPrivateFieldInitSpec(this, $f9fd3017c20b774a$var$_load, {
|
|
15049
15132
|
writable: true,
|
|
15050
|
-
value: /*@__PURE__*/$8tj43$
|
|
15133
|
+
value: /*@__PURE__*/$8tj43$catchify1(async els => {
|
|
15051
15134
|
$8tj43$babelruntimehelpersclassPrivateFieldSet(this, $f9fd3017c20b774a$var$_is_open, true);
|
|
15052
15135
|
// So that #load doesn't get called again
|
|
15053
15136
|
let set_should_stay_inserted;
|
|
@@ -15111,7 +15194,7 @@ class $f9fd3017c20b774a$export$3ccaa27d81dd8556 extends EventTarget {
|
|
|
15111
15194
|
async function $f9fd3017c20b774a$var$_listen2() {
|
|
15112
15195
|
const [exit_ipns, exitable_ipns] = $8tj43$make_asyncIterable_exiter((0, $8tj43$href_change_ipns));
|
|
15113
15196
|
$8tj43$babelruntimehelpersclassPrivateFieldSet(this, $f9fd3017c20b774a$var$_stop_listening, exit_ipns);
|
|
15114
|
-
const caught_page_check_fn = $8tj43$
|
|
15197
|
+
const caught_page_check_fn = $8tj43$catchify1(this.is_page_, "page check failed");
|
|
15115
15198
|
for await (const href of exitable_ipns) {
|
|
15116
15199
|
const url = new URL(href);
|
|
15117
15200
|
if (!caught_page_check_fn(url)) {
|
|
@@ -15129,12 +15212,12 @@ function $f9fd3017c20b774a$var$_get_rendered_recs2() {
|
|
|
15129
15212
|
this.addEventListener("close", dispose, {
|
|
15130
15213
|
once: true
|
|
15131
15214
|
});
|
|
15132
|
-
return $8tj43$
|
|
15215
|
+
return $8tj43$catchify1(this.render_, "rendering failed")() || [];
|
|
15133
15216
|
});
|
|
15134
15217
|
}
|
|
15135
15218
|
function $f9fd3017c20b774a$var$_empty_page_bugfix2() {
|
|
15136
15219
|
// Called when a "page" is "opened" using PageReplacer
|
|
15137
|
-
const on_maybe_popstate = $8tj43$
|
|
15220
|
+
const on_maybe_popstate = $8tj43$catchify1(what_happened => {
|
|
15138
15221
|
if (what_happened !== "popstate") return;
|
|
15139
15222
|
const cleaned_current_url = $f9fd3017c20b774a$var$clean_url(location.href);
|
|
15140
15223
|
if (!$f9fd3017c20b774a$var$_classStaticPrivateFieldSpecGet($f9fd3017c20b774a$export$3ccaa27d81dd8556, $f9fd3017c20b774a$export$3ccaa27d81dd8556, $f9fd3017c20b774a$var$_visited_urls).has(cleaned_current_url)) {
|
|
@@ -15158,7 +15241,7 @@ function $f9fd3017c20b774a$var$_empty_page_bugfix2() {
|
|
|
15158
15241
|
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.
|
|
15159
15242
|
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.
|
|
15160
15243
|
*/
|
|
15161
|
-
$8tj43$
|
|
15244
|
+
$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");
|
|
15162
15245
|
location.reload();
|
|
15163
15246
|
$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.
|
|
15164
15247
|
$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.
|
|
@@ -15177,7 +15260,7 @@ var $f9fd3017c20b774a$var$_visited_urls = {
|
|
|
15177
15260
|
writable: true,
|
|
15178
15261
|
value: /*@__PURE__*/(() => {
|
|
15179
15262
|
// 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).
|
|
15180
|
-
$8tj43$
|
|
15263
|
+
$8tj43$catchify1(async () => {
|
|
15181
15264
|
// Static initialization blocks aren't supported in MobileSafari yet, otherwise this would be one.
|
|
15182
15265
|
// 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).
|
|
15183
15266
|
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes/Static_initialization_blocks
|
|
@@ -15234,7 +15317,7 @@ function $a3026fb727bc7550$export$316f6f283ae64765(props) {
|
|
|
15234
15317
|
field_: $8tj43$createSignal({}),
|
|
15235
15318
|
backdrop_: backdropAlignmentSignal_
|
|
15236
15319
|
};
|
|
15237
|
-
const defaultHandler = $8tj43$
|
|
15320
|
+
const defaultHandler = $8tj43$catchify1(e => {
|
|
15238
15321
|
const {
|
|
15239
15322
|
modalVersionUsed_: modalVersionUsed_
|
|
15240
15323
|
} = shared_properties;
|
|
@@ -15370,7 +15453,7 @@ function $43fbb365ed0ac99e$export$466cdc317043f6cb(_ref) {
|
|
|
15370
15453
|
$8tj43$createComputed(() => {
|
|
15371
15454
|
var _place_holdey_quickli, _place_holdey_quickli2;
|
|
15372
15455
|
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) {
|
|
15373
|
-
if (last_was_placeholder) queueMicrotask($8tj43$
|
|
15456
|
+
if (last_was_placeholder) queueMicrotask($8tj43$catchify1(() => {
|
|
15374
15457
|
var _sliding_element;
|
|
15375
15458
|
(_sliding_element = sliding_element) === null || _sliding_element === void 0 || _sliding_element.scrollTo({
|
|
15376
15459
|
left: 0
|
|
@@ -15440,7 +15523,7 @@ function $43fbb365ed0ac99e$export$466cdc317043f6cb(_ref) {
|
|
|
15440
15523
|
} else if (!(((_intersecting_items_o = intersecting_items_object[selected_index()]) === null || _intersecting_items_o === void 0 ? void 0 : _intersecting_items_o.intersectionRatio) >= 0.95)) {
|
|
15441
15524
|
// negated larger than to handle left side of comparison being undefined
|
|
15442
15525
|
let done_work = false;
|
|
15443
|
-
$8tj43$runWithOwner(owner, () => $8tj43$createComputed($8tj43$
|
|
15526
|
+
$8tj43$runWithOwner(owner, () => $8tj43$createComputed($8tj43$catchify1(() => {
|
|
15444
15527
|
if (done_work || !Array.isArray(quicklinks_data_())) return;
|
|
15445
15528
|
const sel_index = selected_index();
|
|
15446
15529
|
const target_element = sel_index >= 0 ? sel_index : 0;
|
|
@@ -15492,7 +15575,7 @@ function $43fbb365ed0ac99e$export$466cdc317043f6cb(_ref) {
|
|
|
15492
15575
|
});
|
|
15493
15576
|
return (() => {
|
|
15494
15577
|
var _el$3 = $8tj43$getNextElement($43fbb365ed0ac99e$var$_tmpl$3);
|
|
15495
|
-
$8tj43$addEventListener(_el$3, "click", $8tj43$
|
|
15578
|
+
$8tj43$addEventListener(_el$3, "click", $8tj43$catchify1(ev => {
|
|
15496
15579
|
const url = href();
|
|
15497
15580
|
if (is_selected() && !$9b35d1384e31813a$export$29d28dadc2d6b631(ev) || !url)
|
|
15498
15581
|
// allow open currently selected one in new tab but otherwise prevent clicks
|
|
@@ -15637,7 +15720,7 @@ function $a4777acaffa35a82$export$3945d6db2dfd3d12(_ref) {
|
|
|
15637
15720
|
const handler = () => allow_filter_clearing = false;
|
|
15638
15721
|
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
|
|
15639
15722
|
$8tj43$onCleanup(() => window.removeEventListener("popstate", handler));
|
|
15640
|
-
$8tj43$createEffect($8tj43$on(crumb_data_, $8tj43$
|
|
15723
|
+
$8tj43$createEffect($8tj43$on(crumb_data_, $8tj43$catchify1(new_crumb_data => {
|
|
15641
15724
|
const id_of_new_data = id_to_query_for_();
|
|
15642
15725
|
const type_of_id_of_new_data = id_type_();
|
|
15643
15726
|
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_)) {
|
|
@@ -15691,7 +15774,7 @@ function $a4777acaffa35a82$var$clear_if_opened_new_tab_with_sideways_url_params_
|
|
|
15691
15774
|
// 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
|
|
15692
15775
|
if (!$8tj43$untrack(get_sideways_filter_clearing_flag_)) return;
|
|
15693
15776
|
set_sideways_filter_clearing_flag_(false);
|
|
15694
|
-
$8tj43$
|
|
15777
|
+
$8tj43$dlog1("Flag to clear filters was set, clearing filters");
|
|
15695
15778
|
$8tj43$queueMacroTask(() => {
|
|
15696
15779
|
// Do it next task so that all the filters have time to populate
|
|
15697
15780
|
$b4465d8d605f61e9$export$8895d39404bd2bb1({
|
|
@@ -15820,7 +15903,7 @@ function $4b4b262708b516ee$export$f7d2f673fc2f091d(_ref) {
|
|
|
15820
15903
|
// Make "Get products in listing" request to get products in listing
|
|
15821
15904
|
const [plp_products_] = $8tj43$createResource(products_query_base_,
|
|
15822
15905
|
// 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)
|
|
15823
|
-
$8tj43$
|
|
15906
|
+
$8tj43$catchify(base_query => $5e6abec0dab4e610$export$cc42dd29bf655ab6({
|
|
15824
15907
|
id_: $8tj43$untrack(id_to_query_for_),
|
|
15825
15908
|
scroll_restoration_data_: scroll_restoration_data_,
|
|
15826
15909
|
min_products_to_fetch_: min_products_to_fetch_,
|
|
@@ -15840,7 +15923,7 @@ function $4b4b262708b516ee$export$f7d2f673fc2f091d(_ref) {
|
|
|
15840
15923
|
id_type_: id_type_()
|
|
15841
15924
|
}));
|
|
15842
15925
|
// Make "Get Listing" request to get quicklinks, breadcrumbs, title, etc
|
|
15843
|
-
const [plp_meta] = $8tj43$createResource(meta_query_base, $8tj43$
|
|
15926
|
+
const [plp_meta] = $8tj43$createResource(meta_query_base, $8tj43$catchify(query => depict_api_.get_listing(query)));
|
|
15844
15927
|
const available_sortings_ = $8tj43$createMemo(() => {
|
|
15845
15928
|
var _plp_products_, _plp_products_$sorts;
|
|
15846
15929
|
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 => {
|
|
@@ -15984,7 +16067,7 @@ function $4b4b262708b516ee$export$f7d2f673fc2f091d(_ref) {
|
|
|
15984
16067
|
filterModalParent_: filterModalParent_,
|
|
15985
16068
|
...extra_sort_and_filter_args_
|
|
15986
16069
|
});
|
|
15987
|
-
$8tj43$
|
|
16070
|
+
$8tj43$catchify((0, $5e6abec0dab4e610$export$6e49da55e449af7c))({
|
|
15988
16071
|
scroll_restoration_data_: scroll_restoration_data_,
|
|
15989
16072
|
last_result_in_viewport_: last_result_in_viewport_,
|
|
15990
16073
|
id_: id_to_query_for_,
|
|
@@ -15998,7 +16081,7 @@ function $4b4b262708b516ee$export$f7d2f673fc2f091d(_ref) {
|
|
|
15998
16081
|
$8tj43$createComputed(() => {
|
|
15999
16082
|
if (plp_products_.loading) set_can_write_scroll_restoration(false);else if (plp_products_()) set_can_write_scroll_restoration(true);
|
|
16000
16083
|
});
|
|
16001
|
-
$8tj43$createRenderEffect($8tj43$
|
|
16084
|
+
$8tj43$createRenderEffect($8tj43$catchify(async () => {
|
|
16002
16085
|
var _only_show_filters_op;
|
|
16003
16086
|
const slim = is_slim_();
|
|
16004
16087
|
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();
|
|
@@ -16289,4 +16372,4 @@ function $8821a19349c36651$export$e2bf8ce7779e827e(props) {
|
|
|
16289
16372
|
}, "Entire CategoryPage failed");
|
|
16290
16373
|
}
|
|
16291
16374
|
$8tj43$add_to_version_info("ui", (0, $8db9a15135765c11$export$83d89fbfd8236492));
|
|
16292
|
-
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, $
|
|
16375
|
+
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 };
|