@depict-ai/utilishared 1.0.34 → 1.0.36
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 +730 -728
- package/ES10/index.d.ts +1 -1
- package/ES10/index.js +730 -728
- package/latest/index.cjs +602 -599
- package/latest/index.d.ts +1 -1
- package/latest/index.js +602 -599
- package/package.json +2 -2
package/latest/index.js
CHANGED
|
@@ -12,7 +12,7 @@ function $parcel$export(e, n, v, s) {
|
|
|
12
12
|
function $parcel$interopDefault(a) {
|
|
13
13
|
return a && a.__esModule ? a.default : a;
|
|
14
14
|
}
|
|
15
|
-
const $0766c85d387a9765$export$83d89fbfd8236492 = "1.0.
|
|
15
|
+
const $0766c85d387a9765$export$83d89fbfd8236492 = "1.0.36";
|
|
16
16
|
const $571bce04eb920cd8$export$55fe61489d2c7417 = /*@__PURE__*/(() => process.env.STRIP_DEBUG === "true" ? false : process.env.DEBUG === "true" || process.env.NODE_ENV === "development" || process.env.BUILD_TARGET !== "node" && (globalThis?.document?.currentScript?.dataset?.debug === "true" || globalThis?.localStorage?.getItem?.("debug") === "true"))();
|
|
17
17
|
const $649f456f663da9fc$var$browser_prefix_styling = "color: #fff;";
|
|
18
18
|
let $649f456f663da9fc$var$browser_prefix = "[Depict]";
|
|
@@ -33,7 +33,7 @@ function $649f456f663da9fc$export$997143d41f6a0c9b(...args) {
|
|
|
33
33
|
}
|
|
34
34
|
const $f564adbc4675ceaf$export$60d1d0e3cfc8b9ed = {};
|
|
35
35
|
function $f564adbc4675ceaf$export$2cefb7e61fcbae00(package_name, version) {
|
|
36
|
-
|
|
36
|
+
$649f456f663da9fc$export$de56f1198d121036("@depict-ai/" + package_name + " version", version);
|
|
37
37
|
$f564adbc4675ceaf$export$60d1d0e3cfc8b9ed[package_name] = version;
|
|
38
38
|
}
|
|
39
39
|
function $f564adbc4675ceaf$export$fe609f0216e4ebef(url) {
|
|
@@ -192,8 +192,8 @@ const $607fc90221d440a6$var$compat_layer_to_info = /*@__PURE__*/new WeakMap();
|
|
|
192
192
|
function $607fc90221d440a6$export$e806c6c1615a59ae(async_iterator_should_return_state_on_first_call = true, state_obj = new (0, $ec58be30798d6e95$export$e2c811ae0eb35313)()) {
|
|
193
193
|
// @ts-ignore
|
|
194
194
|
$607fc90221d440a6$var$on_async_iterator_next_called({}); // work around https://github.com/swc-project/swc/issues/5530
|
|
195
|
-
const ai =
|
|
196
|
-
const [exit, exitable] =
|
|
195
|
+
const ai = $ec58be30798d6e95$export$3e42f5078e3abfc0(state_obj);
|
|
196
|
+
const [exit, exitable] = $b8270fcf290bb3af$export$927664b47117acb0({
|
|
197
197
|
...ai
|
|
198
198
|
});
|
|
199
199
|
const obj = Object.assign(exitable, {
|
|
@@ -230,7 +230,7 @@ function $607fc90221d440a6$export$e806c6c1615a59ae(async_iterator_should_return_
|
|
|
230
230
|
yield* $607fc90221d440a6$var$on_async_iterator_next_called(exitable_for_async_generator, unblock_state_obj, fn => stock_return_function = fn);
|
|
231
231
|
};
|
|
232
232
|
const iterator = async_generator();
|
|
233
|
-
const [exit_async_generator, exitable_for_async_generator] =
|
|
233
|
+
const [exit_async_generator, exitable_for_async_generator] = $b8270fcf290bb3af$export$927664b47117acb0(orig_iterator);
|
|
234
234
|
// we can't use a normal async generator since it can't be "quit" from the outside (by calling .return on the AsyncIterator) while being awaited apparently
|
|
235
235
|
// therefore we make the async iterable that it's (soon) passing control onto exitable by calling .return() (even if a .next() promise is being currently awaited)
|
|
236
236
|
iterator.return = () => {
|
|
@@ -247,11 +247,11 @@ function $607fc90221d440a6$export$e806c6c1615a59ae(async_iterator_should_return_
|
|
|
247
247
|
};
|
|
248
248
|
}
|
|
249
249
|
const callable_obj_with_everything = Object.assign(ai, obj);
|
|
250
|
-
|
|
250
|
+
$41dbf27125069265$export$8df876135bad6d96(callable_obj_with_everything, "state", {
|
|
251
251
|
get: () => state_obj.last_processed_value_,
|
|
252
252
|
enumerable: true
|
|
253
253
|
});
|
|
254
|
-
|
|
254
|
+
$41dbf27125069265$export$8df876135bad6d96(callable_obj_with_everything, "latest_call_value", {
|
|
255
255
|
get: () => state_obj.queue_[state_obj.queue_.length - 1] ?? callable_obj_with_everything.state,
|
|
256
256
|
enumerable: true
|
|
257
257
|
});
|
|
@@ -297,7 +297,7 @@ function $607fc90221d440a6$export$10c3e52ef388b81b(ipns) {
|
|
|
297
297
|
return $607fc90221d440a6$export$e806c6c1615a59ae(true, internal_state_obj);
|
|
298
298
|
}
|
|
299
299
|
function $7547e32486a3abc0$export$8048b892d651b310(exception, error_for_stack) {
|
|
300
|
-
|
|
300
|
+
$649f456f663da9fc$export$de56f1198d121036(exception);
|
|
301
301
|
if (0, $571bce04eb920cd8$export$55fe61489d2c7417) /* eslint-disable no-console */console.trace();
|
|
302
302
|
if (process.env.BUILD_TARGET !== "node") {
|
|
303
303
|
const {
|
|
@@ -320,7 +320,7 @@ async function $d0e7629fb3179e02$export$2fc1a072736ae2f6(obj, property, ...sub_o
|
|
|
320
320
|
}
|
|
321
321
|
async function $d0e7629fb3179e02$var$wait_for_variable_in_object(variable, obj) {
|
|
322
322
|
const start = new Date().getTime();
|
|
323
|
-
|
|
323
|
+
$649f456f663da9fc$export$de56f1198d121036("waiting for definition of variable", variable, "in", obj);
|
|
324
324
|
let var_behind_the_scenes;
|
|
325
325
|
let resolve_variable_definition;
|
|
326
326
|
let was_defined = false;
|
|
@@ -348,9 +348,9 @@ async function $d0e7629fb3179e02$var$wait_for_variable_in_object(variable, obj)
|
|
|
348
348
|
get: get,
|
|
349
349
|
set: set
|
|
350
350
|
});
|
|
351
|
-
|
|
351
|
+
$649f456f663da9fc$export$de56f1198d121036("everything's set up, waiting for promise by setter to resolve");
|
|
352
352
|
const result = await definition_of_var;
|
|
353
|
-
|
|
353
|
+
$649f456f663da9fc$export$de56f1198d121036("Promise resolved, ", result, " is here. We waited", new Date().getTime() - start, "ms");
|
|
354
354
|
return result;
|
|
355
355
|
}
|
|
356
356
|
function $d0e7629fb3179e02$export$d5062f468a0454f3(obj, prop) {
|
|
@@ -358,7 +358,7 @@ function $d0e7629fb3179e02$export$d5062f468a0454f3(obj, prop) {
|
|
|
358
358
|
if (obj != null) return Object.hasOwnProperty.call(obj, prop) ? Object.getOwnPropertyDescriptor(obj, prop) : $d0e7629fb3179e02$export$d5062f468a0454f3(Object.getPrototypeOf(obj), prop);
|
|
359
359
|
}
|
|
360
360
|
function $d0e7629fb3179e02$export$79f910a98828378d(obj, variable, async_iterator_should_return_state_on_first_call) {
|
|
361
|
-
const definition_ipns =
|
|
361
|
+
const definition_ipns = $607fc90221d440a6$export$e806c6c1615a59ae(async_iterator_should_return_state_on_first_call);
|
|
362
362
|
let var_behind_the_scenes = obj[variable];
|
|
363
363
|
definition_ipns(var_behind_the_scenes); // resolve with initial value
|
|
364
364
|
const previous_descriptor = $d0e7629fb3179e02$export$d5062f468a0454f3(obj, variable);
|
|
@@ -489,7 +489,7 @@ async function $a035d75d336cf506$var$load_sentry(TENANT, more_options = {}, extr
|
|
|
489
489
|
BrowserClient: BrowserClient,
|
|
490
490
|
Hub: Hub,
|
|
491
491
|
defaultIntegrations: defaultIntegrations
|
|
492
|
-
} = await
|
|
492
|
+
} = await $d0e7629fb3179e02$export$2fc1a072736ae2f6(window, global_var_name);
|
|
493
493
|
delete window[global_var_name];
|
|
494
494
|
if (process.env.SENTRY_SAMPLE_RATE) {
|
|
495
495
|
const sample_rate = parseFloat(process.env.SENTRY_SAMPLE_RATE);
|
|
@@ -511,7 +511,7 @@ async function $a035d75d336cf506$var$load_sentry(TENANT, more_options = {}, extr
|
|
|
511
511
|
// https://github.com/getsentry/sentry-javascript/issues/2541
|
|
512
512
|
return hub;
|
|
513
513
|
}
|
|
514
|
-
const $eba382943196079c$export$af2e17a20c2ea3c5 = !(process.env.SENTRY === "true" || process.env.DEPICT_ERROR_REPORTING === "true" || process.env.NEXT_PUBLIC_DEPICT_ERROR_REPORTING === "true") && (process.env.SENTRY === "false" || process.env.DEPICT_ERROR_REPORTING === "false" || process.env.NEXT_PUBLIC_DEPICT_ERROR_REPORTING === "false" || (0, $571bce04eb920cd8$export$55fe61489d2c7417)) ? /*@__PURE__*/$eba382943196079c$var$fakesentry() : /*@__PURE__
|
|
514
|
+
const $eba382943196079c$export$af2e17a20c2ea3c5 = !(process.env.SENTRY === "true" || process.env.DEPICT_ERROR_REPORTING === "true" || process.env.NEXT_PUBLIC_DEPICT_ERROR_REPORTING === "true") && (process.env.SENTRY === "false" || process.env.DEPICT_ERROR_REPORTING === "false" || process.env.NEXT_PUBLIC_DEPICT_ERROR_REPORTING === "false" || (0, $571bce04eb920cd8$export$55fe61489d2c7417)) ? /*@__PURE__*/$eba382943196079c$var$fakesentry() : /*@__PURE__*/$a035d75d336cf506$export$2e2bcd8739ae039(process.env.TENANT || "unknown", undefined, (0, $649f456f663da9fc$export$de56f1198d121036));
|
|
515
515
|
function $eba382943196079c$var$fakesentry() {
|
|
516
516
|
// // source: https://docs.sentry.io/platforms/javascript/troubleshooting/#dealing-with-ad-blockers
|
|
517
517
|
// const handler = {
|
|
@@ -578,13 +578,13 @@ function $d89638655e64f324$export$bb0a9c36cf454ea0(min, max) {
|
|
|
578
578
|
function $511123bb28a7b6f7$export$535946eb77c946dd(the_function) {
|
|
579
579
|
let busy = false;
|
|
580
580
|
let current_promise;
|
|
581
|
-
return
|
|
581
|
+
return $b04e44fad5ea42c7$export$b3bbfd758f11cfa9(async (...args) => {
|
|
582
582
|
// Double awaits to make sure that if busy is true, it must also be true two ticks later.
|
|
583
583
|
// This is a fix for when a promise that finalizes immediately is passed.
|
|
584
584
|
// For context: https://javascript.info/microtask-queue
|
|
585
585
|
if (!busy || !(await await busy, busy)) {
|
|
586
586
|
busy = true;
|
|
587
|
-
const to_finally =
|
|
587
|
+
const to_finally = $b04e44fad5ea42c7$export$b3bbfd758f11cfa9(the_function)(...args);
|
|
588
588
|
current_promise = to_finally.finally(() => busy = false);
|
|
589
589
|
}
|
|
590
590
|
return current_promise;
|
|
@@ -594,13 +594,13 @@ function $511123bb28a7b6f7$export$f241be8e610f5c77(the_function) {
|
|
|
594
594
|
let busy = false;
|
|
595
595
|
let queued;
|
|
596
596
|
let current_promise;
|
|
597
|
-
const wrapped_fn =
|
|
597
|
+
const wrapped_fn = $b04e44fad5ea42c7$export$b3bbfd758f11cfa9(async (...args) => {
|
|
598
598
|
// Double awaits to make sure that if busy is true, it must also be true two ticks later.
|
|
599
599
|
// This is a fix for when a promise that finalizes immediately is passed.
|
|
600
600
|
// For context: https://javascript.info/microtask-queue
|
|
601
601
|
if (!busy || !(await await busy, busy)) {
|
|
602
602
|
busy = true;
|
|
603
|
-
const to_finally =
|
|
603
|
+
const to_finally = $b04e44fad5ea42c7$export$b3bbfd758f11cfa9(the_function)(...args);
|
|
604
604
|
current_promise = to_finally.finally(() => {
|
|
605
605
|
busy = false;
|
|
606
606
|
if (queued) {
|
|
@@ -619,7 +619,7 @@ class $09ff985c7c424fb3$export$32ccf3a614c84258 {
|
|
|
619
619
|
#internal_resolve;
|
|
620
620
|
#previous_promise = Promise.resolve();
|
|
621
621
|
promise = new Promise(r => this.#internal_resolve = r);
|
|
622
|
-
#work_queue_max_once =
|
|
622
|
+
#work_queue_max_once = $511123bb28a7b6f7$export$535946eb77c946dd(this.#work_queue.bind(this));
|
|
623
623
|
resolve = value => {
|
|
624
624
|
this.#values_to_resolve_with.push(value);
|
|
625
625
|
this.#work_queue_max_once();
|
|
@@ -647,7 +647,7 @@ class $4ce764ddfee055ef$export$1b28bc5c68cc4d77 extends EventTarget {
|
|
|
647
647
|
#max_fails = 10;
|
|
648
648
|
#max_backoff_ms = $4ce764ddfee055ef$var$ONE_MINUTE;
|
|
649
649
|
get #initial_reconnect_delay() {
|
|
650
|
-
return
|
|
650
|
+
return $d89638655e64f324$export$bb0a9c36cf454ea0(1, 1000);
|
|
651
651
|
}
|
|
652
652
|
#connect() {
|
|
653
653
|
this.current_socket = typeof window === "object" || typeof WebSocket === "function" ? new WebSocket(...this.#ws_constructor_options) : {
|
|
@@ -656,7 +656,7 @@ class $4ce764ddfee055ef$export$1b28bc5c68cc4d77 extends EventTarget {
|
|
|
656
656
|
send: () => {}
|
|
657
657
|
};
|
|
658
658
|
this.#possible_events.forEach(name => {
|
|
659
|
-
this.current_socket.addEventListener(name,
|
|
659
|
+
this.current_socket.addEventListener(name, $b04e44fad5ea42c7$export$b3bbfd758f11cfa9(original_event => {
|
|
660
660
|
let fixed_event;
|
|
661
661
|
if (!(original_event instanceof Event)) {
|
|
662
662
|
// Node - the WS class uses a predecessor of EventTarget and doesn't fire actual events, which we need for dispatchEvent since we're an EventTarget
|
|
@@ -699,7 +699,7 @@ class $4ce764ddfee055ef$export$1b28bc5c68cc4d77 extends EventTarget {
|
|
|
699
699
|
this.addEventListener(ev, e => {
|
|
700
700
|
// e can be MessageEvent | CloseEvent | ErrorEvent I think
|
|
701
701
|
const on_fn = this.#ons[ev];
|
|
702
|
-
if (typeof on_fn === "function")
|
|
702
|
+
if (typeof on_fn === "function") $b04e44fad5ea42c7$export$b3bbfd758f11cfa9(on_fn).call(ev, e);
|
|
703
703
|
});
|
|
704
704
|
}
|
|
705
705
|
}
|
|
@@ -715,10 +715,10 @@ class $4ce764ddfee055ef$export$1b28bc5c68cc4d77 extends EventTarget {
|
|
|
715
715
|
// 4100 means server thinks this is a scraper bot that's ignoring robots.txt
|
|
716
716
|
// @ts-ignore
|
|
717
717
|
if (error?.code === 4100) {
|
|
718
|
-
|
|
718
|
+
$649f456f663da9fc$export$de56f1198d121036("Websocket connection rejected by server, won't reconnect", error);
|
|
719
719
|
return;
|
|
720
720
|
}
|
|
721
|
-
|
|
721
|
+
$649f456f663da9fc$export$de56f1198d121036("Somehow the websocket died", error, "message:",
|
|
722
722
|
// @ts-ignore
|
|
723
723
|
error?.message, "code:",
|
|
724
724
|
// @ts-ignore
|
|
@@ -727,15 +727,15 @@ class $4ce764ddfee055ef$export$1b28bc5c68cc4d77 extends EventTarget {
|
|
|
727
727
|
error?.reason, "reconnecting in", this.#try_again_in_ms);
|
|
728
728
|
await new Promise(r => {
|
|
729
729
|
// "race" the timeout and getting an https://developer.mozilla.org/en-US/docs/Web/API/Window/online_event by the browser
|
|
730
|
-
const handler =
|
|
730
|
+
const handler = $b04e44fad5ea42c7$export$b3bbfd758f11cfa9(ev => {
|
|
731
731
|
r();
|
|
732
|
-
|
|
732
|
+
$649f456f663da9fc$export$de56f1198d121036("Retrying due to 'online' event", ev);
|
|
733
733
|
clearTimeout(timeout);
|
|
734
734
|
});
|
|
735
735
|
window.addEventListener("online", handler, {
|
|
736
736
|
once: true
|
|
737
737
|
});
|
|
738
|
-
const timeout = setTimeout(
|
|
738
|
+
const timeout = setTimeout($b04e44fad5ea42c7$export$b3bbfd758f11cfa9(() => {
|
|
739
739
|
this.#try_again_in_ms *= 1.5 + Math.random();
|
|
740
740
|
if (this.#try_again_in_ms > this.#max_backoff_ms) this.#try_again_in_ms = this.#max_backoff_ms * (1 + Math.random() / 10);
|
|
741
741
|
r();
|
|
@@ -764,9 +764,9 @@ class $4ce764ddfee055ef$export$1b28bc5c68cc4d77 extends EventTarget {
|
|
|
764
764
|
if (max_backoff_ms) this.#max_backoff_ms = max_backoff_ms;
|
|
765
765
|
this.#setup_dot_on_event_support();
|
|
766
766
|
this.#connect();
|
|
767
|
-
this.#ensure_connection().catch(e =>
|
|
768
|
-
this.addEventListener("open",
|
|
769
|
-
|
|
767
|
+
this.#ensure_connection().catch(e => $b04e44fad5ea42c7$export$f18d5b0af29128b7(e, "error"));
|
|
768
|
+
this.addEventListener("open", $b04e44fad5ea42c7$export$b3bbfd758f11cfa9(() => {
|
|
769
|
+
$649f456f663da9fc$export$de56f1198d121036("Connection opened");
|
|
770
770
|
this.#try_again_in_ms = this.#initial_reconnect_delay; // reset exponential backoff
|
|
771
771
|
}));
|
|
772
772
|
}
|
|
@@ -787,14 +787,14 @@ class $4ce764ddfee055ef$export$1d9c6fddbff3441f extends $4ce764ddfee055ef$export
|
|
|
787
787
|
});
|
|
788
788
|
this.send(msg);
|
|
789
789
|
}
|
|
790
|
-
#start_reconnection_if_offline_process =
|
|
791
|
-
await new Promise(r => setTimeout(r, this.#reconnect_if_dead_for_ms +
|
|
790
|
+
#start_reconnection_if_offline_process = $511123bb28a7b6f7$export$535946eb77c946dd(async () => {
|
|
791
|
+
await new Promise(r => setTimeout(r, this.#reconnect_if_dead_for_ms + $d89638655e64f324$export$bb0a9c36cf454ea0(-2, 10)));
|
|
792
792
|
// so if we are trying to send something and there's no activity ("error" which could mean the server is down or message or reconnection) we can safely assume that the internet connection is down. In that case we skip the exponential backoff since we want to know when we're connected again ASAP and just retry every like 20s
|
|
793
793
|
if (this.#messages_queued === 0) return;
|
|
794
794
|
const now = +new Date();
|
|
795
795
|
if (now - this.#connection_last_active > this.#reconnect_if_dead_for_ms) {
|
|
796
796
|
const reason = `No activity in ${this.#reconnect_if_dead_for_ms} ms`;
|
|
797
|
-
|
|
797
|
+
$649f456f663da9fc$export$de56f1198d121036(reason, "reconnecting ws");
|
|
798
798
|
this.restart_ws(reason);
|
|
799
799
|
}
|
|
800
800
|
});
|
|
@@ -814,7 +814,7 @@ class $4ce764ddfee055ef$export$1d9c6fddbff3441f extends $4ce764ddfee055ef$export
|
|
|
814
814
|
// wait the correct delay
|
|
815
815
|
const resend_due_to_lost_message_timeout = setTimeout(
|
|
816
816
|
// this might actually never be needed and be from when Daniel didn't understand WebSockets as well
|
|
817
|
-
|
|
817
|
+
$b04e44fad5ea42c7$export$b3bbfd758f11cfa9(() => {
|
|
818
818
|
r(true);
|
|
819
819
|
this.removeEventListener("open", handler);
|
|
820
820
|
}), delay_to_next_send);
|
|
@@ -832,7 +832,7 @@ class $4ce764ddfee055ef$export$1d9c6fddbff3441f extends $4ce764ddfee055ef$export
|
|
|
832
832
|
this.increase_fails();
|
|
833
833
|
}
|
|
834
834
|
this.#messages_queued--;
|
|
835
|
-
})().catch(e =>
|
|
835
|
+
})().catch(e => $b04e44fad5ea42c7$export$f18d5b0af29128b7(e, "error"));
|
|
836
836
|
return () => quit = true;
|
|
837
837
|
}
|
|
838
838
|
async ensure_sent(payload) {
|
|
@@ -847,8 +847,8 @@ class $4ce764ddfee055ef$export$1d9c6fddbff3441f extends $4ce764ddfee055ef$export
|
|
|
847
847
|
reply = JSON.parse(data);
|
|
848
848
|
} catch (e) {
|
|
849
849
|
const msg = "Got malformed message (ignoring, might cause memory leak)";
|
|
850
|
-
|
|
851
|
-
|
|
850
|
+
$649f456f663da9fc$export$de56f1198d121036(msg, data, e);
|
|
851
|
+
$b04e44fad5ea42c7$export$f18d5b0af29128b7([e, msg], "error", {
|
|
852
852
|
data: data
|
|
853
853
|
});
|
|
854
854
|
continue;
|
|
@@ -860,9 +860,9 @@ class $4ce764ddfee055ef$export$1d9c6fddbff3441f extends $4ce764ddfee055ef$export
|
|
|
860
860
|
if (status == "ack") {
|
|
861
861
|
stop_sending();
|
|
862
862
|
continue;
|
|
863
|
-
} else if (status == "not-ok")
|
|
864
|
-
if (process.env.BUILD_TARGET !== "node")
|
|
865
|
-
} else
|
|
863
|
+
} else if (status == "not-ok") $649f456f663da9fc$export$c2363754d4758444("Got reply not-ok reply from server for event!", payload, reply);else if (status == "ok") {
|
|
864
|
+
if (process.env.BUILD_TARGET !== "node") $649f456f663da9fc$export$de56f1198d121036(`Successfully sent ${payload?.event?.type} (WS)`, payload, reply);
|
|
865
|
+
} else $649f456f663da9fc$export$c2363754d4758444("Strange reply from WSS server to", payload, ":", reply);
|
|
866
866
|
stop_sending();
|
|
867
867
|
return [reply, data];
|
|
868
868
|
}
|
|
@@ -872,8 +872,8 @@ class $4ce764ddfee055ef$export$1d9c6fddbff3441f extends $4ce764ddfee055ef$export
|
|
|
872
872
|
super(...params);
|
|
873
873
|
const option_retry_ms = params[2]?.initial_retry_ms;
|
|
874
874
|
if (option_retry_ms) this.#initial_retry_ms = option_retry_ms;
|
|
875
|
-
this.addEventListener("message",
|
|
876
|
-
["open", "error", "message"].forEach(event => this.addEventListener(event,
|
|
875
|
+
this.addEventListener("message", $b04e44fad5ea42c7$export$b3bbfd758f11cfa9(this.#msg_ipns.resolve));
|
|
876
|
+
["open", "error", "message"].forEach(event => this.addEventListener(event, $b04e44fad5ea42c7$export$b3bbfd758f11cfa9(() => this.#connection_last_active = +new Date())));
|
|
877
877
|
}
|
|
878
878
|
}
|
|
879
879
|
|
|
@@ -898,17 +898,17 @@ const $cafa1ff1049985c2$export$72036d950e1fae95 = /*@__PURE__*/$cafa1ff1049985c2
|
|
|
898
898
|
const $cafa1ff1049985c2$export$aa26019042811d4f = /*@__PURE__*/$cafa1ff1049985c2$var$c(async bodies => {
|
|
899
899
|
if (process.env.DEPICT === "false") return;
|
|
900
900
|
for (let i = 0; i < bodies.length; i++) {
|
|
901
|
-
const id =
|
|
901
|
+
const id = $460df8550f9d084d$export$656831b7e9c341c3();
|
|
902
902
|
$cafa1ff1049985c2$var$ws_instance?.ensure_sent({
|
|
903
903
|
id: id,
|
|
904
904
|
event: bodies[i]
|
|
905
|
-
}).catch(e =>
|
|
905
|
+
}).catch(e => $b04e44fad5ea42c7$export$f18d5b0af29128b7(e, "error"));
|
|
906
906
|
}
|
|
907
907
|
});
|
|
908
908
|
const $cafa1ff1049985c2$export$608478473a3304a0 = /*@__PURE__*/$cafa1ff1049985c2$var$c((payload, use_ws = true) => {
|
|
909
909
|
if (process.env.DEPICT === "false") return;
|
|
910
910
|
if (use_ws && typeof WebSocket == "function" && typeof $cafa1ff1049985c2$var$ws_instance?.ensure_sent == "function") {
|
|
911
|
-
|
|
911
|
+
$649f456f663da9fc$export$de56f1198d121036("Sending to depict (ws)", payload);
|
|
912
912
|
return $cafa1ff1049985c2$export$aa26019042811d4f(payload);
|
|
913
913
|
}
|
|
914
914
|
const url = (0, $6c2b49f3f564b0d1$export$362abebb4b313340) + "/create-events";
|
|
@@ -917,19 +917,19 @@ const $cafa1ff1049985c2$export$608478473a3304a0 = /*@__PURE__*/$cafa1ff1049985c2
|
|
|
917
917
|
const $cafa1ff1049985c2$export$cc3b6ddf805f6156 = /*@__PURE__*/$cafa1ff1049985c2$var$c((url, payload) => {
|
|
918
918
|
const payload_json = JSON.stringify(payload);
|
|
919
919
|
let success = false;
|
|
920
|
-
|
|
920
|
+
$649f456f663da9fc$export$de56f1198d121036(`Attempting to send (beacon)`, payload);
|
|
921
921
|
try {
|
|
922
922
|
success = navigator.sendBeacon(url, new Blob([payload_json], {
|
|
923
923
|
type: "application/json"
|
|
924
924
|
}));
|
|
925
925
|
} catch (first_error) {
|
|
926
|
-
|
|
926
|
+
$649f456f663da9fc$export$de56f1198d121036("Beacon has failed", first_error, "falling back to sending with wrong mime type which might work");
|
|
927
927
|
try {
|
|
928
928
|
success = navigator.sendBeacon(url, new Blob([payload_json], {
|
|
929
929
|
type: "application/x-www-form-urlencoded"
|
|
930
930
|
}));
|
|
931
931
|
} catch (e) {
|
|
932
|
-
|
|
932
|
+
$649f456f663da9fc$export$de56f1198d121036("Beacon fallback has failed", e, "trying fetch");
|
|
933
933
|
fetch(url, {
|
|
934
934
|
"headers": {
|
|
935
935
|
"content-type": "application/json"
|
|
@@ -938,7 +938,7 @@ const $cafa1ff1049985c2$export$cc3b6ddf805f6156 = /*@__PURE__*/$cafa1ff1049985c2
|
|
|
938
938
|
"method": "POST",
|
|
939
939
|
"mode": "cors",
|
|
940
940
|
"credentials": "include"
|
|
941
|
-
}).then(response => response.text()).then(text =>
|
|
941
|
+
}).then(response => response.text()).then(text => $649f456f663da9fc$export$de56f1198d121036("Beacon fallback fallback transmission result", text)).catch(fetch_error => {
|
|
942
942
|
(0, $eba382943196079c$export$af2e17a20c2ea3c5).withScope(function (scope) {
|
|
943
943
|
scope.setExtra("stack", new Error().stack);
|
|
944
944
|
scope.setExtra("url", url);
|
|
@@ -967,9 +967,9 @@ let $43683b1103edab15$export$6399bdb2291895e0 = () => {
|
|
|
967
967
|
let localstorage_error;
|
|
968
968
|
let cookie_error;
|
|
969
969
|
try {
|
|
970
|
-
id = localStorage._dep_id ||=
|
|
970
|
+
id = localStorage._dep_id ||= $460df8550f9d084d$export$656831b7e9c341c3();
|
|
971
971
|
} catch (e) {
|
|
972
|
-
|
|
972
|
+
$649f456f663da9fc$export$de56f1198d121036("Can't use localStorage", e);
|
|
973
973
|
localstorage_error = e;
|
|
974
974
|
}
|
|
975
975
|
if (!id) {
|
|
@@ -982,11 +982,11 @@ let $43683b1103edab15$export$6399bdb2291895e0 = () => {
|
|
|
982
982
|
}, {})._dep_id;
|
|
983
983
|
id = get_cookie_id();
|
|
984
984
|
if (!id) {
|
|
985
|
-
document.cookie = `_dep_id=${
|
|
985
|
+
document.cookie = `_dep_id=${$460df8550f9d084d$export$656831b7e9c341c3()}; expires=Fri, 31 Dec 9999 23:59:59 GMT`;
|
|
986
986
|
id = get_cookie_id();
|
|
987
987
|
}
|
|
988
988
|
} catch (e) {
|
|
989
|
-
|
|
989
|
+
$b04e44fad5ea42c7$export$f18d5b0af29128b7(e, "warning");
|
|
990
990
|
cookie_error = e;
|
|
991
991
|
}
|
|
992
992
|
(0, $eba382943196079c$export$af2e17a20c2ea3c5).withScope(function (scope) {
|
|
@@ -997,14 +997,14 @@ let $43683b1103edab15$export$6399bdb2291895e0 = () => {
|
|
|
997
997
|
this.captureMessage(`${id ? "localStorage" : "cookie and localStorage"} failed to hold a value!`);
|
|
998
998
|
});
|
|
999
999
|
}
|
|
1000
|
-
if (!id) id =
|
|
1000
|
+
if (!id) id = $460df8550f9d084d$export$656831b7e9c341c3();
|
|
1001
1001
|
return id;
|
|
1002
1002
|
};
|
|
1003
1003
|
let $43683b1103edab15$export$adc61a405a4cabed = $43683b1103edab15$export$6399bdb2291895e0;
|
|
1004
1004
|
let $43683b1103edab15$export$61e7e1f11e96692f = () => undefined;
|
|
1005
|
-
const $43683b1103edab15$export$336e7ad40bae0652 = /*@__PURE__
|
|
1006
|
-
const $43683b1103edab15$export$8a96793bf9f87d90 = /*@__PURE__
|
|
1007
|
-
const $43683b1103edab15$export$93ae15b1ae509334 = /*@__PURE__
|
|
1005
|
+
const $43683b1103edab15$export$336e7ad40bae0652 = /*@__PURE__*/$b04e44fad5ea42c7$export$b3bbfd758f11cfa9(newfn => $43683b1103edab15$export$6399bdb2291895e0 = newfn);
|
|
1006
|
+
const $43683b1103edab15$export$8a96793bf9f87d90 = /*@__PURE__*/$b04e44fad5ea42c7$export$b3bbfd758f11cfa9(newfn => $43683b1103edab15$export$adc61a405a4cabed = newfn);
|
|
1007
|
+
const $43683b1103edab15$export$93ae15b1ae509334 = /*@__PURE__*/$b04e44fad5ea42c7$export$b3bbfd758f11cfa9(newfn => $43683b1103edab15$export$61e7e1f11e96692f = newfn);
|
|
1008
1008
|
const $43683b1103edab15$export$8c6f26a5b6921b95 = /*@__PURE__*/() => {
|
|
1009
1009
|
return {
|
|
1010
1010
|
session_id: $43683b1103edab15$export$61e7e1f11e96692f(),
|
|
@@ -1015,7 +1015,7 @@ const $43683b1103edab15$export$8c6f26a5b6921b95 = /*@__PURE__*/() => {
|
|
|
1015
1015
|
document_referrer: document?.referrer
|
|
1016
1016
|
};
|
|
1017
1017
|
};
|
|
1018
|
-
const $43683b1103edab15$export$82badda1f9923310 = /*@__PURE__
|
|
1018
|
+
const $43683b1103edab15$export$82badda1f9923310 = /*@__PURE__*/$b04e44fad5ea42c7$export$b3bbfd758f11cfa9((vars, use_ws) => {
|
|
1019
1019
|
if (process.env.DEPICT === "false") return;
|
|
1020
1020
|
const payload = [{
|
|
1021
1021
|
...$43683b1103edab15$export$8c6f26a5b6921b95(),
|
|
@@ -1025,9 +1025,9 @@ const $43683b1103edab15$export$82badda1f9923310 = /*@__PURE__*/(0, $b04e44fad5ea
|
|
|
1025
1025
|
entity_price: vars?.sale_price,
|
|
1026
1026
|
...vars
|
|
1027
1027
|
}];
|
|
1028
|
-
return
|
|
1028
|
+
return $cafa1ff1049985c2$export$28cacbd9b4306ffc(payload, use_ws);
|
|
1029
1029
|
});
|
|
1030
|
-
const $43683b1103edab15$export$15f8a0cd5a8c0ebb = /*@__PURE__
|
|
1030
|
+
const $43683b1103edab15$export$15f8a0cd5a8c0ebb = /*@__PURE__*/$b04e44fad5ea42c7$export$b3bbfd758f11cfa9(vars => {
|
|
1031
1031
|
if (process.env.DEPICT === "false") return;
|
|
1032
1032
|
const beacon_retval = $43683b1103edab15$export$82badda1f9923310({
|
|
1033
1033
|
...vars,
|
|
@@ -1043,7 +1043,7 @@ const $43683b1103edab15$export$15f8a0cd5a8c0ebb = /*@__PURE__*/(0, $b04e44fad5ea
|
|
|
1043
1043
|
|
|
1044
1044
|
return beacon_retval;
|
|
1045
1045
|
});
|
|
1046
|
-
const $43683b1103edab15$export$9028351cb994757e = /*@__PURE__
|
|
1046
|
+
const $43683b1103edab15$export$9028351cb994757e = /*@__PURE__*/$b04e44fad5ea42c7$export$b3bbfd758f11cfa9(vars => {
|
|
1047
1047
|
if (process.env.DEPICT === "false") return;
|
|
1048
1048
|
return $43683b1103edab15$export$82badda1f9923310({
|
|
1049
1049
|
...vars,
|
|
@@ -1057,7 +1057,7 @@ function $43683b1103edab15$export$622991c71a1f52b3(cookie_name) {
|
|
|
1057
1057
|
function $9e268c1aeeb86b34$export$c50e1901e8ed0615(callback) {
|
|
1058
1058
|
// https://stackoverflow.com/a/61574326
|
|
1059
1059
|
const channel = new MessageChannel();
|
|
1060
|
-
channel.port1.onmessage =
|
|
1060
|
+
channel.port1.onmessage = $b04e44fad5ea42c7$export$b3bbfd758f11cfa9(callback);
|
|
1061
1061
|
channel.port2.postMessage("");
|
|
1062
1062
|
}
|
|
1063
1063
|
function $f809bc98a1cb5f92$export$6f051469dd676a8b(tenant, market, type) {
|
|
@@ -1067,11 +1067,11 @@ function $f809bc98a1cb5f92$export$6f051469dd676a8b(tenant, market, type) {
|
|
|
1067
1067
|
if (!display) return;
|
|
1068
1068
|
info.set_on_index_change(() => {
|
|
1069
1069
|
current_displays.add(display);
|
|
1070
|
-
|
|
1070
|
+
$qgKv4$onCleanup(() => current_displays.delete(display));
|
|
1071
1071
|
if (!queued_sending) {
|
|
1072
1072
|
queued_sending = true;
|
|
1073
|
-
|
|
1074
|
-
|
|
1073
|
+
$9e268c1aeeb86b34$export$c50e1901e8ed0615(() => {
|
|
1074
|
+
$43683b1103edab15$export$82badda1f9923310({
|
|
1075
1075
|
tenant: tenant,
|
|
1076
1076
|
market: market,
|
|
1077
1077
|
recommendation_type: type,
|
|
@@ -1092,7 +1092,7 @@ function $a1c80794e6bf4cc2$export$6e7454c733fa1fb2(fn, ...args) {
|
|
|
1092
1092
|
return fn.apply(this, [...args, ...unimportant_args]);
|
|
1093
1093
|
};
|
|
1094
1094
|
}
|
|
1095
|
-
const $66b898e9bfcef532$export$8582cf3716962dc2 = /*@__PURE__
|
|
1095
|
+
const $66b898e9bfcef532$export$8582cf3716962dc2 = /*@__PURE__*/$b04e44fad5ea42c7$export$b3bbfd758f11cfa9(async ({
|
|
1096
1096
|
recs: recs,
|
|
1097
1097
|
min_recs: min_recs,
|
|
1098
1098
|
market: market,
|
|
@@ -1109,11 +1109,11 @@ const $66b898e9bfcef532$export$8582cf3716962dc2 = /*@__PURE__*/(0, $b04e44fad5ea
|
|
|
1109
1109
|
if (Array.isArray(recs)) {
|
|
1110
1110
|
if (min_recs == undefined) min_recs = 10;
|
|
1111
1111
|
if (recs.length < min_recs) {
|
|
1112
|
-
|
|
1112
|
+
$649f456f663da9fc$export$c2363754d4758444("Displays provided to check_displays is too short, it contains", recs.length, "displays which is less than", min_recs);
|
|
1113
1113
|
return false;
|
|
1114
1114
|
} else return true;
|
|
1115
|
-
} else
|
|
1116
|
-
} else
|
|
1115
|
+
} else $649f456f663da9fc$export$c2363754d4758444(new Error("neither recs nor recs.displays are an array"));
|
|
1116
|
+
} else $649f456f663da9fc$export$c2363754d4758444(new Error("Non object was passed to check_displays"));
|
|
1117
1117
|
});
|
|
1118
1118
|
const $b55a70757989faf4$var$elem_track_id_map = /*@__PURE__*/new WeakMap();
|
|
1119
1119
|
function $b55a70757989faf4$export$16d7c76794a38a4(element, event, track_id, func) {
|
|
@@ -1159,7 +1159,7 @@ function $39ef887981612535$var$check_if_querySelectorAll_needs_patching() {
|
|
|
1159
1159
|
}
|
|
1160
1160
|
let $8be08add28592faf$var$has_queued_microtask = false;
|
|
1161
1161
|
const $8be08add28592faf$var$queued_callbacks = /*@__PURE__*/new Map();
|
|
1162
|
-
const $8be08add28592faf$var$catchified_deduplicate_and_dispatch = /*@__PURE__
|
|
1162
|
+
const $8be08add28592faf$var$catchified_deduplicate_and_dispatch = /*@__PURE__*/$b04e44fad5ea42c7$export$b3bbfd758f11cfa9($8be08add28592faf$var$deduplicate_and_dispatch, "error in observer event processing", "error");
|
|
1163
1163
|
function $8be08add28592faf$export$2b08e30396270f0b(callback, ev) {
|
|
1164
1164
|
$8be08add28592faf$var$queued_callbacks.set(ev, callback);
|
|
1165
1165
|
if (!$8be08add28592faf$var$has_queued_microtask) queueMicrotask($8be08add28592faf$var$catchified_deduplicate_and_dispatch);
|
|
@@ -1204,7 +1204,7 @@ function $8be08add28592faf$var$deduplicate_and_dispatch() {
|
|
|
1204
1204
|
}
|
|
1205
1205
|
}
|
|
1206
1206
|
function $8be08add28592faf$var$call_callback(callback, ev) {
|
|
1207
|
-
|
|
1207
|
+
$b04e44fad5ea42c7$export$b3bbfd758f11cfa9(callback, "Error in observer callback")(ev);
|
|
1208
1208
|
}
|
|
1209
1209
|
class $cb50cd7a49e824ee$export$ea60432919e69303 {
|
|
1210
1210
|
constructor(opts) {
|
|
@@ -1224,7 +1224,7 @@ class $cdca9fea6eb103e5$export$12e07a2a9f87578a {
|
|
|
1224
1224
|
#attribute_attribution_map_object = {};
|
|
1225
1225
|
#territory;
|
|
1226
1226
|
#listeners = ["exists", "creation", "removed", "change"];
|
|
1227
|
-
#weakref_finalization_registry = typeof FinalizationRegistry === "function" && new FinalizationRegistry(
|
|
1227
|
+
#weakref_finalization_registry = typeof FinalizationRegistry === "function" && new FinalizationRegistry($b04e44fad5ea42c7$export$b3bbfd758f11cfa9(this.#finalization_registry_callback.bind(this)));
|
|
1228
1228
|
#verbs = {
|
|
1229
1229
|
// add "normal" functions for the class that can be used as i.e. observer.ifexists() here
|
|
1230
1230
|
ifexists: (selector, callback) => {
|
|
@@ -1245,7 +1245,7 @@ class $cdca9fea6eb103e5$export$12e07a2a9f87578a {
|
|
|
1245
1245
|
return;
|
|
1246
1246
|
}
|
|
1247
1247
|
const our_set = this.#attribute_attribution_map_object[selector] ||= new WeakSet();
|
|
1248
|
-
const elements = typeof document === "undefined" ? [] :
|
|
1248
|
+
const elements = typeof document === "undefined" ? [] : $39ef887981612535$export$33f937d741e49339(this.#territory || document, selector);
|
|
1249
1249
|
for (let i = 0; i < elements.length; i++) {
|
|
1250
1250
|
const element = elements[i];
|
|
1251
1251
|
our_set.add(element);
|
|
@@ -1266,7 +1266,7 @@ class $cdca9fea6eb103e5$export$12e07a2a9f87578a {
|
|
|
1266
1266
|
wait_for_listener: (listener, selector, timeout) => {
|
|
1267
1267
|
this.#check_observer_args(listener, () => {}, false);
|
|
1268
1268
|
// console.log("waiting for listener", listener, "selector", selector, "timeout", timeout);
|
|
1269
|
-
return new Promise(
|
|
1269
|
+
return new Promise($b04e44fad5ea42c7$export$b3bbfd758f11cfa9(r => {
|
|
1270
1270
|
const stop_observing = this.#self_proxied["on" + listener](selector, ({
|
|
1271
1271
|
element: element,
|
|
1272
1272
|
disconnector: disconnector
|
|
@@ -1429,7 +1429,7 @@ class $cdca9fea6eb103e5$export$12e07a2a9f87578a {
|
|
|
1429
1429
|
if ((addedNodes.length || removedNodes.length) && node.hasChildNodes() &&
|
|
1430
1430
|
// @ts-ignore
|
|
1431
1431
|
node.querySelectorAll /* don't act on i.e. textnodes. Doing the check this way is actually faster than both `in` and instanceof */) {
|
|
1432
|
-
const matching_children =
|
|
1432
|
+
const matching_children = $39ef887981612535$export$33f937d741e49339(node, selector);
|
|
1433
1433
|
for (let m = 0; m < matching_children.length; m++) {
|
|
1434
1434
|
// always use for loops because this can't be slow and forEach takes ages
|
|
1435
1435
|
if (event == "exists") our_set.add(matching_children[m]);
|
|
@@ -1495,7 +1495,7 @@ class $cdca9fea6eb103e5$export$12e07a2a9f87578a {
|
|
|
1495
1495
|
const matching_nodes = [];
|
|
1496
1496
|
// @ts-ignore
|
|
1497
1497
|
if (node?.matches?.(selector)) matching_nodes.push(node);
|
|
1498
|
-
matching_nodes.push(...(
|
|
1498
|
+
matching_nodes.push(...($39ef887981612535$export$33f937d741e49339(node, selector) || []));
|
|
1499
1499
|
for (let v = 0; v < matching_nodes.length; v++) this.#call_callbacks(callbacks, callback => ({
|
|
1500
1500
|
element_: matching_nodes[v],
|
|
1501
1501
|
selector_: selector,
|
|
@@ -1539,14 +1539,14 @@ class $cdca9fea6eb103e5$export$12e07a2a9f87578a {
|
|
|
1539
1539
|
for (let i = 0; i < execute_after_run.length; i++) try {
|
|
1540
1540
|
execute_after_run[i]();
|
|
1541
1541
|
} catch (e) {
|
|
1542
|
-
|
|
1542
|
+
$b04e44fad5ea42c7$export$f18d5b0af29128b7([e, "error in observer running queued function"], "error");
|
|
1543
1543
|
}
|
|
1544
1544
|
// Let the garbage collector empty the old array by creating a new one
|
|
1545
1545
|
this.#execute_after_callback_ran = [];
|
|
1546
1546
|
this.#observer_callback_running = false;
|
|
1547
1547
|
}
|
|
1548
1548
|
} catch (e) {
|
|
1549
|
-
|
|
1549
|
+
$b04e44fad5ea42c7$export$f18d5b0af29128b7([e, "error in observer"], "error");
|
|
1550
1550
|
}
|
|
1551
1551
|
};
|
|
1552
1552
|
#check_observer_args(selector, callback, allow_nodes) {
|
|
@@ -1561,7 +1561,7 @@ class $cdca9fea6eb103e5$export$12e07a2a9f87578a {
|
|
|
1561
1561
|
// We are probably running on the server where we can't do anything anyway so we might just return
|
|
1562
1562
|
return;
|
|
1563
1563
|
if (!listener || !selector || !callback) {
|
|
1564
|
-
|
|
1564
|
+
$649f456f663da9fc$export$de56f1198d121036("listener, selector or callback is falsey", {
|
|
1565
1565
|
listener: listener,
|
|
1566
1566
|
selector: selector,
|
|
1567
1567
|
callback: callback
|
|
@@ -1650,7 +1650,7 @@ class $cdca9fea6eb103e5$export$12e07a2a9f87578a {
|
|
|
1650
1650
|
}
|
|
1651
1651
|
}
|
|
1652
1652
|
#call_callbacks(callbacks, make_ev_data) {
|
|
1653
|
-
for (const callback of callbacks)
|
|
1653
|
+
for (const callback of callbacks) $8be08add28592faf$export$2b08e30396270f0b(callback, new (0, $cb50cd7a49e824ee$export$ea60432919e69303)(make_ev_data(callback)));
|
|
1654
1654
|
}
|
|
1655
1655
|
#get(target, verb) {
|
|
1656
1656
|
// @ts-ignore
|
|
@@ -1674,7 +1674,7 @@ function $0b48ba2f40ce6067$var$make_default_observer() {
|
|
|
1674
1674
|
try {
|
|
1675
1675
|
return new (0, $cdca9fea6eb103e5$export$12e07a2a9f87578a)();
|
|
1676
1676
|
} catch (error) {
|
|
1677
|
-
|
|
1677
|
+
$b04e44fad5ea42c7$export$f18d5b0af29128b7([error, "error starting ElementObserver"], "error");
|
|
1678
1678
|
}
|
|
1679
1679
|
}
|
|
1680
1680
|
function $0bdb8dbcf1bc7f34$export$925772df9b4d16e5(url, param, value) {
|
|
@@ -1700,22 +1700,22 @@ function $0bdb8dbcf1bc7f34$export$d3e2a0560cbf4787(html) {
|
|
|
1700
1700
|
}
|
|
1701
1701
|
function $0bdb8dbcf1bc7f34$export$d4bd03f19260ef1c(url, also_onchange = false, override_dev_url = "demo.depict.ai", stfu = true, also_in_all_shadow_roots = false) {
|
|
1702
1702
|
if (process.env.DEBUG === "true" && location.href.includes(override_dev_url)) {
|
|
1703
|
-
const relativ_callback =
|
|
1703
|
+
const relativ_callback = $b04e44fad5ea42c7$export$b3bbfd758f11cfa9(event => {
|
|
1704
1704
|
const anchor = event.element;
|
|
1705
1705
|
if (typeof url === "string") {
|
|
1706
1706
|
if (anchor.href.includes(url)) {
|
|
1707
|
-
if (!stfu)
|
|
1707
|
+
if (!stfu) $649f456f663da9fc$export$de56f1198d121036("RUNNING RELATIVIFY on", event);
|
|
1708
1708
|
anchor.href = anchor.href.replaceAll(url, "/");
|
|
1709
1709
|
}
|
|
1710
1710
|
} else if (url.test(anchor.href)) {
|
|
1711
|
-
if (!stfu)
|
|
1711
|
+
if (!stfu) $649f456f663da9fc$export$de56f1198d121036("RUNNING RELATIVIFY on", event);
|
|
1712
1712
|
anchor.href = anchor.href.replace(url, "/");
|
|
1713
1713
|
}
|
|
1714
1714
|
});
|
|
1715
1715
|
const link_sel = "a[href]";
|
|
1716
1716
|
(0, $0b48ba2f40ce6067$export$b6ae1bc530f4c149).onexists(link_sel, relativ_callback);
|
|
1717
1717
|
if (also_onchange) (0, $0b48ba2f40ce6067$export$b6ae1bc530f4c149).onchange(link_sel, relativ_callback);
|
|
1718
|
-
if (also_in_all_shadow_roots && typeof ShadowRoot == "function") (0, $0b48ba2f40ce6067$export$b6ae1bc530f4c149).onexists("*",
|
|
1718
|
+
if (also_in_all_shadow_roots && typeof ShadowRoot == "function") (0, $0b48ba2f40ce6067$export$b6ae1bc530f4c149).onexists("*", $b04e44fad5ea42c7$export$b3bbfd758f11cfa9(({
|
|
1719
1719
|
element: element
|
|
1720
1720
|
}) => {
|
|
1721
1721
|
if (element?.shadowRoot instanceof ShadowRoot) {
|
|
@@ -1730,7 +1730,7 @@ function $0bdb8dbcf1bc7f34$export$d4bd03f19260ef1c(url, also_onchange = false, o
|
|
|
1730
1730
|
function $0bdb8dbcf1bc7f34$export$5e63aea0cac01fa0(elements, selector) {
|
|
1731
1731
|
const matches = [];
|
|
1732
1732
|
for (const element of elements) {
|
|
1733
|
-
if ("querySelectorAll" in element) matches.push(
|
|
1733
|
+
if ("querySelectorAll" in element) matches.push(...$39ef887981612535$export$33f937d741e49339(element, selector));
|
|
1734
1734
|
if ("matches" in element && element.matches?.(selector)) matches.push(element);
|
|
1735
1735
|
}
|
|
1736
1736
|
return matches;
|
|
@@ -1740,18 +1740,21 @@ function $0bdb8dbcf1bc7f34$export$cfef5d5c9ac09253(price, places_after_comma = 2
|
|
|
1740
1740
|
if (!price && price !== 0) return "";
|
|
1741
1741
|
if (typeof price === "string") {
|
|
1742
1742
|
if (!isNaN(price)) {
|
|
1743
|
-
|
|
1743
|
+
$b04e44fad5ea42c7$export$f18d5b0af29128b7(new Error("standard_price_format did not expect price as a string"), "warning", {
|
|
1744
1744
|
price: price
|
|
1745
1745
|
});
|
|
1746
1746
|
price = parseFloat(price);
|
|
1747
1747
|
} else {
|
|
1748
|
-
|
|
1748
|
+
$b04e44fad5ea42c7$export$f18d5b0af29128b7(new Error("standard_price_format cannot handle price string"), "error", {
|
|
1749
1749
|
price: price
|
|
1750
1750
|
});
|
|
1751
1751
|
return "";
|
|
1752
1752
|
}
|
|
1753
1753
|
}
|
|
1754
1754
|
if (places_after_comma == "auto") places_after_comma = price % 1 ? 2 : 0;
|
|
1755
|
+
// Generalized rounding for any value of places_after_comma.
|
|
1756
|
+
const multiplier = Math.pow(10, places_after_comma);
|
|
1757
|
+
price = Math.round(price * multiplier) / multiplier;
|
|
1755
1758
|
const fixed = places_after_comma < 0 ? price.toString().split(".") : price.toFixed(places_after_comma).split("."),
|
|
1756
1759
|
[...chars] = fixed[0],
|
|
1757
1760
|
reversed = chars.reverse();
|
|
@@ -1781,14 +1784,14 @@ function $bb3252f70898acd6$export$947a20746936143d(promises) {
|
|
|
1781
1784
|
async function $61b3c9e5f2cf8171$export$836f70a28c317905(product_id) {
|
|
1782
1785
|
if (typeof BroadcastChannel != "function") return;
|
|
1783
1786
|
const bc = new BroadcastChannel("right_click_attribution");
|
|
1784
|
-
|
|
1787
|
+
$649f456f663da9fc$export$de56f1198d121036("Broadcasting", product_id, "to", bc);
|
|
1785
1788
|
bc.postMessage(product_id);
|
|
1786
1789
|
bc.close();
|
|
1787
1790
|
}
|
|
1788
1791
|
function $61b3c9e5f2cf8171$export$58c56fe2313fdbe3(elements, display, info, get_event_listener_remover) {
|
|
1789
1792
|
if (typeof BroadcastChannel != "function") return elements;
|
|
1790
1793
|
const disconnectors = [];
|
|
1791
|
-
const handler =
|
|
1794
|
+
const handler = $b04e44fad5ea42c7$export$b3bbfd758f11cfa9(e => $61b3c9e5f2cf8171$export$8f66c4c7fb96eda2(e, ("variant_index" in display ? display.variant_displays[display.variant_index] : display).product_id));
|
|
1792
1795
|
const auxclick_handler = e => e.button === 1 && handler(e);
|
|
1793
1796
|
for (let i = 0; i < elements?.length; i++) {
|
|
1794
1797
|
const element = elements[i];
|
|
@@ -1803,15 +1806,15 @@ function $61b3c9e5f2cf8171$export$58c56fe2313fdbe3(elements, display, info, get_
|
|
|
1803
1806
|
return elements;
|
|
1804
1807
|
}
|
|
1805
1808
|
async function $61b3c9e5f2cf8171$export$8f66c4c7fb96eda2(e, product_id) {
|
|
1806
|
-
|
|
1809
|
+
$649f456f663da9fc$export$de56f1198d121036("Contextmenu was invoked", e);
|
|
1807
1810
|
const element = e.currentTarget || e.target;
|
|
1808
1811
|
const bc = new BroadcastChannel("right_click_attribution");
|
|
1809
|
-
const got_wanted_event = await
|
|
1810
|
-
bc.addEventListener("message",
|
|
1812
|
+
const got_wanted_event = await $bb3252f70898acd6$export$947a20746936143d([new Promise(resolve => {
|
|
1813
|
+
bc.addEventListener("message", $b04e44fad5ea42c7$export$b3bbfd758f11cfa9(msg => {
|
|
1811
1814
|
const {
|
|
1812
1815
|
data: data
|
|
1813
1816
|
} = msg;
|
|
1814
|
-
|
|
1817
|
+
$649f456f663da9fc$export$de56f1198d121036("Recieved broadcast channel event", data, msg);
|
|
1815
1818
|
if (data == product_id) resolve(true);
|
|
1816
1819
|
}));
|
|
1817
1820
|
}), new Promise(r => setTimeout(r, 60000, false))]);
|
|
@@ -1822,12 +1825,12 @@ async function $61b3c9e5f2cf8171$export$8f66c4c7fb96eda2(e, product_id) {
|
|
|
1822
1825
|
cancelable: true,
|
|
1823
1826
|
metaKey: true
|
|
1824
1827
|
});
|
|
1825
|
-
|
|
1828
|
+
$649f456f663da9fc$export$de56f1198d121036("Someone broadcasted our product_id! Simulating a click event on the element that was contextmenu'd", element, click);
|
|
1826
1829
|
element.addEventListener("click", e => (e.preventDefault(), false), {
|
|
1827
1830
|
once: true
|
|
1828
1831
|
});
|
|
1829
1832
|
element.dispatchEvent(click);
|
|
1830
|
-
} else
|
|
1833
|
+
} else $649f456f663da9fc$export$de56f1198d121036("Our product_id did not get broadcasted, closing channel");
|
|
1831
1834
|
bc.close();
|
|
1832
1835
|
}
|
|
1833
1836
|
|
|
@@ -1862,7 +1865,7 @@ const $f24c14db771b471d$var$unwatch_element = element => {
|
|
|
1862
1865
|
};
|
|
1863
1866
|
const $f24c14db771b471d$export$4c51576248bcdf31 = (element, callback) => {
|
|
1864
1867
|
if ($f24c14db771b471d$var$watched_elements.has(element)) {
|
|
1865
|
-
|
|
1868
|
+
$649f456f663da9fc$export$de56f1198d121036("Not watching", element, "as it's already being watched");
|
|
1866
1869
|
return () => {};
|
|
1867
1870
|
}
|
|
1868
1871
|
$f24c14db771b471d$var$intersection_observer?.observe(element);
|
|
@@ -1917,7 +1920,7 @@ const $f24c14db771b471d$var$intersection_observer_callback = entries => {
|
|
|
1917
1920
|
clearTimeout(callback_timeout_);
|
|
1918
1921
|
if (time_elapsed <= (0, $ccf918da074d7243$export$ca8321ea61dc2544)) $f24c14db771b471d$var$current_intersections.delete(target);else {
|
|
1919
1922
|
// we intersected long enough
|
|
1920
|
-
|
|
1923
|
+
$649f456f663da9fc$export$de56f1198d121036("intersection_observer: setTimeout lagged", time_elapsed, (0, $ccf918da074d7243$export$ca8321ea61dc2544), "ms", target);
|
|
1921
1924
|
callback(target);
|
|
1922
1925
|
}
|
|
1923
1926
|
}
|
|
@@ -1927,33 +1930,33 @@ const $f24c14db771b471d$var$intersection_observer_callback = entries => {
|
|
|
1927
1930
|
* Global IntersectionObserver used for all impression tracking.
|
|
1928
1931
|
* It's faster to use one observer for all elements than to create a new one for each element.
|
|
1929
1932
|
*/
|
|
1930
|
-
const $f24c14db771b471d$var$intersection_observer = typeof window === "object" ? /*@__PURE__*/new IntersectionObserver( /*@__PURE__
|
|
1931
|
-
threshold: /*@__PURE__
|
|
1933
|
+
const $f24c14db771b471d$var$intersection_observer = typeof window === "object" ? /*@__PURE__*/new IntersectionObserver( /*@__PURE__*/$b04e44fad5ea42c7$export$b3bbfd758f11cfa9($f24c14db771b471d$var$intersection_observer_callback), {
|
|
1934
|
+
threshold: /*@__PURE__*/$9ab9ecb74920f343$export$f8ea2e7b15b5d129(8)
|
|
1932
1935
|
}) : undefined;
|
|
1933
1936
|
const $405969d60b37fdac$export$d0efd8ed14f5c33 = (items, display, info) => {
|
|
1934
1937
|
if (!items?.length) return items;
|
|
1935
1938
|
const node_array = Array.isArray(items) ? items : [...items]; // if it's a NodeList convert it to an array
|
|
1936
1939
|
const first_watchable_el = node_array.find(el => el instanceof Element);
|
|
1937
1940
|
if (!first_watchable_el) {
|
|
1938
|
-
|
|
1941
|
+
$649f456f663da9fc$export$de56f1198d121036("Impression tracking: Can't observe", items, display);
|
|
1939
1942
|
return items;
|
|
1940
1943
|
}
|
|
1941
1944
|
if (!info.t) {
|
|
1942
|
-
|
|
1945
|
+
$649f456f663da9fc$export$de56f1198d121036("Impression tracking: No tenant instance, can't track", items, display);
|
|
1943
1946
|
return items;
|
|
1944
1947
|
}
|
|
1945
1948
|
(0, $0b48ba2f40ce6067$export$b6ae1bc530f4c149).onexists(first_watchable_el, ({
|
|
1946
1949
|
element: element
|
|
1947
1950
|
}) => {
|
|
1948
|
-
|
|
1951
|
+
$f24c14db771b471d$export$4c51576248bcdf31(element, () => {
|
|
1949
1952
|
const {
|
|
1950
1953
|
recommendation_id: recommendation_id,
|
|
1951
1954
|
search_result_id: search_result_id,
|
|
1952
1955
|
product_listing_result_id: product_listing_result_id,
|
|
1953
1956
|
suggestions_result_id: suggestions_result_id
|
|
1954
1957
|
} = display;
|
|
1955
|
-
|
|
1956
|
-
|
|
1958
|
+
$ccf918da074d7243$export$4205dc6835bc0d9f({
|
|
1959
|
+
...$43683b1103edab15$export$8c6f26a5b6921b95(),
|
|
1957
1960
|
recommendation_type: info.rendering_options.type,
|
|
1958
1961
|
entity_price: display.sale_price,
|
|
1959
1962
|
market: info.t.market,
|
|
@@ -1975,9 +1978,9 @@ const $21285393646b9849$export$37125ccc5dd98050 = ({
|
|
|
1975
1978
|
}) => {
|
|
1976
1979
|
const disconnectors = [];
|
|
1977
1980
|
const impression_track = () => {
|
|
1978
|
-
const disconnector =
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
+
const disconnector = $f24c14db771b471d$export$4c51576248bcdf31(element, () => {
|
|
1982
|
+
$ccf918da074d7243$export$4205dc6835bc0d9f({
|
|
1983
|
+
...$43683b1103edab15$export$8c6f26a5b6921b95(),
|
|
1981
1984
|
...data
|
|
1982
1985
|
});
|
|
1983
1986
|
});
|
|
@@ -1991,7 +1994,7 @@ const $ccf918da074d7243$export$c543ee4cdb0d0964 = (start, end) => $ccf918da074d7
|
|
|
1991
1994
|
const $ccf918da074d7243$export$ca8321ea61dc2544 = 500;
|
|
1992
1995
|
const $ccf918da074d7243$export$4205dc6835bc0d9f = data => {
|
|
1993
1996
|
data.type = "element_visible"; // Set the type to element_visible as this is optional to pass here.
|
|
1994
|
-
|
|
1997
|
+
$cafa1ff1049985c2$export$28cacbd9b4306ffc([data], true);
|
|
1995
1998
|
};
|
|
1996
1999
|
function $91b2e49f92ed636c$export$82a685f2da2fb027(a_element, product_id, recommendation_id, additional_listener) {
|
|
1997
2000
|
if (!a_element ||
|
|
@@ -2022,9 +2025,9 @@ function $91b2e49f92ed636c$export$82a685f2da2fb027(a_element, product_id, recomm
|
|
|
2022
2025
|
async function $91b2e49f92ed636c$export$2c34560c3749dc63(button, get_product_id, tracking_fn, unmatching_tracking, event) {
|
|
2023
2026
|
// @ts-ignore
|
|
2024
2027
|
if (!button || button.depict_tracked) return;
|
|
2025
|
-
button.addEventListener(event ? event : "click",
|
|
2028
|
+
button.addEventListener(event ? event : "click", $b04e44fad5ea42c7$export$b3bbfd758f11cfa9(async e => {
|
|
2026
2029
|
if (!e.isTrusted) {
|
|
2027
|
-
|
|
2030
|
+
$649f456f663da9fc$export$de56f1198d121036("ignoring event", e, "because it's not user generated");
|
|
2028
2031
|
return;
|
|
2029
2032
|
}
|
|
2030
2033
|
const product_id = await get_product_id(undefined, e);
|
|
@@ -2040,8 +2043,8 @@ async function $91b2e49f92ed636c$export$2c34560c3749dc63(button, get_product_id,
|
|
|
2040
2043
|
// @ts-ignore
|
|
2041
2044
|
button.depict_tracked = true;
|
|
2042
2045
|
}
|
|
2043
|
-
const $0d2acf276472ebf7$export$20e9533e68ee72e7 = /*@__PURE__
|
|
2044
|
-
const $0d2acf276472ebf7$export$a9d39e43ae273d26 = /*@__PURE__
|
|
2046
|
+
const $0d2acf276472ebf7$export$20e9533e68ee72e7 = /*@__PURE__*/$607fc90221d440a6$export$e806c6c1615a59ae(false);
|
|
2047
|
+
const $0d2acf276472ebf7$export$a9d39e43ae273d26 = /*@__PURE__*/$607fc90221d440a6$export$e806c6c1615a59ae();
|
|
2045
2048
|
const $0d2acf276472ebf7$export$7500cdfd37aafd43 = /*@__PURE__*/new Set();
|
|
2046
2049
|
let $0d2acf276472ebf7$var$old_url;
|
|
2047
2050
|
const $0d2acf276472ebf7$var$maybe_navigation = (what_happened, args) => {
|
|
@@ -2058,9 +2061,9 @@ const $0d2acf276472ebf7$var$maybe_navigation = (what_happened, args) => {
|
|
|
2058
2061
|
};
|
|
2059
2062
|
$0d2acf276472ebf7$export$baccefee4a395d8f((args, what_happened) => $0d2acf276472ebf7$var$maybe_navigation(what_happened, args));
|
|
2060
2063
|
$0d2acf276472ebf7$var$maybe_navigation();
|
|
2061
|
-
globalThis?.window?.addEventListener("popstate",
|
|
2064
|
+
globalThis?.window?.addEventListener("popstate", $b04e44fad5ea42c7$export$b3bbfd758f11cfa9(e => $0d2acf276472ebf7$var$maybe_navigation("popstate", e)));
|
|
2062
2065
|
async function $0d2acf276472ebf7$export$1cd22bab0d2c3b0b(callback) {
|
|
2063
|
-
const catchified_callback =
|
|
2066
|
+
const catchified_callback = $b04e44fad5ea42c7$export$b3bbfd758f11cfa9(callback);
|
|
2064
2067
|
for await (const href of $0d2acf276472ebf7$export$20e9533e68ee72e7) {
|
|
2065
2068
|
catchified_callback(href);
|
|
2066
2069
|
break;
|
|
@@ -2081,7 +2084,7 @@ async function $0d2acf276472ebf7$export$baccefee4a395d8f(after_navigation, repla
|
|
|
2081
2084
|
try {
|
|
2082
2085
|
after_navigation(arguments_list, the_thing);
|
|
2083
2086
|
} catch (e) {
|
|
2084
|
-
|
|
2087
|
+
$7547e32486a3abc0$export$8048b892d651b310(e);
|
|
2085
2088
|
}
|
|
2086
2089
|
return nav_result;
|
|
2087
2090
|
}
|
|
@@ -2104,21 +2107,21 @@ async function $aa0140679dc70b7a$export$eee4c4d924348b05(data) {
|
|
|
2104
2107
|
} = location;
|
|
2105
2108
|
if ($aa0140679dc70b7a$var$last_page_pageview_sent_for !== href) {
|
|
2106
2109
|
$aa0140679dc70b7a$var$last_page_pageview_sent_for = href;
|
|
2107
|
-
|
|
2110
|
+
$43683b1103edab15$export$82badda1f9923310({
|
|
2108
2111
|
...data,
|
|
2109
2112
|
type: "page_view"
|
|
2110
2113
|
});
|
|
2111
|
-
if (data.product_id) await
|
|
2114
|
+
if (data.product_id) await $61b3c9e5f2cf8171$export$836f70a28c317905(data.product_id); // this takes care of right click click attribution - broadcasts the URL of the current page
|
|
2112
2115
|
}
|
|
2113
2116
|
} catch (error) {
|
|
2114
|
-
|
|
2117
|
+
$b04e44fad5ea42c7$export$f18d5b0af29128b7([error, "Sending page view failed"], "warning");
|
|
2115
2118
|
}
|
|
2116
2119
|
}
|
|
2117
2120
|
let $aa0140679dc70b7a$var$sending_on_navigation = false;
|
|
2118
2121
|
async function $aa0140679dc70b7a$export$f7cb1bd47199ec38(data) {
|
|
2119
2122
|
if (!$aa0140679dc70b7a$var$sending_on_navigation) {
|
|
2120
2123
|
$aa0140679dc70b7a$var$sending_on_navigation = true;
|
|
2121
|
-
|
|
2124
|
+
$b04e44fad5ea42c7$export$b3bbfd758f11cfa9(async () => {
|
|
2122
2125
|
for await (const _href of (0, $0d2acf276472ebf7$export$a9d39e43ae273d26)) $aa0140679dc70b7a$export$eee4c4d924348b05({
|
|
2123
2126
|
tenant: data.tenant,
|
|
2124
2127
|
market: data.market,
|
|
@@ -2171,7 +2174,7 @@ var $155540b3b8aca771$exports = {};
|
|
|
2171
2174
|
/*@__PURE__*/$parcel$export($155540b3b8aca771$exports, "init_cookiebot_tracking", () => $155540b3b8aca771$export$abec7fd9f0b9cc22);
|
|
2172
2175
|
const $155540b3b8aca771$var$required_consent_level = process.env.DEPICT_TRACKING_CONSENT_LEVEL;
|
|
2173
2176
|
function $155540b3b8aca771$var$consent_from_cookie() {
|
|
2174
|
-
const cookie =
|
|
2177
|
+
const cookie = $43683b1103edab15$export$622991c71a1f52b3("CookieConsent");
|
|
2175
2178
|
if (!cookie) return;
|
|
2176
2179
|
const consent_json = cookie.replace(/%2C/g, ",").replace(/%27/g, "'").replace(/'/g, '"').replace(/([{[,])\s*([\w]+?):/g, '$1"$2":');
|
|
2177
2180
|
try {
|
|
@@ -2179,7 +2182,7 @@ function $155540b3b8aca771$var$consent_from_cookie() {
|
|
|
2179
2182
|
} catch ({
|
|
2180
2183
|
message: message
|
|
2181
2184
|
}) {
|
|
2182
|
-
|
|
2185
|
+
$649f456f663da9fc$export$de56f1198d121036("Error parsing cookie json", consent_json, message);
|
|
2183
2186
|
return;
|
|
2184
2187
|
}
|
|
2185
2188
|
}
|
|
@@ -2193,10 +2196,10 @@ async function $155540b3b8aca771$export$56c2e8be65fb14ae() {
|
|
|
2193
2196
|
}
|
|
2194
2197
|
function $155540b3b8aca771$export$8827362e5e938d26() {
|
|
2195
2198
|
if ($155540b3b8aca771$var$cookie_ipns) return $155540b3b8aca771$var$cookie_ipns;
|
|
2196
|
-
$155540b3b8aca771$var$cookie_ipns =
|
|
2199
|
+
$155540b3b8aca771$var$cookie_ipns = $607fc90221d440a6$export$e806c6c1615a59ae();
|
|
2197
2200
|
const existing_consent = $155540b3b8aca771$var$consent_from_cookie();
|
|
2198
2201
|
if (existing_consent) $155540b3b8aca771$var$cookie_ipns(existing_consent);
|
|
2199
|
-
const consent_maybe_changed =
|
|
2202
|
+
const consent_maybe_changed = $b04e44fad5ea42c7$export$b3bbfd758f11cfa9(() => {
|
|
2200
2203
|
const {
|
|
2201
2204
|
consent: {
|
|
2202
2205
|
marketing: marketing,
|
|
@@ -2212,25 +2215,25 @@ function $155540b3b8aca771$export$8827362e5e938d26() {
|
|
|
2212
2215
|
statistics: statistics
|
|
2213
2216
|
};
|
|
2214
2217
|
if (!Object.keys(new_consent_obj).every(k => $155540b3b8aca771$var$cookie_ipns.latest_call_value?.[k] === new_consent_obj[k])) {
|
|
2215
|
-
|
|
2218
|
+
$649f456f663da9fc$export$de56f1198d121036("Consent changed", new_consent_obj);
|
|
2216
2219
|
$155540b3b8aca771$var$cookie_ipns(new_consent_obj);
|
|
2217
2220
|
}
|
|
2218
2221
|
}, "extracting consent failed");
|
|
2219
|
-
|
|
2222
|
+
$d0e7629fb3179e02$export$2fc1a072736ae2f6(window, "Cookiebot", "consent").then(consent_maybe_changed);
|
|
2220
2223
|
["CookiebotOnAccept", "CookiebotOnDecline"].forEach(e => window.addEventListener(e, consent_maybe_changed, false));
|
|
2221
2224
|
return $155540b3b8aca771$var$cookie_ipns;
|
|
2222
2225
|
}
|
|
2223
|
-
const $155540b3b8aca771$export$abec7fd9f0b9cc22 = /*@__PURE__
|
|
2224
|
-
|
|
2225
|
-
if (!$155540b3b8aca771$var$required_consent_level) return
|
|
2226
|
+
const $155540b3b8aca771$export$abec7fd9f0b9cc22 = /*@__PURE__*/$b04e44fad5ea42c7$export$b3bbfd758f11cfa9(async (anon_id = "anonymous") => {
|
|
2227
|
+
$649f456f663da9fc$export$de56f1198d121036("Initializing Cookiebot tracking");
|
|
2228
|
+
if (!$155540b3b8aca771$var$required_consent_level) return $649f456f663da9fc$export$de56f1198d121036("No consent level set for Depict tracking. Ignoring consent and tracking everything.");
|
|
2226
2229
|
const original_get_depict_id = (0, $43683b1103edab15$export$6399bdb2291895e0);
|
|
2227
2230
|
const original_get_user_id = (0, $43683b1103edab15$export$adc61a405a4cabed);
|
|
2228
|
-
|
|
2229
|
-
|
|
2231
|
+
$43683b1103edab15$export$336e7ad40bae0652(() => $155540b3b8aca771$var$has_consent ? original_get_depict_id() : anon_id);
|
|
2232
|
+
$43683b1103edab15$export$8a96793bf9f87d90(() => $155540b3b8aca771$var$has_consent ? original_get_user_id() : anon_id);
|
|
2230
2233
|
for await (const consent_obj of $155540b3b8aca771$export$8827362e5e938d26()) {
|
|
2231
2234
|
// Changing this will change the return value of function given to set_depict_id_fn above
|
|
2232
2235
|
$155540b3b8aca771$var$has_consent = consent_obj[$155540b3b8aca771$var$required_consent_level];
|
|
2233
|
-
if (!$155540b3b8aca771$var$has_consent)
|
|
2236
|
+
if (!$155540b3b8aca771$var$has_consent) $649f456f663da9fc$export$de56f1198d121036(`dsid/user_id will be set to, "${anon_id}", until Cookiebot has consent for "${$155540b3b8aca771$var$required_consent_level}"`);else $649f456f663da9fc$export$de56f1198d121036(`Cookiebot obtained consent for "${$155540b3b8aca771$var$required_consent_level}", will use true dsid/user_id`);
|
|
2234
2237
|
}
|
|
2235
2238
|
});
|
|
2236
2239
|
const $5dbacdc6a3feeb15$var$required_consent_level = process.env.DEPICT_TRACKING_CONSENT_LEVEL;
|
|
@@ -2249,7 +2252,7 @@ const $5dbacdc6a3feeb15$var$required_consent_level = process.env.DEPICT_TRACKING
|
|
|
2249
2252
|
const $5dbacdc6a3feeb15$var$KEY_ORDER = ["necessary", "statistics", "preferences", "marketing"];
|
|
2250
2253
|
const $5dbacdc6a3feeb15$var$OPTANON_TO_COOKIEBOT = Object.fromEntries((process.env.OPTANON_KEYS || "").split(",").filter(k => k).map((k, i) => [k, $5dbacdc6a3feeb15$var$KEY_ORDER[i]]));
|
|
2251
2254
|
function $5dbacdc6a3feeb15$var$consent_from_cookie() {
|
|
2252
|
-
const cookie =
|
|
2255
|
+
const cookie = $43683b1103edab15$export$622991c71a1f52b3("OptanonConsent");
|
|
2253
2256
|
if (!cookie) return;
|
|
2254
2257
|
const groups = new URLSearchParams(cookie).get("groups") || "";
|
|
2255
2258
|
const matches = groups.matchAll(/(\w+):(\d)/g);
|
|
@@ -2258,7 +2261,7 @@ function $5dbacdc6a3feeb15$var$consent_from_cookie() {
|
|
|
2258
2261
|
return consent;
|
|
2259
2262
|
}
|
|
2260
2263
|
let $5dbacdc6a3feeb15$var$cookie_ipns;
|
|
2261
|
-
let $5dbacdc6a3feeb15$var$has_consent = $5dbacdc6a3feeb15$var$required_consent_level ?
|
|
2264
|
+
let $5dbacdc6a3feeb15$var$has_consent = /*@__PURE__*/(() => $5dbacdc6a3feeb15$var$required_consent_level ? $5dbacdc6a3feeb15$var$consent_from_cookie()?.[$5dbacdc6a3feeb15$var$required_consent_level] || false : true)();
|
|
2262
2265
|
const $5dbacdc6a3feeb15$export$1dd9ce50e201eff1 = () => $5dbacdc6a3feeb15$var$has_consent;
|
|
2263
2266
|
async function $5dbacdc6a3feeb15$export$7a6d436e0782c6ed() {
|
|
2264
2267
|
for await (const consent_obj of $5dbacdc6a3feeb15$export$7e4427e80d5fc619()) return consent_obj[process.env.DEPICT_TRACKING_CONSENT_LEVEL];
|
|
@@ -2267,12 +2270,12 @@ async function $5dbacdc6a3feeb15$export$7a6d436e0782c6ed() {
|
|
|
2267
2270
|
}
|
|
2268
2271
|
function $5dbacdc6a3feeb15$export$7e4427e80d5fc619() {
|
|
2269
2272
|
if ($5dbacdc6a3feeb15$var$cookie_ipns) return $5dbacdc6a3feeb15$var$cookie_ipns;
|
|
2270
|
-
$5dbacdc6a3feeb15$var$cookie_ipns =
|
|
2273
|
+
$5dbacdc6a3feeb15$var$cookie_ipns = $607fc90221d440a6$export$e806c6c1615a59ae();
|
|
2271
2274
|
const existing_consent = $5dbacdc6a3feeb15$var$consent_from_cookie();
|
|
2272
2275
|
if (existing_consent?.necessary)
|
|
2273
2276
|
// If "necessary" isn't set, user hasn't actually given/withold consent yet.
|
|
2274
2277
|
$5dbacdc6a3feeb15$var$cookie_ipns(existing_consent);
|
|
2275
|
-
window.addEventListener("consent.onetrust",
|
|
2278
|
+
window.addEventListener("consent.onetrust", $b04e44fad5ea42c7$export$b3bbfd758f11cfa9(evt => {
|
|
2276
2279
|
const c = evt;
|
|
2277
2280
|
// Cast because TS doesn't know about the forEach coming up
|
|
2278
2281
|
const consent_obj = {};
|
|
@@ -2286,34 +2289,34 @@ function $5dbacdc6a3feeb15$export$7e4427e80d5fc619() {
|
|
|
2286
2289
|
}));
|
|
2287
2290
|
return $5dbacdc6a3feeb15$var$cookie_ipns;
|
|
2288
2291
|
}
|
|
2289
|
-
const $5dbacdc6a3feeb15$export$f0f6c846d96fdbec = /*@__PURE__
|
|
2290
|
-
|
|
2291
|
-
if (!$5dbacdc6a3feeb15$var$required_consent_level) return
|
|
2292
|
+
const $5dbacdc6a3feeb15$export$f0f6c846d96fdbec = /*@__PURE__*/$b04e44fad5ea42c7$export$b3bbfd758f11cfa9(async (anon_id = "anonymous") => {
|
|
2293
|
+
$649f456f663da9fc$export$de56f1198d121036("Initializing OptAnon tracking");
|
|
2294
|
+
if (!$5dbacdc6a3feeb15$var$required_consent_level) return $649f456f663da9fc$export$de56f1198d121036("No consent level set for Depict tracking. Ignoring consent and tracking everything.");
|
|
2292
2295
|
const original_get_depict_id = (0, $43683b1103edab15$export$6399bdb2291895e0);
|
|
2293
2296
|
const original_get_user_id = (0, $43683b1103edab15$export$adc61a405a4cabed);
|
|
2294
|
-
|
|
2295
|
-
|
|
2297
|
+
$43683b1103edab15$export$336e7ad40bae0652(() => $5dbacdc6a3feeb15$var$has_consent ? original_get_depict_id() : anon_id);
|
|
2298
|
+
$43683b1103edab15$export$8a96793bf9f87d90(() => $5dbacdc6a3feeb15$var$has_consent ? original_get_user_id() : anon_id);
|
|
2296
2299
|
for await (const consent_obj of $5dbacdc6a3feeb15$export$7e4427e80d5fc619()) {
|
|
2297
2300
|
// Changing this will change the return value of function given to set_depict_id_fn above
|
|
2298
2301
|
$5dbacdc6a3feeb15$var$has_consent = consent_obj[$5dbacdc6a3feeb15$var$required_consent_level];
|
|
2299
|
-
if (!$5dbacdc6a3feeb15$var$has_consent)
|
|
2302
|
+
if (!$5dbacdc6a3feeb15$var$has_consent) $649f456f663da9fc$export$de56f1198d121036(`dsid/user_id will be set to, "${anon_id}", until Optanon has consent for "${$5dbacdc6a3feeb15$var$required_consent_level}"`);else $649f456f663da9fc$export$de56f1198d121036(`Optanon obtained consent for "${$5dbacdc6a3feeb15$var$required_consent_level}", will use true dsid/user_id`);
|
|
2300
2303
|
}
|
|
2301
2304
|
});
|
|
2302
2305
|
const $c749fe63b72056ef$var$g = typeof globalThis == "object" && globalThis || window;
|
|
2303
|
-
const $c749fe63b72056ef$export$f3354ec2ce95ebd9 = /*@__PURE__
|
|
2306
|
+
const $c749fe63b72056ef$export$f3354ec2ce95ebd9 = /*@__PURE__*/$b04e44fad5ea42c7$export$b3bbfd758f11cfa9(async (GA_ID, strict) => {
|
|
2304
2307
|
if (process.env.GTAG === "false") return;
|
|
2305
2308
|
if (!GA_ID) {
|
|
2306
|
-
|
|
2309
|
+
$649f456f663da9fc$export$c2363754d4758444("Couldn't load gtag, GA_ID not specified", GA_ID);
|
|
2307
2310
|
return;
|
|
2308
2311
|
}
|
|
2309
2312
|
const required_consent_level = process.env.GTAG_LOADING_CONSENT_LEVEL;
|
|
2310
2313
|
if (required_consent_level !== undefined) {
|
|
2311
|
-
|
|
2312
|
-
const ipns = process.env.CONSENT_FRAMEWORK == "optanon" ?
|
|
2314
|
+
$649f456f663da9fc$export$de56f1198d121036(`GTag loading waiting for consent level ${required_consent_level}`);
|
|
2315
|
+
const ipns = process.env.CONSENT_FRAMEWORK == "optanon" ? $5dbacdc6a3feeb15$export$7e4427e80d5fc619() : $155540b3b8aca771$export$8827362e5e938d26();
|
|
2313
2316
|
for await (const consent_status of ipns) {
|
|
2314
2317
|
const status_for_level = consent_status[required_consent_level];
|
|
2315
2318
|
if (status_for_level) {
|
|
2316
|
-
|
|
2319
|
+
$649f456f663da9fc$export$de56f1198d121036("got consent for", required_consent_level, "loading gtag");
|
|
2317
2320
|
break;
|
|
2318
2321
|
}
|
|
2319
2322
|
}
|
|
@@ -2323,13 +2326,13 @@ const $c749fe63b72056ef$export$f3354ec2ce95ebd9 = /*@__PURE__*/(0, $b04e44fad5ea
|
|
|
2323
2326
|
const page_hasnt_loaded = $c749fe63b72056ef$var$g?.performance?.getEntriesByType?.("navigation")?.every?.(e => e?.loadEventEnd) === false;
|
|
2324
2327
|
// Source: comment on https://stackoverflow.com/a/53525488
|
|
2325
2328
|
// don't use readyState, source: personal experience and comment on https://stackoverflow.com/a/28093606
|
|
2326
|
-
|
|
2329
|
+
$649f456f663da9fc$export$de56f1198d121036("Loading gtag after " + (page_hasnt_loaded ? "pageload and " : "") + "3s" + (strict ? "" : ", but setting up queues already"));
|
|
2327
2330
|
if (!strict) $c749fe63b72056ef$export$d031e55ccd4c52dc(GA_ID);
|
|
2328
2331
|
if (page_hasnt_loaded) {
|
|
2329
2332
|
const load_event = await new Promise(r => window.addEventListener("load", r, {
|
|
2330
2333
|
once: true
|
|
2331
2334
|
}));
|
|
2332
|
-
|
|
2335
|
+
$649f456f663da9fc$export$de56f1198d121036("page has loaded", load_event);
|
|
2333
2336
|
}
|
|
2334
2337
|
await new Promise(r => setTimeout(r, 3000));
|
|
2335
2338
|
const script = document.createElement("script"),
|
|
@@ -2337,9 +2340,9 @@ const $c749fe63b72056ef$export$f3354ec2ce95ebd9 = /*@__PURE__*/(0, $b04e44fad5ea
|
|
|
2337
2340
|
script.async = true;
|
|
2338
2341
|
script.src = "https://www.googletagmanager.com/gtag/js?id=" + GA_ID;
|
|
2339
2342
|
head.appendChild(script);
|
|
2340
|
-
|
|
2343
|
+
$649f456f663da9fc$export$de56f1198d121036("Loading gtag now", script);
|
|
2341
2344
|
});
|
|
2342
|
-
const $c749fe63b72056ef$export$d031e55ccd4c52dc = /*@__PURE__
|
|
2345
|
+
const $c749fe63b72056ef$export$d031e55ccd4c52dc = /*@__PURE__*/$b04e44fad5ea42c7$export$b3bbfd758f11cfa9(GA_ID => {
|
|
2343
2346
|
if (process.env.GTAG === "false") return;
|
|
2344
2347
|
$c749fe63b72056ef$var$g.dataLayer ||= [];
|
|
2345
2348
|
function gtag() {
|
|
@@ -2350,9 +2353,9 @@ const $c749fe63b72056ef$export$d031e55ccd4c52dc = /*@__PURE__*/(0, $b04e44fad5ea
|
|
|
2350
2353
|
$c749fe63b72056ef$var$g.gtag("config", GA_ID, {
|
|
2351
2354
|
"send_page_view": false
|
|
2352
2355
|
});
|
|
2353
|
-
|
|
2356
|
+
$649f456f663da9fc$export$de56f1198d121036("configuring gtag with", GA_ID);
|
|
2354
2357
|
});
|
|
2355
|
-
const $c749fe63b72056ef$export$7babcd5d4056b2ca = /*@__PURE__
|
|
2358
|
+
const $c749fe63b72056ef$export$7babcd5d4056b2ca = /*@__PURE__*/$b04e44fad5ea42c7$export$b3bbfd758f11cfa9(async (raw_displays, get_product_id, more) => {
|
|
2356
2359
|
const displays = raw_displays; // gtag tracking is "obsolete" and we don't expect any customers using something else than LegacyDisplay to use it
|
|
2357
2360
|
if (process.env.GTAG === "false") return;
|
|
2358
2361
|
if (process.env.GTAG_VIEW === "false") return;
|
|
@@ -2374,12 +2377,12 @@ const $c749fe63b72056ef$export$7babcd5d4056b2ca = /*@__PURE__*/(0, $b04e44fad5ea
|
|
|
2374
2377
|
const gtag_args = ["event", "view_item_list", {
|
|
2375
2378
|
"items": gtag_items.slice(i, i + max_products_per_request)
|
|
2376
2379
|
}];
|
|
2377
|
-
|
|
2380
|
+
$649f456f663da9fc$export$de56f1198d121036("Sending product view to gtag", gtag_args);
|
|
2378
2381
|
$c749fe63b72056ef$var$g.gtag(...gtag_args);
|
|
2379
2382
|
}
|
|
2380
|
-
} else
|
|
2383
|
+
} else $649f456f663da9fc$export$c2363754d4758444("not sending gtag tracking as there is no gtag");
|
|
2381
2384
|
});
|
|
2382
|
-
const $c749fe63b72056ef$export$f522672c9379e339 = /*@__PURE__
|
|
2385
|
+
const $c749fe63b72056ef$export$f522672c9379e339 = /*@__PURE__*/$b04e44fad5ea42c7$export$b3bbfd758f11cfa9(async (product_id, index, more) => {
|
|
2383
2386
|
if (process.env.GTAG === "false") return;
|
|
2384
2387
|
if (process.env.GTAG_EVENT_CONSENT_LEVEL !== undefined && !(await $c749fe63b72056ef$var$can_send_gtag_events(product_id, index, more))) return;
|
|
2385
2388
|
if (typeof $c749fe63b72056ef$var$g.gtag == "function") {
|
|
@@ -2392,17 +2395,17 @@ const $c749fe63b72056ef$export$f522672c9379e339 = /*@__PURE__*/(0, $b04e44fad5ea
|
|
|
2392
2395
|
...more
|
|
2393
2396
|
}]
|
|
2394
2397
|
}];
|
|
2395
|
-
|
|
2398
|
+
$649f456f663da9fc$export$de56f1198d121036("calling gtag with arguments", gtag_args);
|
|
2396
2399
|
return $c749fe63b72056ef$var$g.gtag(...gtag_args);
|
|
2397
|
-
} else
|
|
2400
|
+
} else $649f456f663da9fc$export$c2363754d4758444("not sending gtag tracking as there is no gtag");
|
|
2398
2401
|
});
|
|
2399
|
-
const $c749fe63b72056ef$export$f75172d2e289cd02 = /*@__PURE__
|
|
2402
|
+
const $c749fe63b72056ef$export$f75172d2e289cd02 = /*@__PURE__*/$b04e44fad5ea42c7$export$b3bbfd758f11cfa9(action => {
|
|
2400
2403
|
if (process.env.GA === "false") return;
|
|
2401
2404
|
if (typeof $c749fe63b72056ef$var$g.ga != "function") {
|
|
2402
|
-
|
|
2405
|
+
$649f456f663da9fc$export$c2363754d4758444("Not sending to ga as there is no ga");
|
|
2403
2406
|
return;
|
|
2404
2407
|
}
|
|
2405
|
-
|
|
2408
|
+
$649f456f663da9fc$export$de56f1198d121036("sending", action, "to GA");
|
|
2406
2409
|
return $c749fe63b72056ef$var$g.ga("depict.send", {
|
|
2407
2410
|
hitType: "event",
|
|
2408
2411
|
eventCategory: "Depict",
|
|
@@ -2411,35 +2414,35 @@ const $c749fe63b72056ef$export$f75172d2e289cd02 = /*@__PURE__*/(0, $b04e44fad5ea
|
|
|
2411
2414
|
nonInteraction: 1
|
|
2412
2415
|
});
|
|
2413
2416
|
});
|
|
2414
|
-
const $c749fe63b72056ef$export$ac7296527cb52311 = /*@__PURE__
|
|
2417
|
+
const $c749fe63b72056ef$export$ac7296527cb52311 = /*@__PURE__*/$b04e44fad5ea42c7$export$b3bbfd758f11cfa9(GAID => {
|
|
2415
2418
|
if (process.env.GA === "false") return;
|
|
2416
2419
|
if (!GAID) {
|
|
2417
|
-
|
|
2420
|
+
$649f456f663da9fc$export$c2363754d4758444(new Error("No GAID specified"));
|
|
2418
2421
|
return;
|
|
2419
2422
|
}
|
|
2420
2423
|
if (typeof $c749fe63b72056ef$var$g.ga != "function") {
|
|
2421
|
-
|
|
2422
|
-
|
|
2424
|
+
$649f456f663da9fc$export$de56f1198d121036("Creating GA queue");
|
|
2425
|
+
$42bbbba8196bd057$export$674d8cd8b6868154();
|
|
2423
2426
|
}
|
|
2424
|
-
|
|
2427
|
+
$649f456f663da9fc$export$de56f1198d121036("Creating ga with GA-ID", GAID);
|
|
2425
2428
|
$c749fe63b72056ef$var$g.ga("create", GAID, "auto", "depict");
|
|
2426
2429
|
$c749fe63b72056ef$export$f3354ec2ce95ebd9(GAID, false);
|
|
2427
2430
|
});
|
|
2428
|
-
const $c749fe63b72056ef$export$127751e82111fcf = /*@__PURE__
|
|
2429
|
-
const $c749fe63b72056ef$export$bf205937e5e012cb = /*@__PURE__
|
|
2431
|
+
const $c749fe63b72056ef$export$127751e82111fcf = /*@__PURE__*/$b04e44fad5ea42c7$export$b3bbfd758f11cfa9(() => $c749fe63b72056ef$export$f75172d2e289cd02("rec_bar_click"));
|
|
2432
|
+
const $c749fe63b72056ef$export$bf205937e5e012cb = /*@__PURE__*/$b04e44fad5ea42c7$export$b3bbfd758f11cfa9(() => $c749fe63b72056ef$export$f75172d2e289cd02("add_to_cart_after_rec_bar_click"));
|
|
2430
2433
|
async function $c749fe63b72056ef$var$can_send_gtag_events(...stuff_to_log) {
|
|
2431
2434
|
const required_consent_level = process.env.GTAG_LOADING_CONSENT_LEVEL;
|
|
2432
2435
|
if (required_consent_level !== undefined) return true; // just in case
|
|
2433
|
-
const ipns = process.env.CONSENT_FRAMEWORK == "optanon" ?
|
|
2436
|
+
const ipns = process.env.CONSENT_FRAMEWORK == "optanon" ? $5dbacdc6a3feeb15$export$7e4427e80d5fc619() : $155540b3b8aca771$export$8827362e5e938d26();
|
|
2434
2437
|
for await (const consent_obj of ipns) {
|
|
2435
2438
|
const can_send = consent_obj[required_consent_level];
|
|
2436
|
-
if (!can_send)
|
|
2439
|
+
if (!can_send) $649f456f663da9fc$export$de56f1198d121036("Got no consent for", required_consent_level, "not sending gtag event for", ...stuff_to_log);
|
|
2437
2440
|
return can_send;
|
|
2438
2441
|
}
|
|
2439
2442
|
}
|
|
2440
2443
|
let $0a581f1dfa083522$var$existing_style_tag;
|
|
2441
2444
|
let $0a581f1dfa083522$var$reactions_in_last_s = 0;
|
|
2442
|
-
const $0a581f1dfa083522$export$59ba1eb2c083f0cd = /*@__PURE__
|
|
2445
|
+
const $0a581f1dfa083522$export$59ba1eb2c083f0cd = /*@__PURE__*/$b04e44fad5ea42c7$export$b3bbfd758f11cfa9(async css => {
|
|
2443
2446
|
const style_tag = await ($0a581f1dfa083522$var$existing_style_tag ||= (0, $0b48ba2f40ce6067$export$b6ae1bc530f4c149).wait_for_element("head").then(head => {
|
|
2444
2447
|
const tag = document.createElement("style");
|
|
2445
2448
|
(0, $0b48ba2f40ce6067$export$b6ae1bc530f4c149).onremoved(
|
|
@@ -2449,16 +2452,16 @@ const $0a581f1dfa083522$export$59ba1eb2c083f0cd = /*@__PURE__*/(0, $b04e44fad5ea
|
|
|
2449
2452
|
// just make sure to not freak out if it's already been added again
|
|
2450
2453
|
return;
|
|
2451
2454
|
if ($0a581f1dfa083522$var$reactions_in_last_s >= 10) {
|
|
2452
|
-
|
|
2455
|
+
$b04e44fad5ea42c7$export$f18d5b0af29128b7(new Error("Someone removed our styling but insists on it (10 removals in previous second). Giving up \uD83D\uDE2B"), "error");
|
|
2453
2456
|
return;
|
|
2454
2457
|
}
|
|
2455
|
-
|
|
2458
|
+
$649f456f663da9fc$export$de56f1198d121036("Someone removed our styling \uD83D\uDE24, reinserting", eoe);
|
|
2456
2459
|
$0a581f1dfa083522$var$reactions_in_last_s++;
|
|
2457
2460
|
setTimeout(() => $0a581f1dfa083522$var$reactions_in_last_s--, 1000);
|
|
2458
2461
|
document.head.append(tag); // we're sure that head exists now since we inserted it there previously
|
|
2459
2462
|
});
|
|
2460
2463
|
|
|
2461
|
-
|
|
2464
|
+
$649f456f663da9fc$export$de56f1198d121036("inserting", tag, "into", head);
|
|
2462
2465
|
return head.appendChild(tag);
|
|
2463
2466
|
}));
|
|
2464
2467
|
style_tag.append(css);
|
|
@@ -2466,10 +2469,10 @@ const $0a581f1dfa083522$export$59ba1eb2c083f0cd = /*@__PURE__*/(0, $b04e44fad5ea
|
|
|
2466
2469
|
const $0a581f1dfa083522$export$a96c18473f2af463 = (tenant, selector, validator) => {
|
|
2467
2470
|
return (0, $0b48ba2f40ce6067$export$b6ae1bc530f4c149).onexists(selector, ({
|
|
2468
2471
|
element: element
|
|
2469
|
-
}) =>
|
|
2472
|
+
}) => $91b2e49f92ed636c$export$2c34560c3749dc63(element, tenant.get_product_id, (p_id, r_id, was_unmatching, event) => {
|
|
2470
2473
|
if (typeof validator === "function" && !validator(event)) return;
|
|
2471
|
-
if (!was_unmatching)
|
|
2472
|
-
|
|
2474
|
+
if (!was_unmatching) $c749fe63b72056ef$export$bf205937e5e012cb();
|
|
2475
|
+
$43683b1103edab15$export$9028351cb994757e({
|
|
2473
2476
|
...tenant,
|
|
2474
2477
|
product_id: p_id,
|
|
2475
2478
|
...(was_unmatching ? {
|
|
@@ -2484,11 +2487,11 @@ const $0a581f1dfa083522$export$a4f97b27a0592e6c = url => (url ? new URL(url, win
|
|
|
2484
2487
|
const $0a581f1dfa083522$export$692b606677218a16 = callback => {
|
|
2485
2488
|
if (document.depictwashere) {
|
|
2486
2489
|
if (process.env.BUILD_TARGET === "dev") {
|
|
2487
|
-
|
|
2490
|
+
$649f456f663da9fc$export$de56f1198d121036("HMR tried to rerun us, reloading page");
|
|
2488
2491
|
/* eslint-disable no-self-assign */
|
|
2489
2492
|
location.href = location.href;
|
|
2490
2493
|
}
|
|
2491
|
-
|
|
2494
|
+
$649f456f663da9fc$export$de56f1198d121036("Script has already ran", document.currentScript, "is exiting");
|
|
2492
2495
|
return;
|
|
2493
2496
|
}
|
|
2494
2497
|
if (process.env.BUILD_TARGET === "dev") /* eslint-disable no-console */console.clear = new Proxy(console.clear, {
|
|
@@ -2510,26 +2513,26 @@ function $0a581f1dfa083522$export$328e81c44cddf3c0(callback, get_market, support
|
|
|
2510
2513
|
let localstorage_override;
|
|
2511
2514
|
const query_param_override = new URLSearchParams(location.search).get("depict-override-market");
|
|
2512
2515
|
if (query_param_override !== null) {
|
|
2513
|
-
|
|
2516
|
+
$649f456f663da9fc$export$de56f1198d121036(`Found ?depict-override-market=${query_param_override}. Using that as the market`);
|
|
2514
2517
|
get_market = () => query_param_override;
|
|
2515
2518
|
localStorage.setItem("depict-override-market", query_param_override);
|
|
2516
2519
|
} else if ((localstorage_override = localStorage.getItem("depict-override-market")) !== null) {
|
|
2517
|
-
|
|
2520
|
+
$649f456f663da9fc$export$de56f1198d121036(`Found depict-override-market="${localstorage_override}" in localStorage. Using that as the market`);
|
|
2518
2521
|
get_market = () => localstorage_override;
|
|
2519
2522
|
}
|
|
2520
2523
|
}
|
|
2521
2524
|
const market = await get_market();
|
|
2522
2525
|
if (supported_markets.includes(market)) {
|
|
2523
|
-
|
|
2526
|
+
$649f456f663da9fc$export$de56f1198d121036(`Initializing with market: ${market}`);
|
|
2524
2527
|
return callback(market).catch((0, $7547e32486a3abc0$export$8048b892d651b310));
|
|
2525
2528
|
} else if (unsupported_markets.includes(market)) {
|
|
2526
|
-
|
|
2529
|
+
$649f456f663da9fc$export$de56f1198d121036(`Unsupported market: ${market}. Exiting...`);
|
|
2527
2530
|
return;
|
|
2528
2531
|
} else if (process.env.DEBUG === "true" && location.host.endsWith(".demo.depict.ai") && preferred_demo_market) {
|
|
2529
|
-
|
|
2532
|
+
$649f456f663da9fc$export$de56f1198d121036(`On demosite with default market override. Setting market to ${preferred_demo_market}`);
|
|
2530
2533
|
return callback(preferred_demo_market).catch((0, $7547e32486a3abc0$export$8048b892d651b310));
|
|
2531
2534
|
} else {
|
|
2532
|
-
|
|
2535
|
+
$7547e32486a3abc0$export$8048b892d651b310(new Error(`Unknown market: "${market}". Exiting...`));
|
|
2533
2536
|
return;
|
|
2534
2537
|
}
|
|
2535
2538
|
});
|
|
@@ -2549,9 +2552,9 @@ class $26eaaddf434c84f1$export$8d42ce4827f43582 {
|
|
|
2549
2552
|
this.TYPE = options.TYPE || "normal";
|
|
2550
2553
|
this.catchify = (0, $b04e44fad5ea42c7$export$b3bbfd758f11cfa9);
|
|
2551
2554
|
this.err = (0, $7547e32486a3abc0$export$8048b892d651b310);
|
|
2552
|
-
if (this.GA_ID)
|
|
2555
|
+
if (this.GA_ID) $c749fe63b72056ef$export$ac7296527cb52311(this.GA_ID);
|
|
2553
2556
|
// https://gitlab.com/depict-ai/depict.ai/-/merge_requests/2318#note_927887712
|
|
2554
|
-
this.get_product_id =
|
|
2557
|
+
this.get_product_id = $b04e44fad5ea42c7$export$b3bbfd758f11cfa9((...args) => {
|
|
2555
2558
|
const id = options.get_product_id(...args);
|
|
2556
2559
|
if (id instanceof Promise) return id.then(id => id || "");
|
|
2557
2560
|
return id || "";
|
|
@@ -2563,9 +2566,9 @@ class $26eaaddf434c84f1$export$8d42ce4827f43582 {
|
|
|
2563
2566
|
this.type = this.TYPE;
|
|
2564
2567
|
this.catchify = (0, $b04e44fad5ea42c7$export$b3bbfd758f11cfa9);
|
|
2565
2568
|
this.err = (0, $7547e32486a3abc0$export$8048b892d651b310);
|
|
2566
|
-
if (localStorage.getItem("highlight-depict") === "true")
|
|
2569
|
+
if (localStorage.getItem("highlight-depict") === "true") $0a581f1dfa083522$export$59ba1eb2c083f0cd(".depict { background: #f00a !important; }");
|
|
2567
2570
|
if (options.pageview_tracking ?? true) (async () => {
|
|
2568
|
-
|
|
2571
|
+
$aa0140679dc70b7a$export$f7cb1bd47199ec38({
|
|
2569
2572
|
market: this.market,
|
|
2570
2573
|
tenant: this.tenant,
|
|
2571
2574
|
get_product_id: this.get_product_id
|
|
@@ -2580,7 +2583,7 @@ const $d4ffde0b9fca0369$var$default_get_rec_id = elem => elem?.dataset?.depict_r
|
|
|
2580
2583
|
const $d4ffde0b9fca0369$var$default_get_prod_id = elem => elem?.dataset?.depict_product_id || elem?.dataset?.productId;
|
|
2581
2584
|
const $d4ffde0b9fca0369$var$default_get_ga_prod_id = elem => elem?.dataset?.ga_ids;
|
|
2582
2585
|
const $d4ffde0b9fca0369$var$get_index_in_children_of_el = el => [...(el?.parentElement?.children || [])].indexOf(el);
|
|
2583
|
-
const $d4ffde0b9fca0369$export$29a6094e0bd8bc5f = /*@__PURE__
|
|
2586
|
+
const $d4ffde0b9fca0369$export$29a6094e0bd8bc5f = /*@__PURE__*/$b04e44fad5ea42c7$export$b3bbfd758f11cfa9(async (options, gtag_options) => {
|
|
2584
2587
|
const {
|
|
2585
2588
|
product_selector: product_selector,
|
|
2586
2589
|
a2c_selector: a2c_selector,
|
|
@@ -2612,14 +2615,14 @@ const $d4ffde0b9fca0369$export$29a6094e0bd8bc5f = /*@__PURE__*/(0, $b04e44fad5ea
|
|
|
2612
2615
|
const gtag_view_product_ids = {};
|
|
2613
2616
|
// Page view
|
|
2614
2617
|
if (t instanceof (0, $26eaaddf434c84f1$export$8d42ce4827f43582)) (async () => {
|
|
2615
|
-
|
|
2618
|
+
$aa0140679dc70b7a$export$eee4c4d924348b05({
|
|
2616
2619
|
tenant: t.tenant,
|
|
2617
2620
|
market: t.market,
|
|
2618
2621
|
product_id: await t.get_product_id()
|
|
2619
2622
|
});
|
|
2620
2623
|
})();
|
|
2621
2624
|
// Product card
|
|
2622
|
-
const add_tracking_to_product_card =
|
|
2625
|
+
const add_tracking_to_product_card = $b04e44fad5ea42c7$export$b3bbfd758f11cfa9(async ({
|
|
2623
2626
|
element: elem
|
|
2624
2627
|
}) => {
|
|
2625
2628
|
const index = $d4ffde0b9fca0369$var$get_index_in_children_of_el(elem);
|
|
@@ -2629,7 +2632,7 @@ const $d4ffde0b9fca0369$export$29a6094e0bd8bc5f = /*@__PURE__*/(0, $b04e44fad5ea
|
|
|
2629
2632
|
// Impression tracking
|
|
2630
2633
|
if (impression_tracking && !impression_tracked_els.has(elem)) {
|
|
2631
2634
|
impression_tracked_els.add(elem);
|
|
2632
|
-
|
|
2635
|
+
$21285393646b9849$export$37125ccc5dd98050({
|
|
2633
2636
|
element: elem,
|
|
2634
2637
|
data: {
|
|
2635
2638
|
recommendation_id: data.recommendation_id,
|
|
@@ -2661,12 +2664,12 @@ const $d4ffde0b9fca0369$export$29a6094e0bd8bc5f = /*@__PURE__*/(0, $b04e44fad5ea
|
|
|
2661
2664
|
index: index
|
|
2662
2665
|
})));
|
|
2663
2666
|
} catch (e) {
|
|
2664
|
-
|
|
2667
|
+
$649f456f663da9fc$export$c2363754d4758444("Something went wrong on a product with multiple ga_ids", e);
|
|
2665
2668
|
}
|
|
2666
2669
|
}
|
|
2667
2670
|
if (typeof BroadcastChannel == "function") {
|
|
2668
2671
|
// right click and mouse wheel click tracking
|
|
2669
|
-
const handler =
|
|
2672
|
+
const handler = $b04e44fad5ea42c7$export$b3bbfd758f11cfa9(e => $61b3c9e5f2cf8171$export$8f66c4c7fb96eda2(e, data.product_id));
|
|
2670
2673
|
elem.addEventListener("contextmenu", handler);
|
|
2671
2674
|
elem.addEventListener("auxclick", e => e.button === 1 && handler(e)); // actual wheel click - some mouses / OS:es also dispatch auxclick on rightclick
|
|
2672
2675
|
}
|
|
@@ -2674,14 +2677,14 @@ const $d4ffde0b9fca0369$export$29a6094e0bd8bc5f = /*@__PURE__*/(0, $b04e44fad5ea
|
|
|
2674
2677
|
click_tracking: {
|
|
2675
2678
|
if (click_tracked_els.has(elem)) break click_tracking;
|
|
2676
2679
|
click_tracked_els.add(elem);
|
|
2677
|
-
elem.addEventListener("click",
|
|
2680
|
+
elem.addEventListener("click", $b04e44fad5ea42c7$export$b3bbfd758f11cfa9(() => {
|
|
2678
2681
|
const product_id = data.product_id || "DNT";
|
|
2679
2682
|
const recommendation_id = data.recommendation_id || "not_depict";
|
|
2680
2683
|
localStorage.setItem(`depict_attribution_${product_id}`, recommendation_id);
|
|
2681
2684
|
const index = $d4ffde0b9fca0369$var$get_index_in_children_of_el(elem);
|
|
2682
2685
|
const click_location = prefix + (index + 1);
|
|
2683
|
-
|
|
2684
|
-
|
|
2686
|
+
$c749fe63b72056ef$export$127751e82111fcf();
|
|
2687
|
+
$43683b1103edab15$export$15f8a0cd5a8c0ebb({
|
|
2685
2688
|
...(options.t || {}),
|
|
2686
2689
|
...options,
|
|
2687
2690
|
...data,
|
|
@@ -2695,15 +2698,15 @@ const $d4ffde0b9fca0369$export$29a6094e0bd8bc5f = /*@__PURE__*/(0, $b04e44fad5ea
|
|
|
2695
2698
|
list_name: gtag_list_name,
|
|
2696
2699
|
...gtag_options
|
|
2697
2700
|
};
|
|
2698
|
-
|
|
2701
|
+
$c749fe63b72056ef$export$f522672c9379e339(data.product_id, index, gtag_options_with_click_location);
|
|
2699
2702
|
try {
|
|
2700
2703
|
const to_iterate = [];
|
|
2701
2704
|
if (data.ga_product_id) to_iterate.push(...(data.ga_product_id.toString?.().split(",") ?? []));
|
|
2702
2705
|
to_iterate.push(...(data.ga_product_ids || []));
|
|
2703
|
-
to_iterate.forEach(id =>
|
|
2706
|
+
to_iterate.forEach(id => $c749fe63b72056ef$export$f522672c9379e339(id, index, gtag_options_with_click_location));
|
|
2704
2707
|
} catch (e) {
|
|
2705
|
-
|
|
2706
|
-
|
|
2708
|
+
$649f456f663da9fc$export$c2363754d4758444("Something went wrong when sending gtag click tracking on a product with multiple ga_ids");
|
|
2709
|
+
$b04e44fad5ea42c7$export$f18d5b0af29128b7(e, "error");
|
|
2707
2710
|
}
|
|
2708
2711
|
}
|
|
2709
2712
|
}), {
|
|
@@ -2733,8 +2736,8 @@ const $d4ffde0b9fca0369$export$29a6094e0bd8bc5f = /*@__PURE__*/(0, $b04e44fad5ea
|
|
|
2733
2736
|
});
|
|
2734
2737
|
element.dispatchEvent(click);
|
|
2735
2738
|
}
|
|
2736
|
-
|
|
2737
|
-
|
|
2739
|
+
$c749fe63b72056ef$export$bf205937e5e012cb();
|
|
2740
|
+
$43683b1103edab15$export$9028351cb994757e({
|
|
2738
2741
|
...(options.t || {}),
|
|
2739
2742
|
...options,
|
|
2740
2743
|
...data
|
|
@@ -2747,11 +2750,11 @@ const $d4ffde0b9fca0369$export$29a6094e0bd8bc5f = /*@__PURE__*/(0, $b04e44fad5ea
|
|
|
2747
2750
|
if (options.shade) $d4ffde0b9fca0369$export$6ebd242c09192cec(elem);
|
|
2748
2751
|
if (options.attempt_gtag_view_tracking && Object.keys(gtag_view_product_ids)?.length)
|
|
2749
2752
|
// setTimeout to batch the requests / put it all into one gtag view event
|
|
2750
|
-
setTimeout(
|
|
2753
|
+
setTimeout($b04e44fad5ea42c7$export$b3bbfd758f11cfa9(() => {
|
|
2751
2754
|
for (const key in gtag_view_product_ids) {
|
|
2752
2755
|
const product_ids = gtag_view_product_ids[key];
|
|
2753
2756
|
if (product_ids?.length) {
|
|
2754
|
-
|
|
2757
|
+
$c749fe63b72056ef$export$7babcd5d4056b2ca(product_ids, () => "", {
|
|
2755
2758
|
list_name: key,
|
|
2756
2759
|
...gtag_options
|
|
2757
2760
|
});
|
|
@@ -2762,14 +2765,14 @@ const $d4ffde0b9fca0369$export$29a6094e0bd8bc5f = /*@__PURE__*/(0, $b04e44fad5ea
|
|
|
2762
2765
|
});
|
|
2763
2766
|
if (typeof product_selector == "string") (0, $0b48ba2f40ce6067$export$b6ae1bc530f4c149).onexists(product_selector, add_tracking_to_product_card);else if (product_elements && typeof product_elements?.[Symbol.iterator] == "function") for (const element of product_elements) add_tracking_to_product_card({
|
|
2764
2767
|
element: element
|
|
2765
|
-
});else
|
|
2768
|
+
});else $649f456f663da9fc$export$c2363754d4758444(new Error("AIO can't find elements, try adding a selector or els")); // don't throw so that a2c tracking keeps working
|
|
2766
2769
|
// Page A2C button tracking
|
|
2767
2770
|
const a2c_handler = ({
|
|
2768
2771
|
element: element
|
|
2769
2772
|
}) => {
|
|
2770
|
-
|
|
2771
|
-
if (!was_unmatching)
|
|
2772
|
-
|
|
2773
|
+
$91b2e49f92ed636c$export$2c34560c3749dc63(element, get_product_id, (product_id, recommendation_id, was_unmatching) => {
|
|
2774
|
+
if (!was_unmatching) $c749fe63b72056ef$export$bf205937e5e012cb();
|
|
2775
|
+
$43683b1103edab15$export$9028351cb994757e({
|
|
2773
2776
|
...(options.t || {}),
|
|
2774
2777
|
...options,
|
|
2775
2778
|
product_id: product_id,
|
|
@@ -2784,7 +2787,7 @@ const $d4ffde0b9fca0369$export$29a6094e0bd8bc5f = /*@__PURE__*/(0, $b04e44fad5ea
|
|
|
2784
2787
|
};
|
|
2785
2788
|
if (typeof a2c_selector == "string") (0, $0b48ba2f40ce6067$export$b6ae1bc530f4c149).onexists(a2c_selector, a2c_handler);else if (a2c_elements && typeof a2c_elements?.[Symbol.iterator] == "function") for (const element of a2c_elements) a2c_handler({
|
|
2786
2789
|
element: element
|
|
2787
|
-
});else
|
|
2790
|
+
});else $649f456f663da9fc$export$c2363754d4758444(new Error("Can't find a2c button, try adding a selector or els"));
|
|
2788
2791
|
return {
|
|
2789
2792
|
add_a2c_element: element => a2c_handler({
|
|
2790
2793
|
element: element
|
|
@@ -2794,7 +2797,7 @@ const $d4ffde0b9fca0369$export$29a6094e0bd8bc5f = /*@__PURE__*/(0, $b04e44fad5ea
|
|
|
2794
2797
|
})
|
|
2795
2798
|
};
|
|
2796
2799
|
});
|
|
2797
|
-
const $d4ffde0b9fca0369$export$6ebd242c09192cec = /*@__PURE__
|
|
2800
|
+
const $d4ffde0b9fca0369$export$6ebd242c09192cec = /*@__PURE__*/$b04e44fad5ea42c7$export$b3bbfd758f11cfa9(element => {
|
|
2798
2801
|
element.style.boxShadow = "rgba(255,0,0,0.5) 10px 10px 30px 40px";
|
|
2799
2802
|
element.style.background = "rgba(255,0,0,0.5)";
|
|
2800
2803
|
element.style.color = "white";
|
|
@@ -2839,18 +2842,18 @@ async function $2d1ffbfaa1c2d9e3$export$bcd70d5ed1cf6313(url, options, max_retri
|
|
|
2839
2842
|
const response = await fetch(url, options);
|
|
2840
2843
|
if (!response || !response.ok || response.status !== 200) {
|
|
2841
2844
|
if (response.status === 422) {
|
|
2842
|
-
|
|
2845
|
+
$b04e44fad5ea42c7$export$b3bbfd758f11cfa9($2d1ffbfaa1c2d9e3$var$send_sentry_422)(response, options?.body || {}, stack);
|
|
2843
2846
|
has_succeeded = true;
|
|
2844
2847
|
} else if (response.status === 404) has_succeeded = true;
|
|
2845
|
-
|
|
2848
|
+
$649f456f663da9fc$export$de56f1198d121036("Response not ok", response);
|
|
2846
2849
|
} else has_succeeded = true;
|
|
2847
2850
|
result = response;
|
|
2848
2851
|
} catch (error) {
|
|
2849
|
-
|
|
2852
|
+
$649f456f663da9fc$export$de56f1198d121036("Error while fetching: ", error, url, options);
|
|
2850
2853
|
// Don't retry CORS
|
|
2851
2854
|
if (error.message.includes("CORS") && error.name.includes("CORS")) has_succeeded = true;
|
|
2852
2855
|
} finally {
|
|
2853
|
-
if (!has_succeeded) await
|
|
2856
|
+
if (!has_succeeded) await $2cbe7e0ca2ce5438$export$5c069c93d2b7493f(try_again_in_ms);
|
|
2854
2857
|
try_again_in_ms = calculate_retry(try_again_in_ms);
|
|
2855
2858
|
max_retries -= 1;
|
|
2856
2859
|
}
|
|
@@ -2859,12 +2862,12 @@ async function $2d1ffbfaa1c2d9e3$export$bcd70d5ed1cf6313(url, options, max_retri
|
|
|
2859
2862
|
async function $2d1ffbfaa1c2d9e3$var$send_sentry_422(response, body, stack) {
|
|
2860
2863
|
const msg = `Validation error: got 422 from API`;
|
|
2861
2864
|
const text = await response.clone().text();
|
|
2862
|
-
|
|
2865
|
+
$649f456f663da9fc$export$de56f1198d121036(msg, "body", body, "response", response, "text", text, "stack", stack);
|
|
2863
2866
|
(0, $eba382943196079c$export$af2e17a20c2ea3c5).withScope(function (scope) {
|
|
2864
2867
|
scope.setExtra("stack", stack);
|
|
2865
2868
|
scope.setExtra("request_body", body);
|
|
2866
2869
|
scope.setExtra("response", response);
|
|
2867
|
-
scope.setExtra("serialized_response",
|
|
2870
|
+
scope.setExtra("serialized_response", $5c4afc453f904a1f$export$39d526a1194b6499(response));
|
|
2868
2871
|
scope.setExtra("response_text", text);
|
|
2869
2872
|
scope.setLevel("error");
|
|
2870
2873
|
this.captureException(new Error(msg));
|
|
@@ -2875,8 +2878,8 @@ async function $2d47b009af5bc0a4$export$1bc0df10745d5412(t, options, headers, ge
|
|
|
2875
2878
|
return res?.displays || [];
|
|
2876
2879
|
}
|
|
2877
2880
|
async function $2d47b009af5bc0a4$export$d40679eb4cf32f09(t, options, headers, get_url = $2d47b009af5bc0a4$var$default_get_fetch_url) {
|
|
2878
|
-
const dsid =
|
|
2879
|
-
const session_id = options.session_id ||
|
|
2881
|
+
const dsid = $43683b1103edab15$export$6399bdb2291895e0();
|
|
2882
|
+
const session_id = options.session_id || $43683b1103edab15$export$61e7e1f11e96692f();
|
|
2880
2883
|
const user_id = options.user_id || dsid;
|
|
2881
2884
|
const body = {
|
|
2882
2885
|
tenant: t.tenant,
|
|
@@ -2888,17 +2891,17 @@ async function $2d47b009af5bc0a4$export$d40679eb4cf32f09(t, options, headers, ge
|
|
|
2888
2891
|
...options
|
|
2889
2892
|
};
|
|
2890
2893
|
const endpoint = $2d47b009af5bc0a4$var$get_fetch_endpoint_from_options(options);
|
|
2891
|
-
return await
|
|
2894
|
+
return await $2d1ffbfaa1c2d9e3$export$bcd70d5ed1cf6313(get_url(endpoint), {
|
|
2892
2895
|
body: JSON.stringify(body),
|
|
2893
2896
|
...(headers ? {
|
|
2894
2897
|
headers: headers
|
|
2895
2898
|
} : {}),
|
|
2896
2899
|
method: "POST"
|
|
2897
2900
|
}) // @ts-ignore
|
|
2898
|
-
.then(r => r.json()).catch(e =>
|
|
2901
|
+
.then(r => r.json()).catch(e => $649f456f663da9fc$export$de56f1198d121036("fetch_retry threw", e));
|
|
2899
2902
|
}
|
|
2900
2903
|
function $2d47b009af5bc0a4$var$default_get_fetch_url(type) {
|
|
2901
|
-
return
|
|
2904
|
+
return $f564adbc4675ceaf$export$fe609f0216e4ebef(`${(0, $6c2b49f3f564b0d1$export$362abebb4b313340)}/v2/recommend/products/${type}`);
|
|
2902
2905
|
}
|
|
2903
2906
|
function $2d47b009af5bc0a4$var$get_fetch_endpoint_from_options(options) {
|
|
2904
2907
|
if (options["category_id"] !== undefined) return "category";else if (options["product_id"] !== undefined) return "product";else if (options["product_ids"] !== undefined) return "products";
|
|
@@ -2912,7 +2915,7 @@ async function $5cbe24d064a033ed$export$a9fc160c5ed83bd7(t, rendering_options) {
|
|
|
2912
2915
|
} = rendering_options;
|
|
2913
2916
|
const displays = await $5cbe24d064a033ed$var$make_sure_we_have_displays(t, rendering_options);
|
|
2914
2917
|
if (!displays?.length) {
|
|
2915
|
-
|
|
2918
|
+
$649f456f663da9fc$export$de56f1198d121036("RR: Got no displays for type " + type + ", can't recover.", t, rendering_options);
|
|
2916
2919
|
return {};
|
|
2917
2920
|
}
|
|
2918
2921
|
// return if too few displays
|
|
@@ -2923,19 +2926,19 @@ async function $5cbe24d064a033ed$export$a9fc160c5ed83bd7(t, rendering_options) {
|
|
|
2923
2926
|
if (!good_displays) return {};
|
|
2924
2927
|
const processed_displays = await $5cbe24d064a033ed$export$c22e610107c5a15a(t, rendering_options, displays);
|
|
2925
2928
|
if (!processed_displays.length) {
|
|
2926
|
-
|
|
2929
|
+
$649f456f663da9fc$export$de56f1198d121036("RR: No displays left after preprocessing");
|
|
2927
2930
|
return {};
|
|
2928
2931
|
}
|
|
2929
2932
|
const {
|
|
2930
2933
|
template: template,
|
|
2931
2934
|
post_processors = []
|
|
2932
2935
|
} = rendering_options;
|
|
2933
|
-
const caught_post_processing_functions = post_processors.map(post_pro =>
|
|
2936
|
+
const caught_post_processing_functions = post_processors.map(post_pro => $b04e44fad5ea42c7$export$b3bbfd758f11cfa9(post_pro));
|
|
2934
2937
|
let a;
|
|
2935
|
-
const caught_html2elems =
|
|
2938
|
+
const caught_html2elems = $b04e44fad5ea42c7$export$b3bbfd758f11cfa9((0, $0bdb8dbcf1bc7f34$export$44951404cb8d0583));
|
|
2936
2939
|
let output_elements;
|
|
2937
2940
|
if (typeof template === "function") {
|
|
2938
|
-
const caught_template =
|
|
2941
|
+
const caught_template = $b04e44fad5ea42c7$export$b3bbfd758f11cfa9(template);
|
|
2939
2942
|
output_elements = (await Promise.allSettled(processed_displays.map(async (display, index) => {
|
|
2940
2943
|
const event_listeners = [];
|
|
2941
2944
|
let keep = true;
|
|
@@ -2956,7 +2959,7 @@ async function $5cbe24d064a033ed$export$a9fc160c5ed83bd7(t, rendering_options) {
|
|
|
2956
2959
|
return Array.from(post_processed_elements);
|
|
2957
2960
|
}))).flat();
|
|
2958
2961
|
if (!output_elements.length) {
|
|
2959
|
-
|
|
2962
|
+
$649f456f663da9fc$export$de56f1198d121036("RR: No displays left after postprocessing/rendering");
|
|
2960
2963
|
return {};
|
|
2961
2964
|
}
|
|
2962
2965
|
return {
|
|
@@ -3018,7 +3021,7 @@ async function $5cbe24d064a033ed$export$c22e610107c5a15a(t, rendering_options, d
|
|
|
3018
3021
|
max_items: max_items,
|
|
3019
3022
|
pre_processors = []
|
|
3020
3023
|
} = rendering_options;
|
|
3021
|
-
const caught_pre_processors = pre_processors.map(pre_pro =>
|
|
3024
|
+
const caught_pre_processors = pre_processors.map(pre_pro => $b04e44fad5ea42c7$export$b3bbfd758f11cfa9(pre_pro));
|
|
3022
3025
|
const processed_displays = [];
|
|
3023
3026
|
for (let i = 0; i < displays.length; i++) {
|
|
3024
3027
|
// classic for loop is both fast and can be stopped with break
|
|
@@ -3053,7 +3056,7 @@ class $5cbe24d064a033ed$export$da854280fb61cd32 {
|
|
|
3053
3056
|
async function $5cbe24d064a033ed$var$check_displays(displays, min_items_to_run) {
|
|
3054
3057
|
// don't run if too few recs
|
|
3055
3058
|
if (min_items_to_run && displays.length < min_items_to_run) {
|
|
3056
|
-
|
|
3059
|
+
$649f456f663da9fc$export$de56f1198d121036("RR: Got too few displays, exiting");
|
|
3057
3060
|
return false;
|
|
3058
3061
|
}
|
|
3059
3062
|
return true;
|
|
@@ -3070,7 +3073,7 @@ async function $5cbe24d064a033ed$var$make_sure_we_have_displays(t, rendering_opt
|
|
|
3070
3073
|
...(rendering_options.extra_api_options || {})
|
|
3071
3074
|
};
|
|
3072
3075
|
for (const key of ["product_ids", "category_id", "product_id"]) if (key in rendering_options) get_displays_options[key] = rendering_options[key];
|
|
3073
|
-
return await
|
|
3076
|
+
return await $2d47b009af5bc0a4$export$1bc0df10745d5412(t, get_displays_options, rendering_options.headers || {}).catch(t.err);
|
|
3074
3077
|
}
|
|
3075
3078
|
async function $f1396aa84761fbe5$export$c83d8da642b5104a(t, options, GWVM_opts) {
|
|
3076
3079
|
const {
|
|
@@ -3090,8 +3093,8 @@ async function $f1396aa84761fbe5$export$c83d8da642b5104a(t, options, GWVM_opts)
|
|
|
3090
3093
|
only_full_rows = false,
|
|
3091
3094
|
should_preload = true
|
|
3092
3095
|
} = GWVM_opts;
|
|
3093
|
-
const outer_els = typeof container_template === "string" ? [
|
|
3094
|
-
const [root] =
|
|
3096
|
+
const outer_els = typeof container_template === "string" ? [...$0bdb8dbcf1bc7f34$export$44951404cb8d0583(container_template)] : container_template;
|
|
3097
|
+
const [root] = $0bdb8dbcf1bc7f34$export$5e63aea0cac01fa0(outer_els, container_selector);
|
|
3095
3098
|
const cut_off_promise_obj = /*@__PURE__*/new (0, $09ff985c7c424fb3$export$32ccf3a614c84258)();
|
|
3096
3099
|
const i_observer = new IntersectionObserver(catchify($f1396aa84761fbe5$var$observer_callback));
|
|
3097
3100
|
let cut_off_point = 0;
|
|
@@ -3131,8 +3134,8 @@ async function $f1396aa84761fbe5$export$c83d8da642b5104a(t, options, GWVM_opts)
|
|
|
3131
3134
|
return rendering_results;
|
|
3132
3135
|
}
|
|
3133
3136
|
root.append(...rendered_elements);
|
|
3134
|
-
const load_more_cont =
|
|
3135
|
-
const button_element = button instanceof Element ? button :
|
|
3137
|
+
const load_more_cont = $0bdb8dbcf1bc7f34$export$d3e2a0560cbf4787(`<div class="load-more-container"></div>`);
|
|
3138
|
+
const button_element = button instanceof Element ? button : $0bdb8dbcf1bc7f34$export$d3e2a0560cbf4787(`<button class="load_more">${button || "Visa mer"}</button>`);
|
|
3136
3139
|
button_element.addEventListener("click", load_more);
|
|
3137
3140
|
load_more_cont.append(button_element);
|
|
3138
3141
|
root.after(load_more_cont);
|
|
@@ -3153,7 +3156,7 @@ async function $f1396aa84761fbe5$export$c83d8da642b5104a(t, options, GWVM_opts)
|
|
|
3153
3156
|
load_more_observer.observe(load_more_cont);
|
|
3154
3157
|
}
|
|
3155
3158
|
if (title) {
|
|
3156
|
-
const [title_el] =
|
|
3159
|
+
const [title_el] = $0bdb8dbcf1bc7f34$export$5e63aea0cac01fa0(outer_els, title_selector || "h1.title");
|
|
3157
3160
|
if (title_el) {
|
|
3158
3161
|
if (title instanceof Element) title_el.replaceWith(title);else title_el.innerText = title;
|
|
3159
3162
|
} else if (is_debug) {
|
|
@@ -3193,7 +3196,7 @@ info, cut_off_point, i_observer, cut_off_promise_obj, load_more) {
|
|
|
3193
3196
|
const extras = info.extras ||= {};
|
|
3194
3197
|
extras.load_more ||= load_more;
|
|
3195
3198
|
extras.load_more_ipo ||= cut_off_promise_obj;
|
|
3196
|
-
|
|
3199
|
+
$0bdb8dbcf1bc7f34$export$5e63aea0cac01fa0(elements_arr, "img:not(.filler):not(.ngl):not(.nolazy)").forEach(image => {
|
|
3197
3200
|
// "img" also selects "image" in IE11 which can be an SVG element which doesn't have a src property, therefore optional chaining
|
|
3198
3201
|
if ((image?.src?.length || image?.dataset?.src) && image?.src?.substr?.(0, 6) != "data:") {
|
|
3199
3202
|
if (is_initially_hidden && !image?.dataset.src) {
|
|
@@ -3254,7 +3257,7 @@ async function $ea554f5a28904975$export$41de2959a8dd405d(t, options, GWVM_opts,
|
|
|
3254
3257
|
} = rec;
|
|
3255
3258
|
if (!parentElement) {
|
|
3256
3259
|
// first rec was removed
|
|
3257
|
-
[rec] =
|
|
3260
|
+
[rec] = $0bdb8dbcf1bc7f34$export$5e63aea0cac01fa0(result?.elements || [], rec_selector);
|
|
3258
3261
|
parentElement = rec?.parentElement;
|
|
3259
3262
|
if (!parentElement) throw new Error("Could not find element matching " + rec_selector + "to calculate width");
|
|
3260
3263
|
}
|
|
@@ -3290,7 +3293,7 @@ async function $ea554f5a28904975$export$41de2959a8dd405d(t, options, GWVM_opts,
|
|
|
3290
3293
|
}
|
|
3291
3294
|
};
|
|
3292
3295
|
// @ts-ignore
|
|
3293
|
-
result = await
|
|
3296
|
+
result = await $f1396aa84761fbe5$export$c83d8da642b5104a(t, options, modified_GWVM_opts);
|
|
3294
3297
|
if (!result?.elements)
|
|
3295
3298
|
// no chance in finding any elements, API didn't return recs
|
|
3296
3299
|
return result;
|
|
@@ -3352,28 +3355,28 @@ async function $075589a94064cf2e$export$c0a4d29bc45a38c6(t, options, GWVM_opts,
|
|
|
3352
3355
|
$075589a94064cf2e$var$observe_first_el_after_dominsertion(all_rendered_elements, elements, info.extras.load_more);
|
|
3353
3356
|
return elements;
|
|
3354
3357
|
}];
|
|
3355
|
-
return await
|
|
3358
|
+
return await $ea554f5a28904975$export$41de2959a8dd405d(t, options, options_for_auto_gwvm, {
|
|
3356
3359
|
rec_selector: rec_selector
|
|
3357
3360
|
});
|
|
3358
3361
|
}
|
|
3359
3362
|
function $075589a94064cf2e$var$observe_first_el_after_dominsertion(all_rendered_elements, elements, load_more) {
|
|
3360
3363
|
const element = $075589a94064cf2e$var$find_html_element(elements);
|
|
3361
3364
|
if (!element) {
|
|
3362
|
-
|
|
3365
|
+
$649f456f663da9fc$export$de56f1198d121036("Infinite scroll won't work, couldn't find element to observe", elements);
|
|
3363
3366
|
return;
|
|
3364
3367
|
}
|
|
3365
|
-
(0, $0b48ba2f40ce6067$export$b6ae1bc530f4c149).wait_for_element(element).then(
|
|
3368
|
+
(0, $0b48ba2f40ce6067$export$b6ae1bc530f4c149).wait_for_element(element).then($b04e44fad5ea42c7$export$b3bbfd758f11cfa9(() => {
|
|
3366
3369
|
$075589a94064cf2e$var$find_last_el_and_observe(all_rendered_elements, load_more);
|
|
3367
3370
|
}));
|
|
3368
3371
|
}
|
|
3369
3372
|
function $075589a94064cf2e$var$find_last_el_and_observe(all_rendered_elements, load_more) {
|
|
3370
3373
|
const last_visible_el = $075589a94064cf2e$var$find_last_visible(all_rendered_elements);
|
|
3371
3374
|
if (!last_visible_el) return;
|
|
3372
|
-
const i_o = new IntersectionObserver(
|
|
3375
|
+
const i_o = new IntersectionObserver($b04e44fad5ea42c7$export$b3bbfd758f11cfa9(records => {
|
|
3373
3376
|
for (const record of records) if (record.isIntersecting) {
|
|
3374
|
-
|
|
3377
|
+
$649f456f663da9fc$export$de56f1198d121036("loading more because of", record);
|
|
3375
3378
|
load_more();
|
|
3376
|
-
setTimeout(
|
|
3379
|
+
setTimeout($b04e44fad5ea42c7$export$b3bbfd758f11cfa9($075589a94064cf2e$var$find_last_el_and_observe), 0, all_rendered_elements, load_more);
|
|
3377
3380
|
i_o.disconnect();
|
|
3378
3381
|
}
|
|
3379
3382
|
}));
|
|
@@ -3391,26 +3394,26 @@ function $075589a94064cf2e$var$find_last_visible(bunch_of_elements) {
|
|
|
3391
3394
|
for (let i = 0; i < considered_elements.length; i++) {
|
|
3392
3395
|
const respected_element = considered_elements[i];
|
|
3393
3396
|
if (!respected_element) {
|
|
3394
|
-
|
|
3397
|
+
$649f456f663da9fc$export$de56f1198d121036("Infinite scroll error: couldn't find last visible element", bunch_of_elements);
|
|
3395
3398
|
return;
|
|
3396
3399
|
}
|
|
3397
3400
|
if (respected_element.offsetParent === null) {
|
|
3398
3401
|
if (!i) {
|
|
3399
3402
|
// if index is 0 and we are not visible don't return the element at index -1 from the array - shit will hit the fan. Return the first one and everything should work out fine
|
|
3400
|
-
|
|
3403
|
+
$649f456f663da9fc$export$de56f1198d121036("Inf scroll: No elements visible, ", considered_elements, "will attach to first el", respected_element);
|
|
3401
3404
|
return considered_elements[i];
|
|
3402
3405
|
}
|
|
3403
3406
|
return considered_elements[i - 1];
|
|
3404
3407
|
}
|
|
3405
3408
|
}
|
|
3406
|
-
|
|
3409
|
+
$649f456f663da9fc$export$de56f1198d121036("Seems like all elements are loaded");
|
|
3407
3410
|
}
|
|
3408
3411
|
async function $efda45906c6cbac7$export$9eae832ae57fbf(t, css, extra_html) {
|
|
3409
3412
|
const head = await (0, $0b48ba2f40ce6067$export$b6ae1bc530f4c149).wait_for_element("head"),
|
|
3410
3413
|
{
|
|
3411
3414
|
dlog: dlog
|
|
3412
3415
|
} = t,
|
|
3413
|
-
elems =
|
|
3416
|
+
elems = $0bdb8dbcf1bc7f34$export$44951404cb8d0583(`<style type="text/css">${css}</style>` + (extra_html ? extra_html : ""));
|
|
3414
3417
|
dlog("inserting", ...elems, "into", head);
|
|
3415
3418
|
head.append(...elems);
|
|
3416
3419
|
}
|
|
@@ -3444,7 +3447,7 @@ async function $e867e2f1fb3bcc09$var$placeholder_worker(placeholder_elements, fi
|
|
|
3444
3447
|
}
|
|
3445
3448
|
} else {
|
|
3446
3449
|
await sanit_el_if_needed();
|
|
3447
|
-
placeholder_elements[0].addEventListener("placeholder_switch",
|
|
3450
|
+
placeholder_elements[0].addEventListener("placeholder_switch", $511123bb28a7b6f7$export$535946eb77c946dd(async e => {
|
|
3448
3451
|
const new_state = e.detail.state;
|
|
3449
3452
|
if (state != new_state) {
|
|
3450
3453
|
await sanit_el_if_needed();
|
|
@@ -3464,7 +3467,7 @@ async function $e867e2f1fb3bcc09$var$decide_direction_and_switch(placeholder_ele
|
|
|
3464
3467
|
if (switch_to_final) $e867e2f1fb3bcc09$var$switch_elements(placeholder_elements, final_elements);else $e867e2f1fb3bcc09$var$switch_elements(final_elements, placeholder_elements);
|
|
3465
3468
|
}
|
|
3466
3469
|
function $e867e2f1fb3bcc09$var$switch_elements(from, to) {
|
|
3467
|
-
if (!from.length || !to.length)
|
|
3470
|
+
if (!from.length || !to.length) $649f456f663da9fc$export$c2363754d4758444("Cannot switch elements as from or to is empty", from, to);
|
|
3468
3471
|
from[0].replaceWith(...to);
|
|
3469
3472
|
for (let i = 1; i < from.length; i++) from[i].remove();
|
|
3470
3473
|
}
|
|
@@ -3484,14 +3487,14 @@ class $b83068cbd26dcc41$export$3be7054c61590ee3 {
|
|
|
3484
3487
|
}
|
|
3485
3488
|
}
|
|
3486
3489
|
},
|
|
3487
|
-
load:
|
|
3490
|
+
load: $b04e44fad5ea42c7$export$b3bbfd758f11cfa9(async image => {
|
|
3488
3491
|
for (const element of [...$b83068cbd26dcc41$export$e4741190ccada479(image, "source"), image]) {
|
|
3489
3492
|
if ("loaded" in element) {
|
|
3490
|
-
if (class_this.#verbose)
|
|
3493
|
+
if (class_this.#verbose) $649f456f663da9fc$export$de56f1198d121036(element, "is already loading, not loading again");
|
|
3491
3494
|
continue;
|
|
3492
3495
|
}
|
|
3493
3496
|
if (document?.body?.contains?.(image) === false) {
|
|
3494
|
-
if (class_this.#verbose)
|
|
3497
|
+
if (class_this.#verbose) $649f456f663da9fc$export$de56f1198d121036(element, "has been removed from the DOM, can't load");
|
|
3495
3498
|
const {
|
|
3496
3499
|
elements: elements
|
|
3497
3500
|
} = class_this.lazyfinder;
|
|
@@ -3502,13 +3505,13 @@ class $b83068cbd26dcc41$export$3be7054c61590ee3 {
|
|
|
3502
3505
|
const has_src = element.dataset?.src?.length;
|
|
3503
3506
|
const has_srcset = element.dataset?.srcset?.length;
|
|
3504
3507
|
if (has_src || has_srcset) {
|
|
3505
|
-
if (class_this.#verbose)
|
|
3508
|
+
if (class_this.#verbose) $649f456f663da9fc$export$de56f1198d121036("Loading", element);
|
|
3506
3509
|
element.loaded = false;
|
|
3507
3510
|
// here it's of importance that we give the browser the srcset first, otherwise it (safari) might start loading the fallback src at first
|
|
3508
3511
|
if (has_srcset) {
|
|
3509
3512
|
// in Safari for some reason sometimes the .sizes attribute isn't set yet, like in https://www.notion.so/depictai/Pictures-in-recommendations-are-not-displayed-88e30e0f98de421e94b9eb273aea21dc. In that case, wait up to one event loop execution for it
|
|
3510
3513
|
if (!element.sizes) await new Promise(resolve => {
|
|
3511
|
-
const mo = new MutationObserver(
|
|
3514
|
+
const mo = new MutationObserver($b04e44fad5ea42c7$export$b3bbfd758f11cfa9(_records => {
|
|
3512
3515
|
if (element.sizes) {
|
|
3513
3516
|
resolve();
|
|
3514
3517
|
mo.disconnect();
|
|
@@ -3518,7 +3521,7 @@ class $b83068cbd26dcc41$export$3be7054c61590ee3 {
|
|
|
3518
3521
|
attributes: true,
|
|
3519
3522
|
attributeFilter: ["sizes"]
|
|
3520
3523
|
});
|
|
3521
|
-
setTimeout(
|
|
3524
|
+
setTimeout($b04e44fad5ea42c7$export$b3bbfd758f11cfa9(() => {
|
|
3522
3525
|
resolve(); // in case ResizeObserver doesn't set .sizes or something
|
|
3523
3526
|
mo.disconnect();
|
|
3524
3527
|
}));
|
|
@@ -3534,7 +3537,7 @@ class $b83068cbd26dcc41$export$3be7054c61590ee3 {
|
|
|
3534
3537
|
} else {
|
|
3535
3538
|
if (element.src?.startsWith?.("data:")) continue;
|
|
3536
3539
|
// This happens quite often for reasons unknown. One day we will figure out why, or replace this lazyloader with a new one/native.
|
|
3537
|
-
if (class_this.#verbose)
|
|
3540
|
+
if (class_this.#verbose) $649f456f663da9fc$export$de56f1198d121036("Cannot load", element, "as it doesn't have a data-src or data-srcset attribute");
|
|
3538
3541
|
}
|
|
3539
3542
|
}
|
|
3540
3543
|
}),
|
|
@@ -3552,10 +3555,10 @@ class $b83068cbd26dcc41$export$3be7054c61590ee3 {
|
|
|
3552
3555
|
})();
|
|
3553
3556
|
#initiate_new_image(image) {
|
|
3554
3557
|
if (image.loaded === true || image.loaded === false) {
|
|
3555
|
-
if (this.#verbose)
|
|
3558
|
+
if (this.#verbose) $649f456f663da9fc$export$de56f1198d121036("Not lazyloading", image, "because it was loaded before or is loading");
|
|
3556
3559
|
return;
|
|
3557
3560
|
}
|
|
3558
|
-
|
|
3561
|
+
$b04e44fad5ea42c7$export$b3bbfd758f11cfa9(this.lazyfinder.unload)(image);
|
|
3559
3562
|
this.#add_load_event_listener(image);
|
|
3560
3563
|
this.intersection_observer?.observe?.(image); // observe if observer already exists, otherwise it won't and start_observer will do it
|
|
3561
3564
|
}
|
|
@@ -3565,11 +3568,11 @@ class $b83068cbd26dcc41$export$3be7054c61590ee3 {
|
|
|
3565
3568
|
// it allows us to just add elements to the observed container and have them added to the elements array if they or their children match the selector
|
|
3566
3569
|
if (!this.container && !override_container) return;
|
|
3567
3570
|
const container = override_container ?? this.container;
|
|
3568
|
-
const mutation_observer = new MutationObserver(
|
|
3571
|
+
const mutation_observer = new MutationObserver($b04e44fad5ea42c7$export$b3bbfd758f11cfa9(mutations => {
|
|
3569
3572
|
for (let i = 0; i < mutations.length; i++) {
|
|
3570
|
-
const matching_added_els =
|
|
3573
|
+
const matching_added_els = $0bdb8dbcf1bc7f34$export$5e63aea0cac01fa0(mutations[i].addedNodes, this.selector);
|
|
3571
3574
|
if (matching_added_els.length) {
|
|
3572
|
-
if (this.#verbose)
|
|
3575
|
+
if (this.#verbose) $649f456f663da9fc$export$de56f1198d121036("New elements", matching_added_els, " matching selector", this.selector, "were aded to", container, "lazyloading…");
|
|
3573
3576
|
this.lazyfinder.elements.push(...matching_added_els);
|
|
3574
3577
|
matching_added_els.forEach(this.#initiate_new_image.bind(this));
|
|
3575
3578
|
}
|
|
@@ -3593,14 +3596,14 @@ class $b83068cbd26dcc41$export$3be7054c61590ee3 {
|
|
|
3593
3596
|
});
|
|
3594
3597
|
}
|
|
3595
3598
|
#add_load_event_listener(element) {
|
|
3596
|
-
const handler =
|
|
3599
|
+
const handler = $b04e44fad5ea42c7$export$b3bbfd758f11cfa9(e => {
|
|
3597
3600
|
// cookiebot triggers random "load" events on all elements which make the images load before the intersection observer has started
|
|
3598
3601
|
if (!element.src.length) {
|
|
3599
|
-
|
|
3602
|
+
$649f456f663da9fc$export$de56f1198d121036("ignoring load event", e, "because image doesn't have a src");
|
|
3600
3603
|
return;
|
|
3601
3604
|
}
|
|
3602
3605
|
if (this.ignore_data_urls && element.src.startsWith("data:")) {
|
|
3603
|
-
if (this.#verbose)
|
|
3606
|
+
if (this.#verbose) $649f456f663da9fc$export$de56f1198d121036("Ignoring load event", e, "because ignore_data_urls is truthy");
|
|
3604
3607
|
return;
|
|
3605
3608
|
}
|
|
3606
3609
|
element.removeEventListener("load", handler);
|
|
@@ -3614,7 +3617,7 @@ class $b83068cbd26dcc41$export$3be7054c61590ee3 {
|
|
|
3614
3617
|
elements: elements,
|
|
3615
3618
|
unload: unload
|
|
3616
3619
|
} = this.lazyfinder;
|
|
3617
|
-
const caught_unload =
|
|
3620
|
+
const caught_unload = $b04e44fad5ea42c7$export$b3bbfd758f11cfa9(unload);
|
|
3618
3621
|
for (let i = 0; i < elements.length; i++) {
|
|
3619
3622
|
caught_unload(elements[i]);
|
|
3620
3623
|
this.#add_load_event_listener(elements[i]);
|
|
@@ -3623,7 +3626,7 @@ class $b83068cbd26dcc41$export$3be7054c61590ee3 {
|
|
|
3623
3626
|
#start_observer() {
|
|
3624
3627
|
let observers_first_call = true;
|
|
3625
3628
|
if (!this.intersection_observer) {
|
|
3626
|
-
this.intersection_observer = new IntersectionObserver(
|
|
3629
|
+
this.intersection_observer = new IntersectionObserver($b04e44fad5ea42c7$export$b3bbfd758f11cfa9(entries => {
|
|
3627
3630
|
let any_intersected = false;
|
|
3628
3631
|
for (let i = 0; i < entries.length; i++) {
|
|
3629
3632
|
const entry = entries[i];
|
|
@@ -3639,7 +3642,7 @@ class $b83068cbd26dcc41$export$3be7054c61590ee3 {
|
|
|
3639
3642
|
if (any_intersected) observers_first_call = false;
|
|
3640
3643
|
}), {
|
|
3641
3644
|
root: this.container,
|
|
3642
|
-
threshold:
|
|
3645
|
+
threshold: $9ab9ecb74920f343$export$f8ea2e7b15b5d129(3)
|
|
3643
3646
|
});
|
|
3644
3647
|
const {
|
|
3645
3648
|
elements: elements
|
|
@@ -3655,7 +3658,7 @@ class $b83068cbd26dcc41$export$3be7054c61590ee3 {
|
|
|
3655
3658
|
} = this.lazyfinder;
|
|
3656
3659
|
for (let i = 0; i < (elements?.length ?? 0); i++) if (elements[i].loaded === true) loaded_images.push(elements[i]);else not_loaded_or_loading.push(elements[i]);
|
|
3657
3660
|
if (this.#images_on_first_page.length >= loaded_images.length) {
|
|
3658
|
-
const caught_loading_fin =
|
|
3661
|
+
const caught_loading_fin = $b04e44fad5ea42c7$export$b3bbfd758f11cfa9(this.lazyfinder.load);
|
|
3659
3662
|
for (let i = 0; i < not_loaded_or_loading.length; i++) caught_loading_fin(not_loaded_or_loading[i]);
|
|
3660
3663
|
}
|
|
3661
3664
|
}
|
|
@@ -3682,10 +3685,10 @@ class $b83068cbd26dcc41$export$3be7054c61590ee3 {
|
|
|
3682
3685
|
this.#unload_images_and_add_load_listeners();
|
|
3683
3686
|
// check if we need to branch off to an async function and wait for the elements being in the DOM
|
|
3684
3687
|
if (wait_for_dominsertion) {
|
|
3685
|
-
const caught_start_obs =
|
|
3688
|
+
const caught_start_obs = $b04e44fad5ea42c7$export$b3bbfd758f11cfa9(this.#start_observer).bind(this);
|
|
3686
3689
|
if (wait_for_dominsertion instanceof Promise) wait_for_dominsertion.then(caught_start_obs);else {
|
|
3687
3690
|
const el_to_listen_on = container || lazyfinder?.elements?.[0];
|
|
3688
|
-
if (el_to_listen_on instanceof Node) (0, $0b48ba2f40ce6067$export$b6ae1bc530f4c149).wait_for_element(el_to_listen_on).then(caught_start_obs);else
|
|
3691
|
+
if (el_to_listen_on instanceof Node) (0, $0b48ba2f40ce6067$export$b6ae1bc530f4c149).wait_for_element(el_to_listen_on).then(caught_start_obs);else $649f456f663da9fc$export$de56f1198d121036("Could not find element to attach event listener to", () => {}); // right click function in inspector and select "jump to definition" to get here
|
|
3689
3692
|
}
|
|
3690
3693
|
} else this.#start_observer();
|
|
3691
3694
|
}
|
|
@@ -3710,9 +3713,9 @@ function $b83068cbd26dcc41$export$e4741190ccada479(element, selector) {
|
|
|
3710
3713
|
}
|
|
3711
3714
|
return result;
|
|
3712
3715
|
}
|
|
3713
|
-
const $b9b0dba897847b2a$export$eb0b9ed911409b57 = (callback, element) => (
|
|
3716
|
+
const $b9b0dba897847b2a$export$eb0b9ed911409b57 = (callback, element) => ($b04e44fad5ea42c7$export$b3bbfd758f11cfa9(callback)(element), element);
|
|
3714
3717
|
function $b9b0dba897847b2a$export$f63fcc839cb0f734(event, handler, element) {
|
|
3715
|
-
element.addEventListener(event,
|
|
3718
|
+
element.addEventListener(event, $b04e44fad5ea42c7$export$b3bbfd758f11cfa9(handler));
|
|
3716
3719
|
return element;
|
|
3717
3720
|
}
|
|
3718
3721
|
const $b9b0dba897847b2a$export$22a65337c1b43b1f = /* @PURE */classes => classes.filter(c => c !== undefined).join(" ");
|
|
@@ -3744,7 +3747,7 @@ const $63cbb5de51d11596$export$34b9dba7ce09269b = (tag, {
|
|
|
3744
3747
|
const element = is_svg ? document.createElementNS(namespace, tag) : document.createElement(tag);
|
|
3745
3748
|
for (const key in props) {
|
|
3746
3749
|
const value = props[key];
|
|
3747
|
-
if (key === "onClick") element.addEventListener("click",
|
|
3750
|
+
if (key === "onClick") element.addEventListener("click", $b04e44fad5ea42c7$export$b3bbfd758f11cfa9(value));else if (key.startsWith("xlink:"))
|
|
3748
3751
|
// https://stackoverflow.com/a/23142447
|
|
3749
3752
|
// https://developer.mozilla.org/en-US/docs/Web/SVG/Namespaces_Crash_Course
|
|
3750
3753
|
element.setAttributeNS("http://www.w3.org/1999/xlink", key, value);else if (key == "xmlns" || key.startsWith("xmlns:")) element.setAttributeNS("http://www.w3.org/2000/xmlns/", key, value);else if (key.startsWith("xml:")) element.setAttributeNS("http://www.w3.org/XML/1998/namespace", key, value);else element.setAttribute(key, props[key]);
|
|
@@ -3763,19 +3766,19 @@ const $63cbb5de51d11596$export$ffb0004e005737fa = ({
|
|
|
3763
3766
|
};
|
|
3764
3767
|
class $ef9394fafebd5eab$export$692b27c28639e5b9 {
|
|
3765
3768
|
// this is just here because it's often needed together with the slider
|
|
3766
|
-
container =
|
|
3769
|
+
container = $63cbb5de51d11596$export$34b9dba7ce09269b("div", {
|
|
3767
3770
|
class: "depict-slider depict"
|
|
3768
3771
|
});
|
|
3769
3772
|
#elements = {
|
|
3770
|
-
sliding_el_:
|
|
3773
|
+
sliding_el_: $63cbb5de51d11596$export$34b9dba7ce09269b("div", {
|
|
3771
3774
|
class: "sliding"
|
|
3772
3775
|
}),
|
|
3773
|
-
left_:
|
|
3776
|
+
left_: $63cbb5de51d11596$export$34b9dba7ce09269b("button", {
|
|
3774
3777
|
"aria-label": "Scroll left",
|
|
3775
3778
|
class: "left d-navbutton",
|
|
3776
3779
|
type: "button"
|
|
3777
3780
|
}),
|
|
3778
|
-
right_:
|
|
3781
|
+
right_: $63cbb5de51d11596$export$34b9dba7ce09269b("button", {
|
|
3779
3782
|
"aria-label": "Scroll right",
|
|
3780
3783
|
class: "right d-navbutton",
|
|
3781
3784
|
type: "button"
|
|
@@ -3818,15 +3821,15 @@ class $ef9394fafebd5eab$export$692b27c28639e5b9 {
|
|
|
3818
3821
|
const rec_idx = this.get_index_of_element(target);
|
|
3819
3822
|
if (entry.intersectionRatio <= 0) {
|
|
3820
3823
|
for (const key in intersecting_items) if (intersecting_items[key].target === target) delete intersecting_items[key];
|
|
3821
|
-
} else if (rec_idx != null) intersecting_items[rec_idx] = entry;else
|
|
3824
|
+
} else if (rec_idx != null) intersecting_items[rec_idx] = entry;else $649f456f663da9fc$export$de56f1198d121036("Could not find index of", target, "ignoring observer record");
|
|
3822
3825
|
}
|
|
3823
|
-
|
|
3826
|
+
$b04e44fad5ea42c7$export$b3bbfd758f11cfa9(this.#hide_buttons_if_needed).call(this);
|
|
3824
3827
|
const mutation_plugins = this.#mutation_plugins;
|
|
3825
|
-
for (let i = 0; i < mutation_plugins.length; i++)
|
|
3828
|
+
for (let i = 0; i < mutation_plugins.length; i++) $b04e44fad5ea42c7$export$b3bbfd758f11cfa9(mutation_plugins[i]).call(this, entries, intersecting_items);
|
|
3826
3829
|
}
|
|
3827
3830
|
observer = new IntersectionObserver(this.#observer_callback.bind(this), {
|
|
3828
3831
|
root: this.#elements.sliding_el_,
|
|
3829
|
-
threshold:
|
|
3832
|
+
threshold: $9ab9ecb74920f343$export$f8ea2e7b15b5d129(100)
|
|
3830
3833
|
});
|
|
3831
3834
|
observe = this.observer.observe.bind(this.observer);
|
|
3832
3835
|
get_index_of_element(target) {
|
|
@@ -3897,7 +3900,7 @@ class $ef9394fafebd5eab$export$692b27c28639e5b9 {
|
|
|
3897
3900
|
}
|
|
3898
3901
|
#distance_to(offset, is_absolute = false) {
|
|
3899
3902
|
const intersecting_items = this.intersecting_items_object; // the privateFieldGet babel polyfill isn't very fast so for extra snappyness I won't get it multiple times
|
|
3900
|
-
|
|
3903
|
+
$649f456f663da9fc$export$de56f1198d121036("intersecting_items", intersecting_items);
|
|
3901
3904
|
// I know I could have made this.intersecting_items_object a simple array instead, but maybe someone needs the boundingrect information in it some day. Also I thought I could use it, but it isn't always up to date due to the intersection observer not triggering on every scrolling move.
|
|
3902
3905
|
// Now, some months later: the triggering frequency can easily be adjusted, the problem is that the observer doesn't trigger on hidden elements, meaning when scrolling left we don't have information about the hidden element's position from the observer
|
|
3903
3906
|
let target; // absolute index to focus on
|
|
@@ -3907,7 +3910,7 @@ class $ef9394fafebd5eab$export$692b27c28639e5b9 {
|
|
|
3907
3910
|
} = this;
|
|
3908
3911
|
if (currently_selected == null) {
|
|
3909
3912
|
// if for whatever reason we don't find a card, don't do anything
|
|
3910
|
-
|
|
3913
|
+
$b04e44fad5ea42c7$export$f18d5b0af29128b7(new Error("can't find card in center"), "error");
|
|
3911
3914
|
return 0;
|
|
3912
3915
|
}
|
|
3913
3916
|
target = currently_selected + offset;
|
|
@@ -3922,32 +3925,32 @@ class $ef9394fafebd5eab$export$692b27c28639e5b9 {
|
|
|
3922
3925
|
}
|
|
3923
3926
|
target = Math.floor(target);
|
|
3924
3927
|
let dist;
|
|
3925
|
-
|
|
3928
|
+
$649f456f663da9fc$export$de56f1198d121036("trying to focus target", target);
|
|
3926
3929
|
let target_element = this.element_by_index(target);
|
|
3927
3930
|
if (!target_element) {
|
|
3928
3931
|
if (this.correct_bs_targets) {
|
|
3929
3932
|
if (isNaN(target)) {
|
|
3930
|
-
|
|
3933
|
+
$649f456f663da9fc$export$de56f1198d121036("target is not a number", target, "can't correct");
|
|
3931
3934
|
return 0;
|
|
3932
3935
|
} else if (target < 0) {
|
|
3933
|
-
|
|
3936
|
+
$649f456f663da9fc$export$de56f1198d121036("Target", target, "is < 0, correcting to 0 because correct_bs_targets is enabled");
|
|
3934
3937
|
target = 0;
|
|
3935
3938
|
target_element = this.element_by_index(target);
|
|
3936
3939
|
if (!target_element) {
|
|
3937
|
-
|
|
3940
|
+
$649f456f663da9fc$export$de56f1198d121036("can't find element 0");
|
|
3938
3941
|
return 0;
|
|
3939
3942
|
}
|
|
3940
3943
|
} else {
|
|
3941
|
-
|
|
3944
|
+
$649f456f663da9fc$export$de56f1198d121036("target", target, "does not exist, correcting to last sliding element \uD83E\uDD2D");
|
|
3942
3945
|
target = this.index_of_last_element;
|
|
3943
3946
|
target_element = this.element_by_index(target);
|
|
3944
3947
|
if (!target_element) {
|
|
3945
|
-
|
|
3948
|
+
$649f456f663da9fc$export$de56f1198d121036("last element", target, "could not be found");
|
|
3946
3949
|
return 0;
|
|
3947
3950
|
}
|
|
3948
3951
|
}
|
|
3949
3952
|
} else {
|
|
3950
|
-
|
|
3953
|
+
$649f456f663da9fc$export$de56f1198d121036("target is bs, can't find", target, "by either data-index attribute or as child of", this.#elements.sliding_el_);
|
|
3951
3954
|
return 0;
|
|
3952
3955
|
}
|
|
3953
3956
|
}
|
|
@@ -3973,7 +3976,7 @@ class $ef9394fafebd5eab$export$692b27c28639e5b9 {
|
|
|
3973
3976
|
dist += biggest_card * num_cards_off_target;
|
|
3974
3977
|
}
|
|
3975
3978
|
} catch (e) {
|
|
3976
|
-
|
|
3979
|
+
$7547e32486a3abc0$export$8048b892d651b310(e);
|
|
3977
3980
|
}
|
|
3978
3981
|
return dist;
|
|
3979
3982
|
}
|
|
@@ -4020,7 +4023,7 @@ class $ef9394fafebd5eab$export$692b27c28639e5b9 {
|
|
|
4020
4023
|
}
|
|
4021
4024
|
this.#cached_visible_sizes = visible_sizes;
|
|
4022
4025
|
// let's assume we can cache this for a tick since the slider scrolls smoothly so there's no point in reading it instantly again and assuming a different value
|
|
4023
|
-
queueMicrotask(
|
|
4026
|
+
queueMicrotask($b04e44fad5ea42c7$export$b3bbfd758f11cfa9(() => this.#cached_visible_sizes = undefined));
|
|
4024
4027
|
return visible_sizes;
|
|
4025
4028
|
}
|
|
4026
4029
|
get cards_fitting_in_viewport() {
|
|
@@ -4063,8 +4066,8 @@ class $ef9394fafebd5eab$export$692b27c28639e5b9 {
|
|
|
4063
4066
|
if (should_be_visible && ishidden) element.classList.remove("hidden");else if (!should_be_visible && !ishidden) element.classList.add("hidden");
|
|
4064
4067
|
}
|
|
4065
4068
|
#setup_buttons() {
|
|
4066
|
-
const goleft =
|
|
4067
|
-
const goright =
|
|
4069
|
+
const goleft = $b04e44fad5ea42c7$export$b3bbfd758f11cfa9(() => this.#scroll_to(-this.stepstoslide, false, -510));
|
|
4070
|
+
const goright = $b04e44fad5ea42c7$export$b3bbfd758f11cfa9(() => this.#scroll_to(this.stepstoslide, false, 510));
|
|
4068
4071
|
const {
|
|
4069
4072
|
right_: right_,
|
|
4070
4073
|
left_: left_
|
|
@@ -4081,7 +4084,7 @@ class $ef9394fafebd5eab$export$692b27c28639e5b9 {
|
|
|
4081
4084
|
this.container.append(es.left_, es.right_);
|
|
4082
4085
|
this.container.append(es.sliding_el_);
|
|
4083
4086
|
if (autoinvalidate) {
|
|
4084
|
-
const cache_mo = new MutationObserver(
|
|
4087
|
+
const cache_mo = new MutationObserver($b04e44fad5ea42c7$export$b3bbfd758f11cfa9(records => {
|
|
4085
4088
|
this.invalidate_cache();
|
|
4086
4089
|
for (const extra_fn of this.on_elements_changed) extra_fn.call(this, records);
|
|
4087
4090
|
}));
|
|
@@ -4108,13 +4111,13 @@ class $ef9394fafebd5eab$export$692b27c28639e5b9 {
|
|
|
4108
4111
|
this.#index_cache.last_el_ = undefined;
|
|
4109
4112
|
}
|
|
4110
4113
|
#scroll_to(offset, is_absolute = false, fallback_scroll_distance = 500, harsh = false) {
|
|
4111
|
-
const left =
|
|
4114
|
+
const left = $b04e44fad5ea42c7$export$b3bbfd758f11cfa9(this.#distance_to).call(this, offset, is_absolute);
|
|
4112
4115
|
const distance_after_fallback_applied = Math.round(left ?? fallback_scroll_distance);
|
|
4113
4116
|
if (getComputedStyle(this.#elements.sliding_el_).scrollSnapType !== "none" && Math.abs(distance_after_fallback_applied) < 10) {
|
|
4114
|
-
|
|
4117
|
+
$649f456f663da9fc$export$de56f1198d121036("Not scrolling because snapping is enabled and distance not over threshold", distance_after_fallback_applied);
|
|
4115
4118
|
return;
|
|
4116
4119
|
}
|
|
4117
|
-
|
|
4120
|
+
$649f456f663da9fc$export$de56f1198d121036("Trying to scroll by", left, "px", "before fallback,", distance_after_fallback_applied, "after");
|
|
4118
4121
|
this.#elements.sliding_el_.scrollBy({
|
|
4119
4122
|
left: distance_after_fallback_applied,
|
|
4120
4123
|
top: 0,
|
|
@@ -4151,13 +4154,13 @@ class $ef9394fafebd5eab$export$692b27c28639e5b9 {
|
|
|
4151
4154
|
}
|
|
4152
4155
|
if (button_contents?.right) this.#elements.right_.append(...button_contents.right);
|
|
4153
4156
|
if (button_contents?.left) this.#elements.left_.append(...button_contents.left);
|
|
4154
|
-
|
|
4157
|
+
$b04e44fad5ea42c7$export$b3bbfd758f11cfa9(this.#create_element_structure).call(this, autoinvalidate_cache);
|
|
4155
4158
|
// @ts-ignore
|
|
4156
4159
|
this.#elements.sliding_el_.slider = this; // dunno if this is dumb? So far nordicagolf/kondomvaruhuset depend on it
|
|
4157
4160
|
// plugin functionality i.e. for dots
|
|
4158
4161
|
const constructor_args = arguments;
|
|
4159
4162
|
constructor_plugins?.forEach?.(mplugin => {
|
|
4160
|
-
|
|
4163
|
+
$b04e44fad5ea42c7$export$b3bbfd758f11cfa9(mplugin).call(this, constructor_args);
|
|
4161
4164
|
});
|
|
4162
4165
|
}
|
|
4163
4166
|
}
|
|
@@ -4169,7 +4172,7 @@ class $c33c6faf8acc7442$export$68babfc5be0de5da extends (0, $ef9394fafebd5eab$ex
|
|
|
4169
4172
|
element: element,
|
|
4170
4173
|
disconnector: disconnector
|
|
4171
4174
|
}) => {
|
|
4172
|
-
const i_o = new IntersectionObserver(
|
|
4175
|
+
const i_o = new IntersectionObserver($b04e44fad5ea42c7$export$b3bbfd758f11cfa9(records => {
|
|
4173
4176
|
for (const record of records) if (record.intersectionRatio > 0) {
|
|
4174
4177
|
r(true);
|
|
4175
4178
|
i_o.disconnect();
|
|
@@ -4179,7 +4182,7 @@ class $c33c6faf8acc7442$export$68babfc5be0de5da extends (0, $ef9394fafebd5eab$ex
|
|
|
4179
4182
|
}),
|
|
4180
4183
|
// Fixes https://gitlab.com/depict-ai/depict.ai/-/merge_requests/5816/diffs, don't understand why
|
|
4181
4184
|
{
|
|
4182
|
-
threshold:
|
|
4185
|
+
threshold: $9ab9ecb74920f343$export$f8ea2e7b15b5d129(10)
|
|
4183
4186
|
});
|
|
4184
4187
|
i_o.observe(element);
|
|
4185
4188
|
});
|
|
@@ -4199,7 +4202,7 @@ function $c1503704e45e6a15$export$fb9afe9f540ae069(elements, _display, info) {
|
|
|
4199
4202
|
if (!elements?.length) return elements;
|
|
4200
4203
|
if (!info.t) return elements;
|
|
4201
4204
|
const elements_as_array = [...elements];
|
|
4202
|
-
const handler =
|
|
4205
|
+
const handler = $b04e44fad5ea42c7$export$b3bbfd758f11cfa9(async () => {
|
|
4203
4206
|
const {
|
|
4204
4207
|
rendering_options: rendering_options,
|
|
4205
4208
|
t: t
|
|
@@ -4207,7 +4210,7 @@ function $c1503704e45e6a15$export$fb9afe9f540ae069(elements, _display, info) {
|
|
|
4207
4210
|
if (!$c1503704e45e6a15$export$4b50a4de9c6bbe09.has(rendering_options) && elements_as_array.some(e => document.documentElement.contains(e)) // check, just in case
|
|
4208
4211
|
) {
|
|
4209
4212
|
$c1503704e45e6a15$export$4b50a4de9c6bbe09.add(rendering_options);
|
|
4210
|
-
|
|
4213
|
+
$43683b1103edab15$export$82badda1f9923310({
|
|
4211
4214
|
...t,
|
|
4212
4215
|
product_id: await t.get_product_id(),
|
|
4213
4216
|
recommendation_type: info.rendering_options.type,
|
|
@@ -4229,7 +4232,7 @@ function $c1503704e45e6a15$export$1bffac19f9f0d6fc(elements, _display, info) {
|
|
|
4229
4232
|
// GTAG tracking is deprecated, if we're doing no-tenant recommendation rendering it's SDK anyway.
|
|
4230
4233
|
return elements;
|
|
4231
4234
|
const [first_element] = elements;
|
|
4232
|
-
const handler =
|
|
4235
|
+
const handler = $b04e44fad5ea42c7$export$b3bbfd758f11cfa9(() => {
|
|
4233
4236
|
const {
|
|
4234
4237
|
rendering_options: rendering_options,
|
|
4235
4238
|
displays: displays
|
|
@@ -4242,7 +4245,7 @@ function $c1503704e45e6a15$export$1bffac19f9f0d6fc(elements, _display, info) {
|
|
|
4242
4245
|
const {
|
|
4243
4246
|
type: type
|
|
4244
4247
|
} = rendering_options;
|
|
4245
|
-
|
|
4248
|
+
$c749fe63b72056ef$export$7babcd5d4056b2ca(displays, get_product_id /* yes this might create errors if there's no page_url in the display but don't have time to fix, sorry */, {
|
|
4246
4249
|
list_name: "depict_" + type
|
|
4247
4250
|
});
|
|
4248
4251
|
}
|
|
@@ -4257,7 +4260,7 @@ function $c1503704e45e6a15$export$9e1caada6901f552(elements, _display, info) {
|
|
|
4257
4260
|
} = info;
|
|
4258
4261
|
if (!t) return elements;
|
|
4259
4262
|
(async () => {
|
|
4260
|
-
|
|
4263
|
+
$aa0140679dc70b7a$export$eee4c4d924348b05({
|
|
4261
4264
|
tenant: t.tenant,
|
|
4262
4265
|
market: t.market,
|
|
4263
4266
|
product_id: await t.get_product_id()
|
|
@@ -4272,9 +4275,9 @@ function $c1503704e45e6a15$export$8d72437623fef90c(elements, display, info) {
|
|
|
4272
4275
|
ga_product_id: ga_product_id,
|
|
4273
4276
|
product_id: product_id
|
|
4274
4277
|
} = display;
|
|
4275
|
-
if (Array.isArray(ga_product_ids)) for (let i = 0; i < ga_product_ids.length; i++)
|
|
4278
|
+
if (Array.isArray(ga_product_ids)) for (let i = 0; i < ga_product_ids.length; i++) $c749fe63b72056ef$export$f522672c9379e339(ga_product_ids[i], info.index, {
|
|
4276
4279
|
list_name: "depict_" + info.rendering_options.type
|
|
4277
|
-
});else
|
|
4280
|
+
});else $c749fe63b72056ef$export$f522672c9379e339(ga_product_id || product_id, info.index, {
|
|
4278
4281
|
list_name: "depict_" + info.rendering_options.type
|
|
4279
4282
|
});
|
|
4280
4283
|
};
|
|
@@ -4291,7 +4294,7 @@ function $c1503704e45e6a15$export$e9106d6e723510d2(elements, display, info) {
|
|
|
4291
4294
|
index: index,
|
|
4292
4295
|
rendering_options: rendering_options
|
|
4293
4296
|
} = info;
|
|
4294
|
-
return
|
|
4297
|
+
return $43683b1103edab15$export$15f8a0cd5a8c0ebb({
|
|
4295
4298
|
...t,
|
|
4296
4299
|
...rendering_options,
|
|
4297
4300
|
...display,
|
|
@@ -4316,14 +4319,14 @@ function $c1503704e45e6a15$export$32eb5dd18e963410(elements, display, info) {
|
|
|
4316
4319
|
} = "variant_index" in display ? display.variant_displays[display.variant_index] : display;
|
|
4317
4320
|
if (!elements?.length) return elements;
|
|
4318
4321
|
for (const element of elements) {
|
|
4319
|
-
const handler =
|
|
4322
|
+
const handler = $91b2e49f92ed636c$export$82a685f2da2fb027(element, product_id, recommendation_id || search_result_id);
|
|
4320
4323
|
if (handler) $c1503704e45e6a15$var$push_function($c1503704e45e6a15$export$32eb5dd18e963410, handler);
|
|
4321
4324
|
}
|
|
4322
4325
|
return elements;
|
|
4323
4326
|
}
|
|
4324
4327
|
function $c1503704e45e6a15$export$dd32cb565eae0a1f(elements, display, info) {
|
|
4325
4328
|
const handler = () => {
|
|
4326
|
-
|
|
4329
|
+
$c749fe63b72056ef$export$127751e82111fcf();
|
|
4327
4330
|
};
|
|
4328
4331
|
$c1503704e45e6a15$var$push_function($c1503704e45e6a15$export$dd32cb565eae0a1f, handler);
|
|
4329
4332
|
info.register_event_listener("click", handler, {
|
|
@@ -4369,7 +4372,7 @@ async function $6be99244fa573db5$export$50ce83ace0cdd87e(t, rendering_options) {
|
|
|
4369
4372
|
view_tracking: view_tracking,
|
|
4370
4373
|
click_tracking: click_tracking
|
|
4371
4374
|
} = rendering_options;
|
|
4372
|
-
return await
|
|
4375
|
+
return await $5cbe24d064a033ed$export$a9fc160c5ed83bd7(t, {
|
|
4373
4376
|
...rendering_options,
|
|
4374
4377
|
headers: {
|
|
4375
4378
|
...((0, $893f9af5dbae6bc8$export$deca40f48c0569f8) ? {
|
|
@@ -4392,7 +4395,7 @@ async function $7e2d59b061c2c528$export$cab8bc58c64c2013(t, rendering_options, o
|
|
|
4392
4395
|
let {
|
|
4393
4396
|
container: container
|
|
4394
4397
|
} = options_for_us;
|
|
4395
|
-
if (typeof container == "string") container = [
|
|
4398
|
+
if (typeof container == "string") container = [...$0bdb8dbcf1bc7f34$export$44951404cb8d0583(container)];
|
|
4396
4399
|
if (container && !Array.isArray(container)) container = [...container];
|
|
4397
4400
|
const slider = new (0, $c33c6faf8acc7442$export$68babfc5be0de5da)({
|
|
4398
4401
|
dist_to_hide_left: 10,
|
|
@@ -4402,17 +4405,17 @@ async function $7e2d59b061c2c528$export$cab8bc58c64c2013(t, rendering_options, o
|
|
|
4402
4405
|
const recs = await local_rr(t, {
|
|
4403
4406
|
...rendering_options,
|
|
4404
4407
|
post_processors: [(elements, display) => {
|
|
4405
|
-
|
|
4408
|
+
$0bdb8dbcf1bc7f34$export$5e63aea0cac01fa0(elements, ".rec_outer").forEach(ro => ro.classList.add("noautospacing"));
|
|
4406
4409
|
return elements;
|
|
4407
4410
|
}, ...(rendering_options.post_processors || [])]
|
|
4408
4411
|
});
|
|
4409
4412
|
if (!recs.elements) {
|
|
4410
|
-
|
|
4413
|
+
$649f456f663da9fc$export$de56f1198d121036("Pro_Slider says bye bye cuz no recs");
|
|
4411
4414
|
return {};
|
|
4412
4415
|
}
|
|
4413
4416
|
slider.insert_here.append(...recs.elements);
|
|
4414
4417
|
if (container) {
|
|
4415
|
-
const [root] =
|
|
4418
|
+
const [root] = $0bdb8dbcf1bc7f34$export$5e63aea0cac01fa0(container, root_selector || ".grid");
|
|
4416
4419
|
root[insertion_verb](slider.container);
|
|
4417
4420
|
}
|
|
4418
4421
|
return {
|
|
@@ -4443,7 +4446,7 @@ class $366fff12da348e66$export$1a8782481a9af507 {
|
|
|
4443
4446
|
type: type,
|
|
4444
4447
|
market: market
|
|
4445
4448
|
} = this.settings;
|
|
4446
|
-
|
|
4449
|
+
$2d47b009af5bc0a4$export$1bc0df10745d5412(
|
|
4447
4450
|
// @ts-ignore - Quick workaround, as we don't have a tenant object here
|
|
4448
4451
|
{
|
|
4449
4452
|
tenant: tenant,
|
|
@@ -4453,7 +4456,7 @@ class $366fff12da348e66$export$1a8782481a9af507 {
|
|
|
4453
4456
|
product_id: product_id()
|
|
4454
4457
|
}).then(recs => {
|
|
4455
4458
|
this.data = recs;
|
|
4456
|
-
|
|
4459
|
+
$66b898e9bfcef532$export$8582cf3716962dc2({
|
|
4457
4460
|
...this.settings,
|
|
4458
4461
|
recs: this.data,
|
|
4459
4462
|
min_recs: this.settings.min_items || this.settings.max_items
|
|
@@ -4470,14 +4473,14 @@ class $366fff12da348e66$export$1a8782481a9af507 {
|
|
|
4470
4473
|
}
|
|
4471
4474
|
if (!action || action instanceof Event) action = "rec_bar_click";
|
|
4472
4475
|
if (action == "rec_bar_click" && typeof index != "undefined" && product_id) {
|
|
4473
|
-
if (Array.isArray(ga_product_ids)) for (const id of ga_product_ids)
|
|
4476
|
+
if (Array.isArray(ga_product_ids)) for (const id of ga_product_ids) $c749fe63b72056ef$export$f522672c9379e339(id, index, {
|
|
4474
4477
|
list_name: "depict_" + this.settings.type
|
|
4475
|
-
});else
|
|
4478
|
+
});else $c749fe63b72056ef$export$f522672c9379e339(product_id, index, {
|
|
4476
4479
|
list_name: "depict_" + this.settings.type
|
|
4477
4480
|
});
|
|
4478
4481
|
}
|
|
4479
4482
|
if (this.tracker === undefined) this.tracker = ga("create", this.settings.gaid, "auto", "depict");
|
|
4480
|
-
|
|
4483
|
+
$c749fe63b72056ef$export$f75172d2e289cd02(action);
|
|
4481
4484
|
}
|
|
4482
4485
|
trackPageView() {
|
|
4483
4486
|
if ($366fff12da348e66$var$pageview_sent) {
|
|
@@ -4488,12 +4491,12 @@ class $366fff12da348e66$export$1a8782481a9af507 {
|
|
|
4488
4491
|
const {
|
|
4489
4492
|
product_id: product_id
|
|
4490
4493
|
} = this.settings;
|
|
4491
|
-
|
|
4494
|
+
$aa0140679dc70b7a$export$eee4c4d924348b05(typeof product_id === "function" ? product_id() : product_id);
|
|
4492
4495
|
}
|
|
4493
4496
|
trackClick(index) {
|
|
4494
4497
|
const item = this.data[index];
|
|
4495
4498
|
if (item === undefined) return;
|
|
4496
|
-
return
|
|
4499
|
+
return $43683b1103edab15$export$15f8a0cd5a8c0ebb({
|
|
4497
4500
|
...this.settings,
|
|
4498
4501
|
...item,
|
|
4499
4502
|
click_location: `${this.settings.type}_${index + 1}`,
|
|
@@ -4501,7 +4504,7 @@ class $366fff12da348e66$export$1a8782481a9af507 {
|
|
|
4501
4504
|
});
|
|
4502
4505
|
}
|
|
4503
4506
|
trackAddToCart(pId) {
|
|
4504
|
-
return
|
|
4507
|
+
return $43683b1103edab15$export$9028351cb994757e({
|
|
4505
4508
|
...this.settings,
|
|
4506
4509
|
product_id: pId && !(pId instanceof Event) ? pId : this.settings.product_id()
|
|
4507
4510
|
});
|
|
@@ -4582,7 +4585,7 @@ class $366fff12da348e66$export$1a8782481a9af507 {
|
|
|
4582
4585
|
(0, $0b48ba2f40ce6067$export$b6ae1bc530f4c149).oncreation(element, () => {
|
|
4583
4586
|
if (!this.#dispatched_recs_inserted) {
|
|
4584
4587
|
this.#dispatched_recs_inserted = true;
|
|
4585
|
-
|
|
4588
|
+
$43683b1103edab15$export$82badda1f9923310({
|
|
4586
4589
|
...this.settings,
|
|
4587
4590
|
product_id: product_id_at_rendering,
|
|
4588
4591
|
recommendation_type: this.settings.type,
|
|
@@ -4595,8 +4598,8 @@ class $366fff12da348e66$export$1a8782481a9af507 {
|
|
|
4595
4598
|
this.trackGAEvent("rec_bar_click", rec_index, item.ga_product_id || item.product_id || this.settings.product_id(item.page_url), item.ga_product_ids);
|
|
4596
4599
|
};
|
|
4597
4600
|
element.addEventListener("click", listener);
|
|
4598
|
-
|
|
4599
|
-
if (this.settings.shade)
|
|
4601
|
+
$91b2e49f92ed636c$export$82a685f2da2fb027(element, item.product_id, item.recommendation_id);
|
|
4602
|
+
if (this.settings.shade) $d4ffde0b9fca0369$export$6ebd242c09192cec(element);
|
|
4600
4603
|
// @ts-ignore
|
|
4601
4604
|
if (!element.depict_event_listeners)
|
|
4602
4605
|
// @ts-ignore
|
|
@@ -4608,7 +4611,7 @@ class $366fff12da348e66$export$1a8782481a9af507 {
|
|
|
4608
4611
|
resultingElements.push(...elements);
|
|
4609
4612
|
});
|
|
4610
4613
|
this.data = recsArray;
|
|
4611
|
-
if (!this.settings.DNT)
|
|
4614
|
+
if (!this.settings.DNT) $c749fe63b72056ef$export$7babcd5d4056b2ca(recsArray, this.settings.product_id, {
|
|
4612
4615
|
list_name: "depict_" + this.settings.type
|
|
4613
4616
|
});
|
|
4614
4617
|
return resultingElements;
|
|
@@ -4664,8 +4667,8 @@ $51bbc74e39f5e5c6$export$2e2bcd8739ae039 = async options => {
|
|
|
4664
4667
|
};
|
|
4665
4668
|
|
|
4666
4669
|
// @ts-ignore
|
|
4667
|
-
var $
|
|
4668
|
-
$
|
|
4670
|
+
var $ac367c225b9acf18$exports = {};
|
|
4671
|
+
$ac367c225b9acf18$exports = ".depict .rec_outer.noautospacing {\n width: 6cm;\n max-width: 46vw;\n margin-left: 1%;\n margin-right: 1%;\n}\n\n.depict .rec_outer.noautospacing:nth-child(1) {\n margin-left: 0;\n}\n\n.depict .rec_outer.noautospacing:nth-last-child(1) {\n margin-right: 0;\n}\n\n.depict-slider .slider_snap {\n scroll-snap-type: x mandatory;\n}\n\n.depict-slider {\n width: 100%;\n position: relative;\n}\n\n.depict-slider .sliding::-webkit-scrollbar {\n display: none;\n}\n\n.depict-slider .sliding {\n scroll-behavior: smooth;\n -ms-overflow-style: none;\n scrollbar-width: none;\n flex-flow: row;\n margin-top: -1%;\n margin-bottom: -2%;\n padding-top: 1%;\n padding-bottom: 2%;\n display: flex;\n overflow-x: scroll;\n}\n\n.depict-slider .sliding > * {\n box-sizing: border-box;\n flex: none;\n}\n\n.depict-slider button.right {\n right: 0;\n}\n\n.depict-slider button.left, .depict-slider button.right {\n z-index: 2;\n touch-action: manipulation;\n width: 1cm;\n height: 1cm;\n cursor: pointer;\n background: #fff;\n border: none;\n padding: .5%;\n transition-duration: .2s;\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n}\n\n.depict-slider button.left.hidden, .depict-slider button.right.hidden {\n opacity: 0;\n cursor: default;\n}\n\n.depict-slider button.left {\n left: 0;\n transform: translateY(-50%)rotate(180deg);\n}\n\n.depict-slider button.left img, .depict-slider button.right img {\n width: 100%;\n height: 100%;\n}\n\n.depict-slider .rec_outer {\n margin-top: 0 !important;\n}\n\n";
|
|
4669
4672
|
const $762a881271a51d1b$var$default_image_src = "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjYsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiDQoJIHZpZXdCb3g9IjAgMCAxNiAxNiIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgMTYgMTY7IiB4bWw6c3BhY2U9InByZXNlcnZlIj4NCjxwb2x5Z29uIHBvaW50cz0iOSwyLjYgOC4zLDMuNCAxMi40LDcuNSAxLjYsNy41IDEuNiw4LjUgMTIuNCw4LjUgOC4zLDEyLjYgOSwxMy40IDE0LjQsOCAiLz4NCjwvc3ZnPg0K";
|
|
4670
4673
|
class $762a881271a51d1b$export$4d41c6499d53639c extends (0, $c33c6faf8acc7442$export$68babfc5be0de5da) {
|
|
4671
4674
|
constructor(static_options, override_lazyfier_options) {
|
|
@@ -4681,7 +4684,7 @@ class $762a881271a51d1b$export$4d41c6499d53639c extends (0, $c33c6faf8acc7442$ex
|
|
|
4681
4684
|
super(options, {
|
|
4682
4685
|
lazyfinder: {
|
|
4683
4686
|
unload(image) {
|
|
4684
|
-
|
|
4687
|
+
$b04e44fad5ea42c7$export$b3bbfd758f11cfa9(async () => {
|
|
4685
4688
|
if (!image?.dataset?.src?.length) {
|
|
4686
4689
|
image.dataset.src = image.src;
|
|
4687
4690
|
image.removeAttribute("src");
|
|
@@ -4696,7 +4699,7 @@ class $762a881271a51d1b$export$4d41c6499d53639c extends (0, $c33c6faf8acc7442$ex
|
|
|
4696
4699
|
function $762a881271a51d1b$export$f1b8b9fd75ddcab1(slider) {
|
|
4697
4700
|
const style_elem = document.createElement("style");
|
|
4698
4701
|
style_elem.type = "text/css";
|
|
4699
|
-
style_elem.append((0, /*@__PURE__*/$parcel$interopDefault($
|
|
4702
|
+
style_elem.append((0, /*@__PURE__*/$parcel$interopDefault($ac367c225b9acf18$exports)));
|
|
4700
4703
|
slider.container.appendChild(style_elem);
|
|
4701
4704
|
}
|
|
4702
4705
|
async function $e61f371a9bcdeb2f$export$cd12721587f4f16d(t, rendering_options, options_for_us, slider_options, override_lazyfier_options) {
|
|
@@ -4713,7 +4716,7 @@ async function $e61f371a9bcdeb2f$export$cd12721587f4f16d(t, rendering_options, o
|
|
|
4713
4716
|
let {
|
|
4714
4717
|
container: container
|
|
4715
4718
|
} = options_for_us;
|
|
4716
|
-
if (typeof container == "string") container = [
|
|
4719
|
+
if (typeof container == "string") container = [...$0bdb8dbcf1bc7f34$export$44951404cb8d0583(container)];
|
|
4717
4720
|
if (container && !Array.isArray(container)) container = [...container];
|
|
4718
4721
|
const slider = new (0, $762a881271a51d1b$export$4d41c6499d53639c)({
|
|
4719
4722
|
dlog: dlog,
|
|
@@ -4725,7 +4728,7 @@ async function $e61f371a9bcdeb2f$export$cd12721587f4f16d(t, rendering_options, o
|
|
|
4725
4728
|
const recs = await local_rr(t, {
|
|
4726
4729
|
...rendering_options,
|
|
4727
4730
|
post_processors: [(elements, display) => {
|
|
4728
|
-
|
|
4731
|
+
$0bdb8dbcf1bc7f34$export$5e63aea0cac01fa0(elements, "a.rec_outer").forEach(ro => ro.classList.add("noautospacing"));
|
|
4729
4732
|
return elements;
|
|
4730
4733
|
}, ...(rendering_options.post_processors || [])]
|
|
4731
4734
|
});
|
|
@@ -4735,7 +4738,7 @@ async function $e61f371a9bcdeb2f$export$cd12721587f4f16d(t, rendering_options, o
|
|
|
4735
4738
|
}
|
|
4736
4739
|
slider.insert_here.append(...recs.elements);
|
|
4737
4740
|
if (container) {
|
|
4738
|
-
const [root] =
|
|
4741
|
+
const [root] = $0bdb8dbcf1bc7f34$export$5e63aea0cac01fa0(container, root_selector || ".grid");
|
|
4739
4742
|
root[insertion_verb](slider.container);
|
|
4740
4743
|
}
|
|
4741
4744
|
return {
|
|
@@ -4767,8 +4770,8 @@ async function $f494377581cfb2b4$export$30933c637c977eef({
|
|
|
4767
4770
|
catchify: catchify,
|
|
4768
4771
|
dlog: dlog
|
|
4769
4772
|
} = t,
|
|
4770
|
-
container = [
|
|
4771
|
-
root =
|
|
4773
|
+
container = [...$0bdb8dbcf1bc7f34$export$44951404cb8d0583(container_template)],
|
|
4774
|
+
root = $0bdb8dbcf1bc7f34$export$5e63aea0cac01fa0(container, ".grid")[0],
|
|
4772
4775
|
internal_pre_processors = [...pre_processors],
|
|
4773
4776
|
// copy arrays so we don't unintentionally modify an array of a script calling us when doing auto postprocessor for slider if insertion_promise is defined
|
|
4774
4777
|
internal_post_processors = [...post_processors];
|
|
@@ -4781,7 +4784,7 @@ async function $f494377581cfb2b4$export$30933c637c977eef({
|
|
|
4781
4784
|
root.replaceWith(slider.container);
|
|
4782
4785
|
if (insertion_promise) internal_post_processors.push((t, items, d) => {
|
|
4783
4786
|
for (const item of items) insertion_promise.then(() => {
|
|
4784
|
-
|
|
4787
|
+
$21285393646b9849$export$37125ccc5dd98050({
|
|
4785
4788
|
element: item,
|
|
4786
4789
|
data: {
|
|
4787
4790
|
tenant: t.tenant,
|
|
@@ -4798,7 +4801,7 @@ async function $f494377581cfb2b4$export$30933c637c977eef({
|
|
|
4798
4801
|
});
|
|
4799
4802
|
}
|
|
4800
4803
|
if (!slider || !insertion_promise) internal_post_processors.push((t, items, d) => {
|
|
4801
|
-
for (const item of items)
|
|
4804
|
+
for (const item of items) $21285393646b9849$export$37125ccc5dd98050({
|
|
4802
4805
|
element: item,
|
|
4803
4806
|
data: {
|
|
4804
4807
|
tenant: t.tenant,
|
|
@@ -4812,7 +4815,7 @@ async function $f494377581cfb2b4$export$30933c637c977eef({
|
|
|
4812
4815
|
});
|
|
4813
4816
|
return items;
|
|
4814
4817
|
});
|
|
4815
|
-
const template_tool = await
|
|
4818
|
+
const template_tool = await $51bbc74e39f5e5c6$export$2e2bcd8739ae039({
|
|
4816
4819
|
options: {
|
|
4817
4820
|
...t,
|
|
4818
4821
|
...(template_tool_options || {})
|
|
@@ -4836,7 +4839,7 @@ async function $f494377581cfb2b4$export$30933c637c977eef({
|
|
|
4836
4839
|
if (with_loadmore) catchify($f494377581cfb2b4$var$setup_load_more)(t, root, chunk_size_for_load_more);
|
|
4837
4840
|
if (infinite_scroll) catchify($f494377581cfb2b4$var$setup_infinite_scroll)(t, root);
|
|
4838
4841
|
if (title) {
|
|
4839
|
-
const [title_element] =
|
|
4842
|
+
const [title_element] = $0bdb8dbcf1bc7f34$export$5e63aea0cac01fa0(container, "h1.title, h2.title, h3.title, h4.title, h5.title, h6.title");
|
|
4840
4843
|
if (title_element) {
|
|
4841
4844
|
if (typeof title == "string") title_element.innerText = title;else title_element.replaceWith(...title);
|
|
4842
4845
|
}
|
|
@@ -4881,8 +4884,8 @@ function $f494377581cfb2b4$var$setup_load_more(t, root, chunk_size) {
|
|
|
4881
4884
|
const {
|
|
4882
4885
|
catchify: catchify
|
|
4883
4886
|
} = t,
|
|
4884
|
-
load_more_cont =
|
|
4885
|
-
load_button = load_more_cont.appendChild(
|
|
4887
|
+
load_more_cont = $0bdb8dbcf1bc7f34$export$d3e2a0560cbf4787(`<div class="load-more-container"></div>`),
|
|
4888
|
+
load_button = load_more_cont.appendChild($0bdb8dbcf1bc7f34$export$d3e2a0560cbf4787(`<button class="load_more">Visa mer</button>`));
|
|
4886
4889
|
load_button.addEventListener("click", catchify(load_more_recs_and_hide_button_if_needed));
|
|
4887
4890
|
root.after(load_more_cont);
|
|
4888
4891
|
load_more_recs_and_hide_button_if_needed();
|
|
@@ -4951,7 +4954,7 @@ $acf11540344875ed$export$2e2bcd8739ae039 = (dlog, error_log) => {
|
|
|
4951
4954
|
} : {})
|
|
4952
4955
|
}).then(async response => {
|
|
4953
4956
|
if (!response || !response.ok || response.status !== 200) {
|
|
4954
|
-
if (response.status === 422)
|
|
4957
|
+
if (response.status === 422) $b04e44fad5ea42c7$export$b3bbfd758f11cfa9($acf11540344875ed$var$send_sentry_422)(response, body, stack);
|
|
4955
4958
|
elog("Response not ok", response);
|
|
4956
4959
|
return false;
|
|
4957
4960
|
} else return await response[decode_json ? "json" : "text"]().catch(e => elog("error while decoding json", e));
|
|
@@ -4966,32 +4969,32 @@ $acf11540344875ed$export$2e2bcd8739ae039 = (dlog, error_log) => {
|
|
|
4966
4969
|
async function $acf11540344875ed$var$send_sentry_422(response, body, stack) {
|
|
4967
4970
|
const msg = `Validation error: got 422 from API`;
|
|
4968
4971
|
const text = await response.text();
|
|
4969
|
-
|
|
4972
|
+
$649f456f663da9fc$export$de56f1198d121036(msg, "body", body, "response", response, "text", text, "stack", stack);
|
|
4970
4973
|
(0, $eba382943196079c$export$af2e17a20c2ea3c5).withScope(function (scope) {
|
|
4971
4974
|
scope.setExtra("stack", stack);
|
|
4972
4975
|
scope.setExtra("request_body", body);
|
|
4973
4976
|
scope.setExtra("response", response);
|
|
4974
|
-
scope.setExtra("serialized_response",
|
|
4977
|
+
scope.setExtra("serialized_response", $5c4afc453f904a1f$export$39d526a1194b6499(response));
|
|
4975
4978
|
scope.setExtra("response_text", text);
|
|
4976
4979
|
scope.setLevel("error");
|
|
4977
4980
|
this.captureException(new Error(msg));
|
|
4978
4981
|
});
|
|
4979
4982
|
}
|
|
4980
|
-
const $ca66c9553e84df02$export$dc84183312f0c201 = /*@__PURE__*/(() =>
|
|
4983
|
+
const $ca66c9553e84df02$export$dc84183312f0c201 = /*@__PURE__*/(() => $63cbb5de51d11596$export$25062201e9e25d76("svg", {
|
|
4981
4984
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4982
4985
|
viewBox: "0 0 320 512",
|
|
4983
|
-
children: [
|
|
4986
|
+
children: [$63cbb5de51d11596$export$34b9dba7ce09269b("desc", {
|
|
4984
4987
|
children: "Right arrow"
|
|
4985
|
-
}),
|
|
4988
|
+
}), $63cbb5de51d11596$export$34b9dba7ce09269b("path", {
|
|
4986
4989
|
d: "M285.476 272.971L91.132 467.314c-9.373 9.373-24.569 9.373-33.941 0l-22.667-22.667c-9.357-9.357-9.375-24.522-.04-33.901L188.505 256 34.484 101.255c-9.335-9.379-9.317-24.544.04-33.901l22.667-22.667c9.373-9.373 24.569-9.373 33.941 0L285.475 239.03c9.373 9.372 9.373 24.568.001 33.941z"
|
|
4987
4990
|
})]
|
|
4988
4991
|
}))();
|
|
4989
|
-
const $ca66c9553e84df02$export$6038895ac52bd044 = /*@__PURE__*/(() =>
|
|
4992
|
+
const $ca66c9553e84df02$export$6038895ac52bd044 = /*@__PURE__*/(() => $63cbb5de51d11596$export$25062201e9e25d76("svg", {
|
|
4990
4993
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4991
4994
|
viewBox: "0 0 320 512",
|
|
4992
|
-
children: [
|
|
4995
|
+
children: [$63cbb5de51d11596$export$34b9dba7ce09269b("desc", {
|
|
4993
4996
|
children: "Left arrow"
|
|
4994
|
-
}),
|
|
4997
|
+
}), $63cbb5de51d11596$export$34b9dba7ce09269b("path", {
|
|
4995
4998
|
d: "M34.52 239.03L228.87 44.69c9.37-9.37 24.57-9.37 33.94 0l22.67 22.67c9.36 9.36 9.37 24.52.04 33.9L131.49 256l154.02 154.75c9.34 9.38 9.32 24.54-.04 33.9l-22.67 22.67c-9.37 9.37-24.57 9.37-33.94 0L34.52 272.97c-9.37-9.37-9.37-24.57 0-33.94z"
|
|
4996
4999
|
})]
|
|
4997
5000
|
}))();
|
|
@@ -5008,7 +5011,7 @@ const $9a744f57ab06c32e$export$68c017fd93791405 = ({
|
|
|
5008
5011
|
container.append(content);
|
|
5009
5012
|
const expand = () => {
|
|
5010
5013
|
container.style.height = content.clientHeight + "px";
|
|
5011
|
-
setTimeout(
|
|
5014
|
+
setTimeout($b04e44fad5ea42c7$export$b3bbfd758f11cfa9(() => {
|
|
5012
5015
|
container.style.overflow = "unset";
|
|
5013
5016
|
container.style.height = "auto";
|
|
5014
5017
|
}), duration);
|
|
@@ -5020,14 +5023,14 @@ const $9a744f57ab06c32e$export$68c017fd93791405 = ({
|
|
|
5020
5023
|
};
|
|
5021
5024
|
};
|
|
5022
5025
|
function $693e2a1517bef984$export$f8913c8a18f7ca21(iterables) {
|
|
5023
|
-
const ourselves =
|
|
5026
|
+
const ourselves = $607fc90221d440a6$export$e806c6c1615a59ae();
|
|
5024
5027
|
const values = new Array(iterables.length);
|
|
5025
|
-
Promise.all(iterables.map(
|
|
5028
|
+
Promise.all(iterables.map($b04e44fad5ea42c7$export$b3bbfd758f11cfa9(async (iterable, index) => {
|
|
5026
5029
|
for await (const value of iterable) {
|
|
5027
5030
|
values[index] = value;
|
|
5028
5031
|
ourselves([...values]);
|
|
5029
5032
|
}
|
|
5030
|
-
}))).then(
|
|
5033
|
+
}))).then($b04e44fad5ea42c7$export$b3bbfd758f11cfa9(ourselves.exit));
|
|
5031
5034
|
return ourselves;
|
|
5032
5035
|
}
|
|
5033
5036
|
const $30e801eaa3dc319e$export$717f13d9ba00ca19 = (min, max) => `@media ${min ? `(min-width:${min})` : ``}${min && max ? ` and ` : ``}${max ? `(max-width:${max})` : ``}`;
|
|
@@ -5050,16 +5053,16 @@ async function $30e801eaa3dc319e$export$c84671f46d6a1ca({
|
|
|
5050
5053
|
ipns: ipns
|
|
5051
5054
|
} = rows_or_empty_object;
|
|
5052
5055
|
const is_static = !ipns && !button;
|
|
5053
|
-
const our_style_el =
|
|
5056
|
+
const our_style_el = $63cbb5de51d11596$export$34b9dba7ce09269b("style", {
|
|
5054
5057
|
type: "text/css"
|
|
5055
5058
|
});
|
|
5056
|
-
const container_class =
|
|
5059
|
+
const container_class = $460df8550f9d084d$export$a6db784f019668ba();
|
|
5057
5060
|
const selector_beginning = `.depict .${container_class}>`;
|
|
5058
|
-
const el_count_ipns =
|
|
5061
|
+
const el_count_ipns = $607fc90221d440a6$export$e806c6c1615a59ae();
|
|
5059
5062
|
const set_length = () => el_count_ipns(container_element.children.length);
|
|
5060
5063
|
const col_styling = $30e801eaa3dc319e$export$17c3166a7ebd4688(selector_beginning, grid_spacing, cols_at_size, layout, override_vertical_spacing);
|
|
5061
5064
|
let button_class;
|
|
5062
|
-
ipns ||=
|
|
5065
|
+
ipns ||= $607fc90221d440a6$export$e806c6c1615a59ae();
|
|
5063
5066
|
container_element.after(our_style_el);
|
|
5064
5067
|
container_element.classList.add(container_class);
|
|
5065
5068
|
if (rows === "all") {
|
|
@@ -5069,7 +5072,7 @@ async function $30e801eaa3dc319e$export$c84671f46d6a1ca({
|
|
|
5069
5072
|
}
|
|
5070
5073
|
ipns(start_rows);
|
|
5071
5074
|
set_length();
|
|
5072
|
-
const mutation_observer = new MutationObserver(
|
|
5075
|
+
const mutation_observer = new MutationObserver($b04e44fad5ea42c7$export$b3bbfd758f11cfa9(set_length));
|
|
5073
5076
|
(0, $0b48ba2f40ce6067$export$b6ae1bc530f4c149).oncreation(container_element, ({
|
|
5074
5077
|
element: element
|
|
5075
5078
|
}) => {
|
|
@@ -5088,15 +5091,15 @@ async function $30e801eaa3dc319e$export$c84671f46d6a1ca({
|
|
|
5088
5091
|
ipns.exit();
|
|
5089
5092
|
});
|
|
5090
5093
|
if (button) {
|
|
5091
|
-
button_class =
|
|
5092
|
-
const button_container =
|
|
5094
|
+
button_class = $460df8550f9d084d$export$a6db784f019668ba();
|
|
5095
|
+
const button_container = $63cbb5de51d11596$export$34b9dba7ce09269b("div", {
|
|
5093
5096
|
class: "load-more-container " + button_class,
|
|
5094
|
-
children:
|
|
5097
|
+
children: $b9b0dba897847b2a$export$f63fcc839cb0f734("click", () => ipns(ipns.state + (rows_or_empty_object.rows_per_click ?? 1)), button)
|
|
5095
5098
|
});
|
|
5096
5099
|
container_element.after(button_container);
|
|
5097
5100
|
}
|
|
5098
5101
|
(0, $0b48ba2f40ce6067$export$b6ae1bc530f4c149).oncreation(container_element, async () => {
|
|
5099
|
-
for await (const [currently_showing_rows, number_of_els] of
|
|
5102
|
+
for await (const [currently_showing_rows, number_of_els] of $693e2a1517bef984$export$f8913c8a18f7ca21([
|
|
5100
5103
|
// start for await loop when the container element gets inserted into the DOM
|
|
5101
5104
|
// the loop is broken by an observer.onremoved above calling .exit on the IPNS this depends on
|
|
5102
5105
|
// @ts-ignore
|
|
@@ -5264,7 +5267,7 @@ async function $090b8182afa1b2a6$export$b0a773486c1c2312(t, recommendation_rende
|
|
|
5264
5267
|
eager_images: eager_images,
|
|
5265
5268
|
...options_for_grid
|
|
5266
5269
|
}) {
|
|
5267
|
-
const [insertion_point] =
|
|
5270
|
+
const [insertion_point] = $0bdb8dbcf1bc7f34$export$5e63aea0cac01fa0(container_elements, container_selector || ".grid");
|
|
5268
5271
|
const rendering_result = await (override_rec_renderer || (0, $6be99244fa573db5$export$2e2bcd8739ae039))(t, recommendation_renderer_options);
|
|
5269
5272
|
const {
|
|
5270
5273
|
elements: elements
|
|
@@ -5275,7 +5278,7 @@ async function $090b8182afa1b2a6$export$b0a773486c1c2312(t, recommendation_rende
|
|
|
5275
5278
|
// when the elements are in the DOM starts IntersectionObserver on whole grid
|
|
5276
5279
|
// when grid intersects starts Lazyfier
|
|
5277
5280
|
// this is because Lazyfier is fucking stupid
|
|
5278
|
-
(0, $0b48ba2f40ce6067$export$b6ae1bc530f4c149).wait_for_element(insertion_point).then(
|
|
5281
|
+
(0, $0b48ba2f40ce6067$export$b6ae1bc530f4c149).wait_for_element(insertion_point).then($b04e44fad5ea42c7$export$b3bbfd758f11cfa9(element => {
|
|
5279
5282
|
let start_lazy_loading;
|
|
5280
5283
|
const lazy_loading_promise = new Promise(r => start_lazy_loading = r);
|
|
5281
5284
|
const lf = new (0, $b83068cbd26dcc41$export$3be7054c61590ee3)({
|
|
@@ -5284,7 +5287,7 @@ async function $090b8182afa1b2a6$export$b0a773486c1c2312(t, recommendation_rende
|
|
|
5284
5287
|
...lazyfier_options
|
|
5285
5288
|
});
|
|
5286
5289
|
lf.start_observing_for_new_children_(element);
|
|
5287
|
-
const i_o = new IntersectionObserver(
|
|
5290
|
+
const i_o = new IntersectionObserver($b04e44fad5ea42c7$export$b3bbfd758f11cfa9(records => {
|
|
5288
5291
|
for (const record of records) if (record.intersectionRatio > 0) {
|
|
5289
5292
|
start_lazy_loading();
|
|
5290
5293
|
i_o.disconnect();
|
|
@@ -5294,7 +5297,7 @@ async function $090b8182afa1b2a6$export$b0a773486c1c2312(t, recommendation_rende
|
|
|
5294
5297
|
i_o.observe(insertion_point);
|
|
5295
5298
|
}));
|
|
5296
5299
|
insertion_point.append(...elements);
|
|
5297
|
-
|
|
5300
|
+
$30e801eaa3dc319e$export$c84671f46d6a1ca({
|
|
5298
5301
|
...options_for_grid,
|
|
5299
5302
|
container_element: insertion_point,
|
|
5300
5303
|
layout: "grid"
|
|
@@ -5306,8 +5309,8 @@ async function $090b8182afa1b2a6$export$b0a773486c1c2312(t, recommendation_rende
|
|
|
5306
5309
|
}
|
|
5307
5310
|
|
|
5308
5311
|
// @ts-ignore
|
|
5309
|
-
var $
|
|
5310
|
-
$
|
|
5312
|
+
var $f2bd9116db2dd7da$exports = {};
|
|
5313
|
+
$f2bd9116db2dd7da$exports = ".depict-slider {\n width: 100%;\n position: relative;\n}\n\n.depict-slider .sliding {\n scroll-behavior: smooth;\n -ms-overflow-style: none;\n scrollbar-width: none;\n flex-flow: row;\n display: flex;\n overflow-x: scroll;\n}\n\n.depict-slider .sliding::-webkit-scrollbar {\n display: none;\n}\n\n.depict-slider .sliding > * {\n box-sizing: border-box;\n flex: none;\n}\n\n";
|
|
5311
5314
|
let $30f78542ed78cd31$var$slider_styling_was_inserted = false;
|
|
5312
5315
|
async function $30f78542ed78cd31$export$82cfdc85a4d15688(t, recommendation_renderer_options, {
|
|
5313
5316
|
container_elements: container_elements,
|
|
@@ -5321,7 +5324,7 @@ async function $30f78542ed78cd31$export$82cfdc85a4d15688(t, recommendation_rende
|
|
|
5321
5324
|
rows = "all",
|
|
5322
5325
|
...slider_options
|
|
5323
5326
|
}) {
|
|
5324
|
-
const [insertion_point] =
|
|
5327
|
+
const [insertion_point] = $0bdb8dbcf1bc7f34$export$5e63aea0cac01fa0(container_elements, container_selector || ".grid");
|
|
5325
5328
|
const slider = eager_images ? new (0, $ef9394fafebd5eab$export$692b27c28639e5b9)(slider_options) : new (0, $c33c6faf8acc7442$export$68babfc5be0de5da)(slider_options, lazyfier_options);
|
|
5326
5329
|
const rendering_result = await (override_rec_renderer || (0, $6be99244fa573db5$export$2e2bcd8739ae039))(t, recommendation_renderer_options);
|
|
5327
5330
|
const {
|
|
@@ -5330,18 +5333,18 @@ async function $30f78542ed78cd31$export$82cfdc85a4d15688(t, recommendation_rende
|
|
|
5330
5333
|
if (!elements) return rendering_result;
|
|
5331
5334
|
if (!$30f78542ed78cd31$var$slider_styling_was_inserted) {
|
|
5332
5335
|
$30f78542ed78cd31$var$slider_styling_was_inserted = true;
|
|
5333
|
-
|
|
5336
|
+
$0a581f1dfa083522$export$59ba1eb2c083f0cd((0, /*@__PURE__*/$parcel$interopDefault($f2bd9116db2dd7da$exports)));
|
|
5334
5337
|
}
|
|
5335
5338
|
insertion_point.replaceWith(slider.container);
|
|
5336
5339
|
slider.insert_here.append(...elements);
|
|
5337
|
-
|
|
5340
|
+
$30e801eaa3dc319e$export$c84671f46d6a1ca({
|
|
5338
5341
|
grid_spacing: grid_spacing,
|
|
5339
5342
|
cols_at_size: cols_at_size,
|
|
5340
5343
|
container_element: slider.insert_here,
|
|
5341
5344
|
rows: rows,
|
|
5342
5345
|
layout: "slider",
|
|
5343
5346
|
override_vertical_spacing: override_vertical_spacing
|
|
5344
|
-
}).catch(e =>
|
|
5347
|
+
}).catch(e => $b04e44fad5ea42c7$export$f18d5b0af29128b7([e, "Grid had an error"], "warning"));
|
|
5345
5348
|
return {
|
|
5346
5349
|
...rendering_result,
|
|
5347
5350
|
slider: slider,
|
|
@@ -5365,11 +5368,11 @@ function $be40b7bf11a47cc4$export$8cbd8aa1c70f9a13(interval = 5000) {
|
|
|
5365
5368
|
return {
|
|
5366
5369
|
constructor_plugin() {
|
|
5367
5370
|
const set_scroll_int = interval_scroll.bind(this);
|
|
5368
|
-
this.container.addEventListener("click",
|
|
5371
|
+
this.container.addEventListener("click", $b04e44fad5ea42c7$export$b3bbfd758f11cfa9(() => {
|
|
5369
5372
|
clearInterval(timer);
|
|
5370
5373
|
set_scroll_int();
|
|
5371
5374
|
}));
|
|
5372
|
-
this.container.addEventListener("mousedown",
|
|
5375
|
+
this.container.addEventListener("mousedown", $b04e44fad5ea42c7$export$b3bbfd758f11cfa9(() => {
|
|
5373
5376
|
clearInterval(timer);
|
|
5374
5377
|
}));
|
|
5375
5378
|
set_scroll_int();
|
|
@@ -5386,7 +5389,7 @@ function $d31b48b85102c1ec$export$80039a49055269fb() {
|
|
|
5386
5389
|
return Object.fromEntries(["left", "right"].map(side => [side, [new_arrowimage()]]));
|
|
5387
5390
|
}
|
|
5388
5391
|
function $a75adf1478c4522f$export$af88b4929c2dc86() {
|
|
5389
|
-
const img =
|
|
5392
|
+
const img = $63cbb5de51d11596$export$34b9dba7ce09269b("img", {
|
|
5390
5393
|
src: "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHN0eWxlPSJkaXNwbGF5OiBpbmxpbmUtYmxvY2s7IHZlcnRpY2FsLWFsaWduOiBtaWRkbGU7IiB3aWR0aD0iMTZweCIgaGVpZ2h0PSIxNnB4IiB2aWV3Qm94PSIwIDAgOCAxNSI+PHBhdGggc3R5bGU9ImZpbGw6IHJnYigwLCAwLCAwKTsiIGQ9Ik0uNjI5LjAwMWMuMTUuMDA4LjI5My4wNzIuMzk4LjE4bDYuNzkyIDYuODlhLjYwMS42MDEgMCAwIDEgMCAuODZsLTYuNzkyIDYuODg4YS41ODYuNTg2IDAgMCAxLS44NDYgMCAuNjAxLjYwMSAwIDAgMSAwLS44Nkw2LjU1NCA3LjUuMjExIDEuMDAxYS42MDEuNjAxIDAgMCAxIDAtLjg2Yy4xMTUtLjEuMjY2LS4xNS40MTgtLjE0Ij48L3BhdGg+PC9zdmc+"
|
|
5391
5394
|
});
|
|
5392
5395
|
return {
|
|
@@ -5481,12 +5484,12 @@ function $2436f68ea927d4a8$export$1d17a045bcc711b1({
|
|
|
5481
5484
|
};
|
|
5482
5485
|
}
|
|
5483
5486
|
function $2436f68ea927d4a8$export$a09282b33e69b43f(unique_name) {
|
|
5484
|
-
return
|
|
5487
|
+
return $63cbb5de51d11596$export$25062201e9e25d76("label", {
|
|
5485
5488
|
class: "checkbox_container",
|
|
5486
|
-
children: [
|
|
5489
|
+
children: [$63cbb5de51d11596$export$34b9dba7ce09269b("input", {
|
|
5487
5490
|
type: "radio",
|
|
5488
5491
|
name: `radio-${unique_name}`
|
|
5489
|
-
}),
|
|
5492
|
+
}), $63cbb5de51d11596$export$34b9dba7ce09269b("span", {
|
|
5490
5493
|
class: "checkmark"
|
|
5491
5494
|
})]
|
|
5492
5495
|
});
|
|
@@ -5570,7 +5573,7 @@ function $9bb2400c4e2e9335$export$411b0f20794697ce(t) {
|
|
|
5570
5573
|
}
|
|
5571
5574
|
function mutation_plugin(intersections, intersecting_mutations) {}
|
|
5572
5575
|
function instant_post_pro(items) {
|
|
5573
|
-
|
|
5576
|
+
$0bdb8dbcf1bc7f34$export$5e63aea0cac01fa0(items, "a, img, canvas").forEach(el => {
|
|
5574
5577
|
// @ts-ignore
|
|
5575
5578
|
el.draggable = false;
|
|
5576
5579
|
el.addEventListener("dragstart", e => {
|
|
@@ -5632,10 +5635,10 @@ function $52292921bc0fc31f$export$5723caf9a8335aa6(_t, fraction = 1, max_steps,
|
|
|
5632
5635
|
configurable: true,
|
|
5633
5636
|
enumerable: true,
|
|
5634
5637
|
set(v) {
|
|
5635
|
-
|
|
5638
|
+
$7547e32486a3abc0$export$8048b892d651b310(new Error("Cannot set steps to slide manually when using fractional scroll"));
|
|
5636
5639
|
return v;
|
|
5637
5640
|
},
|
|
5638
|
-
get:
|
|
5641
|
+
get: $b04e44fad5ea42c7$export$b3bbfd758f11cfa9(() => {
|
|
5639
5642
|
const sliding_width = sliding.getBoundingClientRect().width;
|
|
5640
5643
|
const first_rec = sliding.firstElementChild;
|
|
5641
5644
|
if (!first_rec)
|
|
@@ -5647,7 +5650,7 @@ function $52292921bc0fc31f$export$5723caf9a8335aa6(_t, fraction = 1, max_steps,
|
|
|
5647
5650
|
const stepsize_limited_up = max_steps && calculated_stepsize > max_steps ? max_steps : calculated_stepsize;
|
|
5648
5651
|
const stepsize_limited_up_and_down = min_steps && stepsize_limited_up < min_steps ? min_steps : stepsize_limited_up;
|
|
5649
5652
|
const stepby = stepsize_limited_up_and_down || fallback_stepsize;
|
|
5650
|
-
if (stepby != calculated_stepsize)
|
|
5653
|
+
if (stepby != calculated_stepsize) $649f456f663da9fc$export$de56f1198d121036("going by", stepby, "because of max_steps or invalid stepsize");
|
|
5651
5654
|
return stepby;
|
|
5652
5655
|
})
|
|
5653
5656
|
});
|
|
@@ -5660,10 +5663,10 @@ function $52292921bc0fc31f$export$5723caf9a8335aa6(_t, fraction = 1, max_steps,
|
|
|
5660
5663
|
}
|
|
5661
5664
|
function $f78bc6a06402a6cf$export$93223e488e7ee078(options) {
|
|
5662
5665
|
function constructor_plugin(_slider_options) {
|
|
5663
|
-
const scroll_bar =
|
|
5666
|
+
const scroll_bar = $63cbb5de51d11596$export$34b9dba7ce09269b("div", {
|
|
5664
5667
|
class: "depict_slider_scroll_bar"
|
|
5665
5668
|
});
|
|
5666
|
-
const scroll_container =
|
|
5669
|
+
const scroll_container = $63cbb5de51d11596$export$34b9dba7ce09269b("div", {
|
|
5667
5670
|
class: "depict_slider_scroll_container"
|
|
5668
5671
|
});
|
|
5669
5672
|
if (options.scroll_bar_classes?.length) scroll_bar.classList.add(...options.scroll_bar_classes);
|
|
@@ -5698,14 +5701,14 @@ function $06fe260f91efff62$export$b36d2489a5a16728(_t, {
|
|
|
5698
5701
|
} = {}) {
|
|
5699
5702
|
function constructor_plugin(_slider_options) {
|
|
5700
5703
|
const slider_this = this;
|
|
5701
|
-
const random_classname = "x" +
|
|
5704
|
+
const random_classname = "x" + $460df8550f9d084d$export$656831b7e9c341c3().replaceAll(".", "");
|
|
5702
5705
|
slider_this.insert_here.classList.add(random_classname);
|
|
5703
5706
|
const style = document.createElement("style");
|
|
5704
5707
|
style.append(`.depict .${random_classname}{scroll-snap-type:x mandatory}.depict .${random_classname}>*:nth-child(${snapEvery ?? 1}n + 1){scroll-snap-align:${align || "start"}}`);
|
|
5705
5708
|
slider_this.snap_style = slider_this.container.appendChild(style);
|
|
5706
5709
|
$06fe260f91efff62$export$49b950309ab787ad().then(we_can => {
|
|
5707
5710
|
if (!we_can) {
|
|
5708
|
-
|
|
5711
|
+
$649f456f663da9fc$export$de56f1198d121036("Disabling slider snapping due browser where it's impossible to have working buttons and css snapping");
|
|
5709
5712
|
style.remove();
|
|
5710
5713
|
delete slider_this["snap_style"];
|
|
5711
5714
|
}
|
|
@@ -5721,9 +5724,9 @@ function $06fe260f91efff62$export$b36d2489a5a16728(_t, {
|
|
|
5721
5724
|
}
|
|
5722
5725
|
async function $06fe260f91efff62$export$49b950309ab787ad() {
|
|
5723
5726
|
if ("scrollBehavior" in document.documentElement.style) return true;
|
|
5724
|
-
const test_div =
|
|
5727
|
+
const test_div = $63cbb5de51d11596$export$34b9dba7ce09269b("div", {
|
|
5725
5728
|
style: "position: absolute; width: 1em; overflow: scroll; scroll-snap-type: x mandatory;",
|
|
5726
|
-
children:
|
|
5729
|
+
children: $63cbb5de51d11596$export$34b9dba7ce09269b("div", {
|
|
5727
5730
|
style: "scroll-snap-align: start; color: transparent;",
|
|
5728
5731
|
children: "test"
|
|
5729
5732
|
})
|
|
@@ -5758,14 +5761,14 @@ function $40bfd400d76a6ec1$export$dac64fd35a4805a4(options = {}) {
|
|
|
5758
5761
|
insert_here: sliding
|
|
5759
5762
|
} = this;
|
|
5760
5763
|
const scroll_abs_no_negative = target => this.scroll_to_abs(target < 0 ? 0 : target); // the slider ignores everything < 0 but we want it to move to the first card
|
|
5761
|
-
sliding.addEventListener("mousedown",
|
|
5764
|
+
sliding.addEventListener("mousedown", $b04e44fad5ea42c7$export$b3bbfd758f11cfa9(() => {
|
|
5762
5765
|
lock_on_element.lock_active = true;
|
|
5763
5766
|
const starting_ratio_left = ratio_left.ratio;
|
|
5764
5767
|
lock_on_element.left = ratio_left.element;
|
|
5765
5768
|
const starting_ratio_right = ratio_right.ratio;
|
|
5766
5769
|
lock_on_element.right = ratio_right.element;
|
|
5767
5770
|
const scroll_left_start = sliding.scrollLeft;
|
|
5768
|
-
const mouseup_listener =
|
|
5771
|
+
const mouseup_listener = $b04e44fad5ea42c7$export$b3bbfd758f11cfa9(e => {
|
|
5769
5772
|
lock_on_element.lock_active = false;
|
|
5770
5773
|
const delta_left = Math.abs(ratio_left.ratio - starting_ratio_left);
|
|
5771
5774
|
const delta_right = Math.abs(ratio_right.ratio - starting_ratio_right);
|
|
@@ -5777,7 +5780,7 @@ function $40bfd400d76a6ec1$export$dac64fd35a4805a4(options = {}) {
|
|
|
5777
5780
|
try {
|
|
5778
5781
|
currently_visible = Math.floor(this.insert_here.getBoundingClientRect().width / this.insert_here.firstElementChild.getBoundingClientRect().width);
|
|
5779
5782
|
} catch (e) {
|
|
5780
|
-
|
|
5783
|
+
$b04e44fad5ea42c7$export$f18d5b0af29128b7(e, "warning");
|
|
5781
5784
|
}
|
|
5782
5785
|
const stepsize = options.stepsize || currently_visible || 4;
|
|
5783
5786
|
if (scrolled_right) scroll_abs_no_negative(+currently_left + stepsize);else scroll_abs_no_negative(+currently_left - stepsize);
|
|
@@ -5821,8 +5824,8 @@ function $40bfd400d76a6ec1$export$dac64fd35a4805a4(options = {}) {
|
|
|
5821
5824
|
}
|
|
5822
5825
|
}
|
|
5823
5826
|
return {
|
|
5824
|
-
constructor_plugin:
|
|
5825
|
-
mutation_plugin:
|
|
5827
|
+
constructor_plugin: $b04e44fad5ea42c7$export$b3bbfd758f11cfa9(constructor_plugin),
|
|
5828
|
+
mutation_plugin: $b04e44fad5ea42c7$export$b3bbfd758f11cfa9(mutation_plugin)
|
|
5826
5829
|
};
|
|
5827
5830
|
}
|
|
5828
5831
|
function $556d9c321900f1d4$export$53306504b987cbf7({
|
|
@@ -5844,7 +5847,7 @@ function $556d9c321900f1d4$export$53306504b987cbf7({
|
|
|
5844
5847
|
let are_far_right = false;
|
|
5845
5848
|
let inactive_checker_timeout;
|
|
5846
5849
|
// let elgreen;
|
|
5847
|
-
const check_if_we_inactive =
|
|
5850
|
+
const check_if_we_inactive = $b04e44fad5ea42c7$export$b3bbfd758f11cfa9(function () {
|
|
5848
5851
|
// const { insert_here: sliding } = this;
|
|
5849
5852
|
const now = window?.performance?.now?.() || +new Date();
|
|
5850
5853
|
const time_since_ran = now - last_move;
|
|
@@ -5855,7 +5858,7 @@ function $556d9c321900f1d4$export$53306504b987cbf7({
|
|
|
5855
5858
|
// sliding.style.background = "green";
|
|
5856
5859
|
// elgreen = true;
|
|
5857
5860
|
// }
|
|
5858
|
-
|
|
5861
|
+
$b04e44fad5ea42c7$export$b3bbfd758f11cfa9($556d9c321900f1d4$var$scroll_idle)(this, originally_rendered_elements.length, clones_per_side);
|
|
5859
5862
|
inactive_checker_running = false;
|
|
5860
5863
|
} else {
|
|
5861
5864
|
// if (elgreen !== false) {
|
|
@@ -5869,10 +5872,10 @@ function $556d9c321900f1d4$export$53306504b987cbf7({
|
|
|
5869
5872
|
function constructor_plugin() {
|
|
5870
5873
|
window.addEventListener("touchstart", () => touches++);
|
|
5871
5874
|
window.addEventListener("touchend", () => touches--);
|
|
5872
|
-
this.insert_here.addEventListener("scroll",
|
|
5875
|
+
this.insert_here.addEventListener("scroll", $b04e44fad5ea42c7$export$b3bbfd758f11cfa9(() => {
|
|
5873
5876
|
last_move = window?.performance?.now?.() || +new Date();
|
|
5874
5877
|
}));
|
|
5875
|
-
const mo = new MutationObserver(
|
|
5878
|
+
const mo = new MutationObserver($b04e44fad5ea42c7$export$b3bbfd758f11cfa9(records => {
|
|
5876
5879
|
for (const record of records) for (const node of record.removedNodes) {
|
|
5877
5880
|
if (removed_by_us.has(node)) {
|
|
5878
5881
|
removed_by_us.delete(node);
|
|
@@ -5881,7 +5884,7 @@ function $556d9c321900f1d4$export$53306504b987cbf7({
|
|
|
5881
5884
|
for (const a_set of sets_of_els) {
|
|
5882
5885
|
const index_in_el_set = a_set.indexOf(node);
|
|
5883
5886
|
if (index_in_el_set >= 0) {
|
|
5884
|
-
|
|
5887
|
+
$649f456f663da9fc$export$de56f1198d121036("Removing", node, "from el set", a_set);
|
|
5885
5888
|
a_set.splice(index_in_el_set, 1);
|
|
5886
5889
|
}
|
|
5887
5890
|
}
|
|
@@ -5910,7 +5913,7 @@ function $556d9c321900f1d4$export$53306504b987cbf7({
|
|
|
5910
5913
|
// calculate how many cards including margin the slider fits
|
|
5911
5914
|
const first_rect = first_element.getBoundingClientRect();
|
|
5912
5915
|
if (!first_rect.width) {
|
|
5913
|
-
|
|
5916
|
+
$649f456f663da9fc$export$de56f1198d121036(first_rect);
|
|
5914
5917
|
throw new Error("First rect doesn't have width");
|
|
5915
5918
|
}
|
|
5916
5919
|
const second_rect = second_element.getBoundingClientRect();
|
|
@@ -5928,7 +5931,7 @@ function $556d9c321900f1d4$export$53306504b987cbf7({
|
|
|
5928
5931
|
}
|
|
5929
5932
|
if (dont_wraparound) {
|
|
5930
5933
|
if (surplus_in_body) {
|
|
5931
|
-
|
|
5934
|
+
$649f456f663da9fc$export$de56f1198d121036("Removing surplus of els. Total els: ", sets_of_els);
|
|
5932
5935
|
// @ts-ignore
|
|
5933
5936
|
for (let i = (sets_of_els.length || 1) - 1; i--;) for (let j = 0; j < sets_of_els[i].length; j++) {
|
|
5934
5937
|
const el = sets_of_els[i][j];
|
|
@@ -5944,7 +5947,7 @@ function $556d9c321900f1d4$export$53306504b987cbf7({
|
|
|
5944
5947
|
return;
|
|
5945
5948
|
}
|
|
5946
5949
|
if (!surplus_in_body) {
|
|
5947
|
-
|
|
5950
|
+
$649f456f663da9fc$export$de56f1198d121036("Adding surplus of els");
|
|
5948
5951
|
this.insert_here.append(...sets_of_els.slice(0, -1).flat());
|
|
5949
5952
|
this.invalidate_cache();
|
|
5950
5953
|
surplus_in_body = true;
|
|
@@ -5982,11 +5985,11 @@ function $556d9c321900f1d4$export$53306504b987cbf7({
|
|
|
5982
5985
|
if (our_index >= 0) post_processors.splice(our_index, 1);else {
|
|
5983
5986
|
const msg = "Couldn't find ourselves in post processors, infinite loop might ensue. Exiting. Wraparound will be broken.";
|
|
5984
5987
|
(0, $eba382943196079c$export$af2e17a20c2ea3c5).captureException(new Error(msg));
|
|
5985
|
-
|
|
5988
|
+
$649f456f663da9fc$export$de56f1198d121036(msg, () => {});
|
|
5986
5989
|
return elements;
|
|
5987
5990
|
}
|
|
5988
5991
|
for (let i = 0; i < clones_per_side * 2; i++) {
|
|
5989
|
-
const additional_render = await
|
|
5992
|
+
const additional_render = await $5cbe24d064a033ed$export$a9fc160c5ed83bd7(info.t, {
|
|
5990
5993
|
...rendering_options,
|
|
5991
5994
|
post_processors: post_processors,
|
|
5992
5995
|
pre_processors: [],
|
|
@@ -6100,7 +6103,7 @@ function $49c4fa2e27e642fa$export$3d04c40e7acc1a32(initial_value) {
|
|
|
6100
6103
|
function $29407d8301dc2f23$export$515c3ea4d599b05a(
|
|
6101
6104
|
// inspired by code in houdinisportswear modify script
|
|
6102
6105
|
query, handler, initial_call = true) {
|
|
6103
|
-
const catchified_handler =
|
|
6106
|
+
const catchified_handler = $b04e44fad5ea42c7$export$b3bbfd758f11cfa9(handler, "Error in media query listener callback");
|
|
6104
6107
|
if (typeof window !== "object") {
|
|
6105
6108
|
// on server call the handler in case nothing is rendered if it isn't called, then do nothing
|
|
6106
6109
|
catchified_handler({
|
|
@@ -6128,9 +6131,9 @@ async function $159237486410355f$export$417ef0ab13d8b984({
|
|
|
6128
6131
|
let resolve_success_promise;
|
|
6129
6132
|
const success_promise = new Promise(r => resolve_success_promise = r);
|
|
6130
6133
|
const cache = new Map();
|
|
6131
|
-
const [template_els, _get, set_els] =
|
|
6132
|
-
const catchified_switch_to_surface =
|
|
6133
|
-
|
|
6134
|
+
const [template_els, _get, set_els] = $49c4fa2e27e642fa$export$3d04c40e7acc1a32();
|
|
6135
|
+
const catchified_switch_to_surface = $b04e44fad5ea42c7$export$b3bbfd758f11cfa9($159237486410355f$var$switch_to_surface);
|
|
6136
|
+
$b04e44fad5ea42c7$export$b3bbfd758f11cfa9(async () => {
|
|
6134
6137
|
for await (const surface of current_surface_) {
|
|
6135
6138
|
const rendering_function = surface_rendering_functions_[surface];
|
|
6136
6139
|
catchified_switch_to_surface(surface, rendering_function, current_surface_, cache, set_els, resolve_success_promise);
|
|
@@ -6148,9 +6151,9 @@ async function $159237486410355f$var$switch_to_surface(surface_index, rendering_
|
|
|
6148
6151
|
const {
|
|
6149
6152
|
cache_until_: cache_until_,
|
|
6150
6153
|
surface_: surface_
|
|
6151
|
-
} = await rendering_function().catch(e => (
|
|
6154
|
+
} = await rendering_function().catch(e => ($b04e44fad5ea42c7$export$f18d5b0af29128b7([e, "error in rendering"], "warning"), {}));
|
|
6152
6155
|
if (!surface_ || !surface_?.elements?.length) {
|
|
6153
|
-
|
|
6156
|
+
$649f456f663da9fc$export$de56f1198d121036("Got no/empty surface, not switching");
|
|
6154
6157
|
// also tell insert_surface that we didn't get recs so it can revert, dunno if we want this
|
|
6155
6158
|
resolve_success_promise(false);
|
|
6156
6159
|
return;
|
|
@@ -6158,17 +6161,17 @@ async function $159237486410355f$var$switch_to_surface(surface_index, rendering_
|
|
|
6158
6161
|
rendered_surface = surface_;
|
|
6159
6162
|
if (cache_until_ instanceof Promise) {
|
|
6160
6163
|
cache.set(surface_index, surface_);
|
|
6161
|
-
cache_until_.then(
|
|
6164
|
+
cache_until_.then($b04e44fad5ea42c7$export$b3bbfd758f11cfa9(() => cache.delete(surface_index)));
|
|
6162
6165
|
}
|
|
6163
6166
|
}
|
|
6164
6167
|
if (current_surface_ipns.state !== surface_index) {
|
|
6165
|
-
|
|
6168
|
+
$649f456f663da9fc$export$de56f1198d121036("Surface switched to", current_surface_ipns.state, "while rendering surface", surface_index, "discarding results");
|
|
6166
6169
|
return;
|
|
6167
6170
|
}
|
|
6168
6171
|
set_els(rendered_surface.elements);
|
|
6169
6172
|
if (rendered_surface.should_stay_inserted instanceof Promise)
|
|
6170
6173
|
// if there is promise that says if surface succeeded or not, use that
|
|
6171
|
-
rendered_surface.should_stay_inserted.then(
|
|
6174
|
+
rendered_surface.should_stay_inserted.then($b04e44fad5ea42c7$export$b3bbfd758f11cfa9(success => {
|
|
6172
6175
|
resolve_success_promise(success);
|
|
6173
6176
|
}));else
|
|
6174
6177
|
// otherwise let's just assume it suceeded since there are elements
|
|
@@ -6176,12 +6179,12 @@ async function $159237486410355f$var$switch_to_surface(surface_index, rendering_
|
|
|
6176
6179
|
}
|
|
6177
6180
|
function $159237486410355f$export$419f84efad7d9fe(surface_per_size, cleanup_promise) {
|
|
6178
6181
|
let microtask_queued = false;
|
|
6179
|
-
const ipns =
|
|
6182
|
+
const ipns = $607fc90221d440a6$export$e806c6c1615a59ae();
|
|
6180
6183
|
const target_indexes = new Set();
|
|
6181
|
-
const dedupe_overlapping_queries =
|
|
6184
|
+
const dedupe_overlapping_queries = $b04e44fad5ea42c7$export$b3bbfd758f11cfa9(() => {
|
|
6182
6185
|
microtask_queued = false;
|
|
6183
6186
|
const first_value = target_indexes[Symbol.iterator]().next().value;
|
|
6184
|
-
if (first_value === ipns.latest_call_value)
|
|
6187
|
+
if (first_value === ipns.latest_call_value) $649f456f663da9fc$export$de56f1198d121036("surface", first_value, "is already selected");else ipns(first_value);
|
|
6185
6188
|
if (target_indexes.size > 1) {
|
|
6186
6189
|
const error_string = "Multiple matching media queries detected, used first one: " + JSON.stringify(surface_per_size.filter(([index]) => target_indexes.has(index)));
|
|
6187
6190
|
target_indexes.clear();
|
|
@@ -6190,10 +6193,10 @@ function $159237486410355f$export$419f84efad7d9fe(surface_per_size, cleanup_prom
|
|
|
6190
6193
|
target_indexes.clear();
|
|
6191
6194
|
});
|
|
6192
6195
|
surface_per_size.forEach(([surface_index, min, max]) => {
|
|
6193
|
-
const media_query =
|
|
6196
|
+
const media_query = $30e801eaa3dc319e$export$717f13d9ba00ca19(min, max).split("@media ").pop();
|
|
6194
6197
|
const {
|
|
6195
6198
|
remove: remove
|
|
6196
|
-
} =
|
|
6199
|
+
} = $29407d8301dc2f23$export$515c3ea4d599b05a(media_query, ({
|
|
6197
6200
|
matches: matches
|
|
6198
6201
|
}) => {
|
|
6199
6202
|
if (!matches) return;
|
|
@@ -6203,21 +6206,21 @@ function $159237486410355f$export$419f84efad7d9fe(surface_per_size, cleanup_prom
|
|
|
6203
6206
|
microtask_queued = true;
|
|
6204
6207
|
}
|
|
6205
6208
|
});
|
|
6206
|
-
if (cleanup_promise instanceof Promise) cleanup_promise.then(remove);else
|
|
6209
|
+
if (cleanup_promise instanceof Promise) cleanup_promise.then(remove);else $0d2acf276472ebf7$export$1cd22bab0d2c3b0b(remove);
|
|
6207
6210
|
});
|
|
6208
6211
|
return ipns;
|
|
6209
6212
|
}
|
|
6210
6213
|
function $159237486410355f$export$be95cb0e8cfd099e() {
|
|
6211
|
-
return new Promise(r =>
|
|
6214
|
+
return new Promise(r => $0d2acf276472ebf7$export$1cd22bab0d2c3b0b(r));
|
|
6212
6215
|
}
|
|
6213
6216
|
function $847e4a06ea6767c0$export$3ebd86018b39d9d2(t, selector, filter) {
|
|
6214
6217
|
(0, $0b48ba2f40ce6067$export$b6ae1bc530f4c149).onexists(selector, eoe => {
|
|
6215
|
-
|
|
6218
|
+
$649f456f663da9fc$export$de56f1198d121036("Order confirmation element showed up!", eoe);
|
|
6216
6219
|
const {
|
|
6217
6220
|
element: element
|
|
6218
6221
|
} = eoe;
|
|
6219
6222
|
const the_id = element.innerText;
|
|
6220
|
-
$847e4a06ea6767c0$export$1ac466d53a6636ac(t, the_id,
|
|
6223
|
+
$847e4a06ea6767c0$export$1ac466d53a6636ac(t, the_id, $43683b1103edab15$export$6399bdb2291895e0(), filter);
|
|
6221
6224
|
});
|
|
6222
6225
|
}
|
|
6223
6226
|
function $847e4a06ea6767c0$export$b11248fa13a8a86c(tenant, id_extractor) {
|
|
@@ -6235,7 +6238,7 @@ function $847e4a06ea6767c0$export$b11248fa13a8a86c(tenant, id_extractor) {
|
|
|
6235
6238
|
try {
|
|
6236
6239
|
maybe_send_entries(args_list);
|
|
6237
6240
|
} catch (e) {
|
|
6238
|
-
|
|
6241
|
+
$b04e44fad5ea42c7$export$f18d5b0af29128b7([e, "Extracting and sending transaction IDs from dataLayer failed"], "warning");
|
|
6239
6242
|
}
|
|
6240
6243
|
return target.apply(this_arg, args_list);
|
|
6241
6244
|
}
|
|
@@ -6247,15 +6250,15 @@ function $847e4a06ea6767c0$export$ff8673d5dea82bd4(tenant, id_extractor) {
|
|
|
6247
6250
|
const order_id = id_extractor(new URL(href));
|
|
6248
6251
|
if (order_id && typeof order_id === "string") $847e4a06ea6767c0$export$1ac466d53a6636ac(tenant, order_id);
|
|
6249
6252
|
}
|
|
6250
|
-
})().catch(e =>
|
|
6253
|
+
})().catch(e => $b04e44fad5ea42c7$export$f18d5b0af29128b7([e, "Extracting and sending transaction IDs from URL failed"], "warning"));
|
|
6251
6254
|
}
|
|
6252
|
-
function $847e4a06ea6767c0$export$1ac466d53a6636ac(t, input_id, dsid =
|
|
6255
|
+
function $847e4a06ea6767c0$export$1ac466d53a6636ac(t, input_id, dsid = $43683b1103edab15$export$6399bdb2291895e0(), filter) {
|
|
6253
6256
|
const transaction_id = typeof filter == "function" ? filter(input_id) : input_id;
|
|
6254
6257
|
if (!transaction_id) {
|
|
6255
|
-
|
|
6258
|
+
$649f456f663da9fc$export$de56f1198d121036("Not sending", transaction_id, "because it didn't pass filter");
|
|
6256
6259
|
return;
|
|
6257
6260
|
}
|
|
6258
|
-
|
|
6261
|
+
$649f456f663da9fc$export$de56f1198d121036("Sending this order id:", transaction_id, "(before filtering it was", input_id, ")");
|
|
6259
6262
|
const payload = {
|
|
6260
6263
|
"tenant": t.tenant,
|
|
6261
6264
|
"market": t.market,
|
|
@@ -6265,36 +6268,36 @@ function $847e4a06ea6767c0$export$1ac466d53a6636ac(t, input_id, dsid = (0, $4368
|
|
|
6265
6268
|
dsid: dsid
|
|
6266
6269
|
}]
|
|
6267
6270
|
};
|
|
6268
|
-
|
|
6271
|
+
$cafa1ff1049985c2$export$cc3b6ddf805f6156((0, $6c2b49f3f564b0d1$export$362abebb4b313340) + "/v2/track", payload);
|
|
6269
6272
|
}
|
|
6270
6273
|
function $3abef00489070e23$export$1ff14fec60ed5697(t, filter) {
|
|
6271
6274
|
try {
|
|
6272
|
-
|
|
6273
|
-
ga(
|
|
6275
|
+
$42bbbba8196bd057$export$674d8cd8b6868154();
|
|
6276
|
+
ga($b04e44fad5ea42c7$export$b3bbfd758f11cfa9(async function (tracker) {
|
|
6274
6277
|
let get_all_function = window?.ga?.getAll; // https://sentry.io/organizations/depictai-0o/issues/3621911835/?project=5476183&referrer=slack
|
|
6275
|
-
if (typeof get_all_function !== "function") get_all_function = await
|
|
6278
|
+
if (typeof get_all_function !== "function") get_all_function = await $d0e7629fb3179e02$export$2fc1a072736ae2f6(window, "ga", "getAll");
|
|
6276
6279
|
const all_trackers = get_all_function.call(ga);
|
|
6277
|
-
|
|
6280
|
+
$649f456f663da9fc$export$de56f1198d121036("we have trackers", all_trackers);
|
|
6278
6281
|
// @ts-ignore
|
|
6279
6282
|
const {
|
|
6280
6283
|
P: P
|
|
6281
6284
|
} = ga;
|
|
6282
|
-
|
|
6285
|
+
$b04e44fad5ea42c7$export$b3bbfd758f11cfa9(modify_trackers_of_iterable)(all_trackers);
|
|
6283
6286
|
if (typeof P?.push === "function")
|
|
6284
6287
|
// this check is just so we don't fail if this doesn't exist for some reason, but it always should
|
|
6285
6288
|
P.push = new Proxy(P.push, {
|
|
6286
6289
|
apply(target, this_arg, args_list) {
|
|
6287
6290
|
const retval = target.apply(this_arg, args_list);
|
|
6288
|
-
|
|
6291
|
+
$b04e44fad5ea42c7$export$b3bbfd758f11cfa9(modify_trackers_of_iterable)(args_list);
|
|
6289
6292
|
return retval;
|
|
6290
6293
|
}
|
|
6291
6294
|
});
|
|
6292
6295
|
function modify_trackers_of_iterable(array) {
|
|
6293
|
-
for (const tracker of array)
|
|
6296
|
+
for (const tracker of array) $b04e44fad5ea42c7$export$b3bbfd758f11cfa9($3abef00489070e23$var$make_tracker_send_to_depict)(tracker, t, filter);
|
|
6294
6297
|
}
|
|
6295
6298
|
}));
|
|
6296
6299
|
} catch (error) {
|
|
6297
|
-
|
|
6300
|
+
$b04e44fad5ea42c7$export$f18d5b0af29128b7(error, "error");
|
|
6298
6301
|
}
|
|
6299
6302
|
}
|
|
6300
6303
|
function $3abef00489070e23$var$make_tracker_send_to_depict(ga_tracker, t, filter) {
|
|
@@ -6306,22 +6309,22 @@ function $3abef00489070e23$var$make_tracker_send_to_depict(ga_tracker, t, filter
|
|
|
6306
6309
|
originalSendHitTask(model);
|
|
6307
6310
|
// console.log('Sent original hit, now sending to depict');
|
|
6308
6311
|
try {
|
|
6309
|
-
const dsid =
|
|
6312
|
+
const dsid = $43683b1103edab15$export$6399bdb2291895e0();
|
|
6310
6313
|
const payload = model.get("hitPayload");
|
|
6311
6314
|
const sp = new URLSearchParams(payload);
|
|
6312
6315
|
const id = sp.get("ti");
|
|
6313
6316
|
if (id) {
|
|
6314
|
-
|
|
6315
|
-
|
|
6317
|
+
$649f456f663da9fc$export$de56f1198d121036("Got interesting analytics request", payload, id);
|
|
6318
|
+
$847e4a06ea6767c0$export$1ac466d53a6636ac(t, id, dsid, filter);
|
|
6316
6319
|
}
|
|
6317
6320
|
} catch (e) {
|
|
6318
|
-
|
|
6321
|
+
$b04e44fad5ea42c7$export$f18d5b0af29128b7(e, "error");
|
|
6319
6322
|
}
|
|
6320
6323
|
});
|
|
6321
6324
|
}
|
|
6322
6325
|
async function $54793663e06a1437$export$d63b08f4f29ddba5(t, unavailability_type) {
|
|
6323
6326
|
const product_id = await t.get_product_id();
|
|
6324
|
-
|
|
6327
|
+
$649f456f663da9fc$export$de56f1198d121036(`Notifying Depict that product id: ${product_id} is ${unavailability_type}`);
|
|
6325
6328
|
const payload = {
|
|
6326
6329
|
"tenant": t.tenant,
|
|
6327
6330
|
"market": t.market,
|
|
@@ -6329,11 +6332,11 @@ async function $54793663e06a1437$export$d63b08f4f29ddba5(t, unavailability_type)
|
|
|
6329
6332
|
event_type: "product_unavailable",
|
|
6330
6333
|
product_id: product_id,
|
|
6331
6334
|
unavailability_type: unavailability_type,
|
|
6332
|
-
user_id:
|
|
6333
|
-
dsid:
|
|
6335
|
+
user_id: $43683b1103edab15$export$adc61a405a4cabed(),
|
|
6336
|
+
dsid: $43683b1103edab15$export$6399bdb2291895e0()
|
|
6334
6337
|
}]
|
|
6335
6338
|
};
|
|
6336
|
-
|
|
6339
|
+
$cafa1ff1049985c2$export$cc3b6ddf805f6156((0, $6c2b49f3f564b0d1$export$362abebb4b313340) + "/v2/track", payload);
|
|
6337
6340
|
}
|
|
6338
6341
|
|
|
6339
6342
|
/**
|
|
@@ -6393,11 +6396,11 @@ const $d832040ef2097a0e$export$6b75200e58bc97d0 = (arr1, arr2, compareFunc) => {
|
|
|
6393
6396
|
const $d832040ef2097a0e$export$9426572bd5645bc1 = (arr1, arr2) => $d832040ef2097a0e$export$6b75200e58bc97d0(arr1, arr2 || [], (i1, i2) => i1.product_id === i2.product_id);
|
|
6394
6397
|
function $ead1f6ae93c69da9$export$82539d9817116aff(e, url) {
|
|
6395
6398
|
if (e.button) {
|
|
6396
|
-
|
|
6399
|
+
$649f456f663da9fc$export$de56f1198d121036("Not single page navigating because button is not 0", e);
|
|
6397
6400
|
return;
|
|
6398
6401
|
}
|
|
6399
6402
|
if (e.metaKey || e.ctrlKey) {
|
|
6400
|
-
|
|
6403
|
+
$649f456f663da9fc$export$de56f1198d121036("Someone command-clicked a link, not single page navigating");
|
|
6401
6404
|
return;
|
|
6402
6405
|
}
|
|
6403
6406
|
// single page navigate
|
|
@@ -6458,7 +6461,7 @@ class $b6f5b218b1a73900$export$f8da66bc4f1d059e extends Response {
|
|
|
6458
6461
|
}
|
|
6459
6462
|
}
|
|
6460
6463
|
function $802201ed0a316c43$export$ab0f802c05dd969b(on_request) {
|
|
6461
|
-
|
|
6464
|
+
$b6f5b218b1a73900$export$85be83e1935d93c2(async (target, this_arg, argument_list) => {
|
|
6462
6465
|
const response_promise = target.apply(this_arg, argument_list);
|
|
6463
6466
|
try {
|
|
6464
6467
|
const input = argument_list[0];
|
|
@@ -6494,7 +6497,7 @@ function $802201ed0a316c43$export$ab0f802c05dd969b(on_request) {
|
|
|
6494
6497
|
break;
|
|
6495
6498
|
}
|
|
6496
6499
|
} catch (e) {
|
|
6497
|
-
|
|
6500
|
+
$b04e44fad5ea42c7$export$f18d5b0af29128b7([e, "error in shopify interception logic"], "warning");
|
|
6498
6501
|
}
|
|
6499
6502
|
return await response_promise;
|
|
6500
6503
|
}, true);
|
|
@@ -6526,8 +6529,8 @@ async function $802201ed0a316c43$export$337197b94b3bd680() {
|
|
|
6526
6529
|
const json = await response.json();
|
|
6527
6530
|
if (Array.isArray(json.items)) return json.items;else if (typeof json.status === "number") return json;else throw new Error(`Shopify ${url} did not respond as expected`);
|
|
6528
6531
|
}
|
|
6529
|
-
const $802201ed0a316c43$export$783ef16647773b3d = /*@__PURE__
|
|
6530
|
-
const meta = await
|
|
6532
|
+
const $802201ed0a316c43$export$783ef16647773b3d = /*@__PURE__*/$511123bb28a7b6f7$export$535946eb77c946dd( /*@__PURE__*/$b04e44fad5ea42c7$export$b3bbfd758f11cfa9(async () => {
|
|
6533
|
+
const meta = await $d0e7629fb3179e02$export$2fc1a072736ae2f6(window, "ShopifyAnalytics", "meta");
|
|
6531
6534
|
return meta?.product;
|
|
6532
6535
|
}));
|
|
6533
6536
|
async function $1813f33dd0fc7e1d$export$b404e20f3c4a490e({
|
|
@@ -6541,7 +6544,7 @@ async function $1813f33dd0fc7e1d$export$b404e20f3c4a490e({
|
|
|
6541
6544
|
Sentry: Sentry
|
|
6542
6545
|
} = t,
|
|
6543
6546
|
start = new Date().getTime(),
|
|
6544
|
-
optimize = await
|
|
6547
|
+
optimize = await $d0e7629fb3179e02$export$2fc1a072736ae2f6(window, "google_optimize"),
|
|
6545
6548
|
end = new Date().getTime();
|
|
6546
6549
|
dlog("Waited for google_optimize for", end - start, "ms");
|
|
6547
6550
|
// if (!optimize.get) {
|
|
@@ -6567,19 +6570,19 @@ async function $1813f33dd0fc7e1d$export$b404e20f3c4a490e({
|
|
|
6567
6570
|
}
|
|
6568
6571
|
function $4f24151f2cddad7b$export$2c2f50b30b7b2576(el, attribute_name, async_iterable, quit_after_navigation = true) {
|
|
6569
6572
|
(async () => {
|
|
6570
|
-
const [exit, exitable_iterable] =
|
|
6571
|
-
if (quit_after_navigation)
|
|
6573
|
+
const [exit, exitable_iterable] = $b8270fcf290bb3af$export$927664b47117acb0(async_iterable);
|
|
6574
|
+
if (quit_after_navigation) $0d2acf276472ebf7$export$1cd22bab0d2c3b0b(exit);
|
|
6572
6575
|
for await (const new_value of exitable_iterable) el.setAttribute(attribute_name, new_value);
|
|
6573
|
-
})().catch(e =>
|
|
6576
|
+
})().catch(e => $b04e44fad5ea42c7$export$f18d5b0af29128b7([e, "Failed to set attribute"], "error"));
|
|
6574
6577
|
return el;
|
|
6575
6578
|
}
|
|
6576
6579
|
function $8c97019b5f7b0d0e$export$7c081fdbc65b6a2a(async_iterable, quit_after_navigation = true) {
|
|
6577
|
-
const [template_els, _get, set] =
|
|
6580
|
+
const [template_els, _get, set] = $49c4fa2e27e642fa$export$3d04c40e7acc1a32();
|
|
6578
6581
|
(async () => {
|
|
6579
|
-
const [exit, exitable_iterable] =
|
|
6580
|
-
if (quit_after_navigation)
|
|
6582
|
+
const [exit, exitable_iterable] = $b8270fcf290bb3af$export$927664b47117acb0(async_iterable);
|
|
6583
|
+
if (quit_after_navigation) $0d2acf276472ebf7$export$1cd22bab0d2c3b0b(exit);
|
|
6581
6584
|
for await (const els of exitable_iterable) set(els);
|
|
6582
|
-
})().catch(e =>
|
|
6585
|
+
})().catch(e => $b04e44fad5ea42c7$export$f18d5b0af29128b7([e, "Failed to convert AsyncIterable to elements"], "error"));
|
|
6583
6586
|
return template_els;
|
|
6584
6587
|
}
|
|
6585
6588
|
let $8bed543774ca0dd4$var$context_counter = 0; // last context that was created (unless 0), to make sure we don't have two of the same
|
|
@@ -6635,23 +6638,23 @@ function $8bed543774ca0dd4$export$f811d2ce0aa6019b({
|
|
|
6635
6638
|
disconnect_reinsertion_observers?.(); // Not sure if necessary? But if we re-insert in the same container and don't disconnect preserve_elements observers before it might lead to two observers acting on one element
|
|
6636
6639
|
disconnect_reinsertion_observers = $8bed543774ca0dd4$var$actual_insertion(element, verb, surfaces, try_forever, href, context, remove_after_navigation, preserve_elements);
|
|
6637
6640
|
});
|
|
6638
|
-
if (!try_forever)
|
|
6641
|
+
if (!try_forever) $0d2acf276472ebf7$export$1cd22bab0d2c3b0b(disconnect_observer);
|
|
6639
6642
|
} else {
|
|
6640
6643
|
if (!context && verb !== "replaceChildren") throw new Error("insert_surface, provided an element, may not be called without a context." + (process.env.DEBUG === "true" ? " Please wrap the function calling it into prevent_infinite_loop(). If you have already done that, make sure that there's no `await` before the calling of insert_surface" : ""));
|
|
6641
|
-
|
|
6644
|
+
$b04e44fad5ea42c7$export$b3bbfd758f11cfa9($8bed543774ca0dd4$var$actual_insertion)(target, verb, surfaces, try_forever, href, context, remove_after_navigation, preserve_elements);
|
|
6642
6645
|
}
|
|
6643
6646
|
return surfaces.map(({
|
|
6644
6647
|
promise_: promise_
|
|
6645
6648
|
}) => promise_);
|
|
6646
6649
|
}
|
|
6647
|
-
const $8bed543774ca0dd4$export$e3f70ef7e3d00501 = /*@__PURE__
|
|
6650
|
+
const $8bed543774ca0dd4$export$e3f70ef7e3d00501 = /*@__PURE__*/$b04e44fad5ea42c7$export$b3bbfd758f11cfa9(async (target, should_stay_inserted) => {
|
|
6648
6651
|
const per_el_fn = (el, disconnect_observer) => {
|
|
6649
6652
|
const comment_node = document.createComment("Old recs were here // Depict");
|
|
6650
|
-
|
|
6653
|
+
$649f456f663da9fc$export$de56f1198d121036("Replacing", el, "with", comment_node);
|
|
6651
6654
|
el.replaceWith(comment_node);
|
|
6652
6655
|
should_stay_inserted.then(keep => {
|
|
6653
6656
|
if (!keep) {
|
|
6654
|
-
|
|
6657
|
+
$649f456f663da9fc$export$de56f1198d121036("Reverting", comment_node, "to", el);
|
|
6655
6658
|
comment_node.replaceWith(el);
|
|
6656
6659
|
disconnect_observer?.();
|
|
6657
6660
|
}
|
|
@@ -6662,7 +6665,7 @@ const $8bed543774ca0dd4$export$e3f70ef7e3d00501 = /*@__PURE__*/(0, $b04e44fad5ea
|
|
|
6662
6665
|
element: element,
|
|
6663
6666
|
disconnector: disconnector
|
|
6664
6667
|
}) => per_el_fn(element, disconnector));
|
|
6665
|
-
|
|
6668
|
+
$0d2acf276472ebf7$export$1cd22bab0d2c3b0b(disconnect_observer);
|
|
6666
6669
|
} else {
|
|
6667
6670
|
let did_already_fail = false;
|
|
6668
6671
|
should_stay_inserted.then(should_stay_inserted => {
|
|
@@ -6670,7 +6673,7 @@ const $8bed543774ca0dd4$export$e3f70ef7e3d00501 = /*@__PURE__*/(0, $b04e44fad5ea
|
|
|
6670
6673
|
});
|
|
6671
6674
|
await 0;
|
|
6672
6675
|
if (did_already_fail) {
|
|
6673
|
-
|
|
6676
|
+
$649f456f663da9fc$export$de56f1198d121036("Not removing", target, should_stay_inserted, "is already resolved to false");
|
|
6674
6677
|
return;
|
|
6675
6678
|
}
|
|
6676
6679
|
if (Array.isArray(target)) for (let i = 0; i < target.length; i++) per_el_fn(target[i]);else per_el_fn(target);
|
|
@@ -6685,7 +6688,7 @@ function $8bed543774ca0dd4$var$actual_insertion(target, verb, surfaces, try_fore
|
|
|
6685
6688
|
const disconnect_all_observers = () => disconnectors.forEach(disconnector => disconnector());
|
|
6686
6689
|
const check_if_revert_whole = () => {
|
|
6687
6690
|
if (failed_surfaces !== surfaces.length) return; // we didn't fail
|
|
6688
|
-
|
|
6691
|
+
$649f456f663da9fc$export$de56f1198d121036(`All surfaces`, surfaces, `failed. ${was_replaced ? "Reverting to old els" : "removing els"}`);
|
|
6689
6692
|
$8bed543774ca0dd4$var$failed_contexts.add(context);
|
|
6690
6693
|
disconnect_all_observers();
|
|
6691
6694
|
const flat_tnodes = template_nodes.flat();
|
|
@@ -6698,29 +6701,29 @@ function $8bed543774ca0dd4$var$actual_insertion(target, verb, surfaces, try_fore
|
|
|
6698
6701
|
surface_: surface_,
|
|
6699
6702
|
resolve_promise_: resolve_promise_
|
|
6700
6703
|
}) => {
|
|
6701
|
-
const [template_els, _get, set] =
|
|
6704
|
+
const [template_els, _get, set] = $49c4fa2e27e642fa$export$3d04c40e7acc1a32();
|
|
6702
6705
|
(async () => {
|
|
6703
6706
|
let surface;
|
|
6704
6707
|
try {
|
|
6705
6708
|
surface = await surface_;
|
|
6706
6709
|
} catch (e) {
|
|
6707
|
-
|
|
6710
|
+
$b04e44fad5ea42c7$export$f18d5b0af29128b7([e, "A surface promise rejected" + (process.env.DEBUG === "true" ? " please catch this earlier" : "")], "warning");
|
|
6708
6711
|
}
|
|
6709
6712
|
if (!try_forever && location.href !== starting_href)
|
|
6710
6713
|
// navigated away
|
|
6711
6714
|
return;
|
|
6712
6715
|
// @ts-ignore
|
|
6713
6716
|
if (surface?.elements) {
|
|
6714
|
-
|
|
6717
|
+
$649f456f663da9fc$export$de56f1198d121036("insert_surface:", target, "." + verb, surface);
|
|
6715
6718
|
set(surface.elements);
|
|
6716
|
-
if (surface.should_stay_inserted instanceof Promise) surface.should_stay_inserted.then(
|
|
6719
|
+
if (surface.should_stay_inserted instanceof Promise) surface.should_stay_inserted.then($b04e44fad5ea42c7$export$b3bbfd758f11cfa9(keep => {
|
|
6717
6720
|
if (keep)
|
|
6718
6721
|
// @ts-ignore
|
|
6719
6722
|
resolve_promise_({
|
|
6720
6723
|
surface: surface,
|
|
6721
6724
|
succeeded: true
|
|
6722
6725
|
});else {
|
|
6723
|
-
|
|
6726
|
+
$649f456f663da9fc$export$de56f1198d121036("Removing surface", surface, "because it failed");
|
|
6724
6727
|
set("");
|
|
6725
6728
|
// @ts-ignore
|
|
6726
6729
|
resolve_promise_({
|
|
@@ -6743,7 +6746,7 @@ function $8bed543774ca0dd4$var$actual_insertion(target, verb, surfaces, try_fore
|
|
|
6743
6746
|
failed_surfaces++;
|
|
6744
6747
|
check_if_revert_whole();
|
|
6745
6748
|
}
|
|
6746
|
-
})().catch(e =>
|
|
6749
|
+
})().catch(e => $b04e44fad5ea42c7$export$f18d5b0af29128b7([e, "insert_surface failed due to technical errors"], "error"));
|
|
6747
6750
|
return template_els;
|
|
6748
6751
|
});
|
|
6749
6752
|
target[verb](...template_nodes.flat());
|
|
@@ -6752,10 +6755,10 @@ function $8bed543774ca0dd4$var$actual_insertion(target, verb, surfaces, try_fore
|
|
|
6752
6755
|
const already_observing_nodes = new WeakSet();
|
|
6753
6756
|
$8bed543774ca0dd4$var$deal_w_removal_of_node_array(node_array, disconnectors.push.bind(disconnectors), already_observing_nodes);
|
|
6754
6757
|
}
|
|
6755
|
-
if (remove_after_navigation)
|
|
6758
|
+
if (remove_after_navigation) $0d2acf276472ebf7$export$1cd22bab0d2c3b0b(() => {
|
|
6756
6759
|
disconnect_all_observers();
|
|
6757
6760
|
template_nodes.flat().forEach(tn => tn.remove());
|
|
6758
|
-
|
|
6761
|
+
$649f456f663da9fc$export$de56f1198d121036("Removed", template_nodes, "due to navigation");
|
|
6759
6762
|
});
|
|
6760
6763
|
return disconnect_all_observers;
|
|
6761
6764
|
}
|
|
@@ -6779,7 +6782,7 @@ function $8bed543774ca0dd4$var$deal_w_removal_of_node_array(node_array, push_dis
|
|
|
6779
6782
|
target: target
|
|
6780
6783
|
} = mutation_record;
|
|
6781
6784
|
if (previous_parent !== target) {
|
|
6782
|
-
|
|
6785
|
+
$649f456f663da9fc$export$de56f1198d121036(element, "was removed", eoe, "but because a parent got removed we're keeping it that way");
|
|
6783
6786
|
return;
|
|
6784
6787
|
}
|
|
6785
6788
|
if (node_array.every(node => target.contains(node))) {
|
|
@@ -6787,18 +6790,18 @@ function $8bed543774ca0dd4$var$deal_w_removal_of_node_array(node_array, push_dis
|
|
|
6787
6790
|
// node_array is a reference to an updating array
|
|
6788
6791
|
// it has always updated once this callback is ran, so we can just check if the new value are currently in the DOM
|
|
6789
6792
|
// here we don't check the order but I don't think it's going to be an issue?
|
|
6790
|
-
|
|
6793
|
+
$649f456f663da9fc$export$de56f1198d121036("Ignoring removal of", element, eoe, "because it seems to come from reactive_template change");
|
|
6791
6794
|
// protect future nodes
|
|
6792
6795
|
$8bed543774ca0dd4$var$deal_w_removal_of_node_array(node_array, push_disconnector, already_observing_nodes);
|
|
6793
6796
|
} else if (!target.contains(element)) {
|
|
6794
6797
|
// it's possible that the element already was re-inserted at the same time (this callback is executed a tick late), we obv. don't want to attempt to reinsert then
|
|
6795
6798
|
if (removals_in_last_s > 10) {
|
|
6796
|
-
|
|
6799
|
+
$649f456f663da9fc$export$de56f1198d121036("More than 10 reinsertions in last second, ignoring");
|
|
6797
6800
|
return;
|
|
6798
6801
|
}
|
|
6799
6802
|
removals_in_last_s++;
|
|
6800
6803
|
setTimeout(() => removals_in_last_s--, 1000);
|
|
6801
|
-
|
|
6804
|
+
$649f456f663da9fc$export$de56f1198d121036(element, "was removed from DOM,", eoe, "reinserting");
|
|
6802
6805
|
const {
|
|
6803
6806
|
documentElement: documentElement
|
|
6804
6807
|
} = document;
|
|
@@ -6811,7 +6814,7 @@ function $8bed543774ca0dd4$var$deal_w_removal_of_node_array(node_array, push_dis
|
|
|
6811
6814
|
push_disconnector(disconnect_observer);
|
|
6812
6815
|
}
|
|
6813
6816
|
}
|
|
6814
|
-
const $78270f2ea7ca229f$export$3b75288f46cadd96 = () => new Array(
|
|
6817
|
+
const $78270f2ea7ca229f$export$3b75288f46cadd96 = () => new Array($d89638655e64f324$export$bb0a9c36cf454ea0(3, 8)).fill("⬜").join("");
|
|
6815
6818
|
const $78270f2ea7ca229f$var$make_sel = (image_url, attribute) => `[${attribute}=${JSON.stringify(image_url)}]`;
|
|
6816
6819
|
const $78270f2ea7ca229f$export$a4eccf92efefa04d = (image_width, image_height, color = "#f6f7f8") => `data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='${image_width}' height='${image_height}' xmlns:v='https://vecta.io/nano'%3e%3cpath d='M0 0h${image_width}.016v${image_height}.01H0' fill='${encodeURIComponent(color)}'/%3e%3c/svg%3e`;
|
|
6817
6820
|
async function $78270f2ea7ca229f$export$2dd69958012e3e49({
|
|
@@ -6848,9 +6851,9 @@ async function $78270f2ea7ca229f$export$2dd69958012e3e49({
|
|
|
6848
6851
|
for (const elem of elems) {
|
|
6849
6852
|
if (elem instanceof HTMLElement) elem.style.cursor = "default";
|
|
6850
6853
|
elem?.classList?.add?.("placeholder");
|
|
6851
|
-
elem.addEventListener("click", e => (
|
|
6854
|
+
elem.addEventListener("click", e => ($649f456f663da9fc$export$de56f1198d121036("Supressing placeholder click", e), e.preventDefault(), e.stopPropagation(), false), true);
|
|
6852
6855
|
}
|
|
6853
|
-
for (const img of
|
|
6856
|
+
for (const img of $0bdb8dbcf1bc7f34$export$5e63aea0cac01fa0(elems, ["src", "srcset", "data-src", "data-srcset"].map(attribute => $78270f2ea7ca229f$var$make_sel(image_url, attribute)).join(", "))) img.classList.add("nolazy"); // this gets ignored by all lazyloaders
|
|
6854
6857
|
return elems;
|
|
6855
6858
|
}]
|
|
6856
6859
|
};
|
|
@@ -6859,9 +6862,9 @@ async function $78270f2ea7ca229f$export$2dd69958012e3e49({
|
|
|
6859
6862
|
let set_should_stay_inserted;
|
|
6860
6863
|
const should_stay_inserted = new Promise(r => set_should_stay_inserted = r);
|
|
6861
6864
|
if (placeholder_rendering?.elements) {
|
|
6862
|
-
const [template_els, _get_state, set_state] =
|
|
6865
|
+
const [template_els, _get_state, set_state] = $49c4fa2e27e642fa$export$3d04c40e7acc1a32(placeholder_rendering.elements);
|
|
6863
6866
|
actual_rendering.then(async rendering_result => {
|
|
6864
|
-
if (typeof post_rendering == "function") await
|
|
6867
|
+
if (typeof post_rendering == "function") await $b04e44fad5ea42c7$export$b3bbfd758f11cfa9(post_rendering)(rendering_result);
|
|
6865
6868
|
const {
|
|
6866
6869
|
elements: elements
|
|
6867
6870
|
} = rendering_result || {};
|
|
@@ -6881,7 +6884,7 @@ async function $78270f2ea7ca229f$export$2dd69958012e3e49({
|
|
|
6881
6884
|
should_stay_inserted: should_stay_inserted
|
|
6882
6885
|
};
|
|
6883
6886
|
} else {
|
|
6884
|
-
|
|
6887
|
+
$649f456f663da9fc$export$de56f1198d121036("Placeholder rendering went wrong, this is bad! Ditching placeholders");
|
|
6885
6888
|
return (await actual_rendering) || {};
|
|
6886
6889
|
}
|
|
6887
6890
|
};
|
|
@@ -6895,7 +6898,7 @@ function $a79c7168700020ff$export$8ec5c86406f333ff() {
|
|
|
6895
6898
|
try {
|
|
6896
6899
|
return target.apply(this_arg, arguments_list);
|
|
6897
6900
|
} catch (e) {
|
|
6898
|
-
|
|
6901
|
+
$649f456f663da9fc$export$de56f1198d121036("Swallowing error of removal of node that we have removed or created", e, el);
|
|
6899
6902
|
}
|
|
6900
6903
|
return el;
|
|
6901
6904
|
}
|
|
@@ -6931,7 +6934,7 @@ function $1dd4146ad893cfb2$export$38e89c688f9d553a() {
|
|
|
6931
6934
|
const w = window;
|
|
6932
6935
|
let da_promise = w[$1dd4146ad893cfb2$var$promise_as_string];
|
|
6933
6936
|
let iframe_promise;
|
|
6934
|
-
if ((typeof da_promise.allSettled !== "function" || typeof da_promise?.prototype?.finally !== "function") &&
|
|
6937
|
+
if ((typeof da_promise.allSettled !== "function" || typeof da_promise?.prototype?.finally !== "function") && !$67acdcc7df099ae4$export$4fbbab6c30e664d5(da_promise) && (iframe_promise = $1dd4146ad893cfb2$export$e647444ed9403635())) da_promise = iframe_promise;
|
|
6935
6938
|
if (da_promise) {
|
|
6936
6939
|
if (Object.getOwnPropertyDescriptor(w, $1dd4146ad893cfb2$var$promise_as_string)?.configurable !== false) Object.defineProperty(w, $1dd4146ad893cfb2$var$promise_as_string, {
|
|
6937
6940
|
configurable: false,
|
|
@@ -6942,10 +6945,10 @@ function $1dd4146ad893cfb2$export$38e89c688f9d553a() {
|
|
|
6942
6945
|
set(value) {
|
|
6943
6946
|
return value;
|
|
6944
6947
|
}
|
|
6945
|
-
});else
|
|
6948
|
+
});else $649f456f663da9fc$export$de56f1198d121036("Unable to redefine " + $1dd4146ad893cfb2$var$promise_as_string + ", it's already nonconfigurable");
|
|
6946
6949
|
}
|
|
6947
6950
|
} catch (e) {
|
|
6948
|
-
|
|
6951
|
+
$7547e32486a3abc0$export$8048b892d651b310(e);
|
|
6949
6952
|
}
|
|
6950
6953
|
}
|
|
6951
6954
|
function $1dd4146ad893cfb2$export$e647444ed9403635() {
|
|
@@ -6955,7 +6958,7 @@ function $1dd4146ad893cfb2$export$e647444ed9403635() {
|
|
|
6955
6958
|
return iframe?.contentWindow?.[$1dd4146ad893cfb2$var$promise_as_string];
|
|
6956
6959
|
}
|
|
6957
6960
|
function $4a6ab5f7377729b1$export$33d1643df63073a8(fetch_handler) {
|
|
6958
|
-
fetch_handler =
|
|
6961
|
+
fetch_handler = $b04e44fad5ea42c7$export$b3bbfd758f11cfa9(fetch_handler);
|
|
6959
6962
|
const {
|
|
6960
6963
|
prototype: prototype
|
|
6961
6964
|
} = XMLHttpRequest;
|
|
@@ -6964,17 +6967,17 @@ function $4a6ab5f7377729b1$export$33d1643df63073a8(fetch_handler) {
|
|
|
6964
6967
|
if (Array.isArray(arg_array)) {
|
|
6965
6968
|
const request = this_arg;
|
|
6966
6969
|
const [method, url] = arg_array;
|
|
6967
|
-
|
|
6970
|
+
$b04e44fad5ea42c7$export$b3bbfd758f11cfa9(fetch_handler)(request, method, url, arg_array);
|
|
6968
6971
|
}
|
|
6969
6972
|
return target.apply(this_arg, arg_array);
|
|
6970
6973
|
}
|
|
6971
6974
|
});
|
|
6972
6975
|
}
|
|
6973
6976
|
function $4a6ab5f7377729b1$export$f314addd5f976083(handler) {
|
|
6974
|
-
$4a6ab5f7377729b1$export$33d1643df63073a8((req, method, url) => req.addEventListener("load",
|
|
6977
|
+
$4a6ab5f7377729b1$export$33d1643df63073a8((req, method, url) => req.addEventListener("load", $b04e44fad5ea42c7$export$b3bbfd758f11cfa9(event => handler(req, method, url, event))));
|
|
6975
6978
|
}
|
|
6976
6979
|
async function $4a6ab5f7377729b1$export$c74578d2cd47a84a(send_callback) {
|
|
6977
|
-
const catchified_callback =
|
|
6980
|
+
const catchified_callback = $b04e44fad5ea42c7$export$b3bbfd758f11cfa9(send_callback);
|
|
6978
6981
|
const requests = new WeakMap();
|
|
6979
6982
|
$4a6ab5f7377729b1$export$33d1643df63073a8((request, _method, _url, arg_array) => {
|
|
6980
6983
|
requests.set(request, arg_array);
|
|
@@ -6987,14 +6990,14 @@ async function $4a6ab5f7377729b1$export$c74578d2cd47a84a(send_callback) {
|
|
|
6987
6990
|
try {
|
|
6988
6991
|
if (requests.has(this_request)) catchified_callback(this_request, requests.get(this_request), arg_list);
|
|
6989
6992
|
} catch (e) {
|
|
6990
|
-
|
|
6993
|
+
$7547e32486a3abc0$export$8048b892d651b310(e);
|
|
6991
6994
|
}
|
|
6992
6995
|
return target.apply(this_request, arg_list);
|
|
6993
6996
|
}
|
|
6994
6997
|
});
|
|
6995
6998
|
}
|
|
6996
6999
|
async function $4a6ab5f7377729b1$export$8e16c51fd2b6507(read_callback) {
|
|
6997
|
-
const catchified_read_callback =
|
|
7000
|
+
const catchified_read_callback = $b04e44fad5ea42c7$export$b3bbfd758f11cfa9(read_callback);
|
|
6998
7001
|
const open_send_arg_map = new WeakMap();
|
|
6999
7002
|
const {
|
|
7000
7003
|
prototype: prototype
|
|
@@ -7015,7 +7018,7 @@ async function $4a6ab5f7377729b1$export$8e16c51fd2b6507(read_callback) {
|
|
|
7015
7018
|
return catchified_read_callback(this_arg, open_args, send_args, default_value, n) || default_value;
|
|
7016
7019
|
} catch (e) {
|
|
7017
7020
|
// in case the weakmaps fail for some reason
|
|
7018
|
-
|
|
7021
|
+
$7547e32486a3abc0$export$8048b892d651b310(e);
|
|
7019
7022
|
return default_value;
|
|
7020
7023
|
}
|
|
7021
7024
|
}
|
|
@@ -7032,11 +7035,11 @@ async function $bbb9f33eb5feb86a$export$83ec13b10b391f13(orig_url = process.env.
|
|
|
7032
7035
|
const orig_url_with_trailing_slash = o_u_u_o.protocol + "//" + o_u_u_o.host + "/";
|
|
7033
7036
|
if (orig_url) {
|
|
7034
7037
|
// change links
|
|
7035
|
-
|
|
7038
|
+
$0bdb8dbcf1bc7f34$export$d4bd03f19260ef1c(orig_url_with_trailing_slash, false, location.hostname);
|
|
7036
7039
|
$bbb9f33eb5feb86a$export$2a1cc61cffa1f36f(orig_url_with_trailing_slash);
|
|
7037
7040
|
$bbb9f33eb5feb86a$export$2a38b176ce969e2c(orig_url_with_trailing_slash);
|
|
7038
7041
|
$bbb9f33eb5feb86a$export$f14a775632a826c4(orig_url_with_trailing_slash);
|
|
7039
|
-
} else
|
|
7042
|
+
} else $649f456f663da9fc$export$de56f1198d121036(new Error("No ORIG_URL env var was set, demo fixes not gonna work."));
|
|
7040
7043
|
}
|
|
7041
7044
|
function $bbb9f33eb5feb86a$export$f14a775632a826c4(orig_url_with_trailing_slash) {
|
|
7042
7045
|
// rewrite history.pushState and history.replaceState so that it works if someone calls it with absolute URLs
|
|
@@ -7053,21 +7056,21 @@ function $bbb9f33eb5feb86a$export$f14a775632a826c4(orig_url_with_trailing_slash)
|
|
|
7053
7056
|
}
|
|
7054
7057
|
function $bbb9f33eb5feb86a$export$2a1cc61cffa1f36f(orig_url_with_trailing_slash) {
|
|
7055
7058
|
// rewrite fetch requests just in case, maybe we should also rewrite responses
|
|
7056
|
-
|
|
7059
|
+
$b6f5b218b1a73900$export$85be83e1935d93c2(async (target, this_arg, arg_list) => {
|
|
7057
7060
|
try {
|
|
7058
7061
|
const [url] = arg_list;
|
|
7059
7062
|
if (typeof url == "string") arg_list[0] = url.replaceAll(orig_url_with_trailing_slash, "/");else if (url instanceof Request) {
|
|
7060
7063
|
if (url.url.includes(orig_url_with_trailing_slash)) arg_list[0] = new Request(url.url.replaceAll(orig_url_with_trailing_slash, "/"), url);
|
|
7061
7064
|
}
|
|
7062
7065
|
} catch (e) {
|
|
7063
|
-
|
|
7066
|
+
$7547e32486a3abc0$export$8048b892d651b310(e);
|
|
7064
7067
|
}
|
|
7065
7068
|
return target.apply(this_arg, arg_list);
|
|
7066
7069
|
});
|
|
7067
7070
|
}
|
|
7068
7071
|
function $bbb9f33eb5feb86a$export$2a38b176ce969e2c(orig_url_with_trailing_slash) {
|
|
7069
7072
|
// rewrite xhr requests just in case
|
|
7070
|
-
|
|
7073
|
+
$4a6ab5f7377729b1$export$33d1643df63073a8((request, method, url, arg_array) => {
|
|
7071
7074
|
if (url instanceof URL) url.href = url.href.replaceAll(orig_url_with_trailing_slash, "/");else if (typeof url == "string") arg_array[1] = url.replaceAll(orig_url_with_trailing_slash, "");
|
|
7072
7075
|
});
|
|
7073
7076
|
}
|
|
@@ -7143,11 +7146,11 @@ function $eda086e0899e75b0$export$a422d714c8cb1a5d(allowed_markets, url, tenant
|
|
|
7143
7146
|
return "se";
|
|
7144
7147
|
}
|
|
7145
7148
|
function $e72f2f1d48dc3a53$export$3427ec8268623f1(listener) {
|
|
7146
|
-
if (
|
|
7147
|
-
|
|
7149
|
+
if (!$b83068cbd26dcc41$export$b87d7e0da8b5cbe3()) {
|
|
7150
|
+
$649f456f663da9fc$export$de56f1198d121036("Not hooking localStorage as it would freeze it due to lacking Proxy support");
|
|
7148
7151
|
return;
|
|
7149
7152
|
}
|
|
7150
|
-
const caught_listener =
|
|
7153
|
+
const caught_listener = $b04e44fad5ea42c7$export$b3bbfd758f11cfa9(listener);
|
|
7151
7154
|
let changed_instance;
|
|
7152
7155
|
const update_changed_instance = () => changed_instance = Storage.prototype.setItem !== localStorage.setItem;
|
|
7153
7156
|
update_changed_instance();
|
|
@@ -7215,7 +7218,7 @@ function $e72f2f1d48dc3a53$export$3427ec8268623f1(listener) {
|
|
|
7215
7218
|
changed_this_args.add(fn_with_changed_this_arg);
|
|
7216
7219
|
}
|
|
7217
7220
|
} catch (e) {
|
|
7218
|
-
if (key !== "length")
|
|
7221
|
+
if (key !== "length") $649f456f663da9fc$export$de56f1198d121036(e);
|
|
7219
7222
|
}
|
|
7220
7223
|
}
|
|
7221
7224
|
|
|
@@ -7229,16 +7232,16 @@ function $55698e6e298abcb0$export$cd1adfb8059b5fcd(promise, ms) {
|
|
|
7229
7232
|
}
|
|
7230
7233
|
const $690d8897acf7a743$var$get_voyado_id = () => {
|
|
7231
7234
|
const va = /\b_vaI=([^;]+)/.exec(document.cookie)?.[1];
|
|
7232
|
-
return va ||
|
|
7235
|
+
return va || $43683b1103edab15$export$6399bdb2291895e0();
|
|
7233
7236
|
};
|
|
7234
|
-
const $690d8897acf7a743$export$a739d9a07da7f9ce = /*@__PURE__
|
|
7235
|
-
|
|
7237
|
+
const $690d8897acf7a743$export$a739d9a07da7f9ce = /*@__PURE__*/$b04e44fad5ea42c7$export$b3bbfd758f11cfa9(() => {
|
|
7238
|
+
$43683b1103edab15$export$336e7ad40bae0652($690d8897acf7a743$var$get_voyado_id);
|
|
7236
7239
|
});
|
|
7237
7240
|
function $769ce417b39aa7d3$export$4a3043e508dd72f0({
|
|
7238
7241
|
children: children,
|
|
7239
7242
|
...attributes
|
|
7240
7243
|
}) {
|
|
7241
|
-
const button =
|
|
7244
|
+
const button = $63cbb5de51d11596$export$34b9dba7ce09269b("button", {
|
|
7242
7245
|
...attributes,
|
|
7243
7246
|
type: "button",
|
|
7244
7247
|
children: children
|
|
@@ -7255,30 +7258,30 @@ async function $cf7ca80454d7b4c0$export$8a0e4d6f6abf7e90({
|
|
|
7255
7258
|
let close_;
|
|
7256
7259
|
const open_promise = new Promise(r => close_ = r);
|
|
7257
7260
|
const body = await (0, $0b48ba2f40ce6067$export$b6ae1bc530f4c149).wait_for_element("body");
|
|
7258
|
-
const backdrop =
|
|
7261
|
+
const backdrop = $63cbb5de51d11596$export$34b9dba7ce09269b("div", {
|
|
7259
7262
|
class: "slidein-backdrop",
|
|
7260
7263
|
onClick: close_
|
|
7261
7264
|
});
|
|
7262
|
-
const [exit_title_iterator, exitable_title_iterator] =
|
|
7265
|
+
const [exit_title_iterator, exitable_title_iterator] = $b8270fcf290bb3af$export$927664b47117acb0(title_);
|
|
7263
7266
|
const closing_handlers = [exit_title_iterator];
|
|
7264
|
-
const slidein =
|
|
7267
|
+
const slidein = $63cbb5de51d11596$export$25062201e9e25d76("div", {
|
|
7265
7268
|
class: "slidein",
|
|
7266
|
-
children: [
|
|
7269
|
+
children: [$63cbb5de51d11596$export$25062201e9e25d76("div", {
|
|
7267
7270
|
class: "header",
|
|
7268
|
-
children: [
|
|
7271
|
+
children: [$63cbb5de51d11596$export$34b9dba7ce09269b("span", {
|
|
7269
7272
|
class: "title",
|
|
7270
|
-
children:
|
|
7271
|
-
}),
|
|
7273
|
+
children: $8c97019b5f7b0d0e$export$7c081fdbc65b6a2a(exitable_title_iterator, false)
|
|
7274
|
+
}), $63cbb5de51d11596$export$34b9dba7ce09269b("button", {
|
|
7272
7275
|
class: "close",
|
|
7273
7276
|
onClick: close_,
|
|
7274
7277
|
children: CloseIcon()
|
|
7275
7278
|
})]
|
|
7276
|
-
}),
|
|
7279
|
+
}), $63cbb5de51d11596$export$34b9dba7ce09269b("div", {
|
|
7277
7280
|
class: "body",
|
|
7278
7281
|
children: children
|
|
7279
7282
|
})]
|
|
7280
7283
|
});
|
|
7281
|
-
const elements_in_container =
|
|
7284
|
+
const elements_in_container = $63cbb5de51d11596$export$25062201e9e25d76("div", {
|
|
7282
7285
|
class: "depict",
|
|
7283
7286
|
children: [backdrop, slidein]
|
|
7284
7287
|
});
|
|
@@ -7296,7 +7299,7 @@ async function $cf7ca80454d7b4c0$export$8a0e4d6f6abf7e90({
|
|
|
7296
7299
|
easing: "ease-in",
|
|
7297
7300
|
duration: 220
|
|
7298
7301
|
});
|
|
7299
|
-
const handler =
|
|
7302
|
+
const handler = $b04e44fad5ea42c7$export$b3bbfd758f11cfa9(({
|
|
7300
7303
|
key: key
|
|
7301
7304
|
}) => {
|
|
7302
7305
|
if (key === "Escape")
|
|
@@ -7304,7 +7307,7 @@ async function $cf7ca80454d7b4c0$export$8a0e4d6f6abf7e90({
|
|
|
7304
7307
|
close_();
|
|
7305
7308
|
});
|
|
7306
7309
|
window.addEventListener("keydown", handler);
|
|
7307
|
-
open_promise.then(
|
|
7310
|
+
open_promise.then($b04e44fad5ea42c7$export$b3bbfd758f11cfa9(() => {
|
|
7308
7311
|
window.removeEventListener("keydown", handler);
|
|
7309
7312
|
backdrop.animate({
|
|
7310
7313
|
opacity: [1, 0]
|
|
@@ -7319,7 +7322,7 @@ async function $cf7ca80454d7b4c0$export$8a0e4d6f6abf7e90({
|
|
|
7319
7322
|
}, {
|
|
7320
7323
|
easing: "ease-out",
|
|
7321
7324
|
duration: 220
|
|
7322
|
-
}).addEventListener("finish",
|
|
7325
|
+
}).addEventListener("finish", $b04e44fad5ea42c7$export$b3bbfd758f11cfa9(() => {
|
|
7323
7326
|
elements_in_container.remove();
|
|
7324
7327
|
closing_handlers.forEach(handler => handler());
|
|
7325
7328
|
}));
|
|
@@ -7335,35 +7338,35 @@ async function $72d170fd5c7cb3fe$export$c068ad5361be7646({
|
|
|
7335
7338
|
out_of_stock_text_: out_of_stock_text_,
|
|
7336
7339
|
CloseIcon: CloseIcon
|
|
7337
7340
|
}) {
|
|
7338
|
-
const [exit_oos_iterator, exitable_oos_iterator] =
|
|
7341
|
+
const [exit_oos_iterator, exitable_oos_iterator] = $b8270fcf290bb3af$export$927664b47117acb0(out_of_stock_text_);
|
|
7339
7342
|
// eslint-disable-line no-async-promise-executor
|
|
7340
|
-
return new Promise(
|
|
7343
|
+
return new Promise($b04e44fad5ea42c7$export$b3bbfd758f11cfa9(async size_selected => {
|
|
7341
7344
|
const {
|
|
7342
7345
|
close_: close_,
|
|
7343
7346
|
on_close_: on_close_
|
|
7344
|
-
} = await
|
|
7347
|
+
} = await $cf7ca80454d7b4c0$export$8a0e4d6f6abf7e90({
|
|
7345
7348
|
CloseIcon: CloseIcon,
|
|
7346
7349
|
title_: title_,
|
|
7347
|
-
children: [
|
|
7350
|
+
children: [$63cbb5de51d11596$export$34b9dba7ce09269b("div", {
|
|
7348
7351
|
class: "option-list",
|
|
7349
7352
|
children: items_.map(({
|
|
7350
7353
|
size_name_: size_name_,
|
|
7351
7354
|
is_available_: is_available_,
|
|
7352
7355
|
id_: id_
|
|
7353
7356
|
}) => {
|
|
7354
|
-
const button =
|
|
7357
|
+
const button = $63cbb5de51d11596$export$25062201e9e25d76("button", {
|
|
7355
7358
|
type: "button",
|
|
7356
7359
|
class: "option" + (is_available_ ? " available" : ""),
|
|
7357
7360
|
onClick: () => {
|
|
7358
7361
|
size_selected(id_);
|
|
7359
7362
|
close_();
|
|
7360
7363
|
},
|
|
7361
|
-
children: [
|
|
7364
|
+
children: [$63cbb5de51d11596$export$34b9dba7ce09269b("span", {
|
|
7362
7365
|
class: "size",
|
|
7363
7366
|
children: size_name_
|
|
7364
|
-
}), !is_available_ &&
|
|
7367
|
+
}), !is_available_ && $63cbb5de51d11596$export$34b9dba7ce09269b("span", {
|
|
7365
7368
|
class: "sold-out",
|
|
7366
|
-
children:
|
|
7369
|
+
children: $8c97019b5f7b0d0e$export$7c081fdbc65b6a2a(exitable_oos_iterator)
|
|
7367
7370
|
})]
|
|
7368
7371
|
});
|
|
7369
7372
|
if (!is_available_) button.disabled = true;
|
|
@@ -7375,8 +7378,8 @@ async function $72d170fd5c7cb3fe$export$c068ad5361be7646({
|
|
|
7375
7378
|
on_close_(exit_oos_iterator);
|
|
7376
7379
|
}));
|
|
7377
7380
|
}
|
|
7378
|
-
var $
|
|
7379
|
-
$
|
|
7381
|
+
var $88c888c4d16ccbd4$exports = {};
|
|
7382
|
+
$88c888c4d16ccbd4$exports = ".depict-placeholder {\n will-change: mask, -webkit-mask;\n mask-position-x: 125%;\n mask-position-y: center;\n background: #ddd;\n animation: 1.5s linear infinite depict-placeholder;\n display: inline-block;\n position: relative;\n overflow: hidden;\n -webkit-mask: linear-gradient(-60deg, #000 30%, #0005, #000 70%) 125% / 300% 100%;\n -webkit-mask-image: ;\n mask-image: ;\n -webkit-mask-size: ;\n mask-size: ;\n}\n\n@keyframes depict-placeholder {\n 0% {\n mask-position-x: 125%;\n -webkit-mask-position-x: 125%;\n }\n\n 10% {\n mask-position-x: 125%;\n -webkit-mask-position-x: 125%;\n }\n\n 90% {\n mask-position-x: -25%;\n -webkit-mask-position-x: -25%;\n }\n\n 100% {\n mask-position-x: -25%;\n -webkit-mask-position-x: -25%;\n }\n}\n\n";
|
|
7380
7383
|
let $ad592d9ddbcffe72$var$inserted = false;
|
|
7381
7384
|
const $ad592d9ddbcffe72$export$84712d0562a614b8 = ({
|
|
7382
7385
|
width: width,
|
|
@@ -7387,12 +7390,12 @@ const $ad592d9ddbcffe72$export$84712d0562a614b8 = ({
|
|
|
7387
7390
|
}) => {
|
|
7388
7391
|
if (!$ad592d9ddbcffe72$var$inserted) {
|
|
7389
7392
|
// Insert styling on first import
|
|
7390
|
-
|
|
7393
|
+
$0a581f1dfa083522$export$59ba1eb2c083f0cd((0, /*@__PURE__*/$parcel$interopDefault($88c888c4d16ccbd4$exports)));
|
|
7391
7394
|
$ad592d9ddbcffe72$var$inserted = true;
|
|
7392
7395
|
}
|
|
7393
7396
|
return (
|
|
7394
7397
|
// @ts-ignore
|
|
7395
|
-
|
|
7398
|
+
$63cbb5de51d11596$export$34b9dba7ce09269b("div", {
|
|
7396
7399
|
class: `depict-placeholder${extra_classes ? " " + extra_classes : ""}`,
|
|
7397
7400
|
style: style ? style : `width:${width};height:${height};`,
|
|
7398
7401
|
...attributes
|
|
@@ -7403,33 +7406,33 @@ const $ad592d9ddbcffe72$export$d613f5b6d0a331a8 = ({
|
|
|
7403
7406
|
aspect_ratio: aspect_ratio,
|
|
7404
7407
|
...attributes
|
|
7405
7408
|
}) => {
|
|
7406
|
-
return
|
|
7409
|
+
return $63cbb5de51d11596$export$34b9dba7ce09269b($ad592d9ddbcffe72$export$84712d0562a614b8, {
|
|
7407
7410
|
style: `position:relative;width:100%;padding-bottom:${1 / aspect_ratio * 100}%`,
|
|
7408
7411
|
...attributes
|
|
7409
7412
|
});
|
|
7410
7413
|
};
|
|
7411
|
-
const $fbe64cf2cf408e4f$export$97f31f44c68c1d5 = (title, surface_classes = []) =>
|
|
7414
|
+
const $fbe64cf2cf408e4f$export$97f31f44c68c1d5 = (title, surface_classes = []) => $b9b0dba897847b2a$export$eb0b9ed911409b57(e => e.classList.add(...surface_classes), $63cbb5de51d11596$export$25062201e9e25d76("div", {
|
|
7412
7415
|
class: "depict recommendation_container",
|
|
7413
|
-
children: [title && typeof title === "string" ?
|
|
7416
|
+
children: [title && typeof title === "string" ? $63cbb5de51d11596$export$34b9dba7ce09269b("h4", {
|
|
7414
7417
|
class: "recs_header",
|
|
7415
7418
|
children: title
|
|
7416
|
-
}) : title,
|
|
7419
|
+
}) : title, $63cbb5de51d11596$export$34b9dba7ce09269b("div", {
|
|
7417
7420
|
class: "grid"
|
|
7418
7421
|
})]
|
|
7419
7422
|
}));
|
|
7420
|
-
const $7693290d077384da$export$32a55d57d151bc5a = () =>
|
|
7423
|
+
const $7693290d077384da$export$32a55d57d151bc5a = () => $63cbb5de51d11596$export$25062201e9e25d76("svg", {
|
|
7421
7424
|
viewBox: "0 0 320 512",
|
|
7422
|
-
children: [
|
|
7425
|
+
children: [$63cbb5de51d11596$export$34b9dba7ce09269b("desc", {
|
|
7423
7426
|
children: "Right arrow"
|
|
7424
|
-
}),
|
|
7427
|
+
}), $63cbb5de51d11596$export$34b9dba7ce09269b("path", {
|
|
7425
7428
|
d: "M285.476 272.971L91.132 467.314c-9.373 9.373-24.569 9.373-33.941 0l-22.667-22.667c-9.357-9.357-9.375-24.522-.04-33.901L188.505 256 34.484 101.255c-9.335-9.379-9.317-24.544.04-33.901l22.667-22.667c9.373-9.373 24.569-9.373 33.941 0L285.475 239.03c9.373 9.372 9.373 24.568.001 33.941z"
|
|
7426
7429
|
})]
|
|
7427
7430
|
});
|
|
7428
|
-
const $7693290d077384da$export$ddd70fdae1b350e6 = () =>
|
|
7431
|
+
const $7693290d077384da$export$ddd70fdae1b350e6 = () => $63cbb5de51d11596$export$25062201e9e25d76("svg", {
|
|
7429
7432
|
viewBox: "0 0 320 512",
|
|
7430
|
-
children: [
|
|
7433
|
+
children: [$63cbb5de51d11596$export$34b9dba7ce09269b("desc", {
|
|
7431
7434
|
children: "Left arrow"
|
|
7432
|
-
}),
|
|
7435
|
+
}), $63cbb5de51d11596$export$34b9dba7ce09269b("path", {
|
|
7433
7436
|
d: "M34.52 239.03L228.87 44.69c9.37-9.37 24.57-9.37 33.94 0l22.67 22.67c9.36 9.36 9.37 24.52.04 33.9L131.49 256l154.02 154.75c9.34 9.38 9.32 24.54-.04 33.9l-22.67 22.67c-9.37 9.37-24.57 9.37-33.94 0L34.52 272.97c-9.37-9.37-9.37-24.57 0-33.94z"
|
|
7434
7437
|
})]
|
|
7435
7438
|
});
|
|
@@ -7443,21 +7446,21 @@ function $6f1582c15e13f2f0$var$ColorCircle({
|
|
|
7443
7446
|
onClick: onClick,
|
|
7444
7447
|
onHoverUpdate: onHoverUpdate
|
|
7445
7448
|
}) {
|
|
7446
|
-
const button =
|
|
7449
|
+
const button = $63cbb5de51d11596$export$34b9dba7ce09269b("button", {
|
|
7447
7450
|
class: "color-circle-container",
|
|
7448
7451
|
onClick: e => onClick(e.currentTarget, color),
|
|
7449
7452
|
title: color.label || "",
|
|
7450
|
-
children:
|
|
7453
|
+
children: $63cbb5de51d11596$export$34b9dba7ce09269b("div", {
|
|
7451
7454
|
class: "outer-circle",
|
|
7452
7455
|
style: `border-color: ${color.value};`,
|
|
7453
|
-
children:
|
|
7456
|
+
children: $63cbb5de51d11596$export$34b9dba7ce09269b("div", {
|
|
7454
7457
|
class: "inner-circle",
|
|
7455
7458
|
style: `background-color: ${color.value};`
|
|
7456
7459
|
})
|
|
7457
7460
|
})
|
|
7458
7461
|
});
|
|
7459
|
-
button.addEventListener("mouseenter",
|
|
7460
|
-
button.addEventListener("mouseleave",
|
|
7462
|
+
button.addEventListener("mouseenter", $b04e44fad5ea42c7$export$b3bbfd758f11cfa9(() => onHoverUpdate(button, color, true)));
|
|
7463
|
+
button.addEventListener("mouseleave", $b04e44fad5ea42c7$export$b3bbfd758f11cfa9(() => onHoverUpdate(button, color, false)));
|
|
7461
7464
|
return button;
|
|
7462
7465
|
}
|
|
7463
7466
|
function $6f1582c15e13f2f0$export$590326cc34f49e2d({
|
|
@@ -7510,7 +7513,7 @@ function $6f1582c15e13f2f0$export$590326cc34f49e2d({
|
|
|
7510
7513
|
if (selectOnHover) handleSelectOnHover(hovered, color, hovering);
|
|
7511
7514
|
};
|
|
7512
7515
|
// Create the color circles
|
|
7513
|
-
const circles = colors.map(color =>
|
|
7516
|
+
const circles = colors.map(color => $63cbb5de51d11596$export$34b9dba7ce09269b($6f1582c15e13f2f0$var$ColorCircle, {
|
|
7514
7517
|
color: color,
|
|
7515
7518
|
onClick: handleClick,
|
|
7516
7519
|
onHoverUpdate: handleHoverUpdate
|
|
@@ -7521,7 +7524,7 @@ function $6f1582c15e13f2f0$export$590326cc34f49e2d({
|
|
|
7521
7524
|
const initial_index = initialColor == undefined ? -1 : colors.findIndex(c => typeof initialColor === "string" ? c.value === initialColor : c.value === initialColor.value && c.label === initialColor.label);
|
|
7522
7525
|
if (initial_index > -1) setActiveIndex(initial_index);
|
|
7523
7526
|
if (onlyCircles) return circles;
|
|
7524
|
-
return
|
|
7527
|
+
return $63cbb5de51d11596$export$34b9dba7ce09269b("div", {
|
|
7525
7528
|
class: "color-picker",
|
|
7526
7529
|
role: "form",
|
|
7527
7530
|
"aria-label": "Color picker",
|
|
@@ -7553,17 +7556,17 @@ const $7f57d546b5d5b3d6$export$237455ad7e59d4e5 = ({
|
|
|
7553
7556
|
children: children
|
|
7554
7557
|
}) => {
|
|
7555
7558
|
if (Array.isArray(children) && children.length === 1) children = children[0];
|
|
7556
|
-
innerRef =
|
|
7559
|
+
innerRef = $63cbb5de51d11596$export$34b9dba7ce09269b("div", {
|
|
7557
7560
|
children: children
|
|
7558
7561
|
});
|
|
7559
|
-
outerRef =
|
|
7562
|
+
outerRef = $63cbb5de51d11596$export$34b9dba7ce09269b("div", {
|
|
7560
7563
|
style: `overflow:hidden;height:0px;visibility:hidden`,
|
|
7561
7564
|
"aria-hidden": "true",
|
|
7562
7565
|
children: innerRef
|
|
7563
7566
|
});
|
|
7564
7567
|
return outerRef;
|
|
7565
7568
|
};
|
|
7566
|
-
const expand =
|
|
7569
|
+
const expand = $b04e44fad5ea42c7$export$b3bbfd758f11cfa9(async (expanding_delay = delay, time_to_expand = duration) => {
|
|
7567
7570
|
const start = get_current_height_possibly_during_transition(); // need to read this before cancelling the old animation
|
|
7568
7571
|
outerRef.style.visibility = "";
|
|
7569
7572
|
outerRef.removeAttribute("aria-hidden");
|
|
@@ -7576,14 +7579,14 @@ const $7f57d546b5d5b3d6$export$237455ad7e59d4e5 = ({
|
|
|
7576
7579
|
easing: "ease-in"
|
|
7577
7580
|
});
|
|
7578
7581
|
current_animation = animation;
|
|
7579
|
-
animation.addEventListener("finish",
|
|
7582
|
+
animation.addEventListener("finish", $b04e44fad5ea42c7$export$b3bbfd758f11cfa9(() => {
|
|
7580
7583
|
current_animation = undefined;
|
|
7581
7584
|
outerRef.style.overflow = "";
|
|
7582
7585
|
outerRef.style.height = "auto";
|
|
7583
7586
|
}));
|
|
7584
7587
|
return animation;
|
|
7585
7588
|
});
|
|
7586
|
-
const collapse =
|
|
7589
|
+
const collapse = $b04e44fad5ea42c7$export$b3bbfd758f11cfa9(async (collapsing_delay = delay, time_to_collapse = duration) => {
|
|
7587
7590
|
const start = get_current_height_possibly_during_transition();
|
|
7588
7591
|
current_animation?.cancel?.();
|
|
7589
7592
|
outerRef.style.overflow = "hidden";
|
|
@@ -7596,7 +7599,7 @@ const $7f57d546b5d5b3d6$export$237455ad7e59d4e5 = ({
|
|
|
7596
7599
|
easing: "ease-out"
|
|
7597
7600
|
});
|
|
7598
7601
|
current_animation = animation;
|
|
7599
|
-
animation.addEventListener("finish",
|
|
7602
|
+
animation.addEventListener("finish", $b04e44fad5ea42c7$export$b3bbfd758f11cfa9(() => {
|
|
7600
7603
|
current_animation = undefined;
|
|
7601
7604
|
outerRef.style.height = "0";
|
|
7602
7605
|
outerRef.style.visibility = "hidden";
|
|
@@ -7609,13 +7612,13 @@ const $7f57d546b5d5b3d6$export$237455ad7e59d4e5 = ({
|
|
|
7609
7612
|
collapse: collapse
|
|
7610
7613
|
};
|
|
7611
7614
|
};
|
|
7612
|
-
var $
|
|
7613
|
-
$
|
|
7615
|
+
var $3e5c76df45929e80$exports = {};
|
|
7616
|
+
$3e5c76df45929e80$exports = ".depict-img-cont {\n width: 100%;\n height: 100%;\n position: absolute;\n}\n\n.depict-img-filler {\n width: 100%;\n height: auto;\n display: inline-block;\n}\n\n.depict-img-comp {\n width: auto;\n height: auto;\n max-width: 100%;\n max-height: 100%;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n}\n\n.depict-img-mod {\n width: 100%;\n height: 100%;\n object-fit: contain;\n position: absolute;\n inset: 0;\n}\n\n";
|
|
7614
7617
|
const $45af9e834781a9bc$export$3d13beba9b52c947 = "https://img.depict.ai/ResizeImage" + (process.env.TENANT ? "/" + process.env.TENANT : "");
|
|
7615
7618
|
const $45af9e834781a9bc$export$a98fc8a2c818d3d8 = /*@__PURE__*/(() => typeof navigator === "undefined" ? false : /^((?!chrome|android).)*safari/i.test(navigator.userAgent))(); // https://stackoverflow.com/a/23522755
|
|
7616
|
-
function $45af9e834781a9bc$export$f39a7d0667e924a(what_to_watch, sizes_communicator =
|
|
7619
|
+
function $45af9e834781a9bc$export$f39a7d0667e924a(what_to_watch, sizes_communicator = $607fc90221d440a6$export$e806c6c1615a59ae(), resolution_factor = 1) {
|
|
7617
7620
|
let currently_live = false;
|
|
7618
|
-
const ro = new ResizeObserver(
|
|
7621
|
+
const ro = new ResizeObserver($b04e44fad5ea42c7$export$b3bbfd758f11cfa9(records => {
|
|
7619
7622
|
for (let j = 0; j < records.length; j++) {
|
|
7620
7623
|
const {
|
|
7621
7624
|
width: width
|
|
@@ -7686,9 +7689,9 @@ function $45af9e834781a9bc$export$a62825542f1bfcf5({
|
|
|
7686
7689
|
const raw_src = image_options?.src || image_options?.["data-src"]; // get wanted src
|
|
7687
7690
|
const src = new URL(raw_src, location.origin).href;
|
|
7688
7691
|
if (!src) {
|
|
7689
|
-
|
|
7690
|
-
|
|
7691
|
-
return
|
|
7692
|
+
$649f456f663da9fc$export$de56f1198d121036(image_options, () => {}); // noop function is to allow to get here quickly by "jump to function definition"
|
|
7693
|
+
$7547e32486a3abc0$export$8048b892d651b310(new Error("no image src provided: " + src));
|
|
7694
|
+
return $63cbb5de51d11596$export$34b9dba7ce09269b("img", {
|
|
7692
7695
|
...image_options
|
|
7693
7696
|
}); // we don't want everything to fail if someone misused this component
|
|
7694
7697
|
}
|
|
@@ -7701,7 +7704,7 @@ function $45af9e834781a9bc$export$a62825542f1bfcf5({
|
|
|
7701
7704
|
const srcset = $45af9e834781a9bc$var$make_srcset(src, format, resolutions);
|
|
7702
7705
|
sources.push(
|
|
7703
7706
|
// 0px important because chrome will load the biggest size otherwise until sizes attribute is set to the correct value
|
|
7704
|
-
|
|
7707
|
+
$63cbb5de51d11596$export$34b9dba7ce09269b("source", {
|
|
7705
7708
|
sizes: "0px",
|
|
7706
7709
|
type: `image/${format}`,
|
|
7707
7710
|
...(set_dataset ? {
|
|
@@ -7716,7 +7719,7 @@ function $45af9e834781a9bc$export$a62825542f1bfcf5({
|
|
|
7716
7719
|
}; // Prevents the image from instantly loading the original source
|
|
7717
7720
|
delete opts_without_src["src"];
|
|
7718
7721
|
delete opts_without_src["srcset"];
|
|
7719
|
-
const the_image =
|
|
7722
|
+
const the_image = $63cbb5de51d11596$export$34b9dba7ce09269b("img", {
|
|
7720
7723
|
...opts_without_src
|
|
7721
7724
|
}); // create image
|
|
7722
7725
|
sources.push(the_image); // chrome seems to be the dumbest piece of cake that has ever existed and just load the first source?????
|
|
@@ -7725,7 +7728,7 @@ function $45af9e834781a9bc$export$a62825542f1bfcf5({
|
|
|
7725
7728
|
// start a sizes_setter for every source (including fallback image)
|
|
7726
7729
|
for (let i = 0; i < sources.length; i++) sizes_setter_(sources[i]).catch((0, $7547e32486a3abc0$export$8048b892d651b310));
|
|
7727
7730
|
// embed all sources into a <picture> so that the browser understands they're "together"
|
|
7728
|
-
const picture =
|
|
7731
|
+
const picture = $63cbb5de51d11596$export$34b9dba7ce09269b("picture", {
|
|
7729
7732
|
children: sources
|
|
7730
7733
|
});
|
|
7731
7734
|
// Create src and srcset for fallback image and set it.
|
|
@@ -7766,13 +7769,13 @@ const $914971fb43986a16$export$788756b42446dc2d = ({
|
|
|
7766
7769
|
}) => {
|
|
7767
7770
|
if (!$914971fb43986a16$var$inserted) {
|
|
7768
7771
|
// Insert styling on first import
|
|
7769
|
-
|
|
7772
|
+
$0a581f1dfa083522$export$59ba1eb2c083f0cd((0, /*@__PURE__*/$parcel$interopDefault($3e5c76df45929e80$exports)));
|
|
7770
7773
|
$914971fb43986a16$var$inserted = true;
|
|
7771
7774
|
}
|
|
7772
7775
|
const img = process.env.BUILD_TARGET === "modern" || process.env.BUILD_TARGET === "dev" ? $914971fb43986a16$var$Image(options) : $914971fb43986a16$var$CompatibleImage(options);
|
|
7773
7776
|
if (init_with_placeholder)
|
|
7774
7777
|
// 10000 is a magic value, that is just supposed to be bigger than the size of the actual image.
|
|
7775
|
-
img.querySelectorAll("img").forEach(i => i.src =
|
|
7778
|
+
img.querySelectorAll("img").forEach(i => i.src = $78270f2ea7ca229f$export$a4eccf92efefa04d(10000 * options.aspect_ratio, 10000));
|
|
7776
7779
|
return img;
|
|
7777
7780
|
};
|
|
7778
7781
|
function $914971fb43986a16$var$Image({
|
|
@@ -7784,20 +7787,20 @@ function $914971fb43986a16$var$Image({
|
|
|
7784
7787
|
init_with_placeholder: _,
|
|
7785
7788
|
...image_options
|
|
7786
7789
|
}) {
|
|
7787
|
-
const div =
|
|
7790
|
+
const div = $63cbb5de51d11596$export$34b9dba7ce09269b("div", {
|
|
7788
7791
|
style: `position:relative;width:100%;padding-bottom:${1 / aspect_ratio * 100}%`
|
|
7789
7792
|
});
|
|
7790
7793
|
const sourceset_component = $914971fb43986a16$var$srcset_comp_from_map_or_new(rendering_options, srcset_opts, div);
|
|
7791
7794
|
const IMG_tag = image_options.src?.startsWith("data:") || !sourceset_component ? "img" : sourceset_component;
|
|
7792
7795
|
div.append(
|
|
7793
7796
|
// @ts-ignore
|
|
7794
|
-
|
|
7797
|
+
$63cbb5de51d11596$export$34b9dba7ce09269b(IMG_tag, {
|
|
7795
7798
|
alt: alt,
|
|
7796
7799
|
...(remove_on_error ? {
|
|
7797
7800
|
onerror: "this.remove()"
|
|
7798
7801
|
} : {}),
|
|
7799
7802
|
...image_options,
|
|
7800
|
-
class:
|
|
7803
|
+
class: $b9b0dba897847b2a$export$22a65337c1b43b1f(["depict-img-mod ", image_options.class, $914971fb43986a16$var$add_nolazy_to_placeholder(rendering_options?.type)])
|
|
7801
7804
|
}));
|
|
7802
7805
|
return div;
|
|
7803
7806
|
}
|
|
@@ -7809,24 +7812,24 @@ function $914971fb43986a16$var$CompatibleImage({
|
|
|
7809
7812
|
srcset_opts: srcset_opts,
|
|
7810
7813
|
...image_options
|
|
7811
7814
|
}) {
|
|
7812
|
-
const canvas =
|
|
7815
|
+
const canvas = $63cbb5de51d11596$export$34b9dba7ce09269b("canvas", {
|
|
7813
7816
|
class: "depict-img-filler",
|
|
7814
7817
|
width: 3000 * aspect_ratio,
|
|
7815
7818
|
height: 3000
|
|
7816
7819
|
});
|
|
7817
7820
|
const sourceset_component = $914971fb43986a16$var$srcset_comp_from_map_or_new(rendering_options, srcset_opts, canvas);
|
|
7818
7821
|
const IMG_tag = image_options.src?.startsWith("data:") || !sourceset_component ? "img" : sourceset_component;
|
|
7819
|
-
return
|
|
7822
|
+
return $63cbb5de51d11596$export$25062201e9e25d76("div", {
|
|
7820
7823
|
style: "position:relative",
|
|
7821
|
-
children: [
|
|
7824
|
+
children: [$63cbb5de51d11596$export$34b9dba7ce09269b("div", {
|
|
7822
7825
|
class: "depict-img-cont",
|
|
7823
|
-
children:
|
|
7826
|
+
children: $63cbb5de51d11596$export$34b9dba7ce09269b(IMG_tag, {
|
|
7824
7827
|
alt: alt,
|
|
7825
7828
|
...(remove_on_error ? {
|
|
7826
7829
|
onerror: "this.remove()"
|
|
7827
7830
|
} : {}),
|
|
7828
7831
|
...image_options,
|
|
7829
|
-
class:
|
|
7832
|
+
class: $b9b0dba897847b2a$export$22a65337c1b43b1f(["depict-img-comp", image_options.class, $914971fb43986a16$var$add_nolazy_to_placeholder(rendering_options?.type)])
|
|
7830
7833
|
})
|
|
7831
7834
|
}), canvas]
|
|
7832
7835
|
});
|
|
@@ -7840,14 +7843,14 @@ function $914971fb43986a16$var$srcset_comp_from_map_or_new(rendering_options, sr
|
|
|
7840
7843
|
...srcset_opts
|
|
7841
7844
|
};
|
|
7842
7845
|
cloned_opts.what_to_watch = canvas;
|
|
7843
|
-
sourceset_component =
|
|
7846
|
+
sourceset_component = $45af9e834781a9bc$export$a62825542f1bfcf5(cloned_opts);
|
|
7844
7847
|
$914971fb43986a16$var$rendering_options_to_sourceset_component.set(rendering_options, new WeakRef(sourceset_component));
|
|
7845
7848
|
}
|
|
7846
7849
|
}
|
|
7847
7850
|
return sourceset_component;
|
|
7848
7851
|
}
|
|
7849
|
-
var $
|
|
7850
|
-
$
|
|
7852
|
+
var $e54f50426e7d0ab9$exports = {};
|
|
7853
|
+
$e54f50426e7d0ab9$exports = ".depict .images-container {\n position: relative;\n}\n\n.depict .second-image-container {\n width: 100%;\n opacity: 0;\n position: absolute;\n top: 0;\n}\n\n.depict .hovering .main-image-container {\n opacity: 0;\n}\n\n.depict .hovering .second-image-container {\n opacity: 1;\n}\n\n";
|
|
7851
7854
|
|
|
7852
7855
|
// Saving bytez
|
|
7853
7856
|
// Maybe? @Daniel
|
|
@@ -7877,7 +7880,7 @@ function $8483d1d9fcee52ec$var$register_element_for_touch_hover(el, navigation_m
|
|
|
7877
7880
|
}
|
|
7878
7881
|
function $8483d1d9fcee52ec$var$start_checking_for_touch_hover() {
|
|
7879
7882
|
const currently_hovering = new Map();
|
|
7880
|
-
const handle_touch_start =
|
|
7883
|
+
const handle_touch_start = $b04e44fad5ea42c7$export$b3bbfd758f11cfa9(evt => {
|
|
7881
7884
|
const touch = evt?.changedTouches?.[0];
|
|
7882
7885
|
if (!touch) return; // Eytys dispatches fake touch events without changedTouches
|
|
7883
7886
|
const id = touch.identifier;
|
|
@@ -7900,7 +7903,7 @@ function $8483d1d9fcee52ec$var$start_checking_for_touch_hover() {
|
|
|
7900
7903
|
}
|
|
7901
7904
|
});
|
|
7902
7905
|
let last_collision_check = +new Date();
|
|
7903
|
-
const handle_touch_move =
|
|
7906
|
+
const handle_touch_move = $b04e44fad5ea42c7$export$b3bbfd758f11cfa9(evt => {
|
|
7904
7907
|
const first_touch = evt?.changedTouches?.[0];
|
|
7905
7908
|
if (!first_touch) return;
|
|
7906
7909
|
const {
|
|
@@ -7916,7 +7919,7 @@ function $8483d1d9fcee52ec$var$start_checking_for_touch_hover() {
|
|
|
7916
7919
|
if (get_hover_element_from_coords(clientX, clientY) !== our_touch_data.element_) clear_hover(identifier, our_touch_data, clientX, clientY);
|
|
7917
7920
|
}
|
|
7918
7921
|
});
|
|
7919
|
-
const handle_touch_cancel =
|
|
7922
|
+
const handle_touch_cancel = $b04e44fad5ea42c7$export$b3bbfd758f11cfa9(evt => {
|
|
7920
7923
|
const touch = evt?.changedTouches?.[0];
|
|
7921
7924
|
if (!touch) return;
|
|
7922
7925
|
const id = touch.identifier;
|
|
@@ -7928,7 +7931,7 @@ function $8483d1d9fcee52ec$var$start_checking_for_touch_hover() {
|
|
|
7928
7931
|
const hover_element = elements[$8483d1d9fcee52ec$var$HOVER_IMAGE_DEPTH - 1];
|
|
7929
7932
|
return hover_element && $8483d1d9fcee52ec$var$touch_hover_elements.has(hover_element) ? hover_element : null;
|
|
7930
7933
|
};
|
|
7931
|
-
const clear_hover =
|
|
7934
|
+
const clear_hover = $b04e44fad5ea42c7$export$b3bbfd758f11cfa9((id, info_about_touch, now_x, now_y) => {
|
|
7932
7935
|
const {
|
|
7933
7936
|
element_: element_,
|
|
7934
7937
|
start_y_: start_y_,
|
|
@@ -7975,25 +7978,25 @@ const $8483d1d9fcee52ec$export$2369f6fc1c911576 = ({
|
|
|
7975
7978
|
...options
|
|
7976
7979
|
}) => {
|
|
7977
7980
|
if (!$8483d1d9fcee52ec$var$styling_inserted) {
|
|
7978
|
-
|
|
7981
|
+
$0a581f1dfa083522$export$59ba1eb2c083f0cd((0, /*@__PURE__*/$parcel$interopDefault($e54f50426e7d0ab9$exports)));
|
|
7979
7982
|
$8483d1d9fcee52ec$var$styling_inserted = true;
|
|
7980
7983
|
}
|
|
7981
|
-
const main_image =
|
|
7984
|
+
const main_image = $914971fb43986a16$export$788756b42446dc2d({
|
|
7982
7985
|
...options
|
|
7983
7986
|
});
|
|
7984
|
-
const second_image =
|
|
7987
|
+
const second_image = $914971fb43986a16$export$788756b42446dc2d({
|
|
7985
7988
|
...options,
|
|
7986
7989
|
[second_srcset_opts?.set_dataset === false ? "src" : "data-src"]: second_src || "",
|
|
7987
7990
|
[second_srcset_opts?.set_dataset === false ? "srcset" : "data-srcset"]: second_srcset || "",
|
|
7988
7991
|
srcset_opts: second_srcset_opts || {}
|
|
7989
7992
|
});
|
|
7990
7993
|
const no_second_img = !second_src && !second_srcset && !second_srcset_opts;
|
|
7991
|
-
const images_container =
|
|
7994
|
+
const images_container = $63cbb5de51d11596$export$25062201e9e25d76("div", {
|
|
7992
7995
|
class: "images-container",
|
|
7993
|
-
children: [!no_second_img &&
|
|
7996
|
+
children: [!no_second_img && $63cbb5de51d11596$export$34b9dba7ce09269b("div", {
|
|
7994
7997
|
class: "second-image-container",
|
|
7995
7998
|
children: second_image
|
|
7996
|
-
}),
|
|
7999
|
+
}), $63cbb5de51d11596$export$34b9dba7ce09269b("div", {
|
|
7997
8000
|
class: "main-image-container",
|
|
7998
8001
|
children: main_image
|
|
7999
8002
|
})]
|
|
@@ -8136,11 +8139,11 @@ let $3aaea7425b99d050$var$running_writers = 0;
|
|
|
8136
8139
|
function $3aaea7425b99d050$export$ef73ea4f975745ba(meta_data) {
|
|
8137
8140
|
if ($3aaea7425b99d050$var$running_writers >= 1) return;
|
|
8138
8141
|
$3aaea7425b99d050$var$running_writers++;
|
|
8139
|
-
|
|
8142
|
+
$qgKv4$onCleanup(() => $3aaea7425b99d050$var$running_writers--);
|
|
8140
8143
|
const disconnectors = [];
|
|
8141
|
-
|
|
8144
|
+
$qgKv4$createEffect($b04e44fad5ea42c7$export$b3bbfd758f11cfa9(() => {
|
|
8142
8145
|
if (!meta_data()) return;
|
|
8143
|
-
|
|
8146
|
+
$qgKv4$onCleanup(() => {
|
|
8144
8147
|
disconnectors.forEach(d => d());
|
|
8145
8148
|
});
|
|
8146
8149
|
for (const [type, content] of Object.entries(meta_data())) for (const opts of $3aaea7425b99d050$var$tags[type]) {
|
|
@@ -8151,7 +8154,7 @@ function $3aaea7425b99d050$export$ef73ea4f975745ba(meta_data) {
|
|
|
8151
8154
|
* It's preferred not to kill any conflicting meta tags because frameworks might go apeshit.
|
|
8152
8155
|
* Things seem to work when only changing the meta values though */
|
|
8153
8156
|
const sync_elements_to_head = () => {
|
|
8154
|
-
if (retries++ > $3aaea7425b99d050$var$MAX_SYNC_RETRIES) return
|
|
8157
|
+
if (retries++ > $3aaea7425b99d050$var$MAX_SYNC_RETRIES) return $649f456f663da9fc$export$de56f1198d121036("Failed to sync meta tag to head. Hit max retries.", opts.selector, content);
|
|
8155
8158
|
const existing_elements = document.head.querySelectorAll(opts.selector);
|
|
8156
8159
|
const elements = existing_elements.length ? existing_elements : [opts.create()];
|
|
8157
8160
|
elements.forEach(el => {
|
|
@@ -8174,5 +8177,5 @@ function $3aaea7425b99d050$export$ef73ea4f975745ba(meta_data) {
|
|
|
8174
8177
|
}
|
|
8175
8178
|
}, "Meta tag writing crashed"));
|
|
8176
8179
|
}
|
|
8177
|
-
|
|
8180
|
+
$f564adbc4675ceaf$export$2cefb7e61fcbae00("utilishared", (0, $0766c85d387a9765$export$83d89fbfd8236492));
|
|
8178
8181
|
export { $5ea3131c5e08d52e$export$a7e53ec3b3fdd030 as base64_decode_unicode, $5ea3131c5e08d52e$export$a1893782a2a6be0d as base64_encode_unicode, $f809bc98a1cb5f92$export$6f051469dd676a8b as make_plp_recommendations_inserted_handler, $f564adbc4675ceaf$export$60d1d0e3cfc8b9ed as version_info, $f564adbc4675ceaf$export$fe609f0216e4ebef as add_version_query_params, $a1c80794e6bf4cc2$export$6e7454c733fa1fb2 as cache_args, $66b898e9bfcef532$export$8582cf3716962dc2 as check_displays, $7547e32486a3abc0$export$8048b892d651b310 as err, $b55a70757989faf4$export$16d7c76794a38a4 as require_event_listener, $ea554f5a28904975$export$41de2959a8dd405d as Auto_GWVM, $f1396aa84761fbe5$export$c83d8da642b5104a as GWVM_Renderer, $92b7ea2cf75c4aec$export$55621c1ce3cd536b as infinite_promise_creator, $09ff985c7c424fb3$export$32ccf3a614c84258 as infinite_promise_no_skip, $075589a94064cf2e$export$c0a4d29bc45a38c6 as infinite_renderer, $efda45906c6cbac7$export$9eae832ae57fbf as deprecated_insert_styling, $e867e2f1fb3bcc09$export$c7187bbd1a7a9244 as placeholder, $7e2d59b061c2c528$export$cab8bc58c64c2013 as Pro_Slider, $51bbc74e39f5e5c6$export$2e2bcd8739ae039 as simplified_template_tool, $762a881271a51d1b$export$f1b8b9fd75ddcab1 as insert_styling_into_slider, $e61f371a9bcdeb2f$export$cd12721587f4f16d as RR_Slider, $366fff12da348e66$export$1a8782481a9af507 as Depict, $f494377581cfb2b4$export$30933c637c977eef as get_recs_with_template, $f494377581cfb2b4$export$c410ce1205e5118a as default_post_processor, $f494377581cfb2b4$export$4f39078bdc72ecd0 as default_pre_processor, $acf11540344875ed$export$2e2bcd8739ae039 as wpff, $cdca9fea6eb103e5$export$12e07a2a9f87578a as ElementObserver, $0b48ba2f40ce6067$export$b6ae1bc530f4c149 as observer, $63cbb5de51d11596$export$34b9dba7ce09269b as jsx, $63cbb5de51d11596$export$25062201e9e25d76 as jsxs, $b9b0dba897847b2a$export$eb0b9ed911409b57 as use_element, $b9b0dba897847b2a$export$f63fcc839cb0f734 as use_listener, $b9b0dba897847b2a$export$22a65337c1b43b1f as classlist, $649f456f663da9fc$export$de56f1198d121036 as dlog, $649f456f663da9fc$export$997143d41f6a0c9b as derror, $649f456f663da9fc$export$c2363754d4758444 as dwarn, $649f456f663da9fc$export$2dd75a6b038dc8cb as set_browser_prefix, $b04e44fad5ea42c7$export$b3bbfd758f11cfa9 as catchify, $b04e44fad5ea42c7$export$f18d5b0af29128b7 as report, $571bce04eb920cd8$export$55fe61489d2c7417 as is_debug, $ca66c9553e84df02$export$6038895ac52bd044 as chevronLeft, $ca66c9553e84df02$export$dc84183312f0c201 as chevronRight, $9a744f57ab06c32e$export$68c017fd93791405 as expandingContainer, $b83068cbd26dcc41$export$3be7054c61590ee3 as Lazyfier, $b83068cbd26dcc41$export$b87d7e0da8b5cbe3 as test_array_proxy_support, $ef9394fafebd5eab$export$692b27c28639e5b9 as Amazing_Slider, $893f9af5dbae6bc8$export$16501883f477737a as colorize_elements, $893f9af5dbae6bc8$export$deca40f48c0569f8 as should_colorizeLogics, $6be99244fa573db5$export$50ce83ace0cdd87e as default_rr, $2d47b009af5bc0a4$export$1bc0df10745d5412 as fetch_recs, $2d47b009af5bc0a4$export$d40679eb4cf32f09 as fetch_recs_whole_response, $5cbe24d064a033ed$export$c42139a43c877ecd as clone_deep, $5cbe24d064a033ed$export$e0009e7da572f99b as regex_templating, $5cbe24d064a033ed$export$a9fc160c5ed83bd7 as Rec_Renderer, $30e801eaa3dc319e$export$17c3166a7ebd4688 as n_col_styling_with_dist, $30e801eaa3dc319e$export$c84671f46d6a1ca as Layout, $30e801eaa3dc319e$export$483bdd1f1186de13 as layout_get_visible_recs_without_partial_rows, $30e801eaa3dc319e$export$3dc5e2383c924ebf as layout_get_total_rec_amount_for_row, $30e801eaa3dc319e$export$717f13d9ba00ca19 as layout_media_query_header, $090b8182afa1b2a6$export$b0a773486c1c2312 as RecommendationGrid, $30f78542ed78cd31$export$82cfdc85a4d15688 as RecommendationSlider, $c1503704e45e6a15$export$6830ae1fbe21e589 as default_click_tracking, $c1503704e45e6a15$export$f37c58ab3d3e3b75 as default_view_tracking, $c1503704e45e6a15$export$dd32cb565eae0a1f as ga_click, $c1503704e45e6a15$export$8d72437623fef90c as gtag_click_post_processor, $c1503704e45e6a15$export$1bffac19f9f0d6fc as gtag_view_post_processor, $c1503704e45e6a15$export$e9106d6e723510d2 as depict_click_tracking_post_processor, $c1503704e45e6a15$export$fb9afe9f540ae069 as recs_inserted_tracking, $c1503704e45e6a15$export$32eb5dd18e963410 as add_to_localstorage, $c1503704e45e6a15$export$9e1caada6901f552 as depict_page_view, $be40b7bf11a47cc4$export$8cbd8aa1c70f9a13 as slider_autoscroll_factory, $d31b48b85102c1ec$export$80039a49055269fb as make_button1, $a75adf1478c4522f$export$af88b4929c2dc86 as make_button2, $2436f68ea927d4a8$export$1d17a045bcc711b1 as slider_dots_factory, $2436f68ea927d4a8$export$a09282b33e69b43f as navdot, $9bb2400c4e2e9335$export$411b0f20794697ce as slider_draggable_factory, $1ce2ae6f640f393f$export$5129719c04a52f8c as slider_fading_factory, $52292921bc0fc31f$export$5723caf9a8335aa6 as slider_fractional_factory, $f78bc6a06402a6cf$export$93223e488e7ee078 as slider_show_scroll, $06fe260f91efff62$export$b36d2489a5a16728 as slider_snap_css, $06fe260f91efff62$export$49b950309ab787ad as can_use_snapping_and_still_scroll, $40bfd400d76a6ec1$export$dac64fd35a4805a4 as slider_snapping_factory, $c33c6faf8acc7442$export$68babfc5be0de5da as Amazing_Lazy_Slider, $556d9c321900f1d4$export$53306504b987cbf7 as slider_wraparound_factory, $159237486410355f$export$419f84efad7d9fe as sizes_to_surface, $159237486410355f$export$417ef0ab13d8b984 as surface_mixer, $159237486410355f$export$be95cb0e8cfd099e as promise_until_next_navigation, $d4ffde0b9fca0369$export$29a6094e0bd8bc5f as AIO, $d4ffde0b9fca0369$export$6ebd242c09192cec as paint_red, $91b2e49f92ed636c$export$2c34560c3749dc63 as bind_to_a2c_button, $91b2e49f92ed636c$export$82a685f2da2fb027 as bind_tracking_to_link, $43683b1103edab15$export$336e7ad40bae0652 as set_depict_id_fn, $43683b1103edab15$export$8a96793bf9f87d90 as set_user_id_fn, $43683b1103edab15$export$6399bdb2291895e0 as get_depict_id, $43683b1103edab15$export$adc61a405a4cabed as get_user_id, $43683b1103edab15$export$15f8a0cd5a8c0ebb as depict_click, $43683b1103edab15$export$82badda1f9923310 as depict_prefilled, $43683b1103edab15$export$9028351cb994757e as depict_add_to_cart, $43683b1103edab15$export$93ae15b1ae509334 as set_session_id_fn, $43683b1103edab15$export$61e7e1f11e96692f as get_session_id, $43683b1103edab15$export$622991c71a1f52b3 as get_cookie, $43683b1103edab15$export$8c6f26a5b6921b95 as get_tracking_event_context_data, $cafa1ff1049985c2$export$72036d950e1fae95 as filter_depict_payload, $cafa1ff1049985c2$export$28cacbd9b4306ffc as send_depict, $cafa1ff1049985c2$export$cc3b6ddf805f6156 as foolproof_send_beacon, $cafa1ff1049985c2$export$608478473a3304a0 as send_depict_unfiltered, $cafa1ff1049985c2$export$aa26019042811d4f as send_websocket, $42bbbba8196bd057$export$674d8cd8b6868154 as create_ga_queue, $42bbbba8196bd057$export$edfedd0557ca5a2d as make_tracker_send_to_depict, $3abef00489070e23$export$1ff14fec60ed5697 as ga_to_transaction_api, $c749fe63b72056ef$export$f75172d2e289cd02 as send_ga, $c749fe63b72056ef$export$ac7296527cb52311 as setup_ga, $c749fe63b72056ef$export$d031e55ccd4c52dc as setup_gtag, $c749fe63b72056ef$export$f522672c9379e339 as gtag_click, $c749fe63b72056ef$export$bf205937e5e012cb as ga_purchase_click, $c749fe63b72056ef$export$127751e82111fcf as ga_rec_click, $c749fe63b72056ef$export$7babcd5d4056b2ca as gtag_view, $c749fe63b72056ef$export$f3354ec2ce95ebd9 as load_gtag, $ccf918da074d7243$export$4205dc6835bc0d9f as send_impression_event, $21285393646b9849$export$37125ccc5dd98050 as impression_track_element, $405969d60b37fdac$export$d0efd8ed14f5c33 as impression_tracking_post_processor, $ccf918da074d7243$export$c543ee4cdb0d0964 as set_impression_threshold, $ccf918da074d7243$export$135da44d0ba958bc as impression_threshold, $ccf918da074d7243$export$ca8321ea61dc2544 as has_to_be_intersecting_for, $61b3c9e5f2cf8171$export$58c56fe2313fdbe3 as add_new_tab_listener, $61b3c9e5f2cf8171$export$836f70a28c317905 as broadcast_product_id, $61b3c9e5f2cf8171$export$8f66c4c7fb96eda2 as contextmenu_callback, $5dbacdc6a3feeb15$export$7e4427e80d5fc619 as optanon_get_cookie_ipns, $5dbacdc6a3feeb15$export$f0f6c846d96fdbec as init_optanon_tracking, $5dbacdc6a3feeb15$export$1dd9ce50e201eff1 as optanon_get_consent, $5dbacdc6a3feeb15$export$7a6d436e0782c6ed as optanon_wait_for_consent, $847e4a06ea6767c0$export$1ac466d53a6636ac as send_transaction_id_to_depict, $847e4a06ea6767c0$export$b11248fa13a8a86c as datalayer_transaction_id_extractor, $847e4a06ea6767c0$export$3ebd86018b39d9d2 as orderpage_transaction_id_extractor, $847e4a06ea6767c0$export$ff8673d5dea82bd4 as url_transaction_id_extractor, $54793663e06a1437$export$d63b08f4f29ddba5 as send_product_unavailable_to_depict, $aa0140679dc70b7a$export$eee4c4d924348b05 as send_page_view_if_needed, $aa0140679dc70b7a$export$f7cb1bd47199ec38 as send_page_view_on_navigation, $4ce764ddfee055ef$export$1d9c6fddbff3441f as DepictAPIWS, $2030306bed68a8c7$export$74108888f38788f3 as ListenableSet, $511123bb28a7b6f7$export$535946eb77c946dd as deparallelize, $511123bb28a7b6f7$export$f241be8e610f5c77 as deparallelize_no_drop, $9ab9ecb74920f343$export$f8ea2e7b15b5d129 as buildThresholdList, $1ce9aeebfbcb93f9$export$d9fdc6ce2907f95b as chaotic_closest, $0bdb8dbcf1bc7f34$export$cfef5d5c9ac09253 as standard_price_format, $0bdb8dbcf1bc7f34$export$9590700a594aef08 as ensure_object_path, $0bdb8dbcf1bc7f34$export$925772df9b4d16e5 as ensure_parameter_in_url, $0bdb8dbcf1bc7f34$export$44951404cb8d0583 as html2elems, $0bdb8dbcf1bc7f34$export$d3e2a0560cbf4787 as html2elem, $0bdb8dbcf1bc7f34$export$5e63aea0cac01fa0 as querySelectorAllElements, $0bdb8dbcf1bc7f34$export$785f04709990c4ec as querySelectorUpwards, $0bdb8dbcf1bc7f34$export$f124e3ee16e6b45d as intl_number_format_with_fallback, $0bdb8dbcf1bc7f34$export$d4bd03f19260ef1c as relativify, $d832040ef2097a0e$export$6b75200e58bc97d0 as deduplicate, $d832040ef2097a0e$export$9426572bd5645bc1 as dedup_products, $ead1f6ae93c69da9$export$82539d9817116aff as navigate_with_next_router, $802201ed0a316c43$export$774bc87373c4fc6c as add_item, $802201ed0a316c43$export$337197b94b3bd680 as get_items_in_cart, $802201ed0a316c43$export$783ef16647773b3d as get_shopify_analytics_meta_product, $802201ed0a316c43$export$ab0f802c05dd969b as intercept, $b6f5b218b1a73900$export$85be83e1935d93c2 as fetch_replacer, $b6f5b218b1a73900$export$f8da66bc4f1d059e as FakeResponse, $2d1ffbfaa1c2d9e3$export$bcd70d5ed1cf6313 as fetch_retry, $1813f33dd0fc7e1d$export$b404e20f3c4a490e as get_optimize_variant, $0d2acf276472ebf7$export$20e9533e68ee72e7 as stateless_href_change_ipns, $0d2acf276472ebf7$export$a9d39e43ae273d26 as href_change_ipns, $0d2acf276472ebf7$export$baccefee4a395d8f as history_replacer, $0d2acf276472ebf7$export$1cd22bab0d2c3b0b as on_next_navigation, $0d2acf276472ebf7$export$7500cdfd37aafd43 as instant_exec_on_suspect_history_change, $607fc90221d440a6$export$e806c6c1615a59ae as async_iterable_ipns, $607fc90221d440a6$export$10c3e52ef388b81b as make_ipns_stateful, $607fc90221d440a6$export$90740b5bc9c2b3b7 as make_ipns_stateless, $ec58be30798d6e95$export$3e42f5078e3abfc0 as make_simple_async_iterable, $ec58be30798d6e95$export$e2c811ae0eb35313 as RawObservableInformation, $4f24151f2cddad7b$export$2c2f50b30b7b2576 as iterable_to_attribute, $8c97019b5f7b0d0e$export$7c081fdbc65b6a2a as iterable_to_elems, $b8270fcf290bb3af$export$927664b47117acb0 as make_asyncIterable_exiter, $693e2a1517bef984$export$f8913c8a18f7ca21 as zip_async_iterables, $8bed543774ca0dd4$export$f811d2ce0aa6019b as insert_surfaces, $8bed543774ca0dd4$export$b8d1e1d07a3f3776 as prevent_infinite_loop, $8bed543774ca0dd4$export$e3f70ef7e3d00501 as revertable_remove, $0a581f1dfa083522$export$59ba1eb2c083f0cd as insert_styling, $0a581f1dfa083522$export$692b606677218a16 as depict_init, $0a581f1dfa083522$export$328e81c44cddf3c0 as depict_init_with_market_logic, $0a581f1dfa083522$export$a4f97b27a0592e6c as normal_get_product_id, $0a581f1dfa083522$export$a96c18473f2af463 as track_a2c, $29407d8301dc2f23$export$515c3ea4d599b05a as javascript_media_query, $39ef887981612535$export$33f937d741e49339 as patched_querySelectorAll, $78270f2ea7ca229f$export$a4eccf92efefa04d as placeholder_svg, $78270f2ea7ca229f$export$2dd69958012e3e49 as make_placeholder_rr, $78270f2ea7ca229f$export$3b75288f46cadd96 as random_text_placeholder, $bb3252f70898acd6$export$947a20746936143d as Promise_Any, $9e268c1aeeb86b34$export$c50e1901e8ed0615 as queueMacroTask, $d89638655e64f324$export$bb0a9c36cf454ea0 as rand, $460df8550f9d084d$export$656831b7e9c341c3 as random_string, $460df8550f9d084d$export$a6db784f019668ba as make_random_classname, $49c4fa2e27e642fa$export$3d04c40e7acc1a32 as reactive_template, $a79c7168700020ff$export$8ec5c86406f333ff as removeChild_error_swallowing_factory, $1dd4146ad893cfb2$export$38e89c688f9d553a as replace_promise_with_native_if_exists_and_enforce, $1dd4146ad893cfb2$export$e647444ed9403635 as get_iframe_promise, $bbb9f33eb5feb86a$export$2a1cc61cffa1f36f as rp_relativify_fetch, $bbb9f33eb5feb86a$export$f14a775632a826c4 as rp_relativify_history, $bbb9f33eb5feb86a$export$2a38b176ce969e2c as rp_relativify_xhr, $bbb9f33eb5feb86a$export$83ec13b10b391f13 as default_rp_fixes, $5c4afc453f904a1f$export$39d526a1194b6499 as serialize_object, $8d4dfadc5e12c7fb$export$12b4c6cbc6b8b4e4 as sort_obj, $eda086e0899e75b0$export$a422d714c8cb1a5d as standard_get_market, $e72f2f1d48dc3a53$export$3427ec8268623f1 as listenToLocalStorage, $26eaaddf434c84f1$export$8d42ce4827f43582 as Tenant, $55698e6e298abcb0$export$cd1adfb8059b5fcd as timeout_promise, $d0e7629fb3179e02$export$79f910a98828378d as variable_setter_to_ipns, $d0e7629fb3179e02$export$d5062f468a0454f3 as find_descriptor, $d0e7629fb3179e02$export$2fc1a072736ae2f6 as is_available_in, $690d8897acf7a743$export$a739d9a07da7f9ce as use_voyado_id, $2cbe7e0ca2ce5438$export$5c069c93d2b7493f as wait, $4a6ab5f7377729b1$export$f314addd5f976083 as xhr_load, $4a6ab5f7377729b1$export$8e16c51fd2b6507 as xhr_read_interceptor, $4a6ab5f7377729b1$export$c74578d2cd47a84a as xhr_send_interceptor, $4a6ab5f7377729b1$export$33d1643df63073a8 as xhr_replace, $769ce417b39aa7d3$export$4a3043e508dd72f0 as DefaultViewMoreButton, $cf7ca80454d7b4c0$export$8a0e4d6f6abf7e90 as GeneralSideSlidein, $72d170fd5c7cb3fe$export$c068ad5361be7646 as GeneralSizeSelector, $ad592d9ddbcffe72$export$84712d0562a614b8 as Placeholder, $ad592d9ddbcffe72$export$d613f5b6d0a331a8 as ContainedPlaceholderImage, $fbe64cf2cf408e4f$export$97f31f44c68c1d5 as RecommendationContainer, $7693290d077384da$export$ddd70fdae1b350e6 as LeftChevron, $7693290d077384da$export$32a55d57d151bc5a as RightChevron, $6f1582c15e13f2f0$export$590326cc34f49e2d as createColorPicker, $7f57d546b5d5b3d6$export$237455ad7e59d4e5 as useExpandingContainer, $8483d1d9fcee52ec$export$2369f6fc1c911576 as ContainedHoverImage, $914971fb43986a16$export$788756b42446dc2d as ContainedImage, $45af9e834781a9bc$export$f39a7d0667e924a as make_sizes_setter, $45af9e834781a9bc$export$a62825542f1bfcf5 as make_sourceset_component, $45af9e834781a9bc$export$a98fc8a2c818d3d8 as is_safari, $45af9e834781a9bc$export$f7c915448031deac as make_url_with_query_params, $45af9e834781a9bc$export$3d13beba9b52c947 as resize_base_url, $6c2b49f3f564b0d1$export$362abebb4b313340 as base_url, $eba382943196079c$export$af2e17a20c2ea3c5 as Sentry, $4d49697a7a9a77a6$export$9dc8f3a0aa3efc85 as camelCasifyObject, $4d49697a7a9a77a6$export$b481488de1caa85 as snakeCasifyObject, $b828952b0fe1df8f$export$499ef00a6a3417f8 as rgb_to_hsl, $b828952b0fe1df8f$export$e4fd3b61e79357a7 as hsl_to_rgb, $b828952b0fe1df8f$export$98c2b3491e76c1f as relative_luminance_from_rgb, $b828952b0fe1df8f$export$486b165479b9284f as hsb_to_rgb, $b828952b0fe1df8f$export$ca305c142c6fc3cf as hex_to_rgb, $0766c85d387a9765$export$83d89fbfd8236492 as version, $f564adbc4675ceaf$export$2cefb7e61fcbae00 as add_to_version_info, $3aaea7425b99d050$export$ef73ea4f975745ba as edit_current_page_meta_tags, $155540b3b8aca771$export$fce59460a1699957 as cookiebot_get_consent, $155540b3b8aca771$export$56c2e8be65fb14ae as cookiebot_wait_for_consent, $155540b3b8aca771$export$8827362e5e938d26 as cookiebot_get_cookie_ipns, $155540b3b8aca771$export$abec7fd9f0b9cc22 as init_cookiebot_tracking };
|