autotel-subscribers 16.0.0 → 16.0.1
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 +64 -64
- package/dist/amplitude.cjs.map +1 -1
- package/dist/amplitude.js +64 -64
- package/dist/amplitude.js.map +1 -1
- package/dist/factories.cjs +930 -347
- package/dist/factories.cjs.map +1 -1
- package/dist/factories.js +930 -347
- package/dist/factories.js.map +1 -1
- package/dist/index.cjs +930 -347
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +930 -347
- package/dist/index.js.map +1 -1
- package/dist/mixpanel.cjs +686 -130
- package/dist/mixpanel.cjs.map +1 -1
- package/dist/mixpanel.js +686 -130
- package/dist/mixpanel.js.map +1 -1
- package/dist/posthog.cjs +177 -150
- package/dist/posthog.cjs.map +1 -1
- package/dist/posthog.js +177 -150
- package/dist/posthog.js.map +1 -1
- package/package.json +13 -13
package/dist/index.js
CHANGED
|
@@ -86,11 +86,11 @@ function normalizeWindowsPath(path) {
|
|
|
86
86
|
return path.replace(/^[A-Z]:/, "").replace(/\\/g, "/");
|
|
87
87
|
}
|
|
88
88
|
var init_module_node = __esm({
|
|
89
|
-
"../../node_modules/.pnpm/posthog-node@5.
|
|
89
|
+
"../../node_modules/.pnpm/posthog-node@5.21.0/node_modules/posthog-node/dist/extensions/error-tracking/modifiers/module.node.mjs"() {
|
|
90
90
|
}
|
|
91
91
|
});
|
|
92
92
|
|
|
93
|
-
// ../../node_modules/.pnpm/@posthog+core@1.9.
|
|
93
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/featureFlagUtils.mjs
|
|
94
94
|
function getFlagDetailFromFlagAndPayload(key, value, payload) {
|
|
95
95
|
return {
|
|
96
96
|
key,
|
|
@@ -107,7 +107,7 @@ function getFlagDetailFromFlagAndPayload(key, value, payload) {
|
|
|
107
107
|
}
|
|
108
108
|
var normalizeFlagsResponse, getFlagValuesFromFlags, getPayloadsFromFlags, getFeatureFlagValue, parsePayload;
|
|
109
109
|
var init_featureFlagUtils = __esm({
|
|
110
|
-
"../../node_modules/.pnpm/@posthog+core@1.9.
|
|
110
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/featureFlagUtils.mjs"() {
|
|
111
111
|
normalizeFlagsResponse = (flagsResponse) => {
|
|
112
112
|
if ("flags" in flagsResponse) {
|
|
113
113
|
const featureFlags = getFlagValuesFromFlags(flagsResponse.flags);
|
|
@@ -165,10 +165,10 @@ var init_featureFlagUtils = __esm({
|
|
|
165
165
|
}
|
|
166
166
|
});
|
|
167
167
|
|
|
168
|
-
// ../../node_modules/.pnpm/@posthog+core@1.9.
|
|
168
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/vendor/uuidv7.mjs
|
|
169
169
|
var DIGITS, UUID, V7Generator, getDefaultRandom, defaultGenerator, uuidv7, uuidv7obj;
|
|
170
170
|
var init_uuidv7 = __esm({
|
|
171
|
-
"../../node_modules/.pnpm/@posthog+core@1.9.
|
|
171
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/vendor/uuidv7.mjs"() {
|
|
172
172
|
DIGITS = "0123456789abcdef";
|
|
173
173
|
UUID = class _UUID {
|
|
174
174
|
constructor(bytes) {
|
|
@@ -329,10 +329,10 @@ var init_uuidv7 = __esm({
|
|
|
329
329
|
}
|
|
330
330
|
});
|
|
331
331
|
|
|
332
|
-
// ../../node_modules/.pnpm/@posthog+core@1.9.
|
|
332
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/utils/bot-detection.mjs
|
|
333
333
|
var DEFAULT_BLOCKED_UA_STRS, isBlockedUA;
|
|
334
334
|
var init_bot_detection = __esm({
|
|
335
|
-
"../../node_modules/.pnpm/@posthog+core@1.9.
|
|
335
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/utils/bot-detection.mjs"() {
|
|
336
336
|
DEFAULT_BLOCKED_UA_STRS = [
|
|
337
337
|
"amazonbot",
|
|
338
338
|
"amazonproductbot",
|
|
@@ -423,10 +423,10 @@ var init_bot_detection = __esm({
|
|
|
423
423
|
}
|
|
424
424
|
});
|
|
425
425
|
|
|
426
|
-
// ../../node_modules/.pnpm/@posthog+core@1.9.
|
|
426
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/types.mjs
|
|
427
427
|
var types_PostHogPersistedProperty;
|
|
428
428
|
var init_types = __esm({
|
|
429
|
-
"../../node_modules/.pnpm/@posthog+core@1.9.
|
|
429
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/types.mjs"() {
|
|
430
430
|
types_PostHogPersistedProperty = /* @__PURE__ */ (function(PostHogPersistedProperty) {
|
|
431
431
|
PostHogPersistedProperty["AnonymousId"] = "anonymous_id";
|
|
432
432
|
PostHogPersistedProperty["DistinctId"] = "distinct_id";
|
|
@@ -458,20 +458,13 @@ var init_types = __esm({
|
|
|
458
458
|
}
|
|
459
459
|
});
|
|
460
460
|
|
|
461
|
-
// ../../node_modules/.pnpm/@posthog+core@1.9.
|
|
461
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/utils/string-utils.mjs
|
|
462
462
|
var init_string_utils = __esm({
|
|
463
|
-
"../../node_modules/.pnpm/@posthog+core@1.9.
|
|
463
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/utils/string-utils.mjs"() {
|
|
464
464
|
}
|
|
465
465
|
});
|
|
466
466
|
|
|
467
|
-
// ../../node_modules/.pnpm/@posthog+core@1.9.
|
|
468
|
-
function isInstanceOf(candidate, base) {
|
|
469
|
-
try {
|
|
470
|
-
return candidate instanceof base;
|
|
471
|
-
} catch {
|
|
472
|
-
return false;
|
|
473
|
-
}
|
|
474
|
-
}
|
|
467
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/utils/type-utils.mjs
|
|
475
468
|
function isPrimitive(value) {
|
|
476
469
|
return null === value || "object" != typeof value;
|
|
477
470
|
}
|
|
@@ -487,9 +480,16 @@ function isEvent(candidate) {
|
|
|
487
480
|
function isPlainObject(candidate) {
|
|
488
481
|
return isBuiltin(candidate, "Object");
|
|
489
482
|
}
|
|
490
|
-
|
|
483
|
+
function isInstanceOf(candidate, base) {
|
|
484
|
+
try {
|
|
485
|
+
return candidate instanceof base;
|
|
486
|
+
} catch {
|
|
487
|
+
return false;
|
|
488
|
+
}
|
|
489
|
+
}
|
|
490
|
+
var nativeIsArray, ObjProto, type_utils_toString, isArray, isObject, isUndefined, isString, isEmptyString, isNumber, isPlainError;
|
|
491
491
|
var init_type_utils = __esm({
|
|
492
|
-
"../../node_modules/.pnpm/@posthog+core@1.9.
|
|
492
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/utils/type-utils.mjs"() {
|
|
493
493
|
init_types();
|
|
494
494
|
init_string_utils();
|
|
495
495
|
nativeIsArray = Array.isArray;
|
|
@@ -499,6 +499,7 @@ var init_type_utils = __esm({
|
|
|
499
499
|
isArray = nativeIsArray || function(obj) {
|
|
500
500
|
return "[object Array]" === type_utils_toString.call(obj);
|
|
501
501
|
};
|
|
502
|
+
isObject = (x) => x === Object(x) && !isArray(x);
|
|
502
503
|
isUndefined = (x) => void 0 === x;
|
|
503
504
|
isString = (x) => "[object String]" == type_utils_toString.call(x);
|
|
504
505
|
isEmptyString = (x) => isString(x) && 0 === x.trim().length;
|
|
@@ -507,7 +508,7 @@ var init_type_utils = __esm({
|
|
|
507
508
|
}
|
|
508
509
|
});
|
|
509
510
|
|
|
510
|
-
// ../../node_modules/.pnpm/@posthog+core@1.9.
|
|
511
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/utils/number-utils.mjs
|
|
511
512
|
function clampToRange(value, min, max, logger, fallbackValue) {
|
|
512
513
|
if (min > max) {
|
|
513
514
|
logger.warn("min cannot be greater than max.");
|
|
@@ -525,15 +526,15 @@ function clampToRange(value, min, max, logger, fallbackValue) {
|
|
|
525
526
|
return clampToRange(max, min, max, logger);
|
|
526
527
|
}
|
|
527
528
|
var init_number_utils = __esm({
|
|
528
|
-
"../../node_modules/.pnpm/@posthog+core@1.9.
|
|
529
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/utils/number-utils.mjs"() {
|
|
529
530
|
init_type_utils();
|
|
530
531
|
}
|
|
531
532
|
});
|
|
532
533
|
|
|
533
|
-
// ../../node_modules/.pnpm/@posthog+core@1.9.
|
|
534
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/utils/bucketed-rate-limiter.mjs
|
|
534
535
|
var ONE_DAY_IN_MS, BucketedRateLimiter;
|
|
535
536
|
var init_bucketed_rate_limiter = __esm({
|
|
536
|
-
"../../node_modules/.pnpm/@posthog+core@1.9.
|
|
537
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/utils/bucketed-rate-limiter.mjs"() {
|
|
537
538
|
init_number_utils();
|
|
538
539
|
ONE_DAY_IN_MS = 864e5;
|
|
539
540
|
BucketedRateLimiter = class {
|
|
@@ -577,10 +578,10 @@ var init_bucketed_rate_limiter = __esm({
|
|
|
577
578
|
}
|
|
578
579
|
});
|
|
579
580
|
|
|
580
|
-
// ../../node_modules/.pnpm/@posthog+core@1.9.
|
|
581
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/utils/promise-queue.mjs
|
|
581
582
|
var PromiseQueue;
|
|
582
583
|
var init_promise_queue = __esm({
|
|
583
|
-
"../../node_modules/.pnpm/@posthog+core@1.9.
|
|
584
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/utils/promise-queue.mjs"() {
|
|
584
585
|
init_uuidv7();
|
|
585
586
|
PromiseQueue = class {
|
|
586
587
|
add(promise) {
|
|
@@ -611,7 +612,7 @@ var init_promise_queue = __esm({
|
|
|
611
612
|
}
|
|
612
613
|
});
|
|
613
614
|
|
|
614
|
-
// ../../node_modules/.pnpm/@posthog+core@1.9.
|
|
615
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/utils/logger.mjs
|
|
615
616
|
function createConsole(consoleLike = console) {
|
|
616
617
|
const lockedMethods = {
|
|
617
618
|
log: consoleLike.log.bind(consoleLike),
|
|
@@ -626,7 +627,7 @@ function createLogger(prefix, maybeCall = passThrough) {
|
|
|
626
627
|
}
|
|
627
628
|
var _createLogger, passThrough;
|
|
628
629
|
var init_logger = __esm({
|
|
629
|
-
"../../node_modules/.pnpm/@posthog+core@1.9.
|
|
630
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/utils/logger.mjs"() {
|
|
630
631
|
_createLogger = (prefix, maybeCall, consoleLike) => {
|
|
631
632
|
function _log(level, ...args) {
|
|
632
633
|
maybeCall(() => {
|
|
@@ -655,10 +656,10 @@ var init_logger = __esm({
|
|
|
655
656
|
}
|
|
656
657
|
});
|
|
657
658
|
|
|
658
|
-
// ../../node_modules/.pnpm/@posthog+core@1.9.
|
|
659
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/utils/user-agent-utils.mjs
|
|
659
660
|
var MOBILE, TABLET, GENERIC;
|
|
660
661
|
var init_user_agent_utils = __esm({
|
|
661
|
-
"../../node_modules/.pnpm/@posthog+core@1.9.
|
|
662
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/utils/user-agent-utils.mjs"() {
|
|
662
663
|
init_string_utils();
|
|
663
664
|
init_type_utils();
|
|
664
665
|
MOBILE = "Mobile";
|
|
@@ -669,7 +670,7 @@ var init_user_agent_utils = __esm({
|
|
|
669
670
|
}
|
|
670
671
|
});
|
|
671
672
|
|
|
672
|
-
// ../../node_modules/.pnpm/@posthog+core@1.9.
|
|
673
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/utils/index.mjs
|
|
673
674
|
function assert(truthyValue, message2) {
|
|
674
675
|
if (!truthyValue || "string" != typeof truthyValue || isEmpty(truthyValue)) throw new Error(message2);
|
|
675
676
|
}
|
|
@@ -713,7 +714,7 @@ function allSettled(promises) {
|
|
|
713
714
|
}
|
|
714
715
|
var STRING_FORMAT, isError;
|
|
715
716
|
var init_utils = __esm({
|
|
716
|
-
"../../node_modules/.pnpm/@posthog+core@1.9.
|
|
717
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/utils/index.mjs"() {
|
|
717
718
|
init_bot_detection();
|
|
718
719
|
init_bucketed_rate_limiter();
|
|
719
720
|
init_number_utils();
|
|
@@ -727,10 +728,10 @@ var init_utils = __esm({
|
|
|
727
728
|
}
|
|
728
729
|
});
|
|
729
730
|
|
|
730
|
-
// ../../node_modules/.pnpm/@posthog+core@1.9.
|
|
731
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/eventemitter.mjs
|
|
731
732
|
var SimpleEventEmitter;
|
|
732
733
|
var init_eventemitter = __esm({
|
|
733
|
-
"../../node_modules/.pnpm/@posthog+core@1.9.
|
|
734
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/eventemitter.mjs"() {
|
|
734
735
|
SimpleEventEmitter = class {
|
|
735
736
|
constructor() {
|
|
736
737
|
this.events = {};
|
|
@@ -751,7 +752,7 @@ var init_eventemitter = __esm({
|
|
|
751
752
|
}
|
|
752
753
|
});
|
|
753
754
|
|
|
754
|
-
// ../../node_modules/.pnpm/@posthog+core@1.9.
|
|
755
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/gzip.mjs
|
|
755
756
|
function isGzipSupported() {
|
|
756
757
|
return "CompressionStream" in globalThis;
|
|
757
758
|
}
|
|
@@ -770,11 +771,11 @@ async function gzipCompress(input, isDebug = true) {
|
|
|
770
771
|
}
|
|
771
772
|
}
|
|
772
773
|
var init_gzip = __esm({
|
|
773
|
-
"../../node_modules/.pnpm/@posthog+core@1.9.
|
|
774
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/gzip.mjs"() {
|
|
774
775
|
}
|
|
775
776
|
});
|
|
776
777
|
|
|
777
|
-
// ../../node_modules/.pnpm/@posthog+core@1.9.
|
|
778
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/posthog-core-stateless.mjs
|
|
778
779
|
async function logFlushError(err) {
|
|
779
780
|
if (err instanceof PostHogFetchHttpError) {
|
|
780
781
|
let text = "";
|
|
@@ -794,7 +795,7 @@ function isPostHogFetchContentTooLargeError(err) {
|
|
|
794
795
|
}
|
|
795
796
|
var PostHogFetchHttpError, PostHogFetchNetworkError, PostHogCoreStateless;
|
|
796
797
|
var init_posthog_core_stateless = __esm({
|
|
797
|
-
"../../node_modules/.pnpm/@posthog+core@1.9.
|
|
798
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/posthog-core-stateless.mjs"() {
|
|
798
799
|
init_eventemitter();
|
|
799
800
|
init_featureFlagUtils();
|
|
800
801
|
init_gzip();
|
|
@@ -1412,9 +1413,9 @@ var init_posthog_core_stateless = __esm({
|
|
|
1412
1413
|
}
|
|
1413
1414
|
});
|
|
1414
1415
|
|
|
1415
|
-
// ../../node_modules/.pnpm/@posthog+core@1.9.
|
|
1416
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/posthog-core.mjs
|
|
1416
1417
|
var init_posthog_core = __esm({
|
|
1417
|
-
"../../node_modules/.pnpm/@posthog+core@1.9.
|
|
1418
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/posthog-core.mjs"() {
|
|
1418
1419
|
init_featureFlagUtils();
|
|
1419
1420
|
init_types();
|
|
1420
1421
|
init_posthog_core_stateless();
|
|
@@ -1423,7 +1424,7 @@ var init_posthog_core = __esm({
|
|
|
1423
1424
|
}
|
|
1424
1425
|
});
|
|
1425
1426
|
|
|
1426
|
-
// ../../node_modules/.pnpm/@posthog+core@1.9.
|
|
1427
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/chunk-ids.mjs
|
|
1427
1428
|
function getFilenameToChunkIdMap(stackParser) {
|
|
1428
1429
|
const chunkIdMap = globalThis._posthogChunkIds;
|
|
1429
1430
|
if (!chunkIdMap) return;
|
|
@@ -1456,14 +1457,14 @@ function getFilenameToChunkIdMap(stackParser) {
|
|
|
1456
1457
|
}
|
|
1457
1458
|
var parsedStackResults, lastKeysCount, cachedFilenameChunkIds;
|
|
1458
1459
|
var init_chunk_ids = __esm({
|
|
1459
|
-
"../../node_modules/.pnpm/@posthog+core@1.9.
|
|
1460
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/chunk-ids.mjs"() {
|
|
1460
1461
|
}
|
|
1461
1462
|
});
|
|
1462
1463
|
|
|
1463
|
-
// ../../node_modules/.pnpm/@posthog+core@1.9.
|
|
1464
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/error-properties-builder.mjs
|
|
1464
1465
|
var MAX_CAUSE_RECURSION, ErrorPropertiesBuilder;
|
|
1465
1466
|
var init_error_properties_builder = __esm({
|
|
1466
|
-
"../../node_modules/.pnpm/@posthog+core@1.9.
|
|
1467
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/error-properties-builder.mjs"() {
|
|
1467
1468
|
init_utils();
|
|
1468
1469
|
init_chunk_ids();
|
|
1469
1470
|
MAX_CAUSE_RECURSION = 4;
|
|
@@ -1577,7 +1578,7 @@ var init_error_properties_builder = __esm({
|
|
|
1577
1578
|
}
|
|
1578
1579
|
});
|
|
1579
1580
|
|
|
1580
|
-
// ../../node_modules/.pnpm/@posthog+core@1.9.
|
|
1581
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/parsers/base.mjs
|
|
1581
1582
|
function createFrame(platform, filename, func, lineno, colno) {
|
|
1582
1583
|
const frame = {
|
|
1583
1584
|
platform,
|
|
@@ -1591,16 +1592,16 @@ function createFrame(platform, filename, func, lineno, colno) {
|
|
|
1591
1592
|
}
|
|
1592
1593
|
var UNKNOWN_FUNCTION;
|
|
1593
1594
|
var init_base = __esm({
|
|
1594
|
-
"../../node_modules/.pnpm/@posthog+core@1.9.
|
|
1595
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/parsers/base.mjs"() {
|
|
1595
1596
|
init_utils();
|
|
1596
1597
|
UNKNOWN_FUNCTION = "?";
|
|
1597
1598
|
}
|
|
1598
1599
|
});
|
|
1599
1600
|
|
|
1600
|
-
// ../../node_modules/.pnpm/@posthog+core@1.9.
|
|
1601
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/parsers/safari.mjs
|
|
1601
1602
|
var extractSafariExtensionDetails;
|
|
1602
1603
|
var init_safari = __esm({
|
|
1603
|
-
"../../node_modules/.pnpm/@posthog+core@1.9.
|
|
1604
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/parsers/safari.mjs"() {
|
|
1604
1605
|
init_base();
|
|
1605
1606
|
extractSafariExtensionDetails = (func, filename) => {
|
|
1606
1607
|
const isSafariExtension = -1 !== func.indexOf("safari-extension");
|
|
@@ -1616,10 +1617,10 @@ var init_safari = __esm({
|
|
|
1616
1617
|
}
|
|
1617
1618
|
});
|
|
1618
1619
|
|
|
1619
|
-
// ../../node_modules/.pnpm/@posthog+core@1.9.
|
|
1620
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/parsers/chrome.mjs
|
|
1620
1621
|
var chromeRegexNoFnName, chromeRegex, chromeEvalRegex, chromeStackLineParser;
|
|
1621
1622
|
var init_chrome = __esm({
|
|
1622
|
-
"../../node_modules/.pnpm/@posthog+core@1.9.
|
|
1623
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/parsers/chrome.mjs"() {
|
|
1623
1624
|
init_base();
|
|
1624
1625
|
init_safari();
|
|
1625
1626
|
chromeRegexNoFnName = /^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i;
|
|
@@ -1649,23 +1650,10 @@ var init_chrome = __esm({
|
|
|
1649
1650
|
}
|
|
1650
1651
|
});
|
|
1651
1652
|
|
|
1652
|
-
// ../../node_modules/.pnpm/@posthog+core@1.9.
|
|
1653
|
-
var winjsRegex, winjsStackLineParser;
|
|
1654
|
-
var init_winjs = __esm({
|
|
1655
|
-
"../../node_modules/.pnpm/@posthog+core@1.9.0/node_modules/@posthog/core/dist/error-tracking/parsers/winjs.mjs"() {
|
|
1656
|
-
init_base();
|
|
1657
|
-
winjsRegex = /^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i;
|
|
1658
|
-
winjsStackLineParser = (line, platform) => {
|
|
1659
|
-
const parts = winjsRegex.exec(line);
|
|
1660
|
-
return parts ? createFrame(platform, parts[2], parts[1] || UNKNOWN_FUNCTION, +parts[3], parts[4] ? +parts[4] : void 0) : void 0;
|
|
1661
|
-
};
|
|
1662
|
-
}
|
|
1663
|
-
});
|
|
1664
|
-
|
|
1665
|
-
// ../../node_modules/.pnpm/@posthog+core@1.9.0/node_modules/@posthog/core/dist/error-tracking/parsers/gecko.mjs
|
|
1653
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/parsers/gecko.mjs
|
|
1666
1654
|
var geckoREgex, geckoEvalRegex, geckoStackLineParser;
|
|
1667
1655
|
var init_gecko = __esm({
|
|
1668
|
-
"../../node_modules/.pnpm/@posthog+core@1.9.
|
|
1656
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/parsers/gecko.mjs"() {
|
|
1669
1657
|
init_base();
|
|
1670
1658
|
init_safari();
|
|
1671
1659
|
geckoREgex = /^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i;
|
|
@@ -1692,10 +1680,23 @@ var init_gecko = __esm({
|
|
|
1692
1680
|
}
|
|
1693
1681
|
});
|
|
1694
1682
|
|
|
1695
|
-
// ../../node_modules/.pnpm/@posthog+core@1.9.
|
|
1683
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/parsers/winjs.mjs
|
|
1684
|
+
var winjsRegex, winjsStackLineParser;
|
|
1685
|
+
var init_winjs = __esm({
|
|
1686
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/parsers/winjs.mjs"() {
|
|
1687
|
+
init_base();
|
|
1688
|
+
winjsRegex = /^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i;
|
|
1689
|
+
winjsStackLineParser = (line, platform) => {
|
|
1690
|
+
const parts = winjsRegex.exec(line);
|
|
1691
|
+
return parts ? createFrame(platform, parts[2], parts[1] || UNKNOWN_FUNCTION, +parts[3], parts[4] ? +parts[4] : void 0) : void 0;
|
|
1692
|
+
};
|
|
1693
|
+
}
|
|
1694
|
+
});
|
|
1695
|
+
|
|
1696
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/parsers/opera.mjs
|
|
1696
1697
|
var opera10Regex, opera10StackLineParser, opera11Regex, opera11StackLineParser;
|
|
1697
1698
|
var init_opera = __esm({
|
|
1698
|
-
"../../node_modules/.pnpm/@posthog+core@1.9.
|
|
1699
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/parsers/opera.mjs"() {
|
|
1699
1700
|
init_base();
|
|
1700
1701
|
opera10Regex = / line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i;
|
|
1701
1702
|
opera10StackLineParser = (line, platform) => {
|
|
@@ -1710,7 +1711,7 @@ var init_opera = __esm({
|
|
|
1710
1711
|
}
|
|
1711
1712
|
});
|
|
1712
1713
|
|
|
1713
|
-
// ../../node_modules/.pnpm/@posthog+core@1.9.
|
|
1714
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/parsers/node.mjs
|
|
1714
1715
|
function filenameIsInApp(filename, isNative = false) {
|
|
1715
1716
|
const isInternal = isNative || filename && !filename.startsWith("/") && !filename.match(/^[A-Z]:/) && !filename.startsWith(".") && !filename.match(/^[a-zA-Z]([a-zA-Z0-9.\-+])*:\/\//);
|
|
1716
1717
|
return !isInternal && void 0 !== filename && !filename.includes("node_modules/");
|
|
@@ -1720,7 +1721,7 @@ function _parseIntOrUndefined(input) {
|
|
|
1720
1721
|
}
|
|
1721
1722
|
var FILENAME_MATCH, FULL_MATCH, nodeStackLineParser;
|
|
1722
1723
|
var init_node = __esm({
|
|
1723
|
-
"../../node_modules/.pnpm/@posthog+core@1.9.
|
|
1724
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/parsers/node.mjs"() {
|
|
1724
1725
|
init_base();
|
|
1725
1726
|
FILENAME_MATCH = /^\s*[-]{4,}$/;
|
|
1726
1727
|
FULL_MATCH = /at (?:async )?(?:(.+?)\s+\()?(?:(.+):(\d+):(\d+)?|([^)]+))\)?/;
|
|
@@ -1781,7 +1782,7 @@ var init_node = __esm({
|
|
|
1781
1782
|
}
|
|
1782
1783
|
});
|
|
1783
1784
|
|
|
1784
|
-
// ../../node_modules/.pnpm/@posthog+core@1.9.
|
|
1785
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/parsers/index.mjs
|
|
1785
1786
|
function reverseAndStripFrames(stack) {
|
|
1786
1787
|
if (!stack.length) return [];
|
|
1787
1788
|
const localStack = Array.from(stack);
|
|
@@ -1795,6 +1796,9 @@ function reverseAndStripFrames(stack) {
|
|
|
1795
1796
|
function getLastStackFrame(arr) {
|
|
1796
1797
|
return arr[arr.length - 1] || {};
|
|
1797
1798
|
}
|
|
1799
|
+
function createDefaultStackParser() {
|
|
1800
|
+
return createStackParser("web:javascript", chromeStackLineParser, geckoStackLineParser);
|
|
1801
|
+
}
|
|
1798
1802
|
function createStackParser(platform, ...parsers) {
|
|
1799
1803
|
return (stack, skipFirstLines = 0) => {
|
|
1800
1804
|
const frames = [];
|
|
@@ -1819,11 +1823,11 @@ function createStackParser(platform, ...parsers) {
|
|
|
1819
1823
|
}
|
|
1820
1824
|
var WEBPACK_ERROR_REGEXP, STACKTRACE_FRAME_LIMIT;
|
|
1821
1825
|
var init_parsers = __esm({
|
|
1822
|
-
"../../node_modules/.pnpm/@posthog+core@1.9.
|
|
1826
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/parsers/index.mjs"() {
|
|
1823
1827
|
init_base();
|
|
1824
1828
|
init_chrome();
|
|
1825
|
-
init_winjs();
|
|
1826
1829
|
init_gecko();
|
|
1830
|
+
init_winjs();
|
|
1827
1831
|
init_opera();
|
|
1828
1832
|
init_node();
|
|
1829
1833
|
WEBPACK_ERROR_REGEXP = /\(error: (.*)\)/;
|
|
@@ -1831,10 +1835,10 @@ var init_parsers = __esm({
|
|
|
1831
1835
|
}
|
|
1832
1836
|
});
|
|
1833
1837
|
|
|
1834
|
-
// ../../node_modules/.pnpm/@posthog+core@1.9.
|
|
1838
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/coercers/dom-exception-coercer.mjs
|
|
1835
1839
|
var DOMExceptionCoercer;
|
|
1836
1840
|
var init_dom_exception_coercer = __esm({
|
|
1837
|
-
"../../node_modules/.pnpm/@posthog+core@1.9.
|
|
1841
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/coercers/dom-exception-coercer.mjs"() {
|
|
1838
1842
|
init_utils();
|
|
1839
1843
|
DOMExceptionCoercer = class {
|
|
1840
1844
|
match(err) {
|
|
@@ -1868,10 +1872,10 @@ var init_dom_exception_coercer = __esm({
|
|
|
1868
1872
|
}
|
|
1869
1873
|
});
|
|
1870
1874
|
|
|
1871
|
-
// ../../node_modules/.pnpm/@posthog+core@1.9.
|
|
1875
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/coercers/error-coercer.mjs
|
|
1872
1876
|
var ErrorCoercer;
|
|
1873
1877
|
var init_error_coercer = __esm({
|
|
1874
|
-
"../../node_modules/.pnpm/@posthog+core@1.9.
|
|
1878
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/coercers/error-coercer.mjs"() {
|
|
1875
1879
|
init_utils();
|
|
1876
1880
|
ErrorCoercer = class {
|
|
1877
1881
|
match(err) {
|
|
@@ -1901,10 +1905,10 @@ var init_error_coercer = __esm({
|
|
|
1901
1905
|
}
|
|
1902
1906
|
});
|
|
1903
1907
|
|
|
1904
|
-
// ../../node_modules/.pnpm/@posthog+core@1.9.
|
|
1908
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/coercers/error-event-coercer.mjs
|
|
1905
1909
|
var ErrorEventCoercer;
|
|
1906
1910
|
var init_error_event_coercer = __esm({
|
|
1907
|
-
"../../node_modules/.pnpm/@posthog+core@1.9.
|
|
1911
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/coercers/error-event-coercer.mjs"() {
|
|
1908
1912
|
init_utils();
|
|
1909
1913
|
ErrorEventCoercer = class {
|
|
1910
1914
|
constructor() {
|
|
@@ -1926,10 +1930,10 @@ var init_error_event_coercer = __esm({
|
|
|
1926
1930
|
}
|
|
1927
1931
|
});
|
|
1928
1932
|
|
|
1929
|
-
// ../../node_modules/.pnpm/@posthog+core@1.9.
|
|
1933
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/coercers/string-coercer.mjs
|
|
1930
1934
|
var ERROR_TYPES_PATTERN, StringCoercer;
|
|
1931
1935
|
var init_string_coercer = __esm({
|
|
1932
|
-
"../../node_modules/.pnpm/@posthog+core@1.9.
|
|
1936
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/coercers/string-coercer.mjs"() {
|
|
1933
1937
|
ERROR_TYPES_PATTERN = /^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;
|
|
1934
1938
|
StringCoercer = class {
|
|
1935
1939
|
match(input) {
|
|
@@ -1961,10 +1965,10 @@ var init_string_coercer = __esm({
|
|
|
1961
1965
|
}
|
|
1962
1966
|
});
|
|
1963
1967
|
|
|
1964
|
-
// ../../node_modules/.pnpm/@posthog+core@1.9.
|
|
1968
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/types.mjs
|
|
1965
1969
|
var severityLevels;
|
|
1966
1970
|
var init_types2 = __esm({
|
|
1967
|
-
"../../node_modules/.pnpm/@posthog+core@1.9.
|
|
1971
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/types.mjs"() {
|
|
1968
1972
|
severityLevels = [
|
|
1969
1973
|
"fatal",
|
|
1970
1974
|
"error",
|
|
@@ -1976,7 +1980,7 @@ var init_types2 = __esm({
|
|
|
1976
1980
|
}
|
|
1977
1981
|
});
|
|
1978
1982
|
|
|
1979
|
-
// ../../node_modules/.pnpm/@posthog+core@1.9.
|
|
1983
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/coercers/utils.mjs
|
|
1980
1984
|
function extractExceptionKeysForMessage(err, maxLength = 40) {
|
|
1981
1985
|
const keys = Object.keys(err);
|
|
1982
1986
|
keys.sort();
|
|
@@ -1991,14 +1995,14 @@ function extractExceptionKeysForMessage(err, maxLength = 40) {
|
|
|
1991
1995
|
return "";
|
|
1992
1996
|
}
|
|
1993
1997
|
var init_utils2 = __esm({
|
|
1994
|
-
"../../node_modules/.pnpm/@posthog+core@1.9.
|
|
1998
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/coercers/utils.mjs"() {
|
|
1995
1999
|
}
|
|
1996
2000
|
});
|
|
1997
2001
|
|
|
1998
|
-
// ../../node_modules/.pnpm/@posthog+core@1.9.
|
|
2002
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/coercers/object-coercer.mjs
|
|
1999
2003
|
var ObjectCoercer;
|
|
2000
2004
|
var init_object_coercer = __esm({
|
|
2001
|
-
"../../node_modules/.pnpm/@posthog+core@1.9.
|
|
2005
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/coercers/object-coercer.mjs"() {
|
|
2002
2006
|
init_utils();
|
|
2003
2007
|
init_types2();
|
|
2004
2008
|
init_utils2();
|
|
@@ -2052,10 +2056,10 @@ var init_object_coercer = __esm({
|
|
|
2052
2056
|
}
|
|
2053
2057
|
});
|
|
2054
2058
|
|
|
2055
|
-
// ../../node_modules/.pnpm/@posthog+core@1.9.
|
|
2059
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/coercers/event-coercer.mjs
|
|
2056
2060
|
var EventCoercer;
|
|
2057
2061
|
var init_event_coercer = __esm({
|
|
2058
|
-
"../../node_modules/.pnpm/@posthog+core@1.9.
|
|
2062
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/coercers/event-coercer.mjs"() {
|
|
2059
2063
|
init_utils();
|
|
2060
2064
|
init_utils2();
|
|
2061
2065
|
EventCoercer = class {
|
|
@@ -2075,10 +2079,10 @@ var init_event_coercer = __esm({
|
|
|
2075
2079
|
}
|
|
2076
2080
|
});
|
|
2077
2081
|
|
|
2078
|
-
// ../../node_modules/.pnpm/@posthog+core@1.9.
|
|
2082
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/coercers/primitive-coercer.mjs
|
|
2079
2083
|
var PrimitiveCoercer;
|
|
2080
2084
|
var init_primitive_coercer = __esm({
|
|
2081
|
-
"../../node_modules/.pnpm/@posthog+core@1.9.
|
|
2085
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/coercers/primitive-coercer.mjs"() {
|
|
2082
2086
|
init_utils();
|
|
2083
2087
|
PrimitiveCoercer = class {
|
|
2084
2088
|
match(candidate) {
|
|
@@ -2096,10 +2100,10 @@ var init_primitive_coercer = __esm({
|
|
|
2096
2100
|
}
|
|
2097
2101
|
});
|
|
2098
2102
|
|
|
2099
|
-
// ../../node_modules/.pnpm/@posthog+core@1.9.
|
|
2103
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/coercers/promise-rejection-event.mjs
|
|
2100
2104
|
var PromiseRejectionEventCoercer;
|
|
2101
2105
|
var init_promise_rejection_event = __esm({
|
|
2102
|
-
"../../node_modules/.pnpm/@posthog+core@1.9.
|
|
2106
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/coercers/promise-rejection-event.mjs"() {
|
|
2103
2107
|
init_utils();
|
|
2104
2108
|
PromiseRejectionEventCoercer = class {
|
|
2105
2109
|
match(err) {
|
|
@@ -2128,9 +2132,9 @@ var init_promise_rejection_event = __esm({
|
|
|
2128
2132
|
}
|
|
2129
2133
|
});
|
|
2130
2134
|
|
|
2131
|
-
// ../../node_modules/.pnpm/@posthog+core@1.9.
|
|
2135
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/coercers/index.mjs
|
|
2132
2136
|
var init_coercers = __esm({
|
|
2133
|
-
"../../node_modules/.pnpm/@posthog+core@1.9.
|
|
2137
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/coercers/index.mjs"() {
|
|
2134
2138
|
init_dom_exception_coercer();
|
|
2135
2139
|
init_error_coercer();
|
|
2136
2140
|
init_error_event_coercer();
|
|
@@ -2142,10 +2146,10 @@ var init_coercers = __esm({
|
|
|
2142
2146
|
}
|
|
2143
2147
|
});
|
|
2144
2148
|
|
|
2145
|
-
// ../../node_modules/.pnpm/@posthog+core@1.9.
|
|
2149
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/utils.mjs
|
|
2146
2150
|
var ReduceableCache;
|
|
2147
2151
|
var init_utils3 = __esm({
|
|
2148
|
-
"../../node_modules/.pnpm/@posthog+core@1.9.
|
|
2152
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/utils.mjs"() {
|
|
2149
2153
|
ReduceableCache = class {
|
|
2150
2154
|
constructor(_maxSize) {
|
|
2151
2155
|
this._maxSize = _maxSize;
|
|
@@ -2171,7 +2175,7 @@ var init_utils3 = __esm({
|
|
|
2171
2175
|
}
|
|
2172
2176
|
});
|
|
2173
2177
|
|
|
2174
|
-
// ../../node_modules/.pnpm/@posthog+core@1.9.
|
|
2178
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/index.mjs
|
|
2175
2179
|
var error_tracking_exports = {};
|
|
2176
2180
|
__export(error_tracking_exports, {
|
|
2177
2181
|
DOMExceptionCoercer: () => DOMExceptionCoercer,
|
|
@@ -2185,6 +2189,7 @@ __export(error_tracking_exports, {
|
|
|
2185
2189
|
ReduceableCache: () => ReduceableCache,
|
|
2186
2190
|
StringCoercer: () => StringCoercer,
|
|
2187
2191
|
chromeStackLineParser: () => chromeStackLineParser,
|
|
2192
|
+
createDefaultStackParser: () => createDefaultStackParser,
|
|
2188
2193
|
createStackParser: () => createStackParser,
|
|
2189
2194
|
geckoStackLineParser: () => geckoStackLineParser,
|
|
2190
2195
|
nodeStackLineParser: () => nodeStackLineParser,
|
|
@@ -2194,7 +2199,7 @@ __export(error_tracking_exports, {
|
|
|
2194
2199
|
winjsStackLineParser: () => winjsStackLineParser
|
|
2195
2200
|
});
|
|
2196
2201
|
var init_error_tracking = __esm({
|
|
2197
|
-
"../../node_modules/.pnpm/@posthog+core@1.9.
|
|
2202
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/index.mjs"() {
|
|
2198
2203
|
init_error_properties_builder();
|
|
2199
2204
|
init_parsers();
|
|
2200
2205
|
init_coercers();
|
|
@@ -2202,9 +2207,9 @@ var init_error_tracking = __esm({
|
|
|
2202
2207
|
}
|
|
2203
2208
|
});
|
|
2204
2209
|
|
|
2205
|
-
// ../../node_modules/.pnpm/@posthog+core@1.9.
|
|
2210
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/index.mjs
|
|
2206
2211
|
var init_dist = __esm({
|
|
2207
|
-
"../../node_modules/.pnpm/@posthog+core@1.9.
|
|
2212
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/index.mjs"() {
|
|
2208
2213
|
init_featureFlagUtils();
|
|
2209
2214
|
init_uuidv7();
|
|
2210
2215
|
init_utils();
|
|
@@ -2395,7 +2400,7 @@ function snipLine(line, colno) {
|
|
|
2395
2400
|
}
|
|
2396
2401
|
var LRU_FILE_CONTENTS_CACHE, LRU_FILE_CONTENTS_FS_READ_FAILED, DEFAULT_LINES_OF_CONTEXT, MAX_CONTEXTLINES_COLNO, MAX_CONTEXTLINES_LINENO;
|
|
2397
2402
|
var init_context_lines_node = __esm({
|
|
2398
|
-
"../../node_modules/.pnpm/posthog-node@5.
|
|
2403
|
+
"../../node_modules/.pnpm/posthog-node@5.21.0/node_modules/posthog-node/dist/extensions/error-tracking/modifiers/context-lines.node.mjs"() {
|
|
2399
2404
|
init_dist();
|
|
2400
2405
|
LRU_FILE_CONTENTS_CACHE = new error_tracking_exports.ReduceableCache(25);
|
|
2401
2406
|
LRU_FILE_CONTENTS_FS_READ_FAILED = new error_tracking_exports.ReduceableCache(20);
|
|
@@ -2405,7 +2410,7 @@ var init_context_lines_node = __esm({
|
|
|
2405
2410
|
}
|
|
2406
2411
|
});
|
|
2407
2412
|
|
|
2408
|
-
// ../../node_modules/.pnpm/posthog-node@5.
|
|
2413
|
+
// ../../node_modules/.pnpm/posthog-node@5.21.0/node_modules/posthog-node/dist/extensions/error-tracking/autocapture.mjs
|
|
2409
2414
|
function makeUncaughtExceptionHandler(captureFn, onFatalFn) {
|
|
2410
2415
|
let calledFatalError = false;
|
|
2411
2416
|
return Object.assign((error) => {
|
|
@@ -2437,14 +2442,14 @@ function addUnhandledRejectionListener(captureFn) {
|
|
|
2437
2442
|
}));
|
|
2438
2443
|
}
|
|
2439
2444
|
var init_autocapture = __esm({
|
|
2440
|
-
"../../node_modules/.pnpm/posthog-node@5.
|
|
2445
|
+
"../../node_modules/.pnpm/posthog-node@5.21.0/node_modules/posthog-node/dist/extensions/error-tracking/autocapture.mjs"() {
|
|
2441
2446
|
}
|
|
2442
2447
|
});
|
|
2443
2448
|
|
|
2444
|
-
// ../../node_modules/.pnpm/posthog-node@5.
|
|
2449
|
+
// ../../node_modules/.pnpm/posthog-node@5.21.0/node_modules/posthog-node/dist/extensions/error-tracking/index.mjs
|
|
2445
2450
|
var SHUTDOWN_TIMEOUT, ErrorTracking;
|
|
2446
2451
|
var init_error_tracking2 = __esm({
|
|
2447
|
-
"../../node_modules/.pnpm/posthog-node@5.
|
|
2452
|
+
"../../node_modules/.pnpm/posthog-node@5.21.0/node_modules/posthog-node/dist/extensions/error-tracking/index.mjs"() {
|
|
2448
2453
|
init_autocapture();
|
|
2449
2454
|
init_dist();
|
|
2450
2455
|
SHUTDOWN_TIMEOUT = 2e3;
|
|
@@ -2461,6 +2466,9 @@ var init_error_tracking2 = __esm({
|
|
|
2461
2466
|
});
|
|
2462
2467
|
this.startAutocaptureIfEnabled();
|
|
2463
2468
|
}
|
|
2469
|
+
static isPreviouslyCapturedError(x) {
|
|
2470
|
+
return isObject(x) && "__posthog_previously_captured_error" in x && true === x.__posthog_previously_captured_error;
|
|
2471
|
+
}
|
|
2464
2472
|
static async buildEventMessage(error, hint, distinctId, additionalProperties) {
|
|
2465
2473
|
const properties = {
|
|
2466
2474
|
...additionalProperties
|
|
@@ -2485,14 +2493,16 @@ var init_error_tracking2 = __esm({
|
|
|
2485
2493
|
}
|
|
2486
2494
|
onException(exception, hint) {
|
|
2487
2495
|
this.client.addPendingPromise((async () => {
|
|
2488
|
-
|
|
2489
|
-
|
|
2490
|
-
|
|
2491
|
-
|
|
2492
|
-
|
|
2493
|
-
exception
|
|
2494
|
-
|
|
2495
|
-
|
|
2496
|
+
if (!_ErrorTracking.isPreviouslyCapturedError(exception)) {
|
|
2497
|
+
const eventMessage = await _ErrorTracking.buildEventMessage(exception, hint);
|
|
2498
|
+
const exceptionProperties = eventMessage.properties;
|
|
2499
|
+
const exceptionType = exceptionProperties?.$exception_list[0]?.type ?? "Exception";
|
|
2500
|
+
const isRateLimited = this._rateLimiter.consumeRateLimit(exceptionType);
|
|
2501
|
+
if (isRateLimited) return void this._logger.info("Skipping exception capture because of client rate limiting.", {
|
|
2502
|
+
exception: exceptionType
|
|
2503
|
+
});
|
|
2504
|
+
return this.client.capture(eventMessage);
|
|
2505
|
+
}
|
|
2496
2506
|
})());
|
|
2497
2507
|
}
|
|
2498
2508
|
async onFatalError(exception) {
|
|
@@ -2510,18 +2520,18 @@ var init_error_tracking2 = __esm({
|
|
|
2510
2520
|
}
|
|
2511
2521
|
});
|
|
2512
2522
|
|
|
2513
|
-
// ../../node_modules/.pnpm/posthog-node@5.
|
|
2523
|
+
// ../../node_modules/.pnpm/posthog-node@5.21.0/node_modules/posthog-node/dist/version.mjs
|
|
2514
2524
|
var version;
|
|
2515
2525
|
var init_version = __esm({
|
|
2516
|
-
"../../node_modules/.pnpm/posthog-node@5.
|
|
2517
|
-
version = "5.
|
|
2526
|
+
"../../node_modules/.pnpm/posthog-node@5.21.0/node_modules/posthog-node/dist/version.mjs"() {
|
|
2527
|
+
version = "5.21.0";
|
|
2518
2528
|
}
|
|
2519
2529
|
});
|
|
2520
2530
|
|
|
2521
|
-
// ../../node_modules/.pnpm/posthog-node@5.
|
|
2531
|
+
// ../../node_modules/.pnpm/posthog-node@5.21.0/node_modules/posthog-node/dist/types.mjs
|
|
2522
2532
|
var FeatureFlagError;
|
|
2523
2533
|
var init_types3 = __esm({
|
|
2524
|
-
"../../node_modules/.pnpm/posthog-node@5.
|
|
2534
|
+
"../../node_modules/.pnpm/posthog-node@5.21.0/node_modules/posthog-node/dist/types.mjs"() {
|
|
2525
2535
|
FeatureFlagError = {
|
|
2526
2536
|
ERRORS_WHILE_COMPUTING: "errors_while_computing_flags",
|
|
2527
2537
|
FLAG_MISSING: "flag_missing",
|
|
@@ -2531,7 +2541,7 @@ var init_types3 = __esm({
|
|
|
2531
2541
|
}
|
|
2532
2542
|
});
|
|
2533
2543
|
|
|
2534
|
-
// ../../node_modules/.pnpm/posthog-node@5.
|
|
2544
|
+
// ../../node_modules/.pnpm/posthog-node@5.21.0/node_modules/posthog-node/dist/extensions/feature-flags/crypto.mjs
|
|
2535
2545
|
async function hashSHA1(text) {
|
|
2536
2546
|
const subtle = globalThis.crypto?.subtle;
|
|
2537
2547
|
if (!subtle) throw new Error("SubtleCrypto API not available");
|
|
@@ -2540,11 +2550,11 @@ async function hashSHA1(text) {
|
|
|
2540
2550
|
return hashArray.map((byte) => byte.toString(16).padStart(2, "0")).join("");
|
|
2541
2551
|
}
|
|
2542
2552
|
var init_crypto = __esm({
|
|
2543
|
-
"../../node_modules/.pnpm/posthog-node@5.
|
|
2553
|
+
"../../node_modules/.pnpm/posthog-node@5.21.0/node_modules/posthog-node/dist/extensions/feature-flags/crypto.mjs"() {
|
|
2544
2554
|
}
|
|
2545
2555
|
});
|
|
2546
2556
|
|
|
2547
|
-
// ../../node_modules/.pnpm/posthog-node@5.
|
|
2557
|
+
// ../../node_modules/.pnpm/posthog-node@5.21.0/node_modules/posthog-node/dist/extensions/feature-flags/feature-flags.mjs
|
|
2548
2558
|
async function _hash(key, distinctId, salt = "") {
|
|
2549
2559
|
const hashString = await hashSHA1(`${key}.${distinctId}${salt}`);
|
|
2550
2560
|
return parseInt(hashString.slice(0, 15), 16) / LONG_SCALE;
|
|
@@ -2712,7 +2722,7 @@ function relativeDateParseForFeatureFlagMatching(value) {
|
|
|
2712
2722
|
}
|
|
2713
2723
|
var SIXTY_SECONDS, LONG_SCALE, NULL_VALUES_ALLOWED_OPERATORS, ClientError, InconclusiveMatchError, RequiresServerEvaluation, FeatureFlagsPoller;
|
|
2714
2724
|
var init_feature_flags = __esm({
|
|
2715
|
-
"../../node_modules/.pnpm/posthog-node@5.
|
|
2725
|
+
"../../node_modules/.pnpm/posthog-node@5.21.0/node_modules/posthog-node/dist/extensions/feature-flags/feature-flags.mjs"() {
|
|
2716
2726
|
init_dist();
|
|
2717
2727
|
init_crypto();
|
|
2718
2728
|
SIXTY_SECONDS = 6e4;
|
|
@@ -2766,6 +2776,7 @@ var init_feature_flags = __esm({
|
|
|
2766
2776
|
this.customHeaders = customHeaders;
|
|
2767
2777
|
this.onLoad = options.onLoad;
|
|
2768
2778
|
this.cacheProvider = options.cacheProvider;
|
|
2779
|
+
this.strictLocalEvaluation = options.strictLocalEvaluation ?? false;
|
|
2769
2780
|
this.loadFeatureFlags();
|
|
2770
2781
|
}
|
|
2771
2782
|
debug(enabled = true) {
|
|
@@ -2961,6 +2972,11 @@ var init_feature_flags = __esm({
|
|
|
2961
2972
|
this.cohorts = flagData.cohorts;
|
|
2962
2973
|
this.loadedSuccessfullyOnce = true;
|
|
2963
2974
|
}
|
|
2975
|
+
warnAboutExperienceContinuityFlags(flags) {
|
|
2976
|
+
if (this.strictLocalEvaluation) return;
|
|
2977
|
+
const experienceContinuityFlags = flags.filter((f) => f.ensure_experience_continuity);
|
|
2978
|
+
if (experienceContinuityFlags.length > 0) console.warn(`[PostHog] You are using local evaluation but ${experienceContinuityFlags.length} flag(s) have experience continuity enabled: ${experienceContinuityFlags.map((f) => f.key).join(", ")}. Experience continuity is incompatible with local evaluation and will cause a server request on every flag evaluation, negating local evaluation cost savings. To avoid server requests and unexpected costs, either disable experience continuity on these flags in PostHog, use strictLocalEvaluation: true in client init, or pass onlyEvaluateLocally: true per flag call (flags that cannot be evaluated locally will return undefined).`);
|
|
2979
|
+
}
|
|
2964
2980
|
async loadFromCache(debugMessage) {
|
|
2965
2981
|
if (!this.cacheProvider) return false;
|
|
2966
2982
|
try {
|
|
@@ -2969,6 +2985,7 @@ var init_feature_flags = __esm({
|
|
|
2969
2985
|
this.updateFlagState(cached);
|
|
2970
2986
|
this.logMsgIfDebug(() => console.debug(`[FEATURE FLAGS] ${debugMessage} (${cached.flags.length} flags)`));
|
|
2971
2987
|
this.onLoad?.(this.featureFlags.length);
|
|
2988
|
+
this.warnAboutExperienceContinuityFlags(cached.flags);
|
|
2972
2989
|
return true;
|
|
2973
2990
|
}
|
|
2974
2991
|
return false;
|
|
@@ -3062,6 +3079,7 @@ var init_feature_flags = __esm({
|
|
|
3062
3079
|
this.onError?.(new Error(`Failed to store in cache: ${err}`));
|
|
3063
3080
|
}
|
|
3064
3081
|
this.onLoad?.(this.featureFlags.length);
|
|
3082
|
+
this.warnAboutExperienceContinuityFlags(flagData.flags);
|
|
3065
3083
|
break;
|
|
3066
3084
|
}
|
|
3067
3085
|
default:
|
|
@@ -3117,10 +3135,10 @@ var init_feature_flags = __esm({
|
|
|
3117
3135
|
}
|
|
3118
3136
|
});
|
|
3119
3137
|
|
|
3120
|
-
// ../../node_modules/.pnpm/posthog-node@5.
|
|
3138
|
+
// ../../node_modules/.pnpm/posthog-node@5.21.0/node_modules/posthog-node/dist/storage-memory.mjs
|
|
3121
3139
|
var PostHogMemoryStorage;
|
|
3122
3140
|
var init_storage_memory = __esm({
|
|
3123
|
-
"../../node_modules/.pnpm/posthog-node@5.
|
|
3141
|
+
"../../node_modules/.pnpm/posthog-node@5.21.0/node_modules/posthog-node/dist/storage-memory.mjs"() {
|
|
3124
3142
|
PostHogMemoryStorage = class {
|
|
3125
3143
|
getProperty(key) {
|
|
3126
3144
|
return this._memoryStorage[key];
|
|
@@ -3135,10 +3153,10 @@ var init_storage_memory = __esm({
|
|
|
3135
3153
|
}
|
|
3136
3154
|
});
|
|
3137
3155
|
|
|
3138
|
-
// ../../node_modules/.pnpm/posthog-node@5.
|
|
3156
|
+
// ../../node_modules/.pnpm/posthog-node@5.21.0/node_modules/posthog-node/dist/client.mjs
|
|
3139
3157
|
var MINIMUM_POLLING_INTERVAL, THIRTY_SECONDS, MAX_CACHE_SIZE, PostHogBackendClient;
|
|
3140
3158
|
var init_client = __esm({
|
|
3141
|
-
"../../node_modules/.pnpm/posthog-node@5.
|
|
3159
|
+
"../../node_modules/.pnpm/posthog-node@5.21.0/node_modules/posthog-node/dist/client.mjs"() {
|
|
3142
3160
|
init_version();
|
|
3143
3161
|
init_dist();
|
|
3144
3162
|
init_types3();
|
|
@@ -3171,7 +3189,8 @@ var init_client = __esm({
|
|
|
3171
3189
|
this._events.emit("localEvaluationFlagsLoaded", count);
|
|
3172
3190
|
},
|
|
3173
3191
|
customHeaders: this.getCustomHeaders(),
|
|
3174
|
-
cacheProvider: options.flagDefinitionCacheProvider
|
|
3192
|
+
cacheProvider: options.flagDefinitionCacheProvider,
|
|
3193
|
+
strictLocalEvaluation: options.strictLocalEvaluation
|
|
3175
3194
|
});
|
|
3176
3195
|
}
|
|
3177
3196
|
this.errorTracking = new ErrorTracking(this, options, this._logger);
|
|
@@ -3284,7 +3303,7 @@ var init_client = __esm({
|
|
|
3284
3303
|
const adjustedProperties = this.addLocalPersonAndGroupProperties(distinctId, groups, personProperties, groupProperties);
|
|
3285
3304
|
personProperties = adjustedProperties.allPersonProperties;
|
|
3286
3305
|
groupProperties = adjustedProperties.allGroupProperties;
|
|
3287
|
-
if (void 0 == onlyEvaluateLocally) onlyEvaluateLocally = false;
|
|
3306
|
+
if (void 0 == onlyEvaluateLocally) onlyEvaluateLocally = this.options.strictLocalEvaluation ?? false;
|
|
3288
3307
|
if (void 0 == sendFeatureFlagEvents) sendFeatureFlagEvents = this.options.sendFeatureFlagEvent ?? true;
|
|
3289
3308
|
let response = await this.featureFlagsPoller?.getFeatureFlag(key, distinctId, groups, personProperties, groupProperties);
|
|
3290
3309
|
const flagWasLocallyEvaluated = void 0 !== response;
|
|
@@ -3361,7 +3380,7 @@ var init_client = __esm({
|
|
|
3361
3380
|
else throw e;
|
|
3362
3381
|
}
|
|
3363
3382
|
}
|
|
3364
|
-
if (void 0 == onlyEvaluateLocally) onlyEvaluateLocally = false;
|
|
3383
|
+
if (void 0 == onlyEvaluateLocally) onlyEvaluateLocally = this.options.strictLocalEvaluation ?? false;
|
|
3365
3384
|
const payloadWasLocallyEvaluated = void 0 !== response;
|
|
3366
3385
|
if (!payloadWasLocallyEvaluated && !onlyEvaluateLocally) response = await super.getFeatureFlagPayloadStateless(key, distinctId, groups, personProperties, groupProperties, disableGeoip);
|
|
3367
3386
|
return response;
|
|
@@ -3392,7 +3411,7 @@ var init_client = __esm({
|
|
|
3392
3411
|
const adjustedProperties = this.addLocalPersonAndGroupProperties(distinctId, groups, personProperties, groupProperties);
|
|
3393
3412
|
personProperties = adjustedProperties.allPersonProperties;
|
|
3394
3413
|
groupProperties = adjustedProperties.allGroupProperties;
|
|
3395
|
-
if (void 0 == onlyEvaluateLocally) onlyEvaluateLocally = false;
|
|
3414
|
+
if (void 0 == onlyEvaluateLocally) onlyEvaluateLocally = this.options.strictLocalEvaluation ?? false;
|
|
3396
3415
|
const localEvaluationResult = await this.featureFlagsPoller?.getAllFlagsAndPayloads(distinctId, groups, personProperties, groupProperties, flagKeys);
|
|
3397
3416
|
let featureFlags = {};
|
|
3398
3417
|
let featureFlagPayloads = {};
|
|
@@ -3542,7 +3561,7 @@ var init_client = __esm({
|
|
|
3542
3561
|
const finalPersonProperties = sendFeatureFlagsOptions?.personProperties || {};
|
|
3543
3562
|
const finalGroupProperties = sendFeatureFlagsOptions?.groupProperties || {};
|
|
3544
3563
|
const flagKeys = sendFeatureFlagsOptions?.flagKeys;
|
|
3545
|
-
const onlyEvaluateLocally = sendFeatureFlagsOptions?.onlyEvaluateLocally ?? false;
|
|
3564
|
+
const onlyEvaluateLocally = sendFeatureFlagsOptions?.onlyEvaluateLocally ?? this.options.strictLocalEvaluation ?? false;
|
|
3546
3565
|
if (onlyEvaluateLocally) if (!((this.featureFlagsPoller?.featureFlags?.length || 0) > 0)) return {};
|
|
3547
3566
|
else {
|
|
3548
3567
|
const groupsWithStringValues = {};
|
|
@@ -3585,17 +3604,24 @@ var init_client = __esm({
|
|
|
3585
3604
|
allGroupProperties
|
|
3586
3605
|
};
|
|
3587
3606
|
}
|
|
3588
|
-
captureException(error, distinctId, additionalProperties) {
|
|
3589
|
-
|
|
3590
|
-
|
|
3591
|
-
|
|
3592
|
-
|
|
3607
|
+
captureException(error, distinctId, additionalProperties, uuid) {
|
|
3608
|
+
if (!ErrorTracking.isPreviouslyCapturedError(error)) {
|
|
3609
|
+
const syntheticException = new Error("PostHog syntheticException");
|
|
3610
|
+
this.addPendingPromise(ErrorTracking.buildEventMessage(error, {
|
|
3611
|
+
syntheticException
|
|
3612
|
+
}, distinctId, additionalProperties).then((msg) => this.capture({
|
|
3613
|
+
...msg,
|
|
3614
|
+
uuid
|
|
3615
|
+
})));
|
|
3616
|
+
}
|
|
3593
3617
|
}
|
|
3594
3618
|
async captureExceptionImmediate(error, distinctId, additionalProperties) {
|
|
3595
|
-
|
|
3596
|
-
|
|
3597
|
-
|
|
3598
|
-
|
|
3619
|
+
if (!ErrorTracking.isPreviouslyCapturedError(error)) {
|
|
3620
|
+
const syntheticException = new Error("PostHog syntheticException");
|
|
3621
|
+
this.addPendingPromise(ErrorTracking.buildEventMessage(error, {
|
|
3622
|
+
syntheticException
|
|
3623
|
+
}, distinctId, additionalProperties).then((msg) => this.captureImmediate(msg)));
|
|
3624
|
+
}
|
|
3599
3625
|
}
|
|
3600
3626
|
async prepareEventMessage(props) {
|
|
3601
3627
|
const { distinctId, event, properties, groups, sendFeatureFlags, timestamp, disableGeoip, uuid } = props;
|
|
@@ -3684,7 +3710,7 @@ var init_client = __esm({
|
|
|
3684
3710
|
});
|
|
3685
3711
|
var PostHogContext;
|
|
3686
3712
|
var init_context = __esm({
|
|
3687
|
-
"../../node_modules/.pnpm/posthog-node@5.
|
|
3713
|
+
"../../node_modules/.pnpm/posthog-node@5.21.0/node_modules/posthog-node/dist/extensions/context/context.mjs"() {
|
|
3688
3714
|
PostHogContext = class {
|
|
3689
3715
|
constructor() {
|
|
3690
3716
|
this.storage = new AsyncLocalStorage();
|
|
@@ -3712,7 +3738,7 @@ var init_context = __esm({
|
|
|
3712
3738
|
}
|
|
3713
3739
|
});
|
|
3714
3740
|
|
|
3715
|
-
// ../../node_modules/.pnpm/posthog-node@5.
|
|
3741
|
+
// ../../node_modules/.pnpm/posthog-node@5.21.0/node_modules/posthog-node/dist/extensions/sentry-integration.mjs
|
|
3716
3742
|
function createEventProcessor(_posthog, { organization, projectId, prefix, severityAllowList = [
|
|
3717
3743
|
"error"
|
|
3718
3744
|
], sendExceptionsToPostHog = true } = {}) {
|
|
@@ -3768,7 +3794,7 @@ function sentryIntegration(_posthog, options) {
|
|
|
3768
3794
|
}
|
|
3769
3795
|
var NAME, PostHogSentryIntegration;
|
|
3770
3796
|
var init_sentry_integration = __esm({
|
|
3771
|
-
"../../node_modules/.pnpm/posthog-node@5.
|
|
3797
|
+
"../../node_modules/.pnpm/posthog-node@5.21.0/node_modules/posthog-node/dist/extensions/sentry-integration.mjs"() {
|
|
3772
3798
|
NAME = "posthog-node";
|
|
3773
3799
|
PostHogSentryIntegration = class {
|
|
3774
3800
|
static #_ = this.POSTHOG_ID_TAG = "posthog_distinct_id";
|
|
@@ -3790,12 +3816,13 @@ var init_sentry_integration = __esm({
|
|
|
3790
3816
|
}
|
|
3791
3817
|
});
|
|
3792
3818
|
|
|
3793
|
-
// ../../node_modules/.pnpm/posthog-node@5.
|
|
3819
|
+
// ../../node_modules/.pnpm/posthog-node@5.21.0/node_modules/posthog-node/dist/extensions/express.mjs
|
|
3794
3820
|
function setupExpressErrorHandler(_posthog, app) {
|
|
3795
3821
|
app.use(posthogErrorHandler(_posthog));
|
|
3796
3822
|
}
|
|
3797
3823
|
function posthogErrorHandler(posthog) {
|
|
3798
3824
|
return (error, req, res, next) => {
|
|
3825
|
+
if (ErrorTracking.isPreviouslyCapturedError(error)) return void next(error);
|
|
3799
3826
|
const sessionId = req.headers["x-posthog-session-id"];
|
|
3800
3827
|
const distinctId = req.headers["x-posthog-distinct-id"];
|
|
3801
3828
|
const syntheticException = new Error("Synthetic exception");
|
|
@@ -3821,21 +3848,21 @@ function posthogErrorHandler(posthog) {
|
|
|
3821
3848
|
};
|
|
3822
3849
|
}
|
|
3823
3850
|
var init_express = __esm({
|
|
3824
|
-
"../../node_modules/.pnpm/posthog-node@5.
|
|
3851
|
+
"../../node_modules/.pnpm/posthog-node@5.21.0/node_modules/posthog-node/dist/extensions/express.mjs"() {
|
|
3825
3852
|
init_error_tracking2();
|
|
3826
3853
|
}
|
|
3827
3854
|
});
|
|
3828
3855
|
|
|
3829
|
-
// ../../node_modules/.pnpm/posthog-node@5.
|
|
3856
|
+
// ../../node_modules/.pnpm/posthog-node@5.21.0/node_modules/posthog-node/dist/exports.mjs
|
|
3830
3857
|
var init_exports = __esm({
|
|
3831
|
-
"../../node_modules/.pnpm/posthog-node@5.
|
|
3858
|
+
"../../node_modules/.pnpm/posthog-node@5.21.0/node_modules/posthog-node/dist/exports.mjs"() {
|
|
3832
3859
|
init_sentry_integration();
|
|
3833
3860
|
init_express();
|
|
3834
3861
|
init_types3();
|
|
3835
3862
|
}
|
|
3836
3863
|
});
|
|
3837
3864
|
|
|
3838
|
-
// ../../node_modules/.pnpm/posthog-node@5.
|
|
3865
|
+
// ../../node_modules/.pnpm/posthog-node@5.21.0/node_modules/posthog-node/dist/entrypoints/index.node.mjs
|
|
3839
3866
|
var index_node_exports = {};
|
|
3840
3867
|
__export(index_node_exports, {
|
|
3841
3868
|
FeatureFlagError: () => FeatureFlagError,
|
|
@@ -3847,7 +3874,7 @@ __export(index_node_exports, {
|
|
|
3847
3874
|
});
|
|
3848
3875
|
var PostHog;
|
|
3849
3876
|
var init_index_node = __esm({
|
|
3850
|
-
"../../node_modules/.pnpm/posthog-node@5.
|
|
3877
|
+
"../../node_modules/.pnpm/posthog-node@5.21.0/node_modules/posthog-node/dist/entrypoints/index.node.mjs"() {
|
|
3851
3878
|
init_module_node();
|
|
3852
3879
|
init_context_lines_node();
|
|
3853
3880
|
init_error_tracking2();
|
|
@@ -5138,9 +5165,9 @@ var require_dist2 = __commonJS({
|
|
|
5138
5165
|
}
|
|
5139
5166
|
});
|
|
5140
5167
|
|
|
5141
|
-
// ../../node_modules/.pnpm/mixpanel@0.
|
|
5168
|
+
// ../../node_modules/.pnpm/mixpanel@0.20.0/node_modules/mixpanel/package.json
|
|
5142
5169
|
var require_package = __commonJS({
|
|
5143
|
-
"../../node_modules/.pnpm/mixpanel@0.
|
|
5170
|
+
"../../node_modules/.pnpm/mixpanel@0.20.0/node_modules/mixpanel/package.json"(exports$1, module) {
|
|
5144
5171
|
module.exports = {
|
|
5145
5172
|
name: "mixpanel",
|
|
5146
5173
|
description: "A simple server-side API for mixpanel",
|
|
@@ -5150,7 +5177,7 @@ var require_package = __commonJS({
|
|
|
5150
5177
|
"api",
|
|
5151
5178
|
"stats"
|
|
5152
5179
|
],
|
|
5153
|
-
version: "0.
|
|
5180
|
+
version: "0.20.0",
|
|
5154
5181
|
homepage: "https://github.com/mixpanel/mixpanel-node",
|
|
5155
5182
|
author: "Carl Sverre",
|
|
5156
5183
|
license: "MIT",
|
|
@@ -5166,29 +5193,35 @@ var require_package = __commonJS({
|
|
|
5166
5193
|
node: ">=10.0"
|
|
5167
5194
|
},
|
|
5168
5195
|
scripts: {
|
|
5169
|
-
test: "vitest"
|
|
5196
|
+
test: "vitest",
|
|
5197
|
+
format: "prettier --write .",
|
|
5198
|
+
"check-format": "prettier --check .",
|
|
5199
|
+
lint: "oxlint ."
|
|
5170
5200
|
},
|
|
5171
5201
|
types: "./lib/mixpanel-node.d.ts",
|
|
5172
5202
|
devDependencies: {
|
|
5173
5203
|
"@types/node": "^24.10.1",
|
|
5174
5204
|
"@vitest/coverage-v8": "^4.0.8",
|
|
5175
5205
|
nock: "^14.0.10",
|
|
5206
|
+
oxlint: "^1.16.0",
|
|
5207
|
+
prettier: "^3.6.2",
|
|
5176
5208
|
proxyquire: "^2.1.3",
|
|
5177
5209
|
typescript: "^5.9.3",
|
|
5178
5210
|
vitest: "^4.0.8"
|
|
5179
5211
|
},
|
|
5180
5212
|
dependencies: {
|
|
5181
|
-
"https-proxy-agent": "7.0.6"
|
|
5213
|
+
"https-proxy-agent": "7.0.6",
|
|
5214
|
+
"json-logic-js": "2.0.5"
|
|
5182
5215
|
}
|
|
5183
5216
|
};
|
|
5184
5217
|
}
|
|
5185
5218
|
});
|
|
5186
5219
|
|
|
5187
|
-
// ../../node_modules/.pnpm/mixpanel@0.
|
|
5220
|
+
// ../../node_modules/.pnpm/mixpanel@0.20.0/node_modules/mixpanel/lib/utils.js
|
|
5188
5221
|
var require_utils = __commonJS({
|
|
5189
|
-
"../../node_modules/.pnpm/mixpanel@0.
|
|
5222
|
+
"../../node_modules/.pnpm/mixpanel@0.20.0/node_modules/mixpanel/lib/utils.js"(exports$1) {
|
|
5190
5223
|
exports$1.async_all = function(requests, handler, callback) {
|
|
5191
|
-
|
|
5224
|
+
let total = requests.length, errors = null, results = [], done = function(err, result) {
|
|
5192
5225
|
if (err) {
|
|
5193
5226
|
errors = errors || [];
|
|
5194
5227
|
errors.push(err);
|
|
@@ -5201,14 +5234,16 @@ var require_utils = __commonJS({
|
|
|
5201
5234
|
if (total === 0) {
|
|
5202
5235
|
callback(errors, results);
|
|
5203
5236
|
} else {
|
|
5204
|
-
for (
|
|
5237
|
+
for (let i = 0, l = requests.length; i < l; i++) {
|
|
5205
5238
|
handler(requests[i], done);
|
|
5206
5239
|
}
|
|
5207
5240
|
}
|
|
5208
5241
|
};
|
|
5209
5242
|
exports$1.ensure_timestamp = function(time) {
|
|
5210
5243
|
if (!(time instanceof Date || typeof time === "number")) {
|
|
5211
|
-
throw new Error(
|
|
5244
|
+
throw new Error(
|
|
5245
|
+
"`time` property must be a Date or Unix timestamp and is only required for `import` endpoint"
|
|
5246
|
+
);
|
|
5212
5247
|
}
|
|
5213
5248
|
return time instanceof Date ? time.getTime() : time;
|
|
5214
5249
|
};
|
|
@@ -5225,9 +5260,9 @@ var require_utils = __commonJS({
|
|
|
5225
5260
|
}
|
|
5226
5261
|
});
|
|
5227
5262
|
|
|
5228
|
-
// ../../node_modules/.pnpm/mixpanel@0.
|
|
5263
|
+
// ../../node_modules/.pnpm/mixpanel@0.20.0/node_modules/mixpanel/lib/profile_helpers.js
|
|
5229
5264
|
var require_profile_helpers = __commonJS({
|
|
5230
|
-
"../../node_modules/.pnpm/mixpanel@0.
|
|
5265
|
+
"../../node_modules/.pnpm/mixpanel@0.20.0/node_modules/mixpanel/lib/profile_helpers.js"(exports$1) {
|
|
5231
5266
|
var { ensure_timestamp } = require_utils();
|
|
5232
5267
|
function merge_modifiers(data, modifiers) {
|
|
5233
5268
|
if (modifiers) {
|
|
@@ -5275,7 +5310,7 @@ var require_profile_helpers = __commonJS({
|
|
|
5275
5310
|
}
|
|
5276
5311
|
}
|
|
5277
5312
|
let data = {
|
|
5278
|
-
|
|
5313
|
+
$token: this.token,
|
|
5279
5314
|
...identifiers
|
|
5280
5315
|
};
|
|
5281
5316
|
const set_key = set_once ? "$set_once" : "$set";
|
|
@@ -5290,14 +5325,20 @@ var require_profile_helpers = __commonJS({
|
|
|
5290
5325
|
}
|
|
5291
5326
|
data = merge_modifiers(data, modifiers);
|
|
5292
5327
|
if (this.config.debug) {
|
|
5293
|
-
this.mixpanel.config.logger.debug(
|
|
5328
|
+
this.mixpanel.config.logger.debug(
|
|
5329
|
+
`Sending the following data to Mixpanel (${this.endpoint})`,
|
|
5330
|
+
{ data }
|
|
5331
|
+
);
|
|
5294
5332
|
}
|
|
5295
|
-
this.mixpanel.send_request(
|
|
5333
|
+
this.mixpanel.send_request(
|
|
5334
|
+
{ method: "GET", endpoint: this.endpoint, data },
|
|
5335
|
+
callback
|
|
5336
|
+
);
|
|
5296
5337
|
}
|
|
5297
5338
|
_delete_profile({ identifiers, modifiers, callback }) {
|
|
5298
5339
|
let data = {
|
|
5299
|
-
|
|
5300
|
-
|
|
5340
|
+
$delete: "",
|
|
5341
|
+
$token: this.token,
|
|
5301
5342
|
...identifiers
|
|
5302
5343
|
};
|
|
5303
5344
|
if (typeof modifiers === "function") {
|
|
@@ -5307,13 +5348,18 @@ var require_profile_helpers = __commonJS({
|
|
|
5307
5348
|
if (this.config.debug) {
|
|
5308
5349
|
this.mixpanel.config.logger.debug("Deleting profile", { identifiers });
|
|
5309
5350
|
}
|
|
5310
|
-
this.mixpanel.send_request(
|
|
5351
|
+
this.mixpanel.send_request(
|
|
5352
|
+
{ method: "GET", endpoint: this.endpoint, data },
|
|
5353
|
+
callback
|
|
5354
|
+
);
|
|
5311
5355
|
}
|
|
5312
5356
|
_remove({ identifiers, data, modifiers, callback }) {
|
|
5313
5357
|
let $remove = {};
|
|
5314
5358
|
if (typeof data !== "object" || Array.isArray(data)) {
|
|
5315
5359
|
if (this.config.debug) {
|
|
5316
|
-
this.mixpanel.config.logger.error(
|
|
5360
|
+
this.mixpanel.config.logger.error(
|
|
5361
|
+
"Invalid value passed to #remove - data must be an object with scalar values"
|
|
5362
|
+
);
|
|
5317
5363
|
}
|
|
5318
5364
|
return;
|
|
5319
5365
|
}
|
|
@@ -5334,8 +5380,8 @@ var require_profile_helpers = __commonJS({
|
|
|
5334
5380
|
return;
|
|
5335
5381
|
}
|
|
5336
5382
|
data = {
|
|
5337
|
-
|
|
5338
|
-
|
|
5383
|
+
$remove,
|
|
5384
|
+
$token: this.token,
|
|
5339
5385
|
...identifiers
|
|
5340
5386
|
};
|
|
5341
5387
|
if (typeof modifiers === "function") {
|
|
@@ -5348,19 +5394,24 @@ var require_profile_helpers = __commonJS({
|
|
|
5348
5394
|
{ data }
|
|
5349
5395
|
);
|
|
5350
5396
|
}
|
|
5351
|
-
this.mixpanel.send_request(
|
|
5397
|
+
this.mixpanel.send_request(
|
|
5398
|
+
{ method: "GET", endpoint: this.endpoint, data },
|
|
5399
|
+
callback
|
|
5400
|
+
);
|
|
5352
5401
|
}
|
|
5353
5402
|
_union({ identifiers, data, modifiers, callback }) {
|
|
5354
5403
|
let $union = {};
|
|
5355
5404
|
if (typeof data !== "object" || Array.isArray(data)) {
|
|
5356
5405
|
if (this.config.debug) {
|
|
5357
|
-
this.mixpanel.config.logger.error(
|
|
5406
|
+
this.mixpanel.config.logger.error(
|
|
5407
|
+
"Invalid value passed to #union - data must be an object with scalar or array values"
|
|
5408
|
+
);
|
|
5358
5409
|
}
|
|
5359
5410
|
return;
|
|
5360
5411
|
}
|
|
5361
5412
|
for (const [key, val] of Object.entries(data)) {
|
|
5362
5413
|
if (Array.isArray(val)) {
|
|
5363
|
-
|
|
5414
|
+
const merge_values = val.filter(function(v) {
|
|
5364
5415
|
return typeof v === "string" || typeof v === "number";
|
|
5365
5416
|
});
|
|
5366
5417
|
if (merge_values.length > 0) {
|
|
@@ -5381,8 +5432,8 @@ var require_profile_helpers = __commonJS({
|
|
|
5381
5432
|
return;
|
|
5382
5433
|
}
|
|
5383
5434
|
data = {
|
|
5384
|
-
|
|
5385
|
-
|
|
5435
|
+
$union,
|
|
5436
|
+
$token: this.token,
|
|
5386
5437
|
...identifiers
|
|
5387
5438
|
};
|
|
5388
5439
|
if (typeof modifiers === "function") {
|
|
@@ -5395,7 +5446,10 @@ var require_profile_helpers = __commonJS({
|
|
|
5395
5446
|
{ data }
|
|
5396
5447
|
);
|
|
5397
5448
|
}
|
|
5398
|
-
this.mixpanel.send_request(
|
|
5449
|
+
this.mixpanel.send_request(
|
|
5450
|
+
{ method: "GET", endpoint: this.endpoint, data },
|
|
5451
|
+
callback
|
|
5452
|
+
);
|
|
5399
5453
|
}
|
|
5400
5454
|
_unset({ identifiers, prop, modifiers, callback }) {
|
|
5401
5455
|
let $unset = [];
|
|
@@ -5413,8 +5467,8 @@ var require_profile_helpers = __commonJS({
|
|
|
5413
5467
|
return;
|
|
5414
5468
|
}
|
|
5415
5469
|
let data = {
|
|
5416
|
-
|
|
5417
|
-
|
|
5470
|
+
$unset,
|
|
5471
|
+
$token: this.token,
|
|
5418
5472
|
...identifiers
|
|
5419
5473
|
};
|
|
5420
5474
|
if (typeof modifiers === "function") {
|
|
@@ -5427,15 +5481,18 @@ var require_profile_helpers = __commonJS({
|
|
|
5427
5481
|
{ data }
|
|
5428
5482
|
);
|
|
5429
5483
|
}
|
|
5430
|
-
this.mixpanel.send_request(
|
|
5484
|
+
this.mixpanel.send_request(
|
|
5485
|
+
{ method: "GET", endpoint: this.endpoint, data },
|
|
5486
|
+
callback
|
|
5487
|
+
);
|
|
5431
5488
|
}
|
|
5432
5489
|
};
|
|
5433
5490
|
}
|
|
5434
5491
|
});
|
|
5435
5492
|
|
|
5436
|
-
// ../../node_modules/.pnpm/mixpanel@0.
|
|
5493
|
+
// ../../node_modules/.pnpm/mixpanel@0.20.0/node_modules/mixpanel/lib/groups.js
|
|
5437
5494
|
var require_groups = __commonJS({
|
|
5438
|
-
"../../node_modules/.pnpm/mixpanel@0.
|
|
5495
|
+
"../../node_modules/.pnpm/mixpanel@0.20.0/node_modules/mixpanel/lib/groups.js"(exports$1) {
|
|
5439
5496
|
var { ProfileHelpers } = require_profile_helpers();
|
|
5440
5497
|
var MixpanelGroups = class extends ProfileHelpers() {
|
|
5441
5498
|
constructor(mp_instance) {
|
|
@@ -5444,9 +5501,9 @@ var require_groups = __commonJS({
|
|
|
5444
5501
|
this.endpoint = "/groups";
|
|
5445
5502
|
}
|
|
5446
5503
|
/** groups.set_once(group_key, group_id, prop, to, modifiers, callback)
|
|
5447
|
-
|
|
5448
|
-
|
|
5449
|
-
|
|
5504
|
+
---
|
|
5505
|
+
The same as groups.set, but adds a property value to a group only if it has not been set before.
|
|
5506
|
+
*/
|
|
5450
5507
|
set_once(group_key, group_id, prop, to, modifiers, callback) {
|
|
5451
5508
|
const identifiers = { $group_key: group_key, $group_id: group_id };
|
|
5452
5509
|
this._set(prop, to, modifiers, callback, { identifiers, set_once: true });
|
|
@@ -5535,9 +5592,9 @@ var require_groups = __commonJS({
|
|
|
5535
5592
|
}
|
|
5536
5593
|
});
|
|
5537
5594
|
|
|
5538
|
-
// ../../node_modules/.pnpm/mixpanel@0.
|
|
5595
|
+
// ../../node_modules/.pnpm/mixpanel@0.20.0/node_modules/mixpanel/lib/people.js
|
|
5539
5596
|
var require_people = __commonJS({
|
|
5540
|
-
"../../node_modules/.pnpm/mixpanel@0.
|
|
5597
|
+
"../../node_modules/.pnpm/mixpanel@0.20.0/node_modules/mixpanel/lib/people.js"(exports$1) {
|
|
5541
5598
|
var { merge_modifiers, ProfileHelpers } = require_profile_helpers();
|
|
5542
5599
|
var MixpanelPeople = class extends ProfileHelpers() {
|
|
5543
5600
|
constructor(mp_instance) {
|
|
@@ -5603,7 +5660,7 @@ var require_people = __commonJS({
|
|
|
5603
5660
|
});
|
|
5604
5661
|
*/
|
|
5605
5662
|
increment(distinct_id, prop, by, modifiers, callback) {
|
|
5606
|
-
|
|
5663
|
+
const $add = {};
|
|
5607
5664
|
if (typeof prop === "object") {
|
|
5608
5665
|
if (typeof by === "object") {
|
|
5609
5666
|
callback = modifiers;
|
|
@@ -5639,16 +5696,22 @@ var require_people = __commonJS({
|
|
|
5639
5696
|
$add[prop] = 1;
|
|
5640
5697
|
}
|
|
5641
5698
|
}
|
|
5642
|
-
|
|
5643
|
-
|
|
5644
|
-
|
|
5645
|
-
|
|
5699
|
+
let data = {
|
|
5700
|
+
$add,
|
|
5701
|
+
$token: this.mixpanel.token,
|
|
5702
|
+
$distinct_id: distinct_id
|
|
5646
5703
|
};
|
|
5647
5704
|
data = merge_modifiers(data, modifiers);
|
|
5648
5705
|
if (this.mixpanel.config.debug) {
|
|
5649
|
-
this.mixpanel.config.logger.debug(
|
|
5706
|
+
this.mixpanel.config.logger.debug(
|
|
5707
|
+
"Sending the following data to Mixpanel (Engage)",
|
|
5708
|
+
{ data }
|
|
5709
|
+
);
|
|
5650
5710
|
}
|
|
5651
|
-
this.mixpanel.send_request(
|
|
5711
|
+
this.mixpanel.send_request(
|
|
5712
|
+
{ method: "GET", endpoint: "/engage", data },
|
|
5713
|
+
callback
|
|
5714
|
+
);
|
|
5652
5715
|
}
|
|
5653
5716
|
/**
|
|
5654
5717
|
people.append(distinct_id, prop, value, modifiers, callback)
|
|
@@ -5667,7 +5730,7 @@ var require_people = __commonJS({
|
|
|
5667
5730
|
});
|
|
5668
5731
|
*/
|
|
5669
5732
|
append(distinct_id, prop, value, modifiers, callback) {
|
|
5670
|
-
|
|
5733
|
+
const $append = {};
|
|
5671
5734
|
if (typeof prop === "object") {
|
|
5672
5735
|
if (typeof value === "object") {
|
|
5673
5736
|
callback = modifiers;
|
|
@@ -5684,16 +5747,22 @@ var require_people = __commonJS({
|
|
|
5684
5747
|
callback = modifiers;
|
|
5685
5748
|
}
|
|
5686
5749
|
}
|
|
5687
|
-
|
|
5688
|
-
|
|
5689
|
-
|
|
5690
|
-
|
|
5750
|
+
let data = {
|
|
5751
|
+
$append,
|
|
5752
|
+
$token: this.mixpanel.token,
|
|
5753
|
+
$distinct_id: distinct_id
|
|
5691
5754
|
};
|
|
5692
5755
|
data = merge_modifiers(data, modifiers);
|
|
5693
5756
|
if (this.mixpanel.config.debug) {
|
|
5694
|
-
this.mixpanel.config.logger.debug(
|
|
5757
|
+
this.mixpanel.config.logger.debug(
|
|
5758
|
+
"Sending the following data to Mixpanel (Engage)",
|
|
5759
|
+
{ data }
|
|
5760
|
+
);
|
|
5695
5761
|
}
|
|
5696
|
-
this.mixpanel.send_request(
|
|
5762
|
+
this.mixpanel.send_request(
|
|
5763
|
+
{ method: "GET", endpoint: "/engage", data },
|
|
5764
|
+
callback
|
|
5765
|
+
);
|
|
5697
5766
|
}
|
|
5698
5767
|
/**
|
|
5699
5768
|
people.track_charge(distinct_id, amount, properties, modifiers, callback)
|
|
@@ -5728,27 +5797,35 @@ var require_people = __commonJS({
|
|
|
5728
5797
|
if (typeof amount !== "number") {
|
|
5729
5798
|
amount = parseFloat(amount);
|
|
5730
5799
|
if (isNaN(amount)) {
|
|
5731
|
-
this.mixpanel.config.logger.error(
|
|
5800
|
+
this.mixpanel.config.logger.error(
|
|
5801
|
+
"Invalid value passed to mixpanel.people.track_charge - must be a number"
|
|
5802
|
+
);
|
|
5732
5803
|
return;
|
|
5733
5804
|
}
|
|
5734
5805
|
}
|
|
5735
5806
|
properties.$amount = amount;
|
|
5736
5807
|
if (properties.hasOwnProperty("$time")) {
|
|
5737
|
-
|
|
5808
|
+
const time = properties.$time;
|
|
5738
5809
|
if (Object.prototype.toString.call(time) === "[object Date]") {
|
|
5739
5810
|
properties.$time = time.toISOString();
|
|
5740
5811
|
}
|
|
5741
5812
|
}
|
|
5742
|
-
|
|
5743
|
-
|
|
5744
|
-
|
|
5745
|
-
|
|
5813
|
+
let data = {
|
|
5814
|
+
$append: { $transactions: properties },
|
|
5815
|
+
$token: this.mixpanel.token,
|
|
5816
|
+
$distinct_id: distinct_id
|
|
5746
5817
|
};
|
|
5747
5818
|
data = merge_modifiers(data, modifiers);
|
|
5748
5819
|
if (this.mixpanel.config.debug) {
|
|
5749
|
-
this.mixpanel.config.logger.debug(
|
|
5820
|
+
this.mixpanel.config.logger.debug(
|
|
5821
|
+
"Sending the following data to Mixpanel (Engage)",
|
|
5822
|
+
{ data }
|
|
5823
|
+
);
|
|
5750
5824
|
}
|
|
5751
|
-
this.mixpanel.send_request(
|
|
5825
|
+
this.mixpanel.send_request(
|
|
5826
|
+
{ method: "GET", endpoint: "/engage", data },
|
|
5827
|
+
callback
|
|
5828
|
+
);
|
|
5752
5829
|
}
|
|
5753
5830
|
/**
|
|
5754
5831
|
people.clear_charges(distinct_id, modifiers, callback)
|
|
@@ -5760,19 +5837,24 @@ var require_people = __commonJS({
|
|
|
5760
5837
|
mixpanel.people.clear_charges('bob');
|
|
5761
5838
|
*/
|
|
5762
5839
|
clear_charges(distinct_id, modifiers, callback) {
|
|
5763
|
-
|
|
5764
|
-
|
|
5765
|
-
|
|
5766
|
-
|
|
5840
|
+
let data = {
|
|
5841
|
+
$set: { $transactions: [] },
|
|
5842
|
+
$token: this.mixpanel.token,
|
|
5843
|
+
$distinct_id: distinct_id
|
|
5767
5844
|
};
|
|
5768
5845
|
if (typeof modifiers === "function") {
|
|
5769
5846
|
callback = modifiers;
|
|
5770
5847
|
}
|
|
5771
5848
|
data = merge_modifiers(data, modifiers);
|
|
5772
5849
|
if (this.mixpanel.config.debug) {
|
|
5773
|
-
this.mixpanel.config.logger.debug("Clearing this user's charges", {
|
|
5850
|
+
this.mixpanel.config.logger.debug("Clearing this user's charges", {
|
|
5851
|
+
$distinct_id: distinct_id
|
|
5852
|
+
});
|
|
5774
5853
|
}
|
|
5775
|
-
this.mixpanel.send_request(
|
|
5854
|
+
this.mixpanel.send_request(
|
|
5855
|
+
{ method: "GET", endpoint: "/engage", data },
|
|
5856
|
+
callback
|
|
5857
|
+
);
|
|
5776
5858
|
}
|
|
5777
5859
|
/**
|
|
5778
5860
|
people.delete_user(distinct_id, modifiers, callback)
|
|
@@ -5799,7 +5881,7 @@ var require_people = __commonJS({
|
|
|
5799
5881
|
mixpanel.people.remove('bob', {'browsers': 'chrome', 'os': 'linux'});
|
|
5800
5882
|
*/
|
|
5801
5883
|
remove(distinct_id, data, modifiers, callback) {
|
|
5802
|
-
const identifiers = {
|
|
5884
|
+
const identifiers = { $distinct_id: distinct_id };
|
|
5803
5885
|
this._remove({ identifiers, data, modifiers, callback });
|
|
5804
5886
|
}
|
|
5805
5887
|
/**
|
|
@@ -5837,9 +5919,9 @@ var require_people = __commonJS({
|
|
|
5837
5919
|
}
|
|
5838
5920
|
});
|
|
5839
5921
|
|
|
5840
|
-
// ../../node_modules/.pnpm/mixpanel@0.
|
|
5922
|
+
// ../../node_modules/.pnpm/mixpanel@0.20.0/node_modules/mixpanel/lib/flags/utils.js
|
|
5841
5923
|
var require_utils2 = __commonJS({
|
|
5842
|
-
"../../node_modules/.pnpm/mixpanel@0.
|
|
5924
|
+
"../../node_modules/.pnpm/mixpanel@0.20.0/node_modules/mixpanel/lib/flags/utils.js"(exports$1, module) {
|
|
5843
5925
|
var crypto3 = __require("crypto");
|
|
5844
5926
|
var EXPOSURE_EVENT = "$experiment_started";
|
|
5845
5927
|
var REQUEST_HEADERS = {
|
|
@@ -5874,22 +5956,55 @@ var require_utils2 = __commonJS({
|
|
|
5874
5956
|
const traceFlags = "01";
|
|
5875
5957
|
return `${version3}-${traceId}-${parentId}-${traceFlags}`;
|
|
5876
5958
|
}
|
|
5959
|
+
function lowercaseJson(obj, lowercaseKeys) {
|
|
5960
|
+
if (obj === null || obj === void 0) {
|
|
5961
|
+
return obj;
|
|
5962
|
+
} else if (typeof obj === "string") {
|
|
5963
|
+
return obj.toLowerCase();
|
|
5964
|
+
} else if (typeof obj === "object") {
|
|
5965
|
+
if (Array.isArray(obj)) {
|
|
5966
|
+
return obj.map((item) => lowercaseJson(item, lowercaseKeys));
|
|
5967
|
+
} else {
|
|
5968
|
+
return Object.fromEntries(
|
|
5969
|
+
Object.entries(obj).map(([k, v]) => [
|
|
5970
|
+
lowercaseKeys ? k.toLowerCase() : k,
|
|
5971
|
+
lowercaseJson(v, lowercaseKeys)
|
|
5972
|
+
])
|
|
5973
|
+
);
|
|
5974
|
+
}
|
|
5975
|
+
} else {
|
|
5976
|
+
return obj;
|
|
5977
|
+
}
|
|
5978
|
+
}
|
|
5979
|
+
function lowercaseAllKeysAndValues(obj) {
|
|
5980
|
+
return lowercaseJson(obj, true);
|
|
5981
|
+
}
|
|
5982
|
+
function lowercaseLeafNodes(obj) {
|
|
5983
|
+
return lowercaseJson(obj, false);
|
|
5984
|
+
}
|
|
5877
5985
|
module.exports = {
|
|
5878
5986
|
EXPOSURE_EVENT,
|
|
5879
5987
|
REQUEST_HEADERS,
|
|
5880
5988
|
normalizedHash,
|
|
5881
5989
|
prepareCommonQueryParams,
|
|
5882
|
-
generateTraceparent
|
|
5990
|
+
generateTraceparent,
|
|
5991
|
+
lowercaseAllKeysAndValues,
|
|
5992
|
+
lowercaseLeafNodes
|
|
5883
5993
|
};
|
|
5884
5994
|
}
|
|
5885
5995
|
});
|
|
5886
5996
|
|
|
5887
|
-
// ../../node_modules/.pnpm/mixpanel@0.
|
|
5997
|
+
// ../../node_modules/.pnpm/mixpanel@0.20.0/node_modules/mixpanel/lib/flags/flags.js
|
|
5888
5998
|
var require_flags = __commonJS({
|
|
5889
|
-
"../../node_modules/.pnpm/mixpanel@0.
|
|
5999
|
+
"../../node_modules/.pnpm/mixpanel@0.20.0/node_modules/mixpanel/lib/flags/flags.js"(exports$1, module) {
|
|
5890
6000
|
var https3 = __require("https");
|
|
5891
6001
|
var packageInfo = require_package();
|
|
5892
|
-
var {
|
|
6002
|
+
var {
|
|
6003
|
+
prepareCommonQueryParams,
|
|
6004
|
+
generateTraceparent,
|
|
6005
|
+
EXPOSURE_EVENT,
|
|
6006
|
+
REQUEST_HEADERS
|
|
6007
|
+
} = require_utils2();
|
|
5893
6008
|
var FeatureFlagsProvider = class {
|
|
5894
6009
|
/**
|
|
5895
6010
|
* @param {Object} providerConfig - Configuration object with token, api_host, request_timeout_in_seconds
|
|
@@ -5912,7 +6027,10 @@ var require_flags = __commonJS({
|
|
|
5912
6027
|
*/
|
|
5913
6028
|
async callFlagsEndpoint(additionalParams = null) {
|
|
5914
6029
|
return new Promise((resolve, reject) => {
|
|
5915
|
-
const commonParams = prepareCommonQueryParams(
|
|
6030
|
+
const commonParams = prepareCommonQueryParams(
|
|
6031
|
+
this.providerConfig.token,
|
|
6032
|
+
packageInfo.version
|
|
6033
|
+
);
|
|
5916
6034
|
const params = new URLSearchParams(commonParams);
|
|
5917
6035
|
if (additionalParams) {
|
|
5918
6036
|
for (const [key, value] of Object.entries(additionalParams)) {
|
|
@@ -5927,8 +6045,8 @@ var require_flags = __commonJS({
|
|
|
5927
6045
|
method: "GET",
|
|
5928
6046
|
headers: {
|
|
5929
6047
|
...REQUEST_HEADERS,
|
|
5930
|
-
|
|
5931
|
-
|
|
6048
|
+
Authorization: "Basic " + Buffer.from(this.providerConfig.token + ":").toString("base64"),
|
|
6049
|
+
traceparent: generateTraceparent()
|
|
5932
6050
|
},
|
|
5933
6051
|
timeout: this.providerConfig.request_timeout_in_seconds * 1e3
|
|
5934
6052
|
};
|
|
@@ -5939,20 +6057,26 @@ var require_flags = __commonJS({
|
|
|
5939
6057
|
});
|
|
5940
6058
|
res.on("end", () => {
|
|
5941
6059
|
if (res.statusCode !== 200) {
|
|
5942
|
-
this.logger?.error(
|
|
6060
|
+
this.logger?.error(
|
|
6061
|
+
`HTTP ${res.statusCode} error calling flags endpoint: ${data}`
|
|
6062
|
+
);
|
|
5943
6063
|
return reject(new Error(`HTTP ${res.statusCode}: ${data}`));
|
|
5944
6064
|
}
|
|
5945
6065
|
try {
|
|
5946
6066
|
const result = JSON.parse(data);
|
|
5947
6067
|
resolve(result);
|
|
5948
6068
|
} catch (parseErr) {
|
|
5949
|
-
this.logger?.error(
|
|
6069
|
+
this.logger?.error(
|
|
6070
|
+
`Failed to parse JSON response: ${parseErr.message}`
|
|
6071
|
+
);
|
|
5950
6072
|
reject(parseErr);
|
|
5951
6073
|
}
|
|
5952
6074
|
});
|
|
5953
6075
|
});
|
|
5954
6076
|
request.on("error", (err) => {
|
|
5955
|
-
this.logger?.error(
|
|
6077
|
+
this.logger?.error(
|
|
6078
|
+
`Network error calling flags endpoint: ${err.message}`
|
|
6079
|
+
);
|
|
5956
6080
|
reject(err);
|
|
5957
6081
|
});
|
|
5958
6082
|
request.on("timeout", () => {
|
|
@@ -5974,14 +6098,16 @@ var require_flags = __commonJS({
|
|
|
5974
6098
|
*/
|
|
5975
6099
|
trackExposureEvent(flagKey, selectedVariant, context, latencyMs = null) {
|
|
5976
6100
|
if (!context.distinct_id) {
|
|
5977
|
-
this.logger?.error(
|
|
6101
|
+
this.logger?.error(
|
|
6102
|
+
"Cannot track exposure event without a distinct_id in the context"
|
|
6103
|
+
);
|
|
5978
6104
|
return;
|
|
5979
6105
|
}
|
|
5980
6106
|
const properties = {
|
|
5981
|
-
|
|
6107
|
+
distinct_id: context.distinct_id,
|
|
5982
6108
|
"Experiment name": flagKey,
|
|
5983
6109
|
"Variant name": selectedVariant.variant_key,
|
|
5984
|
-
|
|
6110
|
+
$experiment_type: "feature_flag",
|
|
5985
6111
|
"Flag evaluation mode": this.evaluationMode
|
|
5986
6112
|
};
|
|
5987
6113
|
if (latencyMs !== null && latencyMs !== void 0) {
|
|
@@ -5998,7 +6124,9 @@ var require_flags = __commonJS({
|
|
|
5998
6124
|
}
|
|
5999
6125
|
this.tracker(EXPOSURE_EVENT, properties, (err) => {
|
|
6000
6126
|
if (err) {
|
|
6001
|
-
this.logger?.error(
|
|
6127
|
+
this.logger?.error(
|
|
6128
|
+
`[flags]Failed to track exposure event for flag '${flagKey}': ${err.message}`
|
|
6129
|
+
);
|
|
6002
6130
|
}
|
|
6003
6131
|
});
|
|
6004
6132
|
}
|
|
@@ -6007,11 +6135,392 @@ var require_flags = __commonJS({
|
|
|
6007
6135
|
}
|
|
6008
6136
|
});
|
|
6009
6137
|
|
|
6010
|
-
// ../../node_modules/.pnpm/
|
|
6138
|
+
// ../../node_modules/.pnpm/json-logic-js@2.0.5/node_modules/json-logic-js/logic.js
|
|
6139
|
+
var require_logic = __commonJS({
|
|
6140
|
+
"../../node_modules/.pnpm/json-logic-js@2.0.5/node_modules/json-logic-js/logic.js"(exports$1, module) {
|
|
6141
|
+
(function(root, factory) {
|
|
6142
|
+
if (typeof define === "function" && define.amd) {
|
|
6143
|
+
define(factory);
|
|
6144
|
+
} else if (typeof exports$1 === "object") {
|
|
6145
|
+
module.exports = factory();
|
|
6146
|
+
} else {
|
|
6147
|
+
root.jsonLogic = factory();
|
|
6148
|
+
}
|
|
6149
|
+
})(exports$1, function() {
|
|
6150
|
+
if (!Array.isArray) {
|
|
6151
|
+
Array.isArray = function(arg) {
|
|
6152
|
+
return Object.prototype.toString.call(arg) === "[object Array]";
|
|
6153
|
+
};
|
|
6154
|
+
}
|
|
6155
|
+
function arrayUnique(array) {
|
|
6156
|
+
var a = [];
|
|
6157
|
+
for (var i = 0, l = array.length; i < l; i++) {
|
|
6158
|
+
if (a.indexOf(array[i]) === -1) {
|
|
6159
|
+
a.push(array[i]);
|
|
6160
|
+
}
|
|
6161
|
+
}
|
|
6162
|
+
return a;
|
|
6163
|
+
}
|
|
6164
|
+
var jsonLogic = {};
|
|
6165
|
+
var operations = {
|
|
6166
|
+
"==": function(a, b) {
|
|
6167
|
+
return a == b;
|
|
6168
|
+
},
|
|
6169
|
+
"===": function(a, b) {
|
|
6170
|
+
return a === b;
|
|
6171
|
+
},
|
|
6172
|
+
"!=": function(a, b) {
|
|
6173
|
+
return a != b;
|
|
6174
|
+
},
|
|
6175
|
+
"!==": function(a, b) {
|
|
6176
|
+
return a !== b;
|
|
6177
|
+
},
|
|
6178
|
+
">": function(a, b) {
|
|
6179
|
+
return a > b;
|
|
6180
|
+
},
|
|
6181
|
+
">=": function(a, b) {
|
|
6182
|
+
return a >= b;
|
|
6183
|
+
},
|
|
6184
|
+
"<": function(a, b, c) {
|
|
6185
|
+
return c === void 0 ? a < b : a < b && b < c;
|
|
6186
|
+
},
|
|
6187
|
+
"<=": function(a, b, c) {
|
|
6188
|
+
return c === void 0 ? a <= b : a <= b && b <= c;
|
|
6189
|
+
},
|
|
6190
|
+
"!!": function(a) {
|
|
6191
|
+
return jsonLogic.truthy(a);
|
|
6192
|
+
},
|
|
6193
|
+
"!": function(a) {
|
|
6194
|
+
return !jsonLogic.truthy(a);
|
|
6195
|
+
},
|
|
6196
|
+
"%": function(a, b) {
|
|
6197
|
+
return a % b;
|
|
6198
|
+
},
|
|
6199
|
+
"log": function(a) {
|
|
6200
|
+
console.log(a);
|
|
6201
|
+
return a;
|
|
6202
|
+
},
|
|
6203
|
+
"in": function(a, b) {
|
|
6204
|
+
if (!b || typeof b.indexOf === "undefined") return false;
|
|
6205
|
+
return b.indexOf(a) !== -1;
|
|
6206
|
+
},
|
|
6207
|
+
"cat": function() {
|
|
6208
|
+
return Array.prototype.join.call(arguments, "");
|
|
6209
|
+
},
|
|
6210
|
+
"substr": function(source, start, end) {
|
|
6211
|
+
if (end < 0) {
|
|
6212
|
+
var temp = String(source).substr(start);
|
|
6213
|
+
return temp.substr(0, temp.length + end);
|
|
6214
|
+
}
|
|
6215
|
+
return String(source).substr(start, end);
|
|
6216
|
+
},
|
|
6217
|
+
"+": function() {
|
|
6218
|
+
return Array.prototype.reduce.call(arguments, function(a, b) {
|
|
6219
|
+
return parseFloat(a, 10) + parseFloat(b, 10);
|
|
6220
|
+
}, 0);
|
|
6221
|
+
},
|
|
6222
|
+
"*": function() {
|
|
6223
|
+
return Array.prototype.reduce.call(arguments, function(a, b) {
|
|
6224
|
+
return parseFloat(a, 10) * parseFloat(b, 10);
|
|
6225
|
+
});
|
|
6226
|
+
},
|
|
6227
|
+
"-": function(a, b) {
|
|
6228
|
+
if (b === void 0) {
|
|
6229
|
+
return -a;
|
|
6230
|
+
} else {
|
|
6231
|
+
return a - b;
|
|
6232
|
+
}
|
|
6233
|
+
},
|
|
6234
|
+
"/": function(a, b) {
|
|
6235
|
+
return a / b;
|
|
6236
|
+
},
|
|
6237
|
+
"min": function() {
|
|
6238
|
+
return Math.min.apply(this, arguments);
|
|
6239
|
+
},
|
|
6240
|
+
"max": function() {
|
|
6241
|
+
return Math.max.apply(this, arguments);
|
|
6242
|
+
},
|
|
6243
|
+
"merge": function() {
|
|
6244
|
+
return Array.prototype.reduce.call(arguments, function(a, b) {
|
|
6245
|
+
return a.concat(b);
|
|
6246
|
+
}, []);
|
|
6247
|
+
},
|
|
6248
|
+
"var": function(a, b) {
|
|
6249
|
+
var not_found = b === void 0 ? null : b;
|
|
6250
|
+
var data = this;
|
|
6251
|
+
if (typeof a === "undefined" || a === "" || a === null) {
|
|
6252
|
+
return data;
|
|
6253
|
+
}
|
|
6254
|
+
var sub_props = String(a).split(".");
|
|
6255
|
+
for (var i = 0; i < sub_props.length; i++) {
|
|
6256
|
+
if (data === null || data === void 0) {
|
|
6257
|
+
return not_found;
|
|
6258
|
+
}
|
|
6259
|
+
data = data[sub_props[i]];
|
|
6260
|
+
if (data === void 0) {
|
|
6261
|
+
return not_found;
|
|
6262
|
+
}
|
|
6263
|
+
}
|
|
6264
|
+
return data;
|
|
6265
|
+
},
|
|
6266
|
+
"missing": function() {
|
|
6267
|
+
var missing = [];
|
|
6268
|
+
var keys = Array.isArray(arguments[0]) ? arguments[0] : arguments;
|
|
6269
|
+
for (var i = 0; i < keys.length; i++) {
|
|
6270
|
+
var key = keys[i];
|
|
6271
|
+
var value = jsonLogic.apply({ "var": key }, this);
|
|
6272
|
+
if (value === null || value === "") {
|
|
6273
|
+
missing.push(key);
|
|
6274
|
+
}
|
|
6275
|
+
}
|
|
6276
|
+
return missing;
|
|
6277
|
+
},
|
|
6278
|
+
"missing_some": function(need_count, options) {
|
|
6279
|
+
var are_missing = jsonLogic.apply({ "missing": options }, this);
|
|
6280
|
+
if (options.length - are_missing.length >= need_count) {
|
|
6281
|
+
return [];
|
|
6282
|
+
} else {
|
|
6283
|
+
return are_missing;
|
|
6284
|
+
}
|
|
6285
|
+
}
|
|
6286
|
+
};
|
|
6287
|
+
jsonLogic.is_logic = function(logic) {
|
|
6288
|
+
return typeof logic === "object" && // An object
|
|
6289
|
+
logic !== null && // but not null
|
|
6290
|
+
!Array.isArray(logic) && // and not an array
|
|
6291
|
+
Object.keys(logic).length === 1;
|
|
6292
|
+
};
|
|
6293
|
+
jsonLogic.truthy = function(value) {
|
|
6294
|
+
if (Array.isArray(value) && value.length === 0) {
|
|
6295
|
+
return false;
|
|
6296
|
+
}
|
|
6297
|
+
return !!value;
|
|
6298
|
+
};
|
|
6299
|
+
jsonLogic.get_operator = function(logic) {
|
|
6300
|
+
return Object.keys(logic)[0];
|
|
6301
|
+
};
|
|
6302
|
+
jsonLogic.get_values = function(logic) {
|
|
6303
|
+
return logic[jsonLogic.get_operator(logic)];
|
|
6304
|
+
};
|
|
6305
|
+
jsonLogic.apply = function(logic, data) {
|
|
6306
|
+
if (Array.isArray(logic)) {
|
|
6307
|
+
return logic.map(function(l) {
|
|
6308
|
+
return jsonLogic.apply(l, data);
|
|
6309
|
+
});
|
|
6310
|
+
}
|
|
6311
|
+
if (!jsonLogic.is_logic(logic)) {
|
|
6312
|
+
return logic;
|
|
6313
|
+
}
|
|
6314
|
+
var op = jsonLogic.get_operator(logic);
|
|
6315
|
+
var values = logic[op];
|
|
6316
|
+
var i;
|
|
6317
|
+
var current;
|
|
6318
|
+
var scopedLogic;
|
|
6319
|
+
var scopedData;
|
|
6320
|
+
var initial;
|
|
6321
|
+
if (!Array.isArray(values)) {
|
|
6322
|
+
values = [values];
|
|
6323
|
+
}
|
|
6324
|
+
if (op === "if" || op == "?:") {
|
|
6325
|
+
for (i = 0; i < values.length - 1; i += 2) {
|
|
6326
|
+
if (jsonLogic.truthy(jsonLogic.apply(values[i], data))) {
|
|
6327
|
+
return jsonLogic.apply(values[i + 1], data);
|
|
6328
|
+
}
|
|
6329
|
+
}
|
|
6330
|
+
if (values.length === i + 1) {
|
|
6331
|
+
return jsonLogic.apply(values[i], data);
|
|
6332
|
+
}
|
|
6333
|
+
return null;
|
|
6334
|
+
} else if (op === "and") {
|
|
6335
|
+
for (i = 0; i < values.length; i += 1) {
|
|
6336
|
+
current = jsonLogic.apply(values[i], data);
|
|
6337
|
+
if (!jsonLogic.truthy(current)) {
|
|
6338
|
+
return current;
|
|
6339
|
+
}
|
|
6340
|
+
}
|
|
6341
|
+
return current;
|
|
6342
|
+
} else if (op === "or") {
|
|
6343
|
+
for (i = 0; i < values.length; i += 1) {
|
|
6344
|
+
current = jsonLogic.apply(values[i], data);
|
|
6345
|
+
if (jsonLogic.truthy(current)) {
|
|
6346
|
+
return current;
|
|
6347
|
+
}
|
|
6348
|
+
}
|
|
6349
|
+
return current;
|
|
6350
|
+
} else if (op === "filter") {
|
|
6351
|
+
scopedData = jsonLogic.apply(values[0], data);
|
|
6352
|
+
scopedLogic = values[1];
|
|
6353
|
+
if (!Array.isArray(scopedData)) {
|
|
6354
|
+
return [];
|
|
6355
|
+
}
|
|
6356
|
+
return scopedData.filter(function(datum) {
|
|
6357
|
+
return jsonLogic.truthy(jsonLogic.apply(scopedLogic, datum));
|
|
6358
|
+
});
|
|
6359
|
+
} else if (op === "map") {
|
|
6360
|
+
scopedData = jsonLogic.apply(values[0], data);
|
|
6361
|
+
scopedLogic = values[1];
|
|
6362
|
+
if (!Array.isArray(scopedData)) {
|
|
6363
|
+
return [];
|
|
6364
|
+
}
|
|
6365
|
+
return scopedData.map(function(datum) {
|
|
6366
|
+
return jsonLogic.apply(scopedLogic, datum);
|
|
6367
|
+
});
|
|
6368
|
+
} else if (op === "reduce") {
|
|
6369
|
+
scopedData = jsonLogic.apply(values[0], data);
|
|
6370
|
+
scopedLogic = values[1];
|
|
6371
|
+
initial = typeof values[2] !== "undefined" ? jsonLogic.apply(values[2], data) : null;
|
|
6372
|
+
if (!Array.isArray(scopedData)) {
|
|
6373
|
+
return initial;
|
|
6374
|
+
}
|
|
6375
|
+
return scopedData.reduce(
|
|
6376
|
+
function(accumulator, current2) {
|
|
6377
|
+
return jsonLogic.apply(
|
|
6378
|
+
scopedLogic,
|
|
6379
|
+
{ current: current2, accumulator }
|
|
6380
|
+
);
|
|
6381
|
+
},
|
|
6382
|
+
initial
|
|
6383
|
+
);
|
|
6384
|
+
} else if (op === "all") {
|
|
6385
|
+
scopedData = jsonLogic.apply(values[0], data);
|
|
6386
|
+
scopedLogic = values[1];
|
|
6387
|
+
if (!Array.isArray(scopedData) || !scopedData.length) {
|
|
6388
|
+
return false;
|
|
6389
|
+
}
|
|
6390
|
+
for (i = 0; i < scopedData.length; i += 1) {
|
|
6391
|
+
if (!jsonLogic.truthy(jsonLogic.apply(scopedLogic, scopedData[i]))) {
|
|
6392
|
+
return false;
|
|
6393
|
+
}
|
|
6394
|
+
}
|
|
6395
|
+
return true;
|
|
6396
|
+
} else if (op === "none") {
|
|
6397
|
+
scopedData = jsonLogic.apply(values[0], data);
|
|
6398
|
+
scopedLogic = values[1];
|
|
6399
|
+
if (!Array.isArray(scopedData) || !scopedData.length) {
|
|
6400
|
+
return true;
|
|
6401
|
+
}
|
|
6402
|
+
for (i = 0; i < scopedData.length; i += 1) {
|
|
6403
|
+
if (jsonLogic.truthy(jsonLogic.apply(scopedLogic, scopedData[i]))) {
|
|
6404
|
+
return false;
|
|
6405
|
+
}
|
|
6406
|
+
}
|
|
6407
|
+
return true;
|
|
6408
|
+
} else if (op === "some") {
|
|
6409
|
+
scopedData = jsonLogic.apply(values[0], data);
|
|
6410
|
+
scopedLogic = values[1];
|
|
6411
|
+
if (!Array.isArray(scopedData) || !scopedData.length) {
|
|
6412
|
+
return false;
|
|
6413
|
+
}
|
|
6414
|
+
for (i = 0; i < scopedData.length; i += 1) {
|
|
6415
|
+
if (jsonLogic.truthy(jsonLogic.apply(scopedLogic, scopedData[i]))) {
|
|
6416
|
+
return true;
|
|
6417
|
+
}
|
|
6418
|
+
}
|
|
6419
|
+
return false;
|
|
6420
|
+
}
|
|
6421
|
+
values = values.map(function(val) {
|
|
6422
|
+
return jsonLogic.apply(val, data);
|
|
6423
|
+
});
|
|
6424
|
+
if (operations.hasOwnProperty(op) && typeof operations[op] === "function") {
|
|
6425
|
+
return operations[op].apply(data, values);
|
|
6426
|
+
} else if (op.indexOf(".") > 0) {
|
|
6427
|
+
var sub_ops = String(op).split(".");
|
|
6428
|
+
var operation = operations;
|
|
6429
|
+
for (i = 0; i < sub_ops.length; i++) {
|
|
6430
|
+
if (!operation.hasOwnProperty(sub_ops[i])) {
|
|
6431
|
+
throw new Error("Unrecognized operation " + op + " (failed at " + sub_ops.slice(0, i + 1).join(".") + ")");
|
|
6432
|
+
}
|
|
6433
|
+
operation = operation[sub_ops[i]];
|
|
6434
|
+
}
|
|
6435
|
+
return operation.apply(data, values);
|
|
6436
|
+
}
|
|
6437
|
+
throw new Error("Unrecognized operation " + op);
|
|
6438
|
+
};
|
|
6439
|
+
jsonLogic.uses_data = function(logic) {
|
|
6440
|
+
var collection = [];
|
|
6441
|
+
if (jsonLogic.is_logic(logic)) {
|
|
6442
|
+
var op = jsonLogic.get_operator(logic);
|
|
6443
|
+
var values = logic[op];
|
|
6444
|
+
if (!Array.isArray(values)) {
|
|
6445
|
+
values = [values];
|
|
6446
|
+
}
|
|
6447
|
+
if (op === "var") {
|
|
6448
|
+
collection.push(values[0]);
|
|
6449
|
+
} else {
|
|
6450
|
+
values.forEach(function(val) {
|
|
6451
|
+
collection.push.apply(collection, jsonLogic.uses_data(val));
|
|
6452
|
+
});
|
|
6453
|
+
}
|
|
6454
|
+
}
|
|
6455
|
+
return arrayUnique(collection);
|
|
6456
|
+
};
|
|
6457
|
+
jsonLogic.add_operation = function(name, code) {
|
|
6458
|
+
operations[name] = code;
|
|
6459
|
+
};
|
|
6460
|
+
jsonLogic.rm_operation = function(name) {
|
|
6461
|
+
delete operations[name];
|
|
6462
|
+
};
|
|
6463
|
+
jsonLogic.rule_like = function(rule, pattern) {
|
|
6464
|
+
if (pattern === rule) {
|
|
6465
|
+
return true;
|
|
6466
|
+
}
|
|
6467
|
+
if (pattern === "@") {
|
|
6468
|
+
return true;
|
|
6469
|
+
}
|
|
6470
|
+
if (pattern === "number") {
|
|
6471
|
+
return typeof rule === "number";
|
|
6472
|
+
}
|
|
6473
|
+
if (pattern === "string") {
|
|
6474
|
+
return typeof rule === "string";
|
|
6475
|
+
}
|
|
6476
|
+
if (pattern === "array") {
|
|
6477
|
+
return Array.isArray(rule) && !jsonLogic.is_logic(rule);
|
|
6478
|
+
}
|
|
6479
|
+
if (jsonLogic.is_logic(pattern)) {
|
|
6480
|
+
if (jsonLogic.is_logic(rule)) {
|
|
6481
|
+
var pattern_op = jsonLogic.get_operator(pattern);
|
|
6482
|
+
var rule_op = jsonLogic.get_operator(rule);
|
|
6483
|
+
if (pattern_op === "@" || pattern_op === rule_op) {
|
|
6484
|
+
return jsonLogic.rule_like(
|
|
6485
|
+
jsonLogic.get_values(rule, false),
|
|
6486
|
+
jsonLogic.get_values(pattern, false)
|
|
6487
|
+
);
|
|
6488
|
+
}
|
|
6489
|
+
}
|
|
6490
|
+
return false;
|
|
6491
|
+
}
|
|
6492
|
+
if (Array.isArray(pattern)) {
|
|
6493
|
+
if (Array.isArray(rule)) {
|
|
6494
|
+
if (pattern.length !== rule.length) {
|
|
6495
|
+
return false;
|
|
6496
|
+
}
|
|
6497
|
+
for (var i = 0; i < pattern.length; i += 1) {
|
|
6498
|
+
if (!jsonLogic.rule_like(rule[i], pattern[i])) {
|
|
6499
|
+
return false;
|
|
6500
|
+
}
|
|
6501
|
+
}
|
|
6502
|
+
return true;
|
|
6503
|
+
} else {
|
|
6504
|
+
return false;
|
|
6505
|
+
}
|
|
6506
|
+
}
|
|
6507
|
+
return false;
|
|
6508
|
+
};
|
|
6509
|
+
return jsonLogic;
|
|
6510
|
+
});
|
|
6511
|
+
}
|
|
6512
|
+
});
|
|
6513
|
+
|
|
6514
|
+
// ../../node_modules/.pnpm/mixpanel@0.20.0/node_modules/mixpanel/lib/flags/local_flags.js
|
|
6011
6515
|
var require_local_flags = __commonJS({
|
|
6012
|
-
"../../node_modules/.pnpm/mixpanel@0.
|
|
6516
|
+
"../../node_modules/.pnpm/mixpanel@0.20.0/node_modules/mixpanel/lib/flags/local_flags.js"(exports$1, module) {
|
|
6013
6517
|
var FeatureFlagsProvider = require_flags();
|
|
6014
|
-
var {
|
|
6518
|
+
var {
|
|
6519
|
+
normalizedHash,
|
|
6520
|
+
lowercaseAllKeysAndValues,
|
|
6521
|
+
lowercaseLeafNodes
|
|
6522
|
+
} = require_utils2();
|
|
6523
|
+
var { apply } = require_logic();
|
|
6015
6524
|
var LocalFeatureFlagsProvider = class extends FeatureFlagsProvider {
|
|
6016
6525
|
/**
|
|
6017
6526
|
* @param {string} token - Mixpanel project token
|
|
@@ -6050,12 +6559,16 @@ var require_local_flags = __commonJS({
|
|
|
6050
6559
|
try {
|
|
6051
6560
|
await this._fetchFlagDefinitions();
|
|
6052
6561
|
} catch (err) {
|
|
6053
|
-
this.logger?.error(
|
|
6562
|
+
this.logger?.error(
|
|
6563
|
+
`Error polling for flag definition: ${err.message}`
|
|
6564
|
+
);
|
|
6054
6565
|
}
|
|
6055
6566
|
}, this.config.polling_interval_in_seconds * 1e3);
|
|
6056
6567
|
}
|
|
6057
6568
|
} catch (err) {
|
|
6058
|
-
this.logger?.error(
|
|
6569
|
+
this.logger?.error(
|
|
6570
|
+
`Initial flag definitions fetch failed: ${err.message}`
|
|
6571
|
+
);
|
|
6059
6572
|
}
|
|
6060
6573
|
}
|
|
6061
6574
|
/**
|
|
@@ -6066,7 +6579,9 @@ var require_local_flags = __commonJS({
|
|
|
6066
6579
|
clearInterval(this.pollingInterval);
|
|
6067
6580
|
this.pollingInterval = null;
|
|
6068
6581
|
} else {
|
|
6069
|
-
this.logger?.warn(
|
|
6582
|
+
this.logger?.warn(
|
|
6583
|
+
"stopPollingForDefinitions called but polling was not active"
|
|
6584
|
+
);
|
|
6070
6585
|
}
|
|
6071
6586
|
}
|
|
6072
6587
|
/**
|
|
@@ -6091,7 +6606,12 @@ var require_local_flags = __commonJS({
|
|
|
6091
6606
|
* @returns {*} The variant value
|
|
6092
6607
|
*/
|
|
6093
6608
|
getVariantValue(flagKey, fallbackValue, context, reportExposure = true) {
|
|
6094
|
-
const result = this.getVariant(
|
|
6609
|
+
const result = this.getVariant(
|
|
6610
|
+
flagKey,
|
|
6611
|
+
{ variant_value: fallbackValue },
|
|
6612
|
+
context,
|
|
6613
|
+
reportExposure
|
|
6614
|
+
);
|
|
6095
6615
|
return result.variant_value;
|
|
6096
6616
|
}
|
|
6097
6617
|
/**
|
|
@@ -6122,7 +6642,12 @@ var require_local_flags = __commonJS({
|
|
|
6122
6642
|
} else {
|
|
6123
6643
|
const rollout = this._getAssignedRollout(flag, contextValue, context);
|
|
6124
6644
|
if (rollout) {
|
|
6125
|
-
selectedVariant = this._getAssignedVariant(
|
|
6645
|
+
selectedVariant = this._getAssignedVariant(
|
|
6646
|
+
flag,
|
|
6647
|
+
contextValue,
|
|
6648
|
+
flagKey,
|
|
6649
|
+
rollout
|
|
6650
|
+
);
|
|
6126
6651
|
}
|
|
6127
6652
|
}
|
|
6128
6653
|
if (selectedVariant) {
|
|
@@ -6217,7 +6742,10 @@ var require_local_flags = __commonJS({
|
|
|
6217
6742
|
}
|
|
6218
6743
|
_getAssignedVariant(flag, contextValue, flagKey, rollout) {
|
|
6219
6744
|
if (rollout.variant_override) {
|
|
6220
|
-
const variant = this._getMatchingVariant(
|
|
6745
|
+
const variant = this._getMatchingVariant(
|
|
6746
|
+
rollout.variant_override.key,
|
|
6747
|
+
flag
|
|
6748
|
+
);
|
|
6221
6749
|
if (variant) {
|
|
6222
6750
|
return { ...variant, is_qa_tester: false };
|
|
6223
6751
|
}
|
|
@@ -6250,15 +6778,41 @@ var require_local_flags = __commonJS({
|
|
|
6250
6778
|
is_qa_tester: false
|
|
6251
6779
|
};
|
|
6252
6780
|
}
|
|
6781
|
+
_extractRuntimeParameters(context) {
|
|
6782
|
+
const customProperties = context.custom_properties;
|
|
6783
|
+
if (!customProperties || typeof customProperties !== "object") {
|
|
6784
|
+
return null;
|
|
6785
|
+
}
|
|
6786
|
+
return lowercaseAllKeysAndValues(customProperties);
|
|
6787
|
+
}
|
|
6788
|
+
_isRuntimeRuleSatisfied(rollout, context) {
|
|
6789
|
+
try {
|
|
6790
|
+
return apply(
|
|
6791
|
+
lowercaseLeafNodes(rollout.runtime_evaluation_rule),
|
|
6792
|
+
this._extractRuntimeParameters(context)
|
|
6793
|
+
);
|
|
6794
|
+
} catch (error) {
|
|
6795
|
+
this.logger?.error(`Error evaluating runtime rule: ${error.message}`);
|
|
6796
|
+
return false;
|
|
6797
|
+
}
|
|
6798
|
+
}
|
|
6253
6799
|
_isRuntimeEvaluationSatisfied(rollout, context) {
|
|
6254
|
-
if (
|
|
6800
|
+
if (rollout.runtime_evaluation_rule) {
|
|
6801
|
+
return this._isRuntimeRuleSatisfied(rollout, context);
|
|
6802
|
+
} else if (rollout.runtime_evaluation_definition) {
|
|
6803
|
+
return this._isLegacyRuntimeEvaluationSatisfied(rollout, context);
|
|
6804
|
+
} else {
|
|
6255
6805
|
return true;
|
|
6256
6806
|
}
|
|
6257
|
-
|
|
6258
|
-
|
|
6807
|
+
}
|
|
6808
|
+
_isLegacyRuntimeEvaluationSatisfied(rollout, context) {
|
|
6809
|
+
const customProperties = this._extractRuntimeParameters(context);
|
|
6810
|
+
if (!customProperties) {
|
|
6259
6811
|
return false;
|
|
6260
6812
|
}
|
|
6261
|
-
for (const [key, expectedValue] of Object.entries(
|
|
6813
|
+
for (const [key, expectedValue] of Object.entries(
|
|
6814
|
+
rollout.runtime_evaluation_definition
|
|
6815
|
+
)) {
|
|
6262
6816
|
if (!(key in customProperties)) {
|
|
6263
6817
|
return false;
|
|
6264
6818
|
}
|
|
@@ -6274,9 +6828,9 @@ var require_local_flags = __commonJS({
|
|
|
6274
6828
|
}
|
|
6275
6829
|
});
|
|
6276
6830
|
|
|
6277
|
-
// ../../node_modules/.pnpm/mixpanel@0.
|
|
6831
|
+
// ../../node_modules/.pnpm/mixpanel@0.20.0/node_modules/mixpanel/lib/flags/remote_flags.js
|
|
6278
6832
|
var require_remote_flags = __commonJS({
|
|
6279
|
-
"../../node_modules/.pnpm/mixpanel@0.
|
|
6833
|
+
"../../node_modules/.pnpm/mixpanel@0.20.0/node_modules/mixpanel/lib/flags/remote_flags.js"(exports$1, module) {
|
|
6280
6834
|
var FeatureFlagsProvider = require_flags();
|
|
6281
6835
|
var RemoteFeatureFlagsProvider = class extends FeatureFlagsProvider {
|
|
6282
6836
|
/**
|
|
@@ -6310,10 +6864,17 @@ var require_remote_flags = __commonJS({
|
|
|
6310
6864
|
*/
|
|
6311
6865
|
async getVariantValue(flagKey, fallbackValue, context, reportExposure = true) {
|
|
6312
6866
|
try {
|
|
6313
|
-
const selectedVariant = await this.getVariant(
|
|
6867
|
+
const selectedVariant = await this.getVariant(
|
|
6868
|
+
flagKey,
|
|
6869
|
+
{ variant_value: fallbackValue },
|
|
6870
|
+
context,
|
|
6871
|
+
reportExposure
|
|
6872
|
+
);
|
|
6314
6873
|
return selectedVariant.variant_value;
|
|
6315
6874
|
} catch (err) {
|
|
6316
|
-
this.logger?.error(
|
|
6875
|
+
this.logger?.error(
|
|
6876
|
+
`Failed to get variant value for flag '${flagKey}': ${err.message}`
|
|
6877
|
+
);
|
|
6317
6878
|
return fallbackValue;
|
|
6318
6879
|
}
|
|
6319
6880
|
}
|
|
@@ -6342,7 +6903,9 @@ var require_remote_flags = __commonJS({
|
|
|
6342
6903
|
}
|
|
6343
6904
|
return selectedVariant;
|
|
6344
6905
|
} catch (err) {
|
|
6345
|
-
this.logger?.error(
|
|
6906
|
+
this.logger?.error(
|
|
6907
|
+
`Failed to get variant for flag '${flagKey}': ${err.message}`
|
|
6908
|
+
);
|
|
6346
6909
|
return fallbackVariant;
|
|
6347
6910
|
}
|
|
6348
6911
|
}
|
|
@@ -6359,7 +6922,9 @@ var require_remote_flags = __commonJS({
|
|
|
6359
6922
|
const value = await this.getVariantValue(flagKey, false, context);
|
|
6360
6923
|
return value === true;
|
|
6361
6924
|
} catch (err) {
|
|
6362
|
-
this.logger?.error(
|
|
6925
|
+
this.logger?.error(
|
|
6926
|
+
`Failed to check if flag '${flagKey}' is enabled: ${err.message}`
|
|
6927
|
+
);
|
|
6363
6928
|
return false;
|
|
6364
6929
|
}
|
|
6365
6930
|
}
|
|
@@ -6398,9 +6963,9 @@ var require_remote_flags = __commonJS({
|
|
|
6398
6963
|
}
|
|
6399
6964
|
});
|
|
6400
6965
|
|
|
6401
|
-
// ../../node_modules/.pnpm/mixpanel@0.
|
|
6966
|
+
// ../../node_modules/.pnpm/mixpanel@0.20.0/node_modules/mixpanel/lib/flags/index.js
|
|
6402
6967
|
var require_flags2 = __commonJS({
|
|
6403
|
-
"../../node_modules/.pnpm/mixpanel@0.
|
|
6968
|
+
"../../node_modules/.pnpm/mixpanel@0.20.0/node_modules/mixpanel/lib/flags/index.js"(exports$1, module) {
|
|
6404
6969
|
var LocalFeatureFlagsProvider = require_local_flags();
|
|
6405
6970
|
var RemoteFeatureFlagsProvider = require_remote_flags();
|
|
6406
6971
|
module.exports = {
|
|
@@ -6410,9 +6975,9 @@ var require_flags2 = __commonJS({
|
|
|
6410
6975
|
}
|
|
6411
6976
|
});
|
|
6412
6977
|
|
|
6413
|
-
// ../../node_modules/.pnpm/mixpanel@0.
|
|
6978
|
+
// ../../node_modules/.pnpm/mixpanel@0.20.0/node_modules/mixpanel/lib/mixpanel-node.js
|
|
6414
6979
|
var require_mixpanel_node = __commonJS({
|
|
6415
|
-
"../../node_modules/.pnpm/mixpanel@0.
|
|
6980
|
+
"../../node_modules/.pnpm/mixpanel@0.20.0/node_modules/mixpanel/lib/mixpanel-node.js"(exports$1, module) {
|
|
6416
6981
|
var querystring = __require("querystring");
|
|
6417
6982
|
var Buffer4 = __require("buffer").Buffer;
|
|
6418
6983
|
var http3 = __require("http");
|
|
@@ -6423,7 +6988,10 @@ var require_mixpanel_node = __commonJS({
|
|
|
6423
6988
|
var { async_all, ensure_timestamp, assert_logger } = require_utils();
|
|
6424
6989
|
var { MixpanelGroups } = require_groups();
|
|
6425
6990
|
var { MixpanelPeople } = require_people();
|
|
6426
|
-
var {
|
|
6991
|
+
var {
|
|
6992
|
+
LocalFeatureFlagsProvider,
|
|
6993
|
+
RemoteFeatureFlagsProvider
|
|
6994
|
+
} = require_flags2();
|
|
6427
6995
|
var DEFAULT_CONFIG = {
|
|
6428
6996
|
test: false,
|
|
6429
6997
|
debug: false,
|
|
@@ -6439,7 +7007,9 @@ var require_mixpanel_node = __commonJS({
|
|
|
6439
7007
|
};
|
|
6440
7008
|
var create_client = function(token, config) {
|
|
6441
7009
|
if (!token) {
|
|
6442
|
-
throw new Error(
|
|
7010
|
+
throw new Error(
|
|
7011
|
+
"The Mixpanel Client needs a Mixpanel token: `init(token)`"
|
|
7012
|
+
);
|
|
6443
7013
|
}
|
|
6444
7014
|
const metrics = {
|
|
6445
7015
|
token,
|
|
@@ -6453,9 +7023,11 @@ var require_mixpanel_node = __commonJS({
|
|
|
6453
7023
|
https: new https3.Agent({ keepAlive })
|
|
6454
7024
|
};
|
|
6455
7025
|
const proxyPath = process.env.HTTPS_PROXY || process.env.HTTP_PROXY;
|
|
6456
|
-
const proxyAgent = proxyPath ? new HttpsProxyAgent(
|
|
6457
|
-
|
|
6458
|
-
|
|
7026
|
+
const proxyAgent = proxyPath ? new HttpsProxyAgent(
|
|
7027
|
+
Object.assign(url.parse(proxyPath), {
|
|
7028
|
+
keepAlive
|
|
7029
|
+
})
|
|
7030
|
+
) : null;
|
|
6459
7031
|
metrics.send_request = function(options, callback) {
|
|
6460
7032
|
callback = callback || function() {
|
|
6461
7033
|
};
|
|
@@ -6463,8 +7035,8 @@ var require_mixpanel_node = __commonJS({
|
|
|
6463
7035
|
const endpoint = options.endpoint;
|
|
6464
7036
|
const method = (options.method || "GET").toUpperCase();
|
|
6465
7037
|
let query_params = {
|
|
6466
|
-
|
|
6467
|
-
|
|
7038
|
+
ip: metrics.config.geolocate ? 1 : 0,
|
|
7039
|
+
verbose: metrics.config.verbose ? 1 : 0
|
|
6468
7040
|
};
|
|
6469
7041
|
const key = metrics.config.key;
|
|
6470
7042
|
const secret = metrics.config.secret;
|
|
@@ -6497,7 +7069,9 @@ var require_mixpanel_node = __commonJS({
|
|
|
6497
7069
|
} else if (key) {
|
|
6498
7070
|
query_params.api_key = key;
|
|
6499
7071
|
} else if (endpoint === "/import") {
|
|
6500
|
-
throw new Error(
|
|
7072
|
+
throw new Error(
|
|
7073
|
+
"The Mixpanel Client needs a Mixpanel API Secret when importing old events: `init(token, { secret: ... })`"
|
|
7074
|
+
);
|
|
6501
7075
|
}
|
|
6502
7076
|
request_options.agent = proxyAgent || REQUEST_AGENTS[metrics.config.protocol];
|
|
6503
7077
|
if (metrics.config.test) {
|
|
@@ -6505,20 +7079,22 @@ var require_mixpanel_node = __commonJS({
|
|
|
6505
7079
|
}
|
|
6506
7080
|
request_options.path = metrics.config.path + endpoint + "?" + querystring.stringify(query_params);
|
|
6507
7081
|
request = request_lib.request(request_options, function(res) {
|
|
6508
|
-
|
|
7082
|
+
let data = "";
|
|
6509
7083
|
res.on("data", function(chunk3) {
|
|
6510
7084
|
data += chunk3;
|
|
6511
7085
|
});
|
|
6512
7086
|
res.on("end", function() {
|
|
6513
|
-
|
|
7087
|
+
let e;
|
|
6514
7088
|
if (metrics.config.verbose) {
|
|
6515
7089
|
try {
|
|
6516
|
-
|
|
7090
|
+
const result = JSON.parse(data);
|
|
6517
7091
|
if (result.status != 1) {
|
|
6518
7092
|
e = new Error("Mixpanel Server Error: " + result.error);
|
|
6519
7093
|
}
|
|
6520
7094
|
} catch (ex) {
|
|
6521
|
-
e = new Error(
|
|
7095
|
+
e = new Error(
|
|
7096
|
+
"Could not parse response from Mixpanel " + ex.message
|
|
7097
|
+
);
|
|
6522
7098
|
}
|
|
6523
7099
|
} else {
|
|
6524
7100
|
e = data !== "1" ? new Error("Mixpanel Server Error: " + data) : void 0;
|
|
@@ -6541,39 +7117,46 @@ var require_mixpanel_node = __commonJS({
|
|
|
6541
7117
|
properties.token = metrics.token;
|
|
6542
7118
|
properties.mp_lib = "node";
|
|
6543
7119
|
properties.$lib_version = packageInfo.version;
|
|
6544
|
-
|
|
7120
|
+
const data = {
|
|
6545
7121
|
event,
|
|
6546
7122
|
properties
|
|
6547
7123
|
};
|
|
6548
7124
|
if (metrics.config.debug) {
|
|
6549
|
-
metrics.config.logger.debug("Sending the following event to Mixpanel", {
|
|
7125
|
+
metrics.config.logger.debug("Sending the following event to Mixpanel", {
|
|
7126
|
+
data
|
|
7127
|
+
});
|
|
6550
7128
|
}
|
|
6551
|
-
metrics.send_request(
|
|
7129
|
+
metrics.send_request(
|
|
7130
|
+
{ method: "GET", endpoint, data },
|
|
7131
|
+
callback
|
|
7132
|
+
);
|
|
6552
7133
|
};
|
|
6553
|
-
|
|
6554
|
-
|
|
7134
|
+
const chunk2 = function(arr, size) {
|
|
7135
|
+
let chunks = [], i = 0, total = arr.length;
|
|
6555
7136
|
while (i < total) {
|
|
6556
7137
|
chunks.push(arr.slice(i, i += size));
|
|
6557
7138
|
}
|
|
6558
7139
|
return chunks;
|
|
6559
7140
|
};
|
|
6560
|
-
|
|
6561
|
-
|
|
7141
|
+
const send_batch_requests = function(options, callback) {
|
|
7142
|
+
const event_list = options.event_list, endpoint = options.endpoint, max_batch_size = options.max_batch_size ? Math.min(MAX_BATCH_SIZE, options.max_batch_size) : MAX_BATCH_SIZE, max_concurrent_requests = options.max_concurrent_requests || options.max_batch_size > MAX_BATCH_SIZE && Math.ceil(options.max_batch_size / MAX_BATCH_SIZE), event_batches = chunk2(event_list, max_batch_size), request_batches = max_concurrent_requests ? chunk2(event_batches, max_concurrent_requests) : [event_batches], total_event_batches = event_batches.length, total_request_batches = request_batches.length;
|
|
6562
7143
|
function send_event_batch(batch, cb) {
|
|
6563
7144
|
if (batch.length > 0) {
|
|
6564
7145
|
batch = batch.map(function(event) {
|
|
6565
|
-
event.properties;
|
|
6566
7146
|
if (endpoint === "/import" || event.properties.time) {
|
|
6567
7147
|
event.properties.time = ensure_timestamp(event.properties.time);
|
|
6568
7148
|
}
|
|
6569
7149
|
event.properties.token = event.properties.token || metrics.token;
|
|
6570
7150
|
return event;
|
|
6571
7151
|
});
|
|
6572
|
-
metrics.send_request(
|
|
7152
|
+
metrics.send_request(
|
|
7153
|
+
{ method: "POST", endpoint, data: batch },
|
|
7154
|
+
cb
|
|
7155
|
+
);
|
|
6573
7156
|
}
|
|
6574
7157
|
}
|
|
6575
7158
|
function send_next_request_batch(index) {
|
|
6576
|
-
|
|
7159
|
+
const request_batch = request_batches[index], cb = function(errors, results) {
|
|
6577
7160
|
index += 1;
|
|
6578
7161
|
if (index === total_request_batches) {
|
|
6579
7162
|
callback && callback(errors, results);
|
|
@@ -6606,7 +7189,7 @@ var require_mixpanel_node = __commonJS({
|
|
|
6606
7189
|
callback = options;
|
|
6607
7190
|
options = {};
|
|
6608
7191
|
}
|
|
6609
|
-
|
|
7192
|
+
const batch_options = {
|
|
6610
7193
|
event_list,
|
|
6611
7194
|
endpoint: "/track",
|
|
6612
7195
|
max_concurrent_requests: options.max_concurrent_requests,
|
|
@@ -6623,7 +7206,7 @@ var require_mixpanel_node = __commonJS({
|
|
|
6623
7206
|
metrics.send_event_request("/import", event, properties, callback);
|
|
6624
7207
|
};
|
|
6625
7208
|
metrics.import_batch = function(event_list, options, callback) {
|
|
6626
|
-
|
|
7209
|
+
let batch_options;
|
|
6627
7210
|
if (typeof options === "function" || !options) {
|
|
6628
7211
|
callback = options;
|
|
6629
7212
|
options = {};
|
|
@@ -6637,7 +7220,7 @@ var require_mixpanel_node = __commonJS({
|
|
|
6637
7220
|
send_batch_requests(batch_options, callback);
|
|
6638
7221
|
};
|
|
6639
7222
|
metrics.alias = function(distinct_id, alias, callback) {
|
|
6640
|
-
|
|
7223
|
+
const properties = {
|
|
6641
7224
|
distinct_id,
|
|
6642
7225
|
alias
|
|
6643
7226
|
};
|
|
@@ -8646,7 +9229,7 @@ var init_is_disjoint = __esm({
|
|
|
8646
9229
|
function isObjectLike(value) {
|
|
8647
9230
|
return typeof value === "object" && value !== null;
|
|
8648
9231
|
}
|
|
8649
|
-
function
|
|
9232
|
+
function isObject2(input) {
|
|
8650
9233
|
if (!isObjectLike(input) || Object.prototype.toString.call(input) !== "[object Object]") {
|
|
8651
9234
|
return false;
|
|
8652
9235
|
}
|
|
@@ -8666,7 +9249,7 @@ var init_is_object = __esm({
|
|
|
8666
9249
|
|
|
8667
9250
|
// ../../node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/lib/is_jwk.js
|
|
8668
9251
|
function isJWK(key) {
|
|
8669
|
-
return
|
|
9252
|
+
return isObject2(key) && typeof key.kty === "string";
|
|
8670
9253
|
}
|
|
8671
9254
|
function isPrivateJWK(key) {
|
|
8672
9255
|
return key.kty !== "oct" && typeof key.d === "string";
|
|
@@ -9310,7 +9893,7 @@ var init_produce = __esm({
|
|
|
9310
9893
|
ProduceJWT = class {
|
|
9311
9894
|
_payload;
|
|
9312
9895
|
constructor(payload = {}) {
|
|
9313
|
-
if (!
|
|
9896
|
+
if (!isObject2(payload)) {
|
|
9314
9897
|
throw new TypeError("JWT Claims Set MUST be an object");
|
|
9315
9898
|
}
|
|
9316
9899
|
this._payload = payload;
|
|
@@ -13365,10 +13948,10 @@ var init_esm4 = __esm({
|
|
|
13365
13948
|
}
|
|
13366
13949
|
});
|
|
13367
13950
|
|
|
13368
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.35.
|
|
13951
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.35.2/node_modules/@amplitude/analytics-core/lib/esm/types/event/event.js
|
|
13369
13952
|
var IdentifyOperation, SpecialEventType;
|
|
13370
13953
|
var init_event = __esm({
|
|
13371
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.35.
|
|
13954
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.35.2/node_modules/@amplitude/analytics-core/lib/esm/types/event/event.js"() {
|
|
13372
13955
|
(function(IdentifyOperation3) {
|
|
13373
13956
|
IdentifyOperation3["SET"] = "$set";
|
|
13374
13957
|
IdentifyOperation3["SET_ONCE"] = "$setOnce";
|
|
@@ -13389,10 +13972,10 @@ var init_event = __esm({
|
|
|
13389
13972
|
}
|
|
13390
13973
|
});
|
|
13391
13974
|
|
|
13392
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.35.
|
|
13975
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.35.2/node_modules/@amplitude/analytics-core/lib/esm/types/constants.js
|
|
13393
13976
|
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;
|
|
13394
13977
|
var init_constants = __esm({
|
|
13395
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.35.
|
|
13978
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.35.2/node_modules/@amplitude/analytics-core/lib/esm/types/constants.js"() {
|
|
13396
13979
|
UNSET_VALUE = "-";
|
|
13397
13980
|
AMPLITUDE_PREFIX = "AMP";
|
|
13398
13981
|
STORAGE_PREFIX = "".concat(AMPLITUDE_PREFIX, "_unsent");
|
|
@@ -13404,10 +13987,10 @@ var init_constants = __esm({
|
|
|
13404
13987
|
}
|
|
13405
13988
|
});
|
|
13406
13989
|
|
|
13407
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.35.
|
|
13990
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.35.2/node_modules/@amplitude/analytics-core/lib/esm/utils/valid-properties.js
|
|
13408
13991
|
var MAX_PROPERTY_KEYS, isValidObject, isValidProperties;
|
|
13409
13992
|
var init_valid_properties = __esm({
|
|
13410
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.35.
|
|
13993
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.35.2/node_modules/@amplitude/analytics-core/lib/esm/utils/valid-properties.js"() {
|
|
13411
13994
|
init_tslib_es6();
|
|
13412
13995
|
MAX_PROPERTY_KEYS = 1e3;
|
|
13413
13996
|
isValidObject = function(properties) {
|
|
@@ -13462,10 +14045,10 @@ var init_valid_properties = __esm({
|
|
|
13462
14045
|
}
|
|
13463
14046
|
});
|
|
13464
14047
|
|
|
13465
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.35.
|
|
14048
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.35.2/node_modules/@amplitude/analytics-core/lib/esm/identify.js
|
|
13466
14049
|
var Identify, IdentifyOperation2, OrderedIdentifyOperations;
|
|
13467
14050
|
var init_identify = __esm({
|
|
13468
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.35.
|
|
14051
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.35.2/node_modules/@amplitude/analytics-core/lib/esm/identify.js"() {
|
|
13469
14052
|
init_tslib_es6();
|
|
13470
14053
|
init_constants();
|
|
13471
14054
|
init_valid_properties();
|
|
@@ -13576,10 +14159,10 @@ var init_identify = __esm({
|
|
|
13576
14159
|
}
|
|
13577
14160
|
});
|
|
13578
14161
|
|
|
13579
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.35.
|
|
14162
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.35.2/node_modules/@amplitude/analytics-core/lib/esm/types/messages.js
|
|
13580
14163
|
var SUCCESS_MESSAGE, UNEXPECTED_ERROR_MESSAGE, MAX_RETRIES_EXCEEDED_MESSAGE, OPT_OUT_MESSAGE, MISSING_API_KEY_MESSAGE, INVALID_API_KEY, CLIENT_NOT_INITIALIZED;
|
|
13581
14164
|
var init_messages = __esm({
|
|
13582
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.35.
|
|
14165
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.35.2/node_modules/@amplitude/analytics-core/lib/esm/types/messages.js"() {
|
|
13583
14166
|
SUCCESS_MESSAGE = "Event tracked successfully";
|
|
13584
14167
|
UNEXPECTED_ERROR_MESSAGE = "Unexpected error occurred";
|
|
13585
14168
|
MAX_RETRIES_EXCEEDED_MESSAGE = "Event rejected due to exceeded retry count";
|
|
@@ -13590,10 +14173,10 @@ var init_messages = __esm({
|
|
|
13590
14173
|
}
|
|
13591
14174
|
});
|
|
13592
14175
|
|
|
13593
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.35.
|
|
14176
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.35.2/node_modules/@amplitude/analytics-core/lib/esm/types/status.js
|
|
13594
14177
|
var Status;
|
|
13595
14178
|
var init_status = __esm({
|
|
13596
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.35.
|
|
14179
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.35.2/node_modules/@amplitude/analytics-core/lib/esm/types/status.js"() {
|
|
13597
14180
|
(function(Status2) {
|
|
13598
14181
|
Status2["Unknown"] = "unknown";
|
|
13599
14182
|
Status2["Skipped"] = "skipped";
|
|
@@ -13608,10 +14191,10 @@ var init_status = __esm({
|
|
|
13608
14191
|
}
|
|
13609
14192
|
});
|
|
13610
14193
|
|
|
13611
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.35.
|
|
14194
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.35.2/node_modules/@amplitude/analytics-core/lib/esm/utils/result-builder.js
|
|
13612
14195
|
var buildResult;
|
|
13613
14196
|
var init_result_builder = __esm({
|
|
13614
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.35.
|
|
14197
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.35.2/node_modules/@amplitude/analytics-core/lib/esm/utils/result-builder.js"() {
|
|
13615
14198
|
init_status();
|
|
13616
14199
|
buildResult = function(event, code, message2) {
|
|
13617
14200
|
if (code === void 0) {
|
|
@@ -13625,10 +14208,10 @@ var init_result_builder = __esm({
|
|
|
13625
14208
|
}
|
|
13626
14209
|
});
|
|
13627
14210
|
|
|
13628
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.35.
|
|
14211
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.35.2/node_modules/@amplitude/analytics-core/lib/esm/global-scope.js
|
|
13629
14212
|
var getGlobalScope;
|
|
13630
14213
|
var init_global_scope = __esm({
|
|
13631
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.35.
|
|
14214
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.35.2/node_modules/@amplitude/analytics-core/lib/esm/global-scope.js"() {
|
|
13632
14215
|
getGlobalScope = function() {
|
|
13633
14216
|
var ampIntegrationContextName = "ampIntegrationContext";
|
|
13634
14217
|
if (typeof globalThis !== "undefined" && typeof globalThis[ampIntegrationContextName] !== "undefined") {
|
|
@@ -13651,10 +14234,10 @@ var init_global_scope = __esm({
|
|
|
13651
14234
|
}
|
|
13652
14235
|
});
|
|
13653
14236
|
|
|
13654
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.35.
|
|
14237
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.35.2/node_modules/@amplitude/analytics-core/lib/esm/utils/uuid.js
|
|
13655
14238
|
var legacyUUID, hex, UUID2;
|
|
13656
14239
|
var init_uuid2 = __esm({
|
|
13657
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.35.
|
|
14240
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.35.2/node_modules/@amplitude/analytics-core/lib/esm/utils/uuid.js"() {
|
|
13658
14241
|
init_tslib_es6();
|
|
13659
14242
|
init_global_scope();
|
|
13660
14243
|
legacyUUID = function(a) {
|
|
@@ -13698,10 +14281,10 @@ var init_uuid2 = __esm({
|
|
|
13698
14281
|
}
|
|
13699
14282
|
});
|
|
13700
14283
|
|
|
13701
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.35.
|
|
14284
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.35.2/node_modules/@amplitude/analytics-core/lib/esm/timeline.js
|
|
13702
14285
|
var Timeline;
|
|
13703
14286
|
var init_timeline = __esm({
|
|
13704
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.35.
|
|
14287
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.35.2/node_modules/@amplitude/analytics-core/lib/esm/timeline.js"() {
|
|
13705
14288
|
init_tslib_es6();
|
|
13706
14289
|
init_result_builder();
|
|
13707
14290
|
init_uuid2();
|
|
@@ -14003,10 +14586,10 @@ var init_timeline = __esm({
|
|
|
14003
14586
|
}
|
|
14004
14587
|
});
|
|
14005
14588
|
|
|
14006
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.35.
|
|
14589
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.35.2/node_modules/@amplitude/analytics-core/lib/esm/utils/event-builder.js
|
|
14007
14590
|
var createTrackEvent, createIdentifyEvent, createGroupIdentifyEvent, createGroupEvent, createRevenueEvent;
|
|
14008
14591
|
var init_event_builder = __esm({
|
|
14009
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.35.
|
|
14592
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.35.2/node_modules/@amplitude/analytics-core/lib/esm/utils/event-builder.js"() {
|
|
14010
14593
|
init_tslib_es6();
|
|
14011
14594
|
init_identify();
|
|
14012
14595
|
init_event();
|
|
@@ -14036,10 +14619,10 @@ var init_event_builder = __esm({
|
|
|
14036
14619
|
}
|
|
14037
14620
|
});
|
|
14038
14621
|
|
|
14039
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.35.
|
|
14622
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.35.2/node_modules/@amplitude/analytics-core/lib/esm/utils/return-wrapper.js
|
|
14040
14623
|
var returnWrapper;
|
|
14041
14624
|
var init_return_wrapper = __esm({
|
|
14042
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.35.
|
|
14625
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.35.2/node_modules/@amplitude/analytics-core/lib/esm/utils/return-wrapper.js"() {
|
|
14043
14626
|
returnWrapper = function(awaitable) {
|
|
14044
14627
|
return {
|
|
14045
14628
|
promise: awaitable || Promise.resolve()
|
|
@@ -14048,10 +14631,10 @@ var init_return_wrapper = __esm({
|
|
|
14048
14631
|
}
|
|
14049
14632
|
});
|
|
14050
14633
|
|
|
14051
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.35.
|
|
14634
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.35.2/node_modules/@amplitude/analytics-core/lib/esm/core-client.js
|
|
14052
14635
|
var AmplitudeCore;
|
|
14053
14636
|
var init_core_client = __esm({
|
|
14054
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.35.
|
|
14637
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.35.2/node_modules/@amplitude/analytics-core/lib/esm/core-client.js"() {
|
|
14055
14638
|
init_tslib_es6();
|
|
14056
14639
|
init_event();
|
|
14057
14640
|
init_identify();
|
|
@@ -14319,10 +14902,10 @@ var init_core_client = __esm({
|
|
|
14319
14902
|
}
|
|
14320
14903
|
});
|
|
14321
14904
|
|
|
14322
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.35.
|
|
14905
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.35.2/node_modules/@amplitude/analytics-core/lib/esm/revenue.js
|
|
14323
14906
|
var Revenue, RevenueProperty;
|
|
14324
14907
|
var init_revenue = __esm({
|
|
14325
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.35.
|
|
14908
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.35.2/node_modules/@amplitude/analytics-core/lib/esm/revenue.js"() {
|
|
14326
14909
|
init_tslib_es6();
|
|
14327
14910
|
init_valid_properties();
|
|
14328
14911
|
Revenue = /** @class */
|
|
@@ -14399,10 +14982,10 @@ var init_revenue = __esm({
|
|
|
14399
14982
|
}
|
|
14400
14983
|
});
|
|
14401
14984
|
|
|
14402
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.35.
|
|
14985
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.35.2/node_modules/@amplitude/analytics-core/lib/esm/utils/chunk.js
|
|
14403
14986
|
var chunk;
|
|
14404
14987
|
var init_chunk = __esm({
|
|
14405
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.35.
|
|
14988
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.35.2/node_modules/@amplitude/analytics-core/lib/esm/utils/chunk.js"() {
|
|
14406
14989
|
chunk = function(arr, size) {
|
|
14407
14990
|
var chunkSize = Math.max(size, 1);
|
|
14408
14991
|
return arr.reduce(function(chunks, element, index) {
|
|
@@ -14417,10 +15000,10 @@ var init_chunk = __esm({
|
|
|
14417
15000
|
}
|
|
14418
15001
|
});
|
|
14419
15002
|
|
|
14420
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.35.
|
|
15003
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.35.2/node_modules/@amplitude/analytics-core/lib/esm/types/loglevel.js
|
|
14421
15004
|
var LogLevel;
|
|
14422
15005
|
var init_loglevel = __esm({
|
|
14423
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.35.
|
|
15006
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.35.2/node_modules/@amplitude/analytics-core/lib/esm/types/loglevel.js"() {
|
|
14424
15007
|
(function(LogLevel2) {
|
|
14425
15008
|
LogLevel2[LogLevel2["None"] = 0] = "None";
|
|
14426
15009
|
LogLevel2[LogLevel2["Error"] = 1] = "Error";
|
|
@@ -14431,10 +15014,10 @@ var init_loglevel = __esm({
|
|
|
14431
15014
|
}
|
|
14432
15015
|
});
|
|
14433
15016
|
|
|
14434
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.35.
|
|
15017
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.35.2/node_modules/@amplitude/analytics-core/lib/esm/logger.js
|
|
14435
15018
|
var PREFIX, Logger;
|
|
14436
15019
|
var init_logger3 = __esm({
|
|
14437
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.35.
|
|
15020
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.35.2/node_modules/@amplitude/analytics-core/lib/esm/logger.js"() {
|
|
14438
15021
|
init_loglevel();
|
|
14439
15022
|
PREFIX = "Amplitude Logger ";
|
|
14440
15023
|
Logger = /** @class */
|
|
@@ -14496,10 +15079,10 @@ var init_logger3 = __esm({
|
|
|
14496
15079
|
}
|
|
14497
15080
|
});
|
|
14498
15081
|
|
|
14499
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.35.
|
|
15082
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.35.2/node_modules/@amplitude/analytics-core/lib/esm/config.js
|
|
14500
15083
|
var getDefaultConfig, Config, getServerUrl, createServerConfig, RequestMetadata;
|
|
14501
15084
|
var init_config = __esm({
|
|
14502
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.35.
|
|
15085
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.35.2/node_modules/@amplitude/analytics-core/lib/esm/config.js"() {
|
|
14503
15086
|
init_constants();
|
|
14504
15087
|
init_logger3();
|
|
14505
15088
|
init_loglevel();
|
|
@@ -14600,19 +15183,19 @@ var init_config = __esm({
|
|
|
14600
15183
|
}
|
|
14601
15184
|
});
|
|
14602
15185
|
|
|
14603
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.35.
|
|
15186
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.35.2/node_modules/@amplitude/analytics-core/lib/esm/utils/status-code.js
|
|
14604
15187
|
function isSuccessStatusCode(code) {
|
|
14605
15188
|
return code >= 200 && code < 300;
|
|
14606
15189
|
}
|
|
14607
15190
|
var init_status_code = __esm({
|
|
14608
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.35.
|
|
15191
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.35.2/node_modules/@amplitude/analytics-core/lib/esm/utils/status-code.js"() {
|
|
14609
15192
|
}
|
|
14610
15193
|
});
|
|
14611
15194
|
|
|
14612
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.35.
|
|
15195
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.35.2/node_modules/@amplitude/analytics-core/lib/esm/utils/debug.js
|
|
14613
15196
|
var getStacktrace, getClientLogConfig, getValueByStringPath, getClientStates, debugWrapper;
|
|
14614
15197
|
var init_debug = __esm({
|
|
14615
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.35.
|
|
15198
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.35.2/node_modules/@amplitude/analytics-core/lib/esm/utils/debug.js"() {
|
|
14616
15199
|
init_tslib_es6();
|
|
14617
15200
|
init_loglevel();
|
|
14618
15201
|
getStacktrace = function(ignoreDepth) {
|
|
@@ -14730,7 +15313,7 @@ var init_debug = __esm({
|
|
|
14730
15313
|
}
|
|
14731
15314
|
});
|
|
14732
15315
|
|
|
14733
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.35.
|
|
15316
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.35.2/node_modules/@amplitude/analytics-core/lib/esm/plugins/destination.js
|
|
14734
15317
|
function getErrorMessage(error) {
|
|
14735
15318
|
if (error instanceof Error)
|
|
14736
15319
|
return error.message;
|
|
@@ -14748,7 +15331,7 @@ function getResponseBodyString(res) {
|
|
|
14748
15331
|
}
|
|
14749
15332
|
var Destination;
|
|
14750
15333
|
var init_destination = __esm({
|
|
14751
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.35.
|
|
15334
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.35.2/node_modules/@amplitude/analytics-core/lib/esm/plugins/destination.js"() {
|
|
14752
15335
|
init_tslib_es6();
|
|
14753
15336
|
init_status();
|
|
14754
15337
|
init_messages();
|
|
@@ -15139,10 +15722,10 @@ var init_destination = __esm({
|
|
|
15139
15722
|
}
|
|
15140
15723
|
});
|
|
15141
15724
|
|
|
15142
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.35.
|
|
15725
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.35.2/node_modules/@amplitude/analytics-core/lib/esm/transports/base.js
|
|
15143
15726
|
var BaseTransport;
|
|
15144
15727
|
var init_base2 = __esm({
|
|
15145
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.35.
|
|
15728
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.35.2/node_modules/@amplitude/analytics-core/lib/esm/transports/base.js"() {
|
|
15146
15729
|
init_status();
|
|
15147
15730
|
init_status_code();
|
|
15148
15731
|
BaseTransport = /** @class */
|
|
@@ -15244,10 +15827,10 @@ var init_base2 = __esm({
|
|
|
15244
15827
|
}
|
|
15245
15828
|
});
|
|
15246
15829
|
|
|
15247
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.35.
|
|
15830
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.35.2/node_modules/@amplitude/analytics-core/lib/esm/types/server-zone.js
|
|
15248
15831
|
var ServerZone;
|
|
15249
15832
|
var init_server_zone = __esm({
|
|
15250
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.35.
|
|
15833
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.35.2/node_modules/@amplitude/analytics-core/lib/esm/types/server-zone.js"() {
|
|
15251
15834
|
(function(ServerZone2) {
|
|
15252
15835
|
ServerZone2["US"] = "US";
|
|
15253
15836
|
ServerZone2["EU"] = "EU";
|
|
@@ -15256,17 +15839,17 @@ var init_server_zone = __esm({
|
|
|
15256
15839
|
}
|
|
15257
15840
|
});
|
|
15258
15841
|
|
|
15259
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.35.
|
|
15842
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.35.2/node_modules/@amplitude/analytics-core/lib/esm/types/offline.js
|
|
15260
15843
|
var OfflineDisabled;
|
|
15261
15844
|
var init_offline = __esm({
|
|
15262
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.35.
|
|
15845
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.35.2/node_modules/@amplitude/analytics-core/lib/esm/types/offline.js"() {
|
|
15263
15846
|
OfflineDisabled = null;
|
|
15264
15847
|
}
|
|
15265
15848
|
});
|
|
15266
15849
|
|
|
15267
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.35.
|
|
15850
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.35.2/node_modules/@amplitude/analytics-core/lib/esm/index.js
|
|
15268
15851
|
var init_esm5 = __esm({
|
|
15269
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.35.
|
|
15852
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.35.2/node_modules/@amplitude/analytics-core/lib/esm/index.js"() {
|
|
15270
15853
|
init_core_client();
|
|
15271
15854
|
init_identify();
|
|
15272
15855
|
init_revenue();
|
|
@@ -15283,18 +15866,18 @@ var init_esm5 = __esm({
|
|
|
15283
15866
|
}
|
|
15284
15867
|
});
|
|
15285
15868
|
|
|
15286
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-node@1.5.
|
|
15869
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-node@1.5.31/node_modules/@amplitude/analytics-node/lib/esm/version.js
|
|
15287
15870
|
var VERSION;
|
|
15288
15871
|
var init_version3 = __esm({
|
|
15289
|
-
"../../node_modules/.pnpm/@amplitude+analytics-node@1.5.
|
|
15290
|
-
VERSION = "1.5.
|
|
15872
|
+
"../../node_modules/.pnpm/@amplitude+analytics-node@1.5.31/node_modules/@amplitude/analytics-node/lib/esm/version.js"() {
|
|
15873
|
+
VERSION = "1.5.31";
|
|
15291
15874
|
}
|
|
15292
15875
|
});
|
|
15293
15876
|
|
|
15294
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-node@1.5.
|
|
15877
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-node@1.5.31/node_modules/@amplitude/analytics-node/lib/esm/plugins/context.js
|
|
15295
15878
|
var Context2;
|
|
15296
15879
|
var init_context4 = __esm({
|
|
15297
|
-
"../../node_modules/.pnpm/@amplitude+analytics-node@1.5.
|
|
15880
|
+
"../../node_modules/.pnpm/@amplitude+analytics-node@1.5.31/node_modules/@amplitude/analytics-node/lib/esm/plugins/context.js"() {
|
|
15298
15881
|
init_tslib_es6();
|
|
15299
15882
|
init_esm5();
|
|
15300
15883
|
init_version3();
|
|
@@ -15329,7 +15912,7 @@ var init_context4 = __esm({
|
|
|
15329
15912
|
});
|
|
15330
15913
|
var Http;
|
|
15331
15914
|
var init_http = __esm({
|
|
15332
|
-
"../../node_modules/.pnpm/@amplitude+analytics-node@1.5.
|
|
15915
|
+
"../../node_modules/.pnpm/@amplitude+analytics-node@1.5.31/node_modules/@amplitude/analytics-node/lib/esm/transports/http.js"() {
|
|
15333
15916
|
init_tslib_es6();
|
|
15334
15917
|
init_esm5();
|
|
15335
15918
|
Http = /** @class */
|
|
@@ -15391,10 +15974,10 @@ var init_http = __esm({
|
|
|
15391
15974
|
}
|
|
15392
15975
|
});
|
|
15393
15976
|
|
|
15394
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-node@1.5.
|
|
15977
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-node@1.5.31/node_modules/@amplitude/analytics-node/lib/esm/config.js
|
|
15395
15978
|
var NodeConfig, useNodeConfig;
|
|
15396
15979
|
var init_config2 = __esm({
|
|
15397
|
-
"../../node_modules/.pnpm/@amplitude+analytics-node@1.5.
|
|
15980
|
+
"../../node_modules/.pnpm/@amplitude+analytics-node@1.5.31/node_modules/@amplitude/analytics-node/lib/esm/config.js"() {
|
|
15398
15981
|
init_tslib_es6();
|
|
15399
15982
|
init_esm5();
|
|
15400
15983
|
init_http();
|
|
@@ -15412,10 +15995,10 @@ var init_config2 = __esm({
|
|
|
15412
15995
|
}
|
|
15413
15996
|
});
|
|
15414
15997
|
|
|
15415
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-node@1.5.
|
|
15998
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-node@1.5.31/node_modules/@amplitude/analytics-node/lib/esm/node-client.js
|
|
15416
15999
|
var AmplitudeNode, createInstance, node_client_default;
|
|
15417
16000
|
var init_node_client = __esm({
|
|
15418
|
-
"../../node_modules/.pnpm/@amplitude+analytics-node@1.5.
|
|
16001
|
+
"../../node_modules/.pnpm/@amplitude+analytics-node@1.5.31/node_modules/@amplitude/analytics-node/lib/esm/node-client.js"() {
|
|
15419
16002
|
init_tslib_es6();
|
|
15420
16003
|
init_esm5();
|
|
15421
16004
|
init_context4();
|
|
@@ -15489,7 +16072,7 @@ var init_node_client = __esm({
|
|
|
15489
16072
|
}
|
|
15490
16073
|
});
|
|
15491
16074
|
|
|
15492
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-node@1.5.
|
|
16075
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-node@1.5.31/node_modules/@amplitude/analytics-node/lib/esm/types.js
|
|
15493
16076
|
var types_exports = {};
|
|
15494
16077
|
__export(types_exports, {
|
|
15495
16078
|
IdentifyOperation: () => IdentifyOperation,
|
|
@@ -15500,12 +16083,12 @@ __export(types_exports, {
|
|
|
15500
16083
|
SpecialEventType: () => SpecialEventType
|
|
15501
16084
|
});
|
|
15502
16085
|
var init_types4 = __esm({
|
|
15503
|
-
"../../node_modules/.pnpm/@amplitude+analytics-node@1.5.
|
|
16086
|
+
"../../node_modules/.pnpm/@amplitude+analytics-node@1.5.31/node_modules/@amplitude/analytics-node/lib/esm/types.js"() {
|
|
15504
16087
|
init_esm5();
|
|
15505
16088
|
}
|
|
15506
16089
|
});
|
|
15507
16090
|
|
|
15508
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-node@1.5.
|
|
16091
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-node@1.5.31/node_modules/@amplitude/analytics-node/lib/esm/index.js
|
|
15509
16092
|
var esm_exports2 = {};
|
|
15510
16093
|
__export(esm_exports2, {
|
|
15511
16094
|
Identify: () => Identify,
|
|
@@ -15526,7 +16109,7 @@ __export(esm_exports2, {
|
|
|
15526
16109
|
});
|
|
15527
16110
|
var add, groupIdentify, identify, init, logEvent, remove, revenue, setGroup, setOptOut, track, flush;
|
|
15528
16111
|
var init_esm6 = __esm({
|
|
15529
|
-
"../../node_modules/.pnpm/@amplitude+analytics-node@1.5.
|
|
16112
|
+
"../../node_modules/.pnpm/@amplitude+analytics-node@1.5.31/node_modules/@amplitude/analytics-node/lib/esm/index.js"() {
|
|
15530
16113
|
init_node_client();
|
|
15531
16114
|
init_node_client();
|
|
15532
16115
|
init_esm5();
|