@depict-ai/dpc 2.6.2 → 2.6.4
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 +9 -7
- package/ES10/index.d.ts +1 -1
- package/ES10/index.js +9 -7
- package/dist/index.cjs +9 -7
- package/dist/index.d.ts +1 -1
- package/dist/index.js +9 -7
- package/latest/index.cjs +5 -7
- package/latest/index.d.ts +1 -1
- package/latest/index.js +5 -7
- package/package.json +1 -1
package/ES10/index.cjs
CHANGED
|
@@ -17,7 +17,7 @@ function $parcel$interopDefault(a) {
|
|
|
17
17
|
$parcel$export(module.exports, "DPC", () => $89ae37e3a26189b4$export$820526014323765f);
|
|
18
18
|
$parcel$export(module.exports, "version", () => $fcc8287091fb489d$export$83d89fbfd8236492);
|
|
19
19
|
/*! Depict PerformanceClient */
|
|
20
|
-
const $fcc8287091fb489d$export$83d89fbfd8236492 = "2.6.
|
|
20
|
+
const $fcc8287091fb489d$export$83d89fbfd8236492 = "2.6.4";
|
|
21
21
|
let $405164bc961cc106$export$8ae64f3d447c14f7;
|
|
22
22
|
(function (ProductCardType) {
|
|
23
23
|
ProductCardType[ProductCardType["Recommendation"] = 0] = "Recommendation";
|
|
@@ -345,9 +345,10 @@ class $89ae37e3a26189b4$export$820526014323765f {
|
|
|
345
345
|
* Update the product_id used for add-to-cart and pageview events on PDPs.
|
|
346
346
|
*/
|
|
347
347
|
setProductId(product_id) {
|
|
348
|
+
var _globalThis$location;
|
|
348
349
|
$9AWcE$depictaiutilishared.dlog("Setting product id", product_id);
|
|
349
350
|
this.latest_product_id = product_id;
|
|
350
|
-
this.latest_product_id_path = location.pathname;
|
|
351
|
+
this.latest_product_id_path = globalThis === null || globalThis === void 0 ? void 0 : (_globalThis$location = globalThis.location) === null || _globalThis$location === void 0 ? void 0 : _globalThis$location.pathname;
|
|
351
352
|
if (!$parcel$interopDefault($9AWcE$babelruntimehelpersclassPrivateFieldGet)(this, $89ae37e3a26189b4$var$_has_sent_pageview_for_current_href)) {
|
|
352
353
|
$89ae37e3a26189b4$var$_classPrivateMethodGet(this, $89ae37e3a26189b4$var$_sendTrackingEvent, $89ae37e3a26189b4$var$_sendTrackingEvent2).call(this, {
|
|
353
354
|
type: "page_view",
|
|
@@ -403,11 +404,11 @@ class $89ae37e3a26189b4$export$820526014323765f {
|
|
|
403
404
|
}
|
|
404
405
|
}
|
|
405
406
|
function $89ae37e3a26189b4$var$_resetSentPageViewForCurrentHref2() {
|
|
406
|
-
|
|
407
|
+
var _globalThis$location2;
|
|
408
|
+
let url = globalThis === null || globalThis === void 0 ? void 0 : (_globalThis$location2 = globalThis.location) === null || _globalThis$location2 === void 0 ? void 0 : _globalThis$location2.href;
|
|
407
409
|
(0, $9AWcE$depictaiutilishared.instant_exec_on_suspect_history_change).add($9AWcE$depictaiutilishared.catchify(() => {
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
} = location;
|
|
410
|
+
var _globalThis$location3;
|
|
411
|
+
const new_href = globalThis === null || globalThis === void 0 ? void 0 : (_globalThis$location3 = globalThis.location) === null || _globalThis$location3 === void 0 ? void 0 : _globalThis$location3.href;
|
|
411
412
|
if (url !== new_href) {
|
|
412
413
|
$parcel$interopDefault($9AWcE$babelruntimehelpersclassPrivateFieldSet)(this, $89ae37e3a26189b4$var$_has_sent_pageview_for_current_href, false);
|
|
413
414
|
url = new_href;
|
|
@@ -441,7 +442,8 @@ function $89ae37e3a26189b4$var$_sendTrackingEvent2(payload) {
|
|
|
441
442
|
}], true);
|
|
442
443
|
}
|
|
443
444
|
function $89ae37e3a26189b4$var$_getProductId2() {
|
|
444
|
-
|
|
445
|
+
var _globalThis$location4;
|
|
446
|
+
if (this.latest_product_id_path !== (globalThis === null || globalThis === void 0 ? void 0 : (_globalThis$location4 = globalThis.location) === null || _globalThis$location4 === void 0 ? void 0 : _globalThis$location4.pathname)) return undefined;
|
|
445
447
|
return this.latest_product_id;
|
|
446
448
|
}
|
|
447
449
|
$9AWcE$depictaiutilishared.add_to_version_info("dpc", (0, $fcc8287091fb489d$export$83d89fbfd8236492));
|
package/ES10/index.d.ts
CHANGED
package/ES10/index.js
CHANGED
|
@@ -6,7 +6,7 @@ import $4uUHR$babelruntimehelpersclassPrivateFieldSet from "@babel/runtime/helpe
|
|
|
6
6
|
/*! Depict PerformanceClient */
|
|
7
7
|
import { register_es_version } from "../multi_import_deduplicator.mjs";
|
|
8
8
|
register_es_version("performance-client", "ES10");
|
|
9
|
-
const $3242b911de3d57ad$export$83d89fbfd8236492 = "2.6.
|
|
9
|
+
const $3242b911de3d57ad$export$83d89fbfd8236492 = "2.6.4";
|
|
10
10
|
let $983195e3c4979825$export$8ae64f3d447c14f7;
|
|
11
11
|
(function (ProductCardType) {
|
|
12
12
|
ProductCardType[ProductCardType["Recommendation"] = 0] = "Recommendation";
|
|
@@ -334,9 +334,10 @@ class $53af71a3700e1e90$export$820526014323765f {
|
|
|
334
334
|
* Update the product_id used for add-to-cart and pageview events on PDPs.
|
|
335
335
|
*/
|
|
336
336
|
setProductId(product_id) {
|
|
337
|
+
var _globalThis$location;
|
|
337
338
|
$4uUHR$dlog("Setting product id", product_id);
|
|
338
339
|
this.latest_product_id = product_id;
|
|
339
|
-
this.latest_product_id_path = location.pathname;
|
|
340
|
+
this.latest_product_id_path = globalThis === null || globalThis === void 0 ? void 0 : (_globalThis$location = globalThis.location) === null || _globalThis$location === void 0 ? void 0 : _globalThis$location.pathname;
|
|
340
341
|
if (!$4uUHR$babelruntimehelpersclassPrivateFieldGet(this, $53af71a3700e1e90$var$_has_sent_pageview_for_current_href)) {
|
|
341
342
|
$53af71a3700e1e90$var$_classPrivateMethodGet(this, $53af71a3700e1e90$var$_sendTrackingEvent, $53af71a3700e1e90$var$_sendTrackingEvent2).call(this, {
|
|
342
343
|
type: "page_view",
|
|
@@ -392,11 +393,11 @@ class $53af71a3700e1e90$export$820526014323765f {
|
|
|
392
393
|
}
|
|
393
394
|
}
|
|
394
395
|
function $53af71a3700e1e90$var$_resetSentPageViewForCurrentHref2() {
|
|
395
|
-
|
|
396
|
+
var _globalThis$location2;
|
|
397
|
+
let url = globalThis === null || globalThis === void 0 ? void 0 : (_globalThis$location2 = globalThis.location) === null || _globalThis$location2 === void 0 ? void 0 : _globalThis$location2.href;
|
|
396
398
|
(0, $4uUHR$instant_exec_on_suspect_history_change).add($4uUHR$catchify(() => {
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
} = location;
|
|
399
|
+
var _globalThis$location3;
|
|
400
|
+
const new_href = globalThis === null || globalThis === void 0 ? void 0 : (_globalThis$location3 = globalThis.location) === null || _globalThis$location3 === void 0 ? void 0 : _globalThis$location3.href;
|
|
400
401
|
if (url !== new_href) {
|
|
401
402
|
$4uUHR$babelruntimehelpersclassPrivateFieldSet(this, $53af71a3700e1e90$var$_has_sent_pageview_for_current_href, false);
|
|
402
403
|
url = new_href;
|
|
@@ -430,7 +431,8 @@ function $53af71a3700e1e90$var$_sendTrackingEvent2(payload) {
|
|
|
430
431
|
}], true);
|
|
431
432
|
}
|
|
432
433
|
function $53af71a3700e1e90$var$_getProductId2() {
|
|
433
|
-
|
|
434
|
+
var _globalThis$location4;
|
|
435
|
+
if (this.latest_product_id_path !== (globalThis === null || globalThis === void 0 ? void 0 : (_globalThis$location4 = globalThis.location) === null || _globalThis$location4 === void 0 ? void 0 : _globalThis$location4.pathname)) return undefined;
|
|
434
436
|
return this.latest_product_id;
|
|
435
437
|
}
|
|
436
438
|
$4uUHR$add_to_version_info("dpc", (0, $3242b911de3d57ad$export$83d89fbfd8236492));
|
package/dist/index.cjs
CHANGED
|
@@ -17,7 +17,7 @@ function $parcel$interopDefault(a) {
|
|
|
17
17
|
$parcel$export(module.exports, "DPC", () => $89ae37e3a26189b4$export$820526014323765f);
|
|
18
18
|
$parcel$export(module.exports, "version", () => $fcc8287091fb489d$export$83d89fbfd8236492);
|
|
19
19
|
/*! Depict PerformanceClient */
|
|
20
|
-
const $fcc8287091fb489d$export$83d89fbfd8236492 = "2.6.
|
|
20
|
+
const $fcc8287091fb489d$export$83d89fbfd8236492 = "2.6.4";
|
|
21
21
|
let $405164bc961cc106$export$8ae64f3d447c14f7;
|
|
22
22
|
(function (ProductCardType) {
|
|
23
23
|
ProductCardType[ProductCardType["Recommendation"] = 0] = "Recommendation";
|
|
@@ -345,9 +345,10 @@ class $89ae37e3a26189b4$export$820526014323765f {
|
|
|
345
345
|
* Update the product_id used for add-to-cart and pageview events on PDPs.
|
|
346
346
|
*/
|
|
347
347
|
setProductId(product_id) {
|
|
348
|
+
var _globalThis$location;
|
|
348
349
|
$9AWcE$depictaiutilishared.dlog("Setting product id", product_id);
|
|
349
350
|
this.latest_product_id = product_id;
|
|
350
|
-
this.latest_product_id_path = location.pathname;
|
|
351
|
+
this.latest_product_id_path = globalThis === null || globalThis === void 0 ? void 0 : (_globalThis$location = globalThis.location) === null || _globalThis$location === void 0 ? void 0 : _globalThis$location.pathname;
|
|
351
352
|
if (!$parcel$interopDefault($9AWcE$babelruntimehelpersclassPrivateFieldGet)(this, $89ae37e3a26189b4$var$_has_sent_pageview_for_current_href)) {
|
|
352
353
|
$89ae37e3a26189b4$var$_classPrivateMethodGet(this, $89ae37e3a26189b4$var$_sendTrackingEvent, $89ae37e3a26189b4$var$_sendTrackingEvent2).call(this, {
|
|
353
354
|
type: "page_view",
|
|
@@ -403,11 +404,11 @@ class $89ae37e3a26189b4$export$820526014323765f {
|
|
|
403
404
|
}
|
|
404
405
|
}
|
|
405
406
|
function $89ae37e3a26189b4$var$_resetSentPageViewForCurrentHref2() {
|
|
406
|
-
|
|
407
|
+
var _globalThis$location2;
|
|
408
|
+
let url = globalThis === null || globalThis === void 0 ? void 0 : (_globalThis$location2 = globalThis.location) === null || _globalThis$location2 === void 0 ? void 0 : _globalThis$location2.href;
|
|
407
409
|
(0, $9AWcE$depictaiutilishared.instant_exec_on_suspect_history_change).add($9AWcE$depictaiutilishared.catchify(() => {
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
} = location;
|
|
410
|
+
var _globalThis$location3;
|
|
411
|
+
const new_href = globalThis === null || globalThis === void 0 ? void 0 : (_globalThis$location3 = globalThis.location) === null || _globalThis$location3 === void 0 ? void 0 : _globalThis$location3.href;
|
|
411
412
|
if (url !== new_href) {
|
|
412
413
|
$parcel$interopDefault($9AWcE$babelruntimehelpersclassPrivateFieldSet)(this, $89ae37e3a26189b4$var$_has_sent_pageview_for_current_href, false);
|
|
413
414
|
url = new_href;
|
|
@@ -441,7 +442,8 @@ function $89ae37e3a26189b4$var$_sendTrackingEvent2(payload) {
|
|
|
441
442
|
}], true);
|
|
442
443
|
}
|
|
443
444
|
function $89ae37e3a26189b4$var$_getProductId2() {
|
|
444
|
-
|
|
445
|
+
var _globalThis$location4;
|
|
446
|
+
if (this.latest_product_id_path !== (globalThis === null || globalThis === void 0 ? void 0 : (_globalThis$location4 = globalThis.location) === null || _globalThis$location4 === void 0 ? void 0 : _globalThis$location4.pathname)) return undefined;
|
|
445
447
|
return this.latest_product_id;
|
|
446
448
|
}
|
|
447
449
|
$9AWcE$depictaiutilishared.add_to_version_info("dpc", (0, $fcc8287091fb489d$export$83d89fbfd8236492));
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -6,7 +6,7 @@ import $4uUHR$babelruntimehelpersclassPrivateFieldSet from "@babel/runtime/helpe
|
|
|
6
6
|
/*! Depict PerformanceClient */
|
|
7
7
|
import { register_es_version } from "../multi_import_deduplicator.mjs";
|
|
8
8
|
register_es_version("performance-client", "ES10");
|
|
9
|
-
const $3242b911de3d57ad$export$83d89fbfd8236492 = "2.6.
|
|
9
|
+
const $3242b911de3d57ad$export$83d89fbfd8236492 = "2.6.4";
|
|
10
10
|
let $983195e3c4979825$export$8ae64f3d447c14f7;
|
|
11
11
|
(function (ProductCardType) {
|
|
12
12
|
ProductCardType[ProductCardType["Recommendation"] = 0] = "Recommendation";
|
|
@@ -334,9 +334,10 @@ class $53af71a3700e1e90$export$820526014323765f {
|
|
|
334
334
|
* Update the product_id used for add-to-cart and pageview events on PDPs.
|
|
335
335
|
*/
|
|
336
336
|
setProductId(product_id) {
|
|
337
|
+
var _globalThis$location;
|
|
337
338
|
$4uUHR$dlog("Setting product id", product_id);
|
|
338
339
|
this.latest_product_id = product_id;
|
|
339
|
-
this.latest_product_id_path = location.pathname;
|
|
340
|
+
this.latest_product_id_path = globalThis === null || globalThis === void 0 ? void 0 : (_globalThis$location = globalThis.location) === null || _globalThis$location === void 0 ? void 0 : _globalThis$location.pathname;
|
|
340
341
|
if (!$4uUHR$babelruntimehelpersclassPrivateFieldGet(this, $53af71a3700e1e90$var$_has_sent_pageview_for_current_href)) {
|
|
341
342
|
$53af71a3700e1e90$var$_classPrivateMethodGet(this, $53af71a3700e1e90$var$_sendTrackingEvent, $53af71a3700e1e90$var$_sendTrackingEvent2).call(this, {
|
|
342
343
|
type: "page_view",
|
|
@@ -392,11 +393,11 @@ class $53af71a3700e1e90$export$820526014323765f {
|
|
|
392
393
|
}
|
|
393
394
|
}
|
|
394
395
|
function $53af71a3700e1e90$var$_resetSentPageViewForCurrentHref2() {
|
|
395
|
-
|
|
396
|
+
var _globalThis$location2;
|
|
397
|
+
let url = globalThis === null || globalThis === void 0 ? void 0 : (_globalThis$location2 = globalThis.location) === null || _globalThis$location2 === void 0 ? void 0 : _globalThis$location2.href;
|
|
396
398
|
(0, $4uUHR$instant_exec_on_suspect_history_change).add($4uUHR$catchify(() => {
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
} = location;
|
|
399
|
+
var _globalThis$location3;
|
|
400
|
+
const new_href = globalThis === null || globalThis === void 0 ? void 0 : (_globalThis$location3 = globalThis.location) === null || _globalThis$location3 === void 0 ? void 0 : _globalThis$location3.href;
|
|
400
401
|
if (url !== new_href) {
|
|
401
402
|
$4uUHR$babelruntimehelpersclassPrivateFieldSet(this, $53af71a3700e1e90$var$_has_sent_pageview_for_current_href, false);
|
|
402
403
|
url = new_href;
|
|
@@ -430,7 +431,8 @@ function $53af71a3700e1e90$var$_sendTrackingEvent2(payload) {
|
|
|
430
431
|
}], true);
|
|
431
432
|
}
|
|
432
433
|
function $53af71a3700e1e90$var$_getProductId2() {
|
|
433
|
-
|
|
434
|
+
var _globalThis$location4;
|
|
435
|
+
if (this.latest_product_id_path !== (globalThis === null || globalThis === void 0 ? void 0 : (_globalThis$location4 = globalThis.location) === null || _globalThis$location4 === void 0 ? void 0 : _globalThis$location4.pathname)) return undefined;
|
|
434
436
|
return this.latest_product_id;
|
|
435
437
|
}
|
|
436
438
|
$4uUHR$add_to_version_info("dpc", (0, $3242b911de3d57ad$export$83d89fbfd8236492));
|
package/latest/index.cjs
CHANGED
|
@@ -11,7 +11,7 @@ function $parcel$export(e, n, v, s) {
|
|
|
11
11
|
$parcel$export(module.exports, "DPC", () => $15e3eebad2263636$export$820526014323765f);
|
|
12
12
|
$parcel$export(module.exports, "version", () => $9c6b4a5c4c4f318d$export$83d89fbfd8236492);
|
|
13
13
|
/*! Depict PerformanceClient */
|
|
14
|
-
const $9c6b4a5c4c4f318d$export$83d89fbfd8236492 = "2.6.
|
|
14
|
+
const $9c6b4a5c4c4f318d$export$83d89fbfd8236492 = "2.6.4";
|
|
15
15
|
let $02e69dba644a2ef8$export$8ae64f3d447c14f7;
|
|
16
16
|
(function (ProductCardType) {
|
|
17
17
|
ProductCardType[ProductCardType["Recommendation"] = 0] = "Recommendation";
|
|
@@ -138,11 +138,9 @@ class $15e3eebad2263636$export$820526014323765f {
|
|
|
138
138
|
}
|
|
139
139
|
}
|
|
140
140
|
#resetSentPageViewForCurrentHref() {
|
|
141
|
-
let url = location
|
|
141
|
+
let url = globalThis?.location?.href;
|
|
142
142
|
(0, $dwOGf$depictaiutilishared.instant_exec_on_suspect_history_change).add($dwOGf$depictaiutilishared.catchify(() => {
|
|
143
|
-
const
|
|
144
|
-
href: new_href
|
|
145
|
-
} = location;
|
|
143
|
+
const new_href = globalThis?.location?.href;
|
|
146
144
|
if (url !== new_href) {
|
|
147
145
|
this.#has_sent_pageview_for_current_href = false;
|
|
148
146
|
url = new_href;
|
|
@@ -345,7 +343,7 @@ class $15e3eebad2263636$export$820526014323765f {
|
|
|
345
343
|
setProductId(product_id) {
|
|
346
344
|
$dwOGf$depictaiutilishared.dlog("Setting product id", product_id);
|
|
347
345
|
this.latest_product_id = product_id;
|
|
348
|
-
this.latest_product_id_path = location
|
|
346
|
+
this.latest_product_id_path = globalThis?.location?.pathname;
|
|
349
347
|
if (!this.#has_sent_pageview_for_current_href) {
|
|
350
348
|
this.#sendTrackingEvent({
|
|
351
349
|
type: "page_view",
|
|
@@ -355,7 +353,7 @@ class $15e3eebad2263636$export$820526014323765f {
|
|
|
355
353
|
}
|
|
356
354
|
}
|
|
357
355
|
#getProductId() {
|
|
358
|
-
if (this.latest_product_id_path !== location
|
|
356
|
+
if (this.latest_product_id_path !== globalThis?.location?.pathname) return undefined;
|
|
359
357
|
return this.latest_product_id;
|
|
360
358
|
}
|
|
361
359
|
/**
|
package/latest/index.d.ts
CHANGED
package/latest/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import { add_to_version_info as $lbGMC$add_to_version_info, dlog as $lbGMC$dlog,
|
|
|
3
3
|
/*! Depict PerformanceClient */
|
|
4
4
|
import { register_es_version } from "../multi_import_deduplicator.mjs";
|
|
5
5
|
register_es_version("performance-client", "latest");
|
|
6
|
-
const $3b068891cefe570d$export$83d89fbfd8236492 = "2.6.
|
|
6
|
+
const $3b068891cefe570d$export$83d89fbfd8236492 = "2.6.4";
|
|
7
7
|
let $ba8dc1a552d27224$export$8ae64f3d447c14f7;
|
|
8
8
|
(function (ProductCardType) {
|
|
9
9
|
ProductCardType[ProductCardType["Recommendation"] = 0] = "Recommendation";
|
|
@@ -130,11 +130,9 @@ class $fe563348936ab010$export$820526014323765f {
|
|
|
130
130
|
}
|
|
131
131
|
}
|
|
132
132
|
#resetSentPageViewForCurrentHref() {
|
|
133
|
-
let url = location
|
|
133
|
+
let url = globalThis?.location?.href;
|
|
134
134
|
(0, $lbGMC$instant_exec_on_suspect_history_change).add($lbGMC$catchify(() => {
|
|
135
|
-
const
|
|
136
|
-
href: new_href
|
|
137
|
-
} = location;
|
|
135
|
+
const new_href = globalThis?.location?.href;
|
|
138
136
|
if (url !== new_href) {
|
|
139
137
|
this.#has_sent_pageview_for_current_href = false;
|
|
140
138
|
url = new_href;
|
|
@@ -337,7 +335,7 @@ class $fe563348936ab010$export$820526014323765f {
|
|
|
337
335
|
setProductId(product_id) {
|
|
338
336
|
$lbGMC$dlog("Setting product id", product_id);
|
|
339
337
|
this.latest_product_id = product_id;
|
|
340
|
-
this.latest_product_id_path = location
|
|
338
|
+
this.latest_product_id_path = globalThis?.location?.pathname;
|
|
341
339
|
if (!this.#has_sent_pageview_for_current_href) {
|
|
342
340
|
this.#sendTrackingEvent({
|
|
343
341
|
type: "page_view",
|
|
@@ -347,7 +345,7 @@ class $fe563348936ab010$export$820526014323765f {
|
|
|
347
345
|
}
|
|
348
346
|
}
|
|
349
347
|
#getProductId() {
|
|
350
|
-
if (this.latest_product_id_path !== location
|
|
348
|
+
if (this.latest_product_id_path !== globalThis?.location?.pathname) return undefined;
|
|
351
349
|
return this.latest_product_id;
|
|
352
350
|
}
|
|
353
351
|
/**
|