@depict-ai/utilishared 0.0.40 → 0.0.42
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/dist/index.d.ts +228 -110
- package/dist/main.js +52 -43
- package/dist/module.js +52 -43
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -294,6 +294,9 @@ function $e6c6e7929ea385ae$export$997143d41f6a0c9b(...args) {
|
|
|
294
294
|
}
|
|
295
295
|
|
|
296
296
|
|
|
297
|
+
const $815f67c61b4c0a42$export$83d89fbfd8236492 = "0.0.42";
|
|
298
|
+
|
|
299
|
+
|
|
297
300
|
/**
|
|
298
301
|
* @deprecated this was a stupid idea, it's much easier to read if one just does a quick arrow function that provides the wanted arguments
|
|
299
302
|
*/ function $ee1d22bd1fcdd4e1$export$6e7454c733fa1fb2(fn, ...args) {
|
|
@@ -835,18 +838,16 @@ function $61a34358bf0d3d8b$var$fakesentry() {
|
|
|
835
838
|
}
|
|
836
839
|
|
|
837
840
|
|
|
838
|
-
function $268cbd9e4ade92db$export$b3bbfd758f11cfa9(fn,
|
|
839
|
-
const report_w_severity = (e)=>$268cbd9e4ade92db$export$f18d5b0af29128b7(msg ? [
|
|
840
|
-
e,
|
|
841
|
-
msg
|
|
842
|
-
] : e, severity);
|
|
841
|
+
function $268cbd9e4ade92db$export$b3bbfd758f11cfa9(fn, message, severity = "error") {
|
|
843
842
|
return function() {
|
|
843
|
+
const report_w_severity = (e)=>$268cbd9e4ade92db$export$f18d5b0af29128b7(message ? [
|
|
844
|
+
e,
|
|
845
|
+
message
|
|
846
|
+
] : e, severity);
|
|
844
847
|
try {
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
if (typeof maybe_promise?.catch == "function") return maybe_promise.catch(report_w_severity);
|
|
849
|
-
return maybe_promise;
|
|
848
|
+
const return_value = Reflect.apply(fn, this, arguments);
|
|
849
|
+
if (fn?.constructor?.name === "AsyncFunction" || typeof return_value?.then === "function") return return_value.catch(report_w_severity);
|
|
850
|
+
return return_value;
|
|
850
851
|
} catch (e) {
|
|
851
852
|
report_w_severity(e);
|
|
852
853
|
}
|
|
@@ -1090,11 +1091,13 @@ class $9043c64496e3375f$export$12e07a2a9f87578a {
|
|
|
1090
1091
|
ifexists: (selector, callback)=>{
|
|
1091
1092
|
this.#check_observer_args(selector, callback, true);
|
|
1092
1093
|
if (selector instanceof Node) {
|
|
1093
|
-
if (document.documentElement.contains(selector))
|
|
1094
|
+
if (document.documentElement.contains(selector)) // When the selector is a node the selector and the element are the same, dunno how we could reflect that in the typing though
|
|
1095
|
+
this.#call_callbacks([
|
|
1094
1096
|
callback
|
|
1095
1097
|
], (callback_)=>({
|
|
1096
1098
|
element_: selector,
|
|
1097
1099
|
selector_: selector,
|
|
1100
|
+
// ts is being stupid here because it doesn't understand that everything in string | Text | Element | Comment that's a node is Text | Element | Comment
|
|
1098
1101
|
disconnector_: this.#disconnect_fn({
|
|
1099
1102
|
event_: "exists",
|
|
1100
1103
|
selector_: new WeakRef(selector),
|
|
@@ -1722,10 +1725,11 @@ class $d10801050840d92b$export$1b28bc5c68cc4d77 extends EventTarget {
|
|
|
1722
1725
|
get: ()=>this.#ons[ev],
|
|
1723
1726
|
set: (v)=>this.#ons[ev] = v
|
|
1724
1727
|
});
|
|
1725
|
-
this.addEventListener(ev, (
|
|
1728
|
+
this.addEventListener(ev, (e)=>{
|
|
1729
|
+
// e can be MessageEvent | CloseEvent | ErrorEvent I think
|
|
1726
1730
|
const on_fn = this.#ons[ev];
|
|
1727
1731
|
if (typeof on_fn === "function") (0, $268cbd9e4ade92db$export$b3bbfd758f11cfa9)(on_fn).call(ev, e);
|
|
1728
|
-
})
|
|
1732
|
+
});
|
|
1729
1733
|
}
|
|
1730
1734
|
}
|
|
1731
1735
|
async #ensure_connection() {
|
|
@@ -1956,7 +1960,7 @@ const $0c84f8e99aac5765$export$aa26019042811d4f = /*@__PURE__*/ $0c84f8e99aac576
|
|
|
1956
1960
|
if (process.env.DEPICT === "false") return;
|
|
1957
1961
|
for(let i = 0; i < bodies.length; i++){
|
|
1958
1962
|
const id = (0, $650b64c1b384c895$export$656831b7e9c341c3)();
|
|
1959
|
-
$0c84f8e99aac5765$var$ws_instance
|
|
1963
|
+
$0c84f8e99aac5765$var$ws_instance?.ensure_sent({
|
|
1960
1964
|
id: id,
|
|
1961
1965
|
event: bodies[i]
|
|
1962
1966
|
}).catch((e)=>(0, $268cbd9e4ade92db$export$f18d5b0af29128b7)(e, "error"));
|
|
@@ -2026,7 +2030,7 @@ const $0c84f8e99aac5765$export$28cacbd9b4306ffc = /*@__PURE__*/ $0c84f8e99aac576
|
|
|
2026
2030
|
|
|
2027
2031
|
|
|
2028
2032
|
|
|
2029
|
-
let $e0a87646d12cb987$export$6399bdb2291895e0 =
|
|
2033
|
+
let $e0a87646d12cb987$export$6399bdb2291895e0 = ()=>{
|
|
2030
2034
|
let id = "";
|
|
2031
2035
|
let localstorage_error;
|
|
2032
2036
|
let cookie_error;
|
|
@@ -2063,7 +2067,7 @@ let $e0a87646d12cb987$export$6399bdb2291895e0 = /*@__PURE__*/ (0, /*@__PURE__*/$
|
|
|
2063
2067
|
}
|
|
2064
2068
|
if (!id) id = (0, $650b64c1b384c895$export$656831b7e9c341c3)();
|
|
2065
2069
|
return id;
|
|
2066
|
-
}
|
|
2070
|
+
};
|
|
2067
2071
|
let $e0a87646d12cb987$export$adc61a405a4cabed = $e0a87646d12cb987$export$6399bdb2291895e0;
|
|
2068
2072
|
let $e0a87646d12cb987$export$61e7e1f11e96692f = ()=>undefined;
|
|
2069
2073
|
const $e0a87646d12cb987$export$336e7ad40bae0652 = /*@__PURE__*/ (0, /*@__PURE__*/$268cbd9e4ade92db$export$b3bbfd758f11cfa9)((newfn)=>$e0a87646d12cb987$export$6399bdb2291895e0 = newfn);
|
|
@@ -2661,7 +2665,8 @@ function $2026711c6c2d6204$export$7e4427e80d5fc619() {
|
|
|
2661
2665
|
const existing_consent = $2026711c6c2d6204$var$consent_from_cookie();
|
|
2662
2666
|
if (existing_consent?.necessary) // If "necessary" isn't set, user hasn't actually given/withold consent yet.
|
|
2663
2667
|
$2026711c6c2d6204$var$cookie_ipns(existing_consent);
|
|
2664
|
-
window.addEventListener("consent.onetrust", (0, $268cbd9e4ade92db$export$b3bbfd758f11cfa9)((
|
|
2668
|
+
window.addEventListener("consent.onetrust", (0, $268cbd9e4ade92db$export$b3bbfd758f11cfa9)((evt)=>{
|
|
2669
|
+
const c = evt;
|
|
2665
2670
|
// Cast because TS doesn't know about the forEach coming up
|
|
2666
2671
|
const consent_obj = {};
|
|
2667
2672
|
Object.keys($2026711c6c2d6204$var$OPTANON_TO_COOKIEBOT).forEach((k)=>{
|
|
@@ -2857,7 +2862,7 @@ const $e4bebbfa0f0b1454$export$59ba1eb2c083f0cd = /*@__PURE__*/ (0, /*@__PURE__*
|
|
|
2857
2862
|
const style_tag = await ($e4bebbfa0f0b1454$var$existing_style_tag ||= (0, $2a1cbc63a04d4a2d$export$b6ae1bc530f4c149).wait_for_element("head").then((head)=>{
|
|
2858
2863
|
const tag = document.createElement("style");
|
|
2859
2864
|
(0, $2a1cbc63a04d4a2d$export$b6ae1bc530f4c149).onremoved(// reinsertion for next.js's "portable" <head>
|
|
2860
|
-
tag, (
|
|
2865
|
+
tag, (eoe)=>{
|
|
2861
2866
|
if (document.head.contains(tag)) // just make sure to not freak out if it's already been added again
|
|
2862
2867
|
return;
|
|
2863
2868
|
if ($e4bebbfa0f0b1454$var$reactions_in_last_s >= 10) {
|
|
@@ -2868,14 +2873,14 @@ const $e4bebbfa0f0b1454$export$59ba1eb2c083f0cd = /*@__PURE__*/ (0, /*@__PURE__*
|
|
|
2868
2873
|
$e4bebbfa0f0b1454$var$reactions_in_last_s++;
|
|
2869
2874
|
setTimeout(()=>$e4bebbfa0f0b1454$var$reactions_in_last_s--, 1000);
|
|
2870
2875
|
document.head.append(tag); // we're sure that head exists now since we inserted it there previously
|
|
2871
|
-
})
|
|
2876
|
+
});
|
|
2872
2877
|
(0, $e6c6e7929ea385ae$export$de56f1198d121036)("inserting", tag, "into", head);
|
|
2873
2878
|
return head.appendChild(tag);
|
|
2874
2879
|
}));
|
|
2875
2880
|
style_tag.append(css);
|
|
2876
2881
|
});
|
|
2877
2882
|
const $e4bebbfa0f0b1454$export$a96c18473f2af463 = (tenant, selector, validator)=>{
|
|
2878
|
-
return (0, $2a1cbc63a04d4a2d$export$b6ae1bc530f4c149).onexists(selector, (
|
|
2883
|
+
return (0, $2a1cbc63a04d4a2d$export$b6ae1bc530f4c149).onexists(selector, ({ element: element })=>(0, $c8263a2185830bf1$export$2c34560c3749dc63)(element, tenant.get_product_id, (p_id, r_id, was_unmatching, event)=>{
|
|
2879
2884
|
if (typeof validator === "function" && !validator(event)) return;
|
|
2880
2885
|
if (!was_unmatching) (0, $cc7abb54d64ac1e3$export$bf205937e5e012cb)();
|
|
2881
2886
|
(0, $e0a87646d12cb987$export$9028351cb994757e)({
|
|
@@ -2887,7 +2892,7 @@ const $e4bebbfa0f0b1454$export$a96c18473f2af463 = (tenant, selector, validator)=
|
|
|
2887
2892
|
recommendation_id: r_id
|
|
2888
2893
|
}
|
|
2889
2894
|
});
|
|
2890
|
-
}, true))
|
|
2895
|
+
}, true));
|
|
2891
2896
|
};
|
|
2892
2897
|
const $e4bebbfa0f0b1454$export$a4f97b27a0592e6c = (url)=>(url ? new URL(url, window.location.origin) : window.location).pathname.split("/").filter((a)=>a).pop()?.replace(/\.html?$/i, "") || "";
|
|
2893
2898
|
const $e4bebbfa0f0b1454$export$692b606677218a16 = (callback)=>{
|
|
@@ -3349,6 +3354,7 @@ async function $558ccd2de887e6d9$export$a9fc160c5ed83bd7(t, rendering_options) {
|
|
|
3349
3354
|
}
|
|
3350
3355
|
const { template: template , post_processors: post_processors = [] } = rendering_options;
|
|
3351
3356
|
const caught_post_processing_functions = post_processors.map((post_pro)=>(0, $268cbd9e4ade92db$export$b3bbfd758f11cfa9)(post_pro));
|
|
3357
|
+
let a;
|
|
3352
3358
|
const caught_html2elems = (0, $268cbd9e4ade92db$export$b3bbfd758f11cfa9)((0, $bf7f12fe044e41b2$export$44951404cb8d0583));
|
|
3353
3359
|
let output_elements;
|
|
3354
3360
|
if (typeof template === "function") {
|
|
@@ -3359,7 +3365,7 @@ async function $558ccd2de887e6d9$export$a9fc160c5ed83bd7(t, rendering_options) {
|
|
|
3359
3365
|
const info = new $558ccd2de887e6d9$export$da854280fb61cd32(t, rendering_options, displays, index, ()=>keep = false, event_listeners);
|
|
3360
3366
|
const template_result = await caught_template(display, info);
|
|
3361
3367
|
if (!keep) throw keep;
|
|
3362
|
-
const elements = typeof template_result == "string" ? caught_html2elems(template_result) : template_result;
|
|
3368
|
+
const elements = (typeof template_result == "string" ? caught_html2elems(template_result) : template_result) || [];
|
|
3363
3369
|
const post_processed_elements = await $558ccd2de887e6d9$export$cf7cbc6b76039101(t, rendering_options, processed_displays, index, caught_post_processing_functions, elements, event_listeners);
|
|
3364
3370
|
return Array.from(post_processed_elements);
|
|
3365
3371
|
}))).filter((p)=>p.status === "fulfilled").map((p)=>p.value).flat();
|
|
@@ -3368,7 +3374,7 @@ async function $558ccd2de887e6d9$export$a9fc160c5ed83bd7(t, rendering_options) {
|
|
|
3368
3374
|
// we don't know how this will be used and want it to be robust
|
|
3369
3375
|
} else output_elements = (await Promise.all(processed_displays.map(async (display, index)=>{
|
|
3370
3376
|
const html = $558ccd2de887e6d9$export$e0009e7da572f99b(template, display);
|
|
3371
|
-
const elements = caught_html2elems(html);
|
|
3377
|
+
const elements = caught_html2elems(html) || [];
|
|
3372
3378
|
const post_processed_elements = await $558ccd2de887e6d9$export$cf7cbc6b76039101(t, rendering_options, processed_displays, index, caught_post_processing_functions, elements);
|
|
3373
3379
|
return Array.from(post_processed_elements);
|
|
3374
3380
|
}))).flat();
|
|
@@ -3412,8 +3418,8 @@ function $558ccd2de887e6d9$export$c42139a43c877ecd(obj) {
|
|
|
3412
3418
|
}
|
|
3413
3419
|
return obj;
|
|
3414
3420
|
}
|
|
3415
|
-
async function $558ccd2de887e6d9$export$cf7cbc6b76039101(t, rendering_options, displays, index, functions,
|
|
3416
|
-
|
|
3421
|
+
async function $558ccd2de887e6d9$export$cf7cbc6b76039101(t, rendering_options, displays, index, functions, elements, event_listeners = []) {
|
|
3422
|
+
let b;
|
|
3417
3423
|
let keep = true;
|
|
3418
3424
|
const info = new $558ccd2de887e6d9$export$da854280fb61cd32(t, rendering_options, displays, index, ()=>keep = false, event_listeners);
|
|
3419
3425
|
for(let i = 0; i < functions.length; i++){
|
|
@@ -3438,7 +3444,7 @@ async function $558ccd2de887e6d9$export$c22e610107c5a15a(t, rendering_options, d
|
|
|
3438
3444
|
for(let j = 0; j < caught_pre_processors.length; j++){
|
|
3439
3445
|
const pre_processor = caught_pre_processors[j];
|
|
3440
3446
|
const result = await pre_processor(display, info_for_pre_pro);
|
|
3441
|
-
if (result) display = result;
|
|
3447
|
+
if (result) display = result; // Don't understand why this cast is needed
|
|
3442
3448
|
if (!keep) break;
|
|
3443
3449
|
}
|
|
3444
3450
|
if (keep) processed_displays.push(display);
|
|
@@ -3447,7 +3453,6 @@ async function $558ccd2de887e6d9$export$c22e610107c5a15a(t, rendering_options, d
|
|
|
3447
3453
|
return processed_displays;
|
|
3448
3454
|
}
|
|
3449
3455
|
class $558ccd2de887e6d9$export$da854280fb61cd32 {
|
|
3450
|
-
// maybe not ideal? idk
|
|
3451
3456
|
constructor(t, rendering_options, displays, index, remove_display, event_listeners){
|
|
3452
3457
|
this.t = t;
|
|
3453
3458
|
this.rendering_options = rendering_options;
|
|
@@ -4247,7 +4252,10 @@ function $1da560af170fb839$export$e4741190ccada479(element, selector) {
|
|
|
4247
4252
|
|
|
4248
4253
|
|
|
4249
4254
|
const $90e0b983530610e7$export$eb0b9ed911409b57 = (callback, element)=>((0, $268cbd9e4ade92db$export$b3bbfd758f11cfa9)(callback)(element), element);
|
|
4250
|
-
|
|
4255
|
+
function $90e0b983530610e7$export$f63fcc839cb0f734(event, handler, element) {
|
|
4256
|
+
element.addEventListener(event, (0, $268cbd9e4ade92db$export$b3bbfd758f11cfa9)(handler));
|
|
4257
|
+
return element;
|
|
4258
|
+
}
|
|
4251
4259
|
const $90e0b983530610e7$export$22a65337c1b43b1f = /* @PURE */ (classes)=>classes.filter((c)=>c !== undefined).join(" ");
|
|
4252
4260
|
|
|
4253
4261
|
|
|
@@ -4685,7 +4693,7 @@ class $a69a5236b5814082$export$68babfc5be0de5da extends (0, $1683d0164abd7c1d$ex
|
|
|
4685
4693
|
constructor(options, lazyfier_options){
|
|
4686
4694
|
super(options);
|
|
4687
4695
|
const lazy_promise = new Promise((r)=>{
|
|
4688
|
-
(0, $2a1cbc63a04d4a2d$export$b6ae1bc530f4c149).onexists(this.insert_here, (
|
|
4696
|
+
(0, $2a1cbc63a04d4a2d$export$b6ae1bc530f4c149).onexists(this.insert_here, ({ element: element , disconnector: disconnector })=>{
|
|
4689
4697
|
const i_o = new IntersectionObserver((0, $268cbd9e4ade92db$export$b3bbfd758f11cfa9)((records)=>{
|
|
4690
4698
|
for (const record of records)if (record.intersectionRatio > 0) {
|
|
4691
4699
|
r(true);
|
|
@@ -4695,7 +4703,7 @@ class $a69a5236b5814082$export$68babfc5be0de5da extends (0, $1683d0164abd7c1d$ex
|
|
|
4695
4703
|
}
|
|
4696
4704
|
}));
|
|
4697
4705
|
i_o.observe(element);
|
|
4698
|
-
})
|
|
4706
|
+
});
|
|
4699
4707
|
});
|
|
4700
4708
|
this.lazyfier = new (0, $1da560af170fb839$export$3be7054c61590ee3)({
|
|
4701
4709
|
container: this.insert_here,
|
|
@@ -4763,7 +4771,7 @@ function $04d2f7d9126af667$export$1bffac19f9f0d6fc(elements, _display, info) {
|
|
|
4763
4771
|
$04d2f7d9126af667$export$3777a14dd8c2363d.add(displays);
|
|
4764
4772
|
const { get_product_id: get_product_id } = info.t;
|
|
4765
4773
|
const { type: type } = rendering_options;
|
|
4766
|
-
(0, $cc7abb54d64ac1e3$export$7babcd5d4056b2ca)(displays, get_product_id, {
|
|
4774
|
+
(0, $cc7abb54d64ac1e3$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 */ , {
|
|
4767
4775
|
list_name: "depict_" + type
|
|
4768
4776
|
});
|
|
4769
4777
|
}
|
|
@@ -5627,7 +5635,9 @@ async function $1cc2444a0f1b992e$export$c84671f46d6a1ca({ rows: rows , container
|
|
|
5627
5635
|
for await (const [currently_showing_rows, number_of_els] of (0, $ef237c2bba47492f$export$f8913c8a18f7ca21)([
|
|
5628
5636
|
// start for await loop when the container element gets inserted into the DOM
|
|
5629
5637
|
// the loop is broken by an observer.onremoved above calling .exit on the IPNS this depends on
|
|
5638
|
+
// @ts-ignore
|
|
5630
5639
|
ipns,
|
|
5640
|
+
// @ts-ignore too complicated to fix this IMO
|
|
5631
5641
|
el_count_ipns
|
|
5632
5642
|
])){
|
|
5633
5643
|
our_style_el.innerText = col_styling + cols_at_size.map((options)=>{
|
|
@@ -6569,7 +6579,7 @@ function $3d8df0a23b9bebac$var$scroll_idle(slider, chunk_size, clones_per_side)
|
|
|
6569
6579
|
];
|
|
6570
6580
|
const { intersecting_items_object: intersecting_items_object } = slider;
|
|
6571
6581
|
const index_of_first_intersecting = slider.first_intersecting_index();
|
|
6572
|
-
const index_of_last_intersecting = Math.max(...Object.keys(
|
|
6582
|
+
const index_of_last_intersecting = Math.max(...Object.keys(intersecting_items_object).map((v)=>+v));
|
|
6573
6583
|
const post_move = (direction)=>{
|
|
6574
6584
|
// slider.invalidate_cache();
|
|
6575
6585
|
// for (const key in intersecting_items_object) {
|
|
@@ -6798,12 +6808,12 @@ function $bf76a92ec2055e1a$export$be95cb0e8cfd099e() {
|
|
|
6798
6808
|
|
|
6799
6809
|
|
|
6800
6810
|
function $0c9d834f187cc4ff$export$3ebd86018b39d9d2(t, selector, filter) {
|
|
6801
|
-
(0, $2a1cbc63a04d4a2d$export$b6ae1bc530f4c149).onexists(selector, (
|
|
6811
|
+
(0, $2a1cbc63a04d4a2d$export$b6ae1bc530f4c149).onexists(selector, (eoe)=>{
|
|
6802
6812
|
(0, $e6c6e7929ea385ae$export$de56f1198d121036)("Order confirmation element showed up!", eoe);
|
|
6803
6813
|
const { element: element } = eoe;
|
|
6804
6814
|
const the_id = element.innerText;
|
|
6805
6815
|
$0c9d834f187cc4ff$export$1ac466d53a6636ac(t, the_id, (0, $e0a87646d12cb987$export$6399bdb2291895e0)(), filter);
|
|
6806
|
-
})
|
|
6816
|
+
});
|
|
6807
6817
|
}
|
|
6808
6818
|
function $0c9d834f187cc4ff$export$b11248fa13a8a86c(tenant, id_extractor) {
|
|
6809
6819
|
// Use the given extractor to find a transaction ID from each entry pushed to dataLayer.
|
|
@@ -6811,7 +6821,7 @@ function $0c9d834f187cc4ff$export$b11248fa13a8a86c(tenant, id_extractor) {
|
|
|
6811
6821
|
const maybe_send_entries = (entries)=>entries.map(id_extractor).filter((id)=>id && typeof id === "string").forEach((id)=>{
|
|
6812
6822
|
$0c9d834f187cc4ff$export$1ac466d53a6636ac(tenant, id);
|
|
6813
6823
|
});
|
|
6814
|
-
const dataLayer =
|
|
6824
|
+
const dataLayer = globalThis.dataLayer ||= [];
|
|
6815
6825
|
// Process entries that are already queued at this point
|
|
6816
6826
|
maybe_send_entries(dataLayer);
|
|
6817
6827
|
// And then process any future entries, making sure to pass them on to other potential proxies to the push function
|
|
@@ -7086,7 +7096,7 @@ function $23d6393391c08860$export$ab0f802c05dd969b(on_request) {
|
|
|
7086
7096
|
const response_promise = target.apply(this_arg, argument_list);
|
|
7087
7097
|
try {
|
|
7088
7098
|
const input = argument_list[0];
|
|
7089
|
-
const url = input instanceof Request ? input.url : input;
|
|
7099
|
+
const url = input instanceof Request ? input.url : input instanceof URL ? input.href : input;
|
|
7090
7100
|
// TODO, doing it like this doesn't feel very robust.
|
|
7091
7101
|
// And what if the developer wants to override which url's corespond to which events?
|
|
7092
7102
|
const url_segement_to_type = [
|
|
@@ -7323,7 +7333,7 @@ const $c693a2d89c78efe6$export$e3f70ef7e3d00501 = /*@__PURE__*/ (0, /*@__PURE__*
|
|
|
7323
7333
|
});
|
|
7324
7334
|
};
|
|
7325
7335
|
if (typeof target == "string") {
|
|
7326
|
-
const disconnect_observer = (0, $2a1cbc63a04d4a2d$export$b6ae1bc530f4c149).onexists(target, (
|
|
7336
|
+
const disconnect_observer = (0, $2a1cbc63a04d4a2d$export$b6ae1bc530f4c149).onexists(target, ({ element: element , disconnector: disconnector })=>per_el_fn(element, disconnector));
|
|
7327
7337
|
(0, $69f7524c8bdd85b4$export$1cd22bab0d2c3b0b)(disconnect_observer);
|
|
7328
7338
|
} else {
|
|
7329
7339
|
let did_already_fail = false;
|
|
@@ -7493,6 +7503,7 @@ const $fac9c96b6bbe43cd$export$a4eccf92efefa04d = (image_width, image_height, co
|
|
|
7493
7503
|
async function $fac9c96b6bbe43cd$export$2dd69958012e3e49({ override_rec_renderer: override_rec_renderer = (0, $92bde32714bb1e07$export$50ce83ace0cdd87e) , image_width: image_width = 2000 , image_height: image_height = 2000 , num_items: num_items = 10 , color: color = "#d9d9d9" , on_no_rendering_result: on_no_rendering_result , post_rendering: post_rendering } = {}) {
|
|
7494
7504
|
const image_url = $fac9c96b6bbe43cd$export$a4eccf92efefa04d(image_width, image_height, color);
|
|
7495
7505
|
return async (t, rendering_options)=>{
|
|
7506
|
+
// @ts-ignore FIXME: this is a hack to make the type checker happy
|
|
7496
7507
|
const actual_rendering = override_rec_renderer(t, rendering_options).catch((0, $548fd58b14b25a52$export$8048b892d651b310)); // start rendering first
|
|
7497
7508
|
const placeholder_opts = {
|
|
7498
7509
|
...rendering_options,
|
|
@@ -7528,6 +7539,7 @@ async function $fac9c96b6bbe43cd$export$2dd69958012e3e49({ override_rec_renderer
|
|
|
7528
7539
|
}
|
|
7529
7540
|
]
|
|
7530
7541
|
};
|
|
7542
|
+
// @ts-ignore FIXME: this is a hack to make the type checker happy
|
|
7531
7543
|
const placeholder_rendering = await override_rec_renderer(t, placeholder_opts).catch((0, $548fd58b14b25a52$export$8048b892d651b310));
|
|
7532
7544
|
let set_should_stay_inserted;
|
|
7533
7545
|
const should_stay_inserted = new Promise((r)=>set_should_stay_inserted = r);
|
|
@@ -7945,9 +7957,9 @@ const $5185cc9bd668b8f9$var$get_voyado_id = ()=>{
|
|
|
7945
7957
|
const va = /\b_vaI=([^;]+)/.exec(document.cookie)?.[1];
|
|
7946
7958
|
return va || $5185cc9bd668b8f9$var$default_id;
|
|
7947
7959
|
};
|
|
7948
|
-
const $5185cc9bd668b8f9$export$a739d9a07da7f9ce = ()=>{
|
|
7949
|
-
|
|
7950
|
-
};
|
|
7960
|
+
const $5185cc9bd668b8f9$export$a739d9a07da7f9ce = (0, $268cbd9e4ade92db$export$b3bbfd758f11cfa9)(()=>{
|
|
7961
|
+
(0, $e0a87646d12cb987$export$336e7ad40bae0652)($5185cc9bd668b8f9$var$get_voyado_id);
|
|
7962
|
+
});
|
|
7951
7963
|
|
|
7952
7964
|
|
|
7953
7965
|
|
|
@@ -8931,9 +8943,6 @@ function $12c29616944c2fb7$export$f2ca6fc699ca1fb4(props = {}) {
|
|
|
8931
8943
|
|
|
8932
8944
|
|
|
8933
8945
|
|
|
8934
|
-
const $815f67c61b4c0a42$export$83d89fbfd8236492 = "0.0.40";
|
|
8935
|
-
|
|
8936
|
-
|
|
8937
8946
|
|
|
8938
8947
|
/**
|
|
8939
8948
|
* Shallowly converts all keys in an object from snake_case to camelCase.
|
package/dist/module.js
CHANGED
|
@@ -31,6 +31,9 @@ function $649f456f663da9fc$export$997143d41f6a0c9b(...args) {
|
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
|
|
34
|
+
const $0766c85d387a9765$export$83d89fbfd8236492 = "0.0.42";
|
|
35
|
+
|
|
36
|
+
|
|
34
37
|
/**
|
|
35
38
|
* @deprecated this was a stupid idea, it's much easier to read if one just does a quick arrow function that provides the wanted arguments
|
|
36
39
|
*/ function $a1c80794e6bf4cc2$export$6e7454c733fa1fb2(fn, ...args) {
|
|
@@ -572,18 +575,16 @@ function $eba382943196079c$var$fakesentry() {
|
|
|
572
575
|
}
|
|
573
576
|
|
|
574
577
|
|
|
575
|
-
function $b04e44fad5ea42c7$export$b3bbfd758f11cfa9(fn,
|
|
576
|
-
const report_w_severity = (e)=>$b04e44fad5ea42c7$export$f18d5b0af29128b7(msg ? [
|
|
577
|
-
e,
|
|
578
|
-
msg
|
|
579
|
-
] : e, severity);
|
|
578
|
+
function $b04e44fad5ea42c7$export$b3bbfd758f11cfa9(fn, message, severity = "error") {
|
|
580
579
|
return function() {
|
|
580
|
+
const report_w_severity = (e)=>$b04e44fad5ea42c7$export$f18d5b0af29128b7(message ? [
|
|
581
|
+
e,
|
|
582
|
+
message
|
|
583
|
+
] : e, severity);
|
|
581
584
|
try {
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
if (typeof maybe_promise?.catch == "function") return maybe_promise.catch(report_w_severity);
|
|
586
|
-
return maybe_promise;
|
|
585
|
+
const return_value = Reflect.apply(fn, this, arguments);
|
|
586
|
+
if (fn?.constructor?.name === "AsyncFunction" || typeof return_value?.then === "function") return return_value.catch(report_w_severity);
|
|
587
|
+
return return_value;
|
|
587
588
|
} catch (e) {
|
|
588
589
|
report_w_severity(e);
|
|
589
590
|
}
|
|
@@ -827,11 +828,13 @@ class $cdca9fea6eb103e5$export$12e07a2a9f87578a {
|
|
|
827
828
|
ifexists: (selector, callback)=>{
|
|
828
829
|
this.#check_observer_args(selector, callback, true);
|
|
829
830
|
if (selector instanceof Node) {
|
|
830
|
-
if (document.documentElement.contains(selector))
|
|
831
|
+
if (document.documentElement.contains(selector)) // When the selector is a node the selector and the element are the same, dunno how we could reflect that in the typing though
|
|
832
|
+
this.#call_callbacks([
|
|
831
833
|
callback
|
|
832
834
|
], (callback_)=>({
|
|
833
835
|
element_: selector,
|
|
834
836
|
selector_: selector,
|
|
837
|
+
// ts is being stupid here because it doesn't understand that everything in string | Text | Element | Comment that's a node is Text | Element | Comment
|
|
835
838
|
disconnector_: this.#disconnect_fn({
|
|
836
839
|
event_: "exists",
|
|
837
840
|
selector_: new WeakRef(selector),
|
|
@@ -1459,10 +1462,11 @@ class $4ce764ddfee055ef$export$1b28bc5c68cc4d77 extends EventTarget {
|
|
|
1459
1462
|
get: ()=>this.#ons[ev],
|
|
1460
1463
|
set: (v)=>this.#ons[ev] = v
|
|
1461
1464
|
});
|
|
1462
|
-
this.addEventListener(ev, (
|
|
1465
|
+
this.addEventListener(ev, (e)=>{
|
|
1466
|
+
// e can be MessageEvent | CloseEvent | ErrorEvent I think
|
|
1463
1467
|
const on_fn = this.#ons[ev];
|
|
1464
1468
|
if (typeof on_fn === "function") (0, $b04e44fad5ea42c7$export$b3bbfd758f11cfa9)(on_fn).call(ev, e);
|
|
1465
|
-
})
|
|
1469
|
+
});
|
|
1466
1470
|
}
|
|
1467
1471
|
}
|
|
1468
1472
|
async #ensure_connection() {
|
|
@@ -1693,7 +1697,7 @@ const $cafa1ff1049985c2$export$aa26019042811d4f = /*@__PURE__*/ $cafa1ff1049985c
|
|
|
1693
1697
|
if (process.env.DEPICT === "false") return;
|
|
1694
1698
|
for(let i = 0; i < bodies.length; i++){
|
|
1695
1699
|
const id = (0, $460df8550f9d084d$export$656831b7e9c341c3)();
|
|
1696
|
-
$cafa1ff1049985c2$var$ws_instance
|
|
1700
|
+
$cafa1ff1049985c2$var$ws_instance?.ensure_sent({
|
|
1697
1701
|
id: id,
|
|
1698
1702
|
event: bodies[i]
|
|
1699
1703
|
}).catch((e)=>(0, $b04e44fad5ea42c7$export$f18d5b0af29128b7)(e, "error"));
|
|
@@ -1763,7 +1767,7 @@ const $cafa1ff1049985c2$export$28cacbd9b4306ffc = /*@__PURE__*/ $cafa1ff1049985c
|
|
|
1763
1767
|
|
|
1764
1768
|
|
|
1765
1769
|
|
|
1766
|
-
let $43683b1103edab15$export$6399bdb2291895e0 =
|
|
1770
|
+
let $43683b1103edab15$export$6399bdb2291895e0 = ()=>{
|
|
1767
1771
|
let id = "";
|
|
1768
1772
|
let localstorage_error;
|
|
1769
1773
|
let cookie_error;
|
|
@@ -1800,7 +1804,7 @@ let $43683b1103edab15$export$6399bdb2291895e0 = /*@__PURE__*/ (0, /*@__PURE__*/$
|
|
|
1800
1804
|
}
|
|
1801
1805
|
if (!id) id = (0, $460df8550f9d084d$export$656831b7e9c341c3)();
|
|
1802
1806
|
return id;
|
|
1803
|
-
}
|
|
1807
|
+
};
|
|
1804
1808
|
let $43683b1103edab15$export$adc61a405a4cabed = $43683b1103edab15$export$6399bdb2291895e0;
|
|
1805
1809
|
let $43683b1103edab15$export$61e7e1f11e96692f = ()=>undefined;
|
|
1806
1810
|
const $43683b1103edab15$export$336e7ad40bae0652 = /*@__PURE__*/ (0, /*@__PURE__*/$b04e44fad5ea42c7$export$b3bbfd758f11cfa9)((newfn)=>$43683b1103edab15$export$6399bdb2291895e0 = newfn);
|
|
@@ -2398,7 +2402,8 @@ function $5dbacdc6a3feeb15$export$7e4427e80d5fc619() {
|
|
|
2398
2402
|
const existing_consent = $5dbacdc6a3feeb15$var$consent_from_cookie();
|
|
2399
2403
|
if (existing_consent?.necessary) // If "necessary" isn't set, user hasn't actually given/withold consent yet.
|
|
2400
2404
|
$5dbacdc6a3feeb15$var$cookie_ipns(existing_consent);
|
|
2401
|
-
window.addEventListener("consent.onetrust", (0, $b04e44fad5ea42c7$export$b3bbfd758f11cfa9)((
|
|
2405
|
+
window.addEventListener("consent.onetrust", (0, $b04e44fad5ea42c7$export$b3bbfd758f11cfa9)((evt)=>{
|
|
2406
|
+
const c = evt;
|
|
2402
2407
|
// Cast because TS doesn't know about the forEach coming up
|
|
2403
2408
|
const consent_obj = {};
|
|
2404
2409
|
Object.keys($5dbacdc6a3feeb15$var$OPTANON_TO_COOKIEBOT).forEach((k)=>{
|
|
@@ -2594,7 +2599,7 @@ const $0a581f1dfa083522$export$59ba1eb2c083f0cd = /*@__PURE__*/ (0, /*@__PURE__*
|
|
|
2594
2599
|
const style_tag = await ($0a581f1dfa083522$var$existing_style_tag ||= (0, $0b48ba2f40ce6067$export$b6ae1bc530f4c149).wait_for_element("head").then((head)=>{
|
|
2595
2600
|
const tag = document.createElement("style");
|
|
2596
2601
|
(0, $0b48ba2f40ce6067$export$b6ae1bc530f4c149).onremoved(// reinsertion for next.js's "portable" <head>
|
|
2597
|
-
tag, (
|
|
2602
|
+
tag, (eoe)=>{
|
|
2598
2603
|
if (document.head.contains(tag)) // just make sure to not freak out if it's already been added again
|
|
2599
2604
|
return;
|
|
2600
2605
|
if ($0a581f1dfa083522$var$reactions_in_last_s >= 10) {
|
|
@@ -2605,14 +2610,14 @@ const $0a581f1dfa083522$export$59ba1eb2c083f0cd = /*@__PURE__*/ (0, /*@__PURE__*
|
|
|
2605
2610
|
$0a581f1dfa083522$var$reactions_in_last_s++;
|
|
2606
2611
|
setTimeout(()=>$0a581f1dfa083522$var$reactions_in_last_s--, 1000);
|
|
2607
2612
|
document.head.append(tag); // we're sure that head exists now since we inserted it there previously
|
|
2608
|
-
})
|
|
2613
|
+
});
|
|
2609
2614
|
(0, $649f456f663da9fc$export$de56f1198d121036)("inserting", tag, "into", head);
|
|
2610
2615
|
return head.appendChild(tag);
|
|
2611
2616
|
}));
|
|
2612
2617
|
style_tag.append(css);
|
|
2613
2618
|
});
|
|
2614
2619
|
const $0a581f1dfa083522$export$a96c18473f2af463 = (tenant, selector, validator)=>{
|
|
2615
|
-
return (0, $0b48ba2f40ce6067$export$b6ae1bc530f4c149).onexists(selector, (
|
|
2620
|
+
return (0, $0b48ba2f40ce6067$export$b6ae1bc530f4c149).onexists(selector, ({ element: element })=>(0, $91b2e49f92ed636c$export$2c34560c3749dc63)(element, tenant.get_product_id, (p_id, r_id, was_unmatching, event)=>{
|
|
2616
2621
|
if (typeof validator === "function" && !validator(event)) return;
|
|
2617
2622
|
if (!was_unmatching) (0, $0263af58e2304a2b$export$bf205937e5e012cb)();
|
|
2618
2623
|
(0, $43683b1103edab15$export$9028351cb994757e)({
|
|
@@ -2624,7 +2629,7 @@ const $0a581f1dfa083522$export$a96c18473f2af463 = (tenant, selector, validator)=
|
|
|
2624
2629
|
recommendation_id: r_id
|
|
2625
2630
|
}
|
|
2626
2631
|
});
|
|
2627
|
-
}, true))
|
|
2632
|
+
}, true));
|
|
2628
2633
|
};
|
|
2629
2634
|
const $0a581f1dfa083522$export$a4f97b27a0592e6c = (url)=>(url ? new URL(url, window.location.origin) : window.location).pathname.split("/").filter((a)=>a).pop()?.replace(/\.html?$/i, "") || "";
|
|
2630
2635
|
const $0a581f1dfa083522$export$692b606677218a16 = (callback)=>{
|
|
@@ -3086,6 +3091,7 @@ async function $5cbe24d064a033ed$export$a9fc160c5ed83bd7(t, rendering_options) {
|
|
|
3086
3091
|
}
|
|
3087
3092
|
const { template: template , post_processors: post_processors = [] } = rendering_options;
|
|
3088
3093
|
const caught_post_processing_functions = post_processors.map((post_pro)=>(0, $b04e44fad5ea42c7$export$b3bbfd758f11cfa9)(post_pro));
|
|
3094
|
+
let a;
|
|
3089
3095
|
const caught_html2elems = (0, $b04e44fad5ea42c7$export$b3bbfd758f11cfa9)((0, $0bdb8dbcf1bc7f34$export$44951404cb8d0583));
|
|
3090
3096
|
let output_elements;
|
|
3091
3097
|
if (typeof template === "function") {
|
|
@@ -3096,7 +3102,7 @@ async function $5cbe24d064a033ed$export$a9fc160c5ed83bd7(t, rendering_options) {
|
|
|
3096
3102
|
const info = new $5cbe24d064a033ed$export$da854280fb61cd32(t, rendering_options, displays, index, ()=>keep = false, event_listeners);
|
|
3097
3103
|
const template_result = await caught_template(display, info);
|
|
3098
3104
|
if (!keep) throw keep;
|
|
3099
|
-
const elements = typeof template_result == "string" ? caught_html2elems(template_result) : template_result;
|
|
3105
|
+
const elements = (typeof template_result == "string" ? caught_html2elems(template_result) : template_result) || [];
|
|
3100
3106
|
const post_processed_elements = await $5cbe24d064a033ed$export$cf7cbc6b76039101(t, rendering_options, processed_displays, index, caught_post_processing_functions, elements, event_listeners);
|
|
3101
3107
|
return Array.from(post_processed_elements);
|
|
3102
3108
|
}))).filter((p)=>p.status === "fulfilled").map((p)=>p.value).flat();
|
|
@@ -3105,7 +3111,7 @@ async function $5cbe24d064a033ed$export$a9fc160c5ed83bd7(t, rendering_options) {
|
|
|
3105
3111
|
// we don't know how this will be used and want it to be robust
|
|
3106
3112
|
} else output_elements = (await Promise.all(processed_displays.map(async (display, index)=>{
|
|
3107
3113
|
const html = $5cbe24d064a033ed$export$e0009e7da572f99b(template, display);
|
|
3108
|
-
const elements = caught_html2elems(html);
|
|
3114
|
+
const elements = caught_html2elems(html) || [];
|
|
3109
3115
|
const post_processed_elements = await $5cbe24d064a033ed$export$cf7cbc6b76039101(t, rendering_options, processed_displays, index, caught_post_processing_functions, elements);
|
|
3110
3116
|
return Array.from(post_processed_elements);
|
|
3111
3117
|
}))).flat();
|
|
@@ -3149,8 +3155,8 @@ function $5cbe24d064a033ed$export$c42139a43c877ecd(obj) {
|
|
|
3149
3155
|
}
|
|
3150
3156
|
return obj;
|
|
3151
3157
|
}
|
|
3152
|
-
async function $5cbe24d064a033ed$export$cf7cbc6b76039101(t, rendering_options, displays, index, functions,
|
|
3153
|
-
|
|
3158
|
+
async function $5cbe24d064a033ed$export$cf7cbc6b76039101(t, rendering_options, displays, index, functions, elements, event_listeners = []) {
|
|
3159
|
+
let b;
|
|
3154
3160
|
let keep = true;
|
|
3155
3161
|
const info = new $5cbe24d064a033ed$export$da854280fb61cd32(t, rendering_options, displays, index, ()=>keep = false, event_listeners);
|
|
3156
3162
|
for(let i = 0; i < functions.length; i++){
|
|
@@ -3175,7 +3181,7 @@ async function $5cbe24d064a033ed$export$c22e610107c5a15a(t, rendering_options, d
|
|
|
3175
3181
|
for(let j = 0; j < caught_pre_processors.length; j++){
|
|
3176
3182
|
const pre_processor = caught_pre_processors[j];
|
|
3177
3183
|
const result = await pre_processor(display, info_for_pre_pro);
|
|
3178
|
-
if (result) display = result;
|
|
3184
|
+
if (result) display = result; // Don't understand why this cast is needed
|
|
3179
3185
|
if (!keep) break;
|
|
3180
3186
|
}
|
|
3181
3187
|
if (keep) processed_displays.push(display);
|
|
@@ -3184,7 +3190,6 @@ async function $5cbe24d064a033ed$export$c22e610107c5a15a(t, rendering_options, d
|
|
|
3184
3190
|
return processed_displays;
|
|
3185
3191
|
}
|
|
3186
3192
|
class $5cbe24d064a033ed$export$da854280fb61cd32 {
|
|
3187
|
-
// maybe not ideal? idk
|
|
3188
3193
|
constructor(t, rendering_options, displays, index, remove_display, event_listeners){
|
|
3189
3194
|
this.t = t;
|
|
3190
3195
|
this.rendering_options = rendering_options;
|
|
@@ -3984,7 +3989,10 @@ function $b83068cbd26dcc41$export$e4741190ccada479(element, selector) {
|
|
|
3984
3989
|
|
|
3985
3990
|
|
|
3986
3991
|
const $b9b0dba897847b2a$export$eb0b9ed911409b57 = (callback, element)=>((0, $b04e44fad5ea42c7$export$b3bbfd758f11cfa9)(callback)(element), element);
|
|
3987
|
-
|
|
3992
|
+
function $b9b0dba897847b2a$export$f63fcc839cb0f734(event, handler, element) {
|
|
3993
|
+
element.addEventListener(event, (0, $b04e44fad5ea42c7$export$b3bbfd758f11cfa9)(handler));
|
|
3994
|
+
return element;
|
|
3995
|
+
}
|
|
3988
3996
|
const $b9b0dba897847b2a$export$22a65337c1b43b1f = /* @PURE */ (classes)=>classes.filter((c)=>c !== undefined).join(" ");
|
|
3989
3997
|
|
|
3990
3998
|
|
|
@@ -4422,7 +4430,7 @@ class $c33c6faf8acc7442$export$68babfc5be0de5da extends (0, $ef9394fafebd5eab$ex
|
|
|
4422
4430
|
constructor(options, lazyfier_options){
|
|
4423
4431
|
super(options);
|
|
4424
4432
|
const lazy_promise = new Promise((r)=>{
|
|
4425
|
-
(0, $0b48ba2f40ce6067$export$b6ae1bc530f4c149).onexists(this.insert_here, (
|
|
4433
|
+
(0, $0b48ba2f40ce6067$export$b6ae1bc530f4c149).onexists(this.insert_here, ({ element: element , disconnector: disconnector })=>{
|
|
4426
4434
|
const i_o = new IntersectionObserver((0, $b04e44fad5ea42c7$export$b3bbfd758f11cfa9)((records)=>{
|
|
4427
4435
|
for (const record of records)if (record.intersectionRatio > 0) {
|
|
4428
4436
|
r(true);
|
|
@@ -4432,7 +4440,7 @@ class $c33c6faf8acc7442$export$68babfc5be0de5da extends (0, $ef9394fafebd5eab$ex
|
|
|
4432
4440
|
}
|
|
4433
4441
|
}));
|
|
4434
4442
|
i_o.observe(element);
|
|
4435
|
-
})
|
|
4443
|
+
});
|
|
4436
4444
|
});
|
|
4437
4445
|
this.lazyfier = new (0, $b83068cbd26dcc41$export$3be7054c61590ee3)({
|
|
4438
4446
|
container: this.insert_here,
|
|
@@ -4500,7 +4508,7 @@ function $c1503704e45e6a15$export$1bffac19f9f0d6fc(elements, _display, info) {
|
|
|
4500
4508
|
$c1503704e45e6a15$export$3777a14dd8c2363d.add(displays);
|
|
4501
4509
|
const { get_product_id: get_product_id } = info.t;
|
|
4502
4510
|
const { type: type } = rendering_options;
|
|
4503
|
-
(0, $0263af58e2304a2b$export$7babcd5d4056b2ca)(displays, get_product_id, {
|
|
4511
|
+
(0, $0263af58e2304a2b$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 */ , {
|
|
4504
4512
|
list_name: "depict_" + type
|
|
4505
4513
|
});
|
|
4506
4514
|
}
|
|
@@ -5364,7 +5372,9 @@ async function $30e801eaa3dc319e$export$c84671f46d6a1ca({ rows: rows , container
|
|
|
5364
5372
|
for await (const [currently_showing_rows, number_of_els] of (0, $693e2a1517bef984$export$f8913c8a18f7ca21)([
|
|
5365
5373
|
// start for await loop when the container element gets inserted into the DOM
|
|
5366
5374
|
// the loop is broken by an observer.onremoved above calling .exit on the IPNS this depends on
|
|
5375
|
+
// @ts-ignore
|
|
5367
5376
|
ipns,
|
|
5377
|
+
// @ts-ignore too complicated to fix this IMO
|
|
5368
5378
|
el_count_ipns
|
|
5369
5379
|
])){
|
|
5370
5380
|
our_style_el.innerText = col_styling + cols_at_size.map((options)=>{
|
|
@@ -6306,7 +6316,7 @@ function $556d9c321900f1d4$var$scroll_idle(slider, chunk_size, clones_per_side)
|
|
|
6306
6316
|
];
|
|
6307
6317
|
const { intersecting_items_object: intersecting_items_object } = slider;
|
|
6308
6318
|
const index_of_first_intersecting = slider.first_intersecting_index();
|
|
6309
|
-
const index_of_last_intersecting = Math.max(...Object.keys(
|
|
6319
|
+
const index_of_last_intersecting = Math.max(...Object.keys(intersecting_items_object).map((v)=>+v));
|
|
6310
6320
|
const post_move = (direction)=>{
|
|
6311
6321
|
// slider.invalidate_cache();
|
|
6312
6322
|
// for (const key in intersecting_items_object) {
|
|
@@ -6535,12 +6545,12 @@ function $159237486410355f$export$be95cb0e8cfd099e() {
|
|
|
6535
6545
|
|
|
6536
6546
|
|
|
6537
6547
|
function $847e4a06ea6767c0$export$3ebd86018b39d9d2(t, selector, filter) {
|
|
6538
|
-
(0, $0b48ba2f40ce6067$export$b6ae1bc530f4c149).onexists(selector, (
|
|
6548
|
+
(0, $0b48ba2f40ce6067$export$b6ae1bc530f4c149).onexists(selector, (eoe)=>{
|
|
6539
6549
|
(0, $649f456f663da9fc$export$de56f1198d121036)("Order confirmation element showed up!", eoe);
|
|
6540
6550
|
const { element: element } = eoe;
|
|
6541
6551
|
const the_id = element.innerText;
|
|
6542
6552
|
$847e4a06ea6767c0$export$1ac466d53a6636ac(t, the_id, (0, $43683b1103edab15$export$6399bdb2291895e0)(), filter);
|
|
6543
|
-
})
|
|
6553
|
+
});
|
|
6544
6554
|
}
|
|
6545
6555
|
function $847e4a06ea6767c0$export$b11248fa13a8a86c(tenant, id_extractor) {
|
|
6546
6556
|
// Use the given extractor to find a transaction ID from each entry pushed to dataLayer.
|
|
@@ -6548,7 +6558,7 @@ function $847e4a06ea6767c0$export$b11248fa13a8a86c(tenant, id_extractor) {
|
|
|
6548
6558
|
const maybe_send_entries = (entries)=>entries.map(id_extractor).filter((id)=>id && typeof id === "string").forEach((id)=>{
|
|
6549
6559
|
$847e4a06ea6767c0$export$1ac466d53a6636ac(tenant, id);
|
|
6550
6560
|
});
|
|
6551
|
-
const dataLayer =
|
|
6561
|
+
const dataLayer = globalThis.dataLayer ||= [];
|
|
6552
6562
|
// Process entries that are already queued at this point
|
|
6553
6563
|
maybe_send_entries(dataLayer);
|
|
6554
6564
|
// And then process any future entries, making sure to pass them on to other potential proxies to the push function
|
|
@@ -6823,7 +6833,7 @@ function $802201ed0a316c43$export$ab0f802c05dd969b(on_request) {
|
|
|
6823
6833
|
const response_promise = target.apply(this_arg, argument_list);
|
|
6824
6834
|
try {
|
|
6825
6835
|
const input = argument_list[0];
|
|
6826
|
-
const url = input instanceof Request ? input.url : input;
|
|
6836
|
+
const url = input instanceof Request ? input.url : input instanceof URL ? input.href : input;
|
|
6827
6837
|
// TODO, doing it like this doesn't feel very robust.
|
|
6828
6838
|
// And what if the developer wants to override which url's corespond to which events?
|
|
6829
6839
|
const url_segement_to_type = [
|
|
@@ -7060,7 +7070,7 @@ const $8bed543774ca0dd4$export$e3f70ef7e3d00501 = /*@__PURE__*/ (0, /*@__PURE__*
|
|
|
7060
7070
|
});
|
|
7061
7071
|
};
|
|
7062
7072
|
if (typeof target == "string") {
|
|
7063
|
-
const disconnect_observer = (0, $0b48ba2f40ce6067$export$b6ae1bc530f4c149).onexists(target, (
|
|
7073
|
+
const disconnect_observer = (0, $0b48ba2f40ce6067$export$b6ae1bc530f4c149).onexists(target, ({ element: element , disconnector: disconnector })=>per_el_fn(element, disconnector));
|
|
7064
7074
|
(0, $0d2acf276472ebf7$export$1cd22bab0d2c3b0b)(disconnect_observer);
|
|
7065
7075
|
} else {
|
|
7066
7076
|
let did_already_fail = false;
|
|
@@ -7230,6 +7240,7 @@ const $78270f2ea7ca229f$export$a4eccf92efefa04d = (image_width, image_height, co
|
|
|
7230
7240
|
async function $78270f2ea7ca229f$export$2dd69958012e3e49({ override_rec_renderer: override_rec_renderer = (0, $6be99244fa573db5$export$50ce83ace0cdd87e) , image_width: image_width = 2000 , image_height: image_height = 2000 , num_items: num_items = 10 , color: color = "#d9d9d9" , on_no_rendering_result: on_no_rendering_result , post_rendering: post_rendering } = {}) {
|
|
7231
7241
|
const image_url = $78270f2ea7ca229f$export$a4eccf92efefa04d(image_width, image_height, color);
|
|
7232
7242
|
return async (t, rendering_options)=>{
|
|
7243
|
+
// @ts-ignore FIXME: this is a hack to make the type checker happy
|
|
7233
7244
|
const actual_rendering = override_rec_renderer(t, rendering_options).catch((0, $7547e32486a3abc0$export$8048b892d651b310)); // start rendering first
|
|
7234
7245
|
const placeholder_opts = {
|
|
7235
7246
|
...rendering_options,
|
|
@@ -7265,6 +7276,7 @@ async function $78270f2ea7ca229f$export$2dd69958012e3e49({ override_rec_renderer
|
|
|
7265
7276
|
}
|
|
7266
7277
|
]
|
|
7267
7278
|
};
|
|
7279
|
+
// @ts-ignore FIXME: this is a hack to make the type checker happy
|
|
7268
7280
|
const placeholder_rendering = await override_rec_renderer(t, placeholder_opts).catch((0, $7547e32486a3abc0$export$8048b892d651b310));
|
|
7269
7281
|
let set_should_stay_inserted;
|
|
7270
7282
|
const should_stay_inserted = new Promise((r)=>set_should_stay_inserted = r);
|
|
@@ -7682,9 +7694,9 @@ const $690d8897acf7a743$var$get_voyado_id = ()=>{
|
|
|
7682
7694
|
const va = /\b_vaI=([^;]+)/.exec(document.cookie)?.[1];
|
|
7683
7695
|
return va || $690d8897acf7a743$var$default_id;
|
|
7684
7696
|
};
|
|
7685
|
-
const $690d8897acf7a743$export$a739d9a07da7f9ce = ()=>{
|
|
7686
|
-
|
|
7687
|
-
};
|
|
7697
|
+
const $690d8897acf7a743$export$a739d9a07da7f9ce = (0, $b04e44fad5ea42c7$export$b3bbfd758f11cfa9)(()=>{
|
|
7698
|
+
(0, $43683b1103edab15$export$336e7ad40bae0652)($690d8897acf7a743$var$get_voyado_id);
|
|
7699
|
+
});
|
|
7688
7700
|
|
|
7689
7701
|
|
|
7690
7702
|
|
|
@@ -8668,9 +8680,6 @@ function $f5ca01afd4680bdd$export$f2ca6fc699ca1fb4(props = {}) {
|
|
|
8668
8680
|
|
|
8669
8681
|
|
|
8670
8682
|
|
|
8671
|
-
const $0766c85d387a9765$export$83d89fbfd8236492 = "0.0.40";
|
|
8672
|
-
|
|
8673
|
-
|
|
8674
8683
|
|
|
8675
8684
|
/**
|
|
8676
8685
|
* Shallowly converts all keys in an object from snake_case to camelCase.
|