@apextelemed/partner-core 0.4.1 → 0.5.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.
Files changed (44) hide show
  1. package/dist/api/index.d.ts +2 -2
  2. package/dist/api/index.js +3 -3
  3. package/dist/api/index.jsx +5 -3
  4. package/dist/{cart-CBH8Em8f.d.ts → cart-BwUwSzWh.d.ts} +25 -2
  5. package/dist/chunk/{OJSQZEB3.js → 4W5ONAFF.js} +7 -6
  6. package/dist/chunk/4W5ONAFF.js.map +1 -0
  7. package/dist/chunk/{DS4E7FAI.js → 4YUUZ532.js} +14 -4
  8. package/dist/chunk/4YUUZ532.js.map +1 -0
  9. package/dist/chunk/{T6IKS76T.jsx → 5CXUPFZU.jsx} +33 -15
  10. package/dist/chunk/{EIXZJX6R.js → 6MDLP62Y.js} +34 -17
  11. package/dist/chunk/6MDLP62Y.js.map +1 -0
  12. package/dist/chunk/{NYLIUR7O.jsx → 6QC4BETO.jsx} +6 -5
  13. package/dist/chunk/{MN4GWQC4.js → 7COJH6FZ.js} +308 -155
  14. package/dist/chunk/7COJH6FZ.js.map +1 -0
  15. package/dist/chunk/{MEF3FUQB.jsx → B5RBZKAK.jsx} +1 -1
  16. package/dist/chunk/{STEVQZ6U.jsx → CXBPVQ7W.jsx} +2 -2
  17. package/dist/chunk/{NP4CMOLW.jsx → GGY7VMZ2.jsx} +5 -3
  18. package/dist/chunk/{2XJBOTK5.js → ITK5F5AI.js} +2 -2
  19. package/dist/chunk/{2XJBOTK5.js.map → ITK5F5AI.js.map} +1 -1
  20. package/dist/chunk/{YHWX4NMV.js → NNTB7KL5.js} +3 -3
  21. package/dist/chunk/{YHWX4NMV.js.map → NNTB7KL5.js.map} +1 -1
  22. package/dist/chunk/{XMYPS7PT.js → O4V2YXBF.js} +5 -4
  23. package/dist/chunk/O4V2YXBF.js.map +1 -0
  24. package/dist/chunk/{LPERM6T7.jsx → YPZVHEBG.jsx} +152 -20
  25. package/dist/chunk/{I46Y2J5W.jsx → Z2CR6WKF.jsx} +15 -2
  26. package/dist/{client-DUrhrzOG.d.ts → client-Cm6n4V0r.d.ts} +8 -0
  27. package/dist/flows/index.d.ts +49 -3
  28. package/dist/flows/index.js +6 -6
  29. package/dist/flows/index.jsx +10 -8
  30. package/dist/index/index.d.ts +3 -3
  31. package/dist/index/index.js +7 -7
  32. package/dist/index/index.jsx +13 -9
  33. package/dist/pages/index.d.ts +1 -1
  34. package/dist/pages/index.js +5 -5
  35. package/dist/pages/index.jsx +5 -5
  36. package/dist/stores/index.d.ts +1 -1
  37. package/dist/stores/index.js +2 -2
  38. package/dist/stores/index.jsx +2 -2
  39. package/package.json +1 -1
  40. package/dist/chunk/DS4E7FAI.js.map +0 -1
  41. package/dist/chunk/EIXZJX6R.js.map +0 -1
  42. package/dist/chunk/MN4GWQC4.js.map +0 -1
  43. package/dist/chunk/OJSQZEB3.js.map +0 -1
  44. package/dist/chunk/XMYPS7PT.js.map +0 -1
@@ -1,9 +1,9 @@
1
1
  import { disqualificationReasonText, qualifiedDrugIds } from './LZWA44KD.js';
2
- import { useSurveyFlow, resolveSurveyV2DrugIntent, emailGateAnswered, redeemResumeLink, useSurveyV2Flow, availableStateOptions, US_STATE_OPTIONS, useCheckoutFlow, useCartCheckoutFlow, useSignupFlow, useRegisterFlow, useSubscribeFlow, useDashboardData, useUpdatePaymentMethodFlow, useMemberPortalData, useMessagesThread, captureFunnelEmail, markEmailGateAnswered, useAffiliateStats, useAffiliateConversions, useAffiliateDownline, useAffiliateLinks, stateAvailabilityNote, hasStateRestrictions, uploadPrescriptionPhoto, deriveAttention, deriveJourney, buildTimeline, lifecycleReason, accountSource, LIFECYCLE_BUCKETS, LIFECYCLE_LABEL, formatConversationTime, buildTrackerView, ACCOUNT_SOURCE_LABEL, fmtDay, formatCalendarDate, formatMessageTime, formatEventDate, formatStageDate, LIFECYCLE_TONE, buildTrackingUrl, isImageAttachment, buildRefillView, toTrackerRequest } from './OJSQZEB3.js';
3
- import { fetchFunnelConfig } from './DS4E7FAI.js';
2
+ import { useSurveyFlow, resolveSurveyV2DrugIntent, emailGateAnswered, redeemResumeLink, useSurveyV2Flow, availableStateOptions, US_STATE_OPTIONS, useCheckoutFlow, useCartCheckoutFlow, useSignupFlow, useRegisterFlow, useSubscribeFlow, useDashboardData, useUpdatePaymentMethodFlow, useMemberPortalData, useMessagesThread, captureFunnelEmail, markEmailGateAnswered, useAffiliateStats, useAffiliateConversions, useAffiliateDownline, useAffiliateLinks, stateAvailabilityNote, hasStateRestrictions, uploadPrescriptionPhoto, deriveAttention, deriveJourney, buildTimeline, lifecycleReason, accountSource, LIFECYCLE_BUCKETS, LIFECYCLE_LABEL, formatConversationTime, buildTrackerView, ACCOUNT_SOURCE_LABEL, fmtDay, formatCalendarDate, formatMessageTime, formatEventDate, formatStageDate, LIFECYCLE_TONE, buildTrackingUrl, isImageAttachment, buildRefillView, toTrackerRequest } from './4W5ONAFF.js';
3
+ import { fetchFunnelConfig } from './4YUUZ532.js';
4
4
  import { usePrimitives } from './67KHO66G.js';
5
- import { auth_default, cart_default, affiliateAuth_default } from './YHWX4NMV.js';
6
- import { usersApi, adminApi, membersApi, affiliatePortalApi, authApi, adminAffiliatesApi, SUPPORT_ATTACHMENT_MIME_TYPES, SUPPORT_ATTACHMENT_MAX_BYTES, apiFetch, apexApi, subscriptionsApi, ApiError } from './2XJBOTK5.js';
5
+ import { auth_default, cart_default, affiliateAuth_default } from './NNTB7KL5.js';
6
+ import { usersApi, adminApi, membersApi, affiliatePortalApi, authApi, adminAffiliatesApi, SUPPORT_ATTACHMENT_MIME_TYPES, SUPPORT_ATTACHMENT_MAX_BYTES, apiFetch, apexApi, subscriptionsApi, ApiError } from './ITK5F5AI.js';
7
7
  import { delegateEvents, createComponent, insert, memo, effect, setStyleProperty, mergeProps, use, setAttribute, addEventListener, style, className, Dynamic, template } from 'solid-js/web';
8
8
  import { createContext, createEffect, on, Show, For, createResource, createSignal, createMemo, Index, ErrorBoundary, Switch, Match, onMount, onCleanup, useContext } from 'solid-js';
9
9
  import { isQuestionVisible } from '@apextelemed/survey-core';
@@ -5095,6 +5095,9 @@ function datetimeLocalToIso(value) {
5095
5095
  return new Date(value).toISOString();
5096
5096
  }
5097
5097
  var LIVE_SUBSCRIPTION_STATUSES = /* @__PURE__ */ new Set(["active", "paused", "past_due"]);
5098
+ function subscriptionLabel(s, fallback = "Subscription") {
5099
+ return s.medicationName || s.medication || fallback;
5100
+ }
5098
5101
 
5099
5102
  // src/pages/admin/shared.tsx
5100
5103
  var _tmpl$51 = /* @__PURE__ */ template(`<span>`);
@@ -10204,7 +10207,7 @@ function EditAmountModal(props) {
10204
10207
  get children() {
10205
10208
  var _el$ = _tmpl$520(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$7 = _el$3.nextSibling, _el$4 = _el$7.nextSibling, _el$8 = _el$4.nextSibling; _el$8.nextSibling;
10206
10209
  _el$.addEventListener("submit", submit);
10207
- insert(_el$2, () => props.subscription.medication || "Subscription", _el$3);
10210
+ insert(_el$2, () => subscriptionLabel(props.subscription), _el$3);
10208
10211
  insert(_el$2, () => centsToUsd(current2()), _el$7);
10209
10212
  insert(_el$2, () => props.subscription.intervalDays ?? 30, _el$8);
10210
10213
  insert(_el$, createComponent(FormRow, {
@@ -10513,7 +10516,7 @@ function RefundModal(props) {
10513
10516
  },
10514
10517
  children: (s) => (() => {
10515
10518
  var _el$19 = _tmpl$720(), _el$20 = _el$19.firstChild;
10516
- insert(_el$19, () => s.medication || "Subscription", _el$20);
10519
+ insert(_el$19, () => subscriptionLabel(s), _el$20);
10517
10520
  insert(_el$19, () => centsToUsd(s.amountCents), null);
10518
10521
  insert(_el$19, (() => {
10519
10522
  var _c$5 = memo(() => !!s.intervalDays);
@@ -11195,7 +11198,7 @@ function SubscriptionCard(props) {
11195
11198
  };
11196
11199
  return (() => {
11197
11200
  var _el$ = _tmpl$918(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$5 = _el$4.firstChild, _el$7 = _el$4.nextSibling, _el$8 = _el$7.firstChild, _el$1 = _el$8.nextSibling, _el$9 = _el$1.nextSibling, _el$10 = _el$9.nextSibling; _el$10.nextSibling; var _el$11 = _el$3.nextSibling, _el$17 = _el$2.nextSibling;
11198
- insert(_el$5, () => s().medication || "Subscription");
11201
+ insert(_el$5, () => subscriptionLabel(s()));
11199
11202
  insert(_el$4, createComponent(Show, {
11200
11203
  get when() {
11201
11204
  return s().dosage;
@@ -11573,7 +11576,7 @@ function CustomerDetail(props) {
11573
11576
  }
11574
11577
  };
11575
11578
  const handleCancel = (sub) => {
11576
- if (!confirm(`Cancel the ${sub.medication || ""} subscription? Billing stops now and any unapproved prescription requests are withdrawn.`)) return;
11579
+ if (!confirm(`Cancel the ${subscriptionLabel(sub, "")} subscription? Billing stops now and any unapproved prescription requests are withdrawn.`)) return;
11577
11580
  void withBusy(`cancel-${sub.id}`, async () => {
11578
11581
  try {
11579
11582
  const res = await adminApi.cancelSubscription(sub.id);
@@ -11691,7 +11694,7 @@ function CustomerDetail(props) {
11691
11694
  try {
11692
11695
  await adminApi.cancelSubscription(sub.id);
11693
11696
  } catch (err) {
11694
- failed.push(`${sub.medication || sub.id}: ${err instanceof Error ? err.message : "cancel failed"}`);
11697
+ failed.push(`${subscriptionLabel(sub, sub.id)}: ${err instanceof Error ? err.message : "cancel failed"}`);
11695
11698
  }
11696
11699
  }
11697
11700
  if (failed.length > 0) {
@@ -12198,6 +12201,7 @@ function CustomerDetail(props) {
12198
12201
  return liveSubs().map((s) => ({
12199
12202
  id: s.id,
12200
12203
  medication: s.medication,
12204
+ medicationName: s.medicationName,
12201
12205
  amountCents: s.amountCents ?? 0,
12202
12206
  intervalDays: s.intervalDays ?? void 0,
12203
12207
  nextChargeAt: s.nextChargeAt,
@@ -12870,7 +12874,7 @@ function Payments() {
12870
12874
  try {
12871
12875
  await adminApi.cancelSubscription(sub.id);
12872
12876
  } catch (err) {
12873
- failed.push(`${sub.medication || sub.id}: ${err instanceof Error ? err.message : "cancel failed"}`);
12877
+ failed.push(`${subscriptionLabel(sub, sub.id)}: ${err instanceof Error ? err.message : "cancel failed"}`);
12874
12878
  }
12875
12879
  }
12876
12880
  if (failed.length > 0) {
@@ -13001,6 +13005,7 @@ function Payments() {
13001
13005
  return target().liveSubs.map((s) => ({
13002
13006
  id: s.id,
13003
13007
  medication: s.medication,
13008
+ medicationName: s.medicationName,
13004
13009
  amountCents: s.amountCents,
13005
13010
  intervalDays: s.intervalDays,
13006
13011
  currentPeriodEnd: s.currentPeriodEnd
@@ -15037,20 +15042,31 @@ var _tmpl$354 = /* @__PURE__ */ template(`<div style="padding:1rem 1.25rem;borde
15037
15042
  var _tmpl$441 = /* @__PURE__ */ template(`<div class=app-admin-card style=margin-top:1.25rem>`);
15038
15043
  var _tmpl$536 = /* @__PURE__ */ template(`<p style=color:var(--app-admin-danger-fg);font-size:0.8125rem;margin:0>`);
15039
15044
  var _tmpl$634 = /* @__PURE__ */ template(`<p style=color:var(--app-admin-success-fg);font-size:0.8125rem;margin:0>`);
15040
- var _tmpl$732 = /* @__PURE__ */ template(`<div style="padding:1rem 1.25rem;display:grid;gap:0.875rem;max-width:34rem"><label style=display:flex;align-items:center;gap:0.625rem;cursor:pointer><input type=checkbox><span>Send recovery emails</span></label><label style=display:grid;gap:0.25rem><span style=font-size:0.8125rem;color:var(--app-admin-fg-muted)>Completed-survey reminders \u2014 hours after the survey was submitted (comma-separated)</span><input class=app-admin-input type=text placeholder="24, 72"></label><label style=display:grid;gap:0.25rem><span style=font-size:0.8125rem;color:var(--app-admin-fg-muted)>Mid-survey reminders \u2014 hours after last activity (comma-separated)</span><input class=app-admin-input type=text placeholder="4, 48"></label><div><button type=button class="app-admin-btn app-admin-btn--primary">`);
15041
- var _tmpl$828 = /* @__PURE__ */ template(`<div><div style=margin-bottom:1rem><select class=app-admin-input style=width:auto><option value=7>Last 7 days</option><option value=30>Last 30 days</option><option value=90>Last 90 days</option></select></div><div class=app-admin-card style=margin-top:1.25rem;overflow:hidden><table class=app-admin-table><thead><tr><th>Last seen</th><th>Progress</th><th>Email</th><th>Reminders</th></tr></thead><tbody></tbody></table></div><div class=app-admin-card style=margin-top:1.25rem;overflow:hidden><table class=app-admin-table><thead><tr><th>Captured</th><th>Name</th><th>Email</th><th>Qualified</th><th>Reminders</th></tr></thead><tbody>`);
15042
- var _tmpl$925 = /* @__PURE__ */ template(`<div style="display:grid;grid-template-columns:repeat(auto-fit, minmax(10rem, 1fr));gap:0.75rem">`);
15043
- var _tmpl$021 = /* @__PURE__ */ template(`<div class=app-admin-card style=margin-top:1.25rem><div style="padding:1rem 1.25rem;display:grid;gap:0.625rem">`);
15044
- var _tmpl$1102 = /* @__PURE__ */ template(`<div class=app-admin-card style=margin-top:1.25rem><div style=padding:1.25rem;display:flex;align-items:flex-end;gap:0.375rem;height:9rem>`);
15045
- var _tmpl$1014 = /* @__PURE__ */ template(`<div class=app-admin-card style=margin-top:1.25rem;overflow:hidden><table class=app-admin-table><thead><tr><th>Track</th><th>Sent</th><th>Recovered</th></tr></thead><tbody><tr><td data-label=Track>Finish signup (completed surveys)</td><td data-label=Sent></td><td data-label=Recovered></td></tr><tr><td data-label=Track>Finish questionnaire (mid-survey)</td><td data-label=Sent></td><td data-label=Recovered></td></tr><tr><td data-label=Track class=app-admin-text-muted>Unsubscribes</td><td data-label=Count colspan=2>`);
15046
- var _tmpl$1116 = /* @__PURE__ */ template(`<div style="display:grid;grid-template-columns:10rem 1fr 7rem;align-items:center;gap:0.75rem"><span style=font-size:0.8125rem;color:var(--app-admin-fg-muted)></span><div style=background:var(--app-admin-border-soft);border-radius:4px;height:1.125rem><div style=height:100%;background:var(--app-admin-primary);border-radius:4px></div></div><span style=font-size:0.8125rem;text-align:right><span style=color:var(--app-admin-fg-subtle);margin-left:0.375rem>`);
15047
- var _tmpl$1213 = /* @__PURE__ */ template(`<span style=font-size:0.6875rem;color:var(--app-admin-fg-muted)>`);
15048
- var _tmpl$1312 = /* @__PURE__ */ template(`<div style=flex:1;display:flex;flex-direction:column;align-items:center;gap:0.25rem;height:100%;justify-content:flex-end><div style="width:100%;max-width:1.75rem;border-radius:4px 4px 0 0"></div><span style=font-size:0.625rem;color:var(--app-admin-fg-subtle)>`);
15049
- var _tmpl$1412 = /* @__PURE__ */ template(`<tr><td colspan=4>`);
15050
- var _tmpl$1512 = /* @__PURE__ */ template(`<tr><td data-label="Last seen"class=app-admin-text-muted></td><td data-label=Progress></td><td data-label=Email></td><td data-label=Reminders>`);
15051
- var _tmpl$1612 = /* @__PURE__ */ template(`<span class=app-admin-text-muted>not captured`);
15052
- var _tmpl$1712 = /* @__PURE__ */ template(`<tr><td colspan=5>`);
15053
- var _tmpl$1811 = /* @__PURE__ */ template(`<tr><td data-label=Captured class=app-admin-text-muted></td><td data-label=Name></td><td data-label=Email></td><td data-label=Qualified></td><td data-label=Reminders>`);
15045
+ var _tmpl$732 = /* @__PURE__ */ template(`<div style="padding:1rem 1.25rem;display:grid;gap:0.875rem;max-width:34rem"><label style=display:grid;gap:0.25rem><span style=font-size:0.8125rem;color:var(--app-admin-fg-muted)>How reminders go out</span><select class=app-admin-input><option value=off>Off \u2014 send nothing</option><option value=review>Review \u2014 hold for approval, I send them</option><option value=auto>Automatic \u2014 send on the schedule below</option></select><span style=font-size:0.75rem;color:var(--app-admin-fg-muted)></span></label><label style=display:grid;gap:0.25rem><span style=font-size:0.8125rem;color:var(--app-admin-fg-muted)>Completed-survey reminders \u2014 hours after the survey was submitted (comma-separated)</span><input class=app-admin-input type=text placeholder="24, 72"></label><label style=display:grid;gap:0.25rem><span style=font-size:0.8125rem;color:var(--app-admin-fg-muted)>Mid-survey reminders \u2014 hours after last activity (comma-separated)</span><input class=app-admin-input type=text placeholder="4, 48"></label><div><button type=button class="app-admin-btn app-admin-btn--primary">`);
15046
+ var _tmpl$828 = /* @__PURE__ */ template(`<p style="color:var(--app-admin-danger-fg);font-size:0.8125rem;padding:0 1.25rem">`);
15047
+ var _tmpl$925 = /* @__PURE__ */ template(`<table class=app-admin-table><thead><tr><th>Person</th><th>Where they stopped</th><th>Waiting</th><th>Reminder</th><th></th></tr></thead><tbody>`);
15048
+ var _tmpl$021 = /* @__PURE__ */ template(`<div class=app-admin-text-muted style=font-size:0.75rem>`);
15049
+ var _tmpl$1102 = /* @__PURE__ */ template(`<div style=display:flex;gap:0.375rem;flex-wrap:wrap><button type=button class="app-admin-btn app-admin-btn--primary"></button><button type=button class=app-admin-btn title="Move past this reminder without emailing. They stay in the funnel for the next one.">Skip</button><button type=button class=app-admin-btn title="Never contact this person about their visit again.">Don't contact`);
15050
+ var _tmpl$1014 = /* @__PURE__ */ template(`<tr><td data-label=Person><div></div></td><td data-label="Where they stopped"></td><td data-label=Waiting></td><td data-label=Reminder> of </td><td>`);
15051
+ var _tmpl$1116 = /* @__PURE__ */ template(`<span class=app-admin-text-muted>`);
15052
+ var _tmpl$1213 = /* @__PURE__ */ template(`<div><div style=margin-bottom:1rem><select class=app-admin-input style=width:auto><option value=7>Last 7 days</option><option value=30>Last 30 days</option><option value=90>Last 90 days</option></select></div><div class=app-admin-card style=margin-top:1.25rem;overflow:hidden><table class=app-admin-table><thead><tr><th>Last seen</th><th>Progress</th><th>Email</th><th>Reminders</th></tr></thead><tbody></tbody></table></div><div class=app-admin-card style=margin-top:1.25rem;overflow:hidden><table class=app-admin-table><thead><tr><th>Captured</th><th>Name</th><th>Email</th><th>Qualified</th><th>Reminders</th></tr></thead><tbody>`);
15053
+ var _tmpl$1312 = /* @__PURE__ */ template(`<div style="display:grid;grid-template-columns:repeat(auto-fit, minmax(10rem, 1fr));gap:0.75rem">`);
15054
+ var _tmpl$1412 = /* @__PURE__ */ template(`<div class=app-admin-card style=margin-top:1.25rem><div style="padding:1rem 1.25rem;display:grid;gap:0.625rem">`);
15055
+ var _tmpl$1512 = /* @__PURE__ */ template(`<div class=app-admin-card style=margin-top:1.25rem><div style=padding:1.25rem;display:flex;align-items:flex-end;gap:0.375rem;height:9rem>`);
15056
+ var _tmpl$1612 = /* @__PURE__ */ template(`<div class=app-admin-card style=margin-top:1.25rem;overflow:hidden><table class=app-admin-table><thead><tr><th>Track</th><th>Sent</th><th>Recovered</th></tr></thead><tbody><tr><td data-label=Track>Finish signup (completed surveys)</td><td data-label=Sent></td><td data-label=Recovered></td></tr><tr><td data-label=Track>Finish questionnaire (mid-survey)</td><td data-label=Sent></td><td data-label=Recovered></td></tr><tr><td data-label=Track class=app-admin-text-muted>Unsubscribes</td><td data-label=Count colspan=2>`);
15057
+ var _tmpl$1712 = /* @__PURE__ */ template(`<div style="display:grid;grid-template-columns:10rem 1fr 7rem;align-items:center;gap:0.75rem"><span style=font-size:0.8125rem;color:var(--app-admin-fg-muted)></span><div style=background:var(--app-admin-border-soft);border-radius:4px;height:1.125rem><div style=height:100%;background:var(--app-admin-primary);border-radius:4px></div></div><span style=font-size:0.8125rem;text-align:right><span style=color:var(--app-admin-fg-subtle);margin-left:0.375rem>`);
15058
+ var _tmpl$1811 = /* @__PURE__ */ template(`<span style=font-size:0.6875rem;color:var(--app-admin-fg-muted)>`);
15059
+ var _tmpl$1911 = /* @__PURE__ */ template(`<div style=flex:1;display:flex;flex-direction:column;align-items:center;gap:0.25rem;height:100%;justify-content:flex-end><div style="width:100%;max-width:1.75rem;border-radius:4px 4px 0 0"></div><span style=font-size:0.625rem;color:var(--app-admin-fg-subtle)>`);
15060
+ var _tmpl$2010 = /* @__PURE__ */ template(`<tr><td colspan=4>`);
15061
+ var _tmpl$2115 = /* @__PURE__ */ template(`<tr><td data-label="Last seen"class=app-admin-text-muted></td><td data-label=Progress></td><td data-label=Email></td><td data-label=Reminders>`);
15062
+ var _tmpl$2212 = /* @__PURE__ */ template(`<span class=app-admin-text-muted>not captured`);
15063
+ var _tmpl$2311 = /* @__PURE__ */ template(`<tr><td colspan=5>`);
15064
+ var _tmpl$2411 = /* @__PURE__ */ template(`<tr><td data-label=Captured class=app-admin-text-muted></td><td data-label=Name></td><td data-label=Email></td><td data-label=Qualified></td><td data-label=Reminders>`);
15065
+ var MODE_HELP = {
15066
+ off: "Nothing is sent and nothing is queued.",
15067
+ review: 'The schedule decides who is due; nothing leaves until you send it. Due reminders appear under "Waiting for approval" below.',
15068
+ auto: "Reminders send by themselves, hourly, with no further review."
15069
+ };
15054
15070
  function pct(n, d) {
15055
15071
  if (!d) return "\u2014";
15056
15072
  return `${Math.round(n / d * 100)}%`;
@@ -15127,7 +15143,7 @@ function RecoverySettingsCard() {
15127
15143
  await apiFetch("/admin/settings/funnel-recovery", {
15128
15144
  method: "PUT",
15129
15145
  body: JSON.stringify({
15130
- enabled: s.enabled,
15146
+ mode: s.mode,
15131
15147
  stagesHours,
15132
15148
  incompleteStagesHours
15133
15149
  })
@@ -15170,39 +15186,40 @@ function RecoverySettingsCard() {
15170
15186
  return createComponent(LoadingSpinner, {});
15171
15187
  },
15172
15188
  children: (s) => (() => {
15173
- var _el$8 = _tmpl$732(), _el$9 = _el$8.firstChild, _el$0 = _el$9.firstChild, _el$1 = _el$9.nextSibling, _el$10 = _el$1.firstChild, _el$11 = _el$10.nextSibling, _el$12 = _el$1.nextSibling, _el$13 = _el$12.firstChild, _el$14 = _el$13.nextSibling, _el$17 = _el$12.nextSibling, _el$18 = _el$17.firstChild;
15174
- _el$0.addEventListener("change", (e) => setSettings({
15189
+ var _el$8 = _tmpl$732(), _el$9 = _el$8.firstChild, _el$0 = _el$9.firstChild, _el$1 = _el$0.nextSibling, _el$10 = _el$1.nextSibling, _el$11 = _el$9.nextSibling, _el$12 = _el$11.firstChild, _el$13 = _el$12.nextSibling, _el$14 = _el$11.nextSibling, _el$15 = _el$14.firstChild, _el$16 = _el$15.nextSibling, _el$19 = _el$14.nextSibling, _el$20 = _el$19.firstChild;
15190
+ _el$1.addEventListener("change", (e) => setSettings({
15175
15191
  ...s(),
15176
- enabled: e.currentTarget.checked
15192
+ mode: e.currentTarget.value
15177
15193
  }));
15178
- _el$11.$$input = (e) => setStagesText(e.currentTarget.value);
15179
- _el$14.$$input = (e) => setIncompleteText(e.currentTarget.value);
15194
+ insert(_el$10, () => MODE_HELP[s().mode]);
15195
+ _el$13.$$input = (e) => setStagesText(e.currentTarget.value);
15196
+ _el$16.$$input = (e) => setIncompleteText(e.currentTarget.value);
15180
15197
  insert(_el$8, createComponent(Show, {
15181
15198
  get when() {
15182
15199
  return error();
15183
15200
  },
15184
15201
  get children() {
15185
- var _el$15 = _tmpl$536();
15186
- insert(_el$15, error);
15187
- return _el$15;
15202
+ var _el$17 = _tmpl$536();
15203
+ insert(_el$17, error);
15204
+ return _el$17;
15188
15205
  }
15189
- }), _el$17);
15206
+ }), _el$19);
15190
15207
  insert(_el$8, createComponent(Show, {
15191
15208
  get when() {
15192
15209
  return status();
15193
15210
  },
15194
15211
  get children() {
15195
- var _el$16 = _tmpl$634();
15196
- insert(_el$16, status);
15197
- return _el$16;
15212
+ var _el$18 = _tmpl$634();
15213
+ insert(_el$18, status);
15214
+ return _el$18;
15198
15215
  }
15199
- }), _el$17);
15200
- _el$18.$$click = () => void save();
15201
- insert(_el$18, () => saving() ? "Saving\u2026" : "Save settings");
15202
- effect(() => _el$18.disabled = saving());
15203
- effect(() => _el$0.checked = s().enabled);
15204
- effect(() => _el$11.value = stagesText());
15205
- effect(() => _el$14.value = incompleteText());
15216
+ }), _el$19);
15217
+ _el$20.$$click = () => void save();
15218
+ insert(_el$20, () => saving() ? "Saving\u2026" : "Save settings");
15219
+ effect(() => _el$20.disabled = saving());
15220
+ effect(() => _el$1.value = s().mode);
15221
+ effect(() => _el$13.value = stagesText());
15222
+ effect(() => _el$16.value = incompleteText());
15206
15223
  return _el$8;
15207
15224
  })()
15208
15225
  });
@@ -15211,6 +15228,141 @@ function RecoverySettingsCard() {
15211
15228
  return _el$7;
15212
15229
  })();
15213
15230
  }
15231
+ function RecoveryQueue() {
15232
+ const [reload, setReload] = createSignal(0);
15233
+ const [busy, setBusy] = createSignal(null);
15234
+ const [error, setError] = createSignal(null);
15235
+ const [done, setDone] = createSignal({});
15236
+ const [queue, {
15237
+ refetch
15238
+ }] = createResource(reload, () => apiFetch("/admin/funnel/recovery-queue").catch(() => null));
15239
+ const key = (c) => `${c.kind}:${c.id}`;
15240
+ const act = async (c, action) => {
15241
+ setBusy(key(c));
15242
+ setError(null);
15243
+ try {
15244
+ await apiFetch(`/admin/funnel/recovery-queue/${action}`, {
15245
+ method: "POST",
15246
+ body: JSON.stringify({
15247
+ kind: c.kind,
15248
+ id: c.id
15249
+ })
15250
+ });
15251
+ setDone({
15252
+ ...done(),
15253
+ [key(c)]: action
15254
+ });
15255
+ void refetch();
15256
+ } catch (e) {
15257
+ setError(e.message);
15258
+ } finally {
15259
+ setBusy(null);
15260
+ }
15261
+ };
15262
+ const label = (c) => c.kind === "capture" ? "Finished the questionnaire, never signed up" : c.lastStep != null && c.stepCount ? `Stopped at step ${c.lastStep + 1} of ${c.stepCount}` : "Started the questionnaire, never finished";
15263
+ return createComponent(Show, {
15264
+ get when() {
15265
+ return queue()?.mode === "review";
15266
+ },
15267
+ get children() {
15268
+ var _el$21 = _tmpl$441();
15269
+ insert(_el$21, createComponent(CardHeader, {
15270
+ title: "Waiting for approval",
15271
+ note: "Due by the schedule below. Nothing here has been emailed, and nothing will be until you send it."
15272
+ }), null);
15273
+ insert(_el$21, createComponent(Show, {
15274
+ get when() {
15275
+ return error();
15276
+ },
15277
+ get children() {
15278
+ var _el$22 = _tmpl$828();
15279
+ insert(_el$22, error);
15280
+ return _el$22;
15281
+ }
15282
+ }), null);
15283
+ insert(_el$21, createComponent(Show, {
15284
+ get when() {
15285
+ return (queue()?.candidates.length ?? 0) > 0;
15286
+ },
15287
+ get fallback() {
15288
+ return createComponent(EmptyState, {
15289
+ message: "Nobody is due a reminder right now."
15290
+ });
15291
+ },
15292
+ get children() {
15293
+ var _el$23 = _tmpl$925(), _el$24 = _el$23.firstChild, _el$25 = _el$24.nextSibling;
15294
+ insert(_el$25, createComponent(For, {
15295
+ get each() {
15296
+ return queue().candidates;
15297
+ },
15298
+ children: (c) => (() => {
15299
+ var _el$26 = _tmpl$1014(), _el$27 = _el$26.firstChild, _el$28 = _el$27.firstChild, _el$30 = _el$27.nextSibling, _el$31 = _el$30.nextSibling, _el$32 = _el$31.nextSibling, _el$33 = _el$32.firstChild, _el$34 = _el$32.nextSibling;
15300
+ insert(_el$28, () => c.name || c.email);
15301
+ insert(_el$27, createComponent(Show, {
15302
+ get when() {
15303
+ return c.name;
15304
+ },
15305
+ get children() {
15306
+ var _el$29 = _tmpl$021();
15307
+ insert(_el$29, () => c.email);
15308
+ return _el$29;
15309
+ }
15310
+ }), null);
15311
+ insert(_el$30, () => label(c));
15312
+ insert(_el$31, () => daysAgo(c.lastActivityAt));
15313
+ insert(_el$32, () => c.stage + 1, _el$33);
15314
+ insert(_el$32, () => c.totalStages, null);
15315
+ insert(_el$34, createComponent(Show, {
15316
+ get when() {
15317
+ return !done()[key(c)];
15318
+ },
15319
+ get fallback() {
15320
+ return (() => {
15321
+ var _el$39 = _tmpl$1116();
15322
+ insert(_el$39, () => DONE_LABEL[done()[key(c)]]);
15323
+ return _el$39;
15324
+ })();
15325
+ },
15326
+ get children() {
15327
+ var _el$35 = _tmpl$1102(), _el$36 = _el$35.firstChild, _el$37 = _el$36.nextSibling, _el$38 = _el$37.nextSibling;
15328
+ _el$36.$$click = () => void act(c, "send");
15329
+ insert(_el$36, () => busy() === key(c) ? "Sending\u2026" : "Send");
15330
+ _el$37.$$click = () => void act(c, "skip");
15331
+ _el$38.$$click = () => void act(c, "suppress");
15332
+ effect((_p$) => {
15333
+ var _v$ = busy() === key(c), _v$2 = busy() === key(c), _v$3 = busy() === key(c);
15334
+ _v$ !== _p$.e && (_el$36.disabled = _p$.e = _v$);
15335
+ _v$2 !== _p$.t && (_el$37.disabled = _p$.t = _v$2);
15336
+ _v$3 !== _p$.a && (_el$38.disabled = _p$.a = _v$3);
15337
+ return _p$;
15338
+ }, {
15339
+ e: void 0,
15340
+ t: void 0,
15341
+ a: void 0
15342
+ });
15343
+ return _el$35;
15344
+ }
15345
+ }));
15346
+ return _el$26;
15347
+ })()
15348
+ }));
15349
+ return _el$23;
15350
+ }
15351
+ }), null);
15352
+ return _el$21;
15353
+ }
15354
+ });
15355
+ }
15356
+ var DONE_LABEL = {
15357
+ send: "Sent",
15358
+ skip: "Skipped",
15359
+ suppress: "Suppressed"
15360
+ };
15361
+ function daysAgo(iso) {
15362
+ const days = Math.floor((Date.now() - new Date(iso).getTime()) / 864e5);
15363
+ if (days < 1) return "today";
15364
+ return days === 1 ? "1 day" : `${days} days`;
15365
+ }
15214
15366
  function Funnel() {
15215
15367
  const [days, setDays] = createSignal(30);
15216
15368
  const [summary] = createResource(days, (d) => apiFetch(`/admin/funnel/summary?days=${d}`));
@@ -15237,13 +15389,13 @@ function Funnel() {
15237
15389
  const dropoffMax = () => Math.max(1, ...(summary()?.stepDropoff ?? []).map((b) => b.count));
15238
15390
  const totalRecovered = () => (summary()?.recovery.captureRecovered ?? 0) + (summary()?.recovery.sessionRecovered ?? 0);
15239
15391
  return (() => {
15240
- var _el$19 = _tmpl$828(), _el$20 = _el$19.firstChild, _el$21 = _el$20.firstChild, _el$22 = _el$20.nextSibling, _el$23 = _el$22.firstChild, _el$24 = _el$23.firstChild, _el$25 = _el$24.nextSibling, _el$26 = _el$22.nextSibling, _el$27 = _el$26.firstChild, _el$28 = _el$27.firstChild, _el$29 = _el$28.nextSibling;
15241
- insert(_el$19, createComponent(PageTitle, {
15392
+ var _el$40 = _tmpl$1213(), _el$41 = _el$40.firstChild, _el$42 = _el$41.firstChild, _el$43 = _el$41.nextSibling, _el$44 = _el$43.firstChild, _el$45 = _el$44.firstChild, _el$46 = _el$45.nextSibling, _el$47 = _el$43.nextSibling, _el$48 = _el$47.firstChild, _el$49 = _el$48.firstChild, _el$50 = _el$49.nextSibling;
15393
+ insert(_el$40, createComponent(PageTitle, {
15242
15394
  subtitle: "Survey drop-off and abandoned-checkout recovery",
15243
15395
  children: "Funnel"
15244
- }), _el$20);
15245
- _el$21.addEventListener("change", (e) => setDays(parseInt(e.currentTarget.value)));
15246
- insert(_el$19, createComponent(Show, {
15396
+ }), _el$41);
15397
+ _el$42.addEventListener("change", (e) => setDays(parseInt(e.currentTarget.value)));
15398
+ insert(_el$40, createComponent(Show, {
15247
15399
  get when() {
15248
15400
  return summary();
15249
15401
  },
@@ -15251,141 +15403,142 @@ function Funnel() {
15251
15403
  return createComponent(LoadingSpinner, {});
15252
15404
  },
15253
15405
  children: (s) => [(() => {
15254
- var _el$30 = _tmpl$925();
15255
- insert(_el$30, createComponent(StatCard, {
15406
+ var _el$51 = _tmpl$1312();
15407
+ insert(_el$51, createComponent(StatCard, {
15256
15408
  label: "Surveys Started",
15257
15409
  get value() {
15258
15410
  return s().sessions.started;
15259
15411
  }
15260
15412
  }), null);
15261
- insert(_el$30, createComponent(StatCard, {
15413
+ insert(_el$51, createComponent(StatCard, {
15262
15414
  label: "Completion Rate",
15263
15415
  get value() {
15264
15416
  return pct(s().captures.total, s().sessions.started);
15265
15417
  }
15266
15418
  }), null);
15267
- insert(_el$30, createComponent(StatCard, {
15419
+ insert(_el$51, createComponent(StatCard, {
15268
15420
  label: "Qualified Rate",
15269
15421
  get value() {
15270
15422
  return pct(s().captures.qualified, s().captures.total);
15271
15423
  }
15272
15424
  }), null);
15273
- insert(_el$30, createComponent(StatCard, {
15425
+ insert(_el$51, createComponent(StatCard, {
15274
15426
  label: "Signup Conversion",
15275
15427
  get value() {
15276
15428
  return pct(s().captures.converted, s().captures.leads);
15277
15429
  }
15278
15430
  }), null);
15279
- insert(_el$30, createComponent(StatCard, {
15431
+ insert(_el$51, createComponent(StatCard, {
15280
15432
  label: "Recovered by Email",
15281
15433
  get value() {
15282
15434
  return totalRecovered();
15283
15435
  }
15284
15436
  }), null);
15285
- return _el$30;
15437
+ return _el$51;
15286
15438
  })(), (() => {
15287
- var _el$31 = _tmpl$021(), _el$32 = _el$31.firstChild;
15288
- insert(_el$31, createComponent(CardHeader, {
15439
+ var _el$52 = _tmpl$1412(), _el$53 = _el$52.firstChild;
15440
+ insert(_el$52, createComponent(CardHeader, {
15289
15441
  title: "Funnel stages"
15290
- }), _el$32);
15291
- insert(_el$32, createComponent(For, {
15442
+ }), _el$53);
15443
+ insert(_el$53, createComponent(For, {
15292
15444
  get each() {
15293
15445
  return stages();
15294
15446
  },
15295
15447
  children: (stage, i) => (() => {
15296
- var _el$50 = _tmpl$1116(), _el$51 = _el$50.firstChild, _el$52 = _el$51.nextSibling, _el$53 = _el$52.firstChild, _el$54 = _el$52.nextSibling, _el$55 = _el$54.firstChild;
15297
- insert(_el$51, () => stage.label);
15298
- insert(_el$54, () => stage.value, _el$55);
15299
- insert(_el$55, (() => {
15448
+ var _el$71 = _tmpl$1712(), _el$72 = _el$71.firstChild, _el$73 = _el$72.nextSibling, _el$74 = _el$73.firstChild, _el$75 = _el$73.nextSibling, _el$76 = _el$75.firstChild;
15449
+ insert(_el$72, () => stage.label);
15450
+ insert(_el$75, () => stage.value, _el$76);
15451
+ insert(_el$76, (() => {
15300
15452
  var _c$ = memo(() => i() > 0);
15301
15453
  return () => _c$() ? pct(stage.value, stages()[i() - 1].value) : "";
15302
15454
  })());
15303
15455
  effect((_p$) => {
15304
- var _v$ = `${stage.label}: ${stage.value}`, _v$2 = `${stage.value / stageMax() * 100}%`, _v$3 = stage.value > 0 ? "4px" : "0";
15305
- _v$ !== _p$.e && setAttribute(_el$50, "title", _p$.e = _v$);
15306
- _v$2 !== _p$.t && setStyleProperty(_el$53, "width", _p$.t = _v$2);
15307
- _v$3 !== _p$.a && setStyleProperty(_el$53, "min-width", _p$.a = _v$3);
15456
+ var _v$4 = `${stage.label}: ${stage.value}`, _v$5 = `${stage.value / stageMax() * 100}%`, _v$6 = stage.value > 0 ? "4px" : "0";
15457
+ _v$4 !== _p$.e && setAttribute(_el$71, "title", _p$.e = _v$4);
15458
+ _v$5 !== _p$.t && setStyleProperty(_el$74, "width", _p$.t = _v$5);
15459
+ _v$6 !== _p$.a && setStyleProperty(_el$74, "min-width", _p$.a = _v$6);
15308
15460
  return _p$;
15309
15461
  }, {
15310
15462
  e: void 0,
15311
15463
  t: void 0,
15312
15464
  a: void 0
15313
15465
  });
15314
- return _el$50;
15466
+ return _el$71;
15315
15467
  })()
15316
15468
  }));
15317
- return _el$31;
15469
+ return _el$52;
15318
15470
  })(), (() => {
15319
- var _el$33 = _tmpl$1102(), _el$34 = _el$33.firstChild;
15320
- insert(_el$33, createComponent(CardHeader, {
15471
+ var _el$54 = _tmpl$1512(), _el$55 = _el$54.firstChild;
15472
+ insert(_el$54, createComponent(CardHeader, {
15321
15473
  title: "Where abandons quit",
15322
15474
  get note() {
15323
15475
  return "Survey progress at last activity \u2014 the final bucket is the contact-info step. Leaving the page counts immediately; a silently-dropped session counts after 4 quiet hours." + (s().sessions.active > 0 ? ` ${s().sessions.active} session${s().sessions.active === 1 ? "" : "s"} still in progress \u2014 not counted yet.` : "");
15324
15476
  }
15325
- }), _el$34);
15326
- insert(_el$34, createComponent(For, {
15477
+ }), _el$55);
15478
+ insert(_el$55, createComponent(For, {
15327
15479
  get each() {
15328
15480
  return s().stepDropoff;
15329
15481
  },
15330
15482
  children: (b) => (() => {
15331
- var _el$56 = _tmpl$1312(), _el$58 = _el$56.firstChild, _el$59 = _el$58.nextSibling;
15332
- insert(_el$56, createComponent(Show, {
15483
+ var _el$77 = _tmpl$1911(), _el$79 = _el$77.firstChild, _el$80 = _el$79.nextSibling;
15484
+ insert(_el$77, createComponent(Show, {
15333
15485
  get when() {
15334
15486
  return b.count > 0;
15335
15487
  },
15336
15488
  get children() {
15337
- var _el$57 = _tmpl$1213();
15338
- insert(_el$57, () => b.count);
15339
- return _el$57;
15489
+ var _el$78 = _tmpl$1811();
15490
+ insert(_el$78, () => b.count);
15491
+ return _el$78;
15340
15492
  }
15341
- }), _el$58);
15342
- insert(_el$59, (() => {
15493
+ }), _el$79);
15494
+ insert(_el$80, (() => {
15343
15495
  var _c$2 = memo(() => b.bucket === 0);
15344
15496
  return () => _c$2() ? "Start" : memo(() => b.bucket === 10)() ? "Info" : b.bucket === 5 ? "50%" : "";
15345
15497
  })());
15346
15498
  effect((_p$) => {
15347
- var _v$4 = `${b.bucket * 10}% through: ${b.count} abandon${b.count === 1 ? "" : "s"}`, _v$5 = `${Math.max(b.count > 0 ? 6 : 2, b.count / dropoffMax() * 100)}px`, _v$6 = b.count > 0 ? "var(--app-admin-primary)" : "var(--app-admin-border-soft)";
15348
- _v$4 !== _p$.e && setAttribute(_el$56, "title", _p$.e = _v$4);
15349
- _v$5 !== _p$.t && setStyleProperty(_el$58, "height", _p$.t = _v$5);
15350
- _v$6 !== _p$.a && setStyleProperty(_el$58, "background", _p$.a = _v$6);
15499
+ var _v$7 = `${b.bucket * 10}% through: ${b.count} abandon${b.count === 1 ? "" : "s"}`, _v$8 = `${Math.max(b.count > 0 ? 6 : 2, b.count / dropoffMax() * 100)}px`, _v$9 = b.count > 0 ? "var(--app-admin-primary)" : "var(--app-admin-border-soft)";
15500
+ _v$7 !== _p$.e && setAttribute(_el$77, "title", _p$.e = _v$7);
15501
+ _v$8 !== _p$.t && setStyleProperty(_el$79, "height", _p$.t = _v$8);
15502
+ _v$9 !== _p$.a && setStyleProperty(_el$79, "background", _p$.a = _v$9);
15351
15503
  return _p$;
15352
15504
  }, {
15353
15505
  e: void 0,
15354
15506
  t: void 0,
15355
15507
  a: void 0
15356
15508
  });
15357
- return _el$56;
15509
+ return _el$77;
15358
15510
  })()
15359
15511
  }));
15360
- return _el$33;
15512
+ return _el$54;
15361
15513
  })(), (() => {
15362
- var _el$35 = _tmpl$1014(), _el$36 = _el$35.firstChild, _el$37 = _el$36.firstChild, _el$38 = _el$37.nextSibling, _el$39 = _el$38.firstChild, _el$40 = _el$39.firstChild, _el$41 = _el$40.nextSibling, _el$42 = _el$41.nextSibling, _el$43 = _el$39.nextSibling, _el$44 = _el$43.firstChild, _el$45 = _el$44.nextSibling, _el$46 = _el$45.nextSibling, _el$47 = _el$43.nextSibling, _el$48 = _el$47.firstChild, _el$49 = _el$48.nextSibling;
15363
- insert(_el$35, createComponent(CardHeader, {
15514
+ var _el$56 = _tmpl$1612(), _el$57 = _el$56.firstChild, _el$58 = _el$57.firstChild, _el$59 = _el$58.nextSibling, _el$60 = _el$59.firstChild, _el$61 = _el$60.firstChild, _el$62 = _el$61.nextSibling, _el$63 = _el$62.nextSibling, _el$64 = _el$60.nextSibling, _el$65 = _el$64.firstChild, _el$66 = _el$65.nextSibling, _el$67 = _el$66.nextSibling, _el$68 = _el$64.nextSibling, _el$69 = _el$68.firstChild, _el$70 = _el$69.nextSibling;
15515
+ insert(_el$56, createComponent(CardHeader, {
15364
15516
  title: "Recovery emails"
15365
- }), _el$36);
15366
- insert(_el$41, () => s().recovery.captureRemindersSent);
15367
- insert(_el$42, () => s().recovery.captureRecovered);
15368
- insert(_el$45, () => s().recovery.sessionRemindersSent);
15369
- insert(_el$46, () => s().recovery.sessionRecovered);
15370
- insert(_el$49, () => s().recovery.optOuts);
15371
- return _el$35;
15517
+ }), _el$57);
15518
+ insert(_el$62, () => s().recovery.captureRemindersSent);
15519
+ insert(_el$63, () => s().recovery.captureRecovered);
15520
+ insert(_el$66, () => s().recovery.sessionRemindersSent);
15521
+ insert(_el$67, () => s().recovery.sessionRecovered);
15522
+ insert(_el$70, () => s().recovery.optOuts);
15523
+ return _el$56;
15372
15524
  })()]
15373
- }), _el$22);
15374
- insert(_el$19, createComponent(RecoverySettingsCard, {}), _el$22);
15375
- insert(_el$22, createComponent(CardHeader, {
15525
+ }), _el$43);
15526
+ insert(_el$40, createComponent(RecoveryQueue, {}), _el$43);
15527
+ insert(_el$40, createComponent(RecoverySettingsCard, {}), _el$43);
15528
+ insert(_el$43, createComponent(CardHeader, {
15376
15529
  title: "Recent abandons"
15377
- }), _el$23);
15378
- insert(_el$25, createComponent(Show, {
15530
+ }), _el$44);
15531
+ insert(_el$46, createComponent(Show, {
15379
15532
  get when() {
15380
15533
  return (abandons()?.sessions ?? []).length > 0;
15381
15534
  },
15382
15535
  get fallback() {
15383
15536
  return (() => {
15384
- var _el$60 = _tmpl$1412(), _el$61 = _el$60.firstChild;
15385
- insert(_el$61, createComponent(EmptyState, {
15537
+ var _el$81 = _tmpl$2010(), _el$82 = _el$81.firstChild;
15538
+ insert(_el$82, createComponent(EmptyState, {
15386
15539
  message: "No abandoned sessions"
15387
15540
  }));
15388
- return _el$60;
15541
+ return _el$81;
15389
15542
  })();
15390
15543
  },
15391
15544
  get children() {
@@ -15394,33 +15547,33 @@ function Funnel() {
15394
15547
  return abandons()?.sessions;
15395
15548
  },
15396
15549
  children: (sess) => (() => {
15397
- var _el$62 = _tmpl$1512(), _el$63 = _el$62.firstChild, _el$64 = _el$63.nextSibling, _el$65 = _el$64.nextSibling, _el$66 = _el$65.nextSibling;
15398
- insert(_el$63, () => formatDate(sess.last_seen_at));
15399
- insert(_el$64, (() => {
15550
+ var _el$83 = _tmpl$2115(), _el$84 = _el$83.firstChild, _el$85 = _el$84.nextSibling, _el$86 = _el$85.nextSibling, _el$87 = _el$86.nextSibling;
15551
+ insert(_el$84, () => formatDate(sess.last_seen_at));
15552
+ insert(_el$85, (() => {
15400
15553
  var _c$3 = memo(() => !!(sess.last_step != null && sess.step_count));
15401
15554
  return () => _c$3() ? `Step ${Math.min(sess.last_step + 1, sess.step_count)} of ${sess.step_count}` : "\u2014";
15402
15555
  })());
15403
- insert(_el$65, () => sess.email ?? _tmpl$1612());
15404
- insert(_el$66, () => sess.reminders_sent);
15405
- return _el$62;
15556
+ insert(_el$86, () => sess.email ?? _tmpl$2212());
15557
+ insert(_el$87, () => sess.reminders_sent);
15558
+ return _el$83;
15406
15559
  })()
15407
15560
  });
15408
15561
  }
15409
15562
  }));
15410
- insert(_el$26, createComponent(CardHeader, {
15563
+ insert(_el$47, createComponent(CardHeader, {
15411
15564
  title: "Completed surveys, not signed up"
15412
- }), _el$27);
15413
- insert(_el$29, createComponent(Show, {
15565
+ }), _el$48);
15566
+ insert(_el$50, createComponent(Show, {
15414
15567
  get when() {
15415
15568
  return (leads()?.captures ?? []).length > 0;
15416
15569
  },
15417
15570
  get fallback() {
15418
15571
  return (() => {
15419
- var _el$68 = _tmpl$1712(), _el$69 = _el$68.firstChild;
15420
- insert(_el$69, createComponent(EmptyState, {
15572
+ var _el$89 = _tmpl$2311(), _el$90 = _el$89.firstChild;
15573
+ insert(_el$90, createComponent(EmptyState, {
15421
15574
  message: "No unconverted captures"
15422
15575
  }));
15423
- return _el$68;
15576
+ return _el$89;
15424
15577
  })();
15425
15578
  },
15426
15579
  get children() {
@@ -15429,19 +15582,19 @@ function Funnel() {
15429
15582
  return leads()?.captures;
15430
15583
  },
15431
15584
  children: (c) => (() => {
15432
- var _el$70 = _tmpl$1811(), _el$71 = _el$70.firstChild, _el$72 = _el$71.nextSibling, _el$73 = _el$72.nextSibling, _el$74 = _el$73.nextSibling, _el$75 = _el$74.nextSibling;
15433
- insert(_el$71, () => formatDate(c.captured_at));
15434
- insert(_el$72, () => c.patient_name ?? "\u2014");
15435
- insert(_el$73, () => c.email ?? "\u2014");
15436
- insert(_el$74, () => c.qualified ? "Yes" : "No");
15437
- insert(_el$75, () => c.reminders_sent);
15438
- return _el$70;
15585
+ var _el$91 = _tmpl$2411(), _el$92 = _el$91.firstChild, _el$93 = _el$92.nextSibling, _el$94 = _el$93.nextSibling, _el$95 = _el$94.nextSibling, _el$96 = _el$95.nextSibling;
15586
+ insert(_el$92, () => formatDate(c.captured_at));
15587
+ insert(_el$93, () => c.patient_name ?? "\u2014");
15588
+ insert(_el$94, () => c.email ?? "\u2014");
15589
+ insert(_el$95, () => c.qualified ? "Yes" : "No");
15590
+ insert(_el$96, () => c.reminders_sent);
15591
+ return _el$91;
15439
15592
  })()
15440
15593
  });
15441
15594
  }
15442
15595
  }));
15443
- effect(() => _el$21.value = days());
15444
- return _el$19;
15596
+ effect(() => _el$42.value = days());
15597
+ return _el$40;
15445
15598
  })();
15446
15599
  }
15447
15600
  delegateEvents(["input", "click"]);
@@ -17005,12 +17158,12 @@ var _tmpl$1515 = /* @__PURE__ */ template(`<p class=msg-compose__error role=aler
17005
17158
  var _tmpl$1615 = /* @__PURE__ */ template(`<form class="msg-thread msg-thread--compose"data-testid=support-compose><div class=msg-thread__header><button type=button class=msg-thread__back-btn aria-label="Back to conversations"><i class="ph-thin ph-arrow-left"aria-hidden=true></i></button><div><h3 class=msg-thread__name>Message support</h3><p class=msg-thread__role>We usually reply within one business day</p></div></div><div class=msg-compose__new><label class=msg-compose__label for=support-subject>What's this about?</label><input id=support-subject class=msg-compose__subject type=text maxlength=500 required placeholder="e.g. Question about my order"><label class=msg-compose__label for=support-body>How can we help?</label><textarea id=support-body class=msg-compose__body rows=6 maxlength=5000 required placeholder="Tell us what's going on\u2026"></textarea><label class="msg-compose__attach msg-compose__attach--block"title="Attach a file"><i class="ph-thin ph-paperclip"aria-hidden=true></i><span class=msg-compose__attach-label></span><input class=msg-compose__file-input type=file data-testid=support-compose-attach></label><button type=submit class=msg-compose__send data-testid=support-compose-send>`);
17006
17159
  var _tmpl$1715 = /* @__PURE__ */ template(`<span class=msg-thread__status data-testid=thread-status-closed>Resolved`);
17007
17160
  var _tmpl$1812 = /* @__PURE__ */ template(`<div class=msg-thread__header><button type=button class=msg-thread__back-btn aria-label="Back to conversations"data-testid=messages-back><i class="ph-thin ph-arrow-left"aria-hidden=true></i></button><div><h3 class=msg-thread__name></h3><p class=msg-thread__role>`);
17008
- var _tmpl$1911 = /* @__PURE__ */ template(`<div class=msg-thread__messages data-scrollable><div>`);
17009
- var _tmpl$2010 = /* @__PURE__ */ template(`<span class=msg-compose__error role=alert>`);
17010
- var _tmpl$2115 = /* @__PURE__ */ template(`<div class=msg-compose__staged>`);
17011
- var _tmpl$2212 = /* @__PURE__ */ template(`<label class=msg-compose__attach title="Attach a file"><i class="ph-thin ph-paperclip"aria-hidden=true></i><span class=msg-compose__attach-label>Attach a file</span><input class=msg-compose__file-input type=file data-testid=messages-attach>`);
17012
- var _tmpl$2311 = /* @__PURE__ */ template(`<div class=msg-compose><textarea class=msg-compose__input rows=1 placeholder="Type a message\u2026"aria-label=Message></textarea><button type=button class=msg-compose__send data-testid=messages-send>`);
17013
- var _tmpl$2411 = /* @__PURE__ */ template(`<span class=msg-compose__staged-file data-testid=staged-file><i class="ph-thin ph-paperclip"aria-hidden=true></i><span class=msg-attachment__file-size></span><button type=button class=msg-compose__staged-remove aria-label="Remove attachment">\xD7`);
17161
+ var _tmpl$1912 = /* @__PURE__ */ template(`<div class=msg-thread__messages data-scrollable><div>`);
17162
+ var _tmpl$2011 = /* @__PURE__ */ template(`<span class=msg-compose__error role=alert>`);
17163
+ var _tmpl$2116 = /* @__PURE__ */ template(`<div class=msg-compose__staged>`);
17164
+ var _tmpl$2213 = /* @__PURE__ */ template(`<label class=msg-compose__attach title="Attach a file"><i class="ph-thin ph-paperclip"aria-hidden=true></i><span class=msg-compose__attach-label>Attach a file</span><input class=msg-compose__file-input type=file data-testid=messages-attach>`);
17165
+ var _tmpl$2312 = /* @__PURE__ */ template(`<div class=msg-compose><textarea class=msg-compose__input rows=1 placeholder="Type a message\u2026"aria-label=Message></textarea><button type=button class=msg-compose__send data-testid=messages-send>`);
17166
+ var _tmpl$2412 = /* @__PURE__ */ template(`<span class=msg-compose__staged-file data-testid=staged-file><i class="ph-thin ph-paperclip"aria-hidden=true></i><span class=msg-attachment__file-size></span><button type=button class=msg-compose__staged-remove aria-label="Remove attachment">\xD7`);
17014
17167
  var _tmpl$2511 = /* @__PURE__ */ template(`<div class=msg-panel data-testid=messages-panel><div class=msg-panel__layout><div></div><div>`);
17015
17168
  var _tmpl$2610 = /* @__PURE__ */ template(`<div class=msg-panel__placeholder data-testid=messages-placeholder><p>Select a conversation to read and reply.`);
17016
17169
  function sanitizeMessageHtml(html) {
@@ -17371,7 +17524,7 @@ function MessagesPanel(props) {
17371
17524
  }), null);
17372
17525
  return _el$43;
17373
17526
  })(), (() => {
17374
- var _el$49 = _tmpl$1911(), _el$51 = _el$49.firstChild;
17527
+ var _el$49 = _tmpl$1912(), _el$51 = _el$49.firstChild;
17375
17528
  insert(_el$49, createComponent(Show, {
17376
17529
  get when() {
17377
17530
  return thread().loadingMessages();
@@ -17396,13 +17549,13 @@ function MessagesPanel(props) {
17396
17549
  return pendingFile() || attachError();
17397
17550
  },
17398
17551
  get children() {
17399
- var _el$52 = _tmpl$2115();
17552
+ var _el$52 = _tmpl$2116();
17400
17553
  insert(_el$52, createComponent(Show, {
17401
17554
  get when() {
17402
17555
  return pendingFile();
17403
17556
  },
17404
17557
  children: (file) => (() => {
17405
- var _el$61 = _tmpl$2411(), _el$62 = _el$61.firstChild, _el$63 = _el$62.nextSibling, _el$64 = _el$63.nextSibling;
17558
+ var _el$61 = _tmpl$2412(), _el$62 = _el$61.firstChild, _el$63 = _el$62.nextSibling, _el$64 = _el$63.nextSibling;
17406
17559
  insert(_el$61, () => file().name, _el$63);
17407
17560
  insert(_el$63, () => formatFileSize(file().size));
17408
17561
  _el$64.$$click = () => setPendingFile(null);
@@ -17414,7 +17567,7 @@ function MessagesPanel(props) {
17414
17567
  return attachError();
17415
17568
  },
17416
17569
  get children() {
17417
- var _el$53 = _tmpl$2010();
17570
+ var _el$53 = _tmpl$2011();
17418
17571
  insert(_el$53, attachError);
17419
17572
  return _el$53;
17420
17573
  }
@@ -17422,13 +17575,13 @@ function MessagesPanel(props) {
17422
17575
  return _el$52;
17423
17576
  }
17424
17577
  }), (() => {
17425
- var _el$54 = _tmpl$2311(), _el$59 = _el$54.firstChild, _el$60 = _el$59.nextSibling;
17578
+ var _el$54 = _tmpl$2312(), _el$59 = _el$54.firstChild, _el$60 = _el$59.nextSibling;
17426
17579
  insert(_el$54, createComponent(Show, {
17427
17580
  get when() {
17428
17581
  return thread().selectedSource() === "support";
17429
17582
  },
17430
17583
  get children() {
17431
- var _el$55 = _tmpl$2212(), _el$56 = _el$55.firstChild, _el$57 = _el$56.nextSibling, _el$58 = _el$57.nextSibling;
17584
+ var _el$55 = _tmpl$2213(), _el$56 = _el$55.firstChild, _el$57 = _el$56.nextSibling, _el$58 = _el$57.nextSibling;
17432
17585
  _el$58.addEventListener("change", (e) => stageFile(e.currentTarget, setPendingFile));
17433
17586
  effect(() => setAttribute(_el$58, "accept", SUPPORT_ATTACHMENT_MIME_TYPES.join(",")));
17434
17587
  return _el$55;
@@ -18406,7 +18559,7 @@ function AffiliateReferralLink() {
18406
18559
  }
18407
18560
  delegateEvents(["click"]);
18408
18561
  var _tmpl$373 = /* @__PURE__ */ template(`<div style=display:flex;flex-direction:column;gap:1.5rem><h1 style=font-family:var(--app-affiliate-font-display);font-size:1.5rem;margin:0;color:var(--app-affiliate-fg)>Account</h1><div><button type=button style="padding:0.75rem 1.25rem;background:transparent;color:var(--app-affiliate-fg);border:1px solid var(--app-affiliate-border-strong);border-radius:var(--app-affiliate-radius-sm);cursor:pointer;font-weight:500">Log out</button></div><div style=font-size:0.875rem;color:var(--app-affiliate-fg-muted)>To update your profile or payment details, contact your program administrator.`);
18409
- var _tmpl$2116 = /* @__PURE__ */ template(`<div style=color:var(--app-affiliate-fg-muted)>Loading\u2026`);
18562
+ var _tmpl$2117 = /* @__PURE__ */ template(`<div style=color:var(--app-affiliate-fg-muted)>Loading\u2026`);
18410
18563
  var _tmpl$374 = /* @__PURE__ */ template(`<div style="background:var(--app-affiliate-surface);border:1px solid var(--app-affiliate-border);border-radius:var(--app-affiliate-radius);overflow:hidden">`);
18411
18564
  var _tmpl$454 = /* @__PURE__ */ template(`<div style="display:flex;justify-content:space-between;align-items:center;padding:0.875rem 1.25rem;border-bottom:1px solid var(--app-affiliate-border)"><div style=font-size:0.75rem;text-transform:uppercase;letter-spacing:0.05em;color:var(--app-affiliate-fg-muted)></div><div style=color:var(--app-affiliate-fg)>`);
18412
18565
  var STATUS_LABEL2 = {
@@ -18449,7 +18602,7 @@ function AffiliateSettings() {
18449
18602
  return affiliate();
18450
18603
  },
18451
18604
  get fallback() {
18452
- return _tmpl$2116();
18605
+ return _tmpl$2117();
18453
18606
  },
18454
18607
  children: (a) => (() => {
18455
18608
  var _el$7 = _tmpl$374();
@@ -18475,7 +18628,7 @@ delegateEvents(["click"]);
18475
18628
 
18476
18629
  // src/pages/AffiliatePortal.tsx
18477
18630
  var _tmpl$375 = /* @__PURE__ */ template(`<div class="app-affiliate-root app-affiliate-shell"style=position:sticky;background:var(--app-affiliate-bg);color:var(--app-affiliate-fg)><div class=app-affiliate-shell-header><button type=button class=app-affiliate-shell-menu-trigger aria-label="Open portal menu"><svg width=22 height=22 viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round aria-hidden=true><line x1=3 y1=6 x2=21 y2=6></line><line x1=3 y1=12 x2=21 y2=12></line><line x1=3 y1=18 x2=21 y2=18></line></svg></button><span class=app-affiliate-shell-header-title></span></div><div class=app-affiliate-backdrop aria-hidden=true></div><aside class=app-affiliate-sidebar><div style=padding:1.25rem><h2 style="font-size:0.7rem;font-weight:500;color:var(--app-affiliate-fg-muted);text-transform:uppercase;letter-spacing:0.08em;margin:0 0 1rem">Affiliate Portal</h2><nav style=display:flex;flex-direction:column;gap:0.25rem></nav></div></aside><div class=app-affiliate-content>`);
18478
- var _tmpl$2117 = /* @__PURE__ */ template(`<span style=font-size:1rem;opacity:0.7;flex-shrink:0>`);
18631
+ var _tmpl$2118 = /* @__PURE__ */ template(`<span style=font-size:1rem;opacity:0.7;flex-shrink:0>`);
18479
18632
  var _tmpl$376 = /* @__PURE__ */ template(`<button type=button style="display:flex;align-items:center;gap:0.75rem;padding:0.625rem 0.75rem;border-radius:var(--app-affiliate-radius-sm);font-size:0.875rem;font-weight:500;text-align:left;border:none;cursor:pointer">`);
18480
18633
  var _tmpl$455 = /* @__PURE__ */ template(`<div class=app-affiliate-root style=display:flex;align-items:center;justify-content:center;position:sticky;background:var(--app-affiliate-bg)><div role=status aria-label="Loading affiliate portal"style="width:1.75rem;height:1.75rem;border-radius:9999px;border:2px solid var(--app-affiliate-border);border-top-color:var(--app-affiliate-primary);animation:app-affiliate-gate-spin 0.8s linear infinite"></div><style>@keyframes app-affiliate-gate-spin { to { transform: rotate(360deg); } }`);
18481
18634
  var TAB_LABELS2 = {
@@ -18538,7 +18691,7 @@ function AffiliatePortal(props) {
18538
18691
  return props.tabIcons?.[tab];
18539
18692
  },
18540
18693
  get children() {
18541
- var _el$10 = _tmpl$2117();
18694
+ var _el$10 = _tmpl$2118();
18542
18695
  effect(() => className(_el$10, props.tabIcons[tab]));
18543
18696
  return _el$10;
18544
18697
  }
@@ -18680,7 +18833,7 @@ delegateEvents(["input", "click"]);
18680
18833
 
18681
18834
  // src/pages/AffiliateRegister.tsx
18682
18835
  var _tmpl$378 = /* @__PURE__ */ template(`<input type=text required autocomplete=given-name>`);
18683
- var _tmpl$2118 = /* @__PURE__ */ template(`<input type=text required autocomplete=family-name>`);
18836
+ var _tmpl$2119 = /* @__PURE__ */ template(`<input type=text required autocomplete=family-name>`);
18684
18837
  var _tmpl$379 = /* @__PURE__ */ template(`<input type=email required autocomplete=email>`);
18685
18838
  var _tmpl$456 = /* @__PURE__ */ template(`<input type=text required minlength=4>`);
18686
18839
  var _tmpl$548 = /* @__PURE__ */ template(`<div style="padding:0.625rem 0.875rem;background:var(--app-affiliate-danger-bg);color:var(--app-affiliate-danger-fg);border-radius:var(--app-affiliate-radius-sm);font-size:0.875rem">`);
@@ -18744,7 +18897,7 @@ function AffiliateRegister(props) {
18744
18897
  insert(_el$6, createComponent(Row, {
18745
18898
  label: "Last name",
18746
18899
  get children() {
18747
- var _el$8 = _tmpl$2118();
18900
+ var _el$8 = _tmpl$2119();
18748
18901
  _el$8.$$input = (e) => setLastName(e.currentTarget.value);
18749
18902
  effect((_$p) => style(_el$8, inputStyle2(), _$p));
18750
18903
  effect(() => _el$8.value = lastName());
@@ -18874,7 +19027,7 @@ function linkStyle() {
18874
19027
  }
18875
19028
  delegateEvents(["input", "click"]);
18876
19029
  var _tmpl$380 = /* @__PURE__ */ template(`<div style="padding:0.625rem 0.875rem;background:var(--app-affiliate-danger-bg);color:var(--app-affiliate-danger-fg);border-radius:var(--app-affiliate-radius-sm);font-size:0.875rem">`);
18877
- var _tmpl$2119 = /* @__PURE__ */ template(`<button type=button style=background:transparent;border:none;color:var(--app-affiliate-fg-muted);cursor:pointer;text-decoration:underline;font-size:0.875rem;padding:0;text-align:center>Forgot your password?`);
19030
+ var _tmpl$2120 = /* @__PURE__ */ template(`<button type=button style=background:transparent;border:none;color:var(--app-affiliate-fg-muted);cursor:pointer;text-decoration:underline;font-size:0.875rem;padding:0;text-align:center>Forgot your password?`);
18878
19031
  var _tmpl$381 = /* @__PURE__ */ template(`<button type=button style=background:transparent;border:none;color:var(--app-affiliate-primary-soft-fg);cursor:pointer;text-decoration:underline;font-size:0.875rem;padding:0;text-align:center>New affiliate? Apply`);
18879
19032
  var _tmpl$457 = /* @__PURE__ */ template(`<div class=app-affiliate-root style="background:var(--app-affiliate-bg);color:var(--app-affiliate-fg);min-height:100vh;display:flex;align-items:center;justify-content:center;padding:2rem 1rem"><div style="width:100%;max-width:24rem;background:var(--app-affiliate-surface);border:1px solid var(--app-affiliate-border);border-radius:var(--app-affiliate-radius);padding:2rem;display:flex;flex-direction:column;gap:1.25rem"><h1 style=font-family:var(--app-affiliate-font-display);margin:0;font-size:1.5rem>Affiliate login</h1><form style=display:flex;flex-direction:column;gap:0.875rem><label style=display:flex;flex-direction:column;gap:0.35rem><span>Email</span><input type=email required autocomplete=email></label><label style=display:flex;flex-direction:column;gap:0.35rem><span>Password</span></label><button type=submit style="padding:0.75rem 1rem;background:var(--app-affiliate-primary);color:var(--app-affiliate-primary-fg);border:none;border-radius:var(--app-affiliate-radius-sm);font-weight:600">`);
18880
19033
  function AffiliateLogin(props) {
@@ -18923,7 +19076,7 @@ function AffiliateLogin(props) {
18923
19076
  return props.onNavigateForgotPassword;
18924
19077
  },
18925
19078
  get children() {
18926
- var _el$10 = _tmpl$2119();
19079
+ var _el$10 = _tmpl$2120();
18927
19080
  _el$10.$$click = () => props.onNavigateForgotPassword?.();
18928
19081
  return _el$10;
18929
19082
  }
@@ -18982,7 +19135,7 @@ function inputStyle3() {
18982
19135
  }
18983
19136
  delegateEvents(["input", "click"]);
18984
19137
  var _tmpl$382 = /* @__PURE__ */ template(`<div style="padding:0.625rem 0.875rem;background:var(--app-affiliate-danger-bg);color:var(--app-affiliate-danger-fg);border-radius:var(--app-affiliate-radius-sm);font-size:0.875rem">`);
18985
- var _tmpl$2120 = /* @__PURE__ */ template(`<form style=display:flex;flex-direction:column;gap:0.875rem><label style=display:flex;flex-direction:column;gap:0.35rem><span>Email</span><input type=email required></label><button type=submit style="padding:0.75rem 1rem;background:var(--app-affiliate-primary);color:var(--app-affiliate-primary-fg);border:none;border-radius:var(--app-affiliate-radius-sm);font-weight:600">`);
19138
+ var _tmpl$2121 = /* @__PURE__ */ template(`<form style=display:flex;flex-direction:column;gap:0.875rem><label style=display:flex;flex-direction:column;gap:0.35rem><span>Email</span><input type=email required></label><button type=submit style="padding:0.75rem 1rem;background:var(--app-affiliate-primary);color:var(--app-affiliate-primary-fg);border:none;border-radius:var(--app-affiliate-radius-sm);font-weight:600">`);
18986
19139
  var _tmpl$383 = /* @__PURE__ */ template(`<div class=app-affiliate-root style="background:var(--app-affiliate-bg);color:var(--app-affiliate-fg);min-height:100vh;display:flex;align-items:center;justify-content:center;padding:2rem 1rem"><div style="width:100%;max-width:24rem;background:var(--app-affiliate-surface);border:1px solid var(--app-affiliate-border);border-radius:var(--app-affiliate-radius);padding:2rem;display:flex;flex-direction:column;gap:1.25rem"><h1 style=font-family:var(--app-affiliate-font-display);margin:0;font-size:1.5rem>Reset your password`);
18987
19140
  var _tmpl$458 = /* @__PURE__ */ template(`<div style="padding:0.625rem 0.875rem;background:var(--app-affiliate-surface-light);border-radius:var(--app-affiliate-radius-sm);font-size:0.875rem">`);
18988
19141
  function ForgotPasswordPage(props) {
@@ -19021,7 +19174,7 @@ function ForgotPasswordPage(props) {
19021
19174
  })();
19022
19175
  },
19023
19176
  get children() {
19024
- var _el$4 = _tmpl$2120(), _el$5 = _el$4.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling, _el$9 = _el$5.nextSibling;
19177
+ var _el$4 = _tmpl$2121(), _el$5 = _el$4.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling, _el$9 = _el$5.nextSibling;
19025
19178
  _el$4.addEventListener("submit", handleSubmit);
19026
19179
  _el$7.$$input = (e) => setEmail(e.currentTarget.value);
19027
19180
  insert(_el$4, createComponent(Show, {
@@ -19080,7 +19233,7 @@ function inputStyle4() {
19080
19233
  }
19081
19234
  delegateEvents(["input"]);
19082
19235
  var _tmpl$384 = /* @__PURE__ */ template(`<div style="padding:0.625rem 0.875rem;background:var(--app-affiliate-danger-bg);color:var(--app-affiliate-danger-fg);border-radius:var(--app-affiliate-radius-sm);font-size:0.875rem">`);
19083
- var _tmpl$2121 = /* @__PURE__ */ template(`<form style=display:flex;flex-direction:column;gap:0.875rem><label style=display:flex;flex-direction:column;gap:0.35rem><span>New password</span><input type=password required autocomplete=new-password></label><label style=display:flex;flex-direction:column;gap:0.35rem><span>Confirm password</span><input type=password required autocomplete=new-password></label><button type=submit style="padding:0.75rem 1rem;background:var(--app-affiliate-primary);color:var(--app-affiliate-primary-fg);border:none;border-radius:var(--app-affiliate-radius-sm);font-weight:600">`);
19236
+ var _tmpl$2122 = /* @__PURE__ */ template(`<form style=display:flex;flex-direction:column;gap:0.875rem><label style=display:flex;flex-direction:column;gap:0.35rem><span>New password</span><input type=password required autocomplete=new-password></label><label style=display:flex;flex-direction:column;gap:0.35rem><span>Confirm password</span><input type=password required autocomplete=new-password></label><button type=submit style="padding:0.75rem 1rem;background:var(--app-affiliate-primary);color:var(--app-affiliate-primary-fg);border:none;border-radius:var(--app-affiliate-radius-sm);font-weight:600">`);
19084
19237
  var _tmpl$385 = /* @__PURE__ */ template(`<div class=app-affiliate-root style="background:var(--app-affiliate-bg);color:var(--app-affiliate-fg);min-height:100vh;display:flex;align-items:center;justify-content:center;padding:2rem 1rem"><div style="width:100%;max-width:24rem;background:var(--app-affiliate-surface);border:1px solid var(--app-affiliate-border);border-radius:var(--app-affiliate-radius);padding:2rem;display:flex;flex-direction:column;gap:1.25rem"><h1 style=font-family:var(--app-affiliate-font-display);margin:0;font-size:1.5rem>Choose a new password`);
19085
19238
  var _tmpl$459 = /* @__PURE__ */ template(`<div style="padding:0.625rem 0.875rem;background:var(--app-affiliate-surface-light);border-radius:var(--app-affiliate-radius-sm);font-size:0.875rem">`);
19086
19239
  function queryParam(name) {
@@ -19135,7 +19288,7 @@ function ResetPasswordPage(props) {
19135
19288
  })();
19136
19289
  },
19137
19290
  get children() {
19138
- var _el$4 = _tmpl$2121(), _el$5 = _el$4.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling, _el$8 = _el$5.nextSibling, _el$9 = _el$8.firstChild, _el$0 = _el$9.nextSibling, _el$10 = _el$8.nextSibling;
19291
+ var _el$4 = _tmpl$2122(), _el$5 = _el$4.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling, _el$8 = _el$5.nextSibling, _el$9 = _el$8.firstChild, _el$0 = _el$9.nextSibling, _el$10 = _el$8.nextSibling;
19139
19292
  _el$4.addEventListener("submit", handleSubmit);
19140
19293
  _el$7.$$input = (e) => setPassword(e.currentTarget.value);
19141
19294
  _el$0.$$input = (e) => setConfirm(e.currentTarget.value);
@@ -19200,7 +19353,7 @@ function inputStyle5() {
19200
19353
  }
19201
19354
  delegateEvents(["input"]);
19202
19355
  var _tmpl$386 = /* @__PURE__ */ template(`<div>`);
19203
- var _tmpl$2122 = /* @__PURE__ */ template(`<form style=display:flex;flex-direction:column;gap:0.875rem><label style=display:flex;flex-direction:column;gap:0.35rem><span>Email</span><input type=email required autocomplete=email></label><button type=submit>`);
19356
+ var _tmpl$2123 = /* @__PURE__ */ template(`<form style=display:flex;flex-direction:column;gap:0.875rem><label style=display:flex;flex-direction:column;gap:0.35rem><span>Email</span><input type=email required autocomplete=email></label><button type=submit>`);
19204
19357
  var _tmpl$387 = /* @__PURE__ */ template(`<button type=button>Back to login`);
19205
19358
  var _tmpl$460 = /* @__PURE__ */ template(`<div class=app-affiliate-root><div><h1>Reset your password`);
19206
19359
  var _tmpl$549 = /* @__PURE__ */ template(`<p style=margin:0;font-size:0.9rem>`);
@@ -19239,7 +19392,7 @@ function AffiliateForgotPassword(props) {
19239
19392
  })();
19240
19393
  },
19241
19394
  get children() {
19242
- var _el$4 = _tmpl$2122(), _el$5 = _el$4.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling, _el$9 = _el$5.nextSibling;
19395
+ var _el$4 = _tmpl$2123(), _el$5 = _el$4.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling, _el$9 = _el$5.nextSibling;
19243
19396
  _el$4.addEventListener("submit", handleSubmit);
19244
19397
  _el$7.$$input = (e) => setEmail(e.currentTarget.value);
19245
19398
  insert(_el$4, createComponent(Show, {
@@ -19383,7 +19536,7 @@ function linkStyle2() {
19383
19536
  }
19384
19537
  delegateEvents(["input", "click"]);
19385
19538
  var _tmpl$388 = /* @__PURE__ */ template(`<div>`);
19386
- var _tmpl$2123 = /* @__PURE__ */ template(`<form style=display:flex;flex-direction:column;gap:0.875rem><label style=display:flex;flex-direction:column;gap:0.35rem><span>New password</span></label><label style=display:flex;flex-direction:column;gap:0.35rem><span>Confirm new password</span></label><button type=submit>`);
19539
+ var _tmpl$2124 = /* @__PURE__ */ template(`<form style=display:flex;flex-direction:column;gap:0.875rem><label style=display:flex;flex-direction:column;gap:0.35rem><span>New password</span></label><label style=display:flex;flex-direction:column;gap:0.35rem><span>Confirm new password</span></label><button type=submit>`);
19387
19540
  var _tmpl$389 = /* @__PURE__ */ template(`<div class=app-affiliate-root><div><h1>Choose a new password`);
19388
19541
  var _tmpl$461 = /* @__PURE__ */ template(`<p style=margin:0;font-size:0.9rem>Your password has been reset. You can now log in with your new password.`);
19389
19542
  function queryParam2(name) {
@@ -19438,7 +19591,7 @@ function AffiliateResetPassword(props) {
19438
19591
  return _tmpl$461();
19439
19592
  },
19440
19593
  get children() {
19441
- var _el$4 = _tmpl$2123(), _el$5 = _el$4.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$5.nextSibling, _el$8 = _el$7.firstChild, _el$0 = _el$7.nextSibling;
19594
+ var _el$4 = _tmpl$2124(), _el$5 = _el$4.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$5.nextSibling, _el$8 = _el$7.firstChild, _el$0 = _el$7.nextSibling;
19442
19595
  _el$4.addEventListener("submit", handleSubmit);
19443
19596
  insert(_el$5, createComponent(AffiliatePasswordInput, {
19444
19597
  required: true,
@@ -19562,5 +19715,5 @@ function primaryButtonStyle2(submitting) {
19562
19715
  }
19563
19716
 
19564
19717
  export { AddressFields, AdminDashboard, AffiliateForgotPassword, AffiliateLogin, AffiliatePortal, AffiliateRegister, AffiliateResetPassword, CartCheckoutPage, CheckoutPage, EmailTemplates, ForgotPasswordPage, MemberPortal, PatientDashboardPreview, RegisterPage, ResetPasswordPage, SignupPage, SubscribePage, SurveyPage, SurveyV2Page, UpdatePaymentMethod };
19565
- //# sourceMappingURL=MN4GWQC4.js.map
19566
- //# sourceMappingURL=MN4GWQC4.js.map
19718
+ //# sourceMappingURL=7COJH6FZ.js.map
19719
+ //# sourceMappingURL=7COJH6FZ.js.map