@takeal/cusfront-sdk 0.8.4 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +57 -0
- package/README.md +46 -5
- package/dist/analytics.cjs +74 -22
- package/dist/analytics.cjs.map +1 -1
- package/dist/analytics.d.cts +43 -4
- package/dist/analytics.d.ts +43 -4
- package/dist/analytics.js +71 -23
- package/dist/analytics.js.map +1 -1
- package/dist/{cards-DwxkVJUB.d.cts → cards-C5rk0XkI.d.cts} +47 -5
- package/dist/{cards-VkS_2lPe.d.ts → cards-CS-oxqLS.d.ts} +47 -5
- package/dist/index.cjs +94 -26
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +13 -5
- package/dist/index.d.ts +13 -5
- package/dist/index.js +91 -27
- package/dist/index.js.map +1 -1
- package/dist/react/index.d.cts +1 -1
- package/dist/react/index.d.ts +1 -1
- package/dist/resources/auth.cjs.map +1 -1
- package/dist/resources/auth.d.cts +1 -1
- package/dist/resources/auth.d.ts +1 -1
- package/dist/resources/auth.js.map +1 -1
- package/dist/resources/branding.cjs.map +1 -1
- package/dist/resources/branding.d.cts +6 -0
- package/dist/resources/branding.d.ts +6 -0
- package/dist/resources/branding.js.map +1 -1
- package/dist/resources/cards.cjs.map +1 -1
- package/dist/resources/cards.d.cts +1 -1
- package/dist/resources/cards.d.ts +1 -1
- package/dist/resources/cards.js.map +1 -1
- package/dist/resources/deposits.cjs.map +1 -1
- package/dist/resources/deposits.d.cts +1 -1
- package/dist/resources/deposits.d.ts +1 -1
- package/dist/resources/deposits.js.map +1 -1
- package/dist/resources/funding-options.d.cts +1 -1
- package/dist/resources/funding-options.d.ts +1 -1
- package/dist/resources/me.d.cts +1 -1
- package/dist/resources/me.d.ts +1 -1
- package/dist/telegram.cjs +20 -4
- package/dist/telegram.cjs.map +1 -1
- package/dist/telegram.d.cts +1 -1
- package/dist/telegram.d.ts +1 -1
- package/dist/telegram.js +20 -4
- package/dist/telegram.js.map +1 -1
- package/package.json +1 -1
|
@@ -296,7 +296,8 @@ interface Deposit {
|
|
|
296
296
|
/**
|
|
297
297
|
* For a top-up onto a card: `pending` until the card provider has loaded
|
|
298
298
|
* the card, then `succeeded` or `failed`. Show the top-up as done only
|
|
299
|
-
* once it is `succeeded`, or once `returned_to_wallet_at` is set.
|
|
299
|
+
* once it is `succeeded`, or once `returned_to_wallet_at` is set. Empty
|
|
300
|
+
* for a top-up that was never paid: nothing was there to load.
|
|
300
301
|
*/
|
|
301
302
|
card_load_status?: CardLoadStatus | null;
|
|
302
303
|
/** Why the card could not take it, when `card_load_status` is `failed`. */
|
|
@@ -865,7 +866,15 @@ interface CardOrderInput {
|
|
|
865
866
|
currency?: string;
|
|
866
867
|
/** Money to put on the card on top of its price, decimal string in the card's currency. Sent as `extra_load`. */
|
|
867
868
|
extraLoad?: string;
|
|
868
|
-
/**
|
|
869
|
+
/**
|
|
870
|
+
* A promo code for the order. A code for cards lowers the card's price.
|
|
871
|
+
* A code for top-ups lowers the fee on the payment: for a way of paying
|
|
872
|
+
* with its fee in the exchange rate it lowers the rate, and the amount
|
|
873
|
+
* with it (see `rate` of the order and of the quote). A minimum amount of
|
|
874
|
+
* such a code is checked against the money that goes onto the card, not
|
|
875
|
+
* against the card's price; below it the order is refused with
|
|
876
|
+
* `promo_code_below_minimum` and a sentence to show. Sent as `promo_code`.
|
|
877
|
+
*/
|
|
869
878
|
promoCode?: string;
|
|
870
879
|
/** Pay part of the price with bonuses; on by default. Sent as `use_bonus`. */
|
|
871
880
|
useBonus?: boolean;
|
|
@@ -937,8 +946,10 @@ interface PromoCodeQuote {
|
|
|
937
946
|
message: string | null;
|
|
938
947
|
/**
|
|
939
948
|
* The discount and what it comes off: `card_issuance` (the card's price,
|
|
940
|
-
* in `discount` of the quote) or `funding_commission` (the
|
|
941
|
-
*
|
|
949
|
+
* in `discount` of the quote) or `funding_commission` (the fee on the
|
|
950
|
+
* payment). A fee in the exchange rate gets lower and the amount with it,
|
|
951
|
+
* so it is in `discount` of the quote too; a separate commission gets
|
|
952
|
+
* lower while the amount stays the same, and more goes onto the card.
|
|
942
953
|
*/
|
|
943
954
|
discount: CodeDiscount | null;
|
|
944
955
|
/** What else the code gives, once the card is issued. */
|
|
@@ -946,6 +957,26 @@ interface PromoCodeQuote {
|
|
|
946
957
|
/** The code the user signed up with, applied without being typed. */
|
|
947
958
|
from_sign_up: boolean;
|
|
948
959
|
}
|
|
960
|
+
/**
|
|
961
|
+
* The exchange rate a card order was priced at, when the payment is in
|
|
962
|
+
* another currency than the card's.
|
|
963
|
+
*/
|
|
964
|
+
interface CardOrderRate {
|
|
965
|
+
/**
|
|
966
|
+
* The rate the user gets, the fee included: units of `card_currency` per
|
|
967
|
+
* 1 unit of `currency`, decimal string. Show this one; `1 / effective_rate`
|
|
968
|
+
* is the price of one unit of the card's currency.
|
|
969
|
+
*/
|
|
970
|
+
effective_rate: string;
|
|
971
|
+
/** The fee in basis points (1900 = 19 %), as the order was priced. */
|
|
972
|
+
fee_bps: number;
|
|
973
|
+
/** `markup` (the fee is in the rate), `spread` or `commission`. */
|
|
974
|
+
fee_kind: string;
|
|
975
|
+
/** When the user's plan or a promo code lowered the fee in the rate: the fee before that. */
|
|
976
|
+
list_fee_bps?: number | null;
|
|
977
|
+
/** The promo code the rate was priced with. */
|
|
978
|
+
promo_code?: string | null;
|
|
979
|
+
}
|
|
949
980
|
/** What a card order would cost now, from {@link CardsResource.quote} or {@link CardsResource.quotePublic}. */
|
|
950
981
|
interface CardOrderQuote {
|
|
951
982
|
/** What the user pays, decimal string, in `currency`. Pass it to the order as `expectedAmount`. */
|
|
@@ -967,6 +998,12 @@ interface CardOrderQuote {
|
|
|
967
998
|
preliminary: boolean;
|
|
968
999
|
/** Null when no code was typed and none applies by itself. */
|
|
969
1000
|
promo_code: PromoCodeQuote | null;
|
|
1001
|
+
/**
|
|
1002
|
+
* The rate the amount was worked out at, with the promo code's share
|
|
1003
|
+
* taken off the fee. Null when the payment is in the card's currency;
|
|
1004
|
+
* older platforms leave it out.
|
|
1005
|
+
*/
|
|
1006
|
+
rate?: CardOrderRate | null;
|
|
970
1007
|
}
|
|
971
1008
|
/** What {@link CardsResource.order} returns: the top-up to pay and its price. */
|
|
972
1009
|
interface CardOrder {
|
|
@@ -984,6 +1021,11 @@ interface CardOrder {
|
|
|
984
1021
|
* it before the payment. Older platforms leave it out.
|
|
985
1022
|
*/
|
|
986
1023
|
debt_withheld?: string;
|
|
1024
|
+
/**
|
|
1025
|
+
* The rate the order was priced at. Null when the payment is in the
|
|
1026
|
+
* card's currency; older platforms leave it out.
|
|
1027
|
+
*/
|
|
1028
|
+
rate?: CardOrderRate | null;
|
|
987
1029
|
}
|
|
988
1030
|
/** Why a card ordered with the sign-up was not placed. The account exists all the same. */
|
|
989
1031
|
interface CardOrderError {
|
|
@@ -1429,4 +1471,4 @@ declare class CardsResource {
|
|
|
1429
1471
|
terminate(id: string, reason?: string): Promise<Card>;
|
|
1430
1472
|
}
|
|
1431
1473
|
|
|
1432
|
-
export { type
|
|
1474
|
+
export { type TopUpTerms as $, type Address as A, type BillingAddress as B, type CardProduct as C, type Deposit as D, type CreateQuoteInput as E, FundingOptionsResource as F, type CustomerInfo as G, type DepositMethod as H, type DepositStatus as I, type DepositTarget as J, type FeeKind as K, type FunderMode as L, type FundingOption as M, type FundingQuote as N, type InitiateDepositInput as O, type IssuanceBonus as P, type IssueCardInput as Q, type MethodTerms as R, type PromoCodeQuote as S, type PromoCodeStatus as T, type Refund as U, type RevealCardInput as V, type RevealState as W, type RevealedCard as X, type SetPinInput as Y, type TopUpInput as Z, type TopUpResult as _, type Card as a, type TransferInput as a0, type TransferResult as a1, type UpdateCardInput as a2, priceChangedQuote as a3, revealState as a4, cardOrderBody as a5, cardOrderQuoteBody as a6, cardRequestBody as a7, DepositsResource as b, CardsResource as c, type CardBalance as d, type CardDesignRef as e, type CardForm as f, type CardInTransit as g, type CardLoadStatus as h, type CardOrder as i, type CardOrderError as j, type CardOrderInput as k, type CardOrderQuote as l, type CardOrderQuoteInput as m, type CardOrderRate as n, type CardProductPrice as o, type CardStatus as p, type CardStatusSource as q, type CardTariff as r, type CardTopUp as s, type CardTopUpStatus as t, type CardTransfer as u, type CardType as v, type Cardholder as w, type CloseBlockedReason as x, type CreateCardInput as y, type CreateDepositRefundInput as z };
|
package/dist/index.cjs
CHANGED
|
@@ -2,11 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
// src/error.ts
|
|
4
4
|
var ApiError = class extends Error {
|
|
5
|
-
constructor(status, code, message, body) {
|
|
5
|
+
constructor(status, code, message, body, retryAfterSeconds) {
|
|
6
6
|
super(message);
|
|
7
7
|
this.status = status;
|
|
8
8
|
this.code = code;
|
|
9
9
|
this.body = body;
|
|
10
|
+
this.retryAfterSeconds = retryAfterSeconds;
|
|
10
11
|
this.isApiError = true;
|
|
11
12
|
this.name = "ApiError";
|
|
12
13
|
}
|
|
@@ -141,11 +142,20 @@ async function parseResponse(resp) {
|
|
|
141
142
|
resp.status,
|
|
142
143
|
errBody.code ?? `http_${resp.status}`,
|
|
143
144
|
errBody.message ?? resp.statusText ?? "request failed",
|
|
144
|
-
body
|
|
145
|
+
body,
|
|
146
|
+
retryAfter(resp.headers?.get("Retry-After"))
|
|
145
147
|
);
|
|
146
148
|
}
|
|
147
149
|
return body;
|
|
148
150
|
}
|
|
151
|
+
function retryAfter(v, now = Date.now()) {
|
|
152
|
+
if (!v) return void 0;
|
|
153
|
+
const t = v.trim();
|
|
154
|
+
if (/^\d+$/.test(t)) return Number(t);
|
|
155
|
+
const at = Date.parse(t);
|
|
156
|
+
if (Number.isNaN(at)) return void 0;
|
|
157
|
+
return Math.max(0, Math.ceil((at - now) / 1e3));
|
|
158
|
+
}
|
|
149
159
|
|
|
150
160
|
// src/resources/attribution.ts
|
|
151
161
|
var AttributionResource = class {
|
|
@@ -1808,7 +1818,7 @@ var FundingOptionsResource = class {
|
|
|
1808
1818
|
};
|
|
1809
1819
|
|
|
1810
1820
|
// src/version.ts
|
|
1811
|
-
var SDK_VERSION = "0.
|
|
1821
|
+
var SDK_VERSION = "0.9.0";
|
|
1812
1822
|
|
|
1813
1823
|
// src/client-platform.ts
|
|
1814
1824
|
var CLIENT_HEADER = "X-Takeal-Client";
|
|
@@ -1945,12 +1955,18 @@ function readyInfo(raw, healthy) {
|
|
|
1945
1955
|
}
|
|
1946
1956
|
return { ...base, compatible: true };
|
|
1947
1957
|
}
|
|
1958
|
+
function isReadyBody(body) {
|
|
1959
|
+
if (typeof body !== "object" || body === null || Array.isArray(body)) return false;
|
|
1960
|
+
const b = body;
|
|
1961
|
+
const block = (v) => typeof v === "object" && v !== null;
|
|
1962
|
+
return b.code !== "service_unavailable" && typeof b.status === "string" && (block(b.checks) || block(b.ops));
|
|
1963
|
+
}
|
|
1948
1964
|
async function fetchReady(http, opts = {}) {
|
|
1949
1965
|
try {
|
|
1950
1966
|
const body = await http.get("/ready", { skipAuth: true, signal: opts.signal });
|
|
1951
1967
|
return readyInfo(body ?? {}, true);
|
|
1952
1968
|
} catch (e) {
|
|
1953
|
-
if (isApiError(e) && e.status === 503 &&
|
|
1969
|
+
if (isApiError(e) && e.status === 503 && isReadyBody(e.body)) {
|
|
1954
1970
|
return readyInfo(e.body, false);
|
|
1955
1971
|
}
|
|
1956
1972
|
throw e;
|
|
@@ -1984,6 +2000,8 @@ var ANALYTICS_EVENTS = [
|
|
|
1984
2000
|
];
|
|
1985
2001
|
var METRIKA_GOALS = ["signup_started", "signup_completed"];
|
|
1986
2002
|
var NO_CAPTURE_CLASS = "ph-no-capture";
|
|
2003
|
+
var MASK_TEXT_CLASS = "ph-mask";
|
|
2004
|
+
var ZONE_ATTRIBUTE = "data-analytics-zone";
|
|
1987
2005
|
var UUID = /[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/gi;
|
|
1988
2006
|
var EMAIL = /[^\s@"'<>(),;:]+@[^\s@"'<>(),;:]+\.[a-z]{2,}/gi;
|
|
1989
2007
|
var DIGIT_RUN = /\+?\d[\d\s().-]{7,}\d/g;
|
|
@@ -2249,18 +2267,38 @@ function posthogConfig(zone, o) {
|
|
|
2249
2267
|
// Page views go through `page()`, with a cleaned address.
|
|
2250
2268
|
capture_pageview: false,
|
|
2251
2269
|
capture_pageleave: true,
|
|
2252
|
-
before_send: beforeSend
|
|
2270
|
+
before_send: beforeSend,
|
|
2271
|
+
// Set once. A zone change never touches these: posthog-js hands the
|
|
2272
|
+
// recording options to rrweb when the recorder starts, and changing
|
|
2273
|
+
// `disable_session_recording` stops or restarts it.
|
|
2274
|
+
disable_session_recording: !o.sessionRecording,
|
|
2275
|
+
session_recording: recordingOptions()
|
|
2276
|
+
};
|
|
2277
|
+
return { ...base, ...zoneConfig(zone) };
|
|
2278
|
+
}
|
|
2279
|
+
function recordingOptions() {
|
|
2280
|
+
return {
|
|
2281
|
+
maskAllInputs: true,
|
|
2282
|
+
maskTextSelector: "*",
|
|
2283
|
+
maskTextFn: maskRecordedText,
|
|
2284
|
+
blockClass: NO_CAPTURE_CLASS
|
|
2253
2285
|
};
|
|
2254
|
-
return { ...base, ...zoneConfig(zone, o) };
|
|
2255
2286
|
}
|
|
2256
|
-
|
|
2287
|
+
var PRIVATE_BLOCK = `.${MASK_TEXT_CLASS}, [${ZONE_ATTRIBUTE}]:not([${ZONE_ATTRIBUTE}="public"])`;
|
|
2288
|
+
function maskRecordedText(text, element) {
|
|
2289
|
+
try {
|
|
2290
|
+
if (state()?.zone === "public" && !element?.closest(PRIVATE_BLOCK)) return text;
|
|
2291
|
+
} catch {
|
|
2292
|
+
}
|
|
2293
|
+
return text.replace(/\S/g, "*");
|
|
2294
|
+
}
|
|
2295
|
+
function zoneConfig(zone) {
|
|
2257
2296
|
if (zone === "public") {
|
|
2258
2297
|
return {
|
|
2259
2298
|
autocapture: true,
|
|
2260
2299
|
mask_all_text: false,
|
|
2261
2300
|
mask_all_element_attributes: false,
|
|
2262
|
-
enable_heatmaps: true
|
|
2263
|
-
disable_session_recording: true
|
|
2301
|
+
enable_heatmaps: true
|
|
2264
2302
|
};
|
|
2265
2303
|
}
|
|
2266
2304
|
return {
|
|
@@ -2268,13 +2306,7 @@ function zoneConfig(zone, o) {
|
|
|
2268
2306
|
autocapture: { capture_copied_text: false },
|
|
2269
2307
|
mask_all_text: true,
|
|
2270
2308
|
mask_all_element_attributes: true,
|
|
2271
|
-
enable_heatmaps: false
|
|
2272
|
-
disable_session_recording: !o.sessionRecording,
|
|
2273
|
-
session_recording: {
|
|
2274
|
-
maskAllInputs: true,
|
|
2275
|
-
maskTextSelector: "*",
|
|
2276
|
-
blockClass: NO_CAPTURE_CLASS
|
|
2277
|
-
}
|
|
2309
|
+
enable_heatmaps: false
|
|
2278
2310
|
};
|
|
2279
2311
|
}
|
|
2280
2312
|
function assetsHost(o) {
|
|
@@ -2333,16 +2365,26 @@ var PostHogSink = class {
|
|
|
2333
2365
|
}
|
|
2334
2366
|
setZone(zone) {
|
|
2335
2367
|
this.with((ph) => {
|
|
2336
|
-
ph.set_config(zoneConfig(zone
|
|
2368
|
+
ph.set_config(zoneConfig(zone));
|
|
2337
2369
|
ph.register({ zone });
|
|
2338
|
-
|
|
2339
|
-
|
|
2370
|
+
});
|
|
2371
|
+
}
|
|
2372
|
+
setConsent(granted) {
|
|
2373
|
+
this.with((ph) => {
|
|
2374
|
+
if (granted) {
|
|
2375
|
+
ph.opt_in_capturing?.();
|
|
2376
|
+
if (this.o.sessionRecording) ph.startSessionRecording?.();
|
|
2377
|
+
} else {
|
|
2378
|
+
ph.stopSessionRecording?.();
|
|
2379
|
+
ph.opt_out_capturing?.();
|
|
2380
|
+
}
|
|
2340
2381
|
});
|
|
2341
2382
|
}
|
|
2342
2383
|
};
|
|
2343
2384
|
var MetrikaSink = class {
|
|
2344
2385
|
constructor(o) {
|
|
2345
2386
|
this.live = true;
|
|
2387
|
+
this.consented = true;
|
|
2346
2388
|
this.id = Number(o.counterId);
|
|
2347
2389
|
const w = win();
|
|
2348
2390
|
if (!w.ym) {
|
|
@@ -2365,7 +2407,7 @@ var MetrikaSink = class {
|
|
|
2365
2407
|
});
|
|
2366
2408
|
}
|
|
2367
2409
|
ym(...args) {
|
|
2368
|
-
if (this.live) win().ym?.(this.id, ...args);
|
|
2410
|
+
if (this.live && this.consented) win().ym?.(this.id, ...args);
|
|
2369
2411
|
}
|
|
2370
2412
|
capture(event, props) {
|
|
2371
2413
|
if (METRIKA_GOALS.includes(event)) this.ym("reachGoal", event, props);
|
|
@@ -2381,16 +2423,27 @@ var MetrikaSink = class {
|
|
|
2381
2423
|
setZone(zone) {
|
|
2382
2424
|
this.live = zone === "public";
|
|
2383
2425
|
}
|
|
2426
|
+
setConsent(granted) {
|
|
2427
|
+
this.consented = granted;
|
|
2428
|
+
}
|
|
2384
2429
|
};
|
|
2385
2430
|
var KEY = /* @__PURE__ */ Symbol.for("takeal.cusfront-sdk.analytics");
|
|
2386
2431
|
var holder = globalThis;
|
|
2387
2432
|
var state = () => holder[KEY];
|
|
2433
|
+
function loaded(s) {
|
|
2434
|
+
return [s.posthog, s.metrika].filter((x) => !!x);
|
|
2435
|
+
}
|
|
2388
2436
|
function sinks(s) {
|
|
2437
|
+
if (!s.consent) return [];
|
|
2438
|
+
if (s.options.posthog?.key && !s.posthog) {
|
|
2439
|
+
s.posthog = new PostHogSink(s.options.posthog, s.zone);
|
|
2440
|
+
if (s.userId) s.posthog.identify(s.userId);
|
|
2441
|
+
}
|
|
2389
2442
|
if (s.zone === "public" && s.options.metrika && !s.metrika) {
|
|
2390
2443
|
s.metrika = new MetrikaSink(s.options.metrika);
|
|
2391
2444
|
if (s.userId) s.metrika.identify(s.userId);
|
|
2392
2445
|
}
|
|
2393
|
-
return
|
|
2446
|
+
return loaded(s);
|
|
2394
2447
|
}
|
|
2395
2448
|
function initAnalytics(options) {
|
|
2396
2449
|
if (state() || !win().document) return;
|
|
@@ -2399,17 +2452,28 @@ function initAnalytics(options) {
|
|
|
2399
2452
|
"[analytics] Yandex Metrica is on a page outside the public zone; it must not be."
|
|
2400
2453
|
);
|
|
2401
2454
|
}
|
|
2402
|
-
const s = { options, zone: options.zone };
|
|
2455
|
+
const s = { options, zone: options.zone, consent: options.consent !== false };
|
|
2403
2456
|
holder[KEY] = s;
|
|
2404
|
-
if (options.posthog?.key) s.posthog = new PostHogSink(options.posthog, options.zone);
|
|
2405
2457
|
sinks(s);
|
|
2406
2458
|
if (options.initialPageview !== false) page();
|
|
2407
2459
|
}
|
|
2460
|
+
function setAnalyticsConsent(granted) {
|
|
2461
|
+
const s = state();
|
|
2462
|
+
if (!s || s.consent === granted) return;
|
|
2463
|
+
s.consent = granted;
|
|
2464
|
+
const before = loaded(s);
|
|
2465
|
+
for (const sink of before) sink.setConsent(granted);
|
|
2466
|
+
if (granted) {
|
|
2467
|
+
sinks(s);
|
|
2468
|
+
if (s.lastPage === void 0 && s.options.initialPageview !== false) page();
|
|
2469
|
+
}
|
|
2470
|
+
}
|
|
2408
2471
|
function setAnalyticsZone(zone) {
|
|
2409
2472
|
const s = state();
|
|
2410
2473
|
if (!s || s.zone === zone) return;
|
|
2411
2474
|
s.zone = zone;
|
|
2412
|
-
|
|
2475
|
+
sinks(s);
|
|
2476
|
+
for (const sink of loaded(s)) sink.setZone(zone);
|
|
2413
2477
|
}
|
|
2414
2478
|
function track(event, props = {}) {
|
|
2415
2479
|
const s = state();
|
|
@@ -2421,7 +2485,7 @@ function page(url) {
|
|
|
2421
2485
|
const s = state();
|
|
2422
2486
|
const w = win();
|
|
2423
2487
|
const raw = url ?? w.location?.href;
|
|
2424
|
-
if (!s || !raw) return;
|
|
2488
|
+
if (!s || !s.consent || !raw) return;
|
|
2425
2489
|
const clean2 = sanitizeUrl(raw);
|
|
2426
2490
|
if (clean2 === s.lastPage) return;
|
|
2427
2491
|
const referrer = s.lastPage ?? (w.document?.referrer ? sanitizeUrl(w.document.referrer) : void 0);
|
|
@@ -2438,7 +2502,7 @@ function resetAnalytics() {
|
|
|
2438
2502
|
const s = state();
|
|
2439
2503
|
if (!s) return;
|
|
2440
2504
|
s.userId = void 0;
|
|
2441
|
-
for (const sink of
|
|
2505
|
+
for (const sink of loaded(s)) sink.reset();
|
|
2442
2506
|
}
|
|
2443
2507
|
async function posthogDistinctId(timeoutMs = 3e3) {
|
|
2444
2508
|
const ready = state()?.posthog?.ready;
|
|
@@ -2520,11 +2584,13 @@ exports.ApiError = ApiError;
|
|
|
2520
2584
|
exports.CLIENT_HEADER = CLIENT_HEADER;
|
|
2521
2585
|
exports.DISPUTE_DOCUMENTS_CONSENT = DISPUTE_DOCUMENTS_CONSENT;
|
|
2522
2586
|
exports.HOLDER_DATA_CONSENT = HOLDER_DATA_CONSENT;
|
|
2587
|
+
exports.MASK_TEXT_CLASS = MASK_TEXT_CLASS;
|
|
2523
2588
|
exports.METRIKA_GOALS = METRIKA_GOALS;
|
|
2524
2589
|
exports.NO_CAPTURE_CLASS = NO_CAPTURE_CLASS;
|
|
2525
2590
|
exports.NetworkError = NetworkError;
|
|
2526
2591
|
exports.SDK_VERSION = SDK_VERSION;
|
|
2527
2592
|
exports.SUPPORTED_MEISTER = SUPPORTED_MEISTER;
|
|
2593
|
+
exports.ZONE_ATTRIBUTE = ZONE_ATTRIBUTE;
|
|
2528
2594
|
exports.analyticsIds = analyticsIds;
|
|
2529
2595
|
exports.anonymousKey = anonymousKey;
|
|
2530
2596
|
exports.createClient = createClient;
|
|
@@ -2538,6 +2604,7 @@ exports.initAnalytics = initAnalytics;
|
|
|
2538
2604
|
exports.isApiError = isApiError;
|
|
2539
2605
|
exports.isCardOtp = isCardOtp;
|
|
2540
2606
|
exports.isNetworkError = isNetworkError;
|
|
2607
|
+
exports.maskRecordedText = maskRecordedText;
|
|
2541
2608
|
exports.page = page;
|
|
2542
2609
|
exports.posthogDistinctId = posthogDistinctId;
|
|
2543
2610
|
exports.priceChangedQuote = priceChangedQuote;
|
|
@@ -2548,6 +2615,7 @@ exports.revealState = revealState;
|
|
|
2548
2615
|
exports.sanitizeProperties = sanitizeProperties;
|
|
2549
2616
|
exports.sanitizeUrl = sanitizeUrl;
|
|
2550
2617
|
exports.satisfies = satisfies;
|
|
2618
|
+
exports.setAnalyticsConsent = setAnalyticsConsent;
|
|
2551
2619
|
exports.setAnalyticsZone = setAnalyticsZone;
|
|
2552
2620
|
exports.track = track;
|
|
2553
2621
|
exports.withAnalyticsIds = withAnalyticsIds;
|