@apextelemed/partner-core 0.18.0-dev.60 → 0.18.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/api/index.d.ts +23 -2
- package/dist/api/index.js +4 -4
- package/dist/api/index.jsx +8 -4
- package/dist/chunk/{CDRUVUTJ.js → 22EFLJGO.js} +18 -8
- package/dist/chunk/22EFLJGO.js.map +1 -0
- package/dist/chunk/{EED3KNR7.jsx → 2Q4GK4WD.jsx} +41 -3
- package/dist/chunk/{GJSE37VN.js → BPF2SSKF.js} +3 -3
- package/dist/chunk/{GJSE37VN.js.map → BPF2SSKF.js.map} +1 -1
- package/dist/chunk/{OOMMZESR.js → CED3IYWX.js} +40 -4
- package/dist/chunk/CED3IYWX.js.map +1 -0
- package/dist/chunk/ESNAWOHG.jsx +1 -0
- package/dist/chunk/{OZHJ5IGL.jsx → FL3DS5WN.jsx} +370 -131
- package/dist/chunk/{UZ2K7HBG.js → GSYL4J57.js} +1828 -800
- package/dist/chunk/GSYL4J57.js.map +1 -0
- package/dist/chunk/{33BDC6MT.jsx → GULO22W6.jsx} +2 -2
- package/dist/chunk/{HEQLEGHI.js → GYAT2X65.js} +43 -3
- package/dist/chunk/GYAT2X65.js.map +1 -0
- package/dist/chunk/{LA6F37YV.jsx → I7L5WVA2.jsx} +20 -7
- package/dist/chunk/{X6WJQ47H.jsx → PWEK34Q4.jsx} +42 -2
- package/dist/chunk/{TFJKTKZ3.jsx → U5DE7VZP.jsx} +2350 -1670
- package/dist/chunk/{WTHAR2P2.js → UM5K75Y4.js} +3 -3
- package/dist/chunk/{WTHAR2P2.js.map → UM5K75Y4.js.map} +1 -1
- package/dist/chunk/{ZWAZNB4Y.jsx → W5QWCMTE.jsx} +2 -2
- package/dist/chunk/{VGF2LLAD.js → XPYBZU45.js} +240 -14
- package/dist/chunk/XPYBZU45.js.map +1 -0
- package/dist/chunk/XZVVZIRZ.js +3 -0
- package/dist/chunk/XZVVZIRZ.js.map +1 -0
- package/dist/{client-CMbSYUam.d.ts → client-BQ8AEx5S.d.ts} +155 -2
- package/dist/flows/index.d.ts +113 -2
- package/dist/flows/index.js +6 -6
- package/dist/flows/index.jsx +14 -6
- package/dist/index/index.d.ts +26 -5
- package/dist/index/index.js +8 -8
- package/dist/index/index.jsx +22 -8
- package/dist/pages/index.d.ts +2 -2
- package/dist/pages/index.js +5 -5
- package/dist/pages/index.jsx +5 -5
- package/dist/stores/index.d.ts +1 -1
- package/dist/stores/index.js +2 -2
- package/dist/stores/index.jsx +2 -2
- package/dist/theme/member-portal.css +43 -0
- package/package.json +1 -1
- package/dist/chunk/ACE7M2YA.jsx +0 -1
- package/dist/chunk/CDRUVUTJ.js.map +0 -1
- package/dist/chunk/HEQLEGHI.js.map +0 -1
- package/dist/chunk/JSHO46VZ.js +0 -3
- package/dist/chunk/JSHO46VZ.js.map +0 -1
- package/dist/chunk/OOMMZESR.js.map +0 -1
- package/dist/chunk/UZ2K7HBG.js.map +0 -1
- package/dist/chunk/VGF2LLAD.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { peekFunnelSessionId, captureAuthHeader } from './
|
|
1
|
+
import { peekFunnelSessionId, captureAuthHeader } from './CED3IYWX.js';
|
|
2
2
|
import { getConfig } from './2IFPDU4D.js';
|
|
3
3
|
|
|
4
4
|
// src/api/promoRef.ts
|
|
@@ -156,5 +156,5 @@ function stripCartToken() {
|
|
|
156
156
|
}
|
|
157
157
|
|
|
158
158
|
export { adoptCartId, capturePromoCode, cartId, clearPromoCode, fetchCartConfig, fetchResumedCart, postCartSnapshot, readCartToken, readPromoCode, resetCartConfigCache, resetCartId, stripCartToken };
|
|
159
|
-
//# sourceMappingURL=
|
|
160
|
-
//# sourceMappingURL=
|
|
159
|
+
//# sourceMappingURL=UM5K75Y4.js.map
|
|
160
|
+
//# sourceMappingURL=UM5K75Y4.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/api/promo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7B,eAAe,OAAO,IAAA,CAAK,aAAA,KAAkB,QAAA,GAAW,KAAK,aAAA,GAAgB;AAAA,KAC/E;AAAA,EACF,CAAA,CAAA,MAAQ;AACN,IAAA,OAAO,IAAA;AAAA,EACT;AACF;AAGO,SAAS,aAAA,GAA+B;AAC7C,EAAA,IAAI;AACF,IAAA,MAAM,KAAA,GAAQ,IAAI,eAAA,CAAgB,MAAA,CAAO,SAAS,MAAM,CAAA,CAAE,IAAI,MAAM,CAAA;AACpE,IAAA,OAAO,KAAA,IAAS,KAAA,CAAM,MAAA,GAAS,CAAA,GAAI,KAAA,GAAQ,IAAA;AAAA,EAC7C,CAAA,CAAA,MAAQ;AACN,IAAA,OAAO,IAAA;AAAA,EACT;AACF;AAOO,SAAS,cAAA,GAAuB;AACrC,EAAA,IAAI;AACF,IAAA,MAAM,GAAA,GAAM,IAAI,GAAA,CAAI,MAAA,CAAO,SAAS,IAAI,CAAA;AACxC,IAAA,IAAI,CAAC,GAAA,CAAI,YAAA,CAAa,GAAA,CAAI,MAAM,CAAA,EAAG;AACnC,IAAA,GAAA,CAAI,YAAA,CAAa,OAAO,MAAM,CAAA;AAC9B,IAAA,MAAA,CAAO,QAAQ,YAAA,CAAa,IAAI,EAAA,EAAI,GAAA,CAAI,UAAU,CAAA;AAAA,EACpD,CAAA,CAAA,MAAQ;AAAA,EAER;AACF","file":"WTHAR2P2.js","sourcesContent":["// ── First-party promo-code capture from a `?promo=` landing ──────────\n//\n// A campaign link can carry its own code (`/?promo=TRUE10`) so the member does\n// not have to type it. Stashed in the storefront's own localStorage and read\n// back when the intake reaches the promo field.\n//\n// Mirrors `affiliateRef` deliberately — same storage shape, same 30-day window —\n// but is a SEPARATE concern: an affiliate ref attributes a sale to a partner and\n// is validated server-side at checkout, while this only pre-fills an input the\n// member still has to submit.\n\nimport { getConfig } from '../config';\n\n// Matches the affiliate-ref window. A stash that outlives the promo it carries\n// is not a correctness problem — the code is re-validated before it is used,\n// and silently dropped if it has expired — but there is no reason to keep one\n// around longer than a campaign plausibly runs.\nconst TTL_MS = 30 * 24 * 60 * 60 * 1000;\n\nconst storageKey = () => `${getConfig().storagePrefix}-promo-code`;\n\ninterface StoredPromo {\n code: string;\n ts: number;\n}\n\n/** Persist a promo code from a `?promo=` landing. No-op for empty input. */\nexport function capturePromoCode(code: string): void {\n if (typeof localStorage === 'undefined') return;\n const trimmed = code.trim();\n if (!trimmed) return;\n try {\n const entry: StoredPromo = { code: trimmed, ts: Date.now() };\n localStorage.setItem(storageKey(), JSON.stringify(entry));\n } catch {\n // storage unavailable (private mode / quota) — non-fatal\n }\n}\n\n/**\n * Read the stored promo code, or null if absent or past the storage window.\n *\n * Being within the window says nothing about whether the CODE is still valid —\n * a campaign can end while the stash is fresh. The caller re-validates against\n * the server before showing it to anyone.\n */\nexport function readPromoCode(): string | null {\n if (typeof localStorage === 'undefined') return null;\n try {\n const raw = localStorage.getItem(storageKey());\n if (!raw) return null;\n const parsed = JSON.parse(raw) as Partial<StoredPromo>;\n if (!parsed.code || typeof parsed.ts !== 'number') return null;\n if (Date.now() - parsed.ts > TTL_MS) {\n localStorage.removeItem(storageKey());\n return null;\n }\n return parsed.code;\n } catch {\n return null;\n }\n}\n\n/** Drop the stored promo code. */\nexport function clearPromoCode(): void {\n if (typeof localStorage === 'undefined') return;\n try {\n localStorage.removeItem(storageKey());\n } catch {\n // non-fatal\n }\n}\n","import { getConfig } from '../config';\nimport { captureAuthHeader, peekFunnelSessionId } from './funnel';\n\n// ── Abandoned-cart transport ────────────────────────────────────────────────\n//\n// Thin client for the-backend's cart-capture endpoints:\n// GET /config/cart → whether this tenant mirrors carts at all\n// POST /cart/snapshot → server-side mirror of the browser's cart\n// GET /cart/resume → trade an emailed token for the saved cart\n//\n// Sibling of ./funnel, and the same posture: fire-and-forget, fail-silent.\n// Cart capture is marketing instrumentation and must never break, block or\n// slow down shopping.\n\nexport interface CartCaptureConfig {\n /** Tenant opted in (features.cartRecovery); false = never send anything. */\n snapshot: boolean;\n}\n\nconst DISABLED: CartCaptureConfig = { snapshot: false };\n\nlet configPromise: Promise<CartCaptureConfig> | null = null;\n\n/**\n * The tenant's cart-capture posture, fetched once per page load and cached.\n * Fails closed: any error reads as \"off\".\n */\nexport function fetchCartConfig(): Promise<CartCaptureConfig> {\n if (!configPromise) {\n configPromise = (async () => {\n try {\n const cfg = getConfig();\n const res = await fetch(`${cfg.apiBase}/config/cart`, {\n headers: { 'X-Tenant-Key': cfg.tenantKey },\n });\n if (!res.ok) return DISABLED;\n const body = (await res.json()) as Partial<CartCaptureConfig>;\n return { snapshot: body.snapshot === true };\n } catch {\n return DISABLED;\n }\n })();\n }\n return configPromise;\n}\n\n/** Test seam: forget the cached config so the next fetch re-resolves. */\nexport function resetCartConfigCache(): void {\n configPromise = null;\n}\n\nconst cartIdKey = () => `${getConfig().storagePrefix}-cart-id`;\n\n/**\n * Stable id for this shopper's cart, minted on first use and kept in\n * localStorage — NOT sessionStorage like the survey session.\n *\n * A cart outlives the tab it was filled in: someone adds items, closes the\n * browser, comes back tomorrow and finds the cart still there (the cart store\n * itself persists the same way). The id has to survive with it, or every visit\n * would look like a brand-new abandoned cart and one shopper would accumulate\n * a row — and a reminder track — per session.\n */\nexport function cartId(): string {\n let id: string | null = null;\n try {\n id = localStorage.getItem(cartIdKey());\n } catch {\n /* storage unavailable (private mode) — fall through to an ephemeral id */\n }\n if (!id) {\n id =\n typeof crypto !== 'undefined' && 'randomUUID' in crypto\n ? crypto.randomUUID()\n : `${Date.now()}-${Math.random().toString(36).slice(2)}`;\n try {\n localStorage.setItem(cartIdKey(), id);\n } catch {\n /* ephemeral it is */\n }\n }\n return id;\n}\n\n/**\n * Continue the cart a recovery email points at, instead of the one this browser\n * happens to hold. Adopting the emailed id keeps the reminder history, the\n * email address and the eventual conversion on ONE row.\n */\nexport function adoptCartId(id: string): void {\n if (!id) return;\n try {\n localStorage.setItem(cartIdKey(), id);\n } catch {\n /* storage unavailable — the adoption is ephemeral */\n }\n}\n\n/**\n * Start a fresh cart id. Called after a purchase: the old id is stamped\n * converted server-side and must never be written to again, or a new cart\n * would inherit a bought cart's row (and its silence — converted rows are\n * never nudged).\n */\nexport function resetCartId(): void {\n try {\n localStorage.removeItem(cartIdKey());\n } catch {\n /* nothing to clear */\n }\n}\n\nexport interface CartSnapshotLine {\n productId: string;\n dosage?: string;\n quantity: number;\n}\n\n/**\n * Mirror the cart server-side. Identity only — the backend re-prices from the\n * catalog and ignores anything else we send, so there is no point shipping\n * names or prices.\n *\n * `keepalive` lets the request survive the page unload that so often IS the\n * abandonment.\n *\n * The bearer token, when there is one, is how a signed-in shopper's cart gets\n * their user id: the endpoint takes identity from the token and never from the\n * body (`optionalAuth`), so omitting it left every logged-in cart anonymous —\n * joinable only by whatever email happened to be attached.\n */\nexport function postCartSnapshot(params: {\n items: CartSnapshotLine[];\n promoCode?: string | null;\n email?: string | null;\n}): void {\n try {\n const cfg = getConfig();\n void fetch(`${cfg.apiBase}/cart/snapshot`, {\n method: 'POST',\n keepalive: true,\n headers: {\n 'Content-Type': 'application/json',\n 'X-Tenant-Key': cfg.tenantKey,\n ...captureAuthHeader(),\n },\n body: JSON.stringify({\n cartId: cartId(),\n items: params.items,\n promoCode: params.promoCode ?? null,\n ...(params.email ? { email: params.email } : {}),\n // Only when a survey session already exists: it lets the backend reuse\n // the address the pre-survey email gate collected, which is often the\n // only handle we have on an anonymous shopper.\n ...(peekFunnelSessionId() ? { sessionId: peekFunnelSessionId() } : {}),\n }),\n }).catch(() => {});\n } catch {\n /* not configured yet — drop */\n }\n}\n\n/** A resumed cart line, already re-priced against today's catalog. */\nexport interface ResumedCartLine {\n productId: string;\n dosage?: string;\n quantity: number;\n name: string;\n priceCents: number;\n salePriceCents: number | null;\n thumbnailUrl: string | null;\n isSubscription: boolean;\n apexDrugId: string | null;\n categories: string[];\n hideDoseLabel: boolean;\n}\n\nexport interface ResumedCart {\n cartId: string;\n items: ResumedCartLine[];\n /** Lines whose product has since been discontinued or deactivated. */\n unavailable: Array<{ productId: string; dosage?: string; quantity: number }>;\n promoCode: string | null;\n subtotalCents: number;\n}\n\n/**\n * Exchange an emailed recovery token for the saved cart.\n *\n * The token is the ONLY thing authorizing this read — the-backend verifies its\n * HMAC before returning anything. A 404 (expired, already bought, tampered, or\n * every product gone) resolves to null so the caller simply keeps whatever cart\n * this browser already had.\n */\nexport async function fetchResumedCart(token: string): Promise<ResumedCart | null> {\n try {\n const cfg = getConfig();\n const res = await fetch(`${cfg.apiBase}/cart/resume?token=${encodeURIComponent(token)}`, {\n headers: { 'X-Tenant-Key': cfg.tenantKey },\n });\n if (!res.ok) return null;\n const body = (await res.json()) as Partial<ResumedCart>;\n if (!body.cartId || !Array.isArray(body.items) || body.items.length === 0) return null;\n return {\n cartId: body.cartId,\n items: body.items,\n unavailable: Array.isArray(body.unavailable) ? body.unavailable : [],\n promoCode: body.promoCode ?? null,\n subtotalCents: typeof body.subtotalCents === 'number' ? body.subtotalCents : 0,\n };\n } catch {\n return null;\n }\n}\n\n/** Read the `?cart=` token from the current URL. */\nexport function readCartToken(): string | null {\n try {\n const token = new URLSearchParams(window.location.search).get('cart');\n return token && token.length > 0 ? token : null;\n } catch {\n return null;\n }\n}\n\n/**\n * Drop `?cart=` from the address bar once it's been redeemed, so a refresh (or\n * a shared URL) doesn't re-run the restore over a cart the shopper has since\n * edited. History is replaced, not pushed — the token was never a page.\n */\nexport function stripCartToken(): void {\n try {\n const url = new URL(window.location.href);\n if (!url.searchParams.has('cart')) return;\n url.searchParams.delete('cart');\n window.history.replaceState({}, '', url.toString());\n } catch {\n /* no history API — leaving the param is harmless */\n }\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../../src/api/promoRef.ts","../../src/api/cart.ts"],"names":[],"mappings":";;;;AAiBA,IAAM,MAAA,GAAS,EAAA,GAAK,EAAA,GAAK,EAAA,GAAK,EAAA,GAAK,GAAA;AAEnC,IAAM,UAAA,GAAa,MAAM,CAAA,EAAG,SAAA,GAAY,aAAa,CAAA,WAAA,CA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AI;AACF,IAAA,MAAM,KAAA,GAAQ,IAAI,eAAA,CAAgB,MAAA,CAAO,SAAS,MAAM,CAAA,CAAE,IAAI,MAAM,CAAA;AACpE,IAAA,OAAO,KAAA,IAAS,KAAA,CAAM,MAAA,GAAS,CAAA,GAAI,KAAA,GAAQ,IAAA;AAAA,EAC7C,CAAA,CAAA,MAAQ;AACN,IAAA,OAAO,IAAA;AAAA,EACT;AACF;AAOO,SAAS,cAAA,GAAuB;AACrC,EAAA,IAAI;AACF,IAAA,MAAM,GAAA,GAAM,IAAI,GAAA,CAAI,MAAA,CAAO,SAAS,IAAI,CAAA;AACxC,IAAA,IAAI,CAAC,GAAA,CAAI,YAAA,CAAa,GAAA,CAAI,MAAM,CAAA,EAAG;AACnC,IAAA,GAAA,CAAI,YAAA,CAAa,OAAO,MAAM,CAAA;AAC9B,IAAA,MAAA,CAAO,QAAQ,YAAA,CAAa,IAAI,EAAA,EAAI,GAAA,CAAI,UAAU,CAAA;AAAA,EACpD,CAAA,CAAA,MAAQ;AAAA,EAER;AACF","file":"UM5K75Y4.js","sourcesContent":["// ── First-party promo-code capture from a `?promo=` landing ──────────\n//\n// A campaign link can carry its own code (`/?promo=TRUE10`) so the member does\n// not have to type it. Stashed in the storefront's own localStorage and read\n// back when the intake reaches the promo field.\n//\n// Mirrors `affiliateRef` deliberately — same storage shape, same 30-day window —\n// but is a SEPARATE concern: an affiliate ref attributes a sale to a partner and\n// is validated server-side at checkout, while this only pre-fills an input the\n// member still has to submit.\n\nimport { getConfig } from '../config';\n\n// Matches the affiliate-ref window. A stash that outlives the promo it carries\n// is not a correctness problem — the code is re-validated before it is used,\n// and silently dropped if it has expired — but there is no reason to keep one\n// around longer than a campaign plausibly runs.\nconst TTL_MS = 30 * 24 * 60 * 60 * 1000;\n\nconst storageKey = () => `${getConfig().storagePrefix}-promo-code`;\n\ninterface StoredPromo {\n code: string;\n ts: number;\n}\n\n/** Persist a promo code from a `?promo=` landing. No-op for empty input. */\nexport function capturePromoCode(code: string): void {\n if (typeof localStorage === 'undefined') return;\n const trimmed = code.trim();\n if (!trimmed) return;\n try {\n const entry: StoredPromo = { code: trimmed, ts: Date.now() };\n localStorage.setItem(storageKey(), JSON.stringify(entry));\n } catch {\n // storage unavailable (private mode / quota) — non-fatal\n }\n}\n\n/**\n * Read the stored promo code, or null if absent or past the storage window.\n *\n * Being within the window says nothing about whether the CODE is still valid —\n * a campaign can end while the stash is fresh. The caller re-validates against\n * the server before showing it to anyone.\n */\nexport function readPromoCode(): string | null {\n if (typeof localStorage === 'undefined') return null;\n try {\n const raw = localStorage.getItem(storageKey());\n if (!raw) return null;\n const parsed = JSON.parse(raw) as Partial<StoredPromo>;\n if (!parsed.code || typeof parsed.ts !== 'number') return null;\n if (Date.now() - parsed.ts > TTL_MS) {\n localStorage.removeItem(storageKey());\n return null;\n }\n return parsed.code;\n } catch {\n return null;\n }\n}\n\n/** Drop the stored promo code. */\nexport function clearPromoCode(): void {\n if (typeof localStorage === 'undefined') return;\n try {\n localStorage.removeItem(storageKey());\n } catch {\n // non-fatal\n }\n}\n","import { getConfig } from '../config';\nimport { captureAuthHeader, peekFunnelSessionId } from './funnel';\n\n// ── Abandoned-cart transport ────────────────────────────────────────────────\n//\n// Thin client for the-backend's cart-capture endpoints:\n// GET /config/cart → whether this tenant mirrors carts at all\n// POST /cart/snapshot → server-side mirror of the browser's cart\n// GET /cart/resume → trade an emailed token for the saved cart\n//\n// Sibling of ./funnel, and the same posture: fire-and-forget, fail-silent.\n// Cart capture is marketing instrumentation and must never break, block or\n// slow down shopping.\n\nexport interface CartCaptureConfig {\n /** Tenant opted in (features.cartRecovery); false = never send anything. */\n snapshot: boolean;\n}\n\nconst DISABLED: CartCaptureConfig = { snapshot: false };\n\nlet configPromise: Promise<CartCaptureConfig> | null = null;\n\n/**\n * The tenant's cart-capture posture, fetched once per page load and cached.\n * Fails closed: any error reads as \"off\".\n */\nexport function fetchCartConfig(): Promise<CartCaptureConfig> {\n if (!configPromise) {\n configPromise = (async () => {\n try {\n const cfg = getConfig();\n const res = await fetch(`${cfg.apiBase}/config/cart`, {\n headers: { 'X-Tenant-Key': cfg.tenantKey },\n });\n if (!res.ok) return DISABLED;\n const body = (await res.json()) as Partial<CartCaptureConfig>;\n return { snapshot: body.snapshot === true };\n } catch {\n return DISABLED;\n }\n })();\n }\n return configPromise;\n}\n\n/** Test seam: forget the cached config so the next fetch re-resolves. */\nexport function resetCartConfigCache(): void {\n configPromise = null;\n}\n\nconst cartIdKey = () => `${getConfig().storagePrefix}-cart-id`;\n\n/**\n * Stable id for this shopper's cart, minted on first use and kept in\n * localStorage — NOT sessionStorage like the survey session.\n *\n * A cart outlives the tab it was filled in: someone adds items, closes the\n * browser, comes back tomorrow and finds the cart still there (the cart store\n * itself persists the same way). The id has to survive with it, or every visit\n * would look like a brand-new abandoned cart and one shopper would accumulate\n * a row — and a reminder track — per session.\n */\nexport function cartId(): string {\n let id: string | null = null;\n try {\n id = localStorage.getItem(cartIdKey());\n } catch {\n /* storage unavailable (private mode) — fall through to an ephemeral id */\n }\n if (!id) {\n id =\n typeof crypto !== 'undefined' && 'randomUUID' in crypto\n ? crypto.randomUUID()\n : `${Date.now()}-${Math.random().toString(36).slice(2)}`;\n try {\n localStorage.setItem(cartIdKey(), id);\n } catch {\n /* ephemeral it is */\n }\n }\n return id;\n}\n\n/**\n * Continue the cart a recovery email points at, instead of the one this browser\n * happens to hold. Adopting the emailed id keeps the reminder history, the\n * email address and the eventual conversion on ONE row.\n */\nexport function adoptCartId(id: string): void {\n if (!id) return;\n try {\n localStorage.setItem(cartIdKey(), id);\n } catch {\n /* storage unavailable — the adoption is ephemeral */\n }\n}\n\n/**\n * Start a fresh cart id. Called after a purchase: the old id is stamped\n * converted server-side and must never be written to again, or a new cart\n * would inherit a bought cart's row (and its silence — converted rows are\n * never nudged).\n */\nexport function resetCartId(): void {\n try {\n localStorage.removeItem(cartIdKey());\n } catch {\n /* nothing to clear */\n }\n}\n\nexport interface CartSnapshotLine {\n productId: string;\n dosage?: string;\n quantity: number;\n}\n\n/**\n * Mirror the cart server-side. Identity only — the backend re-prices from the\n * catalog and ignores anything else we send, so there is no point shipping\n * names or prices.\n *\n * `keepalive` lets the request survive the page unload that so often IS the\n * abandonment.\n *\n * The bearer token, when there is one, is how a signed-in shopper's cart gets\n * their user id: the endpoint takes identity from the token and never from the\n * body (`optionalAuth`), so omitting it left every logged-in cart anonymous —\n * joinable only by whatever email happened to be attached.\n */\nexport function postCartSnapshot(params: {\n items: CartSnapshotLine[];\n promoCode?: string | null;\n email?: string | null;\n}): void {\n try {\n const cfg = getConfig();\n void fetch(`${cfg.apiBase}/cart/snapshot`, {\n method: 'POST',\n keepalive: true,\n headers: {\n 'Content-Type': 'application/json',\n 'X-Tenant-Key': cfg.tenantKey,\n ...captureAuthHeader(),\n },\n body: JSON.stringify({\n cartId: cartId(),\n items: params.items,\n promoCode: params.promoCode ?? null,\n ...(params.email ? { email: params.email } : {}),\n // Only when a survey session already exists: it lets the backend reuse\n // the address the pre-survey email gate collected, which is often the\n // only handle we have on an anonymous shopper.\n ...(peekFunnelSessionId() ? { sessionId: peekFunnelSessionId() } : {}),\n }),\n }).catch(() => {});\n } catch {\n /* not configured yet — drop */\n }\n}\n\n/** A resumed cart line, already re-priced against today's catalog. */\nexport interface ResumedCartLine {\n productId: string;\n dosage?: string;\n quantity: number;\n name: string;\n priceCents: number;\n salePriceCents: number | null;\n thumbnailUrl: string | null;\n isSubscription: boolean;\n apexDrugId: string | null;\n categories: string[];\n hideDoseLabel: boolean;\n}\n\nexport interface ResumedCart {\n cartId: string;\n items: ResumedCartLine[];\n /** Lines whose product has since been discontinued or deactivated. */\n unavailable: Array<{ productId: string; dosage?: string; quantity: number }>;\n promoCode: string | null;\n subtotalCents: number;\n}\n\n/**\n * Exchange an emailed recovery token for the saved cart.\n *\n * The token is the ONLY thing authorizing this read — the-backend verifies its\n * HMAC before returning anything. A 404 (expired, already bought, tampered, or\n * every product gone) resolves to null so the caller simply keeps whatever cart\n * this browser already had.\n */\nexport async function fetchResumedCart(token: string): Promise<ResumedCart | null> {\n try {\n const cfg = getConfig();\n const res = await fetch(`${cfg.apiBase}/cart/resume?token=${encodeURIComponent(token)}`, {\n headers: { 'X-Tenant-Key': cfg.tenantKey },\n });\n if (!res.ok) return null;\n const body = (await res.json()) as Partial<ResumedCart>;\n if (!body.cartId || !Array.isArray(body.items) || body.items.length === 0) return null;\n return {\n cartId: body.cartId,\n items: body.items,\n unavailable: Array.isArray(body.unavailable) ? body.unavailable : [],\n promoCode: body.promoCode ?? null,\n subtotalCents: typeof body.subtotalCents === 'number' ? body.subtotalCents : 0,\n };\n } catch {\n return null;\n }\n}\n\n/** Read the `?cart=` token from the current URL. */\nexport function readCartToken(): string | null {\n try {\n const token = new URLSearchParams(window.location.search).get('cart');\n return token && token.length > 0 ? token : null;\n } catch {\n return null;\n }\n}\n\n/**\n * Drop `?cart=` from the address bar once it's been redeemed, so a refresh (or\n * a shared URL) doesn't re-run the restore over a cart the shopper has since\n * edited. History is replaced, not pushed — the token was never a page.\n */\nexport function stripCartToken(): void {\n try {\n const url = new URL(window.location.href);\n if (!url.searchParams.has('cart')) return;\n url.searchParams.delete('cart');\n window.history.replaceState({}, '', url.toString());\n } catch {\n /* no history API — leaving the param is harmless */\n }\n}\n"]}
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
setAffiliateTokens,
|
|
13
13
|
setTokens,
|
|
14
14
|
usersApi
|
|
15
|
-
} from "./
|
|
15
|
+
} from "./PWEK34Q4.jsx";
|
|
16
16
|
import {
|
|
17
17
|
getConfig,
|
|
18
18
|
onConfigured
|
|
@@ -414,4 +414,4 @@ export {
|
|
|
414
414
|
affiliateAuth_default,
|
|
415
415
|
medication_default
|
|
416
416
|
};
|
|
417
|
-
//# sourceMappingURL=
|
|
417
|
+
//# sourceMappingURL=W5QWCMTE.jsx.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { fetchFunnelConfig, postFunnelEvent, readResumeToken, fetchResumedDraft, stripResumeToken, adoptFunnelSessionId, saveFunnelDraft } from './
|
|
2
|
-
import { cart_default, medication_default, auth_default, affiliateAuth_default } from './
|
|
3
|
-
import { newIdempotencyKey, apexApi, usersApi, addressesApi, catalogApi, paymentsApi, subscriptionsApi, membersApi, supportApi, productsApi, affiliatePortalApi, adminApi, adminCatalogApi, adminProductPharmaciesApi, ApiError, ordersApi, adminCatalogConversionApi, messagesApi, authApi } from './
|
|
1
|
+
import { fetchSmsConfig, fetchFunnelConfig, postFunnelEvent, readResumeToken, fetchResumedDraft, stripResumeToken, adoptFunnelSessionId, saveFunnelDraft, resetSmsConfigCache } from './CED3IYWX.js';
|
|
2
|
+
import { cart_default, medication_default, auth_default, affiliateAuth_default } from './BPF2SSKF.js';
|
|
3
|
+
import { newIdempotencyKey, apexApi, usersApi, addressesApi, catalogApi, paymentsApi, subscriptionsApi, membersApi, supportApi, productsApi, affiliatePortalApi, adminApi, adminCatalogApi, adminProductPharmaciesApi, ApiError, ordersApi, adminCatalogConversionApi, messagesApi, authApi } from './GYAT2X65.js';
|
|
4
4
|
import { getConfig } from './2IFPDU4D.js';
|
|
5
5
|
import { createSignal, onMount, createEffect, on, onCleanup, createResource, createMemo } from 'solid-js';
|
|
6
6
|
import { useSurveyV2Flow as useSurveyV2Flow$1 } from '@apextelemed/survey-solid';
|
|
@@ -1512,6 +1512,83 @@ function useCartCheckoutFlow() {
|
|
|
1512
1512
|
submit
|
|
1513
1513
|
};
|
|
1514
1514
|
}
|
|
1515
|
+
|
|
1516
|
+
// src/flows/phone.ts
|
|
1517
|
+
var PHONE_ERROR = "Enter a valid 10-digit US phone number.";
|
|
1518
|
+
function isValidUsPhone(raw) {
|
|
1519
|
+
const digits = raw.replace(/\D/g, "");
|
|
1520
|
+
return digits.length === 10 || digits.length === 11 && digits.startsWith("1");
|
|
1521
|
+
}
|
|
1522
|
+
function formatUsPhone(raw) {
|
|
1523
|
+
const digits = raw.replace(/\D/g, "");
|
|
1524
|
+
const ten = digits.length === 11 && digits.startsWith("1") ? digits.slice(1) : digits;
|
|
1525
|
+
if (ten.length !== 10) return raw;
|
|
1526
|
+
return `(${ten.slice(0, 3)}) ${ten.slice(3, 6)}-${ten.slice(6)}`;
|
|
1527
|
+
}
|
|
1528
|
+
function offerFromConfig(cfg) {
|
|
1529
|
+
if (!cfg.enabled || !cfg.consentText || !cfg.consentTextVersion) return null;
|
|
1530
|
+
return {
|
|
1531
|
+
text: cfg.consentText,
|
|
1532
|
+
textVersion: cfg.consentTextVersion,
|
|
1533
|
+
brandName: cfg.brandName,
|
|
1534
|
+
termsUrl: cfg.termsUrl,
|
|
1535
|
+
privacyUrl: cfg.privacyUrl
|
|
1536
|
+
};
|
|
1537
|
+
}
|
|
1538
|
+
var SMS_CONSENT_PHONE_HINT = "Enter a valid mobile number above to turn this on.";
|
|
1539
|
+
function useSmsConsent(phone, restoredVersion) {
|
|
1540
|
+
const [offer, setOffer] = createSignal(null);
|
|
1541
|
+
const [loaded, setLoaded] = createSignal(false);
|
|
1542
|
+
const [raw, setRaw] = createSignal(false);
|
|
1543
|
+
const phoneOk = () => isValidUsPhone(phone());
|
|
1544
|
+
const enabled = () => offer() !== null && phoneOk();
|
|
1545
|
+
onMount(() => {
|
|
1546
|
+
let alive = true;
|
|
1547
|
+
onCleanup(() => {
|
|
1548
|
+
alive = false;
|
|
1549
|
+
});
|
|
1550
|
+
void fetchSmsConfig().then((cfg) => {
|
|
1551
|
+
if (!alive) return;
|
|
1552
|
+
const next = offerFromConfig(cfg);
|
|
1553
|
+
if (next) {
|
|
1554
|
+
setOffer(next);
|
|
1555
|
+
if (restoredVersion && restoredVersion === next.textVersion && phoneOk()) setRaw(true);
|
|
1556
|
+
}
|
|
1557
|
+
setLoaded(true);
|
|
1558
|
+
});
|
|
1559
|
+
});
|
|
1560
|
+
createEffect(
|
|
1561
|
+
on(
|
|
1562
|
+
phoneOk,
|
|
1563
|
+
(ok) => {
|
|
1564
|
+
if (!ok) setRaw(false);
|
|
1565
|
+
},
|
|
1566
|
+
{ defer: true }
|
|
1567
|
+
)
|
|
1568
|
+
);
|
|
1569
|
+
const checked = () => raw() && enabled();
|
|
1570
|
+
return {
|
|
1571
|
+
offer,
|
|
1572
|
+
checked,
|
|
1573
|
+
setChecked: (v) => {
|
|
1574
|
+
if (v && !enabled()) return;
|
|
1575
|
+
setRaw(v);
|
|
1576
|
+
},
|
|
1577
|
+
enabled,
|
|
1578
|
+
hint: () => offer() && !phoneOk() ? SMS_CONSENT_PHONE_HINT : null,
|
|
1579
|
+
grant: () => {
|
|
1580
|
+
const o = offer();
|
|
1581
|
+
return o && checked() ? { granted: true, textVersion: o.textVersion } : void 0;
|
|
1582
|
+
},
|
|
1583
|
+
draftVersion: () => {
|
|
1584
|
+
if (!loaded()) return restoredVersion;
|
|
1585
|
+
const o = offer();
|
|
1586
|
+
return o && checked() ? o.textVersion : void 0;
|
|
1587
|
+
}
|
|
1588
|
+
};
|
|
1589
|
+
}
|
|
1590
|
+
|
|
1591
|
+
// src/flows/signup.ts
|
|
1515
1592
|
var DRAFT_TTL_MS = 7 * 24 * 3600 * 1e3;
|
|
1516
1593
|
var MAX_RESTORABLE_STEP = 2;
|
|
1517
1594
|
function draftKey() {
|
|
@@ -1558,6 +1635,7 @@ function useSignupFlow(options) {
|
|
|
1558
1635
|
const [password, setPassword] = createSignal("");
|
|
1559
1636
|
const [dateOfBirth, setDateOfBirth] = createSignal(restored.dateOfBirth ?? "");
|
|
1560
1637
|
const [phone, setPhone] = createSignal(restored.phone ?? "");
|
|
1638
|
+
const smsConsent = useSmsConsent(phone, restored.smsConsentVersion);
|
|
1561
1639
|
const [street, setStreet] = createSignal(restored.street ?? "");
|
|
1562
1640
|
const [city, setCity] = createSignal(restored.city ?? "");
|
|
1563
1641
|
const [state, setState] = createSignal(restored.state ?? "");
|
|
@@ -1584,7 +1662,8 @@ function useSignupFlow(options) {
|
|
|
1584
1662
|
street: street(),
|
|
1585
1663
|
city: city(),
|
|
1586
1664
|
state: state(),
|
|
1587
|
-
zip: zip()
|
|
1665
|
+
zip: zip(),
|
|
1666
|
+
smsConsentVersion: smsConsent.draftVersion()
|
|
1588
1667
|
});
|
|
1589
1668
|
});
|
|
1590
1669
|
});
|
|
@@ -1597,6 +1676,7 @@ function useSignupFlow(options) {
|
|
|
1597
1676
|
if (!password().trim()) return "Password is required.";
|
|
1598
1677
|
if (password().length < 8) return "Password must be at least 8 characters.";
|
|
1599
1678
|
if (!phone().trim()) return "Phone number is required.";
|
|
1679
|
+
if (!isValidUsPhone(phone())) return PHONE_ERROR;
|
|
1600
1680
|
if (!/^\d{4}-\d{2}-\d{2}$/.test(dateOfBirth())) return "Enter a valid date of birth.";
|
|
1601
1681
|
const dob = /* @__PURE__ */ new Date(dateOfBirth() + "T00:00:00");
|
|
1602
1682
|
if (Number.isNaN(dob.getTime())) return "Enter a valid date of birth.";
|
|
@@ -1699,6 +1779,7 @@ function useSignupFlow(options) {
|
|
|
1699
1779
|
dosage: i.dosage
|
|
1700
1780
|
})) : void 0;
|
|
1701
1781
|
const savingsMemberId = options.savingsMemberId?.() || void 0;
|
|
1782
|
+
const smsGrant = smsConsent.grant();
|
|
1702
1783
|
await auth_default.signupAndSubscribe(
|
|
1703
1784
|
{
|
|
1704
1785
|
email: email().trim(),
|
|
@@ -1725,7 +1806,8 @@ function useSignupFlow(options) {
|
|
|
1725
1806
|
zip: zip().trim()
|
|
1726
1807
|
},
|
|
1727
1808
|
promoCode: promoCode().trim() || void 0,
|
|
1728
|
-
...savingsMemberId ? { savingsMemberId } : {}
|
|
1809
|
+
...savingsMemberId ? { savingsMemberId } : {},
|
|
1810
|
+
...smsGrant ? { smsConsent: smsGrant } : {}
|
|
1729
1811
|
},
|
|
1730
1812
|
{ idempotencyKey: idempotencyKey() }
|
|
1731
1813
|
);
|
|
@@ -1785,6 +1867,7 @@ function useSignupFlow(options) {
|
|
|
1785
1867
|
setDateOfBirth,
|
|
1786
1868
|
phone,
|
|
1787
1869
|
setPhone,
|
|
1870
|
+
smsConsent,
|
|
1788
1871
|
street,
|
|
1789
1872
|
setStreet,
|
|
1790
1873
|
city,
|
|
@@ -1848,6 +1931,7 @@ function useRegisterFlow() {
|
|
|
1848
1931
|
const [password, setPassword] = createSignal("");
|
|
1849
1932
|
const [dateOfBirth, setDateOfBirth] = createSignal(restored.dateOfBirth ?? "");
|
|
1850
1933
|
const [phone, setPhone] = createSignal(restored.phone ?? "");
|
|
1934
|
+
const smsConsent = useSmsConsent(phone, restored.smsConsentVersion);
|
|
1851
1935
|
const [street, setStreet] = createSignal(restored.street ?? "");
|
|
1852
1936
|
const [city, setCity] = createSignal(restored.city ?? "");
|
|
1853
1937
|
const [state, setState] = createSignal(restored.state ?? "");
|
|
@@ -1868,7 +1952,8 @@ function useRegisterFlow() {
|
|
|
1868
1952
|
street: street(),
|
|
1869
1953
|
city: city(),
|
|
1870
1954
|
state: state(),
|
|
1871
|
-
zip: zip()
|
|
1955
|
+
zip: zip(),
|
|
1956
|
+
smsConsentVersion: smsConsent.draftVersion()
|
|
1872
1957
|
});
|
|
1873
1958
|
});
|
|
1874
1959
|
});
|
|
@@ -1881,6 +1966,7 @@ function useRegisterFlow() {
|
|
|
1881
1966
|
if (!password().trim()) return "Password is required.";
|
|
1882
1967
|
if (password().length < 8) return "Password must be at least 8 characters.";
|
|
1883
1968
|
if (!phone().trim()) return "Phone number is required.";
|
|
1969
|
+
if (!isValidUsPhone(phone())) return PHONE_ERROR;
|
|
1884
1970
|
if (!/^\d{4}-\d{2}-\d{2}$/.test(dateOfBirth())) return "Enter a valid date of birth.";
|
|
1885
1971
|
const dob = /* @__PURE__ */ new Date(dateOfBirth() + "T00:00:00");
|
|
1886
1972
|
if (Number.isNaN(dob.getTime())) return "Enter a valid date of birth.";
|
|
@@ -1953,6 +2039,7 @@ function useRegisterFlow() {
|
|
|
1953
2039
|
setSubmitting(true);
|
|
1954
2040
|
setOutcome({ kind: "submitting" });
|
|
1955
2041
|
try {
|
|
2042
|
+
const smsGrant = smsConsent.grant();
|
|
1956
2043
|
await auth_default.signup({
|
|
1957
2044
|
email: email().trim(),
|
|
1958
2045
|
password: password(),
|
|
@@ -1965,7 +2052,8 @@ function useRegisterFlow() {
|
|
|
1965
2052
|
city: city().trim(),
|
|
1966
2053
|
state: state(),
|
|
1967
2054
|
zip: zip().trim()
|
|
1968
|
-
}
|
|
2055
|
+
},
|
|
2056
|
+
...smsGrant ? { smsConsent: smsGrant } : {}
|
|
1969
2057
|
});
|
|
1970
2058
|
if (finishIfAuthenticated()) return;
|
|
1971
2059
|
if (await reconcileViaLogin()) return;
|
|
@@ -2015,6 +2103,7 @@ function useRegisterFlow() {
|
|
|
2015
2103
|
setDateOfBirth,
|
|
2016
2104
|
phone,
|
|
2017
2105
|
setPhone,
|
|
2106
|
+
smsConsent,
|
|
2018
2107
|
street,
|
|
2019
2108
|
setStreet,
|
|
2020
2109
|
city,
|
|
@@ -5428,7 +5517,7 @@ var REVIEW_STAGES = ["ready_to_commit", "active_not_committed"];
|
|
|
5428
5517
|
function useCatalogConversion(opts) {
|
|
5429
5518
|
const [preview, setPreview] = createSignal(null);
|
|
5430
5519
|
const [phase, setPhase] = createSignal({ kind: "rest" });
|
|
5431
|
-
const [
|
|
5520
|
+
const [notice2, setNotice] = createSignal(null);
|
|
5432
5521
|
const [matches, setMatches] = createSignal({});
|
|
5433
5522
|
const [matchesPlan, setMatchesPlan] = createSignal(void 0);
|
|
5434
5523
|
const [confirming, setConfirming] = createSignal(false);
|
|
@@ -5843,7 +5932,7 @@ function useCatalogConversion(opts) {
|
|
|
5843
5932
|
return {
|
|
5844
5933
|
state,
|
|
5845
5934
|
preview,
|
|
5846
|
-
notice,
|
|
5935
|
+
notice: notice2,
|
|
5847
5936
|
dismissNotice: () => setNotice(null),
|
|
5848
5937
|
busy,
|
|
5849
5938
|
reload,
|
|
@@ -5967,7 +6056,7 @@ function classifyAddPharmacyError(err) {
|
|
|
5967
6056
|
}
|
|
5968
6057
|
function useAddPharmacy(opts) {
|
|
5969
6058
|
const [state, setState] = createSignal({ kind: "idle" });
|
|
5970
|
-
const [
|
|
6059
|
+
const [notice2, setNotice] = createSignal(null);
|
|
5971
6060
|
const [drugs, setDrugs] = createSignal([]);
|
|
5972
6061
|
const [drugsStatus, setDrugsStatus] = createSignal("idle");
|
|
5973
6062
|
const [selected, setSelected] = createSignal("");
|
|
@@ -6241,7 +6330,7 @@ function useAddPharmacy(opts) {
|
|
|
6241
6330
|
return {
|
|
6242
6331
|
state,
|
|
6243
6332
|
busy,
|
|
6244
|
-
notice,
|
|
6333
|
+
notice: notice2,
|
|
6245
6334
|
dismissNotice: () => setNotice(null),
|
|
6246
6335
|
drugs,
|
|
6247
6336
|
drugsStatus,
|
|
@@ -6275,7 +6364,144 @@ function useAddPharmacy(opts) {
|
|
|
6275
6364
|
startOver
|
|
6276
6365
|
};
|
|
6277
6366
|
}
|
|
6367
|
+
var NOTICES = {
|
|
6368
|
+
needs_consent: "Your number was updated. Texts are off for the new number until you turn them on again.",
|
|
6369
|
+
stale_text: "Our text-message terms were updated. Please read the new wording and turn texts on again.",
|
|
6370
|
+
no_phone: "Add a mobile number before turning on texts.",
|
|
6371
|
+
unavailable: "Text messages are not available right now."
|
|
6372
|
+
};
|
|
6373
|
+
var notice = (kind) => ({ kind, message: NOTICES[kind] });
|
|
6374
|
+
function useSmsPreferences() {
|
|
6375
|
+
const [state, setState] = createSignal(null);
|
|
6376
|
+
const [offer, setOffer] = createSignal(null);
|
|
6377
|
+
const [loading, setLoading] = createSignal(true);
|
|
6378
|
+
const [busy, setBusy] = createSignal(false);
|
|
6379
|
+
const [error, setError] = createSignal(null);
|
|
6380
|
+
const [currentNotice, setNotice] = createSignal(null);
|
|
6381
|
+
let alive = true;
|
|
6382
|
+
onCleanup(() => {
|
|
6383
|
+
alive = false;
|
|
6384
|
+
});
|
|
6385
|
+
async function refresh() {
|
|
6386
|
+
const next = await usersApi.getSmsState();
|
|
6387
|
+
if (alive) setState(next);
|
|
6388
|
+
}
|
|
6389
|
+
async function reload() {
|
|
6390
|
+
setLoading(true);
|
|
6391
|
+
try {
|
|
6392
|
+
const [next, cfg] = await Promise.all([usersApi.getSmsState(), fetchSmsConfig()]);
|
|
6393
|
+
if (!alive) return;
|
|
6394
|
+
setState(next);
|
|
6395
|
+
setOffer(offerFromConfig(cfg));
|
|
6396
|
+
} catch {
|
|
6397
|
+
if (alive) setState(null);
|
|
6398
|
+
} finally {
|
|
6399
|
+
if (alive) setLoading(false);
|
|
6400
|
+
}
|
|
6401
|
+
}
|
|
6402
|
+
onMount(() => void reload());
|
|
6403
|
+
async function run(fn) {
|
|
6404
|
+
if (busy()) return false;
|
|
6405
|
+
setBusy(true);
|
|
6406
|
+
setError(null);
|
|
6407
|
+
setNotice(null);
|
|
6408
|
+
try {
|
|
6409
|
+
return await fn() !== false;
|
|
6410
|
+
} catch (err) {
|
|
6411
|
+
setError(err instanceof Error ? err.message : "Something went wrong. Please try again.");
|
|
6412
|
+
return false;
|
|
6413
|
+
} finally {
|
|
6414
|
+
if (alive) setBusy(false);
|
|
6415
|
+
}
|
|
6416
|
+
}
|
|
6417
|
+
async function refused(reason) {
|
|
6418
|
+
if (reason === "stale_text") {
|
|
6419
|
+
resetSmsConfigCache();
|
|
6420
|
+
const cfg = await fetchSmsConfig();
|
|
6421
|
+
if (alive) setOffer(offerFromConfig(cfg));
|
|
6422
|
+
setNotice(notice("stale_text"));
|
|
6423
|
+
} else if (reason === "no_phone") {
|
|
6424
|
+
setNotice(notice("no_phone"));
|
|
6425
|
+
} else {
|
|
6426
|
+
setNotice(notice("unavailable"));
|
|
6427
|
+
await refresh().catch(() => {
|
|
6428
|
+
});
|
|
6429
|
+
}
|
|
6430
|
+
}
|
|
6431
|
+
async function setPhone(raw) {
|
|
6432
|
+
const phone = raw.trim();
|
|
6433
|
+
if (busy()) return false;
|
|
6434
|
+
if (!isValidUsPhone(phone)) {
|
|
6435
|
+
setNotice(null);
|
|
6436
|
+
setError(PHONE_ERROR);
|
|
6437
|
+
return false;
|
|
6438
|
+
}
|
|
6439
|
+
return run(async () => {
|
|
6440
|
+
const hadConsent = state()?.consented === true;
|
|
6441
|
+
await usersApi.updateProfile({ phone });
|
|
6442
|
+
await refresh();
|
|
6443
|
+
if (hadConsent && state()?.consented !== true) setNotice(notice("needs_consent"));
|
|
6444
|
+
});
|
|
6445
|
+
}
|
|
6446
|
+
async function optIn() {
|
|
6447
|
+
return run(async () => {
|
|
6448
|
+
const shown = offer();
|
|
6449
|
+
if (!shown) {
|
|
6450
|
+
setNotice(notice("unavailable"));
|
|
6451
|
+
return false;
|
|
6452
|
+
}
|
|
6453
|
+
try {
|
|
6454
|
+
const res = await usersApi.updateProfile({
|
|
6455
|
+
smsConsent: { granted: true, textVersion: shown.textVersion, source: "profile" }
|
|
6456
|
+
});
|
|
6457
|
+
if (res?.smsConsent?.status === "refused") {
|
|
6458
|
+
await refused(res.smsConsent.reason);
|
|
6459
|
+
return false;
|
|
6460
|
+
}
|
|
6461
|
+
} catch (err) {
|
|
6462
|
+
if (err instanceof ApiError && err.status === 409) {
|
|
6463
|
+
await refused(err.reason);
|
|
6464
|
+
return false;
|
|
6465
|
+
}
|
|
6466
|
+
throw err;
|
|
6467
|
+
}
|
|
6468
|
+
await refresh();
|
|
6469
|
+
});
|
|
6470
|
+
}
|
|
6471
|
+
async function optOut() {
|
|
6472
|
+
return run(async () => {
|
|
6473
|
+
await usersApi.updateProfile({ smsConsent: { granted: false } });
|
|
6474
|
+
await refresh();
|
|
6475
|
+
});
|
|
6476
|
+
}
|
|
6477
|
+
async function setEvent(key, enabled) {
|
|
6478
|
+
return run(async () => {
|
|
6479
|
+
const next = await usersApi.setSmsEvents({ [key]: enabled });
|
|
6480
|
+
if (alive) setState(next);
|
|
6481
|
+
});
|
|
6482
|
+
}
|
|
6483
|
+
return {
|
|
6484
|
+
loading,
|
|
6485
|
+
state,
|
|
6486
|
+
available: () => state()?.available === true,
|
|
6487
|
+
phone: () => state()?.phone ?? null,
|
|
6488
|
+
consented: () => state()?.consented === true,
|
|
6489
|
+
optedOutByStop: () => state()?.optedOutByStop === true,
|
|
6490
|
+
fromNumber: () => state()?.fromNumber,
|
|
6491
|
+
events: () => state()?.events ?? [],
|
|
6492
|
+
showEvents: () => state()?.consented === true && state()?.optedOutByStop !== true,
|
|
6493
|
+
consentOffer: offer,
|
|
6494
|
+
busy,
|
|
6495
|
+
error,
|
|
6496
|
+
notice: currentNotice,
|
|
6497
|
+
reload,
|
|
6498
|
+
setPhone,
|
|
6499
|
+
optIn,
|
|
6500
|
+
optOut,
|
|
6501
|
+
setEvent
|
|
6502
|
+
};
|
|
6503
|
+
}
|
|
6278
6504
|
|
|
6279
|
-
export { ACCOUNT_SOURCE_LABEL, DEFAULT_COLOR_PALETTE, LIFECYCLE_BUCKETS, LIFECYCLE_LABEL, LIFECYCLE_TONE, LIVE_SUBSCRIPTION_STATUSES, MATCH_DEPENDENT_WARNINGS, MATCH_HOW_LABEL, ORPHAN_REASON, READINESS_LABEL, SOURCE_FIELD_NOTE, SUPPORT_CATEGORIES, TERMINAL_SUBSCRIPTION_STATUSES, US_STATES, US_STATE_OPTIONS, accountSource, addCatalogItemAsProduct, applyPriceDrafts, availableStateOptions, availableStates, bestOfferDiscount, buildFulfillmentRows, buildMatrixView, buildRefillView, buildSaveBody, buildStrengthRows, buildTimeline, buildTrackerView, buildTrackingUrl, canLeaveUnmatched, canOfferConversion, captureFunnelEmail, catalogUnavailableMessage, categoryColor, categoryLabel, classifyAddPharmacyError, classifyCatalogError, classifyConversionError, compareStrengths, createCatalogProduct, createFunnelTelemetry, deriveAttention, deriveCatalogAvailabilityDecision, deriveJourney, describeConversion, emailGateAnswered, explainFinding, findStoredDosePrice, firstAddressError, flaggedSubscribers, fmtDay, formatCalendarDate, formatCardNumber, formatConversationTime, formatCvv, formatEventDate, formatExpiry, formatMessageTime, formatRelativeTime, formatStageDate, groupDrugsByPharmacy, hasBlockers, hasConversion, hasErrors, hasStateRestrictions, initialMatches, intakeEvidence, invalidDraftKeys, isCatalogItemId, isCssColorValue, isImageAttachment, isLive, isQuestionVisible, isReconcilable, lifecycleReason, liveDoses, lowestPrice, lowestSalePrice, markEmailGateAnswered, matchKey, matchProblem, matchesComplete, missingPrices, moveInOrder, needsReview, normalizeState, normalizeStates, offerBeatsPromo, offerDurationText, offerSummaryText, orphanKey, parseMoney, pharmacyIsOnProduct, pharmacyLabel, primarySubscription, readinessStatus, reconcileCartAgainstCatalog, reconcileCartLines, redeemResumeLink, removeStoredDosePrice, resetResumeRedemption, resolveCategoryColor, resolveStrengthPrices, resolveSurveyV2DrugIntent, salePriceForBase, skuBindingModeFor, sourceKey, sourceLabel, stateAvailabilityNote, strengthsChanged, subscribeToSupportTopic, toChoices, toTrackerRequest, uploadPrescriptionPhoto, upsertDosePrice, useAddPharmacy, useAddressPair, useAffiliateConversions, useAffiliateDownline, useAffiliateLinks, useAffiliateStats, useCardTokenizer, useCartCheckoutFlow, useCartReconcile, useCatalog, useCatalogAvailability, useCatalogConversion, useCheckoutFlow, useDashboardData, useMedicationSelect, useMemberPortalData, useMessagesThread, useProductCatalogEditor, useProductDetail, useRegisterFlow, useSignupFlow, useSubscribeFlow, useSurveyFlow, useSurveyV2Flow, useUpdatePaymentMethodFlow, validateAddress, visibleWarnings };
|
|
6280
|
-
//# sourceMappingURL=
|
|
6281
|
-
//# sourceMappingURL=
|
|
6505
|
+
export { ACCOUNT_SOURCE_LABEL, DEFAULT_COLOR_PALETTE, LIFECYCLE_BUCKETS, LIFECYCLE_LABEL, LIFECYCLE_TONE, LIVE_SUBSCRIPTION_STATUSES, MATCH_DEPENDENT_WARNINGS, MATCH_HOW_LABEL, ORPHAN_REASON, PHONE_ERROR, READINESS_LABEL, SOURCE_FIELD_NOTE, SUPPORT_CATEGORIES, TERMINAL_SUBSCRIPTION_STATUSES, US_STATES, US_STATE_OPTIONS, accountSource, addCatalogItemAsProduct, applyPriceDrafts, availableStateOptions, availableStates, bestOfferDiscount, buildFulfillmentRows, buildMatrixView, buildRefillView, buildSaveBody, buildStrengthRows, buildTimeline, buildTrackerView, buildTrackingUrl, canLeaveUnmatched, canOfferConversion, captureFunnelEmail, catalogUnavailableMessage, categoryColor, categoryLabel, classifyAddPharmacyError, classifyCatalogError, classifyConversionError, compareStrengths, createCatalogProduct, createFunnelTelemetry, deriveAttention, deriveCatalogAvailabilityDecision, deriveJourney, describeConversion, emailGateAnswered, explainFinding, findStoredDosePrice, firstAddressError, flaggedSubscribers, fmtDay, formatCalendarDate, formatCardNumber, formatConversationTime, formatCvv, formatEventDate, formatExpiry, formatMessageTime, formatRelativeTime, formatStageDate, formatUsPhone, groupDrugsByPharmacy, hasBlockers, hasConversion, hasErrors, hasStateRestrictions, initialMatches, intakeEvidence, invalidDraftKeys, isCatalogItemId, isCssColorValue, isImageAttachment, isLive, isQuestionVisible, isReconcilable, isValidUsPhone, lifecycleReason, liveDoses, lowestPrice, lowestSalePrice, markEmailGateAnswered, matchKey, matchProblem, matchesComplete, missingPrices, moveInOrder, needsReview, normalizeState, normalizeStates, offerBeatsPromo, offerDurationText, offerSummaryText, orphanKey, parseMoney, pharmacyIsOnProduct, pharmacyLabel, primarySubscription, readinessStatus, reconcileCartAgainstCatalog, reconcileCartLines, redeemResumeLink, removeStoredDosePrice, resetResumeRedemption, resolveCategoryColor, resolveStrengthPrices, resolveSurveyV2DrugIntent, salePriceForBase, skuBindingModeFor, sourceKey, sourceLabel, stateAvailabilityNote, strengthsChanged, subscribeToSupportTopic, toChoices, toTrackerRequest, uploadPrescriptionPhoto, upsertDosePrice, useAddPharmacy, useAddressPair, useAffiliateConversions, useAffiliateDownline, useAffiliateLinks, useAffiliateStats, useCardTokenizer, useCartCheckoutFlow, useCartReconcile, useCatalog, useCatalogAvailability, useCatalogConversion, useCheckoutFlow, useDashboardData, useMedicationSelect, useMemberPortalData, useMessagesThread, useProductCatalogEditor, useProductDetail, useRegisterFlow, useSignupFlow, useSmsConsent, useSmsPreferences, useSubscribeFlow, useSurveyFlow, useSurveyV2Flow, useUpdatePaymentMethodFlow, validateAddress, visibleWarnings };
|
|
6506
|
+
//# sourceMappingURL=XPYBZU45.js.map
|
|
6507
|
+
//# sourceMappingURL=XPYBZU45.js.map
|