@active-reach/web-sdk 1.53.0 → 1.55.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/dist/boot.js CHANGED
@@ -1,4 +1,4 @@
1
- import { n as normalizePageContext, b as buildActiveRequest, r as readAnonIdFromStorage, f as fetchWithAbortRetry, s as storeActiveBoot } from "./fetch-abort-Bs-Stg-I.mjs";
1
+ import { n as normalizePageContext, b as buildActiveRequest, r as readAnonIdFromStorage, f as fetchWithAbortRetry, s as storeActiveBoot } from "./fetch-abort-CKX4cEDN.mjs";
2
2
  import { i as isPreviewPage } from "./storage-D5jp9bO-.mjs";
3
3
  function bootActive(options) {
4
4
  if (typeof window === "undefined" || !options.writeKey || !options.apiHost) return null;
@@ -201,16 +201,15 @@ export {
201
201
  buildActiveRequest as b,
202
202
  cartKeyPartOf as c,
203
203
  fetchWithAbort as d,
204
- detectDeviceType as e,
204
+ readABAssignments as e,
205
205
  fetchWithAbortRetry as f,
206
- readABAssignments as g,
207
- currentPageUrl as h,
206
+ currentPageUrl as g,
207
+ isAbortError as h,
208
208
  isNewVisitor as i,
209
- isAbortError as j,
210
209
  markReturningVisitor as m,
211
210
  normalizePageContext as n,
212
211
  readAnonIdFromStorage as r,
213
212
  storeActiveBoot as s,
214
213
  takeActiveBoot as t
215
214
  };
216
- //# sourceMappingURL=fetch-abort-Bs-Stg-I.mjs.map
215
+ //# sourceMappingURL=fetch-abort-CKX4cEDN.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fetch-abort-CKX4cEDN.mjs","sources":["../src/utils/visitor.ts","../src/inapp/active-request.ts","../src/utils/fetch-abort.ts"],"sourcesContent":["/**\n * New-visitor verdict — the ONE reader and writer of the returning-visitor\n * marker (2026-09-13).\n *\n * `/v1/in-app/active` and `/v1/sdk/prefetch-bundle` both take `is_new_user`.\n * Since the 2026-11-22 ruling (\"not signed in = new customer\") the SDK still\n * sends it but the server ignores it as a gate: `show_to_new_users_only` is decided by the\n * cell's `in_app/new_customer` predicate from identity and the order ledger\n * (2026-09-13 history below: when the server did gate on it, the bug it fixed\n * hid every new-users-only campaign). The SDK used to write `aegis_returning_user=1`\n * at the top of `AegisInAppManager.initialize()` and read it afterwards, inside\n * the fetch — so the read always saw its own write, every fetch said\n * `is_new_user=false`, and a new-users-only campaign could never be served.\n *\n * The rule this module enforces: the marker is read ONCE, before anything\n * writes it, and the verdict is held for the whole browsing session.\n *\n * - `isNewVisitor()` resolves the verdict on first call and caches it in\n * memory (this page load) and in sessionStorage (later page loads in the\n * same tab session), so every fetch in a session sends the same value and\n * the verdict does not flip after the marker is written.\n * - `markReturningVisitor()` is the only writer. It resolves the verdict\n * first, so no call order can make the read see the write.\n *\n * Storage unavailable (SSR, blocked site data, a browser that throws on\n * access): the verdict is RETURNING (`false`). \"New\" is a positive claim that\n * unlocks first-visit-only messages; when the SDK cannot remember a visit it\n * cannot prove one never happened, and because the marker can never be saved,\n * answering \"new\" would re-show a first-visit message on every page of every\n * visit forever. `false` is also what the server assumes when the parameter is\n * absent, so an unknown visitor reads the same on both sides.\n */\n\nconst RETURNING_MARKER_KEY = 'aegis_returning_user';\nconst SESSION_VERDICT_KEY = 'aegis_new_visitor_session';\n\nlet cachedVerdict: boolean | null = null;\n\nfunction readSessionVerdict(): boolean | null {\n try {\n if (typeof sessionStorage === 'undefined') return null;\n const stored = sessionStorage.getItem(SESSION_VERDICT_KEY);\n if (stored === '1') return true;\n if (stored === '0') return false;\n return null;\n } catch {\n return null;\n }\n}\n\nfunction writeSessionVerdict(verdict: boolean): void {\n try {\n if (typeof sessionStorage === 'undefined') return;\n sessionStorage.setItem(SESSION_VERDICT_KEY, verdict ? '1' : '0');\n } catch {\n // sessionStorage blocked — the in-memory cache still holds this page load\n }\n}\n\nfunction readMarkerVerdict(): boolean {\n try {\n if (typeof localStorage === 'undefined') return false;\n return localStorage.getItem(RETURNING_MARKER_KEY) === null;\n } catch {\n return false;\n }\n}\n\n/**\n * Whether this browsing session belongs to a visitor the SDK has never seen\n * before. Stable for the whole session; see the module doc for the default\n * when storage is unavailable.\n */\nexport function isNewVisitor(): boolean {\n if (cachedVerdict !== null) return cachedVerdict;\n const sessionVerdict = readSessionVerdict();\n if (sessionVerdict !== null) {\n cachedVerdict = sessionVerdict;\n return cachedVerdict;\n }\n cachedVerdict = readMarkerVerdict();\n writeSessionVerdict(cachedVerdict);\n return cachedVerdict;\n}\n\n/**\n * Record that this visitor has now been seen, so the NEXT session reads as\n * returning. Resolves the current session's verdict before writing.\n */\nexport function markReturningVisitor(): void {\n isNewVisitor();\n try {\n if (typeof localStorage === 'undefined') return;\n localStorage.setItem(RETURNING_MARKER_KEY, '1');\n } catch {\n // storage blocked — nothing to remember; the verdict stays as resolved\n }\n}\n\n/** Test seam: forget the in-memory verdict, as a fresh page load would. */\nexport function resetVisitorVerdictCacheForTests(): void {\n cachedVerdict = null;\n}\n","/**\n * The ONE builder for the `/v1/in-app/active` request (Aman 2026-11-19).\n *\n * `AegisInAppManager.refreshCampaigns()` and the early-boot script\n * (`@active-reach/web-sdk/boot`, src/boot.ts) build the SAME URL, headers and\n * request key through this module, so a response the boot script started\n * before the SDK loaded is exactly the one the manager would have asked for,\n * and the manager adopts it instead of asking again. Never a second builder.\n *\n * The request key (`activeRequestKey`) is the page context the answer is for:\n * redacted page URL + surface + screen + outlet + cart ids. Identity and the\n * write key travel in headers and are matched separately when a boot answer is\n * adopted (`takeActiveBoot`).\n */\nimport { redactUrl } from '../utils/redact-url';\nimport { isNewVisitor } from '../utils/visitor';\nimport { previewAsOfToken } from '../utils/preview-as-of';\nimport { Storage } from '../utils/storage';\n\n/** The logical surfaces a host may declare (aegis.page(name) / config.surface). */\nexport const KNOWN_SURFACES: ReadonlySet<string> = new Set([\n 'bill',\n 'storefront_catalog',\n 'storefront_rewards',\n 'storefront_feedback',\n 'storefront_reviews',\n 'storefront_members',\n 'storefront_orders',\n 'storefront_account',\n 'storefront_referrals',\n 'external_website',\n 'external_mobile_screen',\n]);\n\nexport interface ActiveRequestContext {\n apiHost: string;\n writeKey: string;\n /** The visitor's anonymous id (analytics `anon_id`) or the host's user id. */\n userId?: string;\n contactId?: string;\n contactToken?: string;\n organizationId?: string;\n propertyId?: string;\n surface: string | null;\n screen: string | null;\n locationId: string | null;\n /** `null` = no cart known (param omitted); `[]` = an empty cart (sent empty). */\n cartProductIds: string[] | null;\n previewOnly: boolean;\n}\n\nexport interface ActiveRequest {\n url: string;\n headers: Record<string, string>;\n key: string;\n}\n\n/** The page context a host declares before init, normalised exactly as the\n * manager's constructor records it: only a known surface sets the surface,\n * the screen falls back to the surface, and `page_view` is no screen. */\nexport function normalizePageContext(\n surface: string | null | undefined,\n screen: string | null | undefined,\n): { surface: string | null; screen: string | null } {\n const s = surface && KNOWN_SURFACES.has(surface) ? surface : null;\n const sc = screen || surface || null;\n return { surface: s, screen: sc && sc !== 'page_view' ? sc : null };\n}\n\n/** The visitor's anonymous id as the analytics SDK stores it (`anon_id`). */\nexport function readAnonIdFromStorage(): string | undefined {\n if (typeof document === 'undefined') return undefined;\n try {\n const storage = new Storage();\n return storage.get('anon_id') ?? undefined;\n } catch {\n return undefined;\n }\n}\n\nexport function detectDeviceType(): 'mobile' | 'desktop' | 'tablet' {\n if (typeof navigator === 'undefined') return 'desktop';\n const ua = navigator.userAgent;\n if (/Mobi|Android/i.test(ua)) return 'mobile';\n if (/iPad|Tablet/i.test(ua)) return 'tablet';\n return 'desktop';\n}\n\nexport function readABAssignments(): Record<string, string> {\n try {\n if (typeof localStorage === 'undefined') return {};\n return JSON.parse(localStorage.getItem('aegis_ab_assignments') || '{}');\n } catch {\n return {};\n }\n}\n\n/** The redacted page URL the request sends as `page_url` (null outside a window). */\nexport function currentPageUrl(): string | null {\n if (typeof window === 'undefined' || !window.location) return null;\n return redactUrl((window.location.pathname || '') + (window.location.search || ''));\n}\n\n/** The cart ids as a request-key part: sorted + deduped so a reorder is not a\n * change; `-` = no cart known, distinct from `` = an empty cart. */\nexport function cartKeyPartOf(ids: string[] | null): string {\n return ids === null ? '-' : [...ids].sort().join(',');\n}\n\nexport function activeRequestKey(\n ctx: Pick<ActiveRequestContext, 'surface' | 'screen' | 'locationId' | 'cartProductIds'>,\n): string {\n const url = currentPageUrl() ?? '/';\n return [url, ctx.surface ?? '', ctx.screen ?? '', ctx.locationId ?? '', cartKeyPartOf(ctx.cartProductIds)].join('|');\n}\n\n/** The api host without a trailing slash (one spelling for the request URL). */\nexport function normalizeApiHost(apiHost: string): string {\n return apiHost.replace(/\\/+$/, '');\n}\n\nexport function buildActiveRequest(ctx: ActiveRequestContext): ActiveRequest {\n const context = new URLSearchParams({\n device_type: detectDeviceType(),\n page_url: currentPageUrl() ?? '/',\n });\n // Geo is resolved server-side from IP. The new-visitor verdict is fixed for\n // the session (utils/visitor.ts), so every request in a session sends the\n // same value, the boot script's included.\n context.set('is_new_user', isNewVisitor() ? 'true' : 'false');\n if (ctx.surface) context.set('current_surface', ctx.surface);\n if (ctx.screen) context.set('current_screen', ctx.screen);\n if (ctx.locationId) context.set('location_id', ctx.locationId);\n if (ctx.cartProductIds !== null) context.set('cart_product_ids', ctx.cartProductIds.join(','));\n const previewAsOf = previewAsOfToken();\n if (previewAsOf) context.set('preview_as_of', previewAsOf);\n if (ctx.previewOnly) context.set('preview', '1');\n\n const headers: Record<string, string> = {\n 'X-Aegis-Write-Key': ctx.writeKey,\n 'Content-Type': 'application/json',\n };\n if (ctx.userId) headers['X-User-ID'] = ctx.userId;\n if (ctx.contactId) headers['X-Contact-ID'] = ctx.contactId;\n if (ctx.contactId && ctx.contactToken) headers['X-Contact-Token'] = ctx.contactToken;\n if (ctx.organizationId) headers['X-Organization-ID'] = ctx.organizationId;\n if (ctx.propertyId) headers['X-Property-Id'] = ctx.propertyId;\n const abAssignments = readABAssignments();\n if (Object.keys(abAssignments).length > 0) {\n headers['X-AB-Assignments'] = btoa(JSON.stringify(abAssignments));\n }\n // The host is normalised HERE, for the manager and the boot script alike: a\n // configured `https://api.example/` and `https://api.example` build the same\n // URL, so a boot answer is adopted either way (portal audit 2026-11-20).\n return {\n url: `${normalizeApiHost(ctx.apiHost)}/v1/in-app/active?${context.toString()}`,\n headers,\n key: activeRequestKey(ctx),\n };\n}\n\n/** What the early-boot script leaves on `window.__aegisActiveBoot`. */\nexport interface ActiveBootHandle {\n key: string;\n url: string;\n headers: Record<string, string>;\n promise: Promise<Response>;\n}\n\nexport const ACTIVE_BOOT_GLOBAL = '__aegisActiveBoot';\n\ntype BootWindow = Window & { [ACTIVE_BOOT_GLOBAL]?: ActiveBootHandle };\n\nexport function readActiveBoot(): ActiveBootHandle | undefined {\n if (typeof window === 'undefined') return undefined;\n return (window as BootWindow)[ACTIVE_BOOT_GLOBAL];\n}\n\nexport function storeActiveBoot(handle: ActiveBootHandle): void {\n if (typeof window === 'undefined') return;\n (window as BootWindow)[ACTIVE_BOOT_GLOBAL] = handle;\n}\n\nexport function clearActiveBoot(): void {\n if (typeof window === 'undefined') return;\n delete (window as BootWindow)[ACTIVE_BOOT_GLOBAL];\n}\n\n/** A boot answer is the manager's own when it asked the same URL with the same\n * headers. The one header the manager may ADD is `X-User-ID`: on a first\n * visit the analytics SDK mints the anonymous id after the boot script ran,\n * and the server holds no state for a brand-new id, so the answer is the same. */\nexport function bootMatches(boot: Pick<ActiveBootHandle, 'key' | 'url' | 'headers'>, req: ActiveRequest): boolean {\n if (boot.key !== req.key || boot.url !== req.url) return false;\n for (const [name, value] of Object.entries(boot.headers)) {\n if (req.headers[name] !== value) return false;\n }\n for (const name of Object.keys(req.headers)) {\n if (!(name in boot.headers) && name !== 'X-User-ID') return false;\n }\n return true;\n}\n\n/** Adopt the early-boot answer for `req` (the global is cleared either way:\n * a boot answer is for the page's FIRST request only). */\nexport function takeActiveBoot(req: ActiveRequest): Promise<Response> | null {\n const boot = readActiveBoot();\n if (!boot) return null;\n clearActiveBoot();\n return bootMatches(boot, req) ? boot.promise : null;\n}\n","/**\n * The SDK's client abort (Aman 11-01, Q3 speed ruling / WP17 L14): SDK and\n * rail reads answer p95 < 300 ms, and the client gives up at 800 ms so a slow\n * gateway never holds the host page. Each caller then falls back (last config,\n * last bundle, last good rail; bootstrap raises) and never blocks render or\n * checkout.\n *\n * The timer keeps running after the headers arrive, so the BODY read is inside\n * the same 800 ms budget: a body still streaming at 800 ms rejects with an\n * AbortError, which every caller already treats as a failed fetch. An abort\n * after the body was read is a no-op.\n *\n * Uses an AbortController + setTimeout rather than `AbortSignal.timeout`\n * (Safari < 16 lacks it). A caller-supplied signal still aborts the request.\n *\n * Guard: tests/drift-sdk-fetch-abort.test.ts (every listed SDK read passes\n * through here with a budget <= 800 ms).\n */\nexport const SDK_FETCH_ABORT_MS = 800;\n\nexport function fetchWithAbort(\n input: string,\n init: RequestInit = {},\n timeoutMs: number = SDK_FETCH_ABORT_MS\n): Promise<Response> {\n const budget = Math.min(timeoutMs, SDK_FETCH_ABORT_MS);\n if (typeof AbortController === 'undefined') {\n return fetch(input, init);\n }\n const controller = new AbortController();\n const outer = init.signal;\n if (outer) {\n if (outer.aborted) controller.abort();\n else outer.addEventListener('abort', () => controller.abort(), { once: true });\n }\n const timer = setTimeout(() => controller.abort(), budget);\n return fetch(input, { ...init, signal: controller.signal }).catch((err: unknown) => {\n clearTimeout(timer);\n throw err;\n });\n}\n\n/**\n * A BOOT read: the first answer a page gets from an endpoint, with nothing to\n * fall back on (no last bundle, no saved rails, no cookie). On a cold\n * connection the 800 ms budget is spent on DNS + TCP + TLS + the CORS\n * preflight, and the browser aborts before the real request ever leaves\n * (measured on the Cake House store 2026-11-19: two `OPTIONS /v1/in-app/active`\n * reached the gateway, no GET followed, and the page stayed empty until a\n * reload). The second try rides the warm connection and lands in 100-250 ms,\n * so one retry on an ABORT (never on an HTTP status or a network error) is\n * the whole fix. Budget: 800 ms per try, one retry on abort only (Aman\n * 2026-11-20; the 11-01 ruling reads \"per try\", no cap on the total). A\n * caller's own aborted signal is honoured and never retried. Readers that already hold an answer\n * (a later poll) keep using fetchWithAbort: a stale answer beats a late one.\n *\n * Guard: tests/drift-sdk-fetch-abort.test.ts (the boot reads use this helper).\n */\nexport async function fetchWithAbortRetry(\n input: string,\n init: RequestInit = {},\n timeoutMs: number = SDK_FETCH_ABORT_MS\n): Promise<Response> {\n try {\n return await fetchWithAbort(input, init, timeoutMs);\n } catch (err) {\n if (!isAbortError(err) || init.signal?.aborted) throw err;\n return fetchWithAbort(input, init, timeoutMs);\n }\n}\n\n/** True when `err` is the abort raised by fetchWithAbort's budget (or any abort). */\nexport function isAbortError(err: unknown): boolean {\n return (\n !!err &&\n typeof err === 'object' &&\n ((err as { name?: string }).name === 'AbortError' || (err as { name?: string }).name === 'TimeoutError')\n );\n}\n"],"names":[],"mappings":";AAiCA,MAAM,uBAAuB;AAC7B,MAAM,sBAAsB;AAE5B,IAAI,gBAAgC;AAEpC,SAAS,qBAAqC;AAC5C,MAAI;AACF,QAAI,OAAO,mBAAmB,YAAa,QAAO;AAClD,UAAM,SAAS,eAAe,QAAQ,mBAAmB;AACzD,QAAI,WAAW,IAAK,QAAO;AAC3B,QAAI,WAAW,IAAK,QAAO;AAC3B,WAAO;AAAA,EACT,QAAQ;AACN,WAAO;AAAA,EACT;AACF;AAEA,SAAS,oBAAoB,SAAwB;AACnD,MAAI;AACF,QAAI,OAAO,mBAAmB,YAAa;AAC3C,mBAAe,QAAQ,qBAAqB,UAAU,MAAM,GAAG;AAAA,EACjE,QAAQ;AAAA,EAER;AACF;AAEA,SAAS,oBAA6B;AACpC,MAAI;AACF,QAAI,OAAO,iBAAiB,YAAa,QAAO;AAChD,WAAO,aAAa,QAAQ,oBAAoB,MAAM;AAAA,EACxD,QAAQ;AACN,WAAO;AAAA,EACT;AACF;AAOO,SAAS,eAAwB;AACtC,MAAI,kBAAkB,KAAM,QAAO;AACnC,QAAM,iBAAiB,mBAAA;AACvB,MAAI,mBAAmB,MAAM;AAC3B,oBAAgB;AAChB,WAAO;AAAA,EACT;AACA,kBAAgB,kBAAA;AAChB,sBAAoB,a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AI,WAAW,kBAAkB;AACrD,MAAI,OAAO,oBAAoB,aAAa;AAC1C,WAAO,MAAM,OAAO,IAAI;AAAA,EAC1B;AACA,QAAM,aAAa,IAAI,gBAAA;AACvB,QAAM,QAAQ,KAAK;AACnB,MAAI,OAAO;AACT,QAAI,MAAM,QAAS,YAAW,MAAA;AAAA,QACzB,OAAM,iBAAiB,SAAS,MAAM,WAAW,SAAS,EAAE,MAAM,MAAM;AAAA,EAC/E;AACA,QAAM,QAAQ,WAAW,MAAM,WAAW,MAAA,GAAS,MAAM;AACzD,SAAO,MAAM,OAAO,EAAE,GAAG,MAAM,QAAQ,WAAW,OAAA,CAAQ,EAAE,MAAM,CAAC,QAAiB;AAClF,iBAAa,KAAK;AAClB,UAAM;AAAA,EACR,CAAC;AACH;AAkBA,eAAsB,oBACpB,OACA,OAAoB,CAAA,GACpB,YAAoB,oBACD;;AACnB,MAAI;AACF,WAAO,MAAM,eAAe,OAAO,MAAM,SAAS;AAAA,EACpD,SAAS,KAAK;AACZ,QAAI,CAAC,aAAa,GAAG,OAAK,UAAK,WAAL,mBAAa,SAAS,OAAM;AACtD,WAAO,eAAe,OAAO,MAAM,SAAS;AAAA,EAC9C;AACF;AAGO,SAAS,aAAa,KAAuB;AAClD,SACE,CAAC,CAAC,OACF,OAAO,QAAQ,aACb,IAA0B,SAAS,gBAAiB,IAA0B,SAAS;AAE7F;"}
@@ -430,7 +430,6 @@ export declare class AegisInAppManager {
430
430
  private refreshCampaignsNow;
431
431
  private static readonly SERVED_DEDUP_PREFIX;
432
432
  private emitServedEvents;
433
- private detectDeviceType;
434
433
  private getABAssignments;
435
434
  private processABAssignments;
436
435
  private getVariantId;
@@ -700,6 +699,7 @@ export declare class AegisInAppManager {
700
699
  /**
701
700
  * §7.13.I — embedded profile FORM. Renders one input per `form_fields` entry
702
701
  * and, on submit, POSTs `{response_type:'form', payload:{fields:{key:value}}}`
702
+ * (plus `marketing_consent: true` when the Q5 permission box was ticked)
703
703
  * to `/in-app/responses` — the cell-plane enrichment writes the mapped answers
704
704
  * back onto the contact. Keyed by each field's `key` so it matches the
705
705
  * campaign's field→contact map.
@@ -1 +1 @@
1
- {"version":3,"file":"AegisInAppManager.d.ts","sourceRoot":"","sources":["../../src/inapp/AegisInAppManager.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,KAAK,EAAiB,SAAS,EAAE,MAAM,aAAa,CAAC;AAC5D,OAAO,EAIL,KAAK,WAAW,EAEjB,MAAM,WAAW,CAAC;AAwCnB,OAAO,EAA+B,KAAK,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAI7F,OAAO,EASL,KAAK,SAAS,EACf,MAAM,eAAe,CAAC;AAwDvB,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EACA,OAAO,GACP,QAAQ,GACR,SAAS,GACT,aAAa,GACb,mBAAmB,GACnB,OAAO,GACP,KAAK,GACL,OAAO,GAEP,SAAS,GAET,gBAAgB,GAChB,YAAY,GACZ,cAAc,GACd,gBAAgB,GAChB,wBAAwB,GAGxB,iBAAiB,GACjB,aAAa,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE;QACV,eAAe,CAAC,EAAE,MAAM,CAAC;QACzB,uBAAuB,CAAC,EAAE,MAAM,CAAC;QACjC,gBAAgB,CAAC,EAAE,MAAM,CAA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AO,CAAC,WAAW;IAqKnB,OAAO,CAAC,UAAU;IAqClB,OAAO,CAAC,gBAAgB;IA2IxB,OAAO,CAAC,sBAAsB;IA0K9B,OAAO,CAAC,WAAW;IAgInB,OAAO,CAAC,aAAa;IAgBrB,OAAO,CAAC,SAAS;IA0QjB,OAAO,CAAC,YAAY;IAWpB,OAAO,CAAC,WAAW;IASnB;;;;;OAKG;IACH,OAAO,CAAC,kBAAkB;IAW1B,OAAO,CAAC,aAAa;IA6PrB;;;0BAGsB;IACtB,OAAO,CAAC,aAAa;IAmCrB;;;;;;;;;;;;;;;;OAgBG;IACH,OAAO,CAAC,aAAa;IA6IrB;;+EAE2E;IAC3E,OAAO,CAAC,YAAY;IAyCpB;;;uDAGmD;IACnD,OAAO,CAAC,UAAU;IAWlB;+EAC2E;IAC3E,OAAO,CAAC,WAAW;IAmBnB,OAAO,CAAC,kBAAkB;IAiI1B,OAAO,CAAC,WAAW;IAUnB,OAAO,CAAC,aAAa;IAqBrB;;;;;;;;;;;OAWG;YACW,UAAU;IAyKxB,+EAA+E;IAC/E,OAAO,CAAC,qBAAqB,CAA6B;IAC1D,+EAA+E;IAC/E,OAAO,CAAC,WAAW,CAAqB;IACxC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,oBAAoB,CAAQ;IAEpD;;;;;;;;;OASG;YACW,mBAAmB;IAqDjC,OAAO,CAAC,GAAG;IAMX,OAAO,CAAC,OAAO,CAAC,EAAE;QAAE,YAAY,CAAC,EAAE,OAAO,CAAA;KAAE,GAAG,IAAI;CAmFpD"}
@@ -0,0 +1,45 @@
1
+ /**
2
+ * In-app FORM "Ask permission to send offers" tick box (In-app redesign Q5,
3
+ * Aman 2026-11-19). The SDK half of ONE contract:
4
+ *
5
+ * - the campaign switch is `interactive_config.ask_marketing_consent`
6
+ * (cell `InteractiveConfig.ask_marketing_consent`, web schema
7
+ * `ask_marketing_consent: z.boolean()`);
8
+ * - the submit carries the customer's OWN tick as
9
+ * `payload.marketing_consent: true`, read by the cell at
10
+ * `promo_consent.in_app_form_ticked` through `IN_APP_FORM_CONSENT_KEY`
11
+ * (apps/cell-plane/app/services/commerce/promo_consent.py). An unticked box
12
+ * sends NO key: the cell writes nothing for a missing key, so permission is
13
+ * never assumed from a submit.
14
+ *
15
+ * The row is appended by the ONE form body renderer
16
+ * (`AegisInAppManager._buildFormBody`), so every form that posts through
17
+ * `submitFormResponse` (embedded form slot, multi_step_form steps-as-fields,
18
+ * the overlay form modal) gets the same box.
19
+ */
20
+ /** The payload key the cell reads. Mirrors promo_consent.IN_APP_FORM_CONSENT_KEY. */
21
+ export declare const MARKETING_CONSENT_KEY = "marketing_consent";
22
+ /** Customer-facing words, always (the campaign has a switch, not a label field). */
23
+ export declare const MARKETING_CONSENT_DEFAULT_LABEL = "Send me offers on WhatsApp, SMS and email";
24
+ export declare const MARKETING_CONSENT_ROW_CLASS = "aegis-in-app-consent";
25
+ export declare const MARKETING_CONSENT_BOX_CLASS = "aegis-in-app-consent-box";
26
+ /** Does this campaign ask the permission question? Only an explicit `true`. */
27
+ export declare function asksMarketingConsent(ic: Record<string, unknown> | undefined | null): boolean;
28
+ /** The label to show: always the SDK default words. */
29
+ export declare function marketingConsentLabel(): string;
30
+ /**
31
+ * The payload the form posts: `{fields}` plus `marketing_consent: true` ONLY
32
+ * when the box was ticked. Unticked (or no box) adds nothing.
33
+ */
34
+ export declare function formPayload(fields: Record<string, string>, marketingConsent: boolean): Record<string, unknown>;
35
+ /**
36
+ * ONE unticked tick box with its label: a real `<label>` wrapping a real
37
+ * `<input type="checkbox">` (a11y: the whole label is the hit target and the
38
+ * input is announced with its text). Styled like the sibling form fields —
39
+ * the campaign's text colour tints the box (`accent-color`) and the label.
40
+ */
41
+ export declare function renderMarketingConsentRow(label: string, text: string, campaignId: string): {
42
+ row: HTMLLabelElement;
43
+ input: HTMLInputElement;
44
+ };
45
+ //# sourceMappingURL=marketing-consent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"marketing-consent.d.ts","sourceRoot":"","sources":["../../src/inapp/marketing-consent.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,qFAAqF;AACrF,eAAO,MAAM,qBAAqB,sBAAsB,CAAC;AAEzD,oFAAoF;AACpF,eAAO,MAAM,+BAA+B,8CAA8C,CAAC;AAE3F,eAAO,MAAM,2BAA2B,yBAAyB,CAAC;AAClE,eAAO,MAAM,2BAA2B,6BAA6B,CAAC;AAEtE,+EAA+E;AAC/E,wBAAgB,oBAAoB,CAAC,EAAE,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,GAAG,IAAI,GAAG,OAAO,CAE5F;AAED,uDAAuD;AACvD,wBAAgB,qBAAqB,IAAI,MAAM,CAE9C;AAED;;;GAGG;AACH,wBAAgB,WAAW,CACzB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC9B,gBAAgB,EAAE,OAAO,GACxB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAEzB;AAED;;;;;GAKG;AACH,wBAAgB,yBAAyB,CACvC,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,MAAM,EACZ,UAAU,EAAE,MAAM,GACjB;IAAE,GAAG,EAAE,gBAAgB,CAAC;IAAC,KAAK,EAAE,gBAAgB,CAAA;CAAE,CAoBpD"}
@@ -28,8 +28,11 @@ export interface AnnouncementContent {
28
28
  /**
29
29
  * What the announcement bar says. The first card's copy when the campaign has
30
30
  * cards; otherwise the campaign's own keys: `title` (+ `body`), optional
31
- * `interactive_config.coupon_code`, CTA `button_text` (default "Order now")
32
- * to `action_url`. Null when there is nothing to say.
31
+ * `interactive_config.coupon_code`, CTA `button_text` to `action_url`.
32
+ * `ctaText` is ONLY what the owner typed (card CTA, else `button_text`): there
33
+ * is no default text (1.55.0, Aman 2026-11-22), so a link with no text gives
34
+ * `ctaText: ''` and the bar itself becomes the tap target. Null when there is
35
+ * nothing to say (a link alone says nothing).
33
36
  */
34
37
  export declare function announcementContent(campaign: {
35
38
  title?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"hero.d.ts","sourceRoot":"","sources":["../../../src/inapp/renderers/hero.ts"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAG7C,UAAU,QAAQ;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IACtD,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAmBD,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAI3E;AAwED,qFAAqF;AACrF,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE;IAAE,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAAC,k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AAmB;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE;IAAE,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAAC,kBAAkB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAAE,EACpI,IAAI,EAAE,QAAQ,GAAG,IAAI,GACpB,mBAAmB,GAAG,IAAI,CAU5B;AA2ID;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE;IAAE,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,EAAE,eAAe,CAAC,EAAE,MAAM,GAAG,MAAM,CAIxF;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,aAAa,EAAE,MAAM,EAAE,WAAW,GAAG,OAAO,CAqNjF"}
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { g as generateUUID, r as recordInAppItemTouch, e as ensureFbc, l as logger, A as Aegis } from "./analytics-CM31xECy.mjs";
2
2
  import { B, E, N, R, U, m } from "./analytics-CM31xECy.mjs";
3
3
  import { S as Storage, r as redactUrl, i as isPreviewPage } from "./storage-D5jp9bO-.mjs";
4
- import { r as readAnonIdFromStorage$1, m as markReturningVisitor, a as activeRequestKey, c as cartKeyPartOf, K as KNOWN_SURFACES, b as buildActiveRequest, t as takeActiveBoot, d as fetchWithAbort, f as fetchWithAbortRetry, e as detectDeviceType, g as readABAssignments, h as currentPageUrl, i as isNewVisitor, j as isAbortError, S as SDK_FETCH_ABORT_MS } from "./fetch-abort-Bs-Stg-I.mjs";
4
+ import { r as readAnonIdFromStorage$1, m as markReturningVisitor, a as activeRequestKey, c as cartKeyPartOf, K as KNOWN_SURFACES, b as buildActiveRequest, t as takeActiveBoot, d as fetchWithAbort, f as fetchWithAbortRetry, e as readABAssignments, g as currentPageUrl, i as isNewVisitor, h as isAbortError, S as SDK_FETCH_ABORT_MS } from "./fetch-abort-CKX4cEDN.mjs";
5
5
  import { a as assetIdOf } from "./AegisWebPush-BE9wJcx0.mjs";
6
6
  import { A } from "./AegisWebPush-BE9wJcx0.mjs";
7
7
  function debounce(func, wait) {
@@ -4882,7 +4882,7 @@ function announcementContent(campaign, card) {
4882
4882
  const text = [head, sub].filter(Boolean).join(" · ");
4883
4883
  const coupon = typeof ic.coupon_code === "string" ? ic.coupon_code.trim() : "";
4884
4884
  const ctaUrl = (card ? cardUrl(card) : "") || campaign.action_url || "";
4885
- const ctaText = (card ? cardCta(card) : "") || campaign.button_text || (ctaUrl ? "Order now" : "");
4885
+ const ctaText = (card ? cardCta(card) : "") || campaign.button_text || "";
4886
4886
  if (!text && !coupon && !ctaText) return null;
4887
4887
  return { text, coupon, ctaText, ctaUrl };
4888
4888
  }
@@ -4891,7 +4891,7 @@ function _injectAnnouncementCss() {
4891
4891
  if (document.getElementById("aegis-announcement-style")) return;
4892
4892
  const style = document.createElement("style");
4893
4893
  style.id = "aegis-announcement-style";
4894
- style.textContent = `@media (min-width:${HERO_PHONE_MAX_WIDTH_PX + 1}px){.aegis-announcement-bar{flex-wrap:nowrap !important;}.aegis-announcement-text{flex:1 1 auto;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}.aegis-announcement-coupon,.aegis-announcement-cta{flex:none;}}`;
4894
+ style.textContent = `@media (min-width:${HERO_PHONE_MAX_WIDTH_PX + 1}px){.aegis-announcement-bar{flex-wrap:nowrap !important;}.aegis-announcement-text{flex:1 1 auto;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}.aegis-announcement-coupon,.aegis-announcement-cta{flex:none;}}.aegis-announcement-text[role="link"]:focus-visible{outline:2px solid #fff;outline-offset:2px;border-radius:2px;}.aegis-announcement-open{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap;border:0;}.aegis-announcement-open:focus-visible{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto;clip-path:none;flex:none;font-weight:700;cursor:pointer;outline:2px solid #fff;outline-offset:2px;border-radius:2px;}`;
4895
4895
  document.head.appendChild(style);
4896
4896
  }
4897
4897
  function renderAnnouncementBar(ctx, card, accent) {
@@ -4903,6 +4903,7 @@ function renderAnnouncementBar(ctx, card, accent) {
4903
4903
  bar.className = "aegis-announcement-bar";
4904
4904
  bar.setAttribute("data-campaign-id", campaign.id);
4905
4905
  bar.style.cssText = `display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-start;column-gap:10px;row-gap:4px;min-height:34px;box-sizing:border-box;background:${accent};color:#fff;padding:7px 16px;font-weight:600;font-size:13px;line-height:1.35;${fontFamilyCss("body")}text-align:left;`;
4906
+ let textEl = null;
4906
4907
  if (content.text) {
4907
4908
  const t = document.createElement("span");
4908
4909
  t.className = "aegis-announcement-text";
@@ -4910,6 +4911,7 @@ function renderAnnouncementBar(ctx, card, accent) {
4910
4911
  t.style.cssText = "min-width:0;overflow-wrap:anywhere;";
4911
4912
  t.textContent = content.text;
4912
4913
  bar.appendChild(t);
4914
+ textEl = t;
4913
4915
  }
4914
4916
  if (content.coupon) {
4915
4917
  const chip = document.createElement("button");
@@ -4933,7 +4935,35 @@ function renderAnnouncementBar(ctx, card, accent) {
4933
4935
  });
4934
4936
  bar.appendChild(chip);
4935
4937
  }
4936
- const url = content.ctaUrl ? sanitizeUrl2(content.ctaUrl) : "";
4938
+ const url = (content.ctaUrl ? sanitizeUrl2(content.ctaUrl) : null) ?? "";
4939
+ const go = () => {
4940
+ if (!url) return;
4941
+ trackEvent(campaign.id, "clicked");
4942
+ if (ctx.navigate) ctx.navigate(url);
4943
+ else if (typeof window !== "undefined") window.location.assign(url);
4944
+ };
4945
+ if (url && !content.ctaText) {
4946
+ bar.setAttribute("data-aegis-announcement-tappable", "");
4947
+ bar.style.cursor = "pointer";
4948
+ bar.addEventListener("click", () => go());
4949
+ let link = textEl;
4950
+ if (!link) {
4951
+ link = document.createElement("span");
4952
+ link.className = "aegis-announcement-open";
4953
+ link.setAttribute("data-aegis-announcement-open", "");
4954
+ link.setAttribute("aria-label", content.coupon ? `Open offer ${content.coupon}` : "Open offer");
4955
+ link.textContent = "Open ›";
4956
+ bar.appendChild(link);
4957
+ }
4958
+ const keyLink = link;
4959
+ keyLink.setAttribute("role", "link");
4960
+ keyLink.tabIndex = 0;
4961
+ keyLink.addEventListener("keydown", (e) => {
4962
+ if (e.key !== "Enter" || e.target !== keyLink) return;
4963
+ e.preventDefault();
4964
+ go();
4965
+ });
4966
+ }
4937
4967
  if (url && content.ctaText) {
4938
4968
  const a = document.createElement("a");
4939
4969
  a.className = "aegis-announcement-cta";
@@ -4943,9 +4973,7 @@ function renderAnnouncementBar(ctx, card, accent) {
4943
4973
  a.textContent = `${content.ctaText} ›`;
4944
4974
  a.addEventListener("click", (e) => {
4945
4975
  e.preventDefault();
4946
- trackEvent(campaign.id, "clicked");
4947
- if (ctx.navigate) ctx.navigate(url);
4948
- else if (typeof window !== "undefined") window.location.assign(url);
4976
+ go();
4949
4977
  });
4950
4978
  bar.appendChild(a);
4951
4979
  }
@@ -8339,6 +8367,37 @@ function stepsAsFormFields(ic, title) {
8339
8367
  return options.length > 0 ? { key, label, type: "select", options, required: step.required === true } : { key, label, type: "text", required: step.required === true };
8340
8368
  });
8341
8369
  }
8370
+ const MARKETING_CONSENT_KEY = "marketing_consent";
8371
+ const MARKETING_CONSENT_DEFAULT_LABEL = "Send me offers on WhatsApp, SMS and email";
8372
+ const MARKETING_CONSENT_ROW_CLASS = "aegis-in-app-consent";
8373
+ const MARKETING_CONSENT_BOX_CLASS = "aegis-in-app-consent-box";
8374
+ function asksMarketingConsent(ic) {
8375
+ return !!ic && ic.ask_marketing_consent === true;
8376
+ }
8377
+ function marketingConsentLabel() {
8378
+ return MARKETING_CONSENT_DEFAULT_LABEL;
8379
+ }
8380
+ function formPayload(fields, marketingConsent) {
8381
+ return marketingConsent ? { fields, [MARKETING_CONSENT_KEY]: true } : { fields };
8382
+ }
8383
+ function renderMarketingConsentRow(label, text, campaignId) {
8384
+ const row = document.createElement("label");
8385
+ row.className = MARKETING_CONSENT_ROW_CLASS;
8386
+ row.style.cssText = `display: flex; align-items: flex-start; gap: 8px; font-size: 12px; opacity: 0.85; color: ${text}; cursor: pointer; line-height: 1.35;`;
8387
+ const input = document.createElement("input");
8388
+ input.type = "checkbox";
8389
+ input.name = MARKETING_CONSENT_KEY;
8390
+ input.id = `aegis-consent-${campaignId}`;
8391
+ input.className = `aegis-field ${MARKETING_CONSENT_BOX_CLASS}`;
8392
+ input.checked = false;
8393
+ input.style.cssText = `margin: 1px 0 0; width: 16px; height: 16px; flex: 0 0 16px; accent-color: ${text}; cursor: pointer;`;
8394
+ row.htmlFor = input.id;
8395
+ const words = document.createElement("span");
8396
+ words.textContent = label;
8397
+ row.appendChild(input);
8398
+ row.appendChild(words);
8399
+ return { row, input };
8400
+ }
8342
8401
  const SECTION_SPOT_SELECTOR_PREFIX = "[data-aegis-section-spot=";
8343
8402
  function isSectionSpotSelector(selector) {
8344
8403
  return typeof selector === "string" && selector.trim().startsWith(SECTION_SPOT_SELECTOR_PREFIX);
@@ -9712,10 +9771,6 @@ const _AegisInAppManager = class _AegisInAppManager {
9712
9771
  void this.trackEvent(c.id, "served");
9713
9772
  }
9714
9773
  }
9715
- // --- Client Context Helpers (Critical Fix B) ---
9716
- detectDeviceType() {
9717
- return detectDeviceType();
9718
- }
9719
9774
  // --- A/B Assignment Persistence (Critical Fix C) ---
9720
9775
  // Both A/B helpers sit on the campaign-fetch path, so blocked storage
9721
9776
  // (where even `typeof localStorage` throws) must not abort the fetch.
@@ -10820,6 +10875,7 @@ const _AegisInAppManager = class _AegisInAppManager {
10820
10875
  /**
10821
10876
  * §7.13.I — embedded profile FORM. Renders one input per `form_fields` entry
10822
10877
  * and, on submit, POSTs `{response_type:'form', payload:{fields:{key:value}}}`
10878
+ * (plus `marketing_consent: true` when the Q5 permission box was ticked)
10823
10879
  * to `/in-app/responses` — the cell-plane enrichment writes the mapped answers
10824
10880
  * back onto the contact. Keyed by each field's `key` so it matches the
10825
10881
  * campaign's field→contact map.
@@ -10919,6 +10975,13 @@ const _AegisInAppManager = class _AegisInAppManager {
10919
10975
  wrap.appendChild(ctrl);
10920
10976
  body.appendChild(wrap);
10921
10977
  }
10978
+ const consentIc = campaign.interactive_config;
10979
+ let consentBox = null;
10980
+ if (asksMarketingConsent(consentIc)) {
10981
+ const consent = renderMarketingConsentRow(marketingConsentLabel(), text, campaign.id);
10982
+ consentBox = consent.input;
10983
+ body.appendChild(consent.row);
10984
+ }
10922
10985
  const submit = document.createElement("button");
10923
10986
  const _cAny = campaign;
10924
10987
  submit.textContent = typeof _cAny.button_text === "string" && _cAny.button_text || "Save";
@@ -10936,7 +10999,7 @@ const _AegisInAppManager = class _AegisInAppManager {
10936
10999
  if (v) collected[key] = v;
10937
11000
  }
10938
11001
  if (!ok || Object.keys(collected).length === 0) return;
10939
- void this.submitFormResponse(campaign, collected);
11002
+ void this.submitFormResponse(campaign, collected, (consentBox == null ? void 0 : consentBox.checked) === true);
10940
11003
  void this.trackEvent(campaign.id, "clicked", { meta: { fields: Object.keys(collected) } });
10941
11004
  while (body.firstChild) body.removeChild(body.firstChild);
10942
11005
  const modalEl = body.parentElement;
@@ -10962,7 +11025,7 @@ const _AegisInAppManager = class _AegisInAppManager {
10962
11025
  }
10963
11026
  /** POST a form response to /in-app/responses (gateway → cell-plane). The
10964
11027
  * cell-plane enriches the contact from the campaign's field-map. Best-effort. */
10965
- async submitFormResponse(campaign, fields) {
11028
+ async submitFormResponse(campaign, fields, marketingConsent = false) {
10966
11029
  if (this.previewOnly) return;
10967
11030
  if (!this.organizationId) {
10968
11031
  this.log("submitFormResponse: no organizationId — cannot submit", "warn");
@@ -10992,7 +11055,9 @@ const _AegisInAppManager = class _AegisInAppManager {
10992
11055
  variant_id: variantId,
10993
11056
  platform: "web",
10994
11057
  ad_click_ids: readAdClickIdsFromStorage(),
10995
- payload: { fields }
11058
+ // `{fields}` + `marketing_consent: true` only when the Q5 box was
11059
+ // ticked (marketing-consent.ts); unticked sends no key.
11060
+ payload: formPayload(fields, marketingConsent)
10996
11061
  })
10997
11062
  });
10998
11063
  if (!res.ok) this.log(`submitFormResponse failed (${res.status})`, "warn");
@@ -17175,14 +17240,6 @@ class AegisWidgetManager {
17175
17240
  bubble.setAttribute("data-aegis-widget-root", "");
17176
17241
  document.body.appendChild(bubble);
17177
17242
  }
17178
- getUTMParams() {
17179
- const params = new URLSearchParams(window.location.search);
17180
- return {
17181
- utm_source: params.get("utm_source") || void 0,
17182
- utm_medium: params.get("utm_medium") || void 0,
17183
- utm_campaign: params.get("utm_campaign") || void 0
17184
- };
17185
- }
17186
17243
  renderToast(widget) {
17187
17244
  const { message, icon, duration } = widget.config;
17188
17245
  const position = widget.position || "bottom_left";
@@ -18158,7 +18215,7 @@ const _AegisMessageRuntime = class _AegisMessageRuntime {
18158
18215
  this.initialized = false;
18159
18216
  this.armedInAppTriggers = /* @__PURE__ */ new Set();
18160
18217
  {
18161
- const v = "1.53.0";
18218
+ const v = "1.55.0";
18162
18219
  try {
18163
18220
  globalThis.__AEGIS_SDK_VERSION__ = v;
18164
18221
  } catch {