@uniformdev/context 19.198.3-alpha.5 → 19.199.1-alpha.10

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.
@@ -1,4 +1,4 @@
1
- import { aC as paths$7, N as ManifestV2 } from '../types-WXZBuJXL.mjs';
1
+ import { aC as paths$7, N as ManifestV2 } from '../types-CqKOO0nP.mjs';
2
2
  import 'mitt';
3
3
 
4
4
  type LimitPolicy = <ReturnValue>(func: () => Promise<ReturnValue>) => Promise<ReturnValue>;
package/dist/api/api.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { aC as paths$7, N as ManifestV2 } from '../types-WXZBuJXL.js';
1
+ import { aC as paths$7, N as ManifestV2 } from '../types-CqKOO0nP.js';
2
2
  import 'mitt';
3
3
 
4
4
  type LimitPolicy = <ReturnValue>(func: () => Promise<ReturnValue>) => Promise<ReturnValue>;
package/dist/api/api.js CHANGED
@@ -229,7 +229,7 @@ async function handleRateLimits(callApi) {
229
229
  if (typeof serverTime === "number" && typeof resetTime === "number") {
230
230
  resetWait = Math.max(0, Math.min(Math.round(1.1 * (resetTime - serverTime)), 1e4));
231
231
  }
232
- } catch (err) {
232
+ } catch (e) {
233
233
  }
234
234
  const base = Math.pow(2, backoffRetries - backoffRetriesLeft) * 333;
235
235
  const backoffWait = base + Math.round(Math.random() * (base / 2)) * (Math.random() > 0.5 ? 1 : -1);
package/dist/api/api.mjs CHANGED
@@ -164,7 +164,7 @@ async function handleRateLimits(callApi) {
164
164
  if (typeof serverTime === "number" && typeof resetTime === "number") {
165
165
  resetWait = Math.max(0, Math.min(Math.round(1.1 * (resetTime - serverTime)), 1e4));
166
166
  }
167
- } catch (err) {
167
+ } catch (e) {
168
168
  }
169
169
  const base = Math.pow(2, backoffRetries - backoffRetriesLeft) * 333;
170
170
  const backoffWait = base + Math.round(Math.random() * (base / 2)) * (Math.random() > 0.5 ? 1 : -1);
package/dist/index.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import { O as OutputSeverity, L as LogDrain, C as ContextPlugin, S as ScoreVector, A as AggregateDimension, T as TransitionDataStore, a as StorageCommands, V as VisitorData, b as TransitionDataStoreOptions, D as DecayFunction, c as CriteriaEvaluator, d as StringMatch, e as VariantMatchCriteria, f as LogMessage, g as DevToolsEvents } from './types-WXZBuJXL.mjs';
2
- export { _ as AggregateDimensionInput, a4 as BehaviorTag, h as CONTEXTUAL_EDITING_TEST_NAME, i as CONTEXTUAL_EDITING_TEST_SELECTED_VARIANT_ID, n as Context, l as ContextEvents, m as ContextInstance, j as ContextOptions, az as ContextState, aA as ContextStateUpdate, J as CriteriaEvaluatorParameters, I as CriteriaEvaluatorResult, an as DecayOptions, q as DevToolsActions, t as DevToolsDataEvent, r as DevToolsEvent, x as DevToolsForgetEvent, u as DevToolsHelloEvent, s as DevToolsLogEvent, w as DevToolsRawCommandsEvent, p as DevToolsState, o as DevToolsUiVersion, v as DevToolsUpdateEvent, a1 as DimensionMatch, X as EnrichmentCategory, au as EnrichmentData, ax as EventData, aB as GoalStateUpdate, at as Goals, H as GroupCriteriaEvaluator, ag as IdentifyCommand, F as LogMessageGroup, E as LogMessageSingle, y as LogMessages, G as ManifestInstance, N as ManifestV2, M as MessageCategory, B as MessageFunc, ab as ModifyScoreCommand, ac as ModifySessionScoreCommand, Y as NumberMatch, P as PersonalizationEvent, Q as PersonalizationManifest, av as PersonalizeControlVariant, a2 as PersonalizeOptions, aw as PersonalizeVariants, a6 as PersonalizedResult, a5 as PersonalizedVariant, ar as Quirks, al as SERVER_STATE_ID, ak as ServerToClientTransitionState, ad as SetConsentCommand, ah as SetControlGroupCommand, aa as SetGoalCommand, ai as SetPersonalizeVariantControlCommand, ae as SetQuirkCommand, af as SetTestCommand, z as Severity, R as Signal, W as SignalCriteria, U as SignalCriteriaGroup, K as SignalData, a9 as StorageCommand, Z as TestDefinition, k as TestEvent, $ as TestOptions, a8 as TestResult, a7 as TestVariant, as as Tests, am as TransitionDataStoreEvents, aq as VisitorDataStore, ap as VisitorDataStoreEvents, ao as VisitorDataStoreOptions, aj as areCommandsEqual, ay as emptyVisitorData, a3 as personalizeVariations, a0 as testVariations } from './types-WXZBuJXL.mjs';
1
+ import { O as OutputSeverity, L as LogDrain, C as ContextPlugin, S as ScoreVector, A as AggregateDimension, T as TransitionDataStore, a as StorageCommands, V as VisitorData, Q as Quirks, b as TransitionDataStoreOptions, D as DecayFunction, c as CriteriaEvaluator, d as StringMatch, e as VariantMatchCriteria, f as LogMessage, g as DevToolsEvents } from './types-CqKOO0nP.mjs';
2
+ export { $ as AggregateDimensionInput, a5 as BehaviorTag, h as CONTEXTUAL_EDITING_TEST_NAME, i as CONTEXTUAL_EDITING_TEST_SELECTED_VARIANT_ID, n as Context, l as ContextEvents, m as ContextInstance, j as ContextOptions, az as ContextState, aA as ContextStateUpdate, J as CriteriaEvaluatorParameters, I as CriteriaEvaluatorResult, ao as DecayOptions, q as DevToolsActions, t as DevToolsDataEvent, r as DevToolsEvent, x as DevToolsForgetEvent, u as DevToolsHelloEvent, s as DevToolsLogEvent, w as DevToolsRawCommandsEvent, p as DevToolsState, o as DevToolsUiVersion, v as DevToolsUpdateEvent, a2 as DimensionMatch, Y as EnrichmentCategory, au as EnrichmentData, ax as EventData, aB as GoalStateUpdate, at as Goals, H as GroupCriteriaEvaluator, ah as IdentifyCommand, F as LogMessageGroup, E as LogMessageSingle, y as LogMessages, G as ManifestInstance, N as ManifestV2, M as MessageCategory, B as MessageFunc, ac as ModifyScoreCommand, ad as ModifySessionScoreCommand, Z as NumberMatch, P as PersonalizationEvent, R as PersonalizationManifest, av as PersonalizeControlVariant, a3 as PersonalizeOptions, aw as PersonalizeVariants, a7 as PersonalizedResult, a6 as PersonalizedVariant, am as SERVER_STATE_ID, al as ServerToClientTransitionState, ae as SetConsentCommand, ai as SetControlGroupCommand, ab as SetGoalCommand, aj as SetPersonalizeVariantControlCommand, af as SetQuirkCommand, ag as SetTestCommand, z as Severity, U as Signal, X as SignalCriteria, W as SignalCriteriaGroup, K as SignalData, aa as StorageCommand, _ as TestDefinition, k as TestEvent, a0 as TestOptions, a9 as TestResult, a8 as TestVariant, as as Tests, an as TransitionDataStoreEvents, ar as VisitorDataStore, aq as VisitorDataStoreEvents, ap as VisitorDataStoreOptions, ak as areCommandsEqual, ay as emptyVisitorData, a4 as personalizeVariations, a1 as testVariations } from './types-CqKOO0nP.mjs';
3
3
  import Cookies from 'js-cookie';
4
4
  import 'mitt';
5
5
 
@@ -27,11 +27,27 @@ type CookieTransitionDataStoreOptions = {
27
27
  * IMPORTANT: If not passed, the transition store will not have any effect during SSR.
28
28
  */
29
29
  serverCookieValue?: string;
30
+ /**
31
+ * @deprecated
32
+ * The value of the quirk cookie during server-side rendering.
33
+ */
34
+ quirkCookieValue?: string;
35
+ /**
36
+ * @deprecated
37
+ * Whether to enable the experimental quirks feature.
38
+ */
39
+ experimental_quirksEnabled?: boolean;
30
40
  /**
31
41
  * The name of the cookie to store client-to-server score information in.
32
42
  * Defaults to UNIFORM_DEFAULT_COOKIE_NAME if not set.
33
43
  */
34
44
  cookieName?: string;
45
+ /**
46
+ * @deprecated
47
+ * The name of the cookie to store quirks in.
48
+ * Defaults to UNIFORM_DEFAULT_QUIRK_COOKIE_NAME if not set.
49
+ */
50
+ quirkCookieName?: string;
35
51
  /**
36
52
  * Attributes to set on the transfer cookie.
37
53
  * Persistence is not necessary, because the data is only used for temporary transition;
@@ -40,20 +56,23 @@ type CookieTransitionDataStoreOptions = {
40
56
  cookieAttributes?: Cookies.CookieAttributes;
41
57
  };
42
58
  declare const UNIFORM_DEFAULT_COOKIE_NAME = "ufvd";
59
+ declare const UNIFORM_DEFAULT_QUIRK_COOKIE_NAME = "ufvdqk";
43
60
  /**
44
61
  * Handles client-to-server score handoff using an encoded cookie with the visitor score vector.
45
62
  * NOTE: forget me is not supported when on the server side.
46
63
  */
47
64
  declare class CookieTransitionDataStore extends TransitionDataStore {
48
65
  #private;
49
- constructor({ serverCookieValue, cookieName, cookieAttributes, }: CookieTransitionDataStoreOptions);
66
+ constructor({ serverCookieValue, experimental_quirksEnabled, quirkCookieValue, quirkCookieName, cookieName, cookieAttributes, }: CookieTransitionDataStoreOptions);
50
67
  handleDelete(): Promise<void>;
51
68
  handleUpdateData(_: StorageCommands[], computedValue: VisitorData): Promise<void>;
52
69
  }
53
70
  declare const TYPE_SEP = "~";
54
71
  declare const PAIR_SEP = "!";
55
72
  declare const KV_SEP = "-";
56
- declare function parseScoreCookie(cookieValue: string | undefined): Partial<VisitorData> | undefined;
73
+ declare const QUIRK_SEP = "!!";
74
+ declare function parseScoreCookie(cookieValue: string | undefined, quirkCookieValue?: string): Partial<VisitorData> | undefined;
75
+ declare function parseQuirkCookie(quirkCookieValue: string): Quirks;
57
76
  declare function parseCookieScores(type: string | undefined): Record<string, string>;
58
77
  declare function parseCookieType(type: string | undefined): Record<string, string>;
59
78
  declare function decodeCookieType(type: Record<string, string>): Record<string, number>;
@@ -62,6 +81,7 @@ declare function serializePersonalizeVariants({ personalizeVariants, }: Pick<Vis
62
81
  declare function decodePersonalizeVariants(data: string | undefined): VisitorData['personalizeVariants'];
63
82
  declare function encodeCookieType(type: Record<string, number>): Record<string, string>;
64
83
  declare function serializeCookieType(type: Record<string, string>): string;
84
+ declare function serializeQuirks(quirks: Quirks): string;
65
85
 
66
86
  type EdgeTransitionDataStoreOptions = TransitionDataStoreOptions & {
67
87
  serverCookieValue?: string;
@@ -178,6 +198,7 @@ type InsightsEndpoint = {
178
198
  };
179
199
  type EnableUniformInsightsOptions = {
180
200
  endpoint: InsightsEndpoint;
201
+ projectId: string;
181
202
  };
182
203
  declare const enableUniformInsights: (options: EnableUniformInsightsOptions) => ContextPlugin;
183
204
 
@@ -189,4 +210,4 @@ type QuickConnectConfig = {
189
210
  declare function serializeQuickConnect(config: QuickConnectConfig): string;
190
211
  declare function parseQuickConnect(serialized: string): Required<QuickConnectConfig>;
191
212
 
192
- export { AggregateDimension, type ConsoleDebugLogDrainOptions, type ContextDevToolOptions, ContextPlugin, CookieTransitionDataStore, type CookieTransitionDataStoreOptions, CriteriaEvaluator, DecayFunction, DevToolsEvents, EdgeNodeTagName, type EdgePersonalizeComponentOptions, type EdgeTestComponentOptions, EdgeTransitionDataStore, type EdgeTransitionDataStoreOptions, type EnableUniformInsightsOptions, KV_SEP, type LinearDecayOptions, LogDrain, LogMessage, OutputSeverity, PAIR_SEP, type QuickConnectConfig, ScoreVector, ScriptType, StorageCommands, StringMatch, TYPE_SEP, TransitionDataStore, TransitionDataStoreOptions, UNIFORM_DEFAULT_COOKIE_NAME, VariantMatchCriteria, VisitorData, computeAggregateDimensions, cookieEvaluator, createConsoleLogDrain, createDebugConsoleLogDrain, createLinearDecay, currentPageEvaluator, decodeCookieType, decodePersonalizeVariants, enableConsoleLogDrain, enableContextDevTools, enableDebugConsoleLogDrain, enableUniformInsights, encodeCookieType, evaluateVariantMatch, eventEvaluator, explainStringMatch, explainStringMatchCriteria, getEnrichmentVectorKey, isStringMatch, pageViewCountDimension, pageViewCountEvaluator, parseCookieScores, parseCookieType, parseQuickConnect, parseScoreCookie, queryStringEvaluator, quirkEvaluator, serializeCookie, serializeCookieType, serializePersonalizeVariants, serializeQuickConnect };
213
+ export { AggregateDimension, type ConsoleDebugLogDrainOptions, type ContextDevToolOptions, ContextPlugin, CookieTransitionDataStore, type CookieTransitionDataStoreOptions, CriteriaEvaluator, DecayFunction, DevToolsEvents, EdgeNodeTagName, type EdgePersonalizeComponentOptions, type EdgeTestComponentOptions, EdgeTransitionDataStore, type EdgeTransitionDataStoreOptions, type EnableUniformInsightsOptions, KV_SEP, type LinearDecayOptions, LogDrain, LogMessage, OutputSeverity, PAIR_SEP, QUIRK_SEP, type QuickConnectConfig, Quirks, ScoreVector, ScriptType, StorageCommands, StringMatch, TYPE_SEP, TransitionDataStore, TransitionDataStoreOptions, UNIFORM_DEFAULT_COOKIE_NAME, UNIFORM_DEFAULT_QUIRK_COOKIE_NAME, VariantMatchCriteria, VisitorData, computeAggregateDimensions, cookieEvaluator, createConsoleLogDrain, createDebugConsoleLogDrain, createLinearDecay, currentPageEvaluator, decodeCookieType, decodePersonalizeVariants, enableConsoleLogDrain, enableContextDevTools, enableDebugConsoleLogDrain, enableUniformInsights, encodeCookieType, evaluateVariantMatch, eventEvaluator, explainStringMatch, explainStringMatchCriteria, getEnrichmentVectorKey, isStringMatch, pageViewCountDimension, pageViewCountEvaluator, parseCookieScores, parseCookieType, parseQuickConnect, parseQuirkCookie, parseScoreCookie, queryStringEvaluator, quirkEvaluator, serializeCookie, serializeCookieType, serializePersonalizeVariants, serializeQuickConnect, serializeQuirks };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { O as OutputSeverity, L as LogDrain, C as ContextPlugin, S as ScoreVector, A as AggregateDimension, T as TransitionDataStore, a as StorageCommands, V as VisitorData, b as TransitionDataStoreOptions, D as DecayFunction, c as CriteriaEvaluator, d as StringMatch, e as VariantMatchCriteria, f as LogMessage, g as DevToolsEvents } from './types-WXZBuJXL.js';
2
- export { _ as AggregateDimensionInput, a4 as BehaviorTag, h as CONTEXTUAL_EDITING_TEST_NAME, i as CONTEXTUAL_EDITING_TEST_SELECTED_VARIANT_ID, n as Context, l as ContextEvents, m as ContextInstance, j as ContextOptions, az as ContextState, aA as ContextStateUpdate, J as CriteriaEvaluatorParameters, I as CriteriaEvaluatorResult, an as DecayOptions, q as DevToolsActions, t as DevToolsDataEvent, r as DevToolsEvent, x as DevToolsForgetEvent, u as DevToolsHelloEvent, s as DevToolsLogEvent, w as DevToolsRawCommandsEvent, p as DevToolsState, o as DevToolsUiVersion, v as DevToolsUpdateEvent, a1 as DimensionMatch, X as EnrichmentCategory, au as EnrichmentData, ax as EventData, aB as GoalStateUpdate, at as Goals, H as GroupCriteriaEvaluator, ag as IdentifyCommand, F as LogMessageGroup, E as LogMessageSingle, y as LogMessages, G as ManifestInstance, N as ManifestV2, M as MessageCategory, B as MessageFunc, ab as ModifyScoreCommand, ac as ModifySessionScoreCommand, Y as NumberMatch, P as PersonalizationEvent, Q as PersonalizationManifest, av as PersonalizeControlVariant, a2 as PersonalizeOptions, aw as PersonalizeVariants, a6 as PersonalizedResult, a5 as PersonalizedVariant, ar as Quirks, al as SERVER_STATE_ID, ak as ServerToClientTransitionState, ad as SetConsentCommand, ah as SetControlGroupCommand, aa as SetGoalCommand, ai as SetPersonalizeVariantControlCommand, ae as SetQuirkCommand, af as SetTestCommand, z as Severity, R as Signal, W as SignalCriteria, U as SignalCriteriaGroup, K as SignalData, a9 as StorageCommand, Z as TestDefinition, k as TestEvent, $ as TestOptions, a8 as TestResult, a7 as TestVariant, as as Tests, am as TransitionDataStoreEvents, aq as VisitorDataStore, ap as VisitorDataStoreEvents, ao as VisitorDataStoreOptions, aj as areCommandsEqual, ay as emptyVisitorData, a3 as personalizeVariations, a0 as testVariations } from './types-WXZBuJXL.js';
1
+ import { O as OutputSeverity, L as LogDrain, C as ContextPlugin, S as ScoreVector, A as AggregateDimension, T as TransitionDataStore, a as StorageCommands, V as VisitorData, Q as Quirks, b as TransitionDataStoreOptions, D as DecayFunction, c as CriteriaEvaluator, d as StringMatch, e as VariantMatchCriteria, f as LogMessage, g as DevToolsEvents } from './types-CqKOO0nP.js';
2
+ export { $ as AggregateDimensionInput, a5 as BehaviorTag, h as CONTEXTUAL_EDITING_TEST_NAME, i as CONTEXTUAL_EDITING_TEST_SELECTED_VARIANT_ID, n as Context, l as ContextEvents, m as ContextInstance, j as ContextOptions, az as ContextState, aA as ContextStateUpdate, J as CriteriaEvaluatorParameters, I as CriteriaEvaluatorResult, ao as DecayOptions, q as DevToolsActions, t as DevToolsDataEvent, r as DevToolsEvent, x as DevToolsForgetEvent, u as DevToolsHelloEvent, s as DevToolsLogEvent, w as DevToolsRawCommandsEvent, p as DevToolsState, o as DevToolsUiVersion, v as DevToolsUpdateEvent, a2 as DimensionMatch, Y as EnrichmentCategory, au as EnrichmentData, ax as EventData, aB as GoalStateUpdate, at as Goals, H as GroupCriteriaEvaluator, ah as IdentifyCommand, F as LogMessageGroup, E as LogMessageSingle, y as LogMessages, G as ManifestInstance, N as ManifestV2, M as MessageCategory, B as MessageFunc, ac as ModifyScoreCommand, ad as ModifySessionScoreCommand, Z as NumberMatch, P as PersonalizationEvent, R as PersonalizationManifest, av as PersonalizeControlVariant, a3 as PersonalizeOptions, aw as PersonalizeVariants, a7 as PersonalizedResult, a6 as PersonalizedVariant, am as SERVER_STATE_ID, al as ServerToClientTransitionState, ae as SetConsentCommand, ai as SetControlGroupCommand, ab as SetGoalCommand, aj as SetPersonalizeVariantControlCommand, af as SetQuirkCommand, ag as SetTestCommand, z as Severity, U as Signal, X as SignalCriteria, W as SignalCriteriaGroup, K as SignalData, aa as StorageCommand, _ as TestDefinition, k as TestEvent, a0 as TestOptions, a9 as TestResult, a8 as TestVariant, as as Tests, an as TransitionDataStoreEvents, ar as VisitorDataStore, aq as VisitorDataStoreEvents, ap as VisitorDataStoreOptions, ak as areCommandsEqual, ay as emptyVisitorData, a4 as personalizeVariations, a1 as testVariations } from './types-CqKOO0nP.js';
3
3
  import Cookies from 'js-cookie';
4
4
  import 'mitt';
5
5
 
@@ -27,11 +27,27 @@ type CookieTransitionDataStoreOptions = {
27
27
  * IMPORTANT: If not passed, the transition store will not have any effect during SSR.
28
28
  */
29
29
  serverCookieValue?: string;
30
+ /**
31
+ * @deprecated
32
+ * The value of the quirk cookie during server-side rendering.
33
+ */
34
+ quirkCookieValue?: string;
35
+ /**
36
+ * @deprecated
37
+ * Whether to enable the experimental quirks feature.
38
+ */
39
+ experimental_quirksEnabled?: boolean;
30
40
  /**
31
41
  * The name of the cookie to store client-to-server score information in.
32
42
  * Defaults to UNIFORM_DEFAULT_COOKIE_NAME if not set.
33
43
  */
34
44
  cookieName?: string;
45
+ /**
46
+ * @deprecated
47
+ * The name of the cookie to store quirks in.
48
+ * Defaults to UNIFORM_DEFAULT_QUIRK_COOKIE_NAME if not set.
49
+ */
50
+ quirkCookieName?: string;
35
51
  /**
36
52
  * Attributes to set on the transfer cookie.
37
53
  * Persistence is not necessary, because the data is only used for temporary transition;
@@ -40,20 +56,23 @@ type CookieTransitionDataStoreOptions = {
40
56
  cookieAttributes?: Cookies.CookieAttributes;
41
57
  };
42
58
  declare const UNIFORM_DEFAULT_COOKIE_NAME = "ufvd";
59
+ declare const UNIFORM_DEFAULT_QUIRK_COOKIE_NAME = "ufvdqk";
43
60
  /**
44
61
  * Handles client-to-server score handoff using an encoded cookie with the visitor score vector.
45
62
  * NOTE: forget me is not supported when on the server side.
46
63
  */
47
64
  declare class CookieTransitionDataStore extends TransitionDataStore {
48
65
  #private;
49
- constructor({ serverCookieValue, cookieName, cookieAttributes, }: CookieTransitionDataStoreOptions);
66
+ constructor({ serverCookieValue, experimental_quirksEnabled, quirkCookieValue, quirkCookieName, cookieName, cookieAttributes, }: CookieTransitionDataStoreOptions);
50
67
  handleDelete(): Promise<void>;
51
68
  handleUpdateData(_: StorageCommands[], computedValue: VisitorData): Promise<void>;
52
69
  }
53
70
  declare const TYPE_SEP = "~";
54
71
  declare const PAIR_SEP = "!";
55
72
  declare const KV_SEP = "-";
56
- declare function parseScoreCookie(cookieValue: string | undefined): Partial<VisitorData> | undefined;
73
+ declare const QUIRK_SEP = "!!";
74
+ declare function parseScoreCookie(cookieValue: string | undefined, quirkCookieValue?: string): Partial<VisitorData> | undefined;
75
+ declare function parseQuirkCookie(quirkCookieValue: string): Quirks;
57
76
  declare function parseCookieScores(type: string | undefined): Record<string, string>;
58
77
  declare function parseCookieType(type: string | undefined): Record<string, string>;
59
78
  declare function decodeCookieType(type: Record<string, string>): Record<string, number>;
@@ -62,6 +81,7 @@ declare function serializePersonalizeVariants({ personalizeVariants, }: Pick<Vis
62
81
  declare function decodePersonalizeVariants(data: string | undefined): VisitorData['personalizeVariants'];
63
82
  declare function encodeCookieType(type: Record<string, number>): Record<string, string>;
64
83
  declare function serializeCookieType(type: Record<string, string>): string;
84
+ declare function serializeQuirks(quirks: Quirks): string;
65
85
 
66
86
  type EdgeTransitionDataStoreOptions = TransitionDataStoreOptions & {
67
87
  serverCookieValue?: string;
@@ -178,6 +198,7 @@ type InsightsEndpoint = {
178
198
  };
179
199
  type EnableUniformInsightsOptions = {
180
200
  endpoint: InsightsEndpoint;
201
+ projectId: string;
181
202
  };
182
203
  declare const enableUniformInsights: (options: EnableUniformInsightsOptions) => ContextPlugin;
183
204
 
@@ -189,4 +210,4 @@ type QuickConnectConfig = {
189
210
  declare function serializeQuickConnect(config: QuickConnectConfig): string;
190
211
  declare function parseQuickConnect(serialized: string): Required<QuickConnectConfig>;
191
212
 
192
- export { AggregateDimension, type ConsoleDebugLogDrainOptions, type ContextDevToolOptions, ContextPlugin, CookieTransitionDataStore, type CookieTransitionDataStoreOptions, CriteriaEvaluator, DecayFunction, DevToolsEvents, EdgeNodeTagName, type EdgePersonalizeComponentOptions, type EdgeTestComponentOptions, EdgeTransitionDataStore, type EdgeTransitionDataStoreOptions, type EnableUniformInsightsOptions, KV_SEP, type LinearDecayOptions, LogDrain, LogMessage, OutputSeverity, PAIR_SEP, type QuickConnectConfig, ScoreVector, ScriptType, StorageCommands, StringMatch, TYPE_SEP, TransitionDataStore, TransitionDataStoreOptions, UNIFORM_DEFAULT_COOKIE_NAME, VariantMatchCriteria, VisitorData, computeAggregateDimensions, cookieEvaluator, createConsoleLogDrain, createDebugConsoleLogDrain, createLinearDecay, currentPageEvaluator, decodeCookieType, decodePersonalizeVariants, enableConsoleLogDrain, enableContextDevTools, enableDebugConsoleLogDrain, enableUniformInsights, encodeCookieType, evaluateVariantMatch, eventEvaluator, explainStringMatch, explainStringMatchCriteria, getEnrichmentVectorKey, isStringMatch, pageViewCountDimension, pageViewCountEvaluator, parseCookieScores, parseCookieType, parseQuickConnect, parseScoreCookie, queryStringEvaluator, quirkEvaluator, serializeCookie, serializeCookieType, serializePersonalizeVariants, serializeQuickConnect };
213
+ export { AggregateDimension, type ConsoleDebugLogDrainOptions, type ContextDevToolOptions, ContextPlugin, CookieTransitionDataStore, type CookieTransitionDataStoreOptions, CriteriaEvaluator, DecayFunction, DevToolsEvents, EdgeNodeTagName, type EdgePersonalizeComponentOptions, type EdgeTestComponentOptions, EdgeTransitionDataStore, type EdgeTransitionDataStoreOptions, type EnableUniformInsightsOptions, KV_SEP, type LinearDecayOptions, LogDrain, LogMessage, OutputSeverity, PAIR_SEP, QUIRK_SEP, type QuickConnectConfig, Quirks, ScoreVector, ScriptType, StorageCommands, StringMatch, TYPE_SEP, TransitionDataStore, TransitionDataStoreOptions, UNIFORM_DEFAULT_COOKIE_NAME, UNIFORM_DEFAULT_QUIRK_COOKIE_NAME, VariantMatchCriteria, VisitorData, computeAggregateDimensions, cookieEvaluator, createConsoleLogDrain, createDebugConsoleLogDrain, createLinearDecay, currentPageEvaluator, decodeCookieType, decodePersonalizeVariants, enableConsoleLogDrain, enableContextDevTools, enableDebugConsoleLogDrain, enableUniformInsights, encodeCookieType, evaluateVariantMatch, eventEvaluator, explainStringMatch, explainStringMatchCriteria, getEnrichmentVectorKey, isStringMatch, pageViewCountDimension, pageViewCountEvaluator, parseCookieScores, parseCookieType, parseQuickConnect, parseQuirkCookie, parseScoreCookie, queryStringEvaluator, quirkEvaluator, serializeCookie, serializeCookieType, serializePersonalizeVariants, serializeQuickConnect, serializeQuirks };
package/dist/index.esm.js CHANGED
@@ -453,7 +453,7 @@ var quirkEvaluator = ({ update, criteria, signal, onLogMessage }) => {
453
453
  const visitorValue = update.visitor.quirks[criteria.key];
454
454
  const updateValue = (_a = update.state.quirks) == null ? void 0 : _a[criteria.key];
455
455
  const value = updateValue != null ? updateValue : visitorValue;
456
- const changed = Boolean(updateValue && visitorValue !== updateValue);
456
+ const changed = Boolean(updateValue !== void 0 && visitorValue !== updateValue);
457
457
  const result = isStringMatch(value, criteria.match);
458
458
  const finalResult = { result, changed };
459
459
  onLogMessage == null ? void 0 : onLogMessage([
@@ -653,9 +653,11 @@ function personalizeVariations({
653
653
  try {
654
654
  const variantMatches = [];
655
655
  const defaultVariants = [];
656
+ const needsConsent = context.requireConsentForPersonalization;
657
+ const canEvaluate = !needsConsent || context.storage.data.consent;
656
658
  for (const variant of variations) {
657
659
  if ((_a = variant.pz) == null ? void 0 : _a.crit.length) {
658
- if (variantMatches.length !== take && evaluateVariantMatch(variant.id, variant.pz, context.scores, onLogMessage)) {
660
+ if (canEvaluate && variantMatches.length !== take && evaluateVariantMatch(variant.id, variant.pz, context.scores, onLogMessage)) {
659
661
  variantMatches.push(variant);
660
662
  }
661
663
  } else {
@@ -917,20 +919,28 @@ var bton = (base64) => {
917
919
  // src/storage/CookieTransitionDataStore.ts
918
920
  var ssr = typeof document === "undefined";
919
921
  var UNIFORM_DEFAULT_COOKIE_NAME = "ufvd";
920
- var _cookieName, _cookieAttributes;
922
+ var UNIFORM_DEFAULT_QUIRK_COOKIE_NAME = `ufvdqk`;
923
+ var _cookieName, _quirkCookieName, _cookieAttributes, _quirksEnabled;
921
924
  var CookieTransitionDataStore = class extends TransitionDataStore {
922
925
  constructor({
923
926
  serverCookieValue,
927
+ experimental_quirksEnabled,
928
+ quirkCookieValue,
929
+ quirkCookieName = UNIFORM_DEFAULT_QUIRK_COOKIE_NAME,
924
930
  cookieName = UNIFORM_DEFAULT_COOKIE_NAME,
925
931
  cookieAttributes = { sameSite: "lax" }
926
932
  }) {
927
933
  super({
928
- initialData: ssr ? parseScoreCookie(serverCookieValue) : void 0
934
+ initialData: ssr ? parseScoreCookie(serverCookieValue, experimental_quirksEnabled ? quirkCookieValue : void 0) : void 0
929
935
  });
930
936
  __privateAdd(this, _cookieName);
937
+ __privateAdd(this, _quirkCookieName);
931
938
  __privateAdd(this, _cookieAttributes);
939
+ __privateAdd(this, _quirksEnabled);
932
940
  __privateSet(this, _cookieName, cookieName);
933
941
  __privateSet(this, _cookieAttributes, cookieAttributes);
942
+ __privateSet(this, _quirkCookieName, quirkCookieName);
943
+ __privateSet(this, _quirksEnabled, experimental_quirksEnabled || false);
934
944
  }
935
945
  handleDelete() {
936
946
  if (ssr) return Promise.resolve();
@@ -941,17 +951,27 @@ var CookieTransitionDataStore = class extends TransitionDataStore {
941
951
  if (ssr) return;
942
952
  if (computedValue.consent) {
943
953
  Cookies.set(__privateGet(this, _cookieName), serializeCookie(computedValue), __privateGet(this, _cookieAttributes));
954
+ if (__privateGet(this, _quirksEnabled) && Object.keys(computedValue.quirks || {}).length) {
955
+ const quirkCookieValue = serializeQuirks(computedValue.quirks || {});
956
+ Cookies.set(__privateGet(this, _quirkCookieName), quirkCookieValue, __privateGet(this, _cookieAttributes));
957
+ }
944
958
  } else {
945
959
  Cookies.remove(__privateGet(this, _cookieName));
960
+ if (__privateGet(this, _quirksEnabled)) {
961
+ Cookies.remove(__privateGet(this, _quirkCookieName));
962
+ }
946
963
  }
947
964
  }
948
965
  };
949
966
  _cookieName = new WeakMap();
967
+ _quirkCookieName = new WeakMap();
950
968
  _cookieAttributes = new WeakMap();
969
+ _quirksEnabled = new WeakMap();
951
970
  var TYPE_SEP = "~";
952
971
  var PAIR_SEP = "!";
953
972
  var KV_SEP = "-";
954
- function parseScoreCookie(cookieValue) {
973
+ var QUIRK_SEP = "!!";
974
+ function parseScoreCookie(cookieValue, quirkCookieValue) {
955
975
  if (!cookieValue) return;
956
976
  const types = cookieValue.split(TYPE_SEP);
957
977
  if (types.length > 5) return;
@@ -965,8 +985,30 @@ function parseScoreCookie(cookieValue) {
965
985
  controlGroup: controlGroup === "1",
966
986
  personalizeVariants: decodePersonalizeVariants(personalizeVariants)
967
987
  };
988
+ if (quirkCookieValue) {
989
+ data.quirks = parseQuirkCookie(quirkCookieValue);
990
+ }
968
991
  return data;
969
992
  }
993
+ function parseQuirkCookie(quirkCookieValue) {
994
+ const pairs = quirkCookieValue.split(QUIRK_SEP);
995
+ const splitPairs = pairs.map((pair) => {
996
+ const sep = pair.indexOf(KV_SEP);
997
+ if (sep === -1) {
998
+ return void 0;
999
+ }
1000
+ return [pair.slice(0, sep), pair.slice(sep + 1)];
1001
+ });
1002
+ const areAllPairsValid = splitPairs.every((pair) => pair !== void 0);
1003
+ if (!areAllPairsValid) {
1004
+ return {};
1005
+ }
1006
+ return splitPairs.reduce((acc, cur) => {
1007
+ const [key, value] = cur;
1008
+ acc[key] = value;
1009
+ return acc;
1010
+ }, {});
1011
+ }
970
1012
  function parseCookieScores(type) {
971
1013
  if (!type) {
972
1014
  return {};
@@ -1051,6 +1093,9 @@ function encodeCookieType(type) {
1051
1093
  function serializeCookieType(type) {
1052
1094
  return Object.entries(type).map((kv) => kv.join(KV_SEP)).join(PAIR_SEP);
1053
1095
  }
1096
+ function serializeQuirks(quirks) {
1097
+ return Object.entries(quirks).map((kv) => kv.join(KV_SEP)).join(QUIRK_SEP);
1098
+ }
1054
1099
 
1055
1100
  // src/storage/EdgeTransitionDataStore.ts
1056
1101
  var _EdgeTransitionDataStore_instances, fetchData_fn;
@@ -1213,7 +1258,8 @@ var LocalStorage = class {
1213
1258
  this.partitionKey = partitionKey;
1214
1259
  __privateAdd(this, _LocalStorage_instances);
1215
1260
  __publicField(this, "inMemoryFallback", {});
1216
- __publicField(this, "hasLocalStorageObject", typeof localStorage !== "undefined");
1261
+ // deno implements localStorage in netlify edge workers, must also check if document is present.
1262
+ __publicField(this, "hasLocalStorageObject", typeof document !== "undefined" && typeof localStorage !== "undefined");
1217
1263
  }
1218
1264
  get(key) {
1219
1265
  const keyValue = __privateMethod(this, _LocalStorage_instances, key_fn).call(this, key);
@@ -1467,7 +1513,7 @@ import { dequal as dequal5 } from "dequal/lite";
1467
1513
  import mitt3 from "mitt";
1468
1514
  var CONTEXTUAL_EDITING_TEST_NAME = "contextual_editing_test";
1469
1515
  var CONTEXTUAL_EDITING_TEST_SELECTED_VARIANT_ID = "contextual_editing_test_selected_variant";
1470
- var _serverTransitionState, _scores, _state, _pzCache, _plugins, _commands, _mitt3, _Context_instances, emitTest_fn, updateGoals_fn, updateComputedScores_fn, calculateScores_fn;
1516
+ var _serverTransitionState, _scores, _state, _pzCache, _plugins, _commands, _requireConsentForPersonalization, _mitt3, _Context_instances, emitTest_fn, updateGoals_fn, updateComputedScores_fn, calculateScores_fn;
1471
1517
  var Context = class {
1472
1518
  constructor(options) {
1473
1519
  __privateAdd(this, _Context_instances);
@@ -1478,6 +1524,7 @@ var Context = class {
1478
1524
  __privateAdd(this, _pzCache, {});
1479
1525
  __privateAdd(this, _plugins);
1480
1526
  __privateAdd(this, _commands);
1527
+ __privateAdd(this, _requireConsentForPersonalization);
1481
1528
  __privateAdd(this, _mitt3, mitt3());
1482
1529
  /**
1483
1530
  * Subscribe to events
@@ -1491,6 +1538,7 @@ var Context = class {
1491
1538
  const { manifest, ...storageOptions } = options;
1492
1539
  __privateSet(this, _state, {});
1493
1540
  __privateSet(this, _plugins, options.plugins);
1541
+ __privateSet(this, _requireConsentForPersonalization, options.requireConsentForPersonalization);
1494
1542
  if (typeof options.transitionStore !== "undefined") {
1495
1543
  __privateSet(this, _commands, []);
1496
1544
  }
@@ -1567,6 +1615,9 @@ var Context = class {
1567
1615
  var _a, _b;
1568
1616
  return (_b = (_a = __privateGet(this, _serverTransitionState)) == null ? void 0 : _a.quirks) != null ? _b : this.storage.data.quirks;
1569
1617
  }
1618
+ get requireConsentForPersonalization() {
1619
+ return __privateGet(this, _requireConsentForPersonalization);
1620
+ }
1570
1621
  /**
1571
1622
  * Updates the Context with new data of any sort, such as
1572
1623
  * new URLs, cookies, quirks, and enrichments.
@@ -1684,7 +1735,11 @@ var Context = class {
1684
1735
  variantAssigned: true
1685
1736
  });
1686
1737
  });
1738
+ const haveQuirksChanged = __privateGet(this, _serverTransitionState) && !dequal5(__privateGet(this, _serverTransitionState).quirks, this.storage.data.quirks);
1687
1739
  __privateSet(this, _serverTransitionState, void 0);
1740
+ if (haveQuirksChanged) {
1741
+ __privateGet(this, _mitt3).emit("quirksUpdated", this.storage.data.quirks);
1742
+ }
1688
1743
  __privateGet(this, _mitt3).emit("log", ["debug", 131]);
1689
1744
  }
1690
1745
  if (__privateGet(this, _plugins)) {
@@ -1761,9 +1816,7 @@ var Context = class {
1761
1816
  test(options) {
1762
1817
  var _a, _b, _c;
1763
1818
  if (options.name === CONTEXTUAL_EDITING_TEST_NAME) {
1764
- const selectedVariant = (_a = options.variations.find((variant) => {
1765
- variant.id === CONTEXTUAL_EDITING_TEST_SELECTED_VARIANT_ID;
1766
- })) != null ? _a : options.variations.at(-1);
1819
+ const selectedVariant = (_a = options.variations.find((variant) => variant.id === CONTEXTUAL_EDITING_TEST_SELECTED_VARIANT_ID)) != null ? _a : options.variations.at(-1);
1767
1820
  const value2 = {
1768
1821
  result: selectedVariant,
1769
1822
  variantAssigned: false
@@ -1864,6 +1917,7 @@ _state = new WeakMap();
1864
1917
  _pzCache = new WeakMap();
1865
1918
  _plugins = new WeakMap();
1866
1919
  _commands = new WeakMap();
1920
+ _requireConsentForPersonalization = new WeakMap();
1867
1921
  _mitt3 = new WeakMap();
1868
1922
  _Context_instances = new WeakSet();
1869
1923
  emitTest_fn = function(event) {
@@ -2033,7 +2087,10 @@ var getBasePayload = () => {
2033
2087
  href: window.location.href
2034
2088
  };
2035
2089
  };
2036
- var createInsightsClient = ({ endpoint }) => {
2090
+ var createInsightsClient = ({
2091
+ endpoint,
2092
+ projectId
2093
+ }) => {
2037
2094
  let endpointUrl;
2038
2095
  const apiKey = endpoint.apiKey;
2039
2096
  if (endpoint.type === "api") {
@@ -2075,6 +2132,7 @@ var createInsightsClient = ({ endpoint }) => {
2075
2132
  visitor_id: options.visitorId,
2076
2133
  page_view_id: options.pageId,
2077
2134
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
2135
+ project_id: projectId,
2078
2136
  payload: {
2079
2137
  ...getBasePayload(),
2080
2138
  previous_session_id: options.previousSessionId
@@ -2090,6 +2148,7 @@ var createInsightsClient = ({ endpoint }) => {
2090
2148
  visitor_id: options.visitorId,
2091
2149
  page_view_id: options.pageId,
2092
2150
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
2151
+ project_id: projectId,
2093
2152
  payload: getBasePayload()
2094
2153
  };
2095
2154
  return sendMessage(message);
@@ -2102,6 +2161,7 @@ var createInsightsClient = ({ endpoint }) => {
2102
2161
  visitor_id: options.visitorId,
2103
2162
  page_view_id: options.pageId,
2104
2163
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
2164
+ project_id: projectId,
2105
2165
  payload: {
2106
2166
  ...getBasePayload(),
2107
2167
  ...options
@@ -2118,6 +2178,7 @@ var createInsightsClient = ({ endpoint }) => {
2118
2178
  visitor_id: options.visitorId,
2119
2179
  page_view_id: options.pageId,
2120
2180
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
2181
+ project_id: projectId,
2121
2182
  payload: {
2122
2183
  ...getBasePayload(),
2123
2184
  name: options.name,
@@ -2138,6 +2199,7 @@ var createInsightsClient = ({ endpoint }) => {
2138
2199
  visitor_id: options.visitorId,
2139
2200
  page_view_id: options.pageId,
2140
2201
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
2202
+ project_id: projectId,
2141
2203
  payload: {
2142
2204
  ...getBasePayload(),
2143
2205
  goalId: options.goalId
@@ -2153,6 +2215,7 @@ var createInsightsClient = ({ endpoint }) => {
2153
2215
  visitor_id: options.visitorId,
2154
2216
  page_view_id: options.pageId,
2155
2217
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
2218
+ project_id: projectId,
2156
2219
  payload: {
2157
2220
  ...getBasePayload(),
2158
2221
  scores: options.scores
@@ -2195,10 +2258,12 @@ var generatePageId = () => {
2195
2258
  };
2196
2259
  var createInsights = ({
2197
2260
  endpoint,
2261
+ projectId,
2198
2262
  sessionDurationSeconds = 30 * 60
2199
2263
  }) => {
2200
2264
  const client = createInsightsClient({
2201
- endpoint
2265
+ endpoint,
2266
+ projectId
2202
2267
  });
2203
2268
  const storage = createInsightsStorage();
2204
2269
  let storageData = void 0;
@@ -2243,7 +2308,6 @@ var createInsights = ({
2243
2308
  },
2244
2309
  testResult: (result) => {
2245
2310
  if (!storageData) {
2246
- console.error("Insights not initialized");
2247
2311
  return;
2248
2312
  }
2249
2313
  client.testResult({
@@ -2297,7 +2361,8 @@ var createInsights = ({
2297
2361
  };
2298
2362
  var enableUniformInsights = (options) => {
2299
2363
  const insights = createInsights({
2300
- endpoint: options.endpoint
2364
+ endpoint: options.endpoint,
2365
+ projectId: options.projectId
2301
2366
  });
2302
2367
  let previousUrl = void 0;
2303
2368
  return {
@@ -2547,11 +2612,13 @@ export {
2547
2612
  KV_SEP,
2548
2613
  ManifestInstance,
2549
2614
  PAIR_SEP,
2615
+ QUIRK_SEP,
2550
2616
  SERVER_STATE_ID,
2551
2617
  ScriptType,
2552
2618
  TYPE_SEP,
2553
2619
  TransitionDataStore,
2554
2620
  UNIFORM_DEFAULT_COOKIE_NAME,
2621
+ UNIFORM_DEFAULT_QUIRK_COOKIE_NAME,
2555
2622
  VisitorDataStore,
2556
2623
  areCommandsEqual,
2557
2624
  computeAggregateDimensions,
@@ -2579,6 +2646,7 @@ export {
2579
2646
  parseCookieScores,
2580
2647
  parseCookieType,
2581
2648
  parseQuickConnect,
2649
+ parseQuirkCookie,
2582
2650
  parseScoreCookie,
2583
2651
  personalizeVariations,
2584
2652
  queryStringEvaluator,
@@ -2587,5 +2655,6 @@ export {
2587
2655
  serializeCookieType,
2588
2656
  serializePersonalizeVariants,
2589
2657
  serializeQuickConnect,
2658
+ serializeQuirks,
2590
2659
  testVariations
2591
2660
  };
package/dist/index.js CHANGED
@@ -50,11 +50,13 @@ __export(src_exports, {
50
50
  KV_SEP: () => KV_SEP,
51
51
  ManifestInstance: () => ManifestInstance,
52
52
  PAIR_SEP: () => PAIR_SEP,
53
+ QUIRK_SEP: () => QUIRK_SEP,
53
54
  SERVER_STATE_ID: () => SERVER_STATE_ID,
54
55
  ScriptType: () => ScriptType,
55
56
  TYPE_SEP: () => TYPE_SEP,
56
57
  TransitionDataStore: () => TransitionDataStore,
57
58
  UNIFORM_DEFAULT_COOKIE_NAME: () => UNIFORM_DEFAULT_COOKIE_NAME,
59
+ UNIFORM_DEFAULT_QUIRK_COOKIE_NAME: () => UNIFORM_DEFAULT_QUIRK_COOKIE_NAME,
58
60
  VisitorDataStore: () => VisitorDataStore,
59
61
  areCommandsEqual: () => areCommandsEqual,
60
62
  computeAggregateDimensions: () => computeAggregateDimensions,
@@ -82,6 +84,7 @@ __export(src_exports, {
82
84
  parseCookieScores: () => parseCookieScores,
83
85
  parseCookieType: () => parseCookieType,
84
86
  parseQuickConnect: () => parseQuickConnect,
87
+ parseQuirkCookie: () => parseQuirkCookie,
85
88
  parseScoreCookie: () => parseScoreCookie,
86
89
  personalizeVariations: () => personalizeVariations,
87
90
  queryStringEvaluator: () => queryStringEvaluator,
@@ -90,6 +93,7 @@ __export(src_exports, {
90
93
  serializeCookieType: () => serializeCookieType,
91
94
  serializePersonalizeVariants: () => serializePersonalizeVariants,
92
95
  serializeQuickConnect: () => serializeQuickConnect,
96
+ serializeQuirks: () => serializeQuirks,
93
97
  testVariations: () => testVariations
94
98
  });
95
99
  module.exports = __toCommonJS(src_exports);
@@ -537,7 +541,7 @@ var quirkEvaluator = ({ update, criteria, signal, onLogMessage }) => {
537
541
  const visitorValue = update.visitor.quirks[criteria.key];
538
542
  const updateValue = (_a = update.state.quirks) == null ? void 0 : _a[criteria.key];
539
543
  const value = updateValue != null ? updateValue : visitorValue;
540
- const changed = Boolean(updateValue && visitorValue !== updateValue);
544
+ const changed = Boolean(updateValue !== void 0 && visitorValue !== updateValue);
541
545
  const result = isStringMatch(value, criteria.match);
542
546
  const finalResult = { result, changed };
543
547
  onLogMessage == null ? void 0 : onLogMessage([
@@ -737,9 +741,11 @@ function personalizeVariations({
737
741
  try {
738
742
  const variantMatches = [];
739
743
  const defaultVariants = [];
744
+ const needsConsent = context.requireConsentForPersonalization;
745
+ const canEvaluate = !needsConsent || context.storage.data.consent;
740
746
  for (const variant of variations) {
741
747
  if ((_a = variant.pz) == null ? void 0 : _a.crit.length) {
742
- if (variantMatches.length !== take && evaluateVariantMatch(variant.id, variant.pz, context.scores, onLogMessage)) {
748
+ if (canEvaluate && variantMatches.length !== take && evaluateVariantMatch(variant.id, variant.pz, context.scores, onLogMessage)) {
743
749
  variantMatches.push(variant);
744
750
  }
745
751
  } else {
@@ -1001,20 +1007,28 @@ var bton = (base64) => {
1001
1007
  // src/storage/CookieTransitionDataStore.ts
1002
1008
  var ssr = typeof document === "undefined";
1003
1009
  var UNIFORM_DEFAULT_COOKIE_NAME = "ufvd";
1004
- var _cookieName, _cookieAttributes;
1010
+ var UNIFORM_DEFAULT_QUIRK_COOKIE_NAME = `ufvdqk`;
1011
+ var _cookieName, _quirkCookieName, _cookieAttributes, _quirksEnabled;
1005
1012
  var CookieTransitionDataStore = class extends TransitionDataStore {
1006
1013
  constructor({
1007
1014
  serverCookieValue,
1015
+ experimental_quirksEnabled,
1016
+ quirkCookieValue,
1017
+ quirkCookieName = UNIFORM_DEFAULT_QUIRK_COOKIE_NAME,
1008
1018
  cookieName = UNIFORM_DEFAULT_COOKIE_NAME,
1009
1019
  cookieAttributes = { sameSite: "lax" }
1010
1020
  }) {
1011
1021
  super({
1012
- initialData: ssr ? parseScoreCookie(serverCookieValue) : void 0
1022
+ initialData: ssr ? parseScoreCookie(serverCookieValue, experimental_quirksEnabled ? quirkCookieValue : void 0) : void 0
1013
1023
  });
1014
1024
  __privateAdd(this, _cookieName);
1025
+ __privateAdd(this, _quirkCookieName);
1015
1026
  __privateAdd(this, _cookieAttributes);
1027
+ __privateAdd(this, _quirksEnabled);
1016
1028
  __privateSet(this, _cookieName, cookieName);
1017
1029
  __privateSet(this, _cookieAttributes, cookieAttributes);
1030
+ __privateSet(this, _quirkCookieName, quirkCookieName);
1031
+ __privateSet(this, _quirksEnabled, experimental_quirksEnabled || false);
1018
1032
  }
1019
1033
  handleDelete() {
1020
1034
  if (ssr) return Promise.resolve();
@@ -1025,17 +1039,27 @@ var CookieTransitionDataStore = class extends TransitionDataStore {
1025
1039
  if (ssr) return;
1026
1040
  if (computedValue.consent) {
1027
1041
  import_js_cookie.default.set(__privateGet(this, _cookieName), serializeCookie(computedValue), __privateGet(this, _cookieAttributes));
1042
+ if (__privateGet(this, _quirksEnabled) && Object.keys(computedValue.quirks || {}).length) {
1043
+ const quirkCookieValue = serializeQuirks(computedValue.quirks || {});
1044
+ import_js_cookie.default.set(__privateGet(this, _quirkCookieName), quirkCookieValue, __privateGet(this, _cookieAttributes));
1045
+ }
1028
1046
  } else {
1029
1047
  import_js_cookie.default.remove(__privateGet(this, _cookieName));
1048
+ if (__privateGet(this, _quirksEnabled)) {
1049
+ import_js_cookie.default.remove(__privateGet(this, _quirkCookieName));
1050
+ }
1030
1051
  }
1031
1052
  }
1032
1053
  };
1033
1054
  _cookieName = new WeakMap();
1055
+ _quirkCookieName = new WeakMap();
1034
1056
  _cookieAttributes = new WeakMap();
1057
+ _quirksEnabled = new WeakMap();
1035
1058
  var TYPE_SEP = "~";
1036
1059
  var PAIR_SEP = "!";
1037
1060
  var KV_SEP = "-";
1038
- function parseScoreCookie(cookieValue) {
1061
+ var QUIRK_SEP = "!!";
1062
+ function parseScoreCookie(cookieValue, quirkCookieValue) {
1039
1063
  if (!cookieValue) return;
1040
1064
  const types = cookieValue.split(TYPE_SEP);
1041
1065
  if (types.length > 5) return;
@@ -1049,8 +1073,30 @@ function parseScoreCookie(cookieValue) {
1049
1073
  controlGroup: controlGroup === "1",
1050
1074
  personalizeVariants: decodePersonalizeVariants(personalizeVariants)
1051
1075
  };
1076
+ if (quirkCookieValue) {
1077
+ data.quirks = parseQuirkCookie(quirkCookieValue);
1078
+ }
1052
1079
  return data;
1053
1080
  }
1081
+ function parseQuirkCookie(quirkCookieValue) {
1082
+ const pairs = quirkCookieValue.split(QUIRK_SEP);
1083
+ const splitPairs = pairs.map((pair) => {
1084
+ const sep = pair.indexOf(KV_SEP);
1085
+ if (sep === -1) {
1086
+ return void 0;
1087
+ }
1088
+ return [pair.slice(0, sep), pair.slice(sep + 1)];
1089
+ });
1090
+ const areAllPairsValid = splitPairs.every((pair) => pair !== void 0);
1091
+ if (!areAllPairsValid) {
1092
+ return {};
1093
+ }
1094
+ return splitPairs.reduce((acc, cur) => {
1095
+ const [key, value] = cur;
1096
+ acc[key] = value;
1097
+ return acc;
1098
+ }, {});
1099
+ }
1054
1100
  function parseCookieScores(type) {
1055
1101
  if (!type) {
1056
1102
  return {};
@@ -1135,6 +1181,9 @@ function encodeCookieType(type) {
1135
1181
  function serializeCookieType(type) {
1136
1182
  return Object.entries(type).map((kv) => kv.join(KV_SEP)).join(PAIR_SEP);
1137
1183
  }
1184
+ function serializeQuirks(quirks) {
1185
+ return Object.entries(quirks).map((kv) => kv.join(KV_SEP)).join(QUIRK_SEP);
1186
+ }
1138
1187
 
1139
1188
  // src/storage/EdgeTransitionDataStore.ts
1140
1189
  var _EdgeTransitionDataStore_instances, fetchData_fn;
@@ -1297,7 +1346,8 @@ var LocalStorage = class {
1297
1346
  this.partitionKey = partitionKey;
1298
1347
  __privateAdd(this, _LocalStorage_instances);
1299
1348
  __publicField(this, "inMemoryFallback", {});
1300
- __publicField(this, "hasLocalStorageObject", typeof localStorage !== "undefined");
1349
+ // deno implements localStorage in netlify edge workers, must also check if document is present.
1350
+ __publicField(this, "hasLocalStorageObject", typeof document !== "undefined" && typeof localStorage !== "undefined");
1301
1351
  }
1302
1352
  get(key) {
1303
1353
  const keyValue = __privateMethod(this, _LocalStorage_instances, key_fn).call(this, key);
@@ -1551,7 +1601,7 @@ var import_lite5 = require("dequal/lite");
1551
1601
  var import_mitt3 = __toESM(require("mitt"));
1552
1602
  var CONTEXTUAL_EDITING_TEST_NAME = "contextual_editing_test";
1553
1603
  var CONTEXTUAL_EDITING_TEST_SELECTED_VARIANT_ID = "contextual_editing_test_selected_variant";
1554
- var _serverTransitionState, _scores, _state, _pzCache, _plugins, _commands, _mitt3, _Context_instances, emitTest_fn, updateGoals_fn, updateComputedScores_fn, calculateScores_fn;
1604
+ var _serverTransitionState, _scores, _state, _pzCache, _plugins, _commands, _requireConsentForPersonalization, _mitt3, _Context_instances, emitTest_fn, updateGoals_fn, updateComputedScores_fn, calculateScores_fn;
1555
1605
  var Context = class {
1556
1606
  constructor(options) {
1557
1607
  __privateAdd(this, _Context_instances);
@@ -1562,6 +1612,7 @@ var Context = class {
1562
1612
  __privateAdd(this, _pzCache, {});
1563
1613
  __privateAdd(this, _plugins);
1564
1614
  __privateAdd(this, _commands);
1615
+ __privateAdd(this, _requireConsentForPersonalization);
1565
1616
  __privateAdd(this, _mitt3, (0, import_mitt3.default)());
1566
1617
  /**
1567
1618
  * Subscribe to events
@@ -1575,6 +1626,7 @@ var Context = class {
1575
1626
  const { manifest, ...storageOptions } = options;
1576
1627
  __privateSet(this, _state, {});
1577
1628
  __privateSet(this, _plugins, options.plugins);
1629
+ __privateSet(this, _requireConsentForPersonalization, options.requireConsentForPersonalization);
1578
1630
  if (typeof options.transitionStore !== "undefined") {
1579
1631
  __privateSet(this, _commands, []);
1580
1632
  }
@@ -1651,6 +1703,9 @@ var Context = class {
1651
1703
  var _a, _b;
1652
1704
  return (_b = (_a = __privateGet(this, _serverTransitionState)) == null ? void 0 : _a.quirks) != null ? _b : this.storage.data.quirks;
1653
1705
  }
1706
+ get requireConsentForPersonalization() {
1707
+ return __privateGet(this, _requireConsentForPersonalization);
1708
+ }
1654
1709
  /**
1655
1710
  * Updates the Context with new data of any sort, such as
1656
1711
  * new URLs, cookies, quirks, and enrichments.
@@ -1768,7 +1823,11 @@ var Context = class {
1768
1823
  variantAssigned: true
1769
1824
  });
1770
1825
  });
1826
+ const haveQuirksChanged = __privateGet(this, _serverTransitionState) && !(0, import_lite5.dequal)(__privateGet(this, _serverTransitionState).quirks, this.storage.data.quirks);
1771
1827
  __privateSet(this, _serverTransitionState, void 0);
1828
+ if (haveQuirksChanged) {
1829
+ __privateGet(this, _mitt3).emit("quirksUpdated", this.storage.data.quirks);
1830
+ }
1772
1831
  __privateGet(this, _mitt3).emit("log", ["debug", 131]);
1773
1832
  }
1774
1833
  if (__privateGet(this, _plugins)) {
@@ -1845,9 +1904,7 @@ var Context = class {
1845
1904
  test(options) {
1846
1905
  var _a, _b, _c;
1847
1906
  if (options.name === CONTEXTUAL_EDITING_TEST_NAME) {
1848
- const selectedVariant = (_a = options.variations.find((variant) => {
1849
- variant.id === CONTEXTUAL_EDITING_TEST_SELECTED_VARIANT_ID;
1850
- })) != null ? _a : options.variations.at(-1);
1907
+ const selectedVariant = (_a = options.variations.find((variant) => variant.id === CONTEXTUAL_EDITING_TEST_SELECTED_VARIANT_ID)) != null ? _a : options.variations.at(-1);
1851
1908
  const value2 = {
1852
1909
  result: selectedVariant,
1853
1910
  variantAssigned: false
@@ -1948,6 +2005,7 @@ _state = new WeakMap();
1948
2005
  _pzCache = new WeakMap();
1949
2006
  _plugins = new WeakMap();
1950
2007
  _commands = new WeakMap();
2008
+ _requireConsentForPersonalization = new WeakMap();
1951
2009
  _mitt3 = new WeakMap();
1952
2010
  _Context_instances = new WeakSet();
1953
2011
  emitTest_fn = function(event) {
@@ -2117,7 +2175,10 @@ var getBasePayload = () => {
2117
2175
  href: window.location.href
2118
2176
  };
2119
2177
  };
2120
- var createInsightsClient = ({ endpoint }) => {
2178
+ var createInsightsClient = ({
2179
+ endpoint,
2180
+ projectId
2181
+ }) => {
2121
2182
  let endpointUrl;
2122
2183
  const apiKey = endpoint.apiKey;
2123
2184
  if (endpoint.type === "api") {
@@ -2159,6 +2220,7 @@ var createInsightsClient = ({ endpoint }) => {
2159
2220
  visitor_id: options.visitorId,
2160
2221
  page_view_id: options.pageId,
2161
2222
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
2223
+ project_id: projectId,
2162
2224
  payload: {
2163
2225
  ...getBasePayload(),
2164
2226
  previous_session_id: options.previousSessionId
@@ -2174,6 +2236,7 @@ var createInsightsClient = ({ endpoint }) => {
2174
2236
  visitor_id: options.visitorId,
2175
2237
  page_view_id: options.pageId,
2176
2238
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
2239
+ project_id: projectId,
2177
2240
  payload: getBasePayload()
2178
2241
  };
2179
2242
  return sendMessage(message);
@@ -2186,6 +2249,7 @@ var createInsightsClient = ({ endpoint }) => {
2186
2249
  visitor_id: options.visitorId,
2187
2250
  page_view_id: options.pageId,
2188
2251
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
2252
+ project_id: projectId,
2189
2253
  payload: {
2190
2254
  ...getBasePayload(),
2191
2255
  ...options
@@ -2202,6 +2266,7 @@ var createInsightsClient = ({ endpoint }) => {
2202
2266
  visitor_id: options.visitorId,
2203
2267
  page_view_id: options.pageId,
2204
2268
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
2269
+ project_id: projectId,
2205
2270
  payload: {
2206
2271
  ...getBasePayload(),
2207
2272
  name: options.name,
@@ -2222,6 +2287,7 @@ var createInsightsClient = ({ endpoint }) => {
2222
2287
  visitor_id: options.visitorId,
2223
2288
  page_view_id: options.pageId,
2224
2289
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
2290
+ project_id: projectId,
2225
2291
  payload: {
2226
2292
  ...getBasePayload(),
2227
2293
  goalId: options.goalId
@@ -2237,6 +2303,7 @@ var createInsightsClient = ({ endpoint }) => {
2237
2303
  visitor_id: options.visitorId,
2238
2304
  page_view_id: options.pageId,
2239
2305
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
2306
+ project_id: projectId,
2240
2307
  payload: {
2241
2308
  ...getBasePayload(),
2242
2309
  scores: options.scores
@@ -2279,10 +2346,12 @@ var generatePageId = () => {
2279
2346
  };
2280
2347
  var createInsights = ({
2281
2348
  endpoint,
2349
+ projectId,
2282
2350
  sessionDurationSeconds = 30 * 60
2283
2351
  }) => {
2284
2352
  const client = createInsightsClient({
2285
- endpoint
2353
+ endpoint,
2354
+ projectId
2286
2355
  });
2287
2356
  const storage = createInsightsStorage();
2288
2357
  let storageData = void 0;
@@ -2327,7 +2396,6 @@ var createInsights = ({
2327
2396
  },
2328
2397
  testResult: (result) => {
2329
2398
  if (!storageData) {
2330
- console.error("Insights not initialized");
2331
2399
  return;
2332
2400
  }
2333
2401
  client.testResult({
@@ -2381,7 +2449,8 @@ var createInsights = ({
2381
2449
  };
2382
2450
  var enableUniformInsights = (options) => {
2383
2451
  const insights = createInsights({
2384
- endpoint: options.endpoint
2452
+ endpoint: options.endpoint,
2453
+ projectId: options.projectId
2385
2454
  });
2386
2455
  let previousUrl = void 0;
2387
2456
  return {
@@ -2632,11 +2701,13 @@ function parseQuickConnect(serialized) {
2632
2701
  KV_SEP,
2633
2702
  ManifestInstance,
2634
2703
  PAIR_SEP,
2704
+ QUIRK_SEP,
2635
2705
  SERVER_STATE_ID,
2636
2706
  ScriptType,
2637
2707
  TYPE_SEP,
2638
2708
  TransitionDataStore,
2639
2709
  UNIFORM_DEFAULT_COOKIE_NAME,
2710
+ UNIFORM_DEFAULT_QUIRK_COOKIE_NAME,
2640
2711
  VisitorDataStore,
2641
2712
  areCommandsEqual,
2642
2713
  computeAggregateDimensions,
@@ -2664,6 +2735,7 @@ function parseQuickConnect(serialized) {
2664
2735
  parseCookieScores,
2665
2736
  parseCookieType,
2666
2737
  parseQuickConnect,
2738
+ parseQuirkCookie,
2667
2739
  parseScoreCookie,
2668
2740
  personalizeVariations,
2669
2741
  queryStringEvaluator,
@@ -2672,5 +2744,6 @@ function parseQuickConnect(serialized) {
2672
2744
  serializeCookieType,
2673
2745
  serializePersonalizeVariants,
2674
2746
  serializeQuickConnect,
2747
+ serializeQuirks,
2675
2748
  testVariations
2676
2749
  });
package/dist/index.mjs CHANGED
@@ -453,7 +453,7 @@ var quirkEvaluator = ({ update, criteria, signal, onLogMessage }) => {
453
453
  const visitorValue = update.visitor.quirks[criteria.key];
454
454
  const updateValue = (_a = update.state.quirks) == null ? void 0 : _a[criteria.key];
455
455
  const value = updateValue != null ? updateValue : visitorValue;
456
- const changed = Boolean(updateValue && visitorValue !== updateValue);
456
+ const changed = Boolean(updateValue !== void 0 && visitorValue !== updateValue);
457
457
  const result = isStringMatch(value, criteria.match);
458
458
  const finalResult = { result, changed };
459
459
  onLogMessage == null ? void 0 : onLogMessage([
@@ -653,9 +653,11 @@ function personalizeVariations({
653
653
  try {
654
654
  const variantMatches = [];
655
655
  const defaultVariants = [];
656
+ const needsConsent = context.requireConsentForPersonalization;
657
+ const canEvaluate = !needsConsent || context.storage.data.consent;
656
658
  for (const variant of variations) {
657
659
  if ((_a = variant.pz) == null ? void 0 : _a.crit.length) {
658
- if (variantMatches.length !== take && evaluateVariantMatch(variant.id, variant.pz, context.scores, onLogMessage)) {
660
+ if (canEvaluate && variantMatches.length !== take && evaluateVariantMatch(variant.id, variant.pz, context.scores, onLogMessage)) {
659
661
  variantMatches.push(variant);
660
662
  }
661
663
  } else {
@@ -917,20 +919,28 @@ var bton = (base64) => {
917
919
  // src/storage/CookieTransitionDataStore.ts
918
920
  var ssr = typeof document === "undefined";
919
921
  var UNIFORM_DEFAULT_COOKIE_NAME = "ufvd";
920
- var _cookieName, _cookieAttributes;
922
+ var UNIFORM_DEFAULT_QUIRK_COOKIE_NAME = `ufvdqk`;
923
+ var _cookieName, _quirkCookieName, _cookieAttributes, _quirksEnabled;
921
924
  var CookieTransitionDataStore = class extends TransitionDataStore {
922
925
  constructor({
923
926
  serverCookieValue,
927
+ experimental_quirksEnabled,
928
+ quirkCookieValue,
929
+ quirkCookieName = UNIFORM_DEFAULT_QUIRK_COOKIE_NAME,
924
930
  cookieName = UNIFORM_DEFAULT_COOKIE_NAME,
925
931
  cookieAttributes = { sameSite: "lax" }
926
932
  }) {
927
933
  super({
928
- initialData: ssr ? parseScoreCookie(serverCookieValue) : void 0
934
+ initialData: ssr ? parseScoreCookie(serverCookieValue, experimental_quirksEnabled ? quirkCookieValue : void 0) : void 0
929
935
  });
930
936
  __privateAdd(this, _cookieName);
937
+ __privateAdd(this, _quirkCookieName);
931
938
  __privateAdd(this, _cookieAttributes);
939
+ __privateAdd(this, _quirksEnabled);
932
940
  __privateSet(this, _cookieName, cookieName);
933
941
  __privateSet(this, _cookieAttributes, cookieAttributes);
942
+ __privateSet(this, _quirkCookieName, quirkCookieName);
943
+ __privateSet(this, _quirksEnabled, experimental_quirksEnabled || false);
934
944
  }
935
945
  handleDelete() {
936
946
  if (ssr) return Promise.resolve();
@@ -941,17 +951,27 @@ var CookieTransitionDataStore = class extends TransitionDataStore {
941
951
  if (ssr) return;
942
952
  if (computedValue.consent) {
943
953
  Cookies.set(__privateGet(this, _cookieName), serializeCookie(computedValue), __privateGet(this, _cookieAttributes));
954
+ if (__privateGet(this, _quirksEnabled) && Object.keys(computedValue.quirks || {}).length) {
955
+ const quirkCookieValue = serializeQuirks(computedValue.quirks || {});
956
+ Cookies.set(__privateGet(this, _quirkCookieName), quirkCookieValue, __privateGet(this, _cookieAttributes));
957
+ }
944
958
  } else {
945
959
  Cookies.remove(__privateGet(this, _cookieName));
960
+ if (__privateGet(this, _quirksEnabled)) {
961
+ Cookies.remove(__privateGet(this, _quirkCookieName));
962
+ }
946
963
  }
947
964
  }
948
965
  };
949
966
  _cookieName = new WeakMap();
967
+ _quirkCookieName = new WeakMap();
950
968
  _cookieAttributes = new WeakMap();
969
+ _quirksEnabled = new WeakMap();
951
970
  var TYPE_SEP = "~";
952
971
  var PAIR_SEP = "!";
953
972
  var KV_SEP = "-";
954
- function parseScoreCookie(cookieValue) {
973
+ var QUIRK_SEP = "!!";
974
+ function parseScoreCookie(cookieValue, quirkCookieValue) {
955
975
  if (!cookieValue) return;
956
976
  const types = cookieValue.split(TYPE_SEP);
957
977
  if (types.length > 5) return;
@@ -965,8 +985,30 @@ function parseScoreCookie(cookieValue) {
965
985
  controlGroup: controlGroup === "1",
966
986
  personalizeVariants: decodePersonalizeVariants(personalizeVariants)
967
987
  };
988
+ if (quirkCookieValue) {
989
+ data.quirks = parseQuirkCookie(quirkCookieValue);
990
+ }
968
991
  return data;
969
992
  }
993
+ function parseQuirkCookie(quirkCookieValue) {
994
+ const pairs = quirkCookieValue.split(QUIRK_SEP);
995
+ const splitPairs = pairs.map((pair) => {
996
+ const sep = pair.indexOf(KV_SEP);
997
+ if (sep === -1) {
998
+ return void 0;
999
+ }
1000
+ return [pair.slice(0, sep), pair.slice(sep + 1)];
1001
+ });
1002
+ const areAllPairsValid = splitPairs.every((pair) => pair !== void 0);
1003
+ if (!areAllPairsValid) {
1004
+ return {};
1005
+ }
1006
+ return splitPairs.reduce((acc, cur) => {
1007
+ const [key, value] = cur;
1008
+ acc[key] = value;
1009
+ return acc;
1010
+ }, {});
1011
+ }
970
1012
  function parseCookieScores(type) {
971
1013
  if (!type) {
972
1014
  return {};
@@ -1051,6 +1093,9 @@ function encodeCookieType(type) {
1051
1093
  function serializeCookieType(type) {
1052
1094
  return Object.entries(type).map((kv) => kv.join(KV_SEP)).join(PAIR_SEP);
1053
1095
  }
1096
+ function serializeQuirks(quirks) {
1097
+ return Object.entries(quirks).map((kv) => kv.join(KV_SEP)).join(QUIRK_SEP);
1098
+ }
1054
1099
 
1055
1100
  // src/storage/EdgeTransitionDataStore.ts
1056
1101
  var _EdgeTransitionDataStore_instances, fetchData_fn;
@@ -1213,7 +1258,8 @@ var LocalStorage = class {
1213
1258
  this.partitionKey = partitionKey;
1214
1259
  __privateAdd(this, _LocalStorage_instances);
1215
1260
  __publicField(this, "inMemoryFallback", {});
1216
- __publicField(this, "hasLocalStorageObject", typeof localStorage !== "undefined");
1261
+ // deno implements localStorage in netlify edge workers, must also check if document is present.
1262
+ __publicField(this, "hasLocalStorageObject", typeof document !== "undefined" && typeof localStorage !== "undefined");
1217
1263
  }
1218
1264
  get(key) {
1219
1265
  const keyValue = __privateMethod(this, _LocalStorage_instances, key_fn).call(this, key);
@@ -1467,7 +1513,7 @@ import { dequal as dequal5 } from "dequal/lite";
1467
1513
  import mitt3 from "mitt";
1468
1514
  var CONTEXTUAL_EDITING_TEST_NAME = "contextual_editing_test";
1469
1515
  var CONTEXTUAL_EDITING_TEST_SELECTED_VARIANT_ID = "contextual_editing_test_selected_variant";
1470
- var _serverTransitionState, _scores, _state, _pzCache, _plugins, _commands, _mitt3, _Context_instances, emitTest_fn, updateGoals_fn, updateComputedScores_fn, calculateScores_fn;
1516
+ var _serverTransitionState, _scores, _state, _pzCache, _plugins, _commands, _requireConsentForPersonalization, _mitt3, _Context_instances, emitTest_fn, updateGoals_fn, updateComputedScores_fn, calculateScores_fn;
1471
1517
  var Context = class {
1472
1518
  constructor(options) {
1473
1519
  __privateAdd(this, _Context_instances);
@@ -1478,6 +1524,7 @@ var Context = class {
1478
1524
  __privateAdd(this, _pzCache, {});
1479
1525
  __privateAdd(this, _plugins);
1480
1526
  __privateAdd(this, _commands);
1527
+ __privateAdd(this, _requireConsentForPersonalization);
1481
1528
  __privateAdd(this, _mitt3, mitt3());
1482
1529
  /**
1483
1530
  * Subscribe to events
@@ -1491,6 +1538,7 @@ var Context = class {
1491
1538
  const { manifest, ...storageOptions } = options;
1492
1539
  __privateSet(this, _state, {});
1493
1540
  __privateSet(this, _plugins, options.plugins);
1541
+ __privateSet(this, _requireConsentForPersonalization, options.requireConsentForPersonalization);
1494
1542
  if (typeof options.transitionStore !== "undefined") {
1495
1543
  __privateSet(this, _commands, []);
1496
1544
  }
@@ -1567,6 +1615,9 @@ var Context = class {
1567
1615
  var _a, _b;
1568
1616
  return (_b = (_a = __privateGet(this, _serverTransitionState)) == null ? void 0 : _a.quirks) != null ? _b : this.storage.data.quirks;
1569
1617
  }
1618
+ get requireConsentForPersonalization() {
1619
+ return __privateGet(this, _requireConsentForPersonalization);
1620
+ }
1570
1621
  /**
1571
1622
  * Updates the Context with new data of any sort, such as
1572
1623
  * new URLs, cookies, quirks, and enrichments.
@@ -1684,7 +1735,11 @@ var Context = class {
1684
1735
  variantAssigned: true
1685
1736
  });
1686
1737
  });
1738
+ const haveQuirksChanged = __privateGet(this, _serverTransitionState) && !dequal5(__privateGet(this, _serverTransitionState).quirks, this.storage.data.quirks);
1687
1739
  __privateSet(this, _serverTransitionState, void 0);
1740
+ if (haveQuirksChanged) {
1741
+ __privateGet(this, _mitt3).emit("quirksUpdated", this.storage.data.quirks);
1742
+ }
1688
1743
  __privateGet(this, _mitt3).emit("log", ["debug", 131]);
1689
1744
  }
1690
1745
  if (__privateGet(this, _plugins)) {
@@ -1761,9 +1816,7 @@ var Context = class {
1761
1816
  test(options) {
1762
1817
  var _a, _b, _c;
1763
1818
  if (options.name === CONTEXTUAL_EDITING_TEST_NAME) {
1764
- const selectedVariant = (_a = options.variations.find((variant) => {
1765
- variant.id === CONTEXTUAL_EDITING_TEST_SELECTED_VARIANT_ID;
1766
- })) != null ? _a : options.variations.at(-1);
1819
+ const selectedVariant = (_a = options.variations.find((variant) => variant.id === CONTEXTUAL_EDITING_TEST_SELECTED_VARIANT_ID)) != null ? _a : options.variations.at(-1);
1767
1820
  const value2 = {
1768
1821
  result: selectedVariant,
1769
1822
  variantAssigned: false
@@ -1864,6 +1917,7 @@ _state = new WeakMap();
1864
1917
  _pzCache = new WeakMap();
1865
1918
  _plugins = new WeakMap();
1866
1919
  _commands = new WeakMap();
1920
+ _requireConsentForPersonalization = new WeakMap();
1867
1921
  _mitt3 = new WeakMap();
1868
1922
  _Context_instances = new WeakSet();
1869
1923
  emitTest_fn = function(event) {
@@ -2033,7 +2087,10 @@ var getBasePayload = () => {
2033
2087
  href: window.location.href
2034
2088
  };
2035
2089
  };
2036
- var createInsightsClient = ({ endpoint }) => {
2090
+ var createInsightsClient = ({
2091
+ endpoint,
2092
+ projectId
2093
+ }) => {
2037
2094
  let endpointUrl;
2038
2095
  const apiKey = endpoint.apiKey;
2039
2096
  if (endpoint.type === "api") {
@@ -2075,6 +2132,7 @@ var createInsightsClient = ({ endpoint }) => {
2075
2132
  visitor_id: options.visitorId,
2076
2133
  page_view_id: options.pageId,
2077
2134
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
2135
+ project_id: projectId,
2078
2136
  payload: {
2079
2137
  ...getBasePayload(),
2080
2138
  previous_session_id: options.previousSessionId
@@ -2090,6 +2148,7 @@ var createInsightsClient = ({ endpoint }) => {
2090
2148
  visitor_id: options.visitorId,
2091
2149
  page_view_id: options.pageId,
2092
2150
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
2151
+ project_id: projectId,
2093
2152
  payload: getBasePayload()
2094
2153
  };
2095
2154
  return sendMessage(message);
@@ -2102,6 +2161,7 @@ var createInsightsClient = ({ endpoint }) => {
2102
2161
  visitor_id: options.visitorId,
2103
2162
  page_view_id: options.pageId,
2104
2163
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
2164
+ project_id: projectId,
2105
2165
  payload: {
2106
2166
  ...getBasePayload(),
2107
2167
  ...options
@@ -2118,6 +2178,7 @@ var createInsightsClient = ({ endpoint }) => {
2118
2178
  visitor_id: options.visitorId,
2119
2179
  page_view_id: options.pageId,
2120
2180
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
2181
+ project_id: projectId,
2121
2182
  payload: {
2122
2183
  ...getBasePayload(),
2123
2184
  name: options.name,
@@ -2138,6 +2199,7 @@ var createInsightsClient = ({ endpoint }) => {
2138
2199
  visitor_id: options.visitorId,
2139
2200
  page_view_id: options.pageId,
2140
2201
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
2202
+ project_id: projectId,
2141
2203
  payload: {
2142
2204
  ...getBasePayload(),
2143
2205
  goalId: options.goalId
@@ -2153,6 +2215,7 @@ var createInsightsClient = ({ endpoint }) => {
2153
2215
  visitor_id: options.visitorId,
2154
2216
  page_view_id: options.pageId,
2155
2217
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
2218
+ project_id: projectId,
2156
2219
  payload: {
2157
2220
  ...getBasePayload(),
2158
2221
  scores: options.scores
@@ -2195,10 +2258,12 @@ var generatePageId = () => {
2195
2258
  };
2196
2259
  var createInsights = ({
2197
2260
  endpoint,
2261
+ projectId,
2198
2262
  sessionDurationSeconds = 30 * 60
2199
2263
  }) => {
2200
2264
  const client = createInsightsClient({
2201
- endpoint
2265
+ endpoint,
2266
+ projectId
2202
2267
  });
2203
2268
  const storage = createInsightsStorage();
2204
2269
  let storageData = void 0;
@@ -2243,7 +2308,6 @@ var createInsights = ({
2243
2308
  },
2244
2309
  testResult: (result) => {
2245
2310
  if (!storageData) {
2246
- console.error("Insights not initialized");
2247
2311
  return;
2248
2312
  }
2249
2313
  client.testResult({
@@ -2297,7 +2361,8 @@ var createInsights = ({
2297
2361
  };
2298
2362
  var enableUniformInsights = (options) => {
2299
2363
  const insights = createInsights({
2300
- endpoint: options.endpoint
2364
+ endpoint: options.endpoint,
2365
+ projectId: options.projectId
2301
2366
  });
2302
2367
  let previousUrl = void 0;
2303
2368
  return {
@@ -2547,11 +2612,13 @@ export {
2547
2612
  KV_SEP,
2548
2613
  ManifestInstance,
2549
2614
  PAIR_SEP,
2615
+ QUIRK_SEP,
2550
2616
  SERVER_STATE_ID,
2551
2617
  ScriptType,
2552
2618
  TYPE_SEP,
2553
2619
  TransitionDataStore,
2554
2620
  UNIFORM_DEFAULT_COOKIE_NAME,
2621
+ UNIFORM_DEFAULT_QUIRK_COOKIE_NAME,
2555
2622
  VisitorDataStore,
2556
2623
  areCommandsEqual,
2557
2624
  computeAggregateDimensions,
@@ -2579,6 +2646,7 @@ export {
2579
2646
  parseCookieScores,
2580
2647
  parseCookieType,
2581
2648
  parseQuickConnect,
2649
+ parseQuirkCookie,
2582
2650
  parseScoreCookie,
2583
2651
  personalizeVariations,
2584
2652
  queryStringEvaluator,
@@ -2587,5 +2655,6 @@ export {
2587
2655
  serializeCookieType,
2588
2656
  serializePersonalizeVariants,
2589
2657
  serializeQuickConnect,
2658
+ serializeQuirks,
2590
2659
  testVariations
2591
2660
  };
@@ -80,7 +80,7 @@ declare const emptyVisitorData: () => VisitorData;
80
80
  * Expresses a 'patch' to the Uniform Context state
81
81
  */
82
82
  type ContextState = {
83
- cookies: Record<string, string>;
83
+ cookies: Record<string, string | undefined>;
84
84
  url?: URL;
85
85
  quirks: Quirks;
86
86
  enrichments: EnrichmentData[];
@@ -380,7 +380,7 @@ interface paths {
380
380
  path?: never;
381
381
  cookie?: never;
382
382
  };
383
- /** @description Fetches the Intent Manifest for a given project.
383
+ /** @description Fetches the optimization Manifest for a given project.
384
384
  * If no manifest has ever been published, and an API key is used that has preview manifest permissions then the current preview manifest will be returned (in delivery format).
385
385
  * */
386
386
  get: {
@@ -1040,6 +1040,12 @@ type ContextOptions = {
1040
1040
  * only - don't call scores, update, etc on it. If you need to call these methods immediately, attach your plugin after initialisation.
1041
1041
  */
1042
1042
  plugins?: Array<ContextPlugin>;
1043
+ /**
1044
+ * Only show personalizations if the visitor has given consent.
1045
+ * `false (default)`: personalization can run in memory without visitor granting storage consent
1046
+ * `true`: personalization is not run at all unless storage consent is given
1047
+ */
1048
+ requireConsentForPersonalization?: boolean;
1043
1049
  } & Omit<VisitorDataStoreOptions, 'manifest' | 'onServerTransitionScoresReceived'>;
1044
1050
  /** Emitted when a personalization runs */
1045
1051
  type PersonalizationEvent = {
@@ -1124,6 +1130,7 @@ declare class Context implements ContextInstance {
1124
1130
  get scores(): Readonly<ScoreVector>;
1125
1131
  /** Gets the current visitor's quirks values. */
1126
1132
  get quirks(): Readonly<Quirks>;
1133
+ get requireConsentForPersonalization(): boolean | undefined;
1127
1134
  /**
1128
1135
  * Subscribe to events
1129
1136
  */
@@ -1252,4 +1259,4 @@ declare global {
1252
1259
  }
1253
1260
  }
1254
1261
 
1255
- export { type TestOptions as $, type AggregateDimension as A, type MessageFunc as B, type ContextPlugin as C, type DecayFunction as D, type LogMessageSingle as E, type LogMessageGroup as F, ManifestInstance as G, GroupCriteriaEvaluator as H, type CriteriaEvaluatorResult as I, type CriteriaEvaluatorParameters as J, type SignalData as K, type LogDrain as L, type MessageCategory as M, type ManifestV2 as N, type OutputSeverity as O, type PersonalizationEvent as P, type PersonalizationManifest as Q, type Signal as R, type ScoreVector as S, TransitionDataStore as T, type SignalCriteriaGroup as U, type VisitorData as V, type SignalCriteria as W, type EnrichmentCategory as X, type NumberMatch as Y, type TestDefinition as Z, type AggregateDimensionInput as _, type StorageCommands as a, testVariations as a0, type DimensionMatch as a1, type PersonalizeOptions as a2, personalizeVariations as a3, type BehaviorTag as a4, type PersonalizedVariant as a5, type PersonalizedResult as a6, type TestVariant as a7, type TestResult as a8, type StorageCommand as a9, type ContextStateUpdate as aA, type GoalStateUpdate as aB, type paths as aC, type SetGoalCommand as aa, type ModifyScoreCommand as ab, type ModifySessionScoreCommand as ac, type SetConsentCommand as ad, type SetQuirkCommand as ae, type SetTestCommand as af, type IdentifyCommand as ag, type SetControlGroupCommand as ah, type SetPersonalizeVariantControlCommand as ai, areCommandsEqual as aj, type ServerToClientTransitionState as ak, SERVER_STATE_ID as al, type TransitionDataStoreEvents as am, type DecayOptions as an, type VisitorDataStoreOptions as ao, type VisitorDataStoreEvents as ap, VisitorDataStore as aq, type Quirks as ar, type Tests as as, type Goals as at, type EnrichmentData as au, type PersonalizeControlVariant as av, type PersonalizeVariants as aw, type EventData as ax, emptyVisitorData as ay, type ContextState as az, type TransitionDataStoreOptions as b, type CriteriaEvaluator as c, type StringMatch as d, type VariantMatchCriteria as e, type LogMessage as f, type DevToolsEvents as g, CONTEXTUAL_EDITING_TEST_NAME as h, CONTEXTUAL_EDITING_TEST_SELECTED_VARIANT_ID as i, type ContextOptions as j, type TestEvent as k, type ContextEvents as l, type ContextInstance as m, Context as n, type DevToolsUiVersion as o, type DevToolsState as p, type DevToolsActions as q, type DevToolsEvent as r, type DevToolsLogEvent as s, type DevToolsDataEvent as t, type DevToolsHelloEvent as u, type DevToolsUpdateEvent as v, type DevToolsRawCommandsEvent as w, type DevToolsForgetEvent as x, type LogMessages as y, type Severity as z };
1262
+ export { type AggregateDimensionInput as $, type AggregateDimension as A, type MessageFunc as B, type ContextPlugin as C, type DecayFunction as D, type LogMessageSingle as E, type LogMessageGroup as F, ManifestInstance as G, GroupCriteriaEvaluator as H, type CriteriaEvaluatorResult as I, type CriteriaEvaluatorParameters as J, type SignalData as K, type LogDrain as L, type MessageCategory as M, type ManifestV2 as N, type OutputSeverity as O, type PersonalizationEvent as P, type Quirks as Q, type PersonalizationManifest as R, type ScoreVector as S, TransitionDataStore as T, type Signal as U, type VisitorData as V, type SignalCriteriaGroup as W, type SignalCriteria as X, type EnrichmentCategory as Y, type NumberMatch as Z, type TestDefinition as _, type StorageCommands as a, type TestOptions as a0, testVariations as a1, type DimensionMatch as a2, type PersonalizeOptions as a3, personalizeVariations as a4, type BehaviorTag as a5, type PersonalizedVariant as a6, type PersonalizedResult as a7, type TestVariant as a8, type TestResult as a9, type ContextStateUpdate as aA, type GoalStateUpdate as aB, type paths as aC, type StorageCommand as aa, type SetGoalCommand as ab, type ModifyScoreCommand as ac, type ModifySessionScoreCommand as ad, type SetConsentCommand as ae, type SetQuirkCommand as af, type SetTestCommand as ag, type IdentifyCommand as ah, type SetControlGroupCommand as ai, type SetPersonalizeVariantControlCommand as aj, areCommandsEqual as ak, type ServerToClientTransitionState as al, SERVER_STATE_ID as am, type TransitionDataStoreEvents as an, type DecayOptions as ao, type VisitorDataStoreOptions as ap, type VisitorDataStoreEvents as aq, VisitorDataStore as ar, type Tests as as, type Goals as at, type EnrichmentData as au, type PersonalizeControlVariant as av, type PersonalizeVariants as aw, type EventData as ax, emptyVisitorData as ay, type ContextState as az, type TransitionDataStoreOptions as b, type CriteriaEvaluator as c, type StringMatch as d, type VariantMatchCriteria as e, type LogMessage as f, type DevToolsEvents as g, CONTEXTUAL_EDITING_TEST_NAME as h, CONTEXTUAL_EDITING_TEST_SELECTED_VARIANT_ID as i, type ContextOptions as j, type TestEvent as k, type ContextEvents as l, type ContextInstance as m, Context as n, type DevToolsUiVersion as o, type DevToolsState as p, type DevToolsActions as q, type DevToolsEvent as r, type DevToolsLogEvent as s, type DevToolsDataEvent as t, type DevToolsHelloEvent as u, type DevToolsUpdateEvent as v, type DevToolsRawCommandsEvent as w, type DevToolsForgetEvent as x, type LogMessages as y, type Severity as z };
@@ -80,7 +80,7 @@ declare const emptyVisitorData: () => VisitorData;
80
80
  * Expresses a 'patch' to the Uniform Context state
81
81
  */
82
82
  type ContextState = {
83
- cookies: Record<string, string>;
83
+ cookies: Record<string, string | undefined>;
84
84
  url?: URL;
85
85
  quirks: Quirks;
86
86
  enrichments: EnrichmentData[];
@@ -380,7 +380,7 @@ interface paths {
380
380
  path?: never;
381
381
  cookie?: never;
382
382
  };
383
- /** @description Fetches the Intent Manifest for a given project.
383
+ /** @description Fetches the optimization Manifest for a given project.
384
384
  * If no manifest has ever been published, and an API key is used that has preview manifest permissions then the current preview manifest will be returned (in delivery format).
385
385
  * */
386
386
  get: {
@@ -1040,6 +1040,12 @@ type ContextOptions = {
1040
1040
  * only - don't call scores, update, etc on it. If you need to call these methods immediately, attach your plugin after initialisation.
1041
1041
  */
1042
1042
  plugins?: Array<ContextPlugin>;
1043
+ /**
1044
+ * Only show personalizations if the visitor has given consent.
1045
+ * `false (default)`: personalization can run in memory without visitor granting storage consent
1046
+ * `true`: personalization is not run at all unless storage consent is given
1047
+ */
1048
+ requireConsentForPersonalization?: boolean;
1043
1049
  } & Omit<VisitorDataStoreOptions, 'manifest' | 'onServerTransitionScoresReceived'>;
1044
1050
  /** Emitted when a personalization runs */
1045
1051
  type PersonalizationEvent = {
@@ -1124,6 +1130,7 @@ declare class Context implements ContextInstance {
1124
1130
  get scores(): Readonly<ScoreVector>;
1125
1131
  /** Gets the current visitor's quirks values. */
1126
1132
  get quirks(): Readonly<Quirks>;
1133
+ get requireConsentForPersonalization(): boolean | undefined;
1127
1134
  /**
1128
1135
  * Subscribe to events
1129
1136
  */
@@ -1252,4 +1259,4 @@ declare global {
1252
1259
  }
1253
1260
  }
1254
1261
 
1255
- export { type TestOptions as $, type AggregateDimension as A, type MessageFunc as B, type ContextPlugin as C, type DecayFunction as D, type LogMessageSingle as E, type LogMessageGroup as F, ManifestInstance as G, GroupCriteriaEvaluator as H, type CriteriaEvaluatorResult as I, type CriteriaEvaluatorParameters as J, type SignalData as K, type LogDrain as L, type MessageCategory as M, type ManifestV2 as N, type OutputSeverity as O, type PersonalizationEvent as P, type PersonalizationManifest as Q, type Signal as R, type ScoreVector as S, TransitionDataStore as T, type SignalCriteriaGroup as U, type VisitorData as V, type SignalCriteria as W, type EnrichmentCategory as X, type NumberMatch as Y, type TestDefinition as Z, type AggregateDimensionInput as _, type StorageCommands as a, testVariations as a0, type DimensionMatch as a1, type PersonalizeOptions as a2, personalizeVariations as a3, type BehaviorTag as a4, type PersonalizedVariant as a5, type PersonalizedResult as a6, type TestVariant as a7, type TestResult as a8, type StorageCommand as a9, type ContextStateUpdate as aA, type GoalStateUpdate as aB, type paths as aC, type SetGoalCommand as aa, type ModifyScoreCommand as ab, type ModifySessionScoreCommand as ac, type SetConsentCommand as ad, type SetQuirkCommand as ae, type SetTestCommand as af, type IdentifyCommand as ag, type SetControlGroupCommand as ah, type SetPersonalizeVariantControlCommand as ai, areCommandsEqual as aj, type ServerToClientTransitionState as ak, SERVER_STATE_ID as al, type TransitionDataStoreEvents as am, type DecayOptions as an, type VisitorDataStoreOptions as ao, type VisitorDataStoreEvents as ap, VisitorDataStore as aq, type Quirks as ar, type Tests as as, type Goals as at, type EnrichmentData as au, type PersonalizeControlVariant as av, type PersonalizeVariants as aw, type EventData as ax, emptyVisitorData as ay, type ContextState as az, type TransitionDataStoreOptions as b, type CriteriaEvaluator as c, type StringMatch as d, type VariantMatchCriteria as e, type LogMessage as f, type DevToolsEvents as g, CONTEXTUAL_EDITING_TEST_NAME as h, CONTEXTUAL_EDITING_TEST_SELECTED_VARIANT_ID as i, type ContextOptions as j, type TestEvent as k, type ContextEvents as l, type ContextInstance as m, Context as n, type DevToolsUiVersion as o, type DevToolsState as p, type DevToolsActions as q, type DevToolsEvent as r, type DevToolsLogEvent as s, type DevToolsDataEvent as t, type DevToolsHelloEvent as u, type DevToolsUpdateEvent as v, type DevToolsRawCommandsEvent as w, type DevToolsForgetEvent as x, type LogMessages as y, type Severity as z };
1262
+ export { type AggregateDimensionInput as $, type AggregateDimension as A, type MessageFunc as B, type ContextPlugin as C, type DecayFunction as D, type LogMessageSingle as E, type LogMessageGroup as F, ManifestInstance as G, GroupCriteriaEvaluator as H, type CriteriaEvaluatorResult as I, type CriteriaEvaluatorParameters as J, type SignalData as K, type LogDrain as L, type MessageCategory as M, type ManifestV2 as N, type OutputSeverity as O, type PersonalizationEvent as P, type Quirks as Q, type PersonalizationManifest as R, type ScoreVector as S, TransitionDataStore as T, type Signal as U, type VisitorData as V, type SignalCriteriaGroup as W, type SignalCriteria as X, type EnrichmentCategory as Y, type NumberMatch as Z, type TestDefinition as _, type StorageCommands as a, type TestOptions as a0, testVariations as a1, type DimensionMatch as a2, type PersonalizeOptions as a3, personalizeVariations as a4, type BehaviorTag as a5, type PersonalizedVariant as a6, type PersonalizedResult as a7, type TestVariant as a8, type TestResult as a9, type ContextStateUpdate as aA, type GoalStateUpdate as aB, type paths as aC, type StorageCommand as aa, type SetGoalCommand as ab, type ModifyScoreCommand as ac, type ModifySessionScoreCommand as ad, type SetConsentCommand as ae, type SetQuirkCommand as af, type SetTestCommand as ag, type IdentifyCommand as ah, type SetControlGroupCommand as ai, type SetPersonalizeVariantControlCommand as aj, areCommandsEqual as ak, type ServerToClientTransitionState as al, SERVER_STATE_ID as am, type TransitionDataStoreEvents as an, type DecayOptions as ao, type VisitorDataStoreOptions as ap, type VisitorDataStoreEvents as aq, VisitorDataStore as ar, type Tests as as, type Goals as at, type EnrichmentData as au, type PersonalizeControlVariant as av, type PersonalizeVariants as aw, type EventData as ax, emptyVisitorData as ay, type ContextState as az, type TransitionDataStoreOptions as b, type CriteriaEvaluator as c, type StringMatch as d, type VariantMatchCriteria as e, type LogMessage as f, type DevToolsEvents as g, CONTEXTUAL_EDITING_TEST_NAME as h, CONTEXTUAL_EDITING_TEST_SELECTED_VARIANT_ID as i, type ContextOptions as j, type TestEvent as k, type ContextEvents as l, type ContextInstance as m, Context as n, type DevToolsUiVersion as o, type DevToolsState as p, type DevToolsActions as q, type DevToolsEvent as r, type DevToolsLogEvent as s, type DevToolsDataEvent as t, type DevToolsHelloEvent as u, type DevToolsUpdateEvent as v, type DevToolsRawCommandsEvent as w, type DevToolsForgetEvent as x, type LogMessages as y, type Severity as z };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniformdev/context",
3
- "version": "19.198.3-alpha.5+c37bbd4ef2",
3
+ "version": "19.199.1-alpha.10+7f62130189",
4
4
  "description": "Uniform Context core package",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "main": "./dist/index.js",
@@ -59,7 +59,7 @@
59
59
  "js-cookie": "3.0.5",
60
60
  "mitt": "^3.0.1",
61
61
  "p-limit": "^3.1.0",
62
- "rfdc": "^1.3.0",
62
+ "rfdc": "^1.4.1",
63
63
  "uuid": "9.0.1"
64
64
  },
65
65
  "files": [
@@ -68,5 +68,5 @@
68
68
  "publishConfig": {
69
69
  "access": "public"
70
70
  },
71
- "gitHead": "c37bbd4ef2353582b4125b9dd21599634ecd5165"
71
+ "gitHead": "7f62130189d43f7ecaaed0a41c929e5c166860d2"
72
72
  }