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.cjs
CHANGED
|
@@ -115,11 +115,11 @@ function normalizeWindowsPath(path) {
|
|
|
115
115
|
return path.replace(/^[A-Z]:/, "").replace(/\\/g, "/");
|
|
116
116
|
}
|
|
117
117
|
var init_module_node = __esm({
|
|
118
|
-
"../../node_modules/.pnpm/posthog-node@5.
|
|
118
|
+
"../../node_modules/.pnpm/posthog-node@5.21.0/node_modules/posthog-node/dist/extensions/error-tracking/modifiers/module.node.mjs"() {
|
|
119
119
|
}
|
|
120
120
|
});
|
|
121
121
|
|
|
122
|
-
// ../../node_modules/.pnpm/@posthog+core@1.9.
|
|
122
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/featureFlagUtils.mjs
|
|
123
123
|
function getFlagDetailFromFlagAndPayload(key, value, payload) {
|
|
124
124
|
return {
|
|
125
125
|
key,
|
|
@@ -136,7 +136,7 @@ function getFlagDetailFromFlagAndPayload(key, value, payload) {
|
|
|
136
136
|
}
|
|
137
137
|
var normalizeFlagsResponse, getFlagValuesFromFlags, getPayloadsFromFlags, getFeatureFlagValue, parsePayload;
|
|
138
138
|
var init_featureFlagUtils = __esm({
|
|
139
|
-
"../../node_modules/.pnpm/@posthog+core@1.9.
|
|
139
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/featureFlagUtils.mjs"() {
|
|
140
140
|
normalizeFlagsResponse = (flagsResponse) => {
|
|
141
141
|
if ("flags" in flagsResponse) {
|
|
142
142
|
const featureFlags = getFlagValuesFromFlags(flagsResponse.flags);
|
|
@@ -194,10 +194,10 @@ var init_featureFlagUtils = __esm({
|
|
|
194
194
|
}
|
|
195
195
|
});
|
|
196
196
|
|
|
197
|
-
// ../../node_modules/.pnpm/@posthog+core@1.9.
|
|
197
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/vendor/uuidv7.mjs
|
|
198
198
|
var DIGITS, UUID, V7Generator, getDefaultRandom, defaultGenerator, uuidv7, uuidv7obj;
|
|
199
199
|
var init_uuidv7 = __esm({
|
|
200
|
-
"../../node_modules/.pnpm/@posthog+core@1.9.
|
|
200
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/vendor/uuidv7.mjs"() {
|
|
201
201
|
DIGITS = "0123456789abcdef";
|
|
202
202
|
UUID = class _UUID {
|
|
203
203
|
constructor(bytes) {
|
|
@@ -358,10 +358,10 @@ var init_uuidv7 = __esm({
|
|
|
358
358
|
}
|
|
359
359
|
});
|
|
360
360
|
|
|
361
|
-
// ../../node_modules/.pnpm/@posthog+core@1.9.
|
|
361
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/utils/bot-detection.mjs
|
|
362
362
|
var DEFAULT_BLOCKED_UA_STRS, isBlockedUA;
|
|
363
363
|
var init_bot_detection = __esm({
|
|
364
|
-
"../../node_modules/.pnpm/@posthog+core@1.9.
|
|
364
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/utils/bot-detection.mjs"() {
|
|
365
365
|
DEFAULT_BLOCKED_UA_STRS = [
|
|
366
366
|
"amazonbot",
|
|
367
367
|
"amazonproductbot",
|
|
@@ -452,10 +452,10 @@ var init_bot_detection = __esm({
|
|
|
452
452
|
}
|
|
453
453
|
});
|
|
454
454
|
|
|
455
|
-
// ../../node_modules/.pnpm/@posthog+core@1.9.
|
|
455
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/types.mjs
|
|
456
456
|
var types_PostHogPersistedProperty;
|
|
457
457
|
var init_types = __esm({
|
|
458
|
-
"../../node_modules/.pnpm/@posthog+core@1.9.
|
|
458
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/types.mjs"() {
|
|
459
459
|
types_PostHogPersistedProperty = /* @__PURE__ */ (function(PostHogPersistedProperty) {
|
|
460
460
|
PostHogPersistedProperty["AnonymousId"] = "anonymous_id";
|
|
461
461
|
PostHogPersistedProperty["DistinctId"] = "distinct_id";
|
|
@@ -487,20 +487,13 @@ var init_types = __esm({
|
|
|
487
487
|
}
|
|
488
488
|
});
|
|
489
489
|
|
|
490
|
-
// ../../node_modules/.pnpm/@posthog+core@1.9.
|
|
490
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/utils/string-utils.mjs
|
|
491
491
|
var init_string_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/string-utils.mjs"() {
|
|
493
493
|
}
|
|
494
494
|
});
|
|
495
495
|
|
|
496
|
-
// ../../node_modules/.pnpm/@posthog+core@1.9.
|
|
497
|
-
function isInstanceOf(candidate, base) {
|
|
498
|
-
try {
|
|
499
|
-
return candidate instanceof base;
|
|
500
|
-
} catch {
|
|
501
|
-
return false;
|
|
502
|
-
}
|
|
503
|
-
}
|
|
496
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/utils/type-utils.mjs
|
|
504
497
|
function isPrimitive(value) {
|
|
505
498
|
return null === value || "object" != typeof value;
|
|
506
499
|
}
|
|
@@ -516,9 +509,16 @@ function isEvent(candidate) {
|
|
|
516
509
|
function isPlainObject(candidate) {
|
|
517
510
|
return isBuiltin(candidate, "Object");
|
|
518
511
|
}
|
|
519
|
-
|
|
512
|
+
function isInstanceOf(candidate, base) {
|
|
513
|
+
try {
|
|
514
|
+
return candidate instanceof base;
|
|
515
|
+
} catch {
|
|
516
|
+
return false;
|
|
517
|
+
}
|
|
518
|
+
}
|
|
519
|
+
var nativeIsArray, ObjProto, type_utils_toString, isArray, isObject, isUndefined, isString, isEmptyString, isNumber, isPlainError;
|
|
520
520
|
var init_type_utils = __esm({
|
|
521
|
-
"../../node_modules/.pnpm/@posthog+core@1.9.
|
|
521
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/utils/type-utils.mjs"() {
|
|
522
522
|
init_types();
|
|
523
523
|
init_string_utils();
|
|
524
524
|
nativeIsArray = Array.isArray;
|
|
@@ -528,6 +528,7 @@ var init_type_utils = __esm({
|
|
|
528
528
|
isArray = nativeIsArray || function(obj) {
|
|
529
529
|
return "[object Array]" === type_utils_toString.call(obj);
|
|
530
530
|
};
|
|
531
|
+
isObject = (x) => x === Object(x) && !isArray(x);
|
|
531
532
|
isUndefined = (x) => void 0 === x;
|
|
532
533
|
isString = (x) => "[object String]" == type_utils_toString.call(x);
|
|
533
534
|
isEmptyString = (x) => isString(x) && 0 === x.trim().length;
|
|
@@ -536,7 +537,7 @@ var init_type_utils = __esm({
|
|
|
536
537
|
}
|
|
537
538
|
});
|
|
538
539
|
|
|
539
|
-
// ../../node_modules/.pnpm/@posthog+core@1.9.
|
|
540
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/utils/number-utils.mjs
|
|
540
541
|
function clampToRange(value, min, max, logger, fallbackValue) {
|
|
541
542
|
if (min > max) {
|
|
542
543
|
logger.warn("min cannot be greater than max.");
|
|
@@ -554,15 +555,15 @@ function clampToRange(value, min, max, logger, fallbackValue) {
|
|
|
554
555
|
return clampToRange(max, min, max, logger);
|
|
555
556
|
}
|
|
556
557
|
var init_number_utils = __esm({
|
|
557
|
-
"../../node_modules/.pnpm/@posthog+core@1.9.
|
|
558
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/utils/number-utils.mjs"() {
|
|
558
559
|
init_type_utils();
|
|
559
560
|
}
|
|
560
561
|
});
|
|
561
562
|
|
|
562
|
-
// ../../node_modules/.pnpm/@posthog+core@1.9.
|
|
563
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/utils/bucketed-rate-limiter.mjs
|
|
563
564
|
var ONE_DAY_IN_MS, BucketedRateLimiter;
|
|
564
565
|
var init_bucketed_rate_limiter = __esm({
|
|
565
|
-
"../../node_modules/.pnpm/@posthog+core@1.9.
|
|
566
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/utils/bucketed-rate-limiter.mjs"() {
|
|
566
567
|
init_number_utils();
|
|
567
568
|
ONE_DAY_IN_MS = 864e5;
|
|
568
569
|
BucketedRateLimiter = class {
|
|
@@ -606,10 +607,10 @@ var init_bucketed_rate_limiter = __esm({
|
|
|
606
607
|
}
|
|
607
608
|
});
|
|
608
609
|
|
|
609
|
-
// ../../node_modules/.pnpm/@posthog+core@1.9.
|
|
610
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/utils/promise-queue.mjs
|
|
610
611
|
var PromiseQueue;
|
|
611
612
|
var init_promise_queue = __esm({
|
|
612
|
-
"../../node_modules/.pnpm/@posthog+core@1.9.
|
|
613
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/utils/promise-queue.mjs"() {
|
|
613
614
|
init_uuidv7();
|
|
614
615
|
PromiseQueue = class {
|
|
615
616
|
add(promise) {
|
|
@@ -640,7 +641,7 @@ var init_promise_queue = __esm({
|
|
|
640
641
|
}
|
|
641
642
|
});
|
|
642
643
|
|
|
643
|
-
// ../../node_modules/.pnpm/@posthog+core@1.9.
|
|
644
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/utils/logger.mjs
|
|
644
645
|
function createConsole(consoleLike = console) {
|
|
645
646
|
const lockedMethods = {
|
|
646
647
|
log: consoleLike.log.bind(consoleLike),
|
|
@@ -655,7 +656,7 @@ function createLogger(prefix, maybeCall = passThrough) {
|
|
|
655
656
|
}
|
|
656
657
|
var _createLogger, passThrough;
|
|
657
658
|
var init_logger = __esm({
|
|
658
|
-
"../../node_modules/.pnpm/@posthog+core@1.9.
|
|
659
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/utils/logger.mjs"() {
|
|
659
660
|
_createLogger = (prefix, maybeCall, consoleLike) => {
|
|
660
661
|
function _log(level, ...args) {
|
|
661
662
|
maybeCall(() => {
|
|
@@ -684,10 +685,10 @@ var init_logger = __esm({
|
|
|
684
685
|
}
|
|
685
686
|
});
|
|
686
687
|
|
|
687
|
-
// ../../node_modules/.pnpm/@posthog+core@1.9.
|
|
688
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/utils/user-agent-utils.mjs
|
|
688
689
|
var MOBILE, TABLET, GENERIC;
|
|
689
690
|
var init_user_agent_utils = __esm({
|
|
690
|
-
"../../node_modules/.pnpm/@posthog+core@1.9.
|
|
691
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/utils/user-agent-utils.mjs"() {
|
|
691
692
|
init_string_utils();
|
|
692
693
|
init_type_utils();
|
|
693
694
|
MOBILE = "Mobile";
|
|
@@ -698,7 +699,7 @@ var init_user_agent_utils = __esm({
|
|
|
698
699
|
}
|
|
699
700
|
});
|
|
700
701
|
|
|
701
|
-
// ../../node_modules/.pnpm/@posthog+core@1.9.
|
|
702
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/utils/index.mjs
|
|
702
703
|
function assert(truthyValue, message2) {
|
|
703
704
|
if (!truthyValue || "string" != typeof truthyValue || isEmpty(truthyValue)) throw new Error(message2);
|
|
704
705
|
}
|
|
@@ -742,7 +743,7 @@ function allSettled(promises) {
|
|
|
742
743
|
}
|
|
743
744
|
var STRING_FORMAT, isError;
|
|
744
745
|
var init_utils = __esm({
|
|
745
|
-
"../../node_modules/.pnpm/@posthog+core@1.9.
|
|
746
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/utils/index.mjs"() {
|
|
746
747
|
init_bot_detection();
|
|
747
748
|
init_bucketed_rate_limiter();
|
|
748
749
|
init_number_utils();
|
|
@@ -756,10 +757,10 @@ var init_utils = __esm({
|
|
|
756
757
|
}
|
|
757
758
|
});
|
|
758
759
|
|
|
759
|
-
// ../../node_modules/.pnpm/@posthog+core@1.9.
|
|
760
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/eventemitter.mjs
|
|
760
761
|
var SimpleEventEmitter;
|
|
761
762
|
var init_eventemitter = __esm({
|
|
762
|
-
"../../node_modules/.pnpm/@posthog+core@1.9.
|
|
763
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/eventemitter.mjs"() {
|
|
763
764
|
SimpleEventEmitter = class {
|
|
764
765
|
constructor() {
|
|
765
766
|
this.events = {};
|
|
@@ -780,7 +781,7 @@ var init_eventemitter = __esm({
|
|
|
780
781
|
}
|
|
781
782
|
});
|
|
782
783
|
|
|
783
|
-
// ../../node_modules/.pnpm/@posthog+core@1.9.
|
|
784
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/gzip.mjs
|
|
784
785
|
function isGzipSupported() {
|
|
785
786
|
return "CompressionStream" in globalThis;
|
|
786
787
|
}
|
|
@@ -799,11 +800,11 @@ async function gzipCompress(input, isDebug = true) {
|
|
|
799
800
|
}
|
|
800
801
|
}
|
|
801
802
|
var init_gzip = __esm({
|
|
802
|
-
"../../node_modules/.pnpm/@posthog+core@1.9.
|
|
803
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/gzip.mjs"() {
|
|
803
804
|
}
|
|
804
805
|
});
|
|
805
806
|
|
|
806
|
-
// ../../node_modules/.pnpm/@posthog+core@1.9.
|
|
807
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/posthog-core-stateless.mjs
|
|
807
808
|
async function logFlushError(err) {
|
|
808
809
|
if (err instanceof PostHogFetchHttpError) {
|
|
809
810
|
let text = "";
|
|
@@ -823,7 +824,7 @@ function isPostHogFetchContentTooLargeError(err) {
|
|
|
823
824
|
}
|
|
824
825
|
var PostHogFetchHttpError, PostHogFetchNetworkError, PostHogCoreStateless;
|
|
825
826
|
var init_posthog_core_stateless = __esm({
|
|
826
|
-
"../../node_modules/.pnpm/@posthog+core@1.9.
|
|
827
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/posthog-core-stateless.mjs"() {
|
|
827
828
|
init_eventemitter();
|
|
828
829
|
init_featureFlagUtils();
|
|
829
830
|
init_gzip();
|
|
@@ -1441,9 +1442,9 @@ var init_posthog_core_stateless = __esm({
|
|
|
1441
1442
|
}
|
|
1442
1443
|
});
|
|
1443
1444
|
|
|
1444
|
-
// ../../node_modules/.pnpm/@posthog+core@1.9.
|
|
1445
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/posthog-core.mjs
|
|
1445
1446
|
var init_posthog_core = __esm({
|
|
1446
|
-
"../../node_modules/.pnpm/@posthog+core@1.9.
|
|
1447
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/posthog-core.mjs"() {
|
|
1447
1448
|
init_featureFlagUtils();
|
|
1448
1449
|
init_types();
|
|
1449
1450
|
init_posthog_core_stateless();
|
|
@@ -1452,7 +1453,7 @@ var init_posthog_core = __esm({
|
|
|
1452
1453
|
}
|
|
1453
1454
|
});
|
|
1454
1455
|
|
|
1455
|
-
// ../../node_modules/.pnpm/@posthog+core@1.9.
|
|
1456
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/chunk-ids.mjs
|
|
1456
1457
|
function getFilenameToChunkIdMap(stackParser) {
|
|
1457
1458
|
const chunkIdMap = globalThis._posthogChunkIds;
|
|
1458
1459
|
if (!chunkIdMap) return;
|
|
@@ -1485,14 +1486,14 @@ function getFilenameToChunkIdMap(stackParser) {
|
|
|
1485
1486
|
}
|
|
1486
1487
|
var parsedStackResults, lastKeysCount, cachedFilenameChunkIds;
|
|
1487
1488
|
var init_chunk_ids = __esm({
|
|
1488
|
-
"../../node_modules/.pnpm/@posthog+core@1.9.
|
|
1489
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/chunk-ids.mjs"() {
|
|
1489
1490
|
}
|
|
1490
1491
|
});
|
|
1491
1492
|
|
|
1492
|
-
// ../../node_modules/.pnpm/@posthog+core@1.9.
|
|
1493
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/error-properties-builder.mjs
|
|
1493
1494
|
var MAX_CAUSE_RECURSION, ErrorPropertiesBuilder;
|
|
1494
1495
|
var init_error_properties_builder = __esm({
|
|
1495
|
-
"../../node_modules/.pnpm/@posthog+core@1.9.
|
|
1496
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/error-properties-builder.mjs"() {
|
|
1496
1497
|
init_utils();
|
|
1497
1498
|
init_chunk_ids();
|
|
1498
1499
|
MAX_CAUSE_RECURSION = 4;
|
|
@@ -1606,7 +1607,7 @@ var init_error_properties_builder = __esm({
|
|
|
1606
1607
|
}
|
|
1607
1608
|
});
|
|
1608
1609
|
|
|
1609
|
-
// ../../node_modules/.pnpm/@posthog+core@1.9.
|
|
1610
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/parsers/base.mjs
|
|
1610
1611
|
function createFrame(platform, filename, func, lineno, colno) {
|
|
1611
1612
|
const frame = {
|
|
1612
1613
|
platform,
|
|
@@ -1620,16 +1621,16 @@ function createFrame(platform, filename, func, lineno, colno) {
|
|
|
1620
1621
|
}
|
|
1621
1622
|
var UNKNOWN_FUNCTION;
|
|
1622
1623
|
var init_base = __esm({
|
|
1623
|
-
"../../node_modules/.pnpm/@posthog+core@1.9.
|
|
1624
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/parsers/base.mjs"() {
|
|
1624
1625
|
init_utils();
|
|
1625
1626
|
UNKNOWN_FUNCTION = "?";
|
|
1626
1627
|
}
|
|
1627
1628
|
});
|
|
1628
1629
|
|
|
1629
|
-
// ../../node_modules/.pnpm/@posthog+core@1.9.
|
|
1630
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/parsers/safari.mjs
|
|
1630
1631
|
var extractSafariExtensionDetails;
|
|
1631
1632
|
var init_safari = __esm({
|
|
1632
|
-
"../../node_modules/.pnpm/@posthog+core@1.9.
|
|
1633
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/parsers/safari.mjs"() {
|
|
1633
1634
|
init_base();
|
|
1634
1635
|
extractSafariExtensionDetails = (func, filename) => {
|
|
1635
1636
|
const isSafariExtension = -1 !== func.indexOf("safari-extension");
|
|
@@ -1645,10 +1646,10 @@ var init_safari = __esm({
|
|
|
1645
1646
|
}
|
|
1646
1647
|
});
|
|
1647
1648
|
|
|
1648
|
-
// ../../node_modules/.pnpm/@posthog+core@1.9.
|
|
1649
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/parsers/chrome.mjs
|
|
1649
1650
|
var chromeRegexNoFnName, chromeRegex, chromeEvalRegex, chromeStackLineParser;
|
|
1650
1651
|
var init_chrome = __esm({
|
|
1651
|
-
"../../node_modules/.pnpm/@posthog+core@1.9.
|
|
1652
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/parsers/chrome.mjs"() {
|
|
1652
1653
|
init_base();
|
|
1653
1654
|
init_safari();
|
|
1654
1655
|
chromeRegexNoFnName = /^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i;
|
|
@@ -1678,23 +1679,10 @@ var init_chrome = __esm({
|
|
|
1678
1679
|
}
|
|
1679
1680
|
});
|
|
1680
1681
|
|
|
1681
|
-
// ../../node_modules/.pnpm/@posthog+core@1.9.
|
|
1682
|
-
var winjsRegex, winjsStackLineParser;
|
|
1683
|
-
var init_winjs = __esm({
|
|
1684
|
-
"../../node_modules/.pnpm/@posthog+core@1.9.0/node_modules/@posthog/core/dist/error-tracking/parsers/winjs.mjs"() {
|
|
1685
|
-
init_base();
|
|
1686
|
-
winjsRegex = /^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i;
|
|
1687
|
-
winjsStackLineParser = (line, platform) => {
|
|
1688
|
-
const parts = winjsRegex.exec(line);
|
|
1689
|
-
return parts ? createFrame(platform, parts[2], parts[1] || UNKNOWN_FUNCTION, +parts[3], parts[4] ? +parts[4] : void 0) : void 0;
|
|
1690
|
-
};
|
|
1691
|
-
}
|
|
1692
|
-
});
|
|
1693
|
-
|
|
1694
|
-
// ../../node_modules/.pnpm/@posthog+core@1.9.0/node_modules/@posthog/core/dist/error-tracking/parsers/gecko.mjs
|
|
1682
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/parsers/gecko.mjs
|
|
1695
1683
|
var geckoREgex, geckoEvalRegex, geckoStackLineParser;
|
|
1696
1684
|
var init_gecko = __esm({
|
|
1697
|
-
"../../node_modules/.pnpm/@posthog+core@1.9.
|
|
1685
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/parsers/gecko.mjs"() {
|
|
1698
1686
|
init_base();
|
|
1699
1687
|
init_safari();
|
|
1700
1688
|
geckoREgex = /^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i;
|
|
@@ -1721,10 +1709,23 @@ var init_gecko = __esm({
|
|
|
1721
1709
|
}
|
|
1722
1710
|
});
|
|
1723
1711
|
|
|
1724
|
-
// ../../node_modules/.pnpm/@posthog+core@1.9.
|
|
1712
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/parsers/winjs.mjs
|
|
1713
|
+
var winjsRegex, winjsStackLineParser;
|
|
1714
|
+
var init_winjs = __esm({
|
|
1715
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/parsers/winjs.mjs"() {
|
|
1716
|
+
init_base();
|
|
1717
|
+
winjsRegex = /^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i;
|
|
1718
|
+
winjsStackLineParser = (line, platform) => {
|
|
1719
|
+
const parts = winjsRegex.exec(line);
|
|
1720
|
+
return parts ? createFrame(platform, parts[2], parts[1] || UNKNOWN_FUNCTION, +parts[3], parts[4] ? +parts[4] : void 0) : void 0;
|
|
1721
|
+
};
|
|
1722
|
+
}
|
|
1723
|
+
});
|
|
1724
|
+
|
|
1725
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/parsers/opera.mjs
|
|
1725
1726
|
var opera10Regex, opera10StackLineParser, opera11Regex, opera11StackLineParser;
|
|
1726
1727
|
var init_opera = __esm({
|
|
1727
|
-
"../../node_modules/.pnpm/@posthog+core@1.9.
|
|
1728
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/parsers/opera.mjs"() {
|
|
1728
1729
|
init_base();
|
|
1729
1730
|
opera10Regex = / line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i;
|
|
1730
1731
|
opera10StackLineParser = (line, platform) => {
|
|
@@ -1739,7 +1740,7 @@ var init_opera = __esm({
|
|
|
1739
1740
|
}
|
|
1740
1741
|
});
|
|
1741
1742
|
|
|
1742
|
-
// ../../node_modules/.pnpm/@posthog+core@1.9.
|
|
1743
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/parsers/node.mjs
|
|
1743
1744
|
function filenameIsInApp(filename, isNative = false) {
|
|
1744
1745
|
const isInternal = isNative || filename && !filename.startsWith("/") && !filename.match(/^[A-Z]:/) && !filename.startsWith(".") && !filename.match(/^[a-zA-Z]([a-zA-Z0-9.\-+])*:\/\//);
|
|
1745
1746
|
return !isInternal && void 0 !== filename && !filename.includes("node_modules/");
|
|
@@ -1749,7 +1750,7 @@ function _parseIntOrUndefined(input) {
|
|
|
1749
1750
|
}
|
|
1750
1751
|
var FILENAME_MATCH, FULL_MATCH, nodeStackLineParser;
|
|
1751
1752
|
var init_node = __esm({
|
|
1752
|
-
"../../node_modules/.pnpm/@posthog+core@1.9.
|
|
1753
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/parsers/node.mjs"() {
|
|
1753
1754
|
init_base();
|
|
1754
1755
|
FILENAME_MATCH = /^\s*[-]{4,}$/;
|
|
1755
1756
|
FULL_MATCH = /at (?:async )?(?:(.+?)\s+\()?(?:(.+):(\d+):(\d+)?|([^)]+))\)?/;
|
|
@@ -1810,7 +1811,7 @@ var init_node = __esm({
|
|
|
1810
1811
|
}
|
|
1811
1812
|
});
|
|
1812
1813
|
|
|
1813
|
-
// ../../node_modules/.pnpm/@posthog+core@1.9.
|
|
1814
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/parsers/index.mjs
|
|
1814
1815
|
function reverseAndStripFrames(stack) {
|
|
1815
1816
|
if (!stack.length) return [];
|
|
1816
1817
|
const localStack = Array.from(stack);
|
|
@@ -1824,6 +1825,9 @@ function reverseAndStripFrames(stack) {
|
|
|
1824
1825
|
function getLastStackFrame(arr) {
|
|
1825
1826
|
return arr[arr.length - 1] || {};
|
|
1826
1827
|
}
|
|
1828
|
+
function createDefaultStackParser() {
|
|
1829
|
+
return createStackParser("web:javascript", chromeStackLineParser, geckoStackLineParser);
|
|
1830
|
+
}
|
|
1827
1831
|
function createStackParser(platform, ...parsers) {
|
|
1828
1832
|
return (stack, skipFirstLines = 0) => {
|
|
1829
1833
|
const frames = [];
|
|
@@ -1848,11 +1852,11 @@ function createStackParser(platform, ...parsers) {
|
|
|
1848
1852
|
}
|
|
1849
1853
|
var WEBPACK_ERROR_REGEXP, STACKTRACE_FRAME_LIMIT;
|
|
1850
1854
|
var init_parsers = __esm({
|
|
1851
|
-
"../../node_modules/.pnpm/@posthog+core@1.9.
|
|
1855
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/parsers/index.mjs"() {
|
|
1852
1856
|
init_base();
|
|
1853
1857
|
init_chrome();
|
|
1854
|
-
init_winjs();
|
|
1855
1858
|
init_gecko();
|
|
1859
|
+
init_winjs();
|
|
1856
1860
|
init_opera();
|
|
1857
1861
|
init_node();
|
|
1858
1862
|
WEBPACK_ERROR_REGEXP = /\(error: (.*)\)/;
|
|
@@ -1860,10 +1864,10 @@ var init_parsers = __esm({
|
|
|
1860
1864
|
}
|
|
1861
1865
|
});
|
|
1862
1866
|
|
|
1863
|
-
// ../../node_modules/.pnpm/@posthog+core@1.9.
|
|
1867
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/coercers/dom-exception-coercer.mjs
|
|
1864
1868
|
var DOMExceptionCoercer;
|
|
1865
1869
|
var init_dom_exception_coercer = __esm({
|
|
1866
|
-
"../../node_modules/.pnpm/@posthog+core@1.9.
|
|
1870
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/coercers/dom-exception-coercer.mjs"() {
|
|
1867
1871
|
init_utils();
|
|
1868
1872
|
DOMExceptionCoercer = class {
|
|
1869
1873
|
match(err) {
|
|
@@ -1897,10 +1901,10 @@ var init_dom_exception_coercer = __esm({
|
|
|
1897
1901
|
}
|
|
1898
1902
|
});
|
|
1899
1903
|
|
|
1900
|
-
// ../../node_modules/.pnpm/@posthog+core@1.9.
|
|
1904
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/coercers/error-coercer.mjs
|
|
1901
1905
|
var ErrorCoercer;
|
|
1902
1906
|
var init_error_coercer = __esm({
|
|
1903
|
-
"../../node_modules/.pnpm/@posthog+core@1.9.
|
|
1907
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/coercers/error-coercer.mjs"() {
|
|
1904
1908
|
init_utils();
|
|
1905
1909
|
ErrorCoercer = class {
|
|
1906
1910
|
match(err) {
|
|
@@ -1930,10 +1934,10 @@ var init_error_coercer = __esm({
|
|
|
1930
1934
|
}
|
|
1931
1935
|
});
|
|
1932
1936
|
|
|
1933
|
-
// ../../node_modules/.pnpm/@posthog+core@1.9.
|
|
1937
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/coercers/error-event-coercer.mjs
|
|
1934
1938
|
var ErrorEventCoercer;
|
|
1935
1939
|
var init_error_event_coercer = __esm({
|
|
1936
|
-
"../../node_modules/.pnpm/@posthog+core@1.9.
|
|
1940
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/coercers/error-event-coercer.mjs"() {
|
|
1937
1941
|
init_utils();
|
|
1938
1942
|
ErrorEventCoercer = class {
|
|
1939
1943
|
constructor() {
|
|
@@ -1955,10 +1959,10 @@ var init_error_event_coercer = __esm({
|
|
|
1955
1959
|
}
|
|
1956
1960
|
});
|
|
1957
1961
|
|
|
1958
|
-
// ../../node_modules/.pnpm/@posthog+core@1.9.
|
|
1962
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/coercers/string-coercer.mjs
|
|
1959
1963
|
var ERROR_TYPES_PATTERN, StringCoercer;
|
|
1960
1964
|
var init_string_coercer = __esm({
|
|
1961
|
-
"../../node_modules/.pnpm/@posthog+core@1.9.
|
|
1965
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/coercers/string-coercer.mjs"() {
|
|
1962
1966
|
ERROR_TYPES_PATTERN = /^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;
|
|
1963
1967
|
StringCoercer = class {
|
|
1964
1968
|
match(input) {
|
|
@@ -1990,10 +1994,10 @@ var init_string_coercer = __esm({
|
|
|
1990
1994
|
}
|
|
1991
1995
|
});
|
|
1992
1996
|
|
|
1993
|
-
// ../../node_modules/.pnpm/@posthog+core@1.9.
|
|
1997
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/types.mjs
|
|
1994
1998
|
var severityLevels;
|
|
1995
1999
|
var init_types2 = __esm({
|
|
1996
|
-
"../../node_modules/.pnpm/@posthog+core@1.9.
|
|
2000
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/types.mjs"() {
|
|
1997
2001
|
severityLevels = [
|
|
1998
2002
|
"fatal",
|
|
1999
2003
|
"error",
|
|
@@ -2005,7 +2009,7 @@ var init_types2 = __esm({
|
|
|
2005
2009
|
}
|
|
2006
2010
|
});
|
|
2007
2011
|
|
|
2008
|
-
// ../../node_modules/.pnpm/@posthog+core@1.9.
|
|
2012
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/coercers/utils.mjs
|
|
2009
2013
|
function extractExceptionKeysForMessage(err, maxLength = 40) {
|
|
2010
2014
|
const keys = Object.keys(err);
|
|
2011
2015
|
keys.sort();
|
|
@@ -2020,14 +2024,14 @@ function extractExceptionKeysForMessage(err, maxLength = 40) {
|
|
|
2020
2024
|
return "";
|
|
2021
2025
|
}
|
|
2022
2026
|
var init_utils2 = __esm({
|
|
2023
|
-
"../../node_modules/.pnpm/@posthog+core@1.9.
|
|
2027
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/coercers/utils.mjs"() {
|
|
2024
2028
|
}
|
|
2025
2029
|
});
|
|
2026
2030
|
|
|
2027
|
-
// ../../node_modules/.pnpm/@posthog+core@1.9.
|
|
2031
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/coercers/object-coercer.mjs
|
|
2028
2032
|
var ObjectCoercer;
|
|
2029
2033
|
var init_object_coercer = __esm({
|
|
2030
|
-
"../../node_modules/.pnpm/@posthog+core@1.9.
|
|
2034
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/coercers/object-coercer.mjs"() {
|
|
2031
2035
|
init_utils();
|
|
2032
2036
|
init_types2();
|
|
2033
2037
|
init_utils2();
|
|
@@ -2081,10 +2085,10 @@ var init_object_coercer = __esm({
|
|
|
2081
2085
|
}
|
|
2082
2086
|
});
|
|
2083
2087
|
|
|
2084
|
-
// ../../node_modules/.pnpm/@posthog+core@1.9.
|
|
2088
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/coercers/event-coercer.mjs
|
|
2085
2089
|
var EventCoercer;
|
|
2086
2090
|
var init_event_coercer = __esm({
|
|
2087
|
-
"../../node_modules/.pnpm/@posthog+core@1.9.
|
|
2091
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/coercers/event-coercer.mjs"() {
|
|
2088
2092
|
init_utils();
|
|
2089
2093
|
init_utils2();
|
|
2090
2094
|
EventCoercer = class {
|
|
@@ -2104,10 +2108,10 @@ var init_event_coercer = __esm({
|
|
|
2104
2108
|
}
|
|
2105
2109
|
});
|
|
2106
2110
|
|
|
2107
|
-
// ../../node_modules/.pnpm/@posthog+core@1.9.
|
|
2111
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/coercers/primitive-coercer.mjs
|
|
2108
2112
|
var PrimitiveCoercer;
|
|
2109
2113
|
var init_primitive_coercer = __esm({
|
|
2110
|
-
"../../node_modules/.pnpm/@posthog+core@1.9.
|
|
2114
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/coercers/primitive-coercer.mjs"() {
|
|
2111
2115
|
init_utils();
|
|
2112
2116
|
PrimitiveCoercer = class {
|
|
2113
2117
|
match(candidate) {
|
|
@@ -2125,10 +2129,10 @@ var init_primitive_coercer = __esm({
|
|
|
2125
2129
|
}
|
|
2126
2130
|
});
|
|
2127
2131
|
|
|
2128
|
-
// ../../node_modules/.pnpm/@posthog+core@1.9.
|
|
2132
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/coercers/promise-rejection-event.mjs
|
|
2129
2133
|
var PromiseRejectionEventCoercer;
|
|
2130
2134
|
var init_promise_rejection_event = __esm({
|
|
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/promise-rejection-event.mjs"() {
|
|
2132
2136
|
init_utils();
|
|
2133
2137
|
PromiseRejectionEventCoercer = class {
|
|
2134
2138
|
match(err) {
|
|
@@ -2157,9 +2161,9 @@ var init_promise_rejection_event = __esm({
|
|
|
2157
2161
|
}
|
|
2158
2162
|
});
|
|
2159
2163
|
|
|
2160
|
-
// ../../node_modules/.pnpm/@posthog+core@1.9.
|
|
2164
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/coercers/index.mjs
|
|
2161
2165
|
var init_coercers = __esm({
|
|
2162
|
-
"../../node_modules/.pnpm/@posthog+core@1.9.
|
|
2166
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/coercers/index.mjs"() {
|
|
2163
2167
|
init_dom_exception_coercer();
|
|
2164
2168
|
init_error_coercer();
|
|
2165
2169
|
init_error_event_coercer();
|
|
@@ -2171,10 +2175,10 @@ var init_coercers = __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/utils.mjs
|
|
2175
2179
|
var ReduceableCache;
|
|
2176
2180
|
var init_utils3 = __esm({
|
|
2177
|
-
"../../node_modules/.pnpm/@posthog+core@1.9.
|
|
2181
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/utils.mjs"() {
|
|
2178
2182
|
ReduceableCache = class {
|
|
2179
2183
|
constructor(_maxSize) {
|
|
2180
2184
|
this._maxSize = _maxSize;
|
|
@@ -2200,7 +2204,7 @@ var init_utils3 = __esm({
|
|
|
2200
2204
|
}
|
|
2201
2205
|
});
|
|
2202
2206
|
|
|
2203
|
-
// ../../node_modules/.pnpm/@posthog+core@1.9.
|
|
2207
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/index.mjs
|
|
2204
2208
|
var error_tracking_exports = {};
|
|
2205
2209
|
__export(error_tracking_exports, {
|
|
2206
2210
|
DOMExceptionCoercer: () => DOMExceptionCoercer,
|
|
@@ -2214,6 +2218,7 @@ __export(error_tracking_exports, {
|
|
|
2214
2218
|
ReduceableCache: () => ReduceableCache,
|
|
2215
2219
|
StringCoercer: () => StringCoercer,
|
|
2216
2220
|
chromeStackLineParser: () => chromeStackLineParser,
|
|
2221
|
+
createDefaultStackParser: () => createDefaultStackParser,
|
|
2217
2222
|
createStackParser: () => createStackParser,
|
|
2218
2223
|
geckoStackLineParser: () => geckoStackLineParser,
|
|
2219
2224
|
nodeStackLineParser: () => nodeStackLineParser,
|
|
@@ -2223,7 +2228,7 @@ __export(error_tracking_exports, {
|
|
|
2223
2228
|
winjsStackLineParser: () => winjsStackLineParser
|
|
2224
2229
|
});
|
|
2225
2230
|
var init_error_tracking = __esm({
|
|
2226
|
-
"../../node_modules/.pnpm/@posthog+core@1.9.
|
|
2231
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/index.mjs"() {
|
|
2227
2232
|
init_error_properties_builder();
|
|
2228
2233
|
init_parsers();
|
|
2229
2234
|
init_coercers();
|
|
@@ -2231,9 +2236,9 @@ var init_error_tracking = __esm({
|
|
|
2231
2236
|
}
|
|
2232
2237
|
});
|
|
2233
2238
|
|
|
2234
|
-
// ../../node_modules/.pnpm/@posthog+core@1.9.
|
|
2239
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/index.mjs
|
|
2235
2240
|
var init_dist = __esm({
|
|
2236
|
-
"../../node_modules/.pnpm/@posthog+core@1.9.
|
|
2241
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/index.mjs"() {
|
|
2237
2242
|
init_featureFlagUtils();
|
|
2238
2243
|
init_uuidv7();
|
|
2239
2244
|
init_utils();
|
|
@@ -2424,7 +2429,7 @@ function snipLine(line, colno) {
|
|
|
2424
2429
|
}
|
|
2425
2430
|
var LRU_FILE_CONTENTS_CACHE, LRU_FILE_CONTENTS_FS_READ_FAILED, DEFAULT_LINES_OF_CONTEXT, MAX_CONTEXTLINES_COLNO, MAX_CONTEXTLINES_LINENO;
|
|
2426
2431
|
var init_context_lines_node = __esm({
|
|
2427
|
-
"../../node_modules/.pnpm/posthog-node@5.
|
|
2432
|
+
"../../node_modules/.pnpm/posthog-node@5.21.0/node_modules/posthog-node/dist/extensions/error-tracking/modifiers/context-lines.node.mjs"() {
|
|
2428
2433
|
init_dist();
|
|
2429
2434
|
LRU_FILE_CONTENTS_CACHE = new error_tracking_exports.ReduceableCache(25);
|
|
2430
2435
|
LRU_FILE_CONTENTS_FS_READ_FAILED = new error_tracking_exports.ReduceableCache(20);
|
|
@@ -2434,7 +2439,7 @@ var init_context_lines_node = __esm({
|
|
|
2434
2439
|
}
|
|
2435
2440
|
});
|
|
2436
2441
|
|
|
2437
|
-
// ../../node_modules/.pnpm/posthog-node@5.
|
|
2442
|
+
// ../../node_modules/.pnpm/posthog-node@5.21.0/node_modules/posthog-node/dist/extensions/error-tracking/autocapture.mjs
|
|
2438
2443
|
function makeUncaughtExceptionHandler(captureFn, onFatalFn) {
|
|
2439
2444
|
let calledFatalError = false;
|
|
2440
2445
|
return Object.assign((error) => {
|
|
@@ -2466,14 +2471,14 @@ function addUnhandledRejectionListener(captureFn) {
|
|
|
2466
2471
|
}));
|
|
2467
2472
|
}
|
|
2468
2473
|
var init_autocapture = __esm({
|
|
2469
|
-
"../../node_modules/.pnpm/posthog-node@5.
|
|
2474
|
+
"../../node_modules/.pnpm/posthog-node@5.21.0/node_modules/posthog-node/dist/extensions/error-tracking/autocapture.mjs"() {
|
|
2470
2475
|
}
|
|
2471
2476
|
});
|
|
2472
2477
|
|
|
2473
|
-
// ../../node_modules/.pnpm/posthog-node@5.
|
|
2478
|
+
// ../../node_modules/.pnpm/posthog-node@5.21.0/node_modules/posthog-node/dist/extensions/error-tracking/index.mjs
|
|
2474
2479
|
var SHUTDOWN_TIMEOUT, ErrorTracking;
|
|
2475
2480
|
var init_error_tracking2 = __esm({
|
|
2476
|
-
"../../node_modules/.pnpm/posthog-node@5.
|
|
2481
|
+
"../../node_modules/.pnpm/posthog-node@5.21.0/node_modules/posthog-node/dist/extensions/error-tracking/index.mjs"() {
|
|
2477
2482
|
init_autocapture();
|
|
2478
2483
|
init_dist();
|
|
2479
2484
|
SHUTDOWN_TIMEOUT = 2e3;
|
|
@@ -2490,6 +2495,9 @@ var init_error_tracking2 = __esm({
|
|
|
2490
2495
|
});
|
|
2491
2496
|
this.startAutocaptureIfEnabled();
|
|
2492
2497
|
}
|
|
2498
|
+
static isPreviouslyCapturedError(x) {
|
|
2499
|
+
return isObject(x) && "__posthog_previously_captured_error" in x && true === x.__posthog_previously_captured_error;
|
|
2500
|
+
}
|
|
2493
2501
|
static async buildEventMessage(error, hint, distinctId, additionalProperties) {
|
|
2494
2502
|
const properties = {
|
|
2495
2503
|
...additionalProperties
|
|
@@ -2514,14 +2522,16 @@ var init_error_tracking2 = __esm({
|
|
|
2514
2522
|
}
|
|
2515
2523
|
onException(exception, hint) {
|
|
2516
2524
|
this.client.addPendingPromise((async () => {
|
|
2517
|
-
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
exception
|
|
2523
|
-
|
|
2524
|
-
|
|
2525
|
+
if (!_ErrorTracking.isPreviouslyCapturedError(exception)) {
|
|
2526
|
+
const eventMessage = await _ErrorTracking.buildEventMessage(exception, hint);
|
|
2527
|
+
const exceptionProperties = eventMessage.properties;
|
|
2528
|
+
const exceptionType = exceptionProperties?.$exception_list[0]?.type ?? "Exception";
|
|
2529
|
+
const isRateLimited = this._rateLimiter.consumeRateLimit(exceptionType);
|
|
2530
|
+
if (isRateLimited) return void this._logger.info("Skipping exception capture because of client rate limiting.", {
|
|
2531
|
+
exception: exceptionType
|
|
2532
|
+
});
|
|
2533
|
+
return this.client.capture(eventMessage);
|
|
2534
|
+
}
|
|
2525
2535
|
})());
|
|
2526
2536
|
}
|
|
2527
2537
|
async onFatalError(exception) {
|
|
@@ -2539,18 +2549,18 @@ var init_error_tracking2 = __esm({
|
|
|
2539
2549
|
}
|
|
2540
2550
|
});
|
|
2541
2551
|
|
|
2542
|
-
// ../../node_modules/.pnpm/posthog-node@5.
|
|
2552
|
+
// ../../node_modules/.pnpm/posthog-node@5.21.0/node_modules/posthog-node/dist/version.mjs
|
|
2543
2553
|
var version;
|
|
2544
2554
|
var init_version = __esm({
|
|
2545
|
-
"../../node_modules/.pnpm/posthog-node@5.
|
|
2546
|
-
version = "5.
|
|
2555
|
+
"../../node_modules/.pnpm/posthog-node@5.21.0/node_modules/posthog-node/dist/version.mjs"() {
|
|
2556
|
+
version = "5.21.0";
|
|
2547
2557
|
}
|
|
2548
2558
|
});
|
|
2549
2559
|
|
|
2550
|
-
// ../../node_modules/.pnpm/posthog-node@5.
|
|
2560
|
+
// ../../node_modules/.pnpm/posthog-node@5.21.0/node_modules/posthog-node/dist/types.mjs
|
|
2551
2561
|
var FeatureFlagError;
|
|
2552
2562
|
var init_types3 = __esm({
|
|
2553
|
-
"../../node_modules/.pnpm/posthog-node@5.
|
|
2563
|
+
"../../node_modules/.pnpm/posthog-node@5.21.0/node_modules/posthog-node/dist/types.mjs"() {
|
|
2554
2564
|
FeatureFlagError = {
|
|
2555
2565
|
ERRORS_WHILE_COMPUTING: "errors_while_computing_flags",
|
|
2556
2566
|
FLAG_MISSING: "flag_missing",
|
|
@@ -2560,7 +2570,7 @@ var init_types3 = __esm({
|
|
|
2560
2570
|
}
|
|
2561
2571
|
});
|
|
2562
2572
|
|
|
2563
|
-
// ../../node_modules/.pnpm/posthog-node@5.
|
|
2573
|
+
// ../../node_modules/.pnpm/posthog-node@5.21.0/node_modules/posthog-node/dist/extensions/feature-flags/crypto.mjs
|
|
2564
2574
|
async function hashSHA1(text) {
|
|
2565
2575
|
const subtle = globalThis.crypto?.subtle;
|
|
2566
2576
|
if (!subtle) throw new Error("SubtleCrypto API not available");
|
|
@@ -2569,11 +2579,11 @@ async function hashSHA1(text) {
|
|
|
2569
2579
|
return hashArray.map((byte) => byte.toString(16).padStart(2, "0")).join("");
|
|
2570
2580
|
}
|
|
2571
2581
|
var init_crypto = __esm({
|
|
2572
|
-
"../../node_modules/.pnpm/posthog-node@5.
|
|
2582
|
+
"../../node_modules/.pnpm/posthog-node@5.21.0/node_modules/posthog-node/dist/extensions/feature-flags/crypto.mjs"() {
|
|
2573
2583
|
}
|
|
2574
2584
|
});
|
|
2575
2585
|
|
|
2576
|
-
// ../../node_modules/.pnpm/posthog-node@5.
|
|
2586
|
+
// ../../node_modules/.pnpm/posthog-node@5.21.0/node_modules/posthog-node/dist/extensions/feature-flags/feature-flags.mjs
|
|
2577
2587
|
async function _hash(key, distinctId, salt = "") {
|
|
2578
2588
|
const hashString = await hashSHA1(`${key}.${distinctId}${salt}`);
|
|
2579
2589
|
return parseInt(hashString.slice(0, 15), 16) / LONG_SCALE;
|
|
@@ -2741,7 +2751,7 @@ function relativeDateParseForFeatureFlagMatching(value) {
|
|
|
2741
2751
|
}
|
|
2742
2752
|
var SIXTY_SECONDS, LONG_SCALE, NULL_VALUES_ALLOWED_OPERATORS, ClientError, InconclusiveMatchError, RequiresServerEvaluation, FeatureFlagsPoller;
|
|
2743
2753
|
var init_feature_flags = __esm({
|
|
2744
|
-
"../../node_modules/.pnpm/posthog-node@5.
|
|
2754
|
+
"../../node_modules/.pnpm/posthog-node@5.21.0/node_modules/posthog-node/dist/extensions/feature-flags/feature-flags.mjs"() {
|
|
2745
2755
|
init_dist();
|
|
2746
2756
|
init_crypto();
|
|
2747
2757
|
SIXTY_SECONDS = 6e4;
|
|
@@ -2795,6 +2805,7 @@ var init_feature_flags = __esm({
|
|
|
2795
2805
|
this.customHeaders = customHeaders;
|
|
2796
2806
|
this.onLoad = options.onLoad;
|
|
2797
2807
|
this.cacheProvider = options.cacheProvider;
|
|
2808
|
+
this.strictLocalEvaluation = options.strictLocalEvaluation ?? false;
|
|
2798
2809
|
this.loadFeatureFlags();
|
|
2799
2810
|
}
|
|
2800
2811
|
debug(enabled = true) {
|
|
@@ -2990,6 +3001,11 @@ var init_feature_flags = __esm({
|
|
|
2990
3001
|
this.cohorts = flagData.cohorts;
|
|
2991
3002
|
this.loadedSuccessfullyOnce = true;
|
|
2992
3003
|
}
|
|
3004
|
+
warnAboutExperienceContinuityFlags(flags) {
|
|
3005
|
+
if (this.strictLocalEvaluation) return;
|
|
3006
|
+
const experienceContinuityFlags = flags.filter((f) => f.ensure_experience_continuity);
|
|
3007
|
+
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).`);
|
|
3008
|
+
}
|
|
2993
3009
|
async loadFromCache(debugMessage) {
|
|
2994
3010
|
if (!this.cacheProvider) return false;
|
|
2995
3011
|
try {
|
|
@@ -2998,6 +3014,7 @@ var init_feature_flags = __esm({
|
|
|
2998
3014
|
this.updateFlagState(cached);
|
|
2999
3015
|
this.logMsgIfDebug(() => console.debug(`[FEATURE FLAGS] ${debugMessage} (${cached.flags.length} flags)`));
|
|
3000
3016
|
this.onLoad?.(this.featureFlags.length);
|
|
3017
|
+
this.warnAboutExperienceContinuityFlags(cached.flags);
|
|
3001
3018
|
return true;
|
|
3002
3019
|
}
|
|
3003
3020
|
return false;
|
|
@@ -3091,6 +3108,7 @@ var init_feature_flags = __esm({
|
|
|
3091
3108
|
this.onError?.(new Error(`Failed to store in cache: ${err}`));
|
|
3092
3109
|
}
|
|
3093
3110
|
this.onLoad?.(this.featureFlags.length);
|
|
3111
|
+
this.warnAboutExperienceContinuityFlags(flagData.flags);
|
|
3094
3112
|
break;
|
|
3095
3113
|
}
|
|
3096
3114
|
default:
|
|
@@ -3146,10 +3164,10 @@ var init_feature_flags = __esm({
|
|
|
3146
3164
|
}
|
|
3147
3165
|
});
|
|
3148
3166
|
|
|
3149
|
-
// ../../node_modules/.pnpm/posthog-node@5.
|
|
3167
|
+
// ../../node_modules/.pnpm/posthog-node@5.21.0/node_modules/posthog-node/dist/storage-memory.mjs
|
|
3150
3168
|
var PostHogMemoryStorage;
|
|
3151
3169
|
var init_storage_memory = __esm({
|
|
3152
|
-
"../../node_modules/.pnpm/posthog-node@5.
|
|
3170
|
+
"../../node_modules/.pnpm/posthog-node@5.21.0/node_modules/posthog-node/dist/storage-memory.mjs"() {
|
|
3153
3171
|
PostHogMemoryStorage = class {
|
|
3154
3172
|
getProperty(key) {
|
|
3155
3173
|
return this._memoryStorage[key];
|
|
@@ -3164,10 +3182,10 @@ var init_storage_memory = __esm({
|
|
|
3164
3182
|
}
|
|
3165
3183
|
});
|
|
3166
3184
|
|
|
3167
|
-
// ../../node_modules/.pnpm/posthog-node@5.
|
|
3185
|
+
// ../../node_modules/.pnpm/posthog-node@5.21.0/node_modules/posthog-node/dist/client.mjs
|
|
3168
3186
|
var MINIMUM_POLLING_INTERVAL, THIRTY_SECONDS, MAX_CACHE_SIZE, PostHogBackendClient;
|
|
3169
3187
|
var init_client = __esm({
|
|
3170
|
-
"../../node_modules/.pnpm/posthog-node@5.
|
|
3188
|
+
"../../node_modules/.pnpm/posthog-node@5.21.0/node_modules/posthog-node/dist/client.mjs"() {
|
|
3171
3189
|
init_version();
|
|
3172
3190
|
init_dist();
|
|
3173
3191
|
init_types3();
|
|
@@ -3200,7 +3218,8 @@ var init_client = __esm({
|
|
|
3200
3218
|
this._events.emit("localEvaluationFlagsLoaded", count);
|
|
3201
3219
|
},
|
|
3202
3220
|
customHeaders: this.getCustomHeaders(),
|
|
3203
|
-
cacheProvider: options.flagDefinitionCacheProvider
|
|
3221
|
+
cacheProvider: options.flagDefinitionCacheProvider,
|
|
3222
|
+
strictLocalEvaluation: options.strictLocalEvaluation
|
|
3204
3223
|
});
|
|
3205
3224
|
}
|
|
3206
3225
|
this.errorTracking = new ErrorTracking(this, options, this._logger);
|
|
@@ -3313,7 +3332,7 @@ var init_client = __esm({
|
|
|
3313
3332
|
const adjustedProperties = this.addLocalPersonAndGroupProperties(distinctId, groups, personProperties, groupProperties);
|
|
3314
3333
|
personProperties = adjustedProperties.allPersonProperties;
|
|
3315
3334
|
groupProperties = adjustedProperties.allGroupProperties;
|
|
3316
|
-
if (void 0 == onlyEvaluateLocally) onlyEvaluateLocally = false;
|
|
3335
|
+
if (void 0 == onlyEvaluateLocally) onlyEvaluateLocally = this.options.strictLocalEvaluation ?? false;
|
|
3317
3336
|
if (void 0 == sendFeatureFlagEvents) sendFeatureFlagEvents = this.options.sendFeatureFlagEvent ?? true;
|
|
3318
3337
|
let response = await this.featureFlagsPoller?.getFeatureFlag(key, distinctId, groups, personProperties, groupProperties);
|
|
3319
3338
|
const flagWasLocallyEvaluated = void 0 !== response;
|
|
@@ -3390,7 +3409,7 @@ var init_client = __esm({
|
|
|
3390
3409
|
else throw e;
|
|
3391
3410
|
}
|
|
3392
3411
|
}
|
|
3393
|
-
if (void 0 == onlyEvaluateLocally) onlyEvaluateLocally = false;
|
|
3412
|
+
if (void 0 == onlyEvaluateLocally) onlyEvaluateLocally = this.options.strictLocalEvaluation ?? false;
|
|
3394
3413
|
const payloadWasLocallyEvaluated = void 0 !== response;
|
|
3395
3414
|
if (!payloadWasLocallyEvaluated && !onlyEvaluateLocally) response = await super.getFeatureFlagPayloadStateless(key, distinctId, groups, personProperties, groupProperties, disableGeoip);
|
|
3396
3415
|
return response;
|
|
@@ -3421,7 +3440,7 @@ var init_client = __esm({
|
|
|
3421
3440
|
const adjustedProperties = this.addLocalPersonAndGroupProperties(distinctId, groups, personProperties, groupProperties);
|
|
3422
3441
|
personProperties = adjustedProperties.allPersonProperties;
|
|
3423
3442
|
groupProperties = adjustedProperties.allGroupProperties;
|
|
3424
|
-
if (void 0 == onlyEvaluateLocally) onlyEvaluateLocally = false;
|
|
3443
|
+
if (void 0 == onlyEvaluateLocally) onlyEvaluateLocally = this.options.strictLocalEvaluation ?? false;
|
|
3425
3444
|
const localEvaluationResult = await this.featureFlagsPoller?.getAllFlagsAndPayloads(distinctId, groups, personProperties, groupProperties, flagKeys);
|
|
3426
3445
|
let featureFlags = {};
|
|
3427
3446
|
let featureFlagPayloads = {};
|
|
@@ -3571,7 +3590,7 @@ var init_client = __esm({
|
|
|
3571
3590
|
const finalPersonProperties = sendFeatureFlagsOptions?.personProperties || {};
|
|
3572
3591
|
const finalGroupProperties = sendFeatureFlagsOptions?.groupProperties || {};
|
|
3573
3592
|
const flagKeys = sendFeatureFlagsOptions?.flagKeys;
|
|
3574
|
-
const onlyEvaluateLocally = sendFeatureFlagsOptions?.onlyEvaluateLocally ?? false;
|
|
3593
|
+
const onlyEvaluateLocally = sendFeatureFlagsOptions?.onlyEvaluateLocally ?? this.options.strictLocalEvaluation ?? false;
|
|
3575
3594
|
if (onlyEvaluateLocally) if (!((this.featureFlagsPoller?.featureFlags?.length || 0) > 0)) return {};
|
|
3576
3595
|
else {
|
|
3577
3596
|
const groupsWithStringValues = {};
|
|
@@ -3614,17 +3633,24 @@ var init_client = __esm({
|
|
|
3614
3633
|
allGroupProperties
|
|
3615
3634
|
};
|
|
3616
3635
|
}
|
|
3617
|
-
captureException(error, distinctId, additionalProperties) {
|
|
3618
|
-
|
|
3619
|
-
|
|
3620
|
-
|
|
3621
|
-
|
|
3636
|
+
captureException(error, distinctId, additionalProperties, uuid) {
|
|
3637
|
+
if (!ErrorTracking.isPreviouslyCapturedError(error)) {
|
|
3638
|
+
const syntheticException = new Error("PostHog syntheticException");
|
|
3639
|
+
this.addPendingPromise(ErrorTracking.buildEventMessage(error, {
|
|
3640
|
+
syntheticException
|
|
3641
|
+
}, distinctId, additionalProperties).then((msg) => this.capture({
|
|
3642
|
+
...msg,
|
|
3643
|
+
uuid
|
|
3644
|
+
})));
|
|
3645
|
+
}
|
|
3622
3646
|
}
|
|
3623
3647
|
async captureExceptionImmediate(error, distinctId, additionalProperties) {
|
|
3624
|
-
|
|
3625
|
-
|
|
3626
|
-
|
|
3627
|
-
|
|
3648
|
+
if (!ErrorTracking.isPreviouslyCapturedError(error)) {
|
|
3649
|
+
const syntheticException = new Error("PostHog syntheticException");
|
|
3650
|
+
this.addPendingPromise(ErrorTracking.buildEventMessage(error, {
|
|
3651
|
+
syntheticException
|
|
3652
|
+
}, distinctId, additionalProperties).then((msg) => this.captureImmediate(msg)));
|
|
3653
|
+
}
|
|
3628
3654
|
}
|
|
3629
3655
|
async prepareEventMessage(props) {
|
|
3630
3656
|
const { distinctId, event, properties, groups, sendFeatureFlags, timestamp, disableGeoip, uuid } = props;
|
|
@@ -3713,7 +3739,7 @@ var init_client = __esm({
|
|
|
3713
3739
|
});
|
|
3714
3740
|
var PostHogContext;
|
|
3715
3741
|
var init_context = __esm({
|
|
3716
|
-
"../../node_modules/.pnpm/posthog-node@5.
|
|
3742
|
+
"../../node_modules/.pnpm/posthog-node@5.21.0/node_modules/posthog-node/dist/extensions/context/context.mjs"() {
|
|
3717
3743
|
PostHogContext = class {
|
|
3718
3744
|
constructor() {
|
|
3719
3745
|
this.storage = new async_hooks.AsyncLocalStorage();
|
|
@@ -3741,7 +3767,7 @@ var init_context = __esm({
|
|
|
3741
3767
|
}
|
|
3742
3768
|
});
|
|
3743
3769
|
|
|
3744
|
-
// ../../node_modules/.pnpm/posthog-node@5.
|
|
3770
|
+
// ../../node_modules/.pnpm/posthog-node@5.21.0/node_modules/posthog-node/dist/extensions/sentry-integration.mjs
|
|
3745
3771
|
function createEventProcessor(_posthog, { organization, projectId, prefix, severityAllowList = [
|
|
3746
3772
|
"error"
|
|
3747
3773
|
], sendExceptionsToPostHog = true } = {}) {
|
|
@@ -3797,7 +3823,7 @@ function sentryIntegration(_posthog, options) {
|
|
|
3797
3823
|
}
|
|
3798
3824
|
var NAME, PostHogSentryIntegration;
|
|
3799
3825
|
var init_sentry_integration = __esm({
|
|
3800
|
-
"../../node_modules/.pnpm/posthog-node@5.
|
|
3826
|
+
"../../node_modules/.pnpm/posthog-node@5.21.0/node_modules/posthog-node/dist/extensions/sentry-integration.mjs"() {
|
|
3801
3827
|
NAME = "posthog-node";
|
|
3802
3828
|
PostHogSentryIntegration = class {
|
|
3803
3829
|
static #_ = this.POSTHOG_ID_TAG = "posthog_distinct_id";
|
|
@@ -3819,12 +3845,13 @@ var init_sentry_integration = __esm({
|
|
|
3819
3845
|
}
|
|
3820
3846
|
});
|
|
3821
3847
|
|
|
3822
|
-
// ../../node_modules/.pnpm/posthog-node@5.
|
|
3848
|
+
// ../../node_modules/.pnpm/posthog-node@5.21.0/node_modules/posthog-node/dist/extensions/express.mjs
|
|
3823
3849
|
function setupExpressErrorHandler(_posthog, app) {
|
|
3824
3850
|
app.use(posthogErrorHandler(_posthog));
|
|
3825
3851
|
}
|
|
3826
3852
|
function posthogErrorHandler(posthog) {
|
|
3827
3853
|
return (error, req, res, next) => {
|
|
3854
|
+
if (ErrorTracking.isPreviouslyCapturedError(error)) return void next(error);
|
|
3828
3855
|
const sessionId = req.headers["x-posthog-session-id"];
|
|
3829
3856
|
const distinctId = req.headers["x-posthog-distinct-id"];
|
|
3830
3857
|
const syntheticException = new Error("Synthetic exception");
|
|
@@ -3850,21 +3877,21 @@ function posthogErrorHandler(posthog) {
|
|
|
3850
3877
|
};
|
|
3851
3878
|
}
|
|
3852
3879
|
var init_express = __esm({
|
|
3853
|
-
"../../node_modules/.pnpm/posthog-node@5.
|
|
3880
|
+
"../../node_modules/.pnpm/posthog-node@5.21.0/node_modules/posthog-node/dist/extensions/express.mjs"() {
|
|
3854
3881
|
init_error_tracking2();
|
|
3855
3882
|
}
|
|
3856
3883
|
});
|
|
3857
3884
|
|
|
3858
|
-
// ../../node_modules/.pnpm/posthog-node@5.
|
|
3885
|
+
// ../../node_modules/.pnpm/posthog-node@5.21.0/node_modules/posthog-node/dist/exports.mjs
|
|
3859
3886
|
var init_exports = __esm({
|
|
3860
|
-
"../../node_modules/.pnpm/posthog-node@5.
|
|
3887
|
+
"../../node_modules/.pnpm/posthog-node@5.21.0/node_modules/posthog-node/dist/exports.mjs"() {
|
|
3861
3888
|
init_sentry_integration();
|
|
3862
3889
|
init_express();
|
|
3863
3890
|
init_types3();
|
|
3864
3891
|
}
|
|
3865
3892
|
});
|
|
3866
3893
|
|
|
3867
|
-
// ../../node_modules/.pnpm/posthog-node@5.
|
|
3894
|
+
// ../../node_modules/.pnpm/posthog-node@5.21.0/node_modules/posthog-node/dist/entrypoints/index.node.mjs
|
|
3868
3895
|
var index_node_exports = {};
|
|
3869
3896
|
__export(index_node_exports, {
|
|
3870
3897
|
FeatureFlagError: () => FeatureFlagError,
|
|
@@ -3876,7 +3903,7 @@ __export(index_node_exports, {
|
|
|
3876
3903
|
});
|
|
3877
3904
|
var PostHog;
|
|
3878
3905
|
var init_index_node = __esm({
|
|
3879
|
-
"../../node_modules/.pnpm/posthog-node@5.
|
|
3906
|
+
"../../node_modules/.pnpm/posthog-node@5.21.0/node_modules/posthog-node/dist/entrypoints/index.node.mjs"() {
|
|
3880
3907
|
init_module_node();
|
|
3881
3908
|
init_context_lines_node();
|
|
3882
3909
|
init_error_tracking2();
|
|
@@ -5167,9 +5194,9 @@ var require_dist2 = __commonJS({
|
|
|
5167
5194
|
}
|
|
5168
5195
|
});
|
|
5169
5196
|
|
|
5170
|
-
// ../../node_modules/.pnpm/mixpanel@0.
|
|
5197
|
+
// ../../node_modules/.pnpm/mixpanel@0.20.0/node_modules/mixpanel/package.json
|
|
5171
5198
|
var require_package = __commonJS({
|
|
5172
|
-
"../../node_modules/.pnpm/mixpanel@0.
|
|
5199
|
+
"../../node_modules/.pnpm/mixpanel@0.20.0/node_modules/mixpanel/package.json"(exports$1, module) {
|
|
5173
5200
|
module.exports = {
|
|
5174
5201
|
name: "mixpanel",
|
|
5175
5202
|
description: "A simple server-side API for mixpanel",
|
|
@@ -5179,7 +5206,7 @@ var require_package = __commonJS({
|
|
|
5179
5206
|
"api",
|
|
5180
5207
|
"stats"
|
|
5181
5208
|
],
|
|
5182
|
-
version: "0.
|
|
5209
|
+
version: "0.20.0",
|
|
5183
5210
|
homepage: "https://github.com/mixpanel/mixpanel-node",
|
|
5184
5211
|
author: "Carl Sverre",
|
|
5185
5212
|
license: "MIT",
|
|
@@ -5195,29 +5222,35 @@ var require_package = __commonJS({
|
|
|
5195
5222
|
node: ">=10.0"
|
|
5196
5223
|
},
|
|
5197
5224
|
scripts: {
|
|
5198
|
-
test: "vitest"
|
|
5225
|
+
test: "vitest",
|
|
5226
|
+
format: "prettier --write .",
|
|
5227
|
+
"check-format": "prettier --check .",
|
|
5228
|
+
lint: "oxlint ."
|
|
5199
5229
|
},
|
|
5200
5230
|
types: "./lib/mixpanel-node.d.ts",
|
|
5201
5231
|
devDependencies: {
|
|
5202
5232
|
"@types/node": "^24.10.1",
|
|
5203
5233
|
"@vitest/coverage-v8": "^4.0.8",
|
|
5204
5234
|
nock: "^14.0.10",
|
|
5235
|
+
oxlint: "^1.16.0",
|
|
5236
|
+
prettier: "^3.6.2",
|
|
5205
5237
|
proxyquire: "^2.1.3",
|
|
5206
5238
|
typescript: "^5.9.3",
|
|
5207
5239
|
vitest: "^4.0.8"
|
|
5208
5240
|
},
|
|
5209
5241
|
dependencies: {
|
|
5210
|
-
"https-proxy-agent": "7.0.6"
|
|
5242
|
+
"https-proxy-agent": "7.0.6",
|
|
5243
|
+
"json-logic-js": "2.0.5"
|
|
5211
5244
|
}
|
|
5212
5245
|
};
|
|
5213
5246
|
}
|
|
5214
5247
|
});
|
|
5215
5248
|
|
|
5216
|
-
// ../../node_modules/.pnpm/mixpanel@0.
|
|
5249
|
+
// ../../node_modules/.pnpm/mixpanel@0.20.0/node_modules/mixpanel/lib/utils.js
|
|
5217
5250
|
var require_utils = __commonJS({
|
|
5218
|
-
"../../node_modules/.pnpm/mixpanel@0.
|
|
5251
|
+
"../../node_modules/.pnpm/mixpanel@0.20.0/node_modules/mixpanel/lib/utils.js"(exports$1) {
|
|
5219
5252
|
exports$1.async_all = function(requests, handler, callback) {
|
|
5220
|
-
|
|
5253
|
+
let total = requests.length, errors = null, results = [], done = function(err, result) {
|
|
5221
5254
|
if (err) {
|
|
5222
5255
|
errors = errors || [];
|
|
5223
5256
|
errors.push(err);
|
|
@@ -5230,14 +5263,16 @@ var require_utils = __commonJS({
|
|
|
5230
5263
|
if (total === 0) {
|
|
5231
5264
|
callback(errors, results);
|
|
5232
5265
|
} else {
|
|
5233
|
-
for (
|
|
5266
|
+
for (let i = 0, l = requests.length; i < l; i++) {
|
|
5234
5267
|
handler(requests[i], done);
|
|
5235
5268
|
}
|
|
5236
5269
|
}
|
|
5237
5270
|
};
|
|
5238
5271
|
exports$1.ensure_timestamp = function(time) {
|
|
5239
5272
|
if (!(time instanceof Date || typeof time === "number")) {
|
|
5240
|
-
throw new Error(
|
|
5273
|
+
throw new Error(
|
|
5274
|
+
"`time` property must be a Date or Unix timestamp and is only required for `import` endpoint"
|
|
5275
|
+
);
|
|
5241
5276
|
}
|
|
5242
5277
|
return time instanceof Date ? time.getTime() : time;
|
|
5243
5278
|
};
|
|
@@ -5254,9 +5289,9 @@ var require_utils = __commonJS({
|
|
|
5254
5289
|
}
|
|
5255
5290
|
});
|
|
5256
5291
|
|
|
5257
|
-
// ../../node_modules/.pnpm/mixpanel@0.
|
|
5292
|
+
// ../../node_modules/.pnpm/mixpanel@0.20.0/node_modules/mixpanel/lib/profile_helpers.js
|
|
5258
5293
|
var require_profile_helpers = __commonJS({
|
|
5259
|
-
"../../node_modules/.pnpm/mixpanel@0.
|
|
5294
|
+
"../../node_modules/.pnpm/mixpanel@0.20.0/node_modules/mixpanel/lib/profile_helpers.js"(exports$1) {
|
|
5260
5295
|
var { ensure_timestamp } = require_utils();
|
|
5261
5296
|
function merge_modifiers(data, modifiers) {
|
|
5262
5297
|
if (modifiers) {
|
|
@@ -5304,7 +5339,7 @@ var require_profile_helpers = __commonJS({
|
|
|
5304
5339
|
}
|
|
5305
5340
|
}
|
|
5306
5341
|
let data = {
|
|
5307
|
-
|
|
5342
|
+
$token: this.token,
|
|
5308
5343
|
...identifiers
|
|
5309
5344
|
};
|
|
5310
5345
|
const set_key = set_once ? "$set_once" : "$set";
|
|
@@ -5319,14 +5354,20 @@ var require_profile_helpers = __commonJS({
|
|
|
5319
5354
|
}
|
|
5320
5355
|
data = merge_modifiers(data, modifiers);
|
|
5321
5356
|
if (this.config.debug) {
|
|
5322
|
-
this.mixpanel.config.logger.debug(
|
|
5357
|
+
this.mixpanel.config.logger.debug(
|
|
5358
|
+
`Sending the following data to Mixpanel (${this.endpoint})`,
|
|
5359
|
+
{ data }
|
|
5360
|
+
);
|
|
5323
5361
|
}
|
|
5324
|
-
this.mixpanel.send_request(
|
|
5362
|
+
this.mixpanel.send_request(
|
|
5363
|
+
{ method: "GET", endpoint: this.endpoint, data },
|
|
5364
|
+
callback
|
|
5365
|
+
);
|
|
5325
5366
|
}
|
|
5326
5367
|
_delete_profile({ identifiers, modifiers, callback }) {
|
|
5327
5368
|
let data = {
|
|
5328
|
-
|
|
5329
|
-
|
|
5369
|
+
$delete: "",
|
|
5370
|
+
$token: this.token,
|
|
5330
5371
|
...identifiers
|
|
5331
5372
|
};
|
|
5332
5373
|
if (typeof modifiers === "function") {
|
|
@@ -5336,13 +5377,18 @@ var require_profile_helpers = __commonJS({
|
|
|
5336
5377
|
if (this.config.debug) {
|
|
5337
5378
|
this.mixpanel.config.logger.debug("Deleting profile", { identifiers });
|
|
5338
5379
|
}
|
|
5339
|
-
this.mixpanel.send_request(
|
|
5380
|
+
this.mixpanel.send_request(
|
|
5381
|
+
{ method: "GET", endpoint: this.endpoint, data },
|
|
5382
|
+
callback
|
|
5383
|
+
);
|
|
5340
5384
|
}
|
|
5341
5385
|
_remove({ identifiers, data, modifiers, callback }) {
|
|
5342
5386
|
let $remove = {};
|
|
5343
5387
|
if (typeof data !== "object" || Array.isArray(data)) {
|
|
5344
5388
|
if (this.config.debug) {
|
|
5345
|
-
this.mixpanel.config.logger.error(
|
|
5389
|
+
this.mixpanel.config.logger.error(
|
|
5390
|
+
"Invalid value passed to #remove - data must be an object with scalar values"
|
|
5391
|
+
);
|
|
5346
5392
|
}
|
|
5347
5393
|
return;
|
|
5348
5394
|
}
|
|
@@ -5363,8 +5409,8 @@ var require_profile_helpers = __commonJS({
|
|
|
5363
5409
|
return;
|
|
5364
5410
|
}
|
|
5365
5411
|
data = {
|
|
5366
|
-
|
|
5367
|
-
|
|
5412
|
+
$remove,
|
|
5413
|
+
$token: this.token,
|
|
5368
5414
|
...identifiers
|
|
5369
5415
|
};
|
|
5370
5416
|
if (typeof modifiers === "function") {
|
|
@@ -5377,19 +5423,24 @@ var require_profile_helpers = __commonJS({
|
|
|
5377
5423
|
{ data }
|
|
5378
5424
|
);
|
|
5379
5425
|
}
|
|
5380
|
-
this.mixpanel.send_request(
|
|
5426
|
+
this.mixpanel.send_request(
|
|
5427
|
+
{ method: "GET", endpoint: this.endpoint, data },
|
|
5428
|
+
callback
|
|
5429
|
+
);
|
|
5381
5430
|
}
|
|
5382
5431
|
_union({ identifiers, data, modifiers, callback }) {
|
|
5383
5432
|
let $union = {};
|
|
5384
5433
|
if (typeof data !== "object" || Array.isArray(data)) {
|
|
5385
5434
|
if (this.config.debug) {
|
|
5386
|
-
this.mixpanel.config.logger.error(
|
|
5435
|
+
this.mixpanel.config.logger.error(
|
|
5436
|
+
"Invalid value passed to #union - data must be an object with scalar or array values"
|
|
5437
|
+
);
|
|
5387
5438
|
}
|
|
5388
5439
|
return;
|
|
5389
5440
|
}
|
|
5390
5441
|
for (const [key, val] of Object.entries(data)) {
|
|
5391
5442
|
if (Array.isArray(val)) {
|
|
5392
|
-
|
|
5443
|
+
const merge_values = val.filter(function(v) {
|
|
5393
5444
|
return typeof v === "string" || typeof v === "number";
|
|
5394
5445
|
});
|
|
5395
5446
|
if (merge_values.length > 0) {
|
|
@@ -5410,8 +5461,8 @@ var require_profile_helpers = __commonJS({
|
|
|
5410
5461
|
return;
|
|
5411
5462
|
}
|
|
5412
5463
|
data = {
|
|
5413
|
-
|
|
5414
|
-
|
|
5464
|
+
$union,
|
|
5465
|
+
$token: this.token,
|
|
5415
5466
|
...identifiers
|
|
5416
5467
|
};
|
|
5417
5468
|
if (typeof modifiers === "function") {
|
|
@@ -5424,7 +5475,10 @@ var require_profile_helpers = __commonJS({
|
|
|
5424
5475
|
{ data }
|
|
5425
5476
|
);
|
|
5426
5477
|
}
|
|
5427
|
-
this.mixpanel.send_request(
|
|
5478
|
+
this.mixpanel.send_request(
|
|
5479
|
+
{ method: "GET", endpoint: this.endpoint, data },
|
|
5480
|
+
callback
|
|
5481
|
+
);
|
|
5428
5482
|
}
|
|
5429
5483
|
_unset({ identifiers, prop, modifiers, callback }) {
|
|
5430
5484
|
let $unset = [];
|
|
@@ -5442,8 +5496,8 @@ var require_profile_helpers = __commonJS({
|
|
|
5442
5496
|
return;
|
|
5443
5497
|
}
|
|
5444
5498
|
let data = {
|
|
5445
|
-
|
|
5446
|
-
|
|
5499
|
+
$unset,
|
|
5500
|
+
$token: this.token,
|
|
5447
5501
|
...identifiers
|
|
5448
5502
|
};
|
|
5449
5503
|
if (typeof modifiers === "function") {
|
|
@@ -5456,15 +5510,18 @@ var require_profile_helpers = __commonJS({
|
|
|
5456
5510
|
{ data }
|
|
5457
5511
|
);
|
|
5458
5512
|
}
|
|
5459
|
-
this.mixpanel.send_request(
|
|
5513
|
+
this.mixpanel.send_request(
|
|
5514
|
+
{ method: "GET", endpoint: this.endpoint, data },
|
|
5515
|
+
callback
|
|
5516
|
+
);
|
|
5460
5517
|
}
|
|
5461
5518
|
};
|
|
5462
5519
|
}
|
|
5463
5520
|
});
|
|
5464
5521
|
|
|
5465
|
-
// ../../node_modules/.pnpm/mixpanel@0.
|
|
5522
|
+
// ../../node_modules/.pnpm/mixpanel@0.20.0/node_modules/mixpanel/lib/groups.js
|
|
5466
5523
|
var require_groups = __commonJS({
|
|
5467
|
-
"../../node_modules/.pnpm/mixpanel@0.
|
|
5524
|
+
"../../node_modules/.pnpm/mixpanel@0.20.0/node_modules/mixpanel/lib/groups.js"(exports$1) {
|
|
5468
5525
|
var { ProfileHelpers } = require_profile_helpers();
|
|
5469
5526
|
var MixpanelGroups = class extends ProfileHelpers() {
|
|
5470
5527
|
constructor(mp_instance) {
|
|
@@ -5473,9 +5530,9 @@ var require_groups = __commonJS({
|
|
|
5473
5530
|
this.endpoint = "/groups";
|
|
5474
5531
|
}
|
|
5475
5532
|
/** groups.set_once(group_key, group_id, prop, to, modifiers, callback)
|
|
5476
|
-
|
|
5477
|
-
|
|
5478
|
-
|
|
5533
|
+
---
|
|
5534
|
+
The same as groups.set, but adds a property value to a group only if it has not been set before.
|
|
5535
|
+
*/
|
|
5479
5536
|
set_once(group_key, group_id, prop, to, modifiers, callback) {
|
|
5480
5537
|
const identifiers = { $group_key: group_key, $group_id: group_id };
|
|
5481
5538
|
this._set(prop, to, modifiers, callback, { identifiers, set_once: true });
|
|
@@ -5564,9 +5621,9 @@ var require_groups = __commonJS({
|
|
|
5564
5621
|
}
|
|
5565
5622
|
});
|
|
5566
5623
|
|
|
5567
|
-
// ../../node_modules/.pnpm/mixpanel@0.
|
|
5624
|
+
// ../../node_modules/.pnpm/mixpanel@0.20.0/node_modules/mixpanel/lib/people.js
|
|
5568
5625
|
var require_people = __commonJS({
|
|
5569
|
-
"../../node_modules/.pnpm/mixpanel@0.
|
|
5626
|
+
"../../node_modules/.pnpm/mixpanel@0.20.0/node_modules/mixpanel/lib/people.js"(exports$1) {
|
|
5570
5627
|
var { merge_modifiers, ProfileHelpers } = require_profile_helpers();
|
|
5571
5628
|
var MixpanelPeople = class extends ProfileHelpers() {
|
|
5572
5629
|
constructor(mp_instance) {
|
|
@@ -5632,7 +5689,7 @@ var require_people = __commonJS({
|
|
|
5632
5689
|
});
|
|
5633
5690
|
*/
|
|
5634
5691
|
increment(distinct_id, prop, by, modifiers, callback) {
|
|
5635
|
-
|
|
5692
|
+
const $add = {};
|
|
5636
5693
|
if (typeof prop === "object") {
|
|
5637
5694
|
if (typeof by === "object") {
|
|
5638
5695
|
callback = modifiers;
|
|
@@ -5668,16 +5725,22 @@ var require_people = __commonJS({
|
|
|
5668
5725
|
$add[prop] = 1;
|
|
5669
5726
|
}
|
|
5670
5727
|
}
|
|
5671
|
-
|
|
5672
|
-
|
|
5673
|
-
|
|
5674
|
-
|
|
5728
|
+
let data = {
|
|
5729
|
+
$add,
|
|
5730
|
+
$token: this.mixpanel.token,
|
|
5731
|
+
$distinct_id: distinct_id
|
|
5675
5732
|
};
|
|
5676
5733
|
data = merge_modifiers(data, modifiers);
|
|
5677
5734
|
if (this.mixpanel.config.debug) {
|
|
5678
|
-
this.mixpanel.config.logger.debug(
|
|
5735
|
+
this.mixpanel.config.logger.debug(
|
|
5736
|
+
"Sending the following data to Mixpanel (Engage)",
|
|
5737
|
+
{ data }
|
|
5738
|
+
);
|
|
5679
5739
|
}
|
|
5680
|
-
this.mixpanel.send_request(
|
|
5740
|
+
this.mixpanel.send_request(
|
|
5741
|
+
{ method: "GET", endpoint: "/engage", data },
|
|
5742
|
+
callback
|
|
5743
|
+
);
|
|
5681
5744
|
}
|
|
5682
5745
|
/**
|
|
5683
5746
|
people.append(distinct_id, prop, value, modifiers, callback)
|
|
@@ -5696,7 +5759,7 @@ var require_people = __commonJS({
|
|
|
5696
5759
|
});
|
|
5697
5760
|
*/
|
|
5698
5761
|
append(distinct_id, prop, value, modifiers, callback) {
|
|
5699
|
-
|
|
5762
|
+
const $append = {};
|
|
5700
5763
|
if (typeof prop === "object") {
|
|
5701
5764
|
if (typeof value === "object") {
|
|
5702
5765
|
callback = modifiers;
|
|
@@ -5713,16 +5776,22 @@ var require_people = __commonJS({
|
|
|
5713
5776
|
callback = modifiers;
|
|
5714
5777
|
}
|
|
5715
5778
|
}
|
|
5716
|
-
|
|
5717
|
-
|
|
5718
|
-
|
|
5719
|
-
|
|
5779
|
+
let data = {
|
|
5780
|
+
$append,
|
|
5781
|
+
$token: this.mixpanel.token,
|
|
5782
|
+
$distinct_id: distinct_id
|
|
5720
5783
|
};
|
|
5721
5784
|
data = merge_modifiers(data, modifiers);
|
|
5722
5785
|
if (this.mixpanel.config.debug) {
|
|
5723
|
-
this.mixpanel.config.logger.debug(
|
|
5786
|
+
this.mixpanel.config.logger.debug(
|
|
5787
|
+
"Sending the following data to Mixpanel (Engage)",
|
|
5788
|
+
{ data }
|
|
5789
|
+
);
|
|
5724
5790
|
}
|
|
5725
|
-
this.mixpanel.send_request(
|
|
5791
|
+
this.mixpanel.send_request(
|
|
5792
|
+
{ method: "GET", endpoint: "/engage", data },
|
|
5793
|
+
callback
|
|
5794
|
+
);
|
|
5726
5795
|
}
|
|
5727
5796
|
/**
|
|
5728
5797
|
people.track_charge(distinct_id, amount, properties, modifiers, callback)
|
|
@@ -5757,27 +5826,35 @@ var require_people = __commonJS({
|
|
|
5757
5826
|
if (typeof amount !== "number") {
|
|
5758
5827
|
amount = parseFloat(amount);
|
|
5759
5828
|
if (isNaN(amount)) {
|
|
5760
|
-
this.mixpanel.config.logger.error(
|
|
5829
|
+
this.mixpanel.config.logger.error(
|
|
5830
|
+
"Invalid value passed to mixpanel.people.track_charge - must be a number"
|
|
5831
|
+
);
|
|
5761
5832
|
return;
|
|
5762
5833
|
}
|
|
5763
5834
|
}
|
|
5764
5835
|
properties.$amount = amount;
|
|
5765
5836
|
if (properties.hasOwnProperty("$time")) {
|
|
5766
|
-
|
|
5837
|
+
const time = properties.$time;
|
|
5767
5838
|
if (Object.prototype.toString.call(time) === "[object Date]") {
|
|
5768
5839
|
properties.$time = time.toISOString();
|
|
5769
5840
|
}
|
|
5770
5841
|
}
|
|
5771
|
-
|
|
5772
|
-
|
|
5773
|
-
|
|
5774
|
-
|
|
5842
|
+
let data = {
|
|
5843
|
+
$append: { $transactions: properties },
|
|
5844
|
+
$token: this.mixpanel.token,
|
|
5845
|
+
$distinct_id: distinct_id
|
|
5775
5846
|
};
|
|
5776
5847
|
data = merge_modifiers(data, modifiers);
|
|
5777
5848
|
if (this.mixpanel.config.debug) {
|
|
5778
|
-
this.mixpanel.config.logger.debug(
|
|
5849
|
+
this.mixpanel.config.logger.debug(
|
|
5850
|
+
"Sending the following data to Mixpanel (Engage)",
|
|
5851
|
+
{ data }
|
|
5852
|
+
);
|
|
5779
5853
|
}
|
|
5780
|
-
this.mixpanel.send_request(
|
|
5854
|
+
this.mixpanel.send_request(
|
|
5855
|
+
{ method: "GET", endpoint: "/engage", data },
|
|
5856
|
+
callback
|
|
5857
|
+
);
|
|
5781
5858
|
}
|
|
5782
5859
|
/**
|
|
5783
5860
|
people.clear_charges(distinct_id, modifiers, callback)
|
|
@@ -5789,19 +5866,24 @@ var require_people = __commonJS({
|
|
|
5789
5866
|
mixpanel.people.clear_charges('bob');
|
|
5790
5867
|
*/
|
|
5791
5868
|
clear_charges(distinct_id, modifiers, callback) {
|
|
5792
|
-
|
|
5793
|
-
|
|
5794
|
-
|
|
5795
|
-
|
|
5869
|
+
let data = {
|
|
5870
|
+
$set: { $transactions: [] },
|
|
5871
|
+
$token: this.mixpanel.token,
|
|
5872
|
+
$distinct_id: distinct_id
|
|
5796
5873
|
};
|
|
5797
5874
|
if (typeof modifiers === "function") {
|
|
5798
5875
|
callback = modifiers;
|
|
5799
5876
|
}
|
|
5800
5877
|
data = merge_modifiers(data, modifiers);
|
|
5801
5878
|
if (this.mixpanel.config.debug) {
|
|
5802
|
-
this.mixpanel.config.logger.debug("Clearing this user's charges", {
|
|
5879
|
+
this.mixpanel.config.logger.debug("Clearing this user's charges", {
|
|
5880
|
+
$distinct_id: distinct_id
|
|
5881
|
+
});
|
|
5803
5882
|
}
|
|
5804
|
-
this.mixpanel.send_request(
|
|
5883
|
+
this.mixpanel.send_request(
|
|
5884
|
+
{ method: "GET", endpoint: "/engage", data },
|
|
5885
|
+
callback
|
|
5886
|
+
);
|
|
5805
5887
|
}
|
|
5806
5888
|
/**
|
|
5807
5889
|
people.delete_user(distinct_id, modifiers, callback)
|
|
@@ -5828,7 +5910,7 @@ var require_people = __commonJS({
|
|
|
5828
5910
|
mixpanel.people.remove('bob', {'browsers': 'chrome', 'os': 'linux'});
|
|
5829
5911
|
*/
|
|
5830
5912
|
remove(distinct_id, data, modifiers, callback) {
|
|
5831
|
-
const identifiers = {
|
|
5913
|
+
const identifiers = { $distinct_id: distinct_id };
|
|
5832
5914
|
this._remove({ identifiers, data, modifiers, callback });
|
|
5833
5915
|
}
|
|
5834
5916
|
/**
|
|
@@ -5866,9 +5948,9 @@ var require_people = __commonJS({
|
|
|
5866
5948
|
}
|
|
5867
5949
|
});
|
|
5868
5950
|
|
|
5869
|
-
// ../../node_modules/.pnpm/mixpanel@0.
|
|
5951
|
+
// ../../node_modules/.pnpm/mixpanel@0.20.0/node_modules/mixpanel/lib/flags/utils.js
|
|
5870
5952
|
var require_utils2 = __commonJS({
|
|
5871
|
-
"../../node_modules/.pnpm/mixpanel@0.
|
|
5953
|
+
"../../node_modules/.pnpm/mixpanel@0.20.0/node_modules/mixpanel/lib/flags/utils.js"(exports$1, module) {
|
|
5872
5954
|
var crypto3 = __require("crypto");
|
|
5873
5955
|
var EXPOSURE_EVENT = "$experiment_started";
|
|
5874
5956
|
var REQUEST_HEADERS = {
|
|
@@ -5903,22 +5985,55 @@ var require_utils2 = __commonJS({
|
|
|
5903
5985
|
const traceFlags = "01";
|
|
5904
5986
|
return `${version3}-${traceId}-${parentId}-${traceFlags}`;
|
|
5905
5987
|
}
|
|
5988
|
+
function lowercaseJson(obj, lowercaseKeys) {
|
|
5989
|
+
if (obj === null || obj === void 0) {
|
|
5990
|
+
return obj;
|
|
5991
|
+
} else if (typeof obj === "string") {
|
|
5992
|
+
return obj.toLowerCase();
|
|
5993
|
+
} else if (typeof obj === "object") {
|
|
5994
|
+
if (Array.isArray(obj)) {
|
|
5995
|
+
return obj.map((item) => lowercaseJson(item, lowercaseKeys));
|
|
5996
|
+
} else {
|
|
5997
|
+
return Object.fromEntries(
|
|
5998
|
+
Object.entries(obj).map(([k, v]) => [
|
|
5999
|
+
lowercaseKeys ? k.toLowerCase() : k,
|
|
6000
|
+
lowercaseJson(v, lowercaseKeys)
|
|
6001
|
+
])
|
|
6002
|
+
);
|
|
6003
|
+
}
|
|
6004
|
+
} else {
|
|
6005
|
+
return obj;
|
|
6006
|
+
}
|
|
6007
|
+
}
|
|
6008
|
+
function lowercaseAllKeysAndValues(obj) {
|
|
6009
|
+
return lowercaseJson(obj, true);
|
|
6010
|
+
}
|
|
6011
|
+
function lowercaseLeafNodes(obj) {
|
|
6012
|
+
return lowercaseJson(obj, false);
|
|
6013
|
+
}
|
|
5906
6014
|
module.exports = {
|
|
5907
6015
|
EXPOSURE_EVENT,
|
|
5908
6016
|
REQUEST_HEADERS,
|
|
5909
6017
|
normalizedHash,
|
|
5910
6018
|
prepareCommonQueryParams,
|
|
5911
|
-
generateTraceparent
|
|
6019
|
+
generateTraceparent,
|
|
6020
|
+
lowercaseAllKeysAndValues,
|
|
6021
|
+
lowercaseLeafNodes
|
|
5912
6022
|
};
|
|
5913
6023
|
}
|
|
5914
6024
|
});
|
|
5915
6025
|
|
|
5916
|
-
// ../../node_modules/.pnpm/mixpanel@0.
|
|
6026
|
+
// ../../node_modules/.pnpm/mixpanel@0.20.0/node_modules/mixpanel/lib/flags/flags.js
|
|
5917
6027
|
var require_flags = __commonJS({
|
|
5918
|
-
"../../node_modules/.pnpm/mixpanel@0.
|
|
6028
|
+
"../../node_modules/.pnpm/mixpanel@0.20.0/node_modules/mixpanel/lib/flags/flags.js"(exports$1, module) {
|
|
5919
6029
|
var https3 = __require("https");
|
|
5920
6030
|
var packageInfo = require_package();
|
|
5921
|
-
var {
|
|
6031
|
+
var {
|
|
6032
|
+
prepareCommonQueryParams,
|
|
6033
|
+
generateTraceparent,
|
|
6034
|
+
EXPOSURE_EVENT,
|
|
6035
|
+
REQUEST_HEADERS
|
|
6036
|
+
} = require_utils2();
|
|
5922
6037
|
var FeatureFlagsProvider = class {
|
|
5923
6038
|
/**
|
|
5924
6039
|
* @param {Object} providerConfig - Configuration object with token, api_host, request_timeout_in_seconds
|
|
@@ -5941,7 +6056,10 @@ var require_flags = __commonJS({
|
|
|
5941
6056
|
*/
|
|
5942
6057
|
async callFlagsEndpoint(additionalParams = null) {
|
|
5943
6058
|
return new Promise((resolve, reject) => {
|
|
5944
|
-
const commonParams = prepareCommonQueryParams(
|
|
6059
|
+
const commonParams = prepareCommonQueryParams(
|
|
6060
|
+
this.providerConfig.token,
|
|
6061
|
+
packageInfo.version
|
|
6062
|
+
);
|
|
5945
6063
|
const params = new URLSearchParams(commonParams);
|
|
5946
6064
|
if (additionalParams) {
|
|
5947
6065
|
for (const [key, value] of Object.entries(additionalParams)) {
|
|
@@ -5956,8 +6074,8 @@ var require_flags = __commonJS({
|
|
|
5956
6074
|
method: "GET",
|
|
5957
6075
|
headers: {
|
|
5958
6076
|
...REQUEST_HEADERS,
|
|
5959
|
-
|
|
5960
|
-
|
|
6077
|
+
Authorization: "Basic " + Buffer.from(this.providerConfig.token + ":").toString("base64"),
|
|
6078
|
+
traceparent: generateTraceparent()
|
|
5961
6079
|
},
|
|
5962
6080
|
timeout: this.providerConfig.request_timeout_in_seconds * 1e3
|
|
5963
6081
|
};
|
|
@@ -5968,20 +6086,26 @@ var require_flags = __commonJS({
|
|
|
5968
6086
|
});
|
|
5969
6087
|
res.on("end", () => {
|
|
5970
6088
|
if (res.statusCode !== 200) {
|
|
5971
|
-
this.logger?.error(
|
|
6089
|
+
this.logger?.error(
|
|
6090
|
+
`HTTP ${res.statusCode} error calling flags endpoint: ${data}`
|
|
6091
|
+
);
|
|
5972
6092
|
return reject(new Error(`HTTP ${res.statusCode}: ${data}`));
|
|
5973
6093
|
}
|
|
5974
6094
|
try {
|
|
5975
6095
|
const result = JSON.parse(data);
|
|
5976
6096
|
resolve(result);
|
|
5977
6097
|
} catch (parseErr) {
|
|
5978
|
-
this.logger?.error(
|
|
6098
|
+
this.logger?.error(
|
|
6099
|
+
`Failed to parse JSON response: ${parseErr.message}`
|
|
6100
|
+
);
|
|
5979
6101
|
reject(parseErr);
|
|
5980
6102
|
}
|
|
5981
6103
|
});
|
|
5982
6104
|
});
|
|
5983
6105
|
request.on("error", (err) => {
|
|
5984
|
-
this.logger?.error(
|
|
6106
|
+
this.logger?.error(
|
|
6107
|
+
`Network error calling flags endpoint: ${err.message}`
|
|
6108
|
+
);
|
|
5985
6109
|
reject(err);
|
|
5986
6110
|
});
|
|
5987
6111
|
request.on("timeout", () => {
|
|
@@ -6003,14 +6127,16 @@ var require_flags = __commonJS({
|
|
|
6003
6127
|
*/
|
|
6004
6128
|
trackExposureEvent(flagKey, selectedVariant, context, latencyMs = null) {
|
|
6005
6129
|
if (!context.distinct_id) {
|
|
6006
|
-
this.logger?.error(
|
|
6130
|
+
this.logger?.error(
|
|
6131
|
+
"Cannot track exposure event without a distinct_id in the context"
|
|
6132
|
+
);
|
|
6007
6133
|
return;
|
|
6008
6134
|
}
|
|
6009
6135
|
const properties = {
|
|
6010
|
-
|
|
6136
|
+
distinct_id: context.distinct_id,
|
|
6011
6137
|
"Experiment name": flagKey,
|
|
6012
6138
|
"Variant name": selectedVariant.variant_key,
|
|
6013
|
-
|
|
6139
|
+
$experiment_type: "feature_flag",
|
|
6014
6140
|
"Flag evaluation mode": this.evaluationMode
|
|
6015
6141
|
};
|
|
6016
6142
|
if (latencyMs !== null && latencyMs !== void 0) {
|
|
@@ -6027,7 +6153,9 @@ var require_flags = __commonJS({
|
|
|
6027
6153
|
}
|
|
6028
6154
|
this.tracker(EXPOSURE_EVENT, properties, (err) => {
|
|
6029
6155
|
if (err) {
|
|
6030
|
-
this.logger?.error(
|
|
6156
|
+
this.logger?.error(
|
|
6157
|
+
`[flags]Failed to track exposure event for flag '${flagKey}': ${err.message}`
|
|
6158
|
+
);
|
|
6031
6159
|
}
|
|
6032
6160
|
});
|
|
6033
6161
|
}
|
|
@@ -6036,11 +6164,392 @@ var require_flags = __commonJS({
|
|
|
6036
6164
|
}
|
|
6037
6165
|
});
|
|
6038
6166
|
|
|
6039
|
-
// ../../node_modules/.pnpm/
|
|
6167
|
+
// ../../node_modules/.pnpm/json-logic-js@2.0.5/node_modules/json-logic-js/logic.js
|
|
6168
|
+
var require_logic = __commonJS({
|
|
6169
|
+
"../../node_modules/.pnpm/json-logic-js@2.0.5/node_modules/json-logic-js/logic.js"(exports$1, module) {
|
|
6170
|
+
(function(root, factory) {
|
|
6171
|
+
if (typeof define === "function" && define.amd) {
|
|
6172
|
+
define(factory);
|
|
6173
|
+
} else if (typeof exports$1 === "object") {
|
|
6174
|
+
module.exports = factory();
|
|
6175
|
+
} else {
|
|
6176
|
+
root.jsonLogic = factory();
|
|
6177
|
+
}
|
|
6178
|
+
})(exports$1, function() {
|
|
6179
|
+
if (!Array.isArray) {
|
|
6180
|
+
Array.isArray = function(arg) {
|
|
6181
|
+
return Object.prototype.toString.call(arg) === "[object Array]";
|
|
6182
|
+
};
|
|
6183
|
+
}
|
|
6184
|
+
function arrayUnique(array) {
|
|
6185
|
+
var a = [];
|
|
6186
|
+
for (var i = 0, l = array.length; i < l; i++) {
|
|
6187
|
+
if (a.indexOf(array[i]) === -1) {
|
|
6188
|
+
a.push(array[i]);
|
|
6189
|
+
}
|
|
6190
|
+
}
|
|
6191
|
+
return a;
|
|
6192
|
+
}
|
|
6193
|
+
var jsonLogic = {};
|
|
6194
|
+
var operations = {
|
|
6195
|
+
"==": function(a, b) {
|
|
6196
|
+
return a == b;
|
|
6197
|
+
},
|
|
6198
|
+
"===": function(a, b) {
|
|
6199
|
+
return a === b;
|
|
6200
|
+
},
|
|
6201
|
+
"!=": function(a, b) {
|
|
6202
|
+
return a != b;
|
|
6203
|
+
},
|
|
6204
|
+
"!==": function(a, b) {
|
|
6205
|
+
return a !== b;
|
|
6206
|
+
},
|
|
6207
|
+
">": function(a, b) {
|
|
6208
|
+
return a > b;
|
|
6209
|
+
},
|
|
6210
|
+
">=": function(a, b) {
|
|
6211
|
+
return a >= b;
|
|
6212
|
+
},
|
|
6213
|
+
"<": function(a, b, c) {
|
|
6214
|
+
return c === void 0 ? a < b : a < b && b < c;
|
|
6215
|
+
},
|
|
6216
|
+
"<=": function(a, b, c) {
|
|
6217
|
+
return c === void 0 ? a <= b : a <= b && b <= c;
|
|
6218
|
+
},
|
|
6219
|
+
"!!": function(a) {
|
|
6220
|
+
return jsonLogic.truthy(a);
|
|
6221
|
+
},
|
|
6222
|
+
"!": function(a) {
|
|
6223
|
+
return !jsonLogic.truthy(a);
|
|
6224
|
+
},
|
|
6225
|
+
"%": function(a, b) {
|
|
6226
|
+
return a % b;
|
|
6227
|
+
},
|
|
6228
|
+
"log": function(a) {
|
|
6229
|
+
console.log(a);
|
|
6230
|
+
return a;
|
|
6231
|
+
},
|
|
6232
|
+
"in": function(a, b) {
|
|
6233
|
+
if (!b || typeof b.indexOf === "undefined") return false;
|
|
6234
|
+
return b.indexOf(a) !== -1;
|
|
6235
|
+
},
|
|
6236
|
+
"cat": function() {
|
|
6237
|
+
return Array.prototype.join.call(arguments, "");
|
|
6238
|
+
},
|
|
6239
|
+
"substr": function(source, start, end) {
|
|
6240
|
+
if (end < 0) {
|
|
6241
|
+
var temp = String(source).substr(start);
|
|
6242
|
+
return temp.substr(0, temp.length + end);
|
|
6243
|
+
}
|
|
6244
|
+
return String(source).substr(start, end);
|
|
6245
|
+
},
|
|
6246
|
+
"+": function() {
|
|
6247
|
+
return Array.prototype.reduce.call(arguments, function(a, b) {
|
|
6248
|
+
return parseFloat(a, 10) + parseFloat(b, 10);
|
|
6249
|
+
}, 0);
|
|
6250
|
+
},
|
|
6251
|
+
"*": function() {
|
|
6252
|
+
return Array.prototype.reduce.call(arguments, function(a, b) {
|
|
6253
|
+
return parseFloat(a, 10) * parseFloat(b, 10);
|
|
6254
|
+
});
|
|
6255
|
+
},
|
|
6256
|
+
"-": function(a, b) {
|
|
6257
|
+
if (b === void 0) {
|
|
6258
|
+
return -a;
|
|
6259
|
+
} else {
|
|
6260
|
+
return a - b;
|
|
6261
|
+
}
|
|
6262
|
+
},
|
|
6263
|
+
"/": function(a, b) {
|
|
6264
|
+
return a / b;
|
|
6265
|
+
},
|
|
6266
|
+
"min": function() {
|
|
6267
|
+
return Math.min.apply(this, arguments);
|
|
6268
|
+
},
|
|
6269
|
+
"max": function() {
|
|
6270
|
+
return Math.max.apply(this, arguments);
|
|
6271
|
+
},
|
|
6272
|
+
"merge": function() {
|
|
6273
|
+
return Array.prototype.reduce.call(arguments, function(a, b) {
|
|
6274
|
+
return a.concat(b);
|
|
6275
|
+
}, []);
|
|
6276
|
+
},
|
|
6277
|
+
"var": function(a, b) {
|
|
6278
|
+
var not_found = b === void 0 ? null : b;
|
|
6279
|
+
var data = this;
|
|
6280
|
+
if (typeof a === "undefined" || a === "" || a === null) {
|
|
6281
|
+
return data;
|
|
6282
|
+
}
|
|
6283
|
+
var sub_props = String(a).split(".");
|
|
6284
|
+
for (var i = 0; i < sub_props.length; i++) {
|
|
6285
|
+
if (data === null || data === void 0) {
|
|
6286
|
+
return not_found;
|
|
6287
|
+
}
|
|
6288
|
+
data = data[sub_props[i]];
|
|
6289
|
+
if (data === void 0) {
|
|
6290
|
+
return not_found;
|
|
6291
|
+
}
|
|
6292
|
+
}
|
|
6293
|
+
return data;
|
|
6294
|
+
},
|
|
6295
|
+
"missing": function() {
|
|
6296
|
+
var missing = [];
|
|
6297
|
+
var keys = Array.isArray(arguments[0]) ? arguments[0] : arguments;
|
|
6298
|
+
for (var i = 0; i < keys.length; i++) {
|
|
6299
|
+
var key = keys[i];
|
|
6300
|
+
var value = jsonLogic.apply({ "var": key }, this);
|
|
6301
|
+
if (value === null || value === "") {
|
|
6302
|
+
missing.push(key);
|
|
6303
|
+
}
|
|
6304
|
+
}
|
|
6305
|
+
return missing;
|
|
6306
|
+
},
|
|
6307
|
+
"missing_some": function(need_count, options) {
|
|
6308
|
+
var are_missing = jsonLogic.apply({ "missing": options }, this);
|
|
6309
|
+
if (options.length - are_missing.length >= need_count) {
|
|
6310
|
+
return [];
|
|
6311
|
+
} else {
|
|
6312
|
+
return are_missing;
|
|
6313
|
+
}
|
|
6314
|
+
}
|
|
6315
|
+
};
|
|
6316
|
+
jsonLogic.is_logic = function(logic) {
|
|
6317
|
+
return typeof logic === "object" && // An object
|
|
6318
|
+
logic !== null && // but not null
|
|
6319
|
+
!Array.isArray(logic) && // and not an array
|
|
6320
|
+
Object.keys(logic).length === 1;
|
|
6321
|
+
};
|
|
6322
|
+
jsonLogic.truthy = function(value) {
|
|
6323
|
+
if (Array.isArray(value) && value.length === 0) {
|
|
6324
|
+
return false;
|
|
6325
|
+
}
|
|
6326
|
+
return !!value;
|
|
6327
|
+
};
|
|
6328
|
+
jsonLogic.get_operator = function(logic) {
|
|
6329
|
+
return Object.keys(logic)[0];
|
|
6330
|
+
};
|
|
6331
|
+
jsonLogic.get_values = function(logic) {
|
|
6332
|
+
return logic[jsonLogic.get_operator(logic)];
|
|
6333
|
+
};
|
|
6334
|
+
jsonLogic.apply = function(logic, data) {
|
|
6335
|
+
if (Array.isArray(logic)) {
|
|
6336
|
+
return logic.map(function(l) {
|
|
6337
|
+
return jsonLogic.apply(l, data);
|
|
6338
|
+
});
|
|
6339
|
+
}
|
|
6340
|
+
if (!jsonLogic.is_logic(logic)) {
|
|
6341
|
+
return logic;
|
|
6342
|
+
}
|
|
6343
|
+
var op = jsonLogic.get_operator(logic);
|
|
6344
|
+
var values = logic[op];
|
|
6345
|
+
var i;
|
|
6346
|
+
var current;
|
|
6347
|
+
var scopedLogic;
|
|
6348
|
+
var scopedData;
|
|
6349
|
+
var initial;
|
|
6350
|
+
if (!Array.isArray(values)) {
|
|
6351
|
+
values = [values];
|
|
6352
|
+
}
|
|
6353
|
+
if (op === "if" || op == "?:") {
|
|
6354
|
+
for (i = 0; i < values.length - 1; i += 2) {
|
|
6355
|
+
if (jsonLogic.truthy(jsonLogic.apply(values[i], data))) {
|
|
6356
|
+
return jsonLogic.apply(values[i + 1], data);
|
|
6357
|
+
}
|
|
6358
|
+
}
|
|
6359
|
+
if (values.length === i + 1) {
|
|
6360
|
+
return jsonLogic.apply(values[i], data);
|
|
6361
|
+
}
|
|
6362
|
+
return null;
|
|
6363
|
+
} else if (op === "and") {
|
|
6364
|
+
for (i = 0; i < values.length; i += 1) {
|
|
6365
|
+
current = jsonLogic.apply(values[i], data);
|
|
6366
|
+
if (!jsonLogic.truthy(current)) {
|
|
6367
|
+
return current;
|
|
6368
|
+
}
|
|
6369
|
+
}
|
|
6370
|
+
return current;
|
|
6371
|
+
} else if (op === "or") {
|
|
6372
|
+
for (i = 0; i < values.length; i += 1) {
|
|
6373
|
+
current = jsonLogic.apply(values[i], data);
|
|
6374
|
+
if (jsonLogic.truthy(current)) {
|
|
6375
|
+
return current;
|
|
6376
|
+
}
|
|
6377
|
+
}
|
|
6378
|
+
return current;
|
|
6379
|
+
} else if (op === "filter") {
|
|
6380
|
+
scopedData = jsonLogic.apply(values[0], data);
|
|
6381
|
+
scopedLogic = values[1];
|
|
6382
|
+
if (!Array.isArray(scopedData)) {
|
|
6383
|
+
return [];
|
|
6384
|
+
}
|
|
6385
|
+
return scopedData.filter(function(datum) {
|
|
6386
|
+
return jsonLogic.truthy(jsonLogic.apply(scopedLogic, datum));
|
|
6387
|
+
});
|
|
6388
|
+
} else if (op === "map") {
|
|
6389
|
+
scopedData = jsonLogic.apply(values[0], data);
|
|
6390
|
+
scopedLogic = values[1];
|
|
6391
|
+
if (!Array.isArray(scopedData)) {
|
|
6392
|
+
return [];
|
|
6393
|
+
}
|
|
6394
|
+
return scopedData.map(function(datum) {
|
|
6395
|
+
return jsonLogic.apply(scopedLogic, datum);
|
|
6396
|
+
});
|
|
6397
|
+
} else if (op === "reduce") {
|
|
6398
|
+
scopedData = jsonLogic.apply(values[0], data);
|
|
6399
|
+
scopedLogic = values[1];
|
|
6400
|
+
initial = typeof values[2] !== "undefined" ? jsonLogic.apply(values[2], data) : null;
|
|
6401
|
+
if (!Array.isArray(scopedData)) {
|
|
6402
|
+
return initial;
|
|
6403
|
+
}
|
|
6404
|
+
return scopedData.reduce(
|
|
6405
|
+
function(accumulator, current2) {
|
|
6406
|
+
return jsonLogic.apply(
|
|
6407
|
+
scopedLogic,
|
|
6408
|
+
{ current: current2, accumulator }
|
|
6409
|
+
);
|
|
6410
|
+
},
|
|
6411
|
+
initial
|
|
6412
|
+
);
|
|
6413
|
+
} else if (op === "all") {
|
|
6414
|
+
scopedData = jsonLogic.apply(values[0], data);
|
|
6415
|
+
scopedLogic = values[1];
|
|
6416
|
+
if (!Array.isArray(scopedData) || !scopedData.length) {
|
|
6417
|
+
return false;
|
|
6418
|
+
}
|
|
6419
|
+
for (i = 0; i < scopedData.length; i += 1) {
|
|
6420
|
+
if (!jsonLogic.truthy(jsonLogic.apply(scopedLogic, scopedData[i]))) {
|
|
6421
|
+
return false;
|
|
6422
|
+
}
|
|
6423
|
+
}
|
|
6424
|
+
return true;
|
|
6425
|
+
} else if (op === "none") {
|
|
6426
|
+
scopedData = jsonLogic.apply(values[0], data);
|
|
6427
|
+
scopedLogic = values[1];
|
|
6428
|
+
if (!Array.isArray(scopedData) || !scopedData.length) {
|
|
6429
|
+
return true;
|
|
6430
|
+
}
|
|
6431
|
+
for (i = 0; i < scopedData.length; i += 1) {
|
|
6432
|
+
if (jsonLogic.truthy(jsonLogic.apply(scopedLogic, scopedData[i]))) {
|
|
6433
|
+
return false;
|
|
6434
|
+
}
|
|
6435
|
+
}
|
|
6436
|
+
return true;
|
|
6437
|
+
} else if (op === "some") {
|
|
6438
|
+
scopedData = jsonLogic.apply(values[0], data);
|
|
6439
|
+
scopedLogic = values[1];
|
|
6440
|
+
if (!Array.isArray(scopedData) || !scopedData.length) {
|
|
6441
|
+
return false;
|
|
6442
|
+
}
|
|
6443
|
+
for (i = 0; i < scopedData.length; i += 1) {
|
|
6444
|
+
if (jsonLogic.truthy(jsonLogic.apply(scopedLogic, scopedData[i]))) {
|
|
6445
|
+
return true;
|
|
6446
|
+
}
|
|
6447
|
+
}
|
|
6448
|
+
return false;
|
|
6449
|
+
}
|
|
6450
|
+
values = values.map(function(val) {
|
|
6451
|
+
return jsonLogic.apply(val, data);
|
|
6452
|
+
});
|
|
6453
|
+
if (operations.hasOwnProperty(op) && typeof operations[op] === "function") {
|
|
6454
|
+
return operations[op].apply(data, values);
|
|
6455
|
+
} else if (op.indexOf(".") > 0) {
|
|
6456
|
+
var sub_ops = String(op).split(".");
|
|
6457
|
+
var operation = operations;
|
|
6458
|
+
for (i = 0; i < sub_ops.length; i++) {
|
|
6459
|
+
if (!operation.hasOwnProperty(sub_ops[i])) {
|
|
6460
|
+
throw new Error("Unrecognized operation " + op + " (failed at " + sub_ops.slice(0, i + 1).join(".") + ")");
|
|
6461
|
+
}
|
|
6462
|
+
operation = operation[sub_ops[i]];
|
|
6463
|
+
}
|
|
6464
|
+
return operation.apply(data, values);
|
|
6465
|
+
}
|
|
6466
|
+
throw new Error("Unrecognized operation " + op);
|
|
6467
|
+
};
|
|
6468
|
+
jsonLogic.uses_data = function(logic) {
|
|
6469
|
+
var collection = [];
|
|
6470
|
+
if (jsonLogic.is_logic(logic)) {
|
|
6471
|
+
var op = jsonLogic.get_operator(logic);
|
|
6472
|
+
var values = logic[op];
|
|
6473
|
+
if (!Array.isArray(values)) {
|
|
6474
|
+
values = [values];
|
|
6475
|
+
}
|
|
6476
|
+
if (op === "var") {
|
|
6477
|
+
collection.push(values[0]);
|
|
6478
|
+
} else {
|
|
6479
|
+
values.forEach(function(val) {
|
|
6480
|
+
collection.push.apply(collection, jsonLogic.uses_data(val));
|
|
6481
|
+
});
|
|
6482
|
+
}
|
|
6483
|
+
}
|
|
6484
|
+
return arrayUnique(collection);
|
|
6485
|
+
};
|
|
6486
|
+
jsonLogic.add_operation = function(name, code) {
|
|
6487
|
+
operations[name] = code;
|
|
6488
|
+
};
|
|
6489
|
+
jsonLogic.rm_operation = function(name) {
|
|
6490
|
+
delete operations[name];
|
|
6491
|
+
};
|
|
6492
|
+
jsonLogic.rule_like = function(rule, pattern) {
|
|
6493
|
+
if (pattern === rule) {
|
|
6494
|
+
return true;
|
|
6495
|
+
}
|
|
6496
|
+
if (pattern === "@") {
|
|
6497
|
+
return true;
|
|
6498
|
+
}
|
|
6499
|
+
if (pattern === "number") {
|
|
6500
|
+
return typeof rule === "number";
|
|
6501
|
+
}
|
|
6502
|
+
if (pattern === "string") {
|
|
6503
|
+
return typeof rule === "string";
|
|
6504
|
+
}
|
|
6505
|
+
if (pattern === "array") {
|
|
6506
|
+
return Array.isArray(rule) && !jsonLogic.is_logic(rule);
|
|
6507
|
+
}
|
|
6508
|
+
if (jsonLogic.is_logic(pattern)) {
|
|
6509
|
+
if (jsonLogic.is_logic(rule)) {
|
|
6510
|
+
var pattern_op = jsonLogic.get_operator(pattern);
|
|
6511
|
+
var rule_op = jsonLogic.get_operator(rule);
|
|
6512
|
+
if (pattern_op === "@" || pattern_op === rule_op) {
|
|
6513
|
+
return jsonLogic.rule_like(
|
|
6514
|
+
jsonLogic.get_values(rule, false),
|
|
6515
|
+
jsonLogic.get_values(pattern, false)
|
|
6516
|
+
);
|
|
6517
|
+
}
|
|
6518
|
+
}
|
|
6519
|
+
return false;
|
|
6520
|
+
}
|
|
6521
|
+
if (Array.isArray(pattern)) {
|
|
6522
|
+
if (Array.isArray(rule)) {
|
|
6523
|
+
if (pattern.length !== rule.length) {
|
|
6524
|
+
return false;
|
|
6525
|
+
}
|
|
6526
|
+
for (var i = 0; i < pattern.length; i += 1) {
|
|
6527
|
+
if (!jsonLogic.rule_like(rule[i], pattern[i])) {
|
|
6528
|
+
return false;
|
|
6529
|
+
}
|
|
6530
|
+
}
|
|
6531
|
+
return true;
|
|
6532
|
+
} else {
|
|
6533
|
+
return false;
|
|
6534
|
+
}
|
|
6535
|
+
}
|
|
6536
|
+
return false;
|
|
6537
|
+
};
|
|
6538
|
+
return jsonLogic;
|
|
6539
|
+
});
|
|
6540
|
+
}
|
|
6541
|
+
});
|
|
6542
|
+
|
|
6543
|
+
// ../../node_modules/.pnpm/mixpanel@0.20.0/node_modules/mixpanel/lib/flags/local_flags.js
|
|
6040
6544
|
var require_local_flags = __commonJS({
|
|
6041
|
-
"../../node_modules/.pnpm/mixpanel@0.
|
|
6545
|
+
"../../node_modules/.pnpm/mixpanel@0.20.0/node_modules/mixpanel/lib/flags/local_flags.js"(exports$1, module) {
|
|
6042
6546
|
var FeatureFlagsProvider = require_flags();
|
|
6043
|
-
var {
|
|
6547
|
+
var {
|
|
6548
|
+
normalizedHash,
|
|
6549
|
+
lowercaseAllKeysAndValues,
|
|
6550
|
+
lowercaseLeafNodes
|
|
6551
|
+
} = require_utils2();
|
|
6552
|
+
var { apply } = require_logic();
|
|
6044
6553
|
var LocalFeatureFlagsProvider = class extends FeatureFlagsProvider {
|
|
6045
6554
|
/**
|
|
6046
6555
|
* @param {string} token - Mixpanel project token
|
|
@@ -6079,12 +6588,16 @@ var require_local_flags = __commonJS({
|
|
|
6079
6588
|
try {
|
|
6080
6589
|
await this._fetchFlagDefinitions();
|
|
6081
6590
|
} catch (err) {
|
|
6082
|
-
this.logger?.error(
|
|
6591
|
+
this.logger?.error(
|
|
6592
|
+
`Error polling for flag definition: ${err.message}`
|
|
6593
|
+
);
|
|
6083
6594
|
}
|
|
6084
6595
|
}, this.config.polling_interval_in_seconds * 1e3);
|
|
6085
6596
|
}
|
|
6086
6597
|
} catch (err) {
|
|
6087
|
-
this.logger?.error(
|
|
6598
|
+
this.logger?.error(
|
|
6599
|
+
`Initial flag definitions fetch failed: ${err.message}`
|
|
6600
|
+
);
|
|
6088
6601
|
}
|
|
6089
6602
|
}
|
|
6090
6603
|
/**
|
|
@@ -6095,7 +6608,9 @@ var require_local_flags = __commonJS({
|
|
|
6095
6608
|
clearInterval(this.pollingInterval);
|
|
6096
6609
|
this.pollingInterval = null;
|
|
6097
6610
|
} else {
|
|
6098
|
-
this.logger?.warn(
|
|
6611
|
+
this.logger?.warn(
|
|
6612
|
+
"stopPollingForDefinitions called but polling was not active"
|
|
6613
|
+
);
|
|
6099
6614
|
}
|
|
6100
6615
|
}
|
|
6101
6616
|
/**
|
|
@@ -6120,7 +6635,12 @@ var require_local_flags = __commonJS({
|
|
|
6120
6635
|
* @returns {*} The variant value
|
|
6121
6636
|
*/
|
|
6122
6637
|
getVariantValue(flagKey, fallbackValue, context, reportExposure = true) {
|
|
6123
|
-
const result = this.getVariant(
|
|
6638
|
+
const result = this.getVariant(
|
|
6639
|
+
flagKey,
|
|
6640
|
+
{ variant_value: fallbackValue },
|
|
6641
|
+
context,
|
|
6642
|
+
reportExposure
|
|
6643
|
+
);
|
|
6124
6644
|
return result.variant_value;
|
|
6125
6645
|
}
|
|
6126
6646
|
/**
|
|
@@ -6151,7 +6671,12 @@ var require_local_flags = __commonJS({
|
|
|
6151
6671
|
} else {
|
|
6152
6672
|
const rollout = this._getAssignedRollout(flag, contextValue, context);
|
|
6153
6673
|
if (rollout) {
|
|
6154
|
-
selectedVariant = this._getAssignedVariant(
|
|
6674
|
+
selectedVariant = this._getAssignedVariant(
|
|
6675
|
+
flag,
|
|
6676
|
+
contextValue,
|
|
6677
|
+
flagKey,
|
|
6678
|
+
rollout
|
|
6679
|
+
);
|
|
6155
6680
|
}
|
|
6156
6681
|
}
|
|
6157
6682
|
if (selectedVariant) {
|
|
@@ -6246,7 +6771,10 @@ var require_local_flags = __commonJS({
|
|
|
6246
6771
|
}
|
|
6247
6772
|
_getAssignedVariant(flag, contextValue, flagKey, rollout) {
|
|
6248
6773
|
if (rollout.variant_override) {
|
|
6249
|
-
const variant = this._getMatchingVariant(
|
|
6774
|
+
const variant = this._getMatchingVariant(
|
|
6775
|
+
rollout.variant_override.key,
|
|
6776
|
+
flag
|
|
6777
|
+
);
|
|
6250
6778
|
if (variant) {
|
|
6251
6779
|
return { ...variant, is_qa_tester: false };
|
|
6252
6780
|
}
|
|
@@ -6279,15 +6807,41 @@ var require_local_flags = __commonJS({
|
|
|
6279
6807
|
is_qa_tester: false
|
|
6280
6808
|
};
|
|
6281
6809
|
}
|
|
6810
|
+
_extractRuntimeParameters(context) {
|
|
6811
|
+
const customProperties = context.custom_properties;
|
|
6812
|
+
if (!customProperties || typeof customProperties !== "object") {
|
|
6813
|
+
return null;
|
|
6814
|
+
}
|
|
6815
|
+
return lowercaseAllKeysAndValues(customProperties);
|
|
6816
|
+
}
|
|
6817
|
+
_isRuntimeRuleSatisfied(rollout, context) {
|
|
6818
|
+
try {
|
|
6819
|
+
return apply(
|
|
6820
|
+
lowercaseLeafNodes(rollout.runtime_evaluation_rule),
|
|
6821
|
+
this._extractRuntimeParameters(context)
|
|
6822
|
+
);
|
|
6823
|
+
} catch (error) {
|
|
6824
|
+
this.logger?.error(`Error evaluating runtime rule: ${error.message}`);
|
|
6825
|
+
return false;
|
|
6826
|
+
}
|
|
6827
|
+
}
|
|
6282
6828
|
_isRuntimeEvaluationSatisfied(rollout, context) {
|
|
6283
|
-
if (
|
|
6829
|
+
if (rollout.runtime_evaluation_rule) {
|
|
6830
|
+
return this._isRuntimeRuleSatisfied(rollout, context);
|
|
6831
|
+
} else if (rollout.runtime_evaluation_definition) {
|
|
6832
|
+
return this._isLegacyRuntimeEvaluationSatisfied(rollout, context);
|
|
6833
|
+
} else {
|
|
6284
6834
|
return true;
|
|
6285
6835
|
}
|
|
6286
|
-
|
|
6287
|
-
|
|
6836
|
+
}
|
|
6837
|
+
_isLegacyRuntimeEvaluationSatisfied(rollout, context) {
|
|
6838
|
+
const customProperties = this._extractRuntimeParameters(context);
|
|
6839
|
+
if (!customProperties) {
|
|
6288
6840
|
return false;
|
|
6289
6841
|
}
|
|
6290
|
-
for (const [key, expectedValue] of Object.entries(
|
|
6842
|
+
for (const [key, expectedValue] of Object.entries(
|
|
6843
|
+
rollout.runtime_evaluation_definition
|
|
6844
|
+
)) {
|
|
6291
6845
|
if (!(key in customProperties)) {
|
|
6292
6846
|
return false;
|
|
6293
6847
|
}
|
|
@@ -6303,9 +6857,9 @@ var require_local_flags = __commonJS({
|
|
|
6303
6857
|
}
|
|
6304
6858
|
});
|
|
6305
6859
|
|
|
6306
|
-
// ../../node_modules/.pnpm/mixpanel@0.
|
|
6860
|
+
// ../../node_modules/.pnpm/mixpanel@0.20.0/node_modules/mixpanel/lib/flags/remote_flags.js
|
|
6307
6861
|
var require_remote_flags = __commonJS({
|
|
6308
|
-
"../../node_modules/.pnpm/mixpanel@0.
|
|
6862
|
+
"../../node_modules/.pnpm/mixpanel@0.20.0/node_modules/mixpanel/lib/flags/remote_flags.js"(exports$1, module) {
|
|
6309
6863
|
var FeatureFlagsProvider = require_flags();
|
|
6310
6864
|
var RemoteFeatureFlagsProvider = class extends FeatureFlagsProvider {
|
|
6311
6865
|
/**
|
|
@@ -6339,10 +6893,17 @@ var require_remote_flags = __commonJS({
|
|
|
6339
6893
|
*/
|
|
6340
6894
|
async getVariantValue(flagKey, fallbackValue, context, reportExposure = true) {
|
|
6341
6895
|
try {
|
|
6342
|
-
const selectedVariant = await this.getVariant(
|
|
6896
|
+
const selectedVariant = await this.getVariant(
|
|
6897
|
+
flagKey,
|
|
6898
|
+
{ variant_value: fallbackValue },
|
|
6899
|
+
context,
|
|
6900
|
+
reportExposure
|
|
6901
|
+
);
|
|
6343
6902
|
return selectedVariant.variant_value;
|
|
6344
6903
|
} catch (err) {
|
|
6345
|
-
this.logger?.error(
|
|
6904
|
+
this.logger?.error(
|
|
6905
|
+
`Failed to get variant value for flag '${flagKey}': ${err.message}`
|
|
6906
|
+
);
|
|
6346
6907
|
return fallbackValue;
|
|
6347
6908
|
}
|
|
6348
6909
|
}
|
|
@@ -6371,7 +6932,9 @@ var require_remote_flags = __commonJS({
|
|
|
6371
6932
|
}
|
|
6372
6933
|
return selectedVariant;
|
|
6373
6934
|
} catch (err) {
|
|
6374
|
-
this.logger?.error(
|
|
6935
|
+
this.logger?.error(
|
|
6936
|
+
`Failed to get variant for flag '${flagKey}': ${err.message}`
|
|
6937
|
+
);
|
|
6375
6938
|
return fallbackVariant;
|
|
6376
6939
|
}
|
|
6377
6940
|
}
|
|
@@ -6388,7 +6951,9 @@ var require_remote_flags = __commonJS({
|
|
|
6388
6951
|
const value = await this.getVariantValue(flagKey, false, context);
|
|
6389
6952
|
return value === true;
|
|
6390
6953
|
} catch (err) {
|
|
6391
|
-
this.logger?.error(
|
|
6954
|
+
this.logger?.error(
|
|
6955
|
+
`Failed to check if flag '${flagKey}' is enabled: ${err.message}`
|
|
6956
|
+
);
|
|
6392
6957
|
return false;
|
|
6393
6958
|
}
|
|
6394
6959
|
}
|
|
@@ -6427,9 +6992,9 @@ var require_remote_flags = __commonJS({
|
|
|
6427
6992
|
}
|
|
6428
6993
|
});
|
|
6429
6994
|
|
|
6430
|
-
// ../../node_modules/.pnpm/mixpanel@0.
|
|
6995
|
+
// ../../node_modules/.pnpm/mixpanel@0.20.0/node_modules/mixpanel/lib/flags/index.js
|
|
6431
6996
|
var require_flags2 = __commonJS({
|
|
6432
|
-
"../../node_modules/.pnpm/mixpanel@0.
|
|
6997
|
+
"../../node_modules/.pnpm/mixpanel@0.20.0/node_modules/mixpanel/lib/flags/index.js"(exports$1, module) {
|
|
6433
6998
|
var LocalFeatureFlagsProvider = require_local_flags();
|
|
6434
6999
|
var RemoteFeatureFlagsProvider = require_remote_flags();
|
|
6435
7000
|
module.exports = {
|
|
@@ -6439,9 +7004,9 @@ var require_flags2 = __commonJS({
|
|
|
6439
7004
|
}
|
|
6440
7005
|
});
|
|
6441
7006
|
|
|
6442
|
-
// ../../node_modules/.pnpm/mixpanel@0.
|
|
7007
|
+
// ../../node_modules/.pnpm/mixpanel@0.20.0/node_modules/mixpanel/lib/mixpanel-node.js
|
|
6443
7008
|
var require_mixpanel_node = __commonJS({
|
|
6444
|
-
"../../node_modules/.pnpm/mixpanel@0.
|
|
7009
|
+
"../../node_modules/.pnpm/mixpanel@0.20.0/node_modules/mixpanel/lib/mixpanel-node.js"(exports$1, module) {
|
|
6445
7010
|
var querystring = __require("querystring");
|
|
6446
7011
|
var Buffer4 = __require("buffer").Buffer;
|
|
6447
7012
|
var http3 = __require("http");
|
|
@@ -6452,7 +7017,10 @@ var require_mixpanel_node = __commonJS({
|
|
|
6452
7017
|
var { async_all, ensure_timestamp, assert_logger } = require_utils();
|
|
6453
7018
|
var { MixpanelGroups } = require_groups();
|
|
6454
7019
|
var { MixpanelPeople } = require_people();
|
|
6455
|
-
var {
|
|
7020
|
+
var {
|
|
7021
|
+
LocalFeatureFlagsProvider,
|
|
7022
|
+
RemoteFeatureFlagsProvider
|
|
7023
|
+
} = require_flags2();
|
|
6456
7024
|
var DEFAULT_CONFIG = {
|
|
6457
7025
|
test: false,
|
|
6458
7026
|
debug: false,
|
|
@@ -6468,7 +7036,9 @@ var require_mixpanel_node = __commonJS({
|
|
|
6468
7036
|
};
|
|
6469
7037
|
var create_client = function(token, config) {
|
|
6470
7038
|
if (!token) {
|
|
6471
|
-
throw new Error(
|
|
7039
|
+
throw new Error(
|
|
7040
|
+
"The Mixpanel Client needs a Mixpanel token: `init(token)`"
|
|
7041
|
+
);
|
|
6472
7042
|
}
|
|
6473
7043
|
const metrics = {
|
|
6474
7044
|
token,
|
|
@@ -6482,9 +7052,11 @@ var require_mixpanel_node = __commonJS({
|
|
|
6482
7052
|
https: new https3.Agent({ keepAlive })
|
|
6483
7053
|
};
|
|
6484
7054
|
const proxyPath = process.env.HTTPS_PROXY || process.env.HTTP_PROXY;
|
|
6485
|
-
const proxyAgent = proxyPath ? new HttpsProxyAgent(
|
|
6486
|
-
|
|
6487
|
-
|
|
7055
|
+
const proxyAgent = proxyPath ? new HttpsProxyAgent(
|
|
7056
|
+
Object.assign(url.parse(proxyPath), {
|
|
7057
|
+
keepAlive
|
|
7058
|
+
})
|
|
7059
|
+
) : null;
|
|
6488
7060
|
metrics.send_request = function(options, callback) {
|
|
6489
7061
|
callback = callback || function() {
|
|
6490
7062
|
};
|
|
@@ -6492,8 +7064,8 @@ var require_mixpanel_node = __commonJS({
|
|
|
6492
7064
|
const endpoint = options.endpoint;
|
|
6493
7065
|
const method = (options.method || "GET").toUpperCase();
|
|
6494
7066
|
let query_params = {
|
|
6495
|
-
|
|
6496
|
-
|
|
7067
|
+
ip: metrics.config.geolocate ? 1 : 0,
|
|
7068
|
+
verbose: metrics.config.verbose ? 1 : 0
|
|
6497
7069
|
};
|
|
6498
7070
|
const key = metrics.config.key;
|
|
6499
7071
|
const secret = metrics.config.secret;
|
|
@@ -6526,7 +7098,9 @@ var require_mixpanel_node = __commonJS({
|
|
|
6526
7098
|
} else if (key) {
|
|
6527
7099
|
query_params.api_key = key;
|
|
6528
7100
|
} else if (endpoint === "/import") {
|
|
6529
|
-
throw new Error(
|
|
7101
|
+
throw new Error(
|
|
7102
|
+
"The Mixpanel Client needs a Mixpanel API Secret when importing old events: `init(token, { secret: ... })`"
|
|
7103
|
+
);
|
|
6530
7104
|
}
|
|
6531
7105
|
request_options.agent = proxyAgent || REQUEST_AGENTS[metrics.config.protocol];
|
|
6532
7106
|
if (metrics.config.test) {
|
|
@@ -6534,20 +7108,22 @@ var require_mixpanel_node = __commonJS({
|
|
|
6534
7108
|
}
|
|
6535
7109
|
request_options.path = metrics.config.path + endpoint + "?" + querystring.stringify(query_params);
|
|
6536
7110
|
request = request_lib.request(request_options, function(res) {
|
|
6537
|
-
|
|
7111
|
+
let data = "";
|
|
6538
7112
|
res.on("data", function(chunk3) {
|
|
6539
7113
|
data += chunk3;
|
|
6540
7114
|
});
|
|
6541
7115
|
res.on("end", function() {
|
|
6542
|
-
|
|
7116
|
+
let e;
|
|
6543
7117
|
if (metrics.config.verbose) {
|
|
6544
7118
|
try {
|
|
6545
|
-
|
|
7119
|
+
const result = JSON.parse(data);
|
|
6546
7120
|
if (result.status != 1) {
|
|
6547
7121
|
e = new Error("Mixpanel Server Error: " + result.error);
|
|
6548
7122
|
}
|
|
6549
7123
|
} catch (ex) {
|
|
6550
|
-
e = new Error(
|
|
7124
|
+
e = new Error(
|
|
7125
|
+
"Could not parse response from Mixpanel " + ex.message
|
|
7126
|
+
);
|
|
6551
7127
|
}
|
|
6552
7128
|
} else {
|
|
6553
7129
|
e = data !== "1" ? new Error("Mixpanel Server Error: " + data) : void 0;
|
|
@@ -6570,39 +7146,46 @@ var require_mixpanel_node = __commonJS({
|
|
|
6570
7146
|
properties.token = metrics.token;
|
|
6571
7147
|
properties.mp_lib = "node";
|
|
6572
7148
|
properties.$lib_version = packageInfo.version;
|
|
6573
|
-
|
|
7149
|
+
const data = {
|
|
6574
7150
|
event,
|
|
6575
7151
|
properties
|
|
6576
7152
|
};
|
|
6577
7153
|
if (metrics.config.debug) {
|
|
6578
|
-
metrics.config.logger.debug("Sending the following event to Mixpanel", {
|
|
7154
|
+
metrics.config.logger.debug("Sending the following event to Mixpanel", {
|
|
7155
|
+
data
|
|
7156
|
+
});
|
|
6579
7157
|
}
|
|
6580
|
-
metrics.send_request(
|
|
7158
|
+
metrics.send_request(
|
|
7159
|
+
{ method: "GET", endpoint, data },
|
|
7160
|
+
callback
|
|
7161
|
+
);
|
|
6581
7162
|
};
|
|
6582
|
-
|
|
6583
|
-
|
|
7163
|
+
const chunk2 = function(arr, size) {
|
|
7164
|
+
let chunks = [], i = 0, total = arr.length;
|
|
6584
7165
|
while (i < total) {
|
|
6585
7166
|
chunks.push(arr.slice(i, i += size));
|
|
6586
7167
|
}
|
|
6587
7168
|
return chunks;
|
|
6588
7169
|
};
|
|
6589
|
-
|
|
6590
|
-
|
|
7170
|
+
const send_batch_requests = function(options, callback) {
|
|
7171
|
+
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;
|
|
6591
7172
|
function send_event_batch(batch, cb) {
|
|
6592
7173
|
if (batch.length > 0) {
|
|
6593
7174
|
batch = batch.map(function(event) {
|
|
6594
|
-
event.properties;
|
|
6595
7175
|
if (endpoint === "/import" || event.properties.time) {
|
|
6596
7176
|
event.properties.time = ensure_timestamp(event.properties.time);
|
|
6597
7177
|
}
|
|
6598
7178
|
event.properties.token = event.properties.token || metrics.token;
|
|
6599
7179
|
return event;
|
|
6600
7180
|
});
|
|
6601
|
-
metrics.send_request(
|
|
7181
|
+
metrics.send_request(
|
|
7182
|
+
{ method: "POST", endpoint, data: batch },
|
|
7183
|
+
cb
|
|
7184
|
+
);
|
|
6602
7185
|
}
|
|
6603
7186
|
}
|
|
6604
7187
|
function send_next_request_batch(index) {
|
|
6605
|
-
|
|
7188
|
+
const request_batch = request_batches[index], cb = function(errors, results) {
|
|
6606
7189
|
index += 1;
|
|
6607
7190
|
if (index === total_request_batches) {
|
|
6608
7191
|
callback && callback(errors, results);
|
|
@@ -6635,7 +7218,7 @@ var require_mixpanel_node = __commonJS({
|
|
|
6635
7218
|
callback = options;
|
|
6636
7219
|
options = {};
|
|
6637
7220
|
}
|
|
6638
|
-
|
|
7221
|
+
const batch_options = {
|
|
6639
7222
|
event_list,
|
|
6640
7223
|
endpoint: "/track",
|
|
6641
7224
|
max_concurrent_requests: options.max_concurrent_requests,
|
|
@@ -6652,7 +7235,7 @@ var require_mixpanel_node = __commonJS({
|
|
|
6652
7235
|
metrics.send_event_request("/import", event, properties, callback);
|
|
6653
7236
|
};
|
|
6654
7237
|
metrics.import_batch = function(event_list, options, callback) {
|
|
6655
|
-
|
|
7238
|
+
let batch_options;
|
|
6656
7239
|
if (typeof options === "function" || !options) {
|
|
6657
7240
|
callback = options;
|
|
6658
7241
|
options = {};
|
|
@@ -6666,7 +7249,7 @@ var require_mixpanel_node = __commonJS({
|
|
|
6666
7249
|
send_batch_requests(batch_options, callback);
|
|
6667
7250
|
};
|
|
6668
7251
|
metrics.alias = function(distinct_id, alias, callback) {
|
|
6669
|
-
|
|
7252
|
+
const properties = {
|
|
6670
7253
|
distinct_id,
|
|
6671
7254
|
alias
|
|
6672
7255
|
};
|
|
@@ -8675,7 +9258,7 @@ var init_is_disjoint = __esm({
|
|
|
8675
9258
|
function isObjectLike(value) {
|
|
8676
9259
|
return typeof value === "object" && value !== null;
|
|
8677
9260
|
}
|
|
8678
|
-
function
|
|
9261
|
+
function isObject2(input) {
|
|
8679
9262
|
if (!isObjectLike(input) || Object.prototype.toString.call(input) !== "[object Object]") {
|
|
8680
9263
|
return false;
|
|
8681
9264
|
}
|
|
@@ -8695,7 +9278,7 @@ var init_is_object = __esm({
|
|
|
8695
9278
|
|
|
8696
9279
|
// ../../node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/lib/is_jwk.js
|
|
8697
9280
|
function isJWK(key) {
|
|
8698
|
-
return
|
|
9281
|
+
return isObject2(key) && typeof key.kty === "string";
|
|
8699
9282
|
}
|
|
8700
9283
|
function isPrivateJWK(key) {
|
|
8701
9284
|
return key.kty !== "oct" && typeof key.d === "string";
|
|
@@ -9339,7 +9922,7 @@ var init_produce = __esm({
|
|
|
9339
9922
|
ProduceJWT = class {
|
|
9340
9923
|
_payload;
|
|
9341
9924
|
constructor(payload = {}) {
|
|
9342
|
-
if (!
|
|
9925
|
+
if (!isObject2(payload)) {
|
|
9343
9926
|
throw new TypeError("JWT Claims Set MUST be an object");
|
|
9344
9927
|
}
|
|
9345
9928
|
this._payload = payload;
|
|
@@ -13394,10 +13977,10 @@ var init_esm4 = __esm({
|
|
|
13394
13977
|
}
|
|
13395
13978
|
});
|
|
13396
13979
|
|
|
13397
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.35.
|
|
13980
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.35.2/node_modules/@amplitude/analytics-core/lib/esm/types/event/event.js
|
|
13398
13981
|
var IdentifyOperation, SpecialEventType;
|
|
13399
13982
|
var init_event = __esm({
|
|
13400
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.35.
|
|
13983
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.35.2/node_modules/@amplitude/analytics-core/lib/esm/types/event/event.js"() {
|
|
13401
13984
|
(function(IdentifyOperation3) {
|
|
13402
13985
|
IdentifyOperation3["SET"] = "$set";
|
|
13403
13986
|
IdentifyOperation3["SET_ONCE"] = "$setOnce";
|
|
@@ -13418,10 +14001,10 @@ var init_event = __esm({
|
|
|
13418
14001
|
}
|
|
13419
14002
|
});
|
|
13420
14003
|
|
|
13421
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.35.
|
|
14004
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.35.2/node_modules/@amplitude/analytics-core/lib/esm/types/constants.js
|
|
13422
14005
|
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;
|
|
13423
14006
|
var init_constants = __esm({
|
|
13424
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.35.
|
|
14007
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.35.2/node_modules/@amplitude/analytics-core/lib/esm/types/constants.js"() {
|
|
13425
14008
|
UNSET_VALUE = "-";
|
|
13426
14009
|
AMPLITUDE_PREFIX = "AMP";
|
|
13427
14010
|
STORAGE_PREFIX = "".concat(AMPLITUDE_PREFIX, "_unsent");
|
|
@@ -13433,10 +14016,10 @@ var init_constants = __esm({
|
|
|
13433
14016
|
}
|
|
13434
14017
|
});
|
|
13435
14018
|
|
|
13436
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.35.
|
|
14019
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.35.2/node_modules/@amplitude/analytics-core/lib/esm/utils/valid-properties.js
|
|
13437
14020
|
var MAX_PROPERTY_KEYS, isValidObject, isValidProperties;
|
|
13438
14021
|
var init_valid_properties = __esm({
|
|
13439
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.35.
|
|
14022
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.35.2/node_modules/@amplitude/analytics-core/lib/esm/utils/valid-properties.js"() {
|
|
13440
14023
|
init_tslib_es6();
|
|
13441
14024
|
MAX_PROPERTY_KEYS = 1e3;
|
|
13442
14025
|
isValidObject = function(properties) {
|
|
@@ -13491,10 +14074,10 @@ var init_valid_properties = __esm({
|
|
|
13491
14074
|
}
|
|
13492
14075
|
});
|
|
13493
14076
|
|
|
13494
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.35.
|
|
14077
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.35.2/node_modules/@amplitude/analytics-core/lib/esm/identify.js
|
|
13495
14078
|
var Identify, IdentifyOperation2, OrderedIdentifyOperations;
|
|
13496
14079
|
var init_identify = __esm({
|
|
13497
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.35.
|
|
14080
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.35.2/node_modules/@amplitude/analytics-core/lib/esm/identify.js"() {
|
|
13498
14081
|
init_tslib_es6();
|
|
13499
14082
|
init_constants();
|
|
13500
14083
|
init_valid_properties();
|
|
@@ -13605,10 +14188,10 @@ var init_identify = __esm({
|
|
|
13605
14188
|
}
|
|
13606
14189
|
});
|
|
13607
14190
|
|
|
13608
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.35.
|
|
14191
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.35.2/node_modules/@amplitude/analytics-core/lib/esm/types/messages.js
|
|
13609
14192
|
var SUCCESS_MESSAGE, UNEXPECTED_ERROR_MESSAGE, MAX_RETRIES_EXCEEDED_MESSAGE, OPT_OUT_MESSAGE, MISSING_API_KEY_MESSAGE, INVALID_API_KEY, CLIENT_NOT_INITIALIZED;
|
|
13610
14193
|
var init_messages = __esm({
|
|
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/types/messages.js"() {
|
|
13612
14195
|
SUCCESS_MESSAGE = "Event tracked successfully";
|
|
13613
14196
|
UNEXPECTED_ERROR_MESSAGE = "Unexpected error occurred";
|
|
13614
14197
|
MAX_RETRIES_EXCEEDED_MESSAGE = "Event rejected due to exceeded retry count";
|
|
@@ -13619,10 +14202,10 @@ var init_messages = __esm({
|
|
|
13619
14202
|
}
|
|
13620
14203
|
});
|
|
13621
14204
|
|
|
13622
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.35.
|
|
14205
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.35.2/node_modules/@amplitude/analytics-core/lib/esm/types/status.js
|
|
13623
14206
|
var Status;
|
|
13624
14207
|
var init_status = __esm({
|
|
13625
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.35.
|
|
14208
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.35.2/node_modules/@amplitude/analytics-core/lib/esm/types/status.js"() {
|
|
13626
14209
|
(function(Status2) {
|
|
13627
14210
|
Status2["Unknown"] = "unknown";
|
|
13628
14211
|
Status2["Skipped"] = "skipped";
|
|
@@ -13637,10 +14220,10 @@ var init_status = __esm({
|
|
|
13637
14220
|
}
|
|
13638
14221
|
});
|
|
13639
14222
|
|
|
13640
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.35.
|
|
14223
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.35.2/node_modules/@amplitude/analytics-core/lib/esm/utils/result-builder.js
|
|
13641
14224
|
var buildResult;
|
|
13642
14225
|
var init_result_builder = __esm({
|
|
13643
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.35.
|
|
14226
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.35.2/node_modules/@amplitude/analytics-core/lib/esm/utils/result-builder.js"() {
|
|
13644
14227
|
init_status();
|
|
13645
14228
|
buildResult = function(event, code, message2) {
|
|
13646
14229
|
if (code === void 0) {
|
|
@@ -13654,10 +14237,10 @@ var init_result_builder = __esm({
|
|
|
13654
14237
|
}
|
|
13655
14238
|
});
|
|
13656
14239
|
|
|
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/global-scope.js
|
|
13658
14241
|
var getGlobalScope;
|
|
13659
14242
|
var init_global_scope = __esm({
|
|
13660
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.35.
|
|
14243
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.35.2/node_modules/@amplitude/analytics-core/lib/esm/global-scope.js"() {
|
|
13661
14244
|
getGlobalScope = function() {
|
|
13662
14245
|
var ampIntegrationContextName = "ampIntegrationContext";
|
|
13663
14246
|
if (typeof globalThis !== "undefined" && typeof globalThis[ampIntegrationContextName] !== "undefined") {
|
|
@@ -13680,10 +14263,10 @@ var init_global_scope = __esm({
|
|
|
13680
14263
|
}
|
|
13681
14264
|
});
|
|
13682
14265
|
|
|
13683
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.35.
|
|
14266
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.35.2/node_modules/@amplitude/analytics-core/lib/esm/utils/uuid.js
|
|
13684
14267
|
var legacyUUID, hex, UUID2;
|
|
13685
14268
|
var init_uuid2 = __esm({
|
|
13686
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.35.
|
|
14269
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.35.2/node_modules/@amplitude/analytics-core/lib/esm/utils/uuid.js"() {
|
|
13687
14270
|
init_tslib_es6();
|
|
13688
14271
|
init_global_scope();
|
|
13689
14272
|
legacyUUID = function(a) {
|
|
@@ -13727,10 +14310,10 @@ var init_uuid2 = __esm({
|
|
|
13727
14310
|
}
|
|
13728
14311
|
});
|
|
13729
14312
|
|
|
13730
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.35.
|
|
14313
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.35.2/node_modules/@amplitude/analytics-core/lib/esm/timeline.js
|
|
13731
14314
|
var Timeline;
|
|
13732
14315
|
var init_timeline = __esm({
|
|
13733
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.35.
|
|
14316
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.35.2/node_modules/@amplitude/analytics-core/lib/esm/timeline.js"() {
|
|
13734
14317
|
init_tslib_es6();
|
|
13735
14318
|
init_result_builder();
|
|
13736
14319
|
init_uuid2();
|
|
@@ -14032,10 +14615,10 @@ var init_timeline = __esm({
|
|
|
14032
14615
|
}
|
|
14033
14616
|
});
|
|
14034
14617
|
|
|
14035
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.35.
|
|
14618
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.35.2/node_modules/@amplitude/analytics-core/lib/esm/utils/event-builder.js
|
|
14036
14619
|
var createTrackEvent, createIdentifyEvent, createGroupIdentifyEvent, createGroupEvent, createRevenueEvent;
|
|
14037
14620
|
var init_event_builder = __esm({
|
|
14038
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.35.
|
|
14621
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.35.2/node_modules/@amplitude/analytics-core/lib/esm/utils/event-builder.js"() {
|
|
14039
14622
|
init_tslib_es6();
|
|
14040
14623
|
init_identify();
|
|
14041
14624
|
init_event();
|
|
@@ -14065,10 +14648,10 @@ var init_event_builder = __esm({
|
|
|
14065
14648
|
}
|
|
14066
14649
|
});
|
|
14067
14650
|
|
|
14068
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.35.
|
|
14651
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.35.2/node_modules/@amplitude/analytics-core/lib/esm/utils/return-wrapper.js
|
|
14069
14652
|
var returnWrapper;
|
|
14070
14653
|
var init_return_wrapper = __esm({
|
|
14071
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.35.
|
|
14654
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.35.2/node_modules/@amplitude/analytics-core/lib/esm/utils/return-wrapper.js"() {
|
|
14072
14655
|
returnWrapper = function(awaitable) {
|
|
14073
14656
|
return {
|
|
14074
14657
|
promise: awaitable || Promise.resolve()
|
|
@@ -14077,10 +14660,10 @@ var init_return_wrapper = __esm({
|
|
|
14077
14660
|
}
|
|
14078
14661
|
});
|
|
14079
14662
|
|
|
14080
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.35.
|
|
14663
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.35.2/node_modules/@amplitude/analytics-core/lib/esm/core-client.js
|
|
14081
14664
|
var AmplitudeCore;
|
|
14082
14665
|
var init_core_client = __esm({
|
|
14083
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.35.
|
|
14666
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.35.2/node_modules/@amplitude/analytics-core/lib/esm/core-client.js"() {
|
|
14084
14667
|
init_tslib_es6();
|
|
14085
14668
|
init_event();
|
|
14086
14669
|
init_identify();
|
|
@@ -14348,10 +14931,10 @@ var init_core_client = __esm({
|
|
|
14348
14931
|
}
|
|
14349
14932
|
});
|
|
14350
14933
|
|
|
14351
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.35.
|
|
14934
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.35.2/node_modules/@amplitude/analytics-core/lib/esm/revenue.js
|
|
14352
14935
|
var Revenue, RevenueProperty;
|
|
14353
14936
|
var init_revenue = __esm({
|
|
14354
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.35.
|
|
14937
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.35.2/node_modules/@amplitude/analytics-core/lib/esm/revenue.js"() {
|
|
14355
14938
|
init_tslib_es6();
|
|
14356
14939
|
init_valid_properties();
|
|
14357
14940
|
Revenue = /** @class */
|
|
@@ -14428,10 +15011,10 @@ var init_revenue = __esm({
|
|
|
14428
15011
|
}
|
|
14429
15012
|
});
|
|
14430
15013
|
|
|
14431
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.35.
|
|
15014
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.35.2/node_modules/@amplitude/analytics-core/lib/esm/utils/chunk.js
|
|
14432
15015
|
var chunk;
|
|
14433
15016
|
var init_chunk = __esm({
|
|
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/utils/chunk.js"() {
|
|
14435
15018
|
chunk = function(arr, size) {
|
|
14436
15019
|
var chunkSize = Math.max(size, 1);
|
|
14437
15020
|
return arr.reduce(function(chunks, element, index) {
|
|
@@ -14446,10 +15029,10 @@ var init_chunk = __esm({
|
|
|
14446
15029
|
}
|
|
14447
15030
|
});
|
|
14448
15031
|
|
|
14449
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.35.
|
|
15032
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.35.2/node_modules/@amplitude/analytics-core/lib/esm/types/loglevel.js
|
|
14450
15033
|
var LogLevel;
|
|
14451
15034
|
var init_loglevel = __esm({
|
|
14452
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.35.
|
|
15035
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.35.2/node_modules/@amplitude/analytics-core/lib/esm/types/loglevel.js"() {
|
|
14453
15036
|
(function(LogLevel2) {
|
|
14454
15037
|
LogLevel2[LogLevel2["None"] = 0] = "None";
|
|
14455
15038
|
LogLevel2[LogLevel2["Error"] = 1] = "Error";
|
|
@@ -14460,10 +15043,10 @@ var init_loglevel = __esm({
|
|
|
14460
15043
|
}
|
|
14461
15044
|
});
|
|
14462
15045
|
|
|
14463
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.35.
|
|
15046
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.35.2/node_modules/@amplitude/analytics-core/lib/esm/logger.js
|
|
14464
15047
|
var PREFIX, Logger;
|
|
14465
15048
|
var init_logger3 = __esm({
|
|
14466
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.35.
|
|
15049
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.35.2/node_modules/@amplitude/analytics-core/lib/esm/logger.js"() {
|
|
14467
15050
|
init_loglevel();
|
|
14468
15051
|
PREFIX = "Amplitude Logger ";
|
|
14469
15052
|
Logger = /** @class */
|
|
@@ -14525,10 +15108,10 @@ var init_logger3 = __esm({
|
|
|
14525
15108
|
}
|
|
14526
15109
|
});
|
|
14527
15110
|
|
|
14528
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.35.
|
|
15111
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.35.2/node_modules/@amplitude/analytics-core/lib/esm/config.js
|
|
14529
15112
|
var getDefaultConfig, Config, getServerUrl, createServerConfig, RequestMetadata;
|
|
14530
15113
|
var init_config = __esm({
|
|
14531
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.35.
|
|
15114
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.35.2/node_modules/@amplitude/analytics-core/lib/esm/config.js"() {
|
|
14532
15115
|
init_constants();
|
|
14533
15116
|
init_logger3();
|
|
14534
15117
|
init_loglevel();
|
|
@@ -14629,19 +15212,19 @@ var init_config = __esm({
|
|
|
14629
15212
|
}
|
|
14630
15213
|
});
|
|
14631
15214
|
|
|
14632
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.35.
|
|
15215
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.35.2/node_modules/@amplitude/analytics-core/lib/esm/utils/status-code.js
|
|
14633
15216
|
function isSuccessStatusCode(code) {
|
|
14634
15217
|
return code >= 200 && code < 300;
|
|
14635
15218
|
}
|
|
14636
15219
|
var init_status_code = __esm({
|
|
14637
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.35.
|
|
15220
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.35.2/node_modules/@amplitude/analytics-core/lib/esm/utils/status-code.js"() {
|
|
14638
15221
|
}
|
|
14639
15222
|
});
|
|
14640
15223
|
|
|
14641
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.35.
|
|
15224
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.35.2/node_modules/@amplitude/analytics-core/lib/esm/utils/debug.js
|
|
14642
15225
|
var getStacktrace, getClientLogConfig, getValueByStringPath, getClientStates, debugWrapper;
|
|
14643
15226
|
var init_debug = __esm({
|
|
14644
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.35.
|
|
15227
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.35.2/node_modules/@amplitude/analytics-core/lib/esm/utils/debug.js"() {
|
|
14645
15228
|
init_tslib_es6();
|
|
14646
15229
|
init_loglevel();
|
|
14647
15230
|
getStacktrace = function(ignoreDepth) {
|
|
@@ -14759,7 +15342,7 @@ var init_debug = __esm({
|
|
|
14759
15342
|
}
|
|
14760
15343
|
});
|
|
14761
15344
|
|
|
14762
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.35.
|
|
15345
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.35.2/node_modules/@amplitude/analytics-core/lib/esm/plugins/destination.js
|
|
14763
15346
|
function getErrorMessage(error) {
|
|
14764
15347
|
if (error instanceof Error)
|
|
14765
15348
|
return error.message;
|
|
@@ -14777,7 +15360,7 @@ function getResponseBodyString(res) {
|
|
|
14777
15360
|
}
|
|
14778
15361
|
var Destination;
|
|
14779
15362
|
var init_destination = __esm({
|
|
14780
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.35.
|
|
15363
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.35.2/node_modules/@amplitude/analytics-core/lib/esm/plugins/destination.js"() {
|
|
14781
15364
|
init_tslib_es6();
|
|
14782
15365
|
init_status();
|
|
14783
15366
|
init_messages();
|
|
@@ -15168,10 +15751,10 @@ var init_destination = __esm({
|
|
|
15168
15751
|
}
|
|
15169
15752
|
});
|
|
15170
15753
|
|
|
15171
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.35.
|
|
15754
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.35.2/node_modules/@amplitude/analytics-core/lib/esm/transports/base.js
|
|
15172
15755
|
var BaseTransport;
|
|
15173
15756
|
var init_base2 = __esm({
|
|
15174
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.35.
|
|
15757
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.35.2/node_modules/@amplitude/analytics-core/lib/esm/transports/base.js"() {
|
|
15175
15758
|
init_status();
|
|
15176
15759
|
init_status_code();
|
|
15177
15760
|
BaseTransport = /** @class */
|
|
@@ -15273,10 +15856,10 @@ var init_base2 = __esm({
|
|
|
15273
15856
|
}
|
|
15274
15857
|
});
|
|
15275
15858
|
|
|
15276
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.35.
|
|
15859
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.35.2/node_modules/@amplitude/analytics-core/lib/esm/types/server-zone.js
|
|
15277
15860
|
var ServerZone;
|
|
15278
15861
|
var init_server_zone = __esm({
|
|
15279
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.35.
|
|
15862
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.35.2/node_modules/@amplitude/analytics-core/lib/esm/types/server-zone.js"() {
|
|
15280
15863
|
(function(ServerZone2) {
|
|
15281
15864
|
ServerZone2["US"] = "US";
|
|
15282
15865
|
ServerZone2["EU"] = "EU";
|
|
@@ -15285,17 +15868,17 @@ var init_server_zone = __esm({
|
|
|
15285
15868
|
}
|
|
15286
15869
|
});
|
|
15287
15870
|
|
|
15288
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.35.
|
|
15871
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.35.2/node_modules/@amplitude/analytics-core/lib/esm/types/offline.js
|
|
15289
15872
|
var OfflineDisabled;
|
|
15290
15873
|
var init_offline = __esm({
|
|
15291
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.35.
|
|
15874
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.35.2/node_modules/@amplitude/analytics-core/lib/esm/types/offline.js"() {
|
|
15292
15875
|
OfflineDisabled = null;
|
|
15293
15876
|
}
|
|
15294
15877
|
});
|
|
15295
15878
|
|
|
15296
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.35.
|
|
15879
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.35.2/node_modules/@amplitude/analytics-core/lib/esm/index.js
|
|
15297
15880
|
var init_esm5 = __esm({
|
|
15298
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.35.
|
|
15881
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.35.2/node_modules/@amplitude/analytics-core/lib/esm/index.js"() {
|
|
15299
15882
|
init_core_client();
|
|
15300
15883
|
init_identify();
|
|
15301
15884
|
init_revenue();
|
|
@@ -15312,18 +15895,18 @@ var init_esm5 = __esm({
|
|
|
15312
15895
|
}
|
|
15313
15896
|
});
|
|
15314
15897
|
|
|
15315
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-node@1.5.
|
|
15898
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-node@1.5.31/node_modules/@amplitude/analytics-node/lib/esm/version.js
|
|
15316
15899
|
var VERSION;
|
|
15317
15900
|
var init_version3 = __esm({
|
|
15318
|
-
"../../node_modules/.pnpm/@amplitude+analytics-node@1.5.
|
|
15319
|
-
VERSION = "1.5.
|
|
15901
|
+
"../../node_modules/.pnpm/@amplitude+analytics-node@1.5.31/node_modules/@amplitude/analytics-node/lib/esm/version.js"() {
|
|
15902
|
+
VERSION = "1.5.31";
|
|
15320
15903
|
}
|
|
15321
15904
|
});
|
|
15322
15905
|
|
|
15323
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-node@1.5.
|
|
15906
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-node@1.5.31/node_modules/@amplitude/analytics-node/lib/esm/plugins/context.js
|
|
15324
15907
|
var Context2;
|
|
15325
15908
|
var init_context4 = __esm({
|
|
15326
|
-
"../../node_modules/.pnpm/@amplitude+analytics-node@1.5.
|
|
15909
|
+
"../../node_modules/.pnpm/@amplitude+analytics-node@1.5.31/node_modules/@amplitude/analytics-node/lib/esm/plugins/context.js"() {
|
|
15327
15910
|
init_tslib_es6();
|
|
15328
15911
|
init_esm5();
|
|
15329
15912
|
init_version3();
|
|
@@ -15358,7 +15941,7 @@ var init_context4 = __esm({
|
|
|
15358
15941
|
});
|
|
15359
15942
|
var Http;
|
|
15360
15943
|
var init_http = __esm({
|
|
15361
|
-
"../../node_modules/.pnpm/@amplitude+analytics-node@1.5.
|
|
15944
|
+
"../../node_modules/.pnpm/@amplitude+analytics-node@1.5.31/node_modules/@amplitude/analytics-node/lib/esm/transports/http.js"() {
|
|
15362
15945
|
init_tslib_es6();
|
|
15363
15946
|
init_esm5();
|
|
15364
15947
|
Http = /** @class */
|
|
@@ -15420,10 +16003,10 @@ var init_http = __esm({
|
|
|
15420
16003
|
}
|
|
15421
16004
|
});
|
|
15422
16005
|
|
|
15423
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-node@1.5.
|
|
16006
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-node@1.5.31/node_modules/@amplitude/analytics-node/lib/esm/config.js
|
|
15424
16007
|
var NodeConfig, useNodeConfig;
|
|
15425
16008
|
var init_config2 = __esm({
|
|
15426
|
-
"../../node_modules/.pnpm/@amplitude+analytics-node@1.5.
|
|
16009
|
+
"../../node_modules/.pnpm/@amplitude+analytics-node@1.5.31/node_modules/@amplitude/analytics-node/lib/esm/config.js"() {
|
|
15427
16010
|
init_tslib_es6();
|
|
15428
16011
|
init_esm5();
|
|
15429
16012
|
init_http();
|
|
@@ -15441,10 +16024,10 @@ var init_config2 = __esm({
|
|
|
15441
16024
|
}
|
|
15442
16025
|
});
|
|
15443
16026
|
|
|
15444
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-node@1.5.
|
|
16027
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-node@1.5.31/node_modules/@amplitude/analytics-node/lib/esm/node-client.js
|
|
15445
16028
|
var AmplitudeNode, createInstance, node_client_default;
|
|
15446
16029
|
var init_node_client = __esm({
|
|
15447
|
-
"../../node_modules/.pnpm/@amplitude+analytics-node@1.5.
|
|
16030
|
+
"../../node_modules/.pnpm/@amplitude+analytics-node@1.5.31/node_modules/@amplitude/analytics-node/lib/esm/node-client.js"() {
|
|
15448
16031
|
init_tslib_es6();
|
|
15449
16032
|
init_esm5();
|
|
15450
16033
|
init_context4();
|
|
@@ -15518,7 +16101,7 @@ var init_node_client = __esm({
|
|
|
15518
16101
|
}
|
|
15519
16102
|
});
|
|
15520
16103
|
|
|
15521
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-node@1.5.
|
|
16104
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-node@1.5.31/node_modules/@amplitude/analytics-node/lib/esm/types.js
|
|
15522
16105
|
var types_exports = {};
|
|
15523
16106
|
__export(types_exports, {
|
|
15524
16107
|
IdentifyOperation: () => IdentifyOperation,
|
|
@@ -15529,12 +16112,12 @@ __export(types_exports, {
|
|
|
15529
16112
|
SpecialEventType: () => SpecialEventType
|
|
15530
16113
|
});
|
|
15531
16114
|
var init_types4 = __esm({
|
|
15532
|
-
"../../node_modules/.pnpm/@amplitude+analytics-node@1.5.
|
|
16115
|
+
"../../node_modules/.pnpm/@amplitude+analytics-node@1.5.31/node_modules/@amplitude/analytics-node/lib/esm/types.js"() {
|
|
15533
16116
|
init_esm5();
|
|
15534
16117
|
}
|
|
15535
16118
|
});
|
|
15536
16119
|
|
|
15537
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-node@1.5.
|
|
16120
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-node@1.5.31/node_modules/@amplitude/analytics-node/lib/esm/index.js
|
|
15538
16121
|
var esm_exports2 = {};
|
|
15539
16122
|
__export(esm_exports2, {
|
|
15540
16123
|
Identify: () => Identify,
|
|
@@ -15555,7 +16138,7 @@ __export(esm_exports2, {
|
|
|
15555
16138
|
});
|
|
15556
16139
|
var add, groupIdentify, identify, init, logEvent, remove, revenue, setGroup, setOptOut, track, flush;
|
|
15557
16140
|
var init_esm6 = __esm({
|
|
15558
|
-
"../../node_modules/.pnpm/@amplitude+analytics-node@1.5.
|
|
16141
|
+
"../../node_modules/.pnpm/@amplitude+analytics-node@1.5.31/node_modules/@amplitude/analytics-node/lib/esm/index.js"() {
|
|
15559
16142
|
init_node_client();
|
|
15560
16143
|
init_node_client();
|
|
15561
16144
|
init_esm5();
|