autotel-subscribers 13.0.0 → 14.1.0
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/amplitude.cjs +76 -74
- package/dist/amplitude.cjs.map +1 -1
- package/dist/amplitude.d.cts +1 -1
- package/dist/amplitude.d.ts +1 -1
- package/dist/amplitude.js +76 -74
- package/dist/amplitude.js.map +1 -1
- package/dist/factories.cjs +390 -266
- package/dist/factories.cjs.map +1 -1
- package/dist/factories.js +390 -266
- package/dist/factories.js.map +1 -1
- package/dist/index.cjs +390 -266
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +390 -266
- package/dist/index.js.map +1 -1
- package/dist/posthog.cjs +304 -182
- package/dist/posthog.cjs.map +1 -1
- package/dist/posthog.js +304 -182
- package/dist/posthog.js.map +1 -1
- package/package.json +15 -15
- package/src/amplitude.test.ts +8 -12
- package/src/amplitude.ts +14 -11
package/dist/index.cjs
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
var path = require('path');
|
|
4
4
|
var fs = require('fs');
|
|
5
5
|
var readline = require('readline');
|
|
6
|
+
var async_hooks = require('async_hooks');
|
|
6
7
|
var process2 = require('process');
|
|
7
8
|
var os = require('os');
|
|
8
9
|
var tty = require('tty');
|
|
@@ -114,11 +115,11 @@ function normalizeWindowsPath(path) {
|
|
|
114
115
|
return path.replace(/^[A-Z]:/, "").replace(/\\/g, "/");
|
|
115
116
|
}
|
|
116
117
|
var init_module_node = __esm({
|
|
117
|
-
"../../node_modules/.pnpm/posthog-node@5.
|
|
118
|
+
"../../node_modules/.pnpm/posthog-node@5.18.1/node_modules/posthog-node/dist/extensions/error-tracking/modifiers/module.node.mjs"() {
|
|
118
119
|
}
|
|
119
120
|
});
|
|
120
121
|
|
|
121
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
122
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.0/node_modules/@posthog/core/dist/featureFlagUtils.mjs
|
|
122
123
|
function getFlagDetailFromFlagAndPayload(key, value, payload) {
|
|
123
124
|
return {
|
|
124
125
|
key,
|
|
@@ -135,7 +136,7 @@ function getFlagDetailFromFlagAndPayload(key, value, payload) {
|
|
|
135
136
|
}
|
|
136
137
|
var normalizeFlagsResponse, getFlagValuesFromFlags, getPayloadsFromFlags, getFeatureFlagValue, parsePayload;
|
|
137
138
|
var init_featureFlagUtils = __esm({
|
|
138
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
139
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.0/node_modules/@posthog/core/dist/featureFlagUtils.mjs"() {
|
|
139
140
|
normalizeFlagsResponse = (flagsResponse) => {
|
|
140
141
|
if ("flags" in flagsResponse) {
|
|
141
142
|
const featureFlags = getFlagValuesFromFlags(flagsResponse.flags);
|
|
@@ -193,10 +194,10 @@ var init_featureFlagUtils = __esm({
|
|
|
193
194
|
}
|
|
194
195
|
});
|
|
195
196
|
|
|
196
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
197
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.0/node_modules/@posthog/core/dist/vendor/uuidv7.mjs
|
|
197
198
|
var DIGITS, UUID, V7Generator, getDefaultRandom, defaultGenerator, uuidv7, uuidv7obj;
|
|
198
199
|
var init_uuidv7 = __esm({
|
|
199
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
200
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.0/node_modules/@posthog/core/dist/vendor/uuidv7.mjs"() {
|
|
200
201
|
DIGITS = "0123456789abcdef";
|
|
201
202
|
UUID = class _UUID {
|
|
202
203
|
constructor(bytes) {
|
|
@@ -357,10 +358,10 @@ var init_uuidv7 = __esm({
|
|
|
357
358
|
}
|
|
358
359
|
});
|
|
359
360
|
|
|
360
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
361
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.0/node_modules/@posthog/core/dist/utils/bot-detection.mjs
|
|
361
362
|
var DEFAULT_BLOCKED_UA_STRS, isBlockedUA;
|
|
362
363
|
var init_bot_detection = __esm({
|
|
363
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
364
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.0/node_modules/@posthog/core/dist/utils/bot-detection.mjs"() {
|
|
364
365
|
DEFAULT_BLOCKED_UA_STRS = [
|
|
365
366
|
"amazonbot",
|
|
366
367
|
"amazonproductbot",
|
|
@@ -451,10 +452,10 @@ var init_bot_detection = __esm({
|
|
|
451
452
|
}
|
|
452
453
|
});
|
|
453
454
|
|
|
454
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
455
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.0/node_modules/@posthog/core/dist/types.mjs
|
|
455
456
|
var types_PostHogPersistedProperty;
|
|
456
457
|
var init_types = __esm({
|
|
457
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
458
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.0/node_modules/@posthog/core/dist/types.mjs"() {
|
|
458
459
|
types_PostHogPersistedProperty = /* @__PURE__ */ (function(PostHogPersistedProperty) {
|
|
459
460
|
PostHogPersistedProperty["AnonymousId"] = "anonymous_id";
|
|
460
461
|
PostHogPersistedProperty["DistinctId"] = "distinct_id";
|
|
@@ -486,13 +487,13 @@ var init_types = __esm({
|
|
|
486
487
|
}
|
|
487
488
|
});
|
|
488
489
|
|
|
489
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
490
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.0/node_modules/@posthog/core/dist/utils/string-utils.mjs
|
|
490
491
|
var init_string_utils = __esm({
|
|
491
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
492
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.0/node_modules/@posthog/core/dist/utils/string-utils.mjs"() {
|
|
492
493
|
}
|
|
493
494
|
});
|
|
494
495
|
|
|
495
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
496
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.0/node_modules/@posthog/core/dist/utils/type-utils.mjs
|
|
496
497
|
function isInstanceOf(candidate, base) {
|
|
497
498
|
try {
|
|
498
499
|
return candidate instanceof base;
|
|
@@ -517,7 +518,7 @@ function isPlainObject(candidate) {
|
|
|
517
518
|
}
|
|
518
519
|
var nativeIsArray, ObjProto, type_utils_toString, isArray, isUndefined, isString, isEmptyString, isNumber, isPlainError;
|
|
519
520
|
var init_type_utils = __esm({
|
|
520
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
521
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.0/node_modules/@posthog/core/dist/utils/type-utils.mjs"() {
|
|
521
522
|
init_types();
|
|
522
523
|
init_string_utils();
|
|
523
524
|
nativeIsArray = Array.isArray;
|
|
@@ -535,7 +536,7 @@ var init_type_utils = __esm({
|
|
|
535
536
|
}
|
|
536
537
|
});
|
|
537
538
|
|
|
538
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
539
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.0/node_modules/@posthog/core/dist/utils/number-utils.mjs
|
|
539
540
|
function clampToRange(value, min, max, logger, fallbackValue) {
|
|
540
541
|
if (min > max) {
|
|
541
542
|
logger.warn("min cannot be greater than max.");
|
|
@@ -553,15 +554,15 @@ function clampToRange(value, min, max, logger, fallbackValue) {
|
|
|
553
554
|
return clampToRange(max, min, max, logger);
|
|
554
555
|
}
|
|
555
556
|
var init_number_utils = __esm({
|
|
556
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
557
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.0/node_modules/@posthog/core/dist/utils/number-utils.mjs"() {
|
|
557
558
|
init_type_utils();
|
|
558
559
|
}
|
|
559
560
|
});
|
|
560
561
|
|
|
561
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
562
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.0/node_modules/@posthog/core/dist/utils/bucketed-rate-limiter.mjs
|
|
562
563
|
var ONE_DAY_IN_MS, BucketedRateLimiter;
|
|
563
564
|
var init_bucketed_rate_limiter = __esm({
|
|
564
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
565
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.0/node_modules/@posthog/core/dist/utils/bucketed-rate-limiter.mjs"() {
|
|
565
566
|
init_number_utils();
|
|
566
567
|
ONE_DAY_IN_MS = 864e5;
|
|
567
568
|
BucketedRateLimiter = class {
|
|
@@ -605,10 +606,10 @@ var init_bucketed_rate_limiter = __esm({
|
|
|
605
606
|
}
|
|
606
607
|
});
|
|
607
608
|
|
|
608
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
609
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.0/node_modules/@posthog/core/dist/utils/promise-queue.mjs
|
|
609
610
|
var PromiseQueue;
|
|
610
611
|
var init_promise_queue = __esm({
|
|
611
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
612
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.0/node_modules/@posthog/core/dist/utils/promise-queue.mjs"() {
|
|
612
613
|
init_uuidv7();
|
|
613
614
|
PromiseQueue = class {
|
|
614
615
|
add(promise) {
|
|
@@ -639,7 +640,7 @@ var init_promise_queue = __esm({
|
|
|
639
640
|
}
|
|
640
641
|
});
|
|
641
642
|
|
|
642
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
643
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.0/node_modules/@posthog/core/dist/utils/logger.mjs
|
|
643
644
|
function createConsole(consoleLike = console) {
|
|
644
645
|
const lockedMethods = {
|
|
645
646
|
log: consoleLike.log.bind(consoleLike),
|
|
@@ -654,7 +655,7 @@ function createLogger(prefix, maybeCall = passThrough) {
|
|
|
654
655
|
}
|
|
655
656
|
var _createLogger, passThrough;
|
|
656
657
|
var init_logger = __esm({
|
|
657
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
658
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.0/node_modules/@posthog/core/dist/utils/logger.mjs"() {
|
|
658
659
|
_createLogger = (prefix, maybeCall, consoleLike) => {
|
|
659
660
|
function _log(level, ...args) {
|
|
660
661
|
maybeCall(() => {
|
|
@@ -683,7 +684,21 @@ var init_logger = __esm({
|
|
|
683
684
|
}
|
|
684
685
|
});
|
|
685
686
|
|
|
686
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
687
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.0/node_modules/@posthog/core/dist/utils/user-agent-utils.mjs
|
|
688
|
+
var MOBILE, TABLET, GENERIC;
|
|
689
|
+
var init_user_agent_utils = __esm({
|
|
690
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.0/node_modules/@posthog/core/dist/utils/user-agent-utils.mjs"() {
|
|
691
|
+
init_string_utils();
|
|
692
|
+
init_type_utils();
|
|
693
|
+
MOBILE = "Mobile";
|
|
694
|
+
TABLET = "Tablet";
|
|
695
|
+
GENERIC = "Generic";
|
|
696
|
+
GENERIC + " " + MOBILE.toLowerCase();
|
|
697
|
+
GENERIC + " " + TABLET.toLowerCase();
|
|
698
|
+
}
|
|
699
|
+
});
|
|
700
|
+
|
|
701
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.0/node_modules/@posthog/core/dist/utils/index.mjs
|
|
687
702
|
function assert(truthyValue, message2) {
|
|
688
703
|
if (!truthyValue || "string" != typeof truthyValue || isEmpty(truthyValue)) throw new Error(message2);
|
|
689
704
|
}
|
|
@@ -727,7 +742,7 @@ function allSettled(promises) {
|
|
|
727
742
|
}
|
|
728
743
|
var STRING_FORMAT, isError;
|
|
729
744
|
var init_utils = __esm({
|
|
730
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
745
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.0/node_modules/@posthog/core/dist/utils/index.mjs"() {
|
|
731
746
|
init_bot_detection();
|
|
732
747
|
init_bucketed_rate_limiter();
|
|
733
748
|
init_number_utils();
|
|
@@ -735,15 +750,16 @@ var init_utils = __esm({
|
|
|
735
750
|
init_type_utils();
|
|
736
751
|
init_promise_queue();
|
|
737
752
|
init_logger();
|
|
753
|
+
init_user_agent_utils();
|
|
738
754
|
STRING_FORMAT = "utf8";
|
|
739
755
|
isError = (x) => x instanceof Error;
|
|
740
756
|
}
|
|
741
757
|
});
|
|
742
758
|
|
|
743
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
759
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.0/node_modules/@posthog/core/dist/eventemitter.mjs
|
|
744
760
|
var SimpleEventEmitter;
|
|
745
761
|
var init_eventemitter = __esm({
|
|
746
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
762
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.0/node_modules/@posthog/core/dist/eventemitter.mjs"() {
|
|
747
763
|
SimpleEventEmitter = class {
|
|
748
764
|
constructor() {
|
|
749
765
|
this.events = {};
|
|
@@ -764,7 +780,7 @@ var init_eventemitter = __esm({
|
|
|
764
780
|
}
|
|
765
781
|
});
|
|
766
782
|
|
|
767
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
783
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.0/node_modules/@posthog/core/dist/gzip.mjs
|
|
768
784
|
function isGzipSupported() {
|
|
769
785
|
return "CompressionStream" in globalThis;
|
|
770
786
|
}
|
|
@@ -783,11 +799,11 @@ async function gzipCompress(input, isDebug = true) {
|
|
|
783
799
|
}
|
|
784
800
|
}
|
|
785
801
|
var init_gzip = __esm({
|
|
786
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
802
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.0/node_modules/@posthog/core/dist/gzip.mjs"() {
|
|
787
803
|
}
|
|
788
804
|
});
|
|
789
805
|
|
|
790
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
806
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.0/node_modules/@posthog/core/dist/posthog-core-stateless.mjs
|
|
791
807
|
async function logFlushError(err) {
|
|
792
808
|
if (err instanceof PostHogFetchHttpError) {
|
|
793
809
|
let text = "";
|
|
@@ -807,7 +823,7 @@ function isPostHogFetchContentTooLargeError(err) {
|
|
|
807
823
|
}
|
|
808
824
|
var PostHogFetchHttpError, PostHogFetchNetworkError, PostHogCoreStateless;
|
|
809
825
|
var init_posthog_core_stateless = __esm({
|
|
810
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
826
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.0/node_modules/@posthog/core/dist/posthog-core-stateless.mjs"() {
|
|
811
827
|
init_eventemitter();
|
|
812
828
|
init_featureFlagUtils();
|
|
813
829
|
init_gzip();
|
|
@@ -1081,7 +1097,8 @@ var init_posthog_core_stateless = __esm({
|
|
|
1081
1097
|
const flagDetail = featureFlags[key];
|
|
1082
1098
|
return {
|
|
1083
1099
|
response: flagDetail,
|
|
1084
|
-
requestId: flagsResponse.requestId
|
|
1100
|
+
requestId: flagsResponse.requestId,
|
|
1101
|
+
evaluatedAt: flagsResponse.evaluatedAt
|
|
1085
1102
|
};
|
|
1086
1103
|
}
|
|
1087
1104
|
async getFeatureFlagPayloadStateless(key, distinctId, groups = {}, personProperties = {}, groupProperties = {}, disableGeoip) {
|
|
@@ -1131,7 +1148,8 @@ var init_posthog_core_stateless = __esm({
|
|
|
1131
1148
|
flags: {},
|
|
1132
1149
|
featureFlags: {},
|
|
1133
1150
|
featureFlagPayloads: {},
|
|
1134
|
-
requestId: flagsResponse?.requestId
|
|
1151
|
+
requestId: flagsResponse?.requestId,
|
|
1152
|
+
quotaLimited: flagsResponse.quotaLimited
|
|
1135
1153
|
};
|
|
1136
1154
|
}
|
|
1137
1155
|
return flagsResponse;
|
|
@@ -1423,9 +1441,9 @@ var init_posthog_core_stateless = __esm({
|
|
|
1423
1441
|
}
|
|
1424
1442
|
});
|
|
1425
1443
|
|
|
1426
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
1444
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.0/node_modules/@posthog/core/dist/posthog-core.mjs
|
|
1427
1445
|
var init_posthog_core = __esm({
|
|
1428
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
1446
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.0/node_modules/@posthog/core/dist/posthog-core.mjs"() {
|
|
1429
1447
|
init_featureFlagUtils();
|
|
1430
1448
|
init_types();
|
|
1431
1449
|
init_posthog_core_stateless();
|
|
@@ -1434,7 +1452,7 @@ var init_posthog_core = __esm({
|
|
|
1434
1452
|
}
|
|
1435
1453
|
});
|
|
1436
1454
|
|
|
1437
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
1455
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.0/node_modules/@posthog/core/dist/error-tracking/chunk-ids.mjs
|
|
1438
1456
|
function getFilenameToChunkIdMap(stackParser) {
|
|
1439
1457
|
const chunkIdMap = globalThis._posthogChunkIds;
|
|
1440
1458
|
if (!chunkIdMap) return;
|
|
@@ -1467,14 +1485,14 @@ function getFilenameToChunkIdMap(stackParser) {
|
|
|
1467
1485
|
}
|
|
1468
1486
|
var parsedStackResults, lastKeysCount, cachedFilenameChunkIds;
|
|
1469
1487
|
var init_chunk_ids = __esm({
|
|
1470
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
1488
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.0/node_modules/@posthog/core/dist/error-tracking/chunk-ids.mjs"() {
|
|
1471
1489
|
}
|
|
1472
1490
|
});
|
|
1473
1491
|
|
|
1474
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
1492
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.0/node_modules/@posthog/core/dist/error-tracking/error-properties-builder.mjs
|
|
1475
1493
|
var MAX_CAUSE_RECURSION, ErrorPropertiesBuilder;
|
|
1476
1494
|
var init_error_properties_builder = __esm({
|
|
1477
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
1495
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.0/node_modules/@posthog/core/dist/error-tracking/error-properties-builder.mjs"() {
|
|
1478
1496
|
init_utils();
|
|
1479
1497
|
init_chunk_ids();
|
|
1480
1498
|
MAX_CAUSE_RECURSION = 4;
|
|
@@ -1588,7 +1606,7 @@ var init_error_properties_builder = __esm({
|
|
|
1588
1606
|
}
|
|
1589
1607
|
});
|
|
1590
1608
|
|
|
1591
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
1609
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.0/node_modules/@posthog/core/dist/error-tracking/parsers/base.mjs
|
|
1592
1610
|
function createFrame(platform, filename, func, lineno, colno) {
|
|
1593
1611
|
const frame = {
|
|
1594
1612
|
platform,
|
|
@@ -1602,16 +1620,16 @@ function createFrame(platform, filename, func, lineno, colno) {
|
|
|
1602
1620
|
}
|
|
1603
1621
|
var UNKNOWN_FUNCTION;
|
|
1604
1622
|
var init_base = __esm({
|
|
1605
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
1623
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.0/node_modules/@posthog/core/dist/error-tracking/parsers/base.mjs"() {
|
|
1606
1624
|
init_utils();
|
|
1607
1625
|
UNKNOWN_FUNCTION = "?";
|
|
1608
1626
|
}
|
|
1609
1627
|
});
|
|
1610
1628
|
|
|
1611
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
1629
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.0/node_modules/@posthog/core/dist/error-tracking/parsers/safari.mjs
|
|
1612
1630
|
var extractSafariExtensionDetails;
|
|
1613
1631
|
var init_safari = __esm({
|
|
1614
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
1632
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.0/node_modules/@posthog/core/dist/error-tracking/parsers/safari.mjs"() {
|
|
1615
1633
|
init_base();
|
|
1616
1634
|
extractSafariExtensionDetails = (func, filename) => {
|
|
1617
1635
|
const isSafariExtension = -1 !== func.indexOf("safari-extension");
|
|
@@ -1627,10 +1645,10 @@ var init_safari = __esm({
|
|
|
1627
1645
|
}
|
|
1628
1646
|
});
|
|
1629
1647
|
|
|
1630
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
1648
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.0/node_modules/@posthog/core/dist/error-tracking/parsers/chrome.mjs
|
|
1631
1649
|
var chromeRegexNoFnName, chromeRegex, chromeEvalRegex, chromeStackLineParser;
|
|
1632
1650
|
var init_chrome = __esm({
|
|
1633
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
1651
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.0/node_modules/@posthog/core/dist/error-tracking/parsers/chrome.mjs"() {
|
|
1634
1652
|
init_base();
|
|
1635
1653
|
init_safari();
|
|
1636
1654
|
chromeRegexNoFnName = /^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i;
|
|
@@ -1660,10 +1678,10 @@ var init_chrome = __esm({
|
|
|
1660
1678
|
}
|
|
1661
1679
|
});
|
|
1662
1680
|
|
|
1663
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
1681
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.0/node_modules/@posthog/core/dist/error-tracking/parsers/winjs.mjs
|
|
1664
1682
|
var winjsRegex, winjsStackLineParser;
|
|
1665
1683
|
var init_winjs = __esm({
|
|
1666
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
1684
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.0/node_modules/@posthog/core/dist/error-tracking/parsers/winjs.mjs"() {
|
|
1667
1685
|
init_base();
|
|
1668
1686
|
winjsRegex = /^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i;
|
|
1669
1687
|
winjsStackLineParser = (line, platform) => {
|
|
@@ -1673,10 +1691,10 @@ var init_winjs = __esm({
|
|
|
1673
1691
|
}
|
|
1674
1692
|
});
|
|
1675
1693
|
|
|
1676
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
1694
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.0/node_modules/@posthog/core/dist/error-tracking/parsers/gecko.mjs
|
|
1677
1695
|
var geckoREgex, geckoEvalRegex, geckoStackLineParser;
|
|
1678
1696
|
var init_gecko = __esm({
|
|
1679
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
1697
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.0/node_modules/@posthog/core/dist/error-tracking/parsers/gecko.mjs"() {
|
|
1680
1698
|
init_base();
|
|
1681
1699
|
init_safari();
|
|
1682
1700
|
geckoREgex = /^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i;
|
|
@@ -1703,10 +1721,10 @@ var init_gecko = __esm({
|
|
|
1703
1721
|
}
|
|
1704
1722
|
});
|
|
1705
1723
|
|
|
1706
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
1724
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.0/node_modules/@posthog/core/dist/error-tracking/parsers/opera.mjs
|
|
1707
1725
|
var opera10Regex, opera10StackLineParser, opera11Regex, opera11StackLineParser;
|
|
1708
1726
|
var init_opera = __esm({
|
|
1709
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
1727
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.0/node_modules/@posthog/core/dist/error-tracking/parsers/opera.mjs"() {
|
|
1710
1728
|
init_base();
|
|
1711
1729
|
opera10Regex = / line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i;
|
|
1712
1730
|
opera10StackLineParser = (line, platform) => {
|
|
@@ -1721,7 +1739,7 @@ var init_opera = __esm({
|
|
|
1721
1739
|
}
|
|
1722
1740
|
});
|
|
1723
1741
|
|
|
1724
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
1742
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.0/node_modules/@posthog/core/dist/error-tracking/parsers/node.mjs
|
|
1725
1743
|
function filenameIsInApp(filename, isNative = false) {
|
|
1726
1744
|
const isInternal = isNative || filename && !filename.startsWith("/") && !filename.match(/^[A-Z]:/) && !filename.startsWith(".") && !filename.match(/^[a-zA-Z]([a-zA-Z0-9.\-+])*:\/\//);
|
|
1727
1745
|
return !isInternal && void 0 !== filename && !filename.includes("node_modules/");
|
|
@@ -1731,7 +1749,7 @@ function _parseIntOrUndefined(input) {
|
|
|
1731
1749
|
}
|
|
1732
1750
|
var FILENAME_MATCH, FULL_MATCH, nodeStackLineParser;
|
|
1733
1751
|
var init_node = __esm({
|
|
1734
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
1752
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.0/node_modules/@posthog/core/dist/error-tracking/parsers/node.mjs"() {
|
|
1735
1753
|
init_base();
|
|
1736
1754
|
FILENAME_MATCH = /^\s*[-]{4,}$/;
|
|
1737
1755
|
FULL_MATCH = /at (?:async )?(?:(.+?)\s+\()?(?:(.+):(\d+):(\d+)?|([^)]+))\)?/;
|
|
@@ -1792,7 +1810,7 @@ var init_node = __esm({
|
|
|
1792
1810
|
}
|
|
1793
1811
|
});
|
|
1794
1812
|
|
|
1795
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
1813
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.0/node_modules/@posthog/core/dist/error-tracking/parsers/index.mjs
|
|
1796
1814
|
function reverseAndStripFrames(stack) {
|
|
1797
1815
|
if (!stack.length) return [];
|
|
1798
1816
|
const localStack = Array.from(stack);
|
|
@@ -1830,7 +1848,7 @@ function createStackParser(platform, ...parsers) {
|
|
|
1830
1848
|
}
|
|
1831
1849
|
var WEBPACK_ERROR_REGEXP, STACKTRACE_FRAME_LIMIT;
|
|
1832
1850
|
var init_parsers = __esm({
|
|
1833
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
1851
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.0/node_modules/@posthog/core/dist/error-tracking/parsers/index.mjs"() {
|
|
1834
1852
|
init_base();
|
|
1835
1853
|
init_chrome();
|
|
1836
1854
|
init_winjs();
|
|
@@ -1842,10 +1860,10 @@ var init_parsers = __esm({
|
|
|
1842
1860
|
}
|
|
1843
1861
|
});
|
|
1844
1862
|
|
|
1845
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
1863
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.0/node_modules/@posthog/core/dist/error-tracking/coercers/dom-exception-coercer.mjs
|
|
1846
1864
|
var DOMExceptionCoercer;
|
|
1847
1865
|
var init_dom_exception_coercer = __esm({
|
|
1848
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
1866
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.0/node_modules/@posthog/core/dist/error-tracking/coercers/dom-exception-coercer.mjs"() {
|
|
1849
1867
|
init_utils();
|
|
1850
1868
|
DOMExceptionCoercer = class {
|
|
1851
1869
|
match(err) {
|
|
@@ -1879,10 +1897,10 @@ var init_dom_exception_coercer = __esm({
|
|
|
1879
1897
|
}
|
|
1880
1898
|
});
|
|
1881
1899
|
|
|
1882
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
1900
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.0/node_modules/@posthog/core/dist/error-tracking/coercers/error-coercer.mjs
|
|
1883
1901
|
var ErrorCoercer;
|
|
1884
1902
|
var init_error_coercer = __esm({
|
|
1885
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
1903
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.0/node_modules/@posthog/core/dist/error-tracking/coercers/error-coercer.mjs"() {
|
|
1886
1904
|
init_utils();
|
|
1887
1905
|
ErrorCoercer = class {
|
|
1888
1906
|
match(err) {
|
|
@@ -1912,10 +1930,10 @@ var init_error_coercer = __esm({
|
|
|
1912
1930
|
}
|
|
1913
1931
|
});
|
|
1914
1932
|
|
|
1915
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
1933
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.0/node_modules/@posthog/core/dist/error-tracking/coercers/error-event-coercer.mjs
|
|
1916
1934
|
var ErrorEventCoercer;
|
|
1917
1935
|
var init_error_event_coercer = __esm({
|
|
1918
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
1936
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.0/node_modules/@posthog/core/dist/error-tracking/coercers/error-event-coercer.mjs"() {
|
|
1919
1937
|
init_utils();
|
|
1920
1938
|
ErrorEventCoercer = class {
|
|
1921
1939
|
constructor() {
|
|
@@ -1937,10 +1955,10 @@ var init_error_event_coercer = __esm({
|
|
|
1937
1955
|
}
|
|
1938
1956
|
});
|
|
1939
1957
|
|
|
1940
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
1958
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.0/node_modules/@posthog/core/dist/error-tracking/coercers/string-coercer.mjs
|
|
1941
1959
|
var ERROR_TYPES_PATTERN, StringCoercer;
|
|
1942
1960
|
var init_string_coercer = __esm({
|
|
1943
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
1961
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.0/node_modules/@posthog/core/dist/error-tracking/coercers/string-coercer.mjs"() {
|
|
1944
1962
|
ERROR_TYPES_PATTERN = /^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;
|
|
1945
1963
|
StringCoercer = class {
|
|
1946
1964
|
match(input) {
|
|
@@ -1972,10 +1990,10 @@ var init_string_coercer = __esm({
|
|
|
1972
1990
|
}
|
|
1973
1991
|
});
|
|
1974
1992
|
|
|
1975
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
1993
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.0/node_modules/@posthog/core/dist/error-tracking/types.mjs
|
|
1976
1994
|
var severityLevels;
|
|
1977
1995
|
var init_types2 = __esm({
|
|
1978
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
1996
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.0/node_modules/@posthog/core/dist/error-tracking/types.mjs"() {
|
|
1979
1997
|
severityLevels = [
|
|
1980
1998
|
"fatal",
|
|
1981
1999
|
"error",
|
|
@@ -1987,7 +2005,7 @@ var init_types2 = __esm({
|
|
|
1987
2005
|
}
|
|
1988
2006
|
});
|
|
1989
2007
|
|
|
1990
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
2008
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.0/node_modules/@posthog/core/dist/error-tracking/coercers/utils.mjs
|
|
1991
2009
|
function extractExceptionKeysForMessage(err, maxLength = 40) {
|
|
1992
2010
|
const keys = Object.keys(err);
|
|
1993
2011
|
keys.sort();
|
|
@@ -2002,14 +2020,14 @@ function extractExceptionKeysForMessage(err, maxLength = 40) {
|
|
|
2002
2020
|
return "";
|
|
2003
2021
|
}
|
|
2004
2022
|
var init_utils2 = __esm({
|
|
2005
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
2023
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.0/node_modules/@posthog/core/dist/error-tracking/coercers/utils.mjs"() {
|
|
2006
2024
|
}
|
|
2007
2025
|
});
|
|
2008
2026
|
|
|
2009
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
2027
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.0/node_modules/@posthog/core/dist/error-tracking/coercers/object-coercer.mjs
|
|
2010
2028
|
var ObjectCoercer;
|
|
2011
2029
|
var init_object_coercer = __esm({
|
|
2012
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
2030
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.0/node_modules/@posthog/core/dist/error-tracking/coercers/object-coercer.mjs"() {
|
|
2013
2031
|
init_utils();
|
|
2014
2032
|
init_types2();
|
|
2015
2033
|
init_utils2();
|
|
@@ -2063,10 +2081,10 @@ var init_object_coercer = __esm({
|
|
|
2063
2081
|
}
|
|
2064
2082
|
});
|
|
2065
2083
|
|
|
2066
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
2084
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.0/node_modules/@posthog/core/dist/error-tracking/coercers/event-coercer.mjs
|
|
2067
2085
|
var EventCoercer;
|
|
2068
2086
|
var init_event_coercer = __esm({
|
|
2069
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
2087
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.0/node_modules/@posthog/core/dist/error-tracking/coercers/event-coercer.mjs"() {
|
|
2070
2088
|
init_utils();
|
|
2071
2089
|
init_utils2();
|
|
2072
2090
|
EventCoercer = class {
|
|
@@ -2086,10 +2104,10 @@ var init_event_coercer = __esm({
|
|
|
2086
2104
|
}
|
|
2087
2105
|
});
|
|
2088
2106
|
|
|
2089
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
2107
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.0/node_modules/@posthog/core/dist/error-tracking/coercers/primitive-coercer.mjs
|
|
2090
2108
|
var PrimitiveCoercer;
|
|
2091
2109
|
var init_primitive_coercer = __esm({
|
|
2092
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
2110
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.0/node_modules/@posthog/core/dist/error-tracking/coercers/primitive-coercer.mjs"() {
|
|
2093
2111
|
init_utils();
|
|
2094
2112
|
PrimitiveCoercer = class {
|
|
2095
2113
|
match(candidate) {
|
|
@@ -2107,10 +2125,10 @@ var init_primitive_coercer = __esm({
|
|
|
2107
2125
|
}
|
|
2108
2126
|
});
|
|
2109
2127
|
|
|
2110
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
2128
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.0/node_modules/@posthog/core/dist/error-tracking/coercers/promise-rejection-event.mjs
|
|
2111
2129
|
var PromiseRejectionEventCoercer;
|
|
2112
2130
|
var init_promise_rejection_event = __esm({
|
|
2113
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
2131
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.0/node_modules/@posthog/core/dist/error-tracking/coercers/promise-rejection-event.mjs"() {
|
|
2114
2132
|
init_utils();
|
|
2115
2133
|
PromiseRejectionEventCoercer = class {
|
|
2116
2134
|
match(err) {
|
|
@@ -2139,9 +2157,9 @@ var init_promise_rejection_event = __esm({
|
|
|
2139
2157
|
}
|
|
2140
2158
|
});
|
|
2141
2159
|
|
|
2142
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
2160
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.0/node_modules/@posthog/core/dist/error-tracking/coercers/index.mjs
|
|
2143
2161
|
var init_coercers = __esm({
|
|
2144
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
2162
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.0/node_modules/@posthog/core/dist/error-tracking/coercers/index.mjs"() {
|
|
2145
2163
|
init_dom_exception_coercer();
|
|
2146
2164
|
init_error_coercer();
|
|
2147
2165
|
init_error_event_coercer();
|
|
@@ -2153,10 +2171,10 @@ var init_coercers = __esm({
|
|
|
2153
2171
|
}
|
|
2154
2172
|
});
|
|
2155
2173
|
|
|
2156
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
2174
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.0/node_modules/@posthog/core/dist/error-tracking/utils.mjs
|
|
2157
2175
|
var ReduceableCache;
|
|
2158
2176
|
var init_utils3 = __esm({
|
|
2159
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
2177
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.0/node_modules/@posthog/core/dist/error-tracking/utils.mjs"() {
|
|
2160
2178
|
ReduceableCache = class {
|
|
2161
2179
|
constructor(_maxSize) {
|
|
2162
2180
|
this._maxSize = _maxSize;
|
|
@@ -2182,7 +2200,7 @@ var init_utils3 = __esm({
|
|
|
2182
2200
|
}
|
|
2183
2201
|
});
|
|
2184
2202
|
|
|
2185
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
2203
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.0/node_modules/@posthog/core/dist/error-tracking/index.mjs
|
|
2186
2204
|
var error_tracking_exports = {};
|
|
2187
2205
|
__export(error_tracking_exports, {
|
|
2188
2206
|
DOMExceptionCoercer: () => DOMExceptionCoercer,
|
|
@@ -2205,7 +2223,7 @@ __export(error_tracking_exports, {
|
|
|
2205
2223
|
winjsStackLineParser: () => winjsStackLineParser
|
|
2206
2224
|
});
|
|
2207
2225
|
var init_error_tracking = __esm({
|
|
2208
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
2226
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.0/node_modules/@posthog/core/dist/error-tracking/index.mjs"() {
|
|
2209
2227
|
init_error_properties_builder();
|
|
2210
2228
|
init_parsers();
|
|
2211
2229
|
init_coercers();
|
|
@@ -2213,9 +2231,9 @@ var init_error_tracking = __esm({
|
|
|
2213
2231
|
}
|
|
2214
2232
|
});
|
|
2215
2233
|
|
|
2216
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
2234
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.0/node_modules/@posthog/core/dist/index.mjs
|
|
2217
2235
|
var init_dist = __esm({
|
|
2218
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
2236
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.0/node_modules/@posthog/core/dist/index.mjs"() {
|
|
2219
2237
|
init_featureFlagUtils();
|
|
2220
2238
|
init_uuidv7();
|
|
2221
2239
|
init_utils();
|
|
@@ -2406,7 +2424,7 @@ function snipLine(line, colno) {
|
|
|
2406
2424
|
}
|
|
2407
2425
|
var LRU_FILE_CONTENTS_CACHE, LRU_FILE_CONTENTS_FS_READ_FAILED, DEFAULT_LINES_OF_CONTEXT, MAX_CONTEXTLINES_COLNO, MAX_CONTEXTLINES_LINENO;
|
|
2408
2426
|
var init_context_lines_node = __esm({
|
|
2409
|
-
"../../node_modules/.pnpm/posthog-node@5.
|
|
2427
|
+
"../../node_modules/.pnpm/posthog-node@5.18.1/node_modules/posthog-node/dist/extensions/error-tracking/modifiers/context-lines.node.mjs"() {
|
|
2410
2428
|
init_dist();
|
|
2411
2429
|
LRU_FILE_CONTENTS_CACHE = new error_tracking_exports.ReduceableCache(25);
|
|
2412
2430
|
LRU_FILE_CONTENTS_FS_READ_FAILED = new error_tracking_exports.ReduceableCache(20);
|
|
@@ -2416,7 +2434,7 @@ var init_context_lines_node = __esm({
|
|
|
2416
2434
|
}
|
|
2417
2435
|
});
|
|
2418
2436
|
|
|
2419
|
-
// ../../node_modules/.pnpm/posthog-node@5.
|
|
2437
|
+
// ../../node_modules/.pnpm/posthog-node@5.18.1/node_modules/posthog-node/dist/extensions/error-tracking/autocapture.mjs
|
|
2420
2438
|
function makeUncaughtExceptionHandler(captureFn, onFatalFn) {
|
|
2421
2439
|
let calledFatalError = false;
|
|
2422
2440
|
return Object.assign((error) => {
|
|
@@ -2437,10 +2455,10 @@ function makeUncaughtExceptionHandler(captureFn, onFatalFn) {
|
|
|
2437
2455
|
});
|
|
2438
2456
|
}
|
|
2439
2457
|
function addUncaughtExceptionListener(captureFn, onFatalFn) {
|
|
2440
|
-
|
|
2458
|
+
globalThis.process?.on("uncaughtException", makeUncaughtExceptionHandler(captureFn, onFatalFn));
|
|
2441
2459
|
}
|
|
2442
2460
|
function addUnhandledRejectionListener(captureFn) {
|
|
2443
|
-
|
|
2461
|
+
globalThis.process?.on("unhandledRejection", (reason) => captureFn(reason, {
|
|
2444
2462
|
mechanism: {
|
|
2445
2463
|
type: "onunhandledrejection",
|
|
2446
2464
|
handled: false
|
|
@@ -2448,14 +2466,14 @@ function addUnhandledRejectionListener(captureFn) {
|
|
|
2448
2466
|
}));
|
|
2449
2467
|
}
|
|
2450
2468
|
var init_autocapture = __esm({
|
|
2451
|
-
"../../node_modules/.pnpm/posthog-node@5.
|
|
2469
|
+
"../../node_modules/.pnpm/posthog-node@5.18.1/node_modules/posthog-node/dist/extensions/error-tracking/autocapture.mjs"() {
|
|
2452
2470
|
}
|
|
2453
2471
|
});
|
|
2454
2472
|
|
|
2455
|
-
// ../../node_modules/.pnpm/posthog-node@5.
|
|
2473
|
+
// ../../node_modules/.pnpm/posthog-node@5.18.1/node_modules/posthog-node/dist/extensions/error-tracking/index.mjs
|
|
2456
2474
|
var SHUTDOWN_TIMEOUT, ErrorTracking;
|
|
2457
2475
|
var init_error_tracking2 = __esm({
|
|
2458
|
-
"../../node_modules/.pnpm/posthog-node@5.
|
|
2476
|
+
"../../node_modules/.pnpm/posthog-node@5.18.1/node_modules/posthog-node/dist/extensions/error-tracking/index.mjs"() {
|
|
2459
2477
|
init_autocapture();
|
|
2460
2478
|
init_dist();
|
|
2461
2479
|
SHUTDOWN_TIMEOUT = 2e3;
|
|
@@ -2521,15 +2539,28 @@ var init_error_tracking2 = __esm({
|
|
|
2521
2539
|
}
|
|
2522
2540
|
});
|
|
2523
2541
|
|
|
2524
|
-
// ../../node_modules/.pnpm/posthog-node@5.
|
|
2542
|
+
// ../../node_modules/.pnpm/posthog-node@5.18.1/node_modules/posthog-node/dist/version.mjs
|
|
2525
2543
|
var version;
|
|
2526
2544
|
var init_version = __esm({
|
|
2527
|
-
"../../node_modules/.pnpm/posthog-node@5.
|
|
2528
|
-
version = "5.
|
|
2545
|
+
"../../node_modules/.pnpm/posthog-node@5.18.1/node_modules/posthog-node/dist/version.mjs"() {
|
|
2546
|
+
version = "5.18.1";
|
|
2529
2547
|
}
|
|
2530
2548
|
});
|
|
2531
2549
|
|
|
2532
|
-
// ../../node_modules/.pnpm/posthog-node@5.
|
|
2550
|
+
// ../../node_modules/.pnpm/posthog-node@5.18.1/node_modules/posthog-node/dist/types.mjs
|
|
2551
|
+
var FeatureFlagError;
|
|
2552
|
+
var init_types3 = __esm({
|
|
2553
|
+
"../../node_modules/.pnpm/posthog-node@5.18.1/node_modules/posthog-node/dist/types.mjs"() {
|
|
2554
|
+
FeatureFlagError = {
|
|
2555
|
+
ERRORS_WHILE_COMPUTING: "errors_while_computing_flags",
|
|
2556
|
+
FLAG_MISSING: "flag_missing",
|
|
2557
|
+
QUOTA_LIMITED: "quota_limited",
|
|
2558
|
+
UNKNOWN_ERROR: "unknown_error"
|
|
2559
|
+
};
|
|
2560
|
+
}
|
|
2561
|
+
});
|
|
2562
|
+
|
|
2563
|
+
// ../../node_modules/.pnpm/posthog-node@5.18.1/node_modules/posthog-node/dist/extensions/feature-flags/crypto.mjs
|
|
2533
2564
|
async function hashSHA1(text) {
|
|
2534
2565
|
const subtle = globalThis.crypto?.subtle;
|
|
2535
2566
|
if (!subtle) throw new Error("SubtleCrypto API not available");
|
|
@@ -2538,11 +2569,11 @@ async function hashSHA1(text) {
|
|
|
2538
2569
|
return hashArray.map((byte) => byte.toString(16).padStart(2, "0")).join("");
|
|
2539
2570
|
}
|
|
2540
2571
|
var init_crypto = __esm({
|
|
2541
|
-
"../../node_modules/.pnpm/posthog-node@5.
|
|
2572
|
+
"../../node_modules/.pnpm/posthog-node@5.18.1/node_modules/posthog-node/dist/extensions/feature-flags/crypto.mjs"() {
|
|
2542
2573
|
}
|
|
2543
2574
|
});
|
|
2544
2575
|
|
|
2545
|
-
// ../../node_modules/.pnpm/posthog-node@5.
|
|
2576
|
+
// ../../node_modules/.pnpm/posthog-node@5.18.1/node_modules/posthog-node/dist/extensions/feature-flags/feature-flags.mjs
|
|
2546
2577
|
async function _hash(key, distinctId, salt = "") {
|
|
2547
2578
|
const hashString = await hashSHA1(`${key}.${distinctId}${salt}`);
|
|
2548
2579
|
return parseInt(hashString.slice(0, 15), 16) / LONG_SCALE;
|
|
@@ -2710,7 +2741,7 @@ function relativeDateParseForFeatureFlagMatching(value) {
|
|
|
2710
2741
|
}
|
|
2711
2742
|
var SIXTY_SECONDS, LONG_SCALE, NULL_VALUES_ALLOWED_OPERATORS, ClientError, InconclusiveMatchError, RequiresServerEvaluation, FeatureFlagsPoller;
|
|
2712
2743
|
var init_feature_flags = __esm({
|
|
2713
|
-
"../../node_modules/.pnpm/posthog-node@5.
|
|
2744
|
+
"../../node_modules/.pnpm/posthog-node@5.18.1/node_modules/posthog-node/dist/extensions/feature-flags/feature-flags.mjs"() {
|
|
2714
2745
|
init_dist();
|
|
2715
2746
|
init_crypto();
|
|
2716
2747
|
SIXTY_SECONDS = 6e4;
|
|
@@ -2748,7 +2779,6 @@ var init_feature_flags = __esm({
|
|
|
2748
2779
|
this.debugMode = false;
|
|
2749
2780
|
this.shouldBeginExponentialBackoff = false;
|
|
2750
2781
|
this.backOffCount = 0;
|
|
2751
|
-
this.hasAttemptedCacheLoad = false;
|
|
2752
2782
|
this.pollingInterval = pollingInterval;
|
|
2753
2783
|
this.personalApiKey = personalApiKey;
|
|
2754
2784
|
this.featureFlags = [];
|
|
@@ -2977,15 +3007,12 @@ var init_feature_flags = __esm({
|
|
|
2977
3007
|
}
|
|
2978
3008
|
}
|
|
2979
3009
|
async loadFeatureFlags(forceReload = false) {
|
|
2980
|
-
if (this.
|
|
2981
|
-
|
|
2982
|
-
|
|
2983
|
-
|
|
2984
|
-
|
|
2985
|
-
|
|
2986
|
-
this.loadingPromise = this._loadFeatureFlags();
|
|
2987
|
-
await this.loadingPromise;
|
|
2988
|
-
}
|
|
3010
|
+
if (this.loadedSuccessfullyOnce && !forceReload) return;
|
|
3011
|
+
if (!forceReload && this.nextFetchAllowedAt && Date.now() < this.nextFetchAllowedAt) return void this.logMsgIfDebug(() => console.debug("[FEATURE FLAGS] Skipping fetch, in backoff period"));
|
|
3012
|
+
if (!this.loadingPromise) this.loadingPromise = this._loadFeatureFlags().catch((err) => this.logMsgIfDebug(() => console.debug(`[FEATURE FLAGS] Failed to load feature flags: ${err}`))).finally(() => {
|
|
3013
|
+
this.loadingPromise = void 0;
|
|
3014
|
+
});
|
|
3015
|
+
return this.loadingPromise;
|
|
2989
3016
|
}
|
|
2990
3017
|
isLocalEvaluationReady() {
|
|
2991
3018
|
return (this.loadedSuccessfullyOnce ?? false) && (this.featureFlags?.length ?? 0) > 0;
|
|
@@ -2994,12 +3021,22 @@ var init_feature_flags = __esm({
|
|
|
2994
3021
|
if (!this.shouldBeginExponentialBackoff) return this.pollingInterval;
|
|
2995
3022
|
return Math.min(SIXTY_SECONDS, this.pollingInterval * 2 ** this.backOffCount);
|
|
2996
3023
|
}
|
|
3024
|
+
beginBackoff() {
|
|
3025
|
+
this.shouldBeginExponentialBackoff = true;
|
|
3026
|
+
this.backOffCount += 1;
|
|
3027
|
+
this.nextFetchAllowedAt = Date.now() + this.getPollingInterval();
|
|
3028
|
+
}
|
|
3029
|
+
clearBackoff() {
|
|
3030
|
+
this.shouldBeginExponentialBackoff = false;
|
|
3031
|
+
this.backOffCount = 0;
|
|
3032
|
+
this.nextFetchAllowedAt = void 0;
|
|
3033
|
+
}
|
|
2997
3034
|
async _loadFeatureFlags() {
|
|
2998
3035
|
if (this.poller) {
|
|
2999
3036
|
clearTimeout(this.poller);
|
|
3000
3037
|
this.poller = void 0;
|
|
3001
3038
|
}
|
|
3002
|
-
this.poller = setTimeout(() => this.
|
|
3039
|
+
this.poller = setTimeout(() => this.loadFeatureFlags(true), this.getPollingInterval());
|
|
3003
3040
|
try {
|
|
3004
3041
|
let shouldFetch = true;
|
|
3005
3042
|
if (this.cacheProvider) try {
|
|
@@ -3015,9 +3052,14 @@ var init_feature_flags = __esm({
|
|
|
3015
3052
|
const res = await this._requestFeatureFlagDefinitions();
|
|
3016
3053
|
if (!res) return;
|
|
3017
3054
|
switch (res.status) {
|
|
3055
|
+
case 304:
|
|
3056
|
+
this.logMsgIfDebug(() => console.debug("[FEATURE FLAGS] Flags not modified (304), using cached data"));
|
|
3057
|
+
this.flagsEtag = res.headers?.get("ETag") ?? this.flagsEtag;
|
|
3058
|
+
this.loadedSuccessfullyOnce = true;
|
|
3059
|
+
this.clearBackoff();
|
|
3060
|
+
return;
|
|
3018
3061
|
case 401:
|
|
3019
|
-
this.
|
|
3020
|
-
this.backOffCount += 1;
|
|
3062
|
+
this.beginBackoff();
|
|
3021
3063
|
throw new ClientError(`Your project key or personal API key is invalid. Setting next polling interval to ${this.getPollingInterval()}ms. More information: https://posthog.com/docs/api#rate-limiting`);
|
|
3022
3064
|
case 402:
|
|
3023
3065
|
console.warn("[FEATURE FLAGS] Feature flags quota limit exceeded - unsetting all local flags. Learn more about billing limits at https://posthog.com/docs/billing/limits-alerts");
|
|
@@ -3027,24 +3069,22 @@ var init_feature_flags = __esm({
|
|
|
3027
3069
|
this.cohorts = {};
|
|
3028
3070
|
return;
|
|
3029
3071
|
case 403:
|
|
3030
|
-
this.
|
|
3031
|
-
this.backOffCount += 1;
|
|
3072
|
+
this.beginBackoff();
|
|
3032
3073
|
throw new ClientError(`Your personal API key does not have permission to fetch feature flag definitions for local evaluation. Setting next polling interval to ${this.getPollingInterval()}ms. Are you sure you're using the correct personal and Project API key pair? More information: https://posthog.com/docs/api/overview`);
|
|
3033
3074
|
case 429:
|
|
3034
|
-
this.
|
|
3035
|
-
this.backOffCount += 1;
|
|
3075
|
+
this.beginBackoff();
|
|
3036
3076
|
throw new ClientError(`You are being rate limited. Setting next polling interval to ${this.getPollingInterval()}ms. More information: https://posthog.com/docs/api#rate-limiting`);
|
|
3037
3077
|
case 200: {
|
|
3038
3078
|
const responseJson = await res.json() ?? {};
|
|
3039
3079
|
if (!("flags" in responseJson)) return void this.onError?.(new Error(`Invalid response when getting feature flags: ${JSON.stringify(responseJson)}`));
|
|
3080
|
+
this.flagsEtag = res.headers?.get("ETag") ?? void 0;
|
|
3040
3081
|
const flagData = {
|
|
3041
3082
|
flags: responseJson.flags ?? [],
|
|
3042
3083
|
groupTypeMapping: responseJson.group_type_mapping || {},
|
|
3043
3084
|
cohorts: responseJson.cohorts || {}
|
|
3044
3085
|
};
|
|
3045
3086
|
this.updateFlagState(flagData);
|
|
3046
|
-
this.
|
|
3047
|
-
this.backOffCount = 0;
|
|
3087
|
+
this.clearBackoff();
|
|
3048
3088
|
if (this.cacheProvider && shouldFetch) try {
|
|
3049
3089
|
await this.cacheProvider.onFlagDefinitionsReceived(flagData);
|
|
3050
3090
|
} catch (err) {
|
|
@@ -3058,23 +3098,23 @@ var init_feature_flags = __esm({
|
|
|
3058
3098
|
}
|
|
3059
3099
|
} catch (err) {
|
|
3060
3100
|
if (err instanceof ClientError) this.onError?.(err);
|
|
3061
|
-
} finally {
|
|
3062
|
-
this.loadingPromise = void 0;
|
|
3063
3101
|
}
|
|
3064
3102
|
}
|
|
3065
|
-
getPersonalApiKeyRequestOptions(method = "GET") {
|
|
3103
|
+
getPersonalApiKeyRequestOptions(method = "GET", etag) {
|
|
3104
|
+
const headers = {
|
|
3105
|
+
...this.customHeaders,
|
|
3106
|
+
"Content-Type": "application/json",
|
|
3107
|
+
Authorization: `Bearer ${this.personalApiKey}`
|
|
3108
|
+
};
|
|
3109
|
+
if (etag) headers["If-None-Match"] = etag;
|
|
3066
3110
|
return {
|
|
3067
3111
|
method,
|
|
3068
|
-
headers
|
|
3069
|
-
...this.customHeaders,
|
|
3070
|
-
"Content-Type": "application/json",
|
|
3071
|
-
Authorization: `Bearer ${this.personalApiKey}`
|
|
3072
|
-
}
|
|
3112
|
+
headers
|
|
3073
3113
|
};
|
|
3074
3114
|
}
|
|
3075
3115
|
_requestFeatureFlagDefinitions() {
|
|
3076
3116
|
const url = `${this.host}/api/feature_flag/local_evaluation?token=${this.projectApiKey}&send_cohorts`;
|
|
3077
|
-
const options = this.getPersonalApiKeyRequestOptions();
|
|
3117
|
+
const options = this.getPersonalApiKeyRequestOptions("GET", this.flagsEtag);
|
|
3078
3118
|
let abortTimeout = null;
|
|
3079
3119
|
if (this.timeout && "number" == typeof this.timeout) {
|
|
3080
3120
|
const controller = new AbortController();
|
|
@@ -3106,10 +3146,10 @@ var init_feature_flags = __esm({
|
|
|
3106
3146
|
}
|
|
3107
3147
|
});
|
|
3108
3148
|
|
|
3109
|
-
// ../../node_modules/.pnpm/posthog-node@5.
|
|
3149
|
+
// ../../node_modules/.pnpm/posthog-node@5.18.1/node_modules/posthog-node/dist/storage-memory.mjs
|
|
3110
3150
|
var PostHogMemoryStorage;
|
|
3111
3151
|
var init_storage_memory = __esm({
|
|
3112
|
-
"../../node_modules/.pnpm/posthog-node@5.
|
|
3152
|
+
"../../node_modules/.pnpm/posthog-node@5.18.1/node_modules/posthog-node/dist/storage-memory.mjs"() {
|
|
3113
3153
|
PostHogMemoryStorage = class {
|
|
3114
3154
|
getProperty(key) {
|
|
3115
3155
|
return this._memoryStorage[key];
|
|
@@ -3124,12 +3164,13 @@ var init_storage_memory = __esm({
|
|
|
3124
3164
|
}
|
|
3125
3165
|
});
|
|
3126
3166
|
|
|
3127
|
-
// ../../node_modules/.pnpm/posthog-node@5.
|
|
3167
|
+
// ../../node_modules/.pnpm/posthog-node@5.18.1/node_modules/posthog-node/dist/client.mjs
|
|
3128
3168
|
var MINIMUM_POLLING_INTERVAL, THIRTY_SECONDS, MAX_CACHE_SIZE, PostHogBackendClient;
|
|
3129
3169
|
var init_client = __esm({
|
|
3130
|
-
"../../node_modules/.pnpm/posthog-node@5.
|
|
3170
|
+
"../../node_modules/.pnpm/posthog-node@5.18.1/node_modules/posthog-node/dist/client.mjs"() {
|
|
3131
3171
|
init_version();
|
|
3132
3172
|
init_dist();
|
|
3173
|
+
init_types3();
|
|
3133
3174
|
init_feature_flags();
|
|
3134
3175
|
init_error_tracking2();
|
|
3135
3176
|
init_storage_memory();
|
|
@@ -3140,6 +3181,7 @@ var init_client = __esm({
|
|
|
3140
3181
|
constructor(apiKey, options = {}) {
|
|
3141
3182
|
super(apiKey, options), this._memoryStorage = new PostHogMemoryStorage();
|
|
3142
3183
|
this.options = options;
|
|
3184
|
+
this.context = this.initializeContext();
|
|
3143
3185
|
this.options.featureFlagsPollingInterval = "number" == typeof options.featureFlagsPollingInterval ? Math.max(options.featureFlagsPollingInterval, MINIMUM_POLLING_INTERVAL) : THIRTY_SECONDS;
|
|
3144
3186
|
if (options.personalApiKey) {
|
|
3145
3187
|
if (options.personalApiKey.includes("phc_")) throw new Error('Your Personal API key is invalid. These keys are prefixed with "phx_" and can be created in PostHog project settings.');
|
|
@@ -3210,25 +3252,29 @@ var init_client = __esm({
|
|
|
3210
3252
|
if (err) console.error(err);
|
|
3211
3253
|
}));
|
|
3212
3254
|
}
|
|
3213
|
-
identify({ distinctId, properties, disableGeoip }) {
|
|
3214
|
-
const
|
|
3215
|
-
|
|
3216
|
-
const
|
|
3217
|
-
|
|
3218
|
-
$set:
|
|
3219
|
-
$set_once:
|
|
3220
|
-
|
|
3255
|
+
identify({ distinctId, properties = {}, disableGeoip }) {
|
|
3256
|
+
const { $set, $set_once, $anon_distinct_id, ...rest } = properties;
|
|
3257
|
+
const setProps = $set || rest;
|
|
3258
|
+
const setOnceProps = $set_once || {};
|
|
3259
|
+
const eventProperties = {
|
|
3260
|
+
$set: setProps,
|
|
3261
|
+
$set_once: setOnceProps,
|
|
3262
|
+
$anon_distinct_id: $anon_distinct_id ?? void 0
|
|
3263
|
+
};
|
|
3264
|
+
super.identifyStateless(distinctId, eventProperties, {
|
|
3221
3265
|
disableGeoip
|
|
3222
3266
|
});
|
|
3223
3267
|
}
|
|
3224
|
-
async identifyImmediate({ distinctId, properties, disableGeoip }) {
|
|
3225
|
-
const
|
|
3226
|
-
|
|
3227
|
-
const
|
|
3228
|
-
|
|
3229
|
-
$set:
|
|
3230
|
-
$set_once:
|
|
3231
|
-
|
|
3268
|
+
async identifyImmediate({ distinctId, properties = {}, disableGeoip }) {
|
|
3269
|
+
const { $set, $set_once, $anon_distinct_id, ...rest } = properties;
|
|
3270
|
+
const setProps = $set || rest;
|
|
3271
|
+
const setOnceProps = $set_once || {};
|
|
3272
|
+
const eventProperties = {
|
|
3273
|
+
$set: setProps,
|
|
3274
|
+
$set_once: setOnceProps,
|
|
3275
|
+
$anon_distinct_id: $anon_distinct_id ?? void 0
|
|
3276
|
+
};
|
|
3277
|
+
super.identifyStatelessImmediate(distinctId, eventProperties, {
|
|
3232
3278
|
disableGeoip
|
|
3233
3279
|
});
|
|
3234
3280
|
}
|
|
@@ -3271,13 +3317,25 @@ var init_client = __esm({
|
|
|
3271
3317
|
let response = await this.featureFlagsPoller?.getFeatureFlag(key, distinctId, groups, personProperties, groupProperties);
|
|
3272
3318
|
const flagWasLocallyEvaluated = void 0 !== response;
|
|
3273
3319
|
let requestId;
|
|
3320
|
+
let evaluatedAt;
|
|
3274
3321
|
let flagDetail;
|
|
3322
|
+
let featureFlagError;
|
|
3275
3323
|
if (!flagWasLocallyEvaluated && !onlyEvaluateLocally) {
|
|
3276
|
-
const
|
|
3277
|
-
|
|
3278
|
-
|
|
3279
|
-
|
|
3280
|
-
|
|
3324
|
+
const flagsResponse = await super.getFeatureFlagDetailsStateless(distinctId, groups, personProperties, groupProperties, disableGeoip, [
|
|
3325
|
+
key
|
|
3326
|
+
]);
|
|
3327
|
+
if (void 0 === flagsResponse) featureFlagError = FeatureFlagError.UNKNOWN_ERROR;
|
|
3328
|
+
else {
|
|
3329
|
+
requestId = flagsResponse.requestId;
|
|
3330
|
+
evaluatedAt = flagsResponse.evaluatedAt;
|
|
3331
|
+
const errors = [];
|
|
3332
|
+
if (flagsResponse.errorsWhileComputingFlags) errors.push(FeatureFlagError.ERRORS_WHILE_COMPUTING);
|
|
3333
|
+
if (flagsResponse.quotaLimited?.includes("feature_flags")) errors.push(FeatureFlagError.QUOTA_LIMITED);
|
|
3334
|
+
flagDetail = flagsResponse.flags[key];
|
|
3335
|
+
if (void 0 === flagDetail) errors.push(FeatureFlagError.FLAG_MISSING);
|
|
3336
|
+
if (errors.length > 0) featureFlagError = errors.join(",");
|
|
3337
|
+
response = getFeatureFlagValue(flagDetail);
|
|
3338
|
+
}
|
|
3281
3339
|
}
|
|
3282
3340
|
const featureFlagReportedKey = `${key}_${response}`;
|
|
3283
3341
|
if (sendFeatureFlagEvents && (!(distinctId in this.distinctIdHasSentFlagCalls) || !this.distinctIdHasSentFlagCalls[distinctId].includes(featureFlagReportedKey))) {
|
|
@@ -3286,19 +3344,22 @@ var init_client = __esm({
|
|
|
3286
3344
|
else this.distinctIdHasSentFlagCalls[distinctId] = [
|
|
3287
3345
|
featureFlagReportedKey
|
|
3288
3346
|
];
|
|
3347
|
+
const properties = {
|
|
3348
|
+
$feature_flag: key,
|
|
3349
|
+
$feature_flag_response: response,
|
|
3350
|
+
$feature_flag_id: flagDetail?.metadata?.id,
|
|
3351
|
+
$feature_flag_version: flagDetail?.metadata?.version,
|
|
3352
|
+
$feature_flag_reason: flagDetail?.reason?.description ?? flagDetail?.reason?.code,
|
|
3353
|
+
locally_evaluated: flagWasLocallyEvaluated,
|
|
3354
|
+
[`$feature/${key}`]: response,
|
|
3355
|
+
$feature_flag_request_id: requestId,
|
|
3356
|
+
$feature_flag_evaluated_at: evaluatedAt
|
|
3357
|
+
};
|
|
3358
|
+
if (featureFlagError) properties.$feature_flag_error = featureFlagError;
|
|
3289
3359
|
this.capture({
|
|
3290
3360
|
distinctId,
|
|
3291
3361
|
event: "$feature_flag_called",
|
|
3292
|
-
properties
|
|
3293
|
-
$feature_flag: key,
|
|
3294
|
-
$feature_flag_response: response,
|
|
3295
|
-
$feature_flag_id: flagDetail?.metadata?.id,
|
|
3296
|
-
$feature_flag_version: flagDetail?.metadata?.version,
|
|
3297
|
-
$feature_flag_reason: flagDetail?.reason?.description ?? flagDetail?.reason?.code,
|
|
3298
|
-
locally_evaluated: flagWasLocallyEvaluated,
|
|
3299
|
-
[`$feature/${key}`]: response,
|
|
3300
|
-
$feature_flag_request_id: requestId
|
|
3301
|
-
},
|
|
3362
|
+
properties,
|
|
3302
3363
|
groups,
|
|
3303
3364
|
disableGeoip
|
|
3304
3365
|
});
|
|
@@ -3392,6 +3453,13 @@ var init_client = __esm({
|
|
|
3392
3453
|
async reloadFeatureFlags() {
|
|
3393
3454
|
await this.featureFlagsPoller?.loadFeatureFlags(true);
|
|
3394
3455
|
}
|
|
3456
|
+
withContext(data, fn, options) {
|
|
3457
|
+
if (!this.context) return fn();
|
|
3458
|
+
return this.context.run(data, fn, options);
|
|
3459
|
+
}
|
|
3460
|
+
getContext() {
|
|
3461
|
+
return this.context?.get();
|
|
3462
|
+
}
|
|
3395
3463
|
async _shutdown(shutdownTimeoutMs) {
|
|
3396
3464
|
this.featureFlagsPoller?.stopPoller(shutdownTimeoutMs);
|
|
3397
3465
|
this.errorTracking.shutdown();
|
|
@@ -3503,10 +3571,21 @@ var init_client = __esm({
|
|
|
3503
3571
|
}
|
|
3504
3572
|
async prepareEventMessage(props) {
|
|
3505
3573
|
const { distinctId, event, properties, groups, sendFeatureFlags, timestamp, disableGeoip, uuid } = props;
|
|
3574
|
+
const contextData = this.context?.get();
|
|
3575
|
+
let mergedDistinctId = distinctId || contextData?.distinctId;
|
|
3576
|
+
const mergedProperties = {
|
|
3577
|
+
...contextData?.properties || {},
|
|
3578
|
+
...properties || {}
|
|
3579
|
+
};
|
|
3580
|
+
if (!mergedDistinctId) {
|
|
3581
|
+
mergedDistinctId = uuidv7();
|
|
3582
|
+
mergedProperties.$process_person_profile = false;
|
|
3583
|
+
}
|
|
3584
|
+
if (contextData?.sessionId && !mergedProperties.$session_id) mergedProperties.$session_id = contextData.sessionId;
|
|
3506
3585
|
const eventMessage = this._runBeforeSend({
|
|
3507
|
-
distinctId,
|
|
3586
|
+
distinctId: mergedDistinctId,
|
|
3508
3587
|
event,
|
|
3509
|
-
properties,
|
|
3588
|
+
properties: mergedProperties,
|
|
3510
3589
|
groups,
|
|
3511
3590
|
sendFeatureFlags,
|
|
3512
3591
|
timestamp,
|
|
@@ -3517,8 +3596,9 @@ var init_client = __esm({
|
|
|
3517
3596
|
const eventProperties = await Promise.resolve().then(async () => {
|
|
3518
3597
|
if (sendFeatureFlags) {
|
|
3519
3598
|
const sendFeatureFlagsOptions = "object" == typeof sendFeatureFlags ? sendFeatureFlags : void 0;
|
|
3520
|
-
return await this.getFeatureFlagsForEvent(distinctId, groups, disableGeoip, sendFeatureFlagsOptions);
|
|
3599
|
+
return await this.getFeatureFlagsForEvent(eventMessage.distinctId, groups, disableGeoip, sendFeatureFlagsOptions);
|
|
3521
3600
|
}
|
|
3601
|
+
eventMessage.event;
|
|
3522
3602
|
return {};
|
|
3523
3603
|
}).then((flags) => {
|
|
3524
3604
|
const additionalProperties = {};
|
|
@@ -3574,8 +3654,37 @@ var init_client = __esm({
|
|
|
3574
3654
|
};
|
|
3575
3655
|
}
|
|
3576
3656
|
});
|
|
3657
|
+
var PostHogContext;
|
|
3658
|
+
var init_context = __esm({
|
|
3659
|
+
"../../node_modules/.pnpm/posthog-node@5.18.1/node_modules/posthog-node/dist/extensions/context/context.mjs"() {
|
|
3660
|
+
PostHogContext = class {
|
|
3661
|
+
constructor() {
|
|
3662
|
+
this.storage = new async_hooks.AsyncLocalStorage();
|
|
3663
|
+
}
|
|
3664
|
+
get() {
|
|
3665
|
+
return this.storage.getStore();
|
|
3666
|
+
}
|
|
3667
|
+
run(context, fn, options) {
|
|
3668
|
+
const fresh = options?.fresh === true;
|
|
3669
|
+
if (fresh) return this.storage.run(context, fn);
|
|
3670
|
+
{
|
|
3671
|
+
const currentContext = this.get() || {};
|
|
3672
|
+
const mergedContext = {
|
|
3673
|
+
distinctId: context.distinctId ?? currentContext.distinctId,
|
|
3674
|
+
sessionId: context.sessionId ?? currentContext.sessionId,
|
|
3675
|
+
properties: {
|
|
3676
|
+
...currentContext.properties || {},
|
|
3677
|
+
...context.properties || {}
|
|
3678
|
+
}
|
|
3679
|
+
};
|
|
3680
|
+
return this.storage.run(mergedContext, fn);
|
|
3681
|
+
}
|
|
3682
|
+
}
|
|
3683
|
+
};
|
|
3684
|
+
}
|
|
3685
|
+
});
|
|
3577
3686
|
|
|
3578
|
-
// ../../node_modules/.pnpm/posthog-node@5.
|
|
3687
|
+
// ../../node_modules/.pnpm/posthog-node@5.18.1/node_modules/posthog-node/dist/extensions/sentry-integration.mjs
|
|
3579
3688
|
function createEventProcessor(_posthog, { organization, projectId, prefix, severityAllowList = [
|
|
3580
3689
|
"error"
|
|
3581
3690
|
], sendExceptionsToPostHog = true } = {}) {
|
|
@@ -3631,7 +3740,7 @@ function sentryIntegration(_posthog, options) {
|
|
|
3631
3740
|
}
|
|
3632
3741
|
var NAME, PostHogSentryIntegration;
|
|
3633
3742
|
var init_sentry_integration = __esm({
|
|
3634
|
-
"../../node_modules/.pnpm/posthog-node@5.
|
|
3743
|
+
"../../node_modules/.pnpm/posthog-node@5.18.1/node_modules/posthog-node/dist/extensions/sentry-integration.mjs"() {
|
|
3635
3744
|
NAME = "posthog-node";
|
|
3636
3745
|
PostHogSentryIntegration = class {
|
|
3637
3746
|
static #_ = this.POSTHOG_ID_TAG = "posthog_distinct_id";
|
|
@@ -3653,46 +3762,55 @@ var init_sentry_integration = __esm({
|
|
|
3653
3762
|
}
|
|
3654
3763
|
});
|
|
3655
3764
|
|
|
3656
|
-
// ../../node_modules/.pnpm/posthog-node@5.
|
|
3765
|
+
// ../../node_modules/.pnpm/posthog-node@5.18.1/node_modules/posthog-node/dist/extensions/express.mjs
|
|
3657
3766
|
function setupExpressErrorHandler(_posthog, app) {
|
|
3658
|
-
app.use((
|
|
3767
|
+
app.use(posthogErrorHandler(_posthog));
|
|
3768
|
+
}
|
|
3769
|
+
function posthogErrorHandler(posthog) {
|
|
3770
|
+
return (error, req, res, next) => {
|
|
3771
|
+
const sessionId = req.headers["x-posthog-session-id"];
|
|
3772
|
+
const distinctId = req.headers["x-posthog-distinct-id"];
|
|
3773
|
+
const syntheticException = new Error("Synthetic exception");
|
|
3659
3774
|
const hint = {
|
|
3660
3775
|
mechanism: {
|
|
3661
3776
|
type: "middleware",
|
|
3662
3777
|
handled: false
|
|
3663
|
-
}
|
|
3778
|
+
},
|
|
3779
|
+
syntheticException
|
|
3664
3780
|
};
|
|
3665
|
-
ErrorTracking.buildEventMessage(error, hint,
|
|
3666
|
-
$
|
|
3667
|
-
|
|
3781
|
+
posthog.addPendingPromise(ErrorTracking.buildEventMessage(error, hint, distinctId, {
|
|
3782
|
+
$session_id: sessionId,
|
|
3783
|
+
$current_url: req.url,
|
|
3784
|
+
$request_method: req.method,
|
|
3785
|
+
$request_path: req.path,
|
|
3786
|
+
$user_agent: req.headers["user-agent"],
|
|
3787
|
+
$response_status_code: res.statusCode,
|
|
3788
|
+
$ip: req.headers["x-forwarded-for"] || req?.socket?.remoteAddress
|
|
3789
|
+
}).then((msg) => {
|
|
3790
|
+
posthog.capture(msg);
|
|
3791
|
+
}));
|
|
3668
3792
|
next(error);
|
|
3669
|
-
}
|
|
3793
|
+
};
|
|
3670
3794
|
}
|
|
3671
3795
|
var init_express = __esm({
|
|
3672
|
-
"../../node_modules/.pnpm/posthog-node@5.
|
|
3673
|
-
init_dist();
|
|
3796
|
+
"../../node_modules/.pnpm/posthog-node@5.18.1/node_modules/posthog-node/dist/extensions/express.mjs"() {
|
|
3674
3797
|
init_error_tracking2();
|
|
3675
3798
|
}
|
|
3676
3799
|
});
|
|
3677
3800
|
|
|
3678
|
-
// ../../node_modules/.pnpm/posthog-node@5.
|
|
3679
|
-
var init_types3 = __esm({
|
|
3680
|
-
"../../node_modules/.pnpm/posthog-node@5.14.0/node_modules/posthog-node/dist/types.mjs"() {
|
|
3681
|
-
}
|
|
3682
|
-
});
|
|
3683
|
-
|
|
3684
|
-
// ../../node_modules/.pnpm/posthog-node@5.14.0/node_modules/posthog-node/dist/exports.mjs
|
|
3801
|
+
// ../../node_modules/.pnpm/posthog-node@5.18.1/node_modules/posthog-node/dist/exports.mjs
|
|
3685
3802
|
var init_exports = __esm({
|
|
3686
|
-
"../../node_modules/.pnpm/posthog-node@5.
|
|
3803
|
+
"../../node_modules/.pnpm/posthog-node@5.18.1/node_modules/posthog-node/dist/exports.mjs"() {
|
|
3687
3804
|
init_sentry_integration();
|
|
3688
3805
|
init_express();
|
|
3689
3806
|
init_types3();
|
|
3690
3807
|
}
|
|
3691
3808
|
});
|
|
3692
3809
|
|
|
3693
|
-
// ../../node_modules/.pnpm/posthog-node@5.
|
|
3810
|
+
// ../../node_modules/.pnpm/posthog-node@5.18.1/node_modules/posthog-node/dist/entrypoints/index.node.mjs
|
|
3694
3811
|
var index_node_exports = {};
|
|
3695
3812
|
__export(index_node_exports, {
|
|
3813
|
+
FeatureFlagError: () => FeatureFlagError,
|
|
3696
3814
|
PostHog: () => PostHog,
|
|
3697
3815
|
PostHogSentryIntegration: () => PostHogSentryIntegration,
|
|
3698
3816
|
createEventProcessor: () => createEventProcessor,
|
|
@@ -3701,12 +3819,13 @@ __export(index_node_exports, {
|
|
|
3701
3819
|
});
|
|
3702
3820
|
var PostHog;
|
|
3703
3821
|
var init_index_node = __esm({
|
|
3704
|
-
"../../node_modules/.pnpm/posthog-node@5.
|
|
3822
|
+
"../../node_modules/.pnpm/posthog-node@5.18.1/node_modules/posthog-node/dist/entrypoints/index.node.mjs"() {
|
|
3705
3823
|
init_module_node();
|
|
3706
3824
|
init_context_lines_node();
|
|
3707
3825
|
init_error_tracking2();
|
|
3708
3826
|
init_client();
|
|
3709
3827
|
init_dist();
|
|
3828
|
+
init_context();
|
|
3710
3829
|
init_exports();
|
|
3711
3830
|
ErrorTracking.errorPropertiesBuilder = new error_tracking_exports.ErrorPropertiesBuilder([
|
|
3712
3831
|
new error_tracking_exports.EventCoercer(),
|
|
@@ -3722,6 +3841,9 @@ var init_index_node = __esm({
|
|
|
3722
3841
|
getLibraryId() {
|
|
3723
3842
|
return "posthog-node";
|
|
3724
3843
|
}
|
|
3844
|
+
initializeContext() {
|
|
3845
|
+
return new PostHogContext();
|
|
3846
|
+
}
|
|
3725
3847
|
};
|
|
3726
3848
|
}
|
|
3727
3849
|
});
|
|
@@ -7466,7 +7588,7 @@ var init_stats = __esm({
|
|
|
7466
7588
|
|
|
7467
7589
|
// ../../node_modules/.pnpm/@segment+analytics-core@1.8.2/node_modules/@segment/analytics-core/dist/esm/context/index.js
|
|
7468
7590
|
var ContextCancelation, CoreContext;
|
|
7469
|
-
var
|
|
7591
|
+
var init_context2 = __esm({
|
|
7470
7592
|
"../../node_modules/.pnpm/@segment+analytics-core@1.8.2/node_modules/@segment/analytics-core/dist/esm/context/index.js"() {
|
|
7471
7593
|
init_dist3();
|
|
7472
7594
|
init_dist2();
|
|
@@ -7692,7 +7814,7 @@ function ensure(ctx, plugin) {
|
|
|
7692
7814
|
var init_delivery = __esm({
|
|
7693
7815
|
"../../node_modules/.pnpm/@segment+analytics-core@1.8.2/node_modules/@segment/analytics-core/dist/esm/queue/delivery.js"() {
|
|
7694
7816
|
init_tslib_es6();
|
|
7695
|
-
|
|
7817
|
+
init_context2();
|
|
7696
7818
|
}
|
|
7697
7819
|
});
|
|
7698
7820
|
|
|
@@ -7703,7 +7825,7 @@ var init_event_queue = __esm({
|
|
|
7703
7825
|
init_tslib_es6();
|
|
7704
7826
|
init_group_by();
|
|
7705
7827
|
init_priority_queue();
|
|
7706
|
-
|
|
7828
|
+
init_context2();
|
|
7707
7829
|
init_esm();
|
|
7708
7830
|
init_task_group();
|
|
7709
7831
|
init_delivery();
|
|
@@ -8135,7 +8257,7 @@ var init_esm2 = __esm({
|
|
|
8135
8257
|
init_callback();
|
|
8136
8258
|
init_priority_queue();
|
|
8137
8259
|
init_backoff();
|
|
8138
|
-
|
|
8260
|
+
init_context2();
|
|
8139
8261
|
init_event_queue();
|
|
8140
8262
|
init_analytics();
|
|
8141
8263
|
init_dispatch();
|
|
@@ -9803,7 +9925,7 @@ var init_event_factory = __esm({
|
|
|
9803
9925
|
|
|
9804
9926
|
// ../../node_modules/.pnpm/@segment+analytics-node@2.3.0/node_modules/@segment/analytics-node/dist/esm/app/context.js
|
|
9805
9927
|
var Context;
|
|
9806
|
-
var
|
|
9928
|
+
var init_context3 = __esm({
|
|
9807
9929
|
"../../node_modules/.pnpm/@segment+analytics-node@2.3.0/node_modules/@segment/analytics-node/dist/esm/app/context.js"() {
|
|
9808
9930
|
init_esm2();
|
|
9809
9931
|
Context = class extends CoreContext {
|
|
@@ -9819,7 +9941,7 @@ var normalizeDispatchCb, dispatchAndEmit;
|
|
|
9819
9941
|
var init_dispatch_emit = __esm({
|
|
9820
9942
|
"../../node_modules/.pnpm/@segment+analytics-node@2.3.0/node_modules/@segment/analytics-node/dist/esm/app/dispatch-emit.js"() {
|
|
9821
9943
|
init_esm2();
|
|
9822
|
-
|
|
9944
|
+
init_context3();
|
|
9823
9945
|
normalizeDispatchCb = (cb) => (ctx) => {
|
|
9824
9946
|
const failedDelivery = ctx.failedDelivery();
|
|
9825
9947
|
return failedDelivery ? cb(failedDelivery.reason, ctx) : cb(void 0, ctx);
|
|
@@ -12991,7 +13113,7 @@ var init_analytics_node = __esm({
|
|
|
12991
13113
|
init_event_factory();
|
|
12992
13114
|
init_dispatch_emit();
|
|
12993
13115
|
init_emitter3();
|
|
12994
|
-
|
|
13116
|
+
init_context3();
|
|
12995
13117
|
init_event_queue2();
|
|
12996
13118
|
init_http_client();
|
|
12997
13119
|
Analytics = class extends NodeEmitter {
|
|
@@ -13193,7 +13315,7 @@ var init_analytics_node = __esm({
|
|
|
13193
13315
|
var init_index_common = __esm({
|
|
13194
13316
|
"../../node_modules/.pnpm/@segment+analytics-node@2.3.0/node_modules/@segment/analytics-node/dist/esm/index.common.js"() {
|
|
13195
13317
|
init_analytics_node();
|
|
13196
|
-
|
|
13318
|
+
init_context3();
|
|
13197
13319
|
init_http_client();
|
|
13198
13320
|
}
|
|
13199
13321
|
});
|
|
@@ -13215,10 +13337,10 @@ var init_esm4 = __esm({
|
|
|
13215
13337
|
}
|
|
13216
13338
|
});
|
|
13217
13339
|
|
|
13218
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
13340
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.35.0/node_modules/@amplitude/analytics-core/lib/esm/types/event/event.js
|
|
13219
13341
|
var IdentifyOperation, SpecialEventType;
|
|
13220
13342
|
var init_event = __esm({
|
|
13221
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
13343
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.35.0/node_modules/@amplitude/analytics-core/lib/esm/types/event/event.js"() {
|
|
13222
13344
|
(function(IdentifyOperation3) {
|
|
13223
13345
|
IdentifyOperation3["SET"] = "$set";
|
|
13224
13346
|
IdentifyOperation3["SET_ONCE"] = "$setOnce";
|
|
@@ -13239,10 +13361,10 @@ var init_event = __esm({
|
|
|
13239
13361
|
}
|
|
13240
13362
|
});
|
|
13241
13363
|
|
|
13242
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
13364
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.35.0/node_modules/@amplitude/analytics-core/lib/esm/types/constants.js
|
|
13243
13365
|
var UNSET_VALUE, AMPLITUDE_PREFIX, STORAGE_PREFIX, DEFAULT_INSTANCE_NAME, AMPLITUDE_SERVER_URL, EU_AMPLITUDE_SERVER_URL, AMPLITUDE_BATCH_SERVER_URL, EU_AMPLITUDE_BATCH_SERVER_URL;
|
|
13244
13366
|
var init_constants = __esm({
|
|
13245
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
13367
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.35.0/node_modules/@amplitude/analytics-core/lib/esm/types/constants.js"() {
|
|
13246
13368
|
UNSET_VALUE = "-";
|
|
13247
13369
|
AMPLITUDE_PREFIX = "AMP";
|
|
13248
13370
|
STORAGE_PREFIX = "".concat(AMPLITUDE_PREFIX, "_unsent");
|
|
@@ -13254,10 +13376,10 @@ var init_constants = __esm({
|
|
|
13254
13376
|
}
|
|
13255
13377
|
});
|
|
13256
13378
|
|
|
13257
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
13379
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.35.0/node_modules/@amplitude/analytics-core/lib/esm/utils/valid-properties.js
|
|
13258
13380
|
var MAX_PROPERTY_KEYS, isValidObject, isValidProperties;
|
|
13259
13381
|
var init_valid_properties = __esm({
|
|
13260
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
13382
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.35.0/node_modules/@amplitude/analytics-core/lib/esm/utils/valid-properties.js"() {
|
|
13261
13383
|
init_tslib_es6();
|
|
13262
13384
|
MAX_PROPERTY_KEYS = 1e3;
|
|
13263
13385
|
isValidObject = function(properties) {
|
|
@@ -13312,10 +13434,10 @@ var init_valid_properties = __esm({
|
|
|
13312
13434
|
}
|
|
13313
13435
|
});
|
|
13314
13436
|
|
|
13315
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
13437
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.35.0/node_modules/@amplitude/analytics-core/lib/esm/identify.js
|
|
13316
13438
|
var Identify, IdentifyOperation2, OrderedIdentifyOperations;
|
|
13317
13439
|
var init_identify = __esm({
|
|
13318
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
13440
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.35.0/node_modules/@amplitude/analytics-core/lib/esm/identify.js"() {
|
|
13319
13441
|
init_tslib_es6();
|
|
13320
13442
|
init_constants();
|
|
13321
13443
|
init_valid_properties();
|
|
@@ -13426,10 +13548,10 @@ var init_identify = __esm({
|
|
|
13426
13548
|
}
|
|
13427
13549
|
});
|
|
13428
13550
|
|
|
13429
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
13551
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.35.0/node_modules/@amplitude/analytics-core/lib/esm/types/messages.js
|
|
13430
13552
|
var SUCCESS_MESSAGE, UNEXPECTED_ERROR_MESSAGE, MAX_RETRIES_EXCEEDED_MESSAGE, OPT_OUT_MESSAGE, MISSING_API_KEY_MESSAGE, INVALID_API_KEY, CLIENT_NOT_INITIALIZED;
|
|
13431
13553
|
var init_messages = __esm({
|
|
13432
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
13554
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.35.0/node_modules/@amplitude/analytics-core/lib/esm/types/messages.js"() {
|
|
13433
13555
|
SUCCESS_MESSAGE = "Event tracked successfully";
|
|
13434
13556
|
UNEXPECTED_ERROR_MESSAGE = "Unexpected error occurred";
|
|
13435
13557
|
MAX_RETRIES_EXCEEDED_MESSAGE = "Event rejected due to exceeded retry count";
|
|
@@ -13440,10 +13562,10 @@ var init_messages = __esm({
|
|
|
13440
13562
|
}
|
|
13441
13563
|
});
|
|
13442
13564
|
|
|
13443
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
13565
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.35.0/node_modules/@amplitude/analytics-core/lib/esm/types/status.js
|
|
13444
13566
|
var Status;
|
|
13445
13567
|
var init_status = __esm({
|
|
13446
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
13568
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.35.0/node_modules/@amplitude/analytics-core/lib/esm/types/status.js"() {
|
|
13447
13569
|
(function(Status2) {
|
|
13448
13570
|
Status2["Unknown"] = "unknown";
|
|
13449
13571
|
Status2["Skipped"] = "skipped";
|
|
@@ -13458,10 +13580,10 @@ var init_status = __esm({
|
|
|
13458
13580
|
}
|
|
13459
13581
|
});
|
|
13460
13582
|
|
|
13461
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
13583
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.35.0/node_modules/@amplitude/analytics-core/lib/esm/utils/result-builder.js
|
|
13462
13584
|
var buildResult;
|
|
13463
13585
|
var init_result_builder = __esm({
|
|
13464
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
13586
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.35.0/node_modules/@amplitude/analytics-core/lib/esm/utils/result-builder.js"() {
|
|
13465
13587
|
init_status();
|
|
13466
13588
|
buildResult = function(event, code, message2) {
|
|
13467
13589
|
if (code === void 0) {
|
|
@@ -13475,10 +13597,10 @@ var init_result_builder = __esm({
|
|
|
13475
13597
|
}
|
|
13476
13598
|
});
|
|
13477
13599
|
|
|
13478
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
13600
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.35.0/node_modules/@amplitude/analytics-core/lib/esm/global-scope.js
|
|
13479
13601
|
var getGlobalScope;
|
|
13480
13602
|
var init_global_scope = __esm({
|
|
13481
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
13603
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.35.0/node_modules/@amplitude/analytics-core/lib/esm/global-scope.js"() {
|
|
13482
13604
|
getGlobalScope = function() {
|
|
13483
13605
|
var ampIntegrationContextName = "ampIntegrationContext";
|
|
13484
13606
|
if (typeof globalThis !== "undefined" && typeof globalThis[ampIntegrationContextName] !== "undefined") {
|
|
@@ -13501,10 +13623,10 @@ var init_global_scope = __esm({
|
|
|
13501
13623
|
}
|
|
13502
13624
|
});
|
|
13503
13625
|
|
|
13504
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
13626
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.35.0/node_modules/@amplitude/analytics-core/lib/esm/utils/uuid.js
|
|
13505
13627
|
var legacyUUID, hex, UUID2;
|
|
13506
13628
|
var init_uuid2 = __esm({
|
|
13507
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
13629
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.35.0/node_modules/@amplitude/analytics-core/lib/esm/utils/uuid.js"() {
|
|
13508
13630
|
init_tslib_es6();
|
|
13509
13631
|
init_global_scope();
|
|
13510
13632
|
legacyUUID = function(a) {
|
|
@@ -13548,10 +13670,10 @@ var init_uuid2 = __esm({
|
|
|
13548
13670
|
}
|
|
13549
13671
|
});
|
|
13550
13672
|
|
|
13551
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
13673
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.35.0/node_modules/@amplitude/analytics-core/lib/esm/timeline.js
|
|
13552
13674
|
var Timeline;
|
|
13553
13675
|
var init_timeline = __esm({
|
|
13554
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
13676
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.35.0/node_modules/@amplitude/analytics-core/lib/esm/timeline.js"() {
|
|
13555
13677
|
init_tslib_es6();
|
|
13556
13678
|
init_result_builder();
|
|
13557
13679
|
init_uuid2();
|
|
@@ -13853,10 +13975,10 @@ var init_timeline = __esm({
|
|
|
13853
13975
|
}
|
|
13854
13976
|
});
|
|
13855
13977
|
|
|
13856
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
13978
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.35.0/node_modules/@amplitude/analytics-core/lib/esm/utils/event-builder.js
|
|
13857
13979
|
var createTrackEvent, createIdentifyEvent, createGroupIdentifyEvent, createGroupEvent, createRevenueEvent;
|
|
13858
13980
|
var init_event_builder = __esm({
|
|
13859
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
13981
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.35.0/node_modules/@amplitude/analytics-core/lib/esm/utils/event-builder.js"() {
|
|
13860
13982
|
init_tslib_es6();
|
|
13861
13983
|
init_identify();
|
|
13862
13984
|
init_event();
|
|
@@ -13886,10 +14008,10 @@ var init_event_builder = __esm({
|
|
|
13886
14008
|
}
|
|
13887
14009
|
});
|
|
13888
14010
|
|
|
13889
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
14011
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.35.0/node_modules/@amplitude/analytics-core/lib/esm/utils/return-wrapper.js
|
|
13890
14012
|
var returnWrapper;
|
|
13891
14013
|
var init_return_wrapper = __esm({
|
|
13892
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
14014
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.35.0/node_modules/@amplitude/analytics-core/lib/esm/utils/return-wrapper.js"() {
|
|
13893
14015
|
returnWrapper = function(awaitable) {
|
|
13894
14016
|
return {
|
|
13895
14017
|
promise: awaitable || Promise.resolve()
|
|
@@ -13898,10 +14020,10 @@ var init_return_wrapper = __esm({
|
|
|
13898
14020
|
}
|
|
13899
14021
|
});
|
|
13900
14022
|
|
|
13901
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
14023
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.35.0/node_modules/@amplitude/analytics-core/lib/esm/core-client.js
|
|
13902
14024
|
var AmplitudeCore;
|
|
13903
14025
|
var init_core_client = __esm({
|
|
13904
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
14026
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.35.0/node_modules/@amplitude/analytics-core/lib/esm/core-client.js"() {
|
|
13905
14027
|
init_tslib_es6();
|
|
13906
14028
|
init_event();
|
|
13907
14029
|
init_identify();
|
|
@@ -14169,10 +14291,10 @@ var init_core_client = __esm({
|
|
|
14169
14291
|
}
|
|
14170
14292
|
});
|
|
14171
14293
|
|
|
14172
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
14294
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.35.0/node_modules/@amplitude/analytics-core/lib/esm/revenue.js
|
|
14173
14295
|
var Revenue, RevenueProperty;
|
|
14174
14296
|
var init_revenue = __esm({
|
|
14175
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
14297
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.35.0/node_modules/@amplitude/analytics-core/lib/esm/revenue.js"() {
|
|
14176
14298
|
init_tslib_es6();
|
|
14177
14299
|
init_valid_properties();
|
|
14178
14300
|
Revenue = /** @class */
|
|
@@ -14249,10 +14371,10 @@ var init_revenue = __esm({
|
|
|
14249
14371
|
}
|
|
14250
14372
|
});
|
|
14251
14373
|
|
|
14252
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
14374
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.35.0/node_modules/@amplitude/analytics-core/lib/esm/utils/chunk.js
|
|
14253
14375
|
var chunk;
|
|
14254
14376
|
var init_chunk = __esm({
|
|
14255
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
14377
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.35.0/node_modules/@amplitude/analytics-core/lib/esm/utils/chunk.js"() {
|
|
14256
14378
|
chunk = function(arr, size) {
|
|
14257
14379
|
var chunkSize = Math.max(size, 1);
|
|
14258
14380
|
return arr.reduce(function(chunks, element, index) {
|
|
@@ -14267,10 +14389,10 @@ var init_chunk = __esm({
|
|
|
14267
14389
|
}
|
|
14268
14390
|
});
|
|
14269
14391
|
|
|
14270
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
14392
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.35.0/node_modules/@amplitude/analytics-core/lib/esm/types/loglevel.js
|
|
14271
14393
|
var LogLevel;
|
|
14272
14394
|
var init_loglevel = __esm({
|
|
14273
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
14395
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.35.0/node_modules/@amplitude/analytics-core/lib/esm/types/loglevel.js"() {
|
|
14274
14396
|
(function(LogLevel2) {
|
|
14275
14397
|
LogLevel2[LogLevel2["None"] = 0] = "None";
|
|
14276
14398
|
LogLevel2[LogLevel2["Error"] = 1] = "Error";
|
|
@@ -14281,10 +14403,10 @@ var init_loglevel = __esm({
|
|
|
14281
14403
|
}
|
|
14282
14404
|
});
|
|
14283
14405
|
|
|
14284
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
14406
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.35.0/node_modules/@amplitude/analytics-core/lib/esm/logger.js
|
|
14285
14407
|
var PREFIX, Logger;
|
|
14286
14408
|
var init_logger3 = __esm({
|
|
14287
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
14409
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.35.0/node_modules/@amplitude/analytics-core/lib/esm/logger.js"() {
|
|
14288
14410
|
init_loglevel();
|
|
14289
14411
|
PREFIX = "Amplitude Logger ";
|
|
14290
14412
|
Logger = /** @class */
|
|
@@ -14346,10 +14468,10 @@ var init_logger3 = __esm({
|
|
|
14346
14468
|
}
|
|
14347
14469
|
});
|
|
14348
14470
|
|
|
14349
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
14471
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.35.0/node_modules/@amplitude/analytics-core/lib/esm/config.js
|
|
14350
14472
|
var getDefaultConfig, Config, getServerUrl, createServerConfig, RequestMetadata;
|
|
14351
14473
|
var init_config = __esm({
|
|
14352
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
14474
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.35.0/node_modules/@amplitude/analytics-core/lib/esm/config.js"() {
|
|
14353
14475
|
init_constants();
|
|
14354
14476
|
init_logger3();
|
|
14355
14477
|
init_loglevel();
|
|
@@ -14450,19 +14572,19 @@ var init_config = __esm({
|
|
|
14450
14572
|
}
|
|
14451
14573
|
});
|
|
14452
14574
|
|
|
14453
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
14575
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.35.0/node_modules/@amplitude/analytics-core/lib/esm/utils/status-code.js
|
|
14454
14576
|
function isSuccessStatusCode(code) {
|
|
14455
14577
|
return code >= 200 && code < 300;
|
|
14456
14578
|
}
|
|
14457
14579
|
var init_status_code = __esm({
|
|
14458
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
14580
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.35.0/node_modules/@amplitude/analytics-core/lib/esm/utils/status-code.js"() {
|
|
14459
14581
|
}
|
|
14460
14582
|
});
|
|
14461
14583
|
|
|
14462
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
14584
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.35.0/node_modules/@amplitude/analytics-core/lib/esm/utils/debug.js
|
|
14463
14585
|
var getStacktrace, getClientLogConfig, getValueByStringPath, getClientStates, debugWrapper;
|
|
14464
14586
|
var init_debug = __esm({
|
|
14465
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
14587
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.35.0/node_modules/@amplitude/analytics-core/lib/esm/utils/debug.js"() {
|
|
14466
14588
|
init_tslib_es6();
|
|
14467
14589
|
init_loglevel();
|
|
14468
14590
|
getStacktrace = function(ignoreDepth) {
|
|
@@ -14580,7 +14702,7 @@ var init_debug = __esm({
|
|
|
14580
14702
|
}
|
|
14581
14703
|
});
|
|
14582
14704
|
|
|
14583
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
14705
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.35.0/node_modules/@amplitude/analytics-core/lib/esm/plugins/destination.js
|
|
14584
14706
|
function getErrorMessage(error) {
|
|
14585
14707
|
if (error instanceof Error)
|
|
14586
14708
|
return error.message;
|
|
@@ -14598,7 +14720,7 @@ function getResponseBodyString(res) {
|
|
|
14598
14720
|
}
|
|
14599
14721
|
var Destination;
|
|
14600
14722
|
var init_destination = __esm({
|
|
14601
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
14723
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.35.0/node_modules/@amplitude/analytics-core/lib/esm/plugins/destination.js"() {
|
|
14602
14724
|
init_tslib_es6();
|
|
14603
14725
|
init_status();
|
|
14604
14726
|
init_messages();
|
|
@@ -14989,10 +15111,10 @@ var init_destination = __esm({
|
|
|
14989
15111
|
}
|
|
14990
15112
|
});
|
|
14991
15113
|
|
|
14992
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
15114
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.35.0/node_modules/@amplitude/analytics-core/lib/esm/transports/base.js
|
|
14993
15115
|
var BaseTransport;
|
|
14994
15116
|
var init_base2 = __esm({
|
|
14995
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
15117
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.35.0/node_modules/@amplitude/analytics-core/lib/esm/transports/base.js"() {
|
|
14996
15118
|
init_status();
|
|
14997
15119
|
init_status_code();
|
|
14998
15120
|
BaseTransport = /** @class */
|
|
@@ -15094,10 +15216,10 @@ var init_base2 = __esm({
|
|
|
15094
15216
|
}
|
|
15095
15217
|
});
|
|
15096
15218
|
|
|
15097
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
15219
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.35.0/node_modules/@amplitude/analytics-core/lib/esm/types/server-zone.js
|
|
15098
15220
|
var ServerZone;
|
|
15099
15221
|
var init_server_zone = __esm({
|
|
15100
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
15222
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.35.0/node_modules/@amplitude/analytics-core/lib/esm/types/server-zone.js"() {
|
|
15101
15223
|
(function(ServerZone2) {
|
|
15102
15224
|
ServerZone2["US"] = "US";
|
|
15103
15225
|
ServerZone2["EU"] = "EU";
|
|
@@ -15106,17 +15228,17 @@ var init_server_zone = __esm({
|
|
|
15106
15228
|
}
|
|
15107
15229
|
});
|
|
15108
15230
|
|
|
15109
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
15231
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.35.0/node_modules/@amplitude/analytics-core/lib/esm/types/offline.js
|
|
15110
15232
|
var OfflineDisabled;
|
|
15111
15233
|
var init_offline = __esm({
|
|
15112
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
15234
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.35.0/node_modules/@amplitude/analytics-core/lib/esm/types/offline.js"() {
|
|
15113
15235
|
OfflineDisabled = null;
|
|
15114
15236
|
}
|
|
15115
15237
|
});
|
|
15116
15238
|
|
|
15117
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
15239
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.35.0/node_modules/@amplitude/analytics-core/lib/esm/index.js
|
|
15118
15240
|
var init_esm5 = __esm({
|
|
15119
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
15241
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.35.0/node_modules/@amplitude/analytics-core/lib/esm/index.js"() {
|
|
15120
15242
|
init_core_client();
|
|
15121
15243
|
init_identify();
|
|
15122
15244
|
init_revenue();
|
|
@@ -15133,18 +15255,18 @@ var init_esm5 = __esm({
|
|
|
15133
15255
|
}
|
|
15134
15256
|
});
|
|
15135
15257
|
|
|
15136
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-node@1.5.
|
|
15258
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-node@1.5.29/node_modules/@amplitude/analytics-node/lib/esm/version.js
|
|
15137
15259
|
var VERSION;
|
|
15138
15260
|
var init_version3 = __esm({
|
|
15139
|
-
"../../node_modules/.pnpm/@amplitude+analytics-node@1.5.
|
|
15140
|
-
VERSION = "1.5.
|
|
15261
|
+
"../../node_modules/.pnpm/@amplitude+analytics-node@1.5.29/node_modules/@amplitude/analytics-node/lib/esm/version.js"() {
|
|
15262
|
+
VERSION = "1.5.29";
|
|
15141
15263
|
}
|
|
15142
15264
|
});
|
|
15143
15265
|
|
|
15144
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-node@1.5.
|
|
15266
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-node@1.5.29/node_modules/@amplitude/analytics-node/lib/esm/plugins/context.js
|
|
15145
15267
|
var Context2;
|
|
15146
|
-
var
|
|
15147
|
-
"../../node_modules/.pnpm/@amplitude+analytics-node@1.5.
|
|
15268
|
+
var init_context4 = __esm({
|
|
15269
|
+
"../../node_modules/.pnpm/@amplitude+analytics-node@1.5.29/node_modules/@amplitude/analytics-node/lib/esm/plugins/context.js"() {
|
|
15148
15270
|
init_tslib_es6();
|
|
15149
15271
|
init_esm5();
|
|
15150
15272
|
init_version3();
|
|
@@ -15179,7 +15301,7 @@ var init_context3 = __esm({
|
|
|
15179
15301
|
});
|
|
15180
15302
|
var Http;
|
|
15181
15303
|
var init_http = __esm({
|
|
15182
|
-
"../../node_modules/.pnpm/@amplitude+analytics-node@1.5.
|
|
15304
|
+
"../../node_modules/.pnpm/@amplitude+analytics-node@1.5.29/node_modules/@amplitude/analytics-node/lib/esm/transports/http.js"() {
|
|
15183
15305
|
init_tslib_es6();
|
|
15184
15306
|
init_esm5();
|
|
15185
15307
|
Http = /** @class */
|
|
@@ -15241,10 +15363,10 @@ var init_http = __esm({
|
|
|
15241
15363
|
}
|
|
15242
15364
|
});
|
|
15243
15365
|
|
|
15244
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-node@1.5.
|
|
15366
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-node@1.5.29/node_modules/@amplitude/analytics-node/lib/esm/config.js
|
|
15245
15367
|
var NodeConfig, useNodeConfig;
|
|
15246
15368
|
var init_config2 = __esm({
|
|
15247
|
-
"../../node_modules/.pnpm/@amplitude+analytics-node@1.5.
|
|
15369
|
+
"../../node_modules/.pnpm/@amplitude+analytics-node@1.5.29/node_modules/@amplitude/analytics-node/lib/esm/config.js"() {
|
|
15248
15370
|
init_tslib_es6();
|
|
15249
15371
|
init_esm5();
|
|
15250
15372
|
init_http();
|
|
@@ -15262,13 +15384,13 @@ var init_config2 = __esm({
|
|
|
15262
15384
|
}
|
|
15263
15385
|
});
|
|
15264
15386
|
|
|
15265
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-node@1.5.
|
|
15387
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-node@1.5.29/node_modules/@amplitude/analytics-node/lib/esm/node-client.js
|
|
15266
15388
|
var AmplitudeNode, createInstance, node_client_default;
|
|
15267
15389
|
var init_node_client = __esm({
|
|
15268
|
-
"../../node_modules/.pnpm/@amplitude+analytics-node@1.5.
|
|
15390
|
+
"../../node_modules/.pnpm/@amplitude+analytics-node@1.5.29/node_modules/@amplitude/analytics-node/lib/esm/node-client.js"() {
|
|
15269
15391
|
init_tslib_es6();
|
|
15270
15392
|
init_esm5();
|
|
15271
|
-
|
|
15393
|
+
init_context4();
|
|
15272
15394
|
init_config2();
|
|
15273
15395
|
AmplitudeNode = /** @class */
|
|
15274
15396
|
(function(_super) {
|
|
@@ -15339,7 +15461,7 @@ var init_node_client = __esm({
|
|
|
15339
15461
|
}
|
|
15340
15462
|
});
|
|
15341
15463
|
|
|
15342
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-node@1.5.
|
|
15464
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-node@1.5.29/node_modules/@amplitude/analytics-node/lib/esm/types.js
|
|
15343
15465
|
var types_exports = {};
|
|
15344
15466
|
__export(types_exports, {
|
|
15345
15467
|
IdentifyOperation: () => IdentifyOperation,
|
|
@@ -15350,12 +15472,12 @@ __export(types_exports, {
|
|
|
15350
15472
|
SpecialEventType: () => SpecialEventType
|
|
15351
15473
|
});
|
|
15352
15474
|
var init_types4 = __esm({
|
|
15353
|
-
"../../node_modules/.pnpm/@amplitude+analytics-node@1.5.
|
|
15475
|
+
"../../node_modules/.pnpm/@amplitude+analytics-node@1.5.29/node_modules/@amplitude/analytics-node/lib/esm/types.js"() {
|
|
15354
15476
|
init_esm5();
|
|
15355
15477
|
}
|
|
15356
15478
|
});
|
|
15357
15479
|
|
|
15358
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-node@1.5.
|
|
15480
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-node@1.5.29/node_modules/@amplitude/analytics-node/lib/esm/index.js
|
|
15359
15481
|
var esm_exports2 = {};
|
|
15360
15482
|
__export(esm_exports2, {
|
|
15361
15483
|
Identify: () => Identify,
|
|
@@ -15376,7 +15498,7 @@ __export(esm_exports2, {
|
|
|
15376
15498
|
});
|
|
15377
15499
|
var add, groupIdentify, identify, init, logEvent, remove, revenue, setGroup, setOptOut, track, flush;
|
|
15378
15500
|
var init_esm6 = __esm({
|
|
15379
|
-
"../../node_modules/.pnpm/@amplitude+analytics-node@1.5.
|
|
15501
|
+
"../../node_modules/.pnpm/@amplitude+analytics-node@1.5.29/node_modules/@amplitude/analytics-node/lib/esm/index.js"() {
|
|
15380
15502
|
init_node_client();
|
|
15381
15503
|
init_node_client();
|
|
15382
15504
|
init_esm5();
|
|
@@ -16111,7 +16233,8 @@ var SegmentSubscriber = class {
|
|
|
16111
16233
|
var AmplitudeSubscriber = class {
|
|
16112
16234
|
name = "AmplitudeSubscriber";
|
|
16113
16235
|
version = "1.0.0";
|
|
16114
|
-
|
|
16236
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
16237
|
+
amplitudeModule = null;
|
|
16115
16238
|
enabled;
|
|
16116
16239
|
config;
|
|
16117
16240
|
initPromise = null;
|
|
@@ -16124,11 +16247,12 @@ var AmplitudeSubscriber = class {
|
|
|
16124
16247
|
}
|
|
16125
16248
|
async initialize() {
|
|
16126
16249
|
try {
|
|
16127
|
-
const
|
|
16128
|
-
|
|
16250
|
+
const amplitude = await Promise.resolve().then(() => (init_esm6(), esm_exports2));
|
|
16251
|
+
amplitude.init(this.config.apiKey);
|
|
16252
|
+
this.amplitudeModule = amplitude;
|
|
16129
16253
|
} catch (error) {
|
|
16130
16254
|
console.error(
|
|
16131
|
-
"Amplitude subscriber failed to initialize. Install @amplitude/
|
|
16255
|
+
"Amplitude subscriber failed to initialize. Install @amplitude/analytics-node: pnpm add @amplitude/analytics-node",
|
|
16132
16256
|
error
|
|
16133
16257
|
);
|
|
16134
16258
|
this.enabled = false;
|
|
@@ -16143,7 +16267,7 @@ var AmplitudeSubscriber = class {
|
|
|
16143
16267
|
async trackEvent(name, attributes) {
|
|
16144
16268
|
if (!this.enabled) return;
|
|
16145
16269
|
await this.ensureInitialized();
|
|
16146
|
-
this.
|
|
16270
|
+
this.amplitudeModule?.track({
|
|
16147
16271
|
event_type: name,
|
|
16148
16272
|
user_id: attributes?.userId || attributes?.user_id || "anonymous",
|
|
16149
16273
|
event_properties: attributes
|
|
@@ -16152,7 +16276,7 @@ var AmplitudeSubscriber = class {
|
|
|
16152
16276
|
async trackFunnelStep(funnelName, step, attributes) {
|
|
16153
16277
|
if (!this.enabled) return;
|
|
16154
16278
|
await this.ensureInitialized();
|
|
16155
|
-
this.
|
|
16279
|
+
this.amplitudeModule?.track({
|
|
16156
16280
|
event_type: `${funnelName}.${step}`,
|
|
16157
16281
|
user_id: attributes?.userId || attributes?.user_id || "anonymous",
|
|
16158
16282
|
event_properties: {
|
|
@@ -16165,7 +16289,7 @@ var AmplitudeSubscriber = class {
|
|
|
16165
16289
|
async trackOutcome(operationName, outcome, attributes) {
|
|
16166
16290
|
if (!this.enabled) return;
|
|
16167
16291
|
await this.ensureInitialized();
|
|
16168
|
-
this.
|
|
16292
|
+
this.amplitudeModule?.track({
|
|
16169
16293
|
event_type: `${operationName}.${outcome}`,
|
|
16170
16294
|
user_id: attributes?.userId || attributes?.user_id || "anonymous",
|
|
16171
16295
|
event_properties: {
|
|
@@ -16178,7 +16302,7 @@ var AmplitudeSubscriber = class {
|
|
|
16178
16302
|
async trackValue(name, value, attributes) {
|
|
16179
16303
|
if (!this.enabled) return;
|
|
16180
16304
|
await this.ensureInitialized();
|
|
16181
|
-
this.
|
|
16305
|
+
this.amplitudeModule?.track({
|
|
16182
16306
|
event_type: name,
|
|
16183
16307
|
user_id: attributes?.userId || attributes?.user_id || "anonymous",
|
|
16184
16308
|
event_properties: {
|
|
@@ -16190,8 +16314,8 @@ var AmplitudeSubscriber = class {
|
|
|
16190
16314
|
/** Flush pending events before shutdown */
|
|
16191
16315
|
async shutdown() {
|
|
16192
16316
|
await this.ensureInitialized();
|
|
16193
|
-
if (this.
|
|
16194
|
-
await this.
|
|
16317
|
+
if (this.amplitudeModule) {
|
|
16318
|
+
await this.amplitudeModule.flush();
|
|
16195
16319
|
}
|
|
16196
16320
|
}
|
|
16197
16321
|
};
|