@formo/analytics 1.28.6 → 1.29.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/cjs/src/FormoAnalytics.d.ts +34 -0
- package/dist/cjs/src/FormoAnalytics.js +166 -47
- package/dist/cjs/src/constants/base.d.ts +9 -1
- package/dist/cjs/src/constants/base.js +10 -2
- package/dist/cjs/src/constants/config.d.ts +3 -58
- package/dist/cjs/src/constants/config.js +3 -73
- package/dist/cjs/src/event/EventFactory.d.ts +1 -0
- package/dist/cjs/src/event/EventFactory.js +30 -17
- package/dist/cjs/src/event/constants.d.ts +8 -2
- package/dist/cjs/src/event/constants.js +31 -5
- package/dist/cjs/src/types/events.d.ts +5 -1
- package/dist/cjs/src/version.d.ts +1 -1
- package/dist/cjs/src/version.js +1 -1
- package/dist/esm/src/FormoAnalytics.d.ts +34 -0
- package/dist/esm/src/FormoAnalytics.js +167 -48
- package/dist/esm/src/constants/base.d.ts +9 -1
- package/dist/esm/src/constants/base.js +9 -1
- package/dist/esm/src/constants/config.d.ts +3 -58
- package/dist/esm/src/constants/config.js +3 -73
- package/dist/esm/src/event/EventFactory.d.ts +1 -0
- package/dist/esm/src/event/EventFactory.js +31 -18
- package/dist/esm/src/event/constants.d.ts +8 -2
- package/dist/esm/src/event/constants.js +30 -5
- package/dist/esm/src/types/events.d.ts +5 -1
- package/dist/esm/src/version.d.ts +1 -1
- package/dist/esm/src/version.js +1 -1
- package/dist/index.umd.min.js +1 -1
- package/package.json +17 -16
|
@@ -55,7 +55,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
55
55
|
return to.concat(ar || Array.prototype.slice.call(from));
|
|
56
56
|
};
|
|
57
57
|
import { createStore } from "mipd";
|
|
58
|
-
import { EVENTS_API_HOST, EventType, LOCAL_ANONYMOUS_ID_KEY,
|
|
58
|
+
import { EVENTS_API_HOST, EventType, LOCAL_ANONYMOUS_ID_KEY, SESSION_USER_ID_KEY, ACTIVE_WALLET_KEY, ACTIVE_WALLET_TTL_MS, CONSENT_OPT_OUT_KEY, } from "./constants";
|
|
59
59
|
import { cookie, initStorageManager } from "./storage";
|
|
60
60
|
import { getIdentityCookieDomain } from "./storage/cookiePolicy";
|
|
61
61
|
import { EventManager } from "./event";
|
|
@@ -119,6 +119,9 @@ var FormoAnalytics = /** @class */ (function () {
|
|
|
119
119
|
* When true, all EIP-1193/EIP-6963 detection and wrapping is skipped.
|
|
120
120
|
*/
|
|
121
121
|
this.isEvmDisabled = false;
|
|
122
|
+
/** In-memory URL used to deduplicate SPA pageview events. */
|
|
123
|
+
this._currentUrl = "";
|
|
124
|
+
this._pageHooksDisposed = false;
|
|
122
125
|
this.currentUserId = "";
|
|
123
126
|
this.config = {
|
|
124
127
|
writeKey: writeKey,
|
|
@@ -185,6 +188,11 @@ var FormoAnalytics = /** @class */ (function () {
|
|
|
185
188
|
if (options.solana) {
|
|
186
189
|
this.solanaManager = new SolanaManager(this, options.solana);
|
|
187
190
|
}
|
|
191
|
+
this._currentUrl = window.location.href;
|
|
192
|
+
// Seed currentAddress/currentChainId from the persisted snapshot before
|
|
193
|
+
// the first page hit queues so reload-time track()/page() carry the
|
|
194
|
+
// wallet even before wagmi/EIP-1193 reconnection completes.
|
|
195
|
+
this.loadActiveWallet();
|
|
188
196
|
this.trackPageHit();
|
|
189
197
|
this.trackPageHits();
|
|
190
198
|
}
|
|
@@ -290,6 +298,7 @@ var FormoAnalytics = /** @class */ (function () {
|
|
|
290
298
|
cookie().remove(SESSION_USER_ID_KEY);
|
|
291
299
|
cookie().remove(SESSION_WALLET_DETECTED_KEY);
|
|
292
300
|
cookie().remove(SESSION_WALLET_IDENTIFIED_KEY);
|
|
301
|
+
cookie().remove(ACTIVE_WALLET_KEY);
|
|
293
302
|
};
|
|
294
303
|
/**
|
|
295
304
|
* Clean up resources and event listeners
|
|
@@ -315,6 +324,21 @@ var FormoAnalytics = /** @class */ (function () {
|
|
|
315
324
|
this.untrackProvider(provider);
|
|
316
325
|
}
|
|
317
326
|
}
|
|
327
|
+
// Tear down page-hit hooks: remove window listeners and silence the
|
|
328
|
+
// history.pushState/replaceState wrappers so an orphaned instance (e.g.
|
|
329
|
+
// from a re-mount in React Strict Mode / HMR) stops emitting page events
|
|
330
|
+
// with stale state.
|
|
331
|
+
this._pageHooksDisposed = true;
|
|
332
|
+
if (typeof window !== "undefined") {
|
|
333
|
+
if (this._onPopStateListener) {
|
|
334
|
+
window.removeEventListener("popstate", this._onPopStateListener);
|
|
335
|
+
this._onPopStateListener = undefined;
|
|
336
|
+
}
|
|
337
|
+
if (this._onLocationChangeListener) {
|
|
338
|
+
window.removeEventListener("locationchange", this._onLocationChangeListener);
|
|
339
|
+
this._onLocationChangeListener = undefined;
|
|
340
|
+
}
|
|
341
|
+
}
|
|
318
342
|
logger.debug("FormoAnalytics: Cleanup complete");
|
|
319
343
|
};
|
|
320
344
|
/**
|
|
@@ -594,6 +618,7 @@ var FormoAnalytics = /** @class */ (function () {
|
|
|
594
618
|
validAddress = validateAddress(address);
|
|
595
619
|
if (validAddress) {
|
|
596
620
|
this.currentAddress = validAddress;
|
|
621
|
+
this.persistActiveWallet();
|
|
597
622
|
}
|
|
598
623
|
else {
|
|
599
624
|
(_c = logger.warn) === null || _c === void 0 ? void 0 : _c.call(logger, "Invalid address provided to identify:", address);
|
|
@@ -1437,11 +1462,9 @@ var FormoAnalytics = /** @class */ (function () {
|
|
|
1437
1462
|
};
|
|
1438
1463
|
FormoAnalytics.prototype.onLocationChange = function () {
|
|
1439
1464
|
return __awaiter(this, void 0, void 0, function () {
|
|
1440
|
-
var currentUrl;
|
|
1441
1465
|
return __generator(this, function (_a) {
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
cookie().set(SESSION_CURRENT_URL_KEY, window.location.href);
|
|
1466
|
+
if (this._currentUrl !== window.location.href) {
|
|
1467
|
+
this._currentUrl = window.location.href;
|
|
1445
1468
|
this.trackPageHit();
|
|
1446
1469
|
}
|
|
1447
1470
|
return [2 /*return*/];
|
|
@@ -1449,35 +1472,52 @@ var FormoAnalytics = /** @class */ (function () {
|
|
|
1449
1472
|
});
|
|
1450
1473
|
};
|
|
1451
1474
|
FormoAnalytics.prototype.trackPageHits = function () {
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1475
|
+
var _this = this;
|
|
1476
|
+
// Install a single, instance-agnostic wrapper around history.pushState /
|
|
1477
|
+
// replaceState so concurrent SDK instances (React Strict Mode, HMR) don't
|
|
1478
|
+
// each stack their own wrapper — which would dispatch N synthetic events
|
|
1479
|
+
// per navigation and produce O(N^2) onLocationChange calls. The wrapper
|
|
1480
|
+
// dispatches once; per-instance bookkeeping is done by per-instance
|
|
1481
|
+
// listeners that each register/unregister themselves.
|
|
1482
|
+
FormoAnalytics.installHistoryHooksOnce();
|
|
1483
|
+
this._onPopStateListener = function () { return _this.onLocationChange(); };
|
|
1484
|
+
this._onLocationChangeListener = function () { return _this.onLocationChange(); };
|
|
1485
|
+
window.addEventListener("popstate", this._onPopStateListener);
|
|
1486
|
+
window.addEventListener("locationchange", this._onLocationChangeListener);
|
|
1487
|
+
};
|
|
1488
|
+
/**
|
|
1489
|
+
* Wrap history.pushState / replaceState exactly once per `history` object,
|
|
1490
|
+
* regardless of how many SDK instances are constructed. Uses a Symbol
|
|
1491
|
+
* marker so we recognize our own wrapper across module reloads in HMR.
|
|
1492
|
+
*/
|
|
1493
|
+
FormoAnalytics.installHistoryHooksOnce = function () {
|
|
1494
|
+
if (typeof history === "undefined" || typeof window === "undefined")
|
|
1495
|
+
return;
|
|
1496
|
+
var marker = Symbol.for("formo.historyWrapped");
|
|
1497
|
+
if (history[marker])
|
|
1498
|
+
return;
|
|
1499
|
+
history[marker] = true;
|
|
1500
|
+
var dispatch = function () { return window.dispatchEvent(new window.Event("locationchange")); };
|
|
1501
|
+
var oldPushState = history.pushState;
|
|
1502
|
+
history.pushState = function pushState() {
|
|
1503
|
+
var args = [];
|
|
1504
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
1505
|
+
args[_i] = arguments[_i];
|
|
1506
|
+
}
|
|
1507
|
+
var ret = oldPushState.apply(this, args);
|
|
1508
|
+
dispatch();
|
|
1509
|
+
return ret;
|
|
1510
|
+
};
|
|
1511
|
+
var oldReplaceState = history.replaceState;
|
|
1512
|
+
history.replaceState = function replaceState() {
|
|
1513
|
+
var args = [];
|
|
1514
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
1515
|
+
args[_i] = arguments[_i];
|
|
1516
|
+
}
|
|
1517
|
+
var ret = oldReplaceState.apply(this, args);
|
|
1518
|
+
dispatch();
|
|
1519
|
+
return ret;
|
|
1520
|
+
};
|
|
1481
1521
|
};
|
|
1482
1522
|
FormoAnalytics.prototype.trackPageHit = function (category, name, properties, context, callback) {
|
|
1483
1523
|
return __awaiter(this, void 0, void 0, function () {
|
|
@@ -1488,6 +1528,12 @@ var FormoAnalytics = /** @class */ (function () {
|
|
|
1488
1528
|
return [2 /*return*/];
|
|
1489
1529
|
}
|
|
1490
1530
|
setTimeout(function () {
|
|
1531
|
+
// Drop in-flight page hits from an SDK instance that was torn down
|
|
1532
|
+
// between scheduling and firing (e.g. provider remount in React Strict
|
|
1533
|
+
// Mode / HMR). Otherwise the orphan instance would queue a page event
|
|
1534
|
+
// here with its stale, never-populated `currentAddress`.
|
|
1535
|
+
if (_this._pageHooksDisposed)
|
|
1536
|
+
return;
|
|
1491
1537
|
(function () { return __awaiter(_this, void 0, void 0, function () {
|
|
1492
1538
|
var e_7;
|
|
1493
1539
|
return __generator(this, function (_a) {
|
|
@@ -1904,8 +1950,10 @@ var FormoAnalytics = /** @class */ (function () {
|
|
|
1904
1950
|
if (!validAddress) {
|
|
1905
1951
|
throw new Error("Invalid address in signature payload: ".concat(rawAddress));
|
|
1906
1952
|
}
|
|
1953
|
+
var effectiveChainId = (_a = chainId !== null && chainId !== void 0 ? chainId : this._evmChainId) !== null && _a !== void 0 ? _a : undefined;
|
|
1954
|
+
this.backfillActiveWallet(validAddress, effectiveChainId);
|
|
1907
1955
|
var basePayload = {
|
|
1908
|
-
chainId:
|
|
1956
|
+
chainId: effectiveChainId,
|
|
1909
1957
|
address: validAddress,
|
|
1910
1958
|
};
|
|
1911
1959
|
if (method === "personal_sign") {
|
|
@@ -1916,33 +1964,48 @@ var FormoAnalytics = /** @class */ (function () {
|
|
|
1916
1964
|
};
|
|
1917
1965
|
FormoAnalytics.prototype.buildTransactionEventPayload = function (params, provider) {
|
|
1918
1966
|
return __awaiter(this, void 0, void 0, function () {
|
|
1919
|
-
var _a, data, from, to, value, validAddress, _b;
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
switch (_d.label) {
|
|
1967
|
+
var _a, data, from, to, value, validAddress, chainId, _b;
|
|
1968
|
+
return __generator(this, function (_c) {
|
|
1969
|
+
switch (_c.label) {
|
|
1923
1970
|
case 0:
|
|
1924
1971
|
_a = params[0], data = _a.data, from = _a.from, to = _a.to, value = _a.value;
|
|
1925
1972
|
validAddress = validateAndChecksumAddress(from);
|
|
1926
1973
|
if (!validAddress) {
|
|
1927
1974
|
throw new Error("Invalid address in transaction payload: ".concat(from));
|
|
1928
1975
|
}
|
|
1929
|
-
_c = {};
|
|
1930
1976
|
_b = this._evmChainId;
|
|
1931
1977
|
if (_b) return [3 /*break*/, 2];
|
|
1932
1978
|
return [4 /*yield*/, this.getCurrentChainId(provider)];
|
|
1933
1979
|
case 1:
|
|
1934
|
-
_b = (
|
|
1935
|
-
|
|
1936
|
-
case 2:
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1980
|
+
_b = (_c.sent());
|
|
1981
|
+
_c.label = 2;
|
|
1982
|
+
case 2:
|
|
1983
|
+
chainId = _b;
|
|
1984
|
+
this.backfillActiveWallet(validAddress, chainId);
|
|
1985
|
+
return [2 /*return*/, {
|
|
1986
|
+
chainId: chainId,
|
|
1987
|
+
data: data,
|
|
1988
|
+
address: validAddress,
|
|
1989
|
+
to: to,
|
|
1990
|
+
value: value,
|
|
1991
|
+
}];
|
|
1942
1992
|
}
|
|
1943
1993
|
});
|
|
1944
1994
|
});
|
|
1945
1995
|
};
|
|
1996
|
+
/**
|
|
1997
|
+
* Persist an EVM address discovered through autocapture (signature / transaction)
|
|
1998
|
+
* as the current EVM address when none is currently set. This lets subsequent
|
|
1999
|
+
* track()/page() calls carry the address even when the underlying wallet never
|
|
2000
|
+
* fires an EIP-1193 `accountsChanged` event (embedded wallets, smart accounts,
|
|
2001
|
+
* social-login wrappers). If `accountsChanged` later fires it overwrites this
|
|
2002
|
+
* value in the normal way; existing connections are never clobbered.
|
|
2003
|
+
*/
|
|
2004
|
+
FormoAnalytics.prototype.backfillActiveWallet = function (address, chainId) {
|
|
2005
|
+
if (this._evmAddress)
|
|
2006
|
+
return;
|
|
2007
|
+
this.setChainState('evm', { address: address, chainId: chainId });
|
|
2008
|
+
};
|
|
1946
2009
|
/**
|
|
1947
2010
|
* Polls for transaction receipt and emits tx.status = CONFIRMED or REVERTED.
|
|
1948
2011
|
*/
|
|
@@ -2142,6 +2205,7 @@ var FormoAnalytics = /** @class */ (function () {
|
|
|
2142
2205
|
if (state.address || state.chainId) {
|
|
2143
2206
|
this.currentAddress = state.address;
|
|
2144
2207
|
this.currentChainId = state.chainId;
|
|
2208
|
+
this.persistActiveWallet();
|
|
2145
2209
|
return;
|
|
2146
2210
|
}
|
|
2147
2211
|
}
|
|
@@ -2152,10 +2216,65 @@ var FormoAnalytics = /** @class */ (function () {
|
|
|
2152
2216
|
this.currentAddress = otherState.address;
|
|
2153
2217
|
this.currentChainId = otherState.chainId;
|
|
2154
2218
|
this._activeNamespace = other;
|
|
2219
|
+
this.persistActiveWallet();
|
|
2155
2220
|
return;
|
|
2156
2221
|
}
|
|
2157
2222
|
this.currentAddress = undefined;
|
|
2158
2223
|
this.currentChainId = undefined;
|
|
2224
|
+
this.persistActiveWallet();
|
|
2225
|
+
};
|
|
2226
|
+
/**
|
|
2227
|
+
* Persist (or clear) the current wallet snapshot in a cookie so that the
|
|
2228
|
+
* SDK can repopulate `currentAddress`/`currentChainId` at init on the next
|
|
2229
|
+
* page load — closing the gap between page-show and wagmi/EIP-1193
|
|
2230
|
+
* reconnection during which track()/page() events would otherwise ship
|
|
2231
|
+
* with an empty address.
|
|
2232
|
+
*/
|
|
2233
|
+
FormoAnalytics.prototype.persistActiveWallet = function () {
|
|
2234
|
+
try {
|
|
2235
|
+
if (this.currentAddress) {
|
|
2236
|
+
var value = JSON.stringify(__assign({ address: this.currentAddress }, (this.currentChainId !== undefined && { chainId: this.currentChainId })));
|
|
2237
|
+
var domain = getIdentityCookieDomain(this.crossSubdomainCookies);
|
|
2238
|
+
cookie().set(ACTIVE_WALLET_KEY, value, __assign({ path: "/", expires: new Date(Date.now() + ACTIVE_WALLET_TTL_MS).toUTCString() }, (domain ? { domain: domain } : {})));
|
|
2239
|
+
}
|
|
2240
|
+
else {
|
|
2241
|
+
cookie().remove(ACTIVE_WALLET_KEY);
|
|
2242
|
+
}
|
|
2243
|
+
}
|
|
2244
|
+
catch (err) {
|
|
2245
|
+
logger.warn("Failed to persist current wallet snapshot", err);
|
|
2246
|
+
}
|
|
2247
|
+
};
|
|
2248
|
+
/**
|
|
2249
|
+
* Seed `currentAddress`/`currentChainId` from the persisted snapshot, if
|
|
2250
|
+
* any. Called once during construction before the first page hit fires.
|
|
2251
|
+
*/
|
|
2252
|
+
FormoAnalytics.prototype.loadActiveWallet = function () {
|
|
2253
|
+
try {
|
|
2254
|
+
var raw = cookie().get(ACTIVE_WALLET_KEY);
|
|
2255
|
+
if (!raw)
|
|
2256
|
+
return;
|
|
2257
|
+
var parsed = JSON.parse(raw);
|
|
2258
|
+
if (!(parsed === null || parsed === void 0 ? void 0 : parsed.address))
|
|
2259
|
+
return;
|
|
2260
|
+
var namespace = isSolanaChainId(parsed.chainId) ? "solana" : "evm";
|
|
2261
|
+
var validated = validateAddress(parsed.address, parsed.chainId);
|
|
2262
|
+
if (!validated) {
|
|
2263
|
+
cookie().remove(ACTIVE_WALLET_KEY);
|
|
2264
|
+
return;
|
|
2265
|
+
}
|
|
2266
|
+
var ns = this._chainState[namespace];
|
|
2267
|
+
ns.address = validated;
|
|
2268
|
+
if (parsed.chainId !== undefined)
|
|
2269
|
+
ns.chainId = parsed.chainId;
|
|
2270
|
+
this._activeNamespace = namespace;
|
|
2271
|
+
this.currentAddress = validated;
|
|
2272
|
+
this.currentChainId = parsed.chainId;
|
|
2273
|
+
}
|
|
2274
|
+
catch (err) {
|
|
2275
|
+
logger.warn("Failed to restore persisted wallet snapshot", err);
|
|
2276
|
+
cookie().remove(ACTIVE_WALLET_KEY);
|
|
2277
|
+
}
|
|
2159
2278
|
};
|
|
2160
2279
|
/**
|
|
2161
2280
|
* Helper method to clear the active provider state
|
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
export declare const SESSION_TRAFFIC_SOURCE_KEY = "traffic-source";
|
|
2
|
-
export declare const SESSION_CURRENT_URL_KEY = "analytics-current-url";
|
|
3
2
|
export declare const SESSION_USER_ID_KEY = "user-id";
|
|
3
|
+
/**
|
|
4
|
+
* Persisted snapshot of the currently-active EVM/Solana wallet
|
|
5
|
+
* (address + chainId). Lets the SDK seed `currentAddress`/`currentChainId`
|
|
6
|
+
* at init so the first page hit after a reload carries the address, without
|
|
7
|
+
* having to wait for wagmi/EIP-1193 reconnection to fire.
|
|
8
|
+
*/
|
|
9
|
+
export declare const ACTIVE_WALLET_KEY = "active-wallet";
|
|
10
|
+
/** TTL for the persisted active-wallet snapshot cookie. */
|
|
11
|
+
export declare const ACTIVE_WALLET_TTL_MS: number;
|
|
4
12
|
export declare const LOCAL_ANONYMOUS_ID_KEY = "anonymous-id";
|
|
5
13
|
export declare const CONSENT_OPT_OUT_KEY = "opt-out-tracking";
|
|
6
14
|
export declare const DEFAULT_PROVIDER_ICON = "data:image/svg+xml;base64,";
|
|
@@ -1,8 +1,16 @@
|
|
|
1
1
|
export var SESSION_TRAFFIC_SOURCE_KEY = "traffic-source";
|
|
2
2
|
// SESSION_WALLET_DETECTED_KEY and SESSION_WALLET_IDENTIFIED_KEY
|
|
3
3
|
// are now defined in src/session/index.ts
|
|
4
|
-
export var SESSION_CURRENT_URL_KEY = "analytics-current-url";
|
|
5
4
|
export var SESSION_USER_ID_KEY = "user-id";
|
|
5
|
+
/**
|
|
6
|
+
* Persisted snapshot of the currently-active EVM/Solana wallet
|
|
7
|
+
* (address + chainId). Lets the SDK seed `currentAddress`/`currentChainId`
|
|
8
|
+
* at init so the first page hit after a reload carries the address, without
|
|
9
|
+
* having to wait for wagmi/EIP-1193 reconnection to fire.
|
|
10
|
+
*/
|
|
11
|
+
export var ACTIVE_WALLET_KEY = "active-wallet";
|
|
12
|
+
/** TTL for the persisted active-wallet snapshot cookie. */
|
|
13
|
+
export var ACTIVE_WALLET_TTL_MS = 24 * 60 * 60 * 1000;
|
|
6
14
|
export var LOCAL_ANONYMOUS_ID_KEY = "anonymous-id";
|
|
7
15
|
// Consent management keys
|
|
8
16
|
export var CONSENT_OPT_OUT_KEY = "opt-out-tracking";
|
|
@@ -186,7 +186,7 @@ export declare const COUNTRY_LIST: {
|
|
|
186
186
|
readonly "America/Panama": "PA";
|
|
187
187
|
readonly "America/Pangnirtung": "CA";
|
|
188
188
|
readonly "America/Paramaribo": "SR";
|
|
189
|
-
readonly "America/Phoenix": "US
|
|
189
|
+
readonly "America/Phoenix": "US";
|
|
190
190
|
readonly "America/Port-au-Prince": "HT";
|
|
191
191
|
readonly "America/Port_of_Spain": "TT";
|
|
192
192
|
readonly "America/Porto_Acre": "BR";
|
|
@@ -289,6 +289,7 @@ export declare const COUNTRY_LIST: {
|
|
|
289
289
|
readonly "Asia/Katmandu": "NP";
|
|
290
290
|
readonly "Asia/Khandyga": "RU";
|
|
291
291
|
readonly "Asia/Kolkata": "IN";
|
|
292
|
+
readonly "Asia/Kostanay": "KZ";
|
|
292
293
|
readonly "Asia/Krasnoyarsk": "RU";
|
|
293
294
|
readonly "Asia/Kuala_Lumpur": "MY";
|
|
294
295
|
readonly "Asia/Kuching": "MY";
|
|
@@ -386,51 +387,11 @@ export declare const COUNTRY_LIST: {
|
|
|
386
387
|
readonly "Canada/Pacific": "CA";
|
|
387
388
|
readonly "Canada/Saskatchewan": "CA";
|
|
388
389
|
readonly "Canada/Yukon": "CA";
|
|
389
|
-
readonly CET: "CET";
|
|
390
390
|
readonly "Chile/Continental": "CL";
|
|
391
391
|
readonly "Chile/EasterIsland": "CL";
|
|
392
|
-
readonly CST6CDT: "CST6CDT";
|
|
393
392
|
readonly Cuba: "CU";
|
|
394
|
-
readonly EET: "EET";
|
|
395
393
|
readonly Egypt: "EG";
|
|
396
394
|
readonly Eire: "IE";
|
|
397
|
-
readonly EST: "EST";
|
|
398
|
-
readonly EST5EDT: "EST5EDT";
|
|
399
|
-
readonly "Etc/GMT": "Etc/GMT";
|
|
400
|
-
readonly "Etc/GMT+0": "Etc/GMT+0";
|
|
401
|
-
readonly "Etc/GMT+1": "Etc/GMT+1";
|
|
402
|
-
readonly "Etc/GMT+10": "Etc/GMT+10";
|
|
403
|
-
readonly "Etc/GMT+11": "Etc/GMT+11";
|
|
404
|
-
readonly "Etc/GMT+12": "Etc/GMT+12";
|
|
405
|
-
readonly "Etc/GMT+2": "Etc/GMT+2";
|
|
406
|
-
readonly "Etc/GMT+3": "Etc/GMT+3";
|
|
407
|
-
readonly "Etc/GMT+4": "Etc/GMT+4";
|
|
408
|
-
readonly "Etc/GMT+5": "Etc/GMT+5";
|
|
409
|
-
readonly "Etc/GMT+6": "Etc/GMT+6";
|
|
410
|
-
readonly "Etc/GMT+7": "Etc/GMT+7";
|
|
411
|
-
readonly "Etc/GMT+8": "Etc/GMT+8";
|
|
412
|
-
readonly "Etc/GMT+9": "Etc/GMT+9";
|
|
413
|
-
readonly "Etc/GMT-0": "Etc/GMT-0";
|
|
414
|
-
readonly "Etc/GMT-1": "Etc/GMT-1";
|
|
415
|
-
readonly "Etc/GMT-10": "Etc/GMT-10";
|
|
416
|
-
readonly "Etc/GMT-11": "Etc/GMT-11";
|
|
417
|
-
readonly "Etc/GMT-12": "Etc/GMT-12";
|
|
418
|
-
readonly "Etc/GMT-13": "Etc/GMT-13";
|
|
419
|
-
readonly "Etc/GMT-14": "Etc/GMT-14";
|
|
420
|
-
readonly "Etc/GMT-2": "Etc/GMT-2";
|
|
421
|
-
readonly "Etc/GMT-3": "Etc/GMT-3";
|
|
422
|
-
readonly "Etc/GMT-4": "Etc/GMT-4";
|
|
423
|
-
readonly "Etc/GMT-5": "Etc/GMT-5";
|
|
424
|
-
readonly "Etc/GMT-6": "Etc/GMT-6";
|
|
425
|
-
readonly "Etc/GMT-7": "Etc/GMT-7";
|
|
426
|
-
readonly "Etc/GMT-8": "Etc/GMT-8";
|
|
427
|
-
readonly "Etc/GMT-9": "Etc/GMT-9";
|
|
428
|
-
readonly "Etc/GMT0": "Etc/GMT0";
|
|
429
|
-
readonly "Etc/Greenwich": "Etc/Greenwich";
|
|
430
|
-
readonly "Etc/UCT": "Etc/UCT";
|
|
431
|
-
readonly "Etc/UTC": "Etc/UTC";
|
|
432
|
-
readonly "Etc/Universal": "Etc/Universal";
|
|
433
|
-
readonly "Etc/Zulu": "Etc/Zulu";
|
|
434
395
|
readonly "Europe/Amsterdam": "NL";
|
|
435
396
|
readonly "Europe/Andorra": "AD";
|
|
436
397
|
readonly "Europe/Astrakhan": "RU";
|
|
@@ -495,16 +456,9 @@ export declare const COUNTRY_LIST: {
|
|
|
495
456
|
readonly "Europe/Zagreb": "HR";
|
|
496
457
|
readonly "Europe/Zaporozhye": "UA";
|
|
497
458
|
readonly "Europe/Zurich": "CH";
|
|
498
|
-
readonly Factory: "Factory";
|
|
499
459
|
readonly GB: "GB";
|
|
500
460
|
readonly "GB-Eire": "GB";
|
|
501
|
-
readonly GMT: "GMT";
|
|
502
|
-
readonly "GMT+0": "GMT+0";
|
|
503
|
-
readonly "GMT-0": "GMT-0";
|
|
504
|
-
readonly GMT0: "GMT0";
|
|
505
|
-
readonly Greenwich: "Greenwich";
|
|
506
461
|
readonly Hongkong: "HK";
|
|
507
|
-
readonly HST: "HST";
|
|
508
462
|
readonly Iceland: "IS";
|
|
509
463
|
readonly "Indian/Antananarivo": "MG";
|
|
510
464
|
readonly "Indian/Chagos": "IO";
|
|
@@ -523,12 +477,9 @@ export declare const COUNTRY_LIST: {
|
|
|
523
477
|
readonly Japan: "JP";
|
|
524
478
|
readonly Kwajalein: "MH";
|
|
525
479
|
readonly Libya: "LY";
|
|
526
|
-
readonly MET: "MET";
|
|
527
480
|
readonly "Mexico/BajaNorte": "MX";
|
|
528
481
|
readonly "Mexico/BajaSur": "MX";
|
|
529
482
|
readonly "Mexico/General": "MX";
|
|
530
|
-
readonly MST: "MST";
|
|
531
|
-
readonly MST7MDT: "MST7MDT";
|
|
532
483
|
readonly Navajo: "US";
|
|
533
484
|
readonly NZ: "NZ";
|
|
534
485
|
readonly "NZ-CHAT": "NZ";
|
|
@@ -546,7 +497,7 @@ export declare const COUNTRY_LIST: {
|
|
|
546
497
|
readonly "Pacific/Galapagos": "EC";
|
|
547
498
|
readonly "Pacific/Gambier": "PF";
|
|
548
499
|
readonly "Pacific/Guadalcanal": "SB";
|
|
549
|
-
readonly "Pacific/Guam": "GU
|
|
500
|
+
readonly "Pacific/Guam": "GU";
|
|
550
501
|
readonly "Pacific/Honolulu": "US";
|
|
551
502
|
readonly "Pacific/Johnston": "UM";
|
|
552
503
|
readonly "Pacific/Kanton": "KI";
|
|
@@ -579,13 +530,10 @@ export declare const COUNTRY_LIST: {
|
|
|
579
530
|
readonly Poland: "PL";
|
|
580
531
|
readonly Portugal: "PT";
|
|
581
532
|
readonly PRC: "CN";
|
|
582
|
-
readonly PST8PDT: "PST8PDT";
|
|
583
533
|
readonly ROC: "TW";
|
|
584
534
|
readonly ROK: "KR";
|
|
585
535
|
readonly Singapore: "SG";
|
|
586
536
|
readonly Turkey: "TR";
|
|
587
|
-
readonly UCT: "UCT";
|
|
588
|
-
readonly Universal: "Universal";
|
|
589
537
|
readonly "US/Alaska": "US";
|
|
590
538
|
readonly "US/Aleutian": "US";
|
|
591
539
|
readonly "US/Arizona": "US";
|
|
@@ -598,9 +546,6 @@ export declare const COUNTRY_LIST: {
|
|
|
598
546
|
readonly "US/Mountain": "US";
|
|
599
547
|
readonly "US/Pacific": "US";
|
|
600
548
|
readonly "US/Samoa": "AS";
|
|
601
|
-
readonly UTC: "UTC";
|
|
602
549
|
readonly "W-SU": "RU";
|
|
603
|
-
readonly WET: "WET";
|
|
604
|
-
readonly Zulu: "Zulu";
|
|
605
550
|
};
|
|
606
551
|
//# sourceMappingURL=config.d.ts.map
|
|
@@ -188,7 +188,7 @@ export var COUNTRY_LIST = {
|
|
|
188
188
|
"America/Panama": "PA",
|
|
189
189
|
"America/Pangnirtung": "CA",
|
|
190
190
|
"America/Paramaribo": "SR",
|
|
191
|
-
"America/Phoenix": "US
|
|
191
|
+
"America/Phoenix": "US",
|
|
192
192
|
"America/Port-au-Prince": "HT",
|
|
193
193
|
"America/Port_of_Spain": "TT",
|
|
194
194
|
"America/Porto_Acre": "BR",
|
|
@@ -294,6 +294,7 @@ export var COUNTRY_LIST = {
|
|
|
294
294
|
"Asia/Katmandu": "NP",
|
|
295
295
|
"Asia/Khandyga": "RU",
|
|
296
296
|
"Asia/Kolkata": "IN",
|
|
297
|
+
"Asia/Kostanay": "KZ",
|
|
297
298
|
"Asia/Krasnoyarsk": "RU",
|
|
298
299
|
"Asia/Kuala_Lumpur": "MY",
|
|
299
300
|
"Asia/Kuching": "MY",
|
|
@@ -395,59 +396,15 @@ export var COUNTRY_LIST = {
|
|
|
395
396
|
"Canada/Pacific": "CA",
|
|
396
397
|
"Canada/Saskatchewan": "CA",
|
|
397
398
|
"Canada/Yukon": "CA",
|
|
398
|
-
// CET
|
|
399
|
-
CET: "CET",
|
|
400
399
|
// Chile
|
|
401
400
|
"Chile/Continental": "CL",
|
|
402
401
|
"Chile/EasterIsland": "CL",
|
|
403
|
-
// CST6CDT
|
|
404
|
-
CST6CDT: "CST6CDT",
|
|
405
402
|
// Cuba
|
|
406
403
|
Cuba: "CU",
|
|
407
|
-
// EET
|
|
408
|
-
EET: "EET",
|
|
409
404
|
// Egypt
|
|
410
405
|
Egypt: "EG",
|
|
411
406
|
// Eire
|
|
412
407
|
Eire: "IE",
|
|
413
|
-
// EST
|
|
414
|
-
EST: "EST",
|
|
415
|
-
EST5EDT: "EST5EDT",
|
|
416
|
-
"Etc/GMT": "Etc/GMT",
|
|
417
|
-
"Etc/GMT+0": "Etc/GMT+0",
|
|
418
|
-
"Etc/GMT+1": "Etc/GMT+1",
|
|
419
|
-
"Etc/GMT+10": "Etc/GMT+10",
|
|
420
|
-
"Etc/GMT+11": "Etc/GMT+11",
|
|
421
|
-
"Etc/GMT+12": "Etc/GMT+12",
|
|
422
|
-
"Etc/GMT+2": "Etc/GMT+2",
|
|
423
|
-
"Etc/GMT+3": "Etc/GMT+3",
|
|
424
|
-
"Etc/GMT+4": "Etc/GMT+4",
|
|
425
|
-
"Etc/GMT+5": "Etc/GMT+5",
|
|
426
|
-
"Etc/GMT+6": "Etc/GMT+6",
|
|
427
|
-
"Etc/GMT+7": "Etc/GMT+7",
|
|
428
|
-
"Etc/GMT+8": "Etc/GMT+8",
|
|
429
|
-
"Etc/GMT+9": "Etc/GMT+9",
|
|
430
|
-
"Etc/GMT-0": "Etc/GMT-0",
|
|
431
|
-
"Etc/GMT-1": "Etc/GMT-1",
|
|
432
|
-
"Etc/GMT-10": "Etc/GMT-10",
|
|
433
|
-
"Etc/GMT-11": "Etc/GMT-11",
|
|
434
|
-
"Etc/GMT-12": "Etc/GMT-12",
|
|
435
|
-
"Etc/GMT-13": "Etc/GMT-13",
|
|
436
|
-
"Etc/GMT-14": "Etc/GMT-14",
|
|
437
|
-
"Etc/GMT-2": "Etc/GMT-2",
|
|
438
|
-
"Etc/GMT-3": "Etc/GMT-3",
|
|
439
|
-
"Etc/GMT-4": "Etc/GMT-4",
|
|
440
|
-
"Etc/GMT-5": "Etc/GMT-5",
|
|
441
|
-
"Etc/GMT-6": "Etc/GMT-6",
|
|
442
|
-
"Etc/GMT-7": "Etc/GMT-7",
|
|
443
|
-
"Etc/GMT-8": "Etc/GMT-8",
|
|
444
|
-
"Etc/GMT-9": "Etc/GMT-9",
|
|
445
|
-
"Etc/GMT0": "Etc/GMT0",
|
|
446
|
-
"Etc/Greenwich": "Etc/Greenwich",
|
|
447
|
-
"Etc/UCT": "Etc/UCT",
|
|
448
|
-
"Etc/UTC": "Etc/UTC",
|
|
449
|
-
"Etc/Universal": "Etc/Universal",
|
|
450
|
-
"Etc/Zulu": "Etc/Zulu",
|
|
451
408
|
// Europe
|
|
452
409
|
"Europe/Amsterdam": "NL",
|
|
453
410
|
"Europe/Andorra": "AD",
|
|
@@ -513,21 +470,11 @@ export var COUNTRY_LIST = {
|
|
|
513
470
|
"Europe/Zagreb": "HR",
|
|
514
471
|
"Europe/Zaporozhye": "UA",
|
|
515
472
|
"Europe/Zurich": "CH",
|
|
516
|
-
// Factory
|
|
517
|
-
Factory: "Factory",
|
|
518
473
|
// GB
|
|
519
474
|
GB: "GB",
|
|
520
475
|
"GB-Eire": "GB",
|
|
521
|
-
// GMT
|
|
522
|
-
GMT: "GMT",
|
|
523
|
-
"GMT+0": "GMT+0",
|
|
524
|
-
"GMT-0": "GMT-0",
|
|
525
|
-
GMT0: "GMT0",
|
|
526
|
-
Greenwich: "Greenwich",
|
|
527
476
|
// HK
|
|
528
477
|
Hongkong: "HK",
|
|
529
|
-
// HST
|
|
530
|
-
HST: "HST",
|
|
531
478
|
// Iceland
|
|
532
479
|
Iceland: "IS",
|
|
533
480
|
// Indian
|
|
@@ -554,15 +501,10 @@ export var COUNTRY_LIST = {
|
|
|
554
501
|
Kwajalein: "MH",
|
|
555
502
|
// Libya
|
|
556
503
|
Libya: "LY",
|
|
557
|
-
// MET
|
|
558
|
-
MET: "MET",
|
|
559
504
|
// Mexico
|
|
560
505
|
"Mexico/BajaNorte": "MX",
|
|
561
506
|
"Mexico/BajaSur": "MX",
|
|
562
507
|
"Mexico/General": "MX",
|
|
563
|
-
// MST
|
|
564
|
-
MST: "MST",
|
|
565
|
-
MST7MDT: "MST7MDT",
|
|
566
508
|
// Navajo
|
|
567
509
|
Navajo: "US",
|
|
568
510
|
// NZ
|
|
@@ -583,7 +525,7 @@ export var COUNTRY_LIST = {
|
|
|
583
525
|
"Pacific/Galapagos": "EC",
|
|
584
526
|
"Pacific/Gambier": "PF",
|
|
585
527
|
"Pacific/Guadalcanal": "SB",
|
|
586
|
-
"Pacific/Guam": "GU
|
|
528
|
+
"Pacific/Guam": "GU",
|
|
587
529
|
"Pacific/Honolulu": "US",
|
|
588
530
|
"Pacific/Johnston": "UM",
|
|
589
531
|
"Pacific/Kanton": "KI",
|
|
@@ -619,8 +561,6 @@ export var COUNTRY_LIST = {
|
|
|
619
561
|
Portugal: "PT",
|
|
620
562
|
// PRC
|
|
621
563
|
PRC: "CN",
|
|
622
|
-
// PST8PDT
|
|
623
|
-
PST8PDT: "PST8PDT",
|
|
624
564
|
// ROC
|
|
625
565
|
ROC: "TW",
|
|
626
566
|
// ROK
|
|
@@ -629,10 +569,6 @@ export var COUNTRY_LIST = {
|
|
|
629
569
|
Singapore: "SG",
|
|
630
570
|
// Turkey
|
|
631
571
|
Turkey: "TR",
|
|
632
|
-
// UCT
|
|
633
|
-
UCT: "UCT",
|
|
634
|
-
// Universal
|
|
635
|
-
Universal: "Universal",
|
|
636
572
|
// US
|
|
637
573
|
"US/Alaska": "US",
|
|
638
574
|
"US/Aleutian": "US",
|
|
@@ -646,13 +582,7 @@ export var COUNTRY_LIST = {
|
|
|
646
582
|
"US/Mountain": "US",
|
|
647
583
|
"US/Pacific": "US",
|
|
648
584
|
"US/Samoa": "AS",
|
|
649
|
-
// UTC
|
|
650
|
-
UTC: "UTC",
|
|
651
585
|
// W-SU
|
|
652
586
|
"W-SU": "RU",
|
|
653
|
-
// WET
|
|
654
|
-
WET: "WET",
|
|
655
|
-
// Zulu
|
|
656
|
-
Zulu: "Zulu",
|
|
657
587
|
};
|
|
658
588
|
//# sourceMappingURL=config.js.map
|
|
@@ -17,6 +17,7 @@ declare class EventFactory implements IEventFactory {
|
|
|
17
17
|
private getLanguage;
|
|
18
18
|
private getLibraryVersion;
|
|
19
19
|
private extractUTMParameters;
|
|
20
|
+
private extractClickIdParameters;
|
|
20
21
|
private extractReferralParameter;
|
|
21
22
|
private getTrafficSources;
|
|
22
23
|
private getScreen;
|