@apextelemed/partner-core 0.14.0 → 0.15.0-dev.39

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 (39) hide show
  1. package/dist/api/index.d.ts +1 -1
  2. package/dist/api/index.js +3 -3
  3. package/dist/api/index.jsx +3 -3
  4. package/dist/chunk/{GZX7PF2S.jsx → 2LWM2YSR.jsx} +2 -2
  5. package/dist/chunk/{6662ZOKC.jsx → CCRVBJ6A.jsx} +2 -2
  6. package/dist/chunk/{XKB3T5K4.js → CWPXPAUD.js} +5 -5
  7. package/dist/chunk/{XKB3T5K4.js.map → CWPXPAUD.js.map} +1 -1
  8. package/dist/chunk/{T6VCKNSU.js → DLP3Q3AT.js} +6 -6
  9. package/dist/chunk/{T6VCKNSU.js.map → DLP3Q3AT.js.map} +1 -1
  10. package/dist/chunk/{LDN265PO.js → IBGYHU26.js} +3 -3
  11. package/dist/chunk/{LDN265PO.js.map → IBGYHU26.js.map} +1 -1
  12. package/dist/chunk/{M7N4MMT5.jsx → JOPX73FC.jsx} +5 -5
  13. package/dist/chunk/{Q63J5O7F.jsx → KP3CBSWU.jsx} +1174 -1098
  14. package/dist/chunk/{YTKBUMDA.js → M6JEZQ5L.js} +539 -418
  15. package/dist/chunk/M6JEZQ5L.js.map +1 -0
  16. package/dist/chunk/{5CG4SVEX.jsx → NCK4UJHA.jsx} +2 -2
  17. package/dist/chunk/{N46NURCY.jsx → OLSTMCLZ.jsx} +1 -1
  18. package/dist/chunk/{MCTFP3KN.jsx → VECSCRAK.jsx} +4 -4
  19. package/dist/chunk/{TH5NFD6V.js → WDB3G3X3.js} +3 -3
  20. package/dist/chunk/{TH5NFD6V.js.map → WDB3G3X3.js.map} +1 -1
  21. package/dist/chunk/{HDNJFBNL.js → YYWHDAAF.js} +3 -3
  22. package/dist/chunk/{HDNJFBNL.js.map → YYWHDAAF.js.map} +1 -1
  23. package/dist/chunk/{6CLDGBGD.js → ZYHXLSJA.js} +2 -2
  24. package/dist/chunk/{6CLDGBGD.js.map → ZYHXLSJA.js.map} +1 -1
  25. package/dist/{client-cMWe3BQ3.d.ts → client-B07yeMS8.d.ts} +10 -0
  26. package/dist/flows/index.d.ts +1 -1
  27. package/dist/flows/index.js +6 -6
  28. package/dist/flows/index.jsx +6 -6
  29. package/dist/index/index.d.ts +1 -1
  30. package/dist/index/index.js +7 -7
  31. package/dist/index/index.jsx +7 -7
  32. package/dist/pages/index.d.ts +1 -1
  33. package/dist/pages/index.js +5 -5
  34. package/dist/pages/index.jsx +5 -5
  35. package/dist/stores/index.d.ts +1 -1
  36. package/dist/stores/index.js +2 -2
  37. package/dist/stores/index.jsx +2 -2
  38. package/package.json +1 -1
  39. package/dist/chunk/YTKBUMDA.js.map +0 -1
@@ -1,9 +1,9 @@
1
1
  import { disqualificationReasonText, qualifiedDrugIds } from './LZWA44KD.js';
2
- import { SUPPORT_CATEGORIES, useSurveyFlow, reconcileCartAgainstCatalog, resolveSurveyV2DrugIntent, emailGateAnswered, redeemResumeLink, useSurveyV2Flow, availableStateOptions, US_STATE_OPTIONS, useCheckoutFlow, catalogUnavailableMessage, useCartCheckoutFlow, useSignupFlow, useRegisterFlow, useSubscribeFlow, useDashboardData, useUpdatePaymentMethodFlow, useMemberPortalData, useMessagesThread, captureFunnelEmail, markEmailGateAnswered, isCatalogItemId, subscribeToSupportTopic, useAffiliateStats, useAffiliateConversions, useAffiliateDownline, useAffiliateLinks, stateAvailabilityNote, hasStateRestrictions, uploadPrescriptionPhoto, deriveAttention, deriveJourney, buildTimeline, lifecycleReason, accountSource, intakeEvidence, LIFECYCLE_BUCKETS, LIFECYCLE_LABEL, classifyCatalogError, groupDrugsByPharmacy, useProductCatalogEditor, skuBindingModeFor, isCssColorValue, categoryLabel, formatConversationTime, buildTrackerView, ACCOUNT_SOURCE_LABEL, fmtDay, createCatalogProduct, addCatalogItemAsProduct, applyPriceDrafts, resolveStrengthPrices, invalidDraftKeys, orphanKey, ORPHAN_REASON, READINESS_LABEL, formatCalendarDate, formatMessageTime, formatEventDate, formatStageDate, offerSummaryText, LIFECYCLE_TONE, buildTrackingUrl, buildStrengthRows, isImageAttachment, buildRefillView, toTrackerRequest } from './XKB3T5K4.js';
3
- import { fetchFunnelConfig } from './HDNJFBNL.js';
2
+ import { SUPPORT_CATEGORIES, useSurveyFlow, reconcileCartAgainstCatalog, resolveSurveyV2DrugIntent, emailGateAnswered, redeemResumeLink, useSurveyV2Flow, availableStateOptions, US_STATE_OPTIONS, useCheckoutFlow, catalogUnavailableMessage, useCartCheckoutFlow, useSignupFlow, useRegisterFlow, useSubscribeFlow, useDashboardData, useUpdatePaymentMethodFlow, useMemberPortalData, useMessagesThread, captureFunnelEmail, markEmailGateAnswered, isCatalogItemId, subscribeToSupportTopic, useAffiliateStats, useAffiliateConversions, useAffiliateDownline, useAffiliateLinks, stateAvailabilityNote, hasStateRestrictions, uploadPrescriptionPhoto, deriveAttention, deriveJourney, buildTimeline, lifecycleReason, accountSource, intakeEvidence, LIFECYCLE_BUCKETS, LIFECYCLE_LABEL, classifyCatalogError, groupDrugsByPharmacy, useProductCatalogEditor, skuBindingModeFor, isCssColorValue, categoryLabel, formatConversationTime, buildTrackerView, ACCOUNT_SOURCE_LABEL, fmtDay, createCatalogProduct, addCatalogItemAsProduct, applyPriceDrafts, resolveStrengthPrices, invalidDraftKeys, orphanKey, ORPHAN_REASON, READINESS_LABEL, formatCalendarDate, formatMessageTime, formatEventDate, formatStageDate, offerSummaryText, LIFECYCLE_TONE, buildTrackingUrl, buildStrengthRows, isImageAttachment, buildRefillView, toTrackerRequest } from './CWPXPAUD.js';
3
+ import { fetchFunnelConfig } from './YYWHDAAF.js';
4
4
  import { usePrimitives } from './67KHO66G.js';
5
- import { cart_default, auth_default, affiliateAuth_default } from './TH5NFD6V.js';
6
- import { usersApi, adminApi, membersApi, offersApi, affiliatePortalApi, authApi, adminAffiliatesApi, apiFetch, apexApi, adminCatalogApi, SUPPORT_ATTACHMENT_MIME_TYPES, SUPPORT_ATTACHMENT_MAX_BYTES, ApiError, subscriptionsApi } from './6CLDGBGD.js';
5
+ import { cart_default, auth_default, affiliateAuth_default } from './WDB3G3X3.js';
6
+ import { usersApi, adminApi, membersApi, offersApi, affiliatePortalApi, authApi, adminAffiliatesApi, apiFetch, apexApi, adminCatalogApi, SUPPORT_ATTACHMENT_MIME_TYPES, SUPPORT_ATTACHMENT_MAX_BYTES, ApiError, subscriptionsApi } from './ZYHXLSJA.js';
7
7
  import { delegateEvents, createComponent, insert, memo, effect, setStyleProperty, mergeProps, use, setAttribute, addEventListener, style, className, Dynamic, Portal, template } from 'solid-js/web';
8
8
  import { createContext, createSignal, createEffect, on, Show, For, createResource, createMemo, untrack, ErrorBoundary, Switch, Match, onMount, onCleanup, useContext, Index } from 'solid-js';
9
9
  import { isQuestionVisible } from '@apextelemed/survey-core';
@@ -11584,6 +11584,9 @@ var STATUS_WORD = {
11584
11584
  shipped: "Shipped",
11585
11585
  denied: "Not approved"
11586
11586
  };
11587
+ function pharmacyLabel(r) {
11588
+ return r.pharmacy?.pharmacyName || r.pharmacy?.pharmacyId || null;
11589
+ }
11587
11590
  function RequestCard(props) {
11588
11591
  const r = () => props.request;
11589
11592
  const view = () => buildTrackerView(toTrackerRequest(r()));
@@ -11699,11 +11702,21 @@ function RequestCard(props) {
11699
11702
  label: "Needs review",
11700
11703
  value: r().renewal?.needsReviewAt ? r().renewal.reviewReason ?? "Yes" : null
11701
11704
  }, {
11702
- label: "Request id",
11703
- value: (() => {
11705
+ label: "Pharmacy",
11706
+ value: pharmacyLabel(r())
11707
+ }, {
11708
+ label: "Pharmacy order #",
11709
+ value: r().pharmacy?.orderNumber ? (() => {
11704
11710
  var _el$13 = _tmpl$820();
11705
- insert(_el$13, () => r().requestId);
11711
+ insert(_el$13, () => r().pharmacy.orderNumber);
11706
11712
  return _el$13;
11713
+ })() : null
11714
+ }, {
11715
+ label: "Request id",
11716
+ value: (() => {
11717
+ var _el$14 = _tmpl$820();
11718
+ insert(_el$14, () => r().requestId);
11719
+ return _el$14;
11707
11720
  })()
11708
11721
  }].filter((i) => i.value !== null && i.value !== void 0);
11709
11722
  }
@@ -11713,6 +11726,94 @@ function RequestCard(props) {
11713
11726
  })();
11714
11727
  }
11715
11728
 
11729
+ // src/pages/admin/customers/sections/FillHistoryTable.tsx
11730
+ var _tmpl$181 = /* @__PURE__ */ template(`<span class=app-admin-text-muted>\u2014`);
11731
+ var _tmpl$258 = /* @__PURE__ */ template(`<div class=app-admin-table-wrap><table class=app-admin-table><thead><tr><th>Submitted</th><th>Medication</th><th>Status</th><th>Pharmacy</th><th>Pharmacy order #</th><th>Shipped</th><th>Request id</th></tr></thead><tbody>`);
11732
+ var _tmpl$340 = /* @__PURE__ */ template(`<div class=app-admin-text-muted style=font-size:0.75rem>`);
11733
+ var _tmpl$433 = /* @__PURE__ */ template(`<span class=app-admin-text-mono style=font-size:0.8125rem>`);
11734
+ var _tmpl$528 = /* @__PURE__ */ template(`<tr><td data-label=Submitted class=app-admin-text-muted></td><td data-label=Medication><a style=color:var(--app-admin-primary-soft-fg)></a></td><td data-label=Status></td><td data-label=Pharmacy></td><td data-label="Pharmacy order #"></td><td data-label=Shipped class=app-admin-text-muted></td><td data-label="Request id"class=app-admin-text-mono style=font-size:0.75rem>`);
11735
+ var Dash = () => _tmpl$181();
11736
+ function FillHistoryTable(props) {
11737
+ const sorted = () => [...props.requests].sort((a, b) => Date.parse(b.createdAt ?? "") - Date.parse(a.createdAt ?? ""));
11738
+ return createComponent(Show, {
11739
+ get when() {
11740
+ return props.requests.length > 0;
11741
+ },
11742
+ get fallback() {
11743
+ return createComponent(EmptyState, {
11744
+ message: "No fills yet."
11745
+ });
11746
+ },
11747
+ get children() {
11748
+ var _el$2 = _tmpl$258(), _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$5 = _el$4.nextSibling;
11749
+ insert(_el$5, createComponent(For, {
11750
+ get each() {
11751
+ return sorted();
11752
+ },
11753
+ children: (r) => (() => {
11754
+ var _el$6 = _tmpl$528(), _el$7 = _el$6.firstChild, _el$8 = _el$7.nextSibling, _el$9 = _el$8.firstChild, _el$1 = _el$8.nextSibling, _el$10 = _el$1.nextSibling, _el$11 = _el$10.nextSibling, _el$13 = _el$11.nextSibling, _el$14 = _el$13.nextSibling;
11755
+ insert(_el$7, () => fmtDate(r.createdAt));
11756
+ insert(_el$9, () => r.drugName || "Prescription request");
11757
+ insert(_el$8, createComponent(Show, {
11758
+ get when() {
11759
+ return r.dosage;
11760
+ },
11761
+ get children() {
11762
+ var _el$0 = _tmpl$340();
11763
+ insert(_el$0, () => r.dosage);
11764
+ return _el$0;
11765
+ }
11766
+ }), null);
11767
+ insert(_el$1, createComponent(StatusBadge, {
11768
+ get status() {
11769
+ return r.status;
11770
+ }
11771
+ }));
11772
+ insert(_el$10, createComponent(Show, {
11773
+ get when() {
11774
+ return pharmacyLabel(r);
11775
+ },
11776
+ get fallback() {
11777
+ return createComponent(Dash, {});
11778
+ },
11779
+ get children() {
11780
+ return pharmacyLabel(r);
11781
+ }
11782
+ }));
11783
+ insert(_el$11, createComponent(Show, {
11784
+ get when() {
11785
+ return r.pharmacy?.orderNumber;
11786
+ },
11787
+ get fallback() {
11788
+ return createComponent(Dash, {});
11789
+ },
11790
+ get children() {
11791
+ var _el$12 = _tmpl$433();
11792
+ insert(_el$12, () => r.pharmacy.orderNumber);
11793
+ return _el$12;
11794
+ }
11795
+ }));
11796
+ insert(_el$13, createComponent(Show, {
11797
+ get when() {
11798
+ return r.tracking?.shippedAt;
11799
+ },
11800
+ get fallback() {
11801
+ return createComponent(Dash, {});
11802
+ },
11803
+ get children() {
11804
+ return fmtDate(r.tracking.shippedAt);
11805
+ }
11806
+ }));
11807
+ insert(_el$14, () => r.requestId);
11808
+ effect(() => setAttribute(_el$9, "href", `#req-${r.requestId}`));
11809
+ return _el$6;
11810
+ })()
11811
+ }));
11812
+ return _el$2;
11813
+ }
11814
+ });
11815
+ }
11816
+
11716
11817
  // src/pages/admin/customers/subscriptionTerms.ts
11717
11818
  function nextChargeCents(s) {
11718
11819
  return s.nextChargeCents ?? s.amountCents;
@@ -11747,17 +11848,17 @@ function discountTerms(s) {
11747
11848
  }
11748
11849
 
11749
11850
  // src/pages/admin/customers/sections/SubscriptionCard.tsx
11750
- var _tmpl$181 = /* @__PURE__ */ template(`<span class=app-admin-text-muted style=font-size:0.875rem>`);
11751
- var _tmpl$258 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-ghost app-admin-btn-sm">Change amount`);
11752
- var _tmpl$340 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-ghost app-admin-btn-sm">Change schedule`);
11753
- var _tmpl$433 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-ghost app-admin-btn-sm">`);
11754
- var _tmpl$528 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-primary app-admin-btn-sm">`);
11851
+ var _tmpl$188 = /* @__PURE__ */ template(`<span class=app-admin-text-muted style=font-size:0.875rem>`);
11852
+ var _tmpl$259 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-ghost app-admin-btn-sm">Change amount`);
11853
+ var _tmpl$341 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-ghost app-admin-btn-sm">Change schedule`);
11854
+ var _tmpl$434 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-ghost app-admin-btn-sm">`);
11855
+ var _tmpl$529 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-primary app-admin-btn-sm">`);
11755
11856
  var _tmpl$626 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-danger">`);
11756
11857
  var _tmpl$724 = /* @__PURE__ */ template(`<div class=app-admin-table-wrap style=margin-top:0.5rem><table class=app-admin-table style=font-size:0.8125rem><thead><tr><th>When</th><th>Period</th><th>Amount</th><th>Outcome</th><th>Reason</th><th></th></tr></thead><tbody>`);
11757
11858
  var _tmpl$821 = /* @__PURE__ */ template(`<div style=margin-top:0.875rem><button type=button class=app-admin-link-btn> billing attempts (<!>)`);
11758
11859
  var _tmpl$918 = /* @__PURE__ */ template(`<article class=app-admin-card-soft style="padding:1rem 1.25rem"><div style=display:flex;flex-wrap:wrap;align-items:flex-start;justify-content:space-between;gap:0.75rem><div style=min-width:0><div style=display:flex;align-items:center;gap:0.5rem;flex-wrap:wrap><span style=font-weight:600></span></div><div class=app-admin-text-muted style=font-size:0.875rem;margin-top:0.25rem> \xB7 </div></div><div style=display:flex;flex-wrap:wrap;gap:0.375rem></div></div><div style=margin-top:0.875rem>`);
11759
11860
  var _tmpl$015 = /* @__PURE__ */ template(`<span class=app-admin-text-mono style=font-size:0.8125rem>`);
11760
- var _tmpl$188 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-warning">Resolve`);
11861
+ var _tmpl$189 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-warning">Resolve`);
11761
11862
  var _tmpl$1012 = /* @__PURE__ */ template(`<tr><td data-label=When class=app-admin-text-muted></td><td data-label=Period class=app-admin-text-muted></td><td data-label=Amount></td><td data-label=Outcome><span></span></td><td data-label=Reason class=app-admin-text-muted></td><td data-label class=app-admin-table-cell--no-label>`);
11762
11863
  function attemptTone(status) {
11763
11864
  if (status === "succeeded") return "success";
@@ -11780,7 +11881,7 @@ function SubscriptionCard(props) {
11780
11881
  return s().dosage;
11781
11882
  },
11782
11883
  get children() {
11783
- var _el$6 = _tmpl$181();
11884
+ var _el$6 = _tmpl$188();
11784
11885
  insert(_el$6, () => s().dosage);
11785
11886
  return _el$6;
11786
11887
  }
@@ -11798,7 +11899,7 @@ function SubscriptionCard(props) {
11798
11899
  },
11799
11900
  get children() {
11800
11901
  return [(() => {
11801
- var _el$0 = _tmpl$258();
11902
+ var _el$0 = _tmpl$259();
11802
11903
  _el$0.$$click = () => props.onEditAmount(s());
11803
11904
  effect((_p$) => {
11804
11905
  var _v$ = gateway(), _v$2 = gateway() ? "The gateway holds this price; move the subscription to platform billing first." : void 0;
@@ -11811,7 +11912,7 @@ function SubscriptionCard(props) {
11811
11912
  });
11812
11913
  return _el$0;
11813
11914
  })(), (() => {
11814
- var _el$1 = _tmpl$340();
11915
+ var _el$1 = _tmpl$341();
11815
11916
  _el$1.$$click = () => props.onEditSchedule(s());
11816
11917
  return _el$1;
11817
11918
  })()];
@@ -11822,7 +11923,7 @@ function SubscriptionCard(props) {
11822
11923
  return s().status === "active";
11823
11924
  },
11824
11925
  get children() {
11825
- var _el$10 = _tmpl$433();
11926
+ var _el$10 = _tmpl$434();
11826
11927
  _el$10.$$click = () => props.onPause(s());
11827
11928
  insert(_el$10, () => busy("pause") ? "Pausing\u2026" : "Pause");
11828
11929
  effect(() => _el$10.disabled = busy("pause"));
@@ -11834,7 +11935,7 @@ function SubscriptionCard(props) {
11834
11935
  return s().status === "paused";
11835
11936
  },
11836
11937
  get children() {
11837
- var _el$11 = _tmpl$528();
11938
+ var _el$11 = _tmpl$529();
11838
11939
  _el$11.$$click = () => props.onResume(s());
11839
11940
  insert(_el$11, () => busy("resume") ? "Resuming\u2026" : "Resume");
11840
11941
  effect(() => _el$11.disabled = busy("resume"));
@@ -11931,7 +12032,7 @@ function SubscriptionCard(props) {
11931
12032
  return a.status === "pending" || a.status === "indeterminate";
11932
12033
  },
11933
12034
  get children() {
11934
- var _el$32 = _tmpl$188();
12035
+ var _el$32 = _tmpl$189();
11935
12036
  _el$32.$$click = () => props.onResolveAttempt(s(), a);
11936
12037
  effect(() => _el$32.disabled = props.busy === `resolve-${a.id}`);
11937
12038
  return _el$32;
@@ -11953,11 +12054,11 @@ function SubscriptionCard(props) {
11953
12054
  })();
11954
12055
  }
11955
12056
  delegateEvents(["click"]);
11956
- var _tmpl$189 = /* @__PURE__ */ template(`<div class=app-admin-text-muted style=font-size:0.75rem>Showing the latest <!>.`);
11957
- var _tmpl$259 = /* @__PURE__ */ template(`<div class=app-admin-section-stack style=gap:0.5rem><div class=app-admin-text-muted style=font-size:0.8125rem> thread</div><ul style=list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:0.5rem>`);
11958
- var _tmpl$341 = /* @__PURE__ */ template(`<p class=app-admin-text-muted style=margin:0;font-size:0.8125rem>No support conversations.`);
11959
- var _tmpl$434 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-ghost app-admin-btn-sm">Open`);
11960
- var _tmpl$529 = /* @__PURE__ */ template(`<li style=display:flex;align-items:center;justify-content:space-between;gap:0.5rem><div style=min-width:0><div style=font-size:0.875rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap></div><div class=app-admin-text-muted style=font-size:0.75rem></div></div><div style=display:flex;align-items:center;gap:0.375rem;flex-shrink:0>`);
12057
+ var _tmpl$190 = /* @__PURE__ */ template(`<div class=app-admin-text-muted style=font-size:0.75rem>Showing the latest <!>.`);
12058
+ var _tmpl$260 = /* @__PURE__ */ template(`<div class=app-admin-section-stack style=gap:0.5rem><div class=app-admin-text-muted style=font-size:0.8125rem> thread</div><ul style=list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:0.5rem>`);
12059
+ var _tmpl$343 = /* @__PURE__ */ template(`<p class=app-admin-text-muted style=margin:0;font-size:0.8125rem>No support conversations.`);
12060
+ var _tmpl$435 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-ghost app-admin-btn-sm">Open`);
12061
+ var _tmpl$530 = /* @__PURE__ */ template(`<li style=display:flex;align-items:center;justify-content:space-between;gap:0.5rem><div style=min-width:0><div style=font-size:0.875rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap></div><div class=app-admin-text-muted style=font-size:0.75rem></div></div><div style=display:flex;align-items:center;gap:0.375rem;flex-shrink:0>`);
11961
12062
  var STATUS_WORD2 = {
11962
12063
  open: "needs reply",
11963
12064
  pending: "awaiting customer",
@@ -11971,10 +12072,10 @@ function SupportSummary(props) {
11971
12072
  return s().threadCount > 0;
11972
12073
  },
11973
12074
  get fallback() {
11974
- return _tmpl$341();
12075
+ return _tmpl$343();
11975
12076
  },
11976
12077
  get children() {
11977
- var _el$ = _tmpl$259(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$2.nextSibling;
12078
+ var _el$ = _tmpl$260(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$2.nextSibling;
11978
12079
  insert(_el$2, () => s().threadCount, _el$3);
11979
12080
  insert(_el$2, () => s().threadCount === 1 ? "" : "s", null);
11980
12081
  insert(_el$2, createComponent(Show, {
@@ -11990,7 +12091,7 @@ function SupportSummary(props) {
11990
12091
  return s().threads;
11991
12092
  },
11992
12093
  children: (t) => (() => {
11993
- var _el$0 = _tmpl$529(), _el$1 = _el$0.firstChild, _el$10 = _el$1.firstChild, _el$11 = _el$10.nextSibling, _el$12 = _el$1.nextSibling;
12094
+ var _el$0 = _tmpl$530(), _el$1 = _el$0.firstChild, _el$10 = _el$1.firstChild, _el$11 = _el$10.nextSibling, _el$12 = _el$1.nextSibling;
11994
12095
  insert(_el$10, () => t.subject || "No subject");
11995
12096
  insert(_el$11, () => STATUS_WORD2[t.status] ?? t.status, null);
11996
12097
  insert(_el$11, createComponent(Show, {
@@ -12040,7 +12141,7 @@ function SupportSummary(props) {
12040
12141
  });
12041
12142
  },
12042
12143
  get children() {
12043
- var _el$13 = _tmpl$434();
12144
+ var _el$13 = _tmpl$435();
12044
12145
  _el$13.$$click = () => props.onOpenThread(t.id);
12045
12146
  return _el$13;
12046
12147
  }
@@ -12054,7 +12155,7 @@ function SupportSummary(props) {
12054
12155
  return s().threadCount > s().threads.length;
12055
12156
  },
12056
12157
  get children() {
12057
- var _el$5 = _tmpl$189(), _el$6 = _el$5.firstChild, _el$8 = _el$6.nextSibling; _el$8.nextSibling;
12158
+ var _el$5 = _tmpl$190(), _el$6 = _el$5.firstChild, _el$8 = _el$6.nextSibling; _el$8.nextSibling;
12058
12159
  insert(_el$5, () => s().threads.length, _el$8);
12059
12160
  return _el$5;
12060
12161
  }
@@ -12066,17 +12167,17 @@ function SupportSummary(props) {
12066
12167
  delegateEvents(["click"]);
12067
12168
 
12068
12169
  // src/pages/admin/customers/CustomerDetail.tsx
12069
- var _tmpl$190 = /* @__PURE__ */ template(`<div class=app-admin-detail>`);
12070
- var _tmpl$260 = /* @__PURE__ */ template(`<button type=button class=app-admin-back><span aria-hidden=true>\u2190</span>Customers`);
12071
- var _tmpl$343 = /* @__PURE__ */ template(`<div style=text-align:center><button type=button class=app-admin-link-btn>Try again`);
12072
- var _tmpl$435 = /* @__PURE__ */ template(`<p class=app-admin-notice style=margin:0>Some sections did not load (<!>). <button type=button class=app-admin-link-btn>Reload`);
12073
- var _tmpl$530 = /* @__PURE__ */ template(`<div class=app-admin-alerts data-testid=customer-attention>`);
12170
+ var _tmpl$191 = /* @__PURE__ */ template(`<div class=app-admin-detail>`);
12171
+ var _tmpl$261 = /* @__PURE__ */ template(`<button type=button class=app-admin-back><span aria-hidden=true>\u2190</span>Customers`);
12172
+ var _tmpl$344 = /* @__PURE__ */ template(`<div style=text-align:center><button type=button class=app-admin-link-btn>Try again`);
12173
+ var _tmpl$436 = /* @__PURE__ */ template(`<p class=app-admin-notice style=margin:0>Some sections did not load (<!>). <button type=button class=app-admin-link-btn>Reload`);
12174
+ var _tmpl$531 = /* @__PURE__ */ template(`<div class=app-admin-alerts data-testid=customer-attention>`);
12074
12175
  var _tmpl$627 = /* @__PURE__ */ template(`<span style=display:inline-flex;align-items:center;gap:0.5rem><input type=email aria-label="Customer email"class=app-admin-input style="width:16rem;padding:0.25rem 0.625rem"><button type=button class="app-admin-btn app-admin-btn-primary app-admin-btn-sm"></button><button type=button class="app-admin-btn app-admin-btn-ghost app-admin-btn-sm">Cancel`);
12075
12176
  var _tmpl$725 = /* @__PURE__ */ template(`<span>`);
12076
12177
  var _tmpl$822 = /* @__PURE__ */ template(`<span>Joined `);
12077
12178
  var _tmpl$919 = /* @__PURE__ */ template(`<span style=display:inline-flex;align-items:center;gap:0.5rem><span></span><button type=button class="app-admin-btn app-admin-btn-ghost app-admin-btn-sm"style="padding:0.1rem 0.5rem">Edit`);
12078
12179
  var _tmpl$016 = /* @__PURE__ */ template(`<span class="app-admin-badge app-admin-badge--info"style=text-transform:none>Savings member`);
12079
- var _tmpl$191 = /* @__PURE__ */ template(`<span style=font-size:0.9375rem>`);
12180
+ var _tmpl$198 = /* @__PURE__ */ template(`<span style=font-size:0.9375rem>`);
12080
12181
  var _tmpl$1013 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-ghost">`);
12081
12182
  var _tmpl$1115 = /* @__PURE__ */ template(`<div class=app-admin-section-stack>`);
12082
12183
  var _tmpl$1212 = /* @__PURE__ */ template(`<p class=app-admin-text-muted style=margin:0;font-size:0.8125rem>Older requests are shown from stored status only.`);
@@ -12086,7 +12187,7 @@ var _tmpl$1510 = /* @__PURE__ */ template(`<button type=button class="app-admin-
12086
12187
  var _tmpl$1610 = /* @__PURE__ */ template(`<p class=app-admin-text-muted style=margin:0;font-size:0.875rem>No prescription requests.`);
12087
12188
  var _tmpl$1710 = /* @__PURE__ */ template(`<tr><td data-label=Date class=app-admin-text-muted></td><td data-label=Items></td><td data-label=Total></td><td data-label=Status>`);
12088
12189
  var _tmpl$1810 = /* @__PURE__ */ template(`<button type=button class=app-admin-link-btn>`);
12089
- var _tmpl$198 = /* @__PURE__ */ template(`<p class=app-admin-text-muted style=margin:0;font-size:0.875rem>Nothing recorded yet.`);
12190
+ var _tmpl$199 = /* @__PURE__ */ template(`<p class=app-admin-text-muted style=margin:0;font-size:0.875rem>Nothing recorded yet.`);
12090
12191
  var _tmpl$207 = /* @__PURE__ */ template(`<p style=margin:0;font-size:0.875rem>The <!> charge for period <!> is <strong></strong>. Check the gateway for this transaction before choosing.`);
12091
12192
  var _tmpl$2113 = /* @__PURE__ */ template(`<div style=display:flex;flex-direction:column;gap:0.5rem><button type=button class="app-admin-btn app-admin-btn-ghost">The gateway did not capture it: mark failed so billing retries</button><button type=button class="app-admin-btn app-admin-btn-ghost">The gateway captured it: mark succeeded`);
12092
12193
  var TIMELINE_PREVIEW = 30;
@@ -12362,7 +12463,7 @@ function CustomerDetail(props) {
12362
12463
  };
12363
12464
  const pendingRequests = () => (o()?.requests.items ?? []).filter((r) => r.status === "pending");
12364
12465
  return (() => {
12365
- var _el$ = _tmpl$190();
12466
+ var _el$ = _tmpl$191();
12366
12467
  insert(_el$, createComponent(Show, {
12367
12468
  get when() {
12368
12469
  return !overview.loading;
@@ -12377,7 +12478,7 @@ function CustomerDetail(props) {
12377
12478
  },
12378
12479
  get fallback() {
12379
12480
  return [(() => {
12380
- var _el$2 = _tmpl$260();
12481
+ var _el$2 = _tmpl$261();
12381
12482
  addEventListener(_el$2, "click", props.onBack, true);
12382
12483
  return _el$2;
12383
12484
  })(), createComponent(EmptyState, {
@@ -12385,7 +12486,7 @@ function CustomerDetail(props) {
12385
12486
  return loadError() ?? "This customer could not be loaded.";
12386
12487
  }
12387
12488
  }), (() => {
12388
- var _el$3 = _tmpl$343(), _el$4 = _el$3.firstChild;
12489
+ var _el$3 = _tmpl$344(), _el$4 = _el$3.firstChild;
12389
12490
  _el$4.$$click = () => refetch();
12390
12491
  return _el$3;
12391
12492
  })()];
@@ -12473,7 +12574,7 @@ function CustomerDetail(props) {
12473
12574
  });
12474
12575
  }
12475
12576
  }), (() => {
12476
- var _el$21 = _tmpl$191();
12577
+ var _el$21 = _tmpl$198();
12477
12578
  insert(_el$21, reason);
12478
12579
  return _el$21;
12479
12580
  })()];
@@ -12497,7 +12598,7 @@ function CustomerDetail(props) {
12497
12598
  return ov().partial.length > 0;
12498
12599
  },
12499
12600
  get children() {
12500
- var _el$5 = _tmpl$435(), _el$6 = _el$5.firstChild, _el$0 = _el$6.nextSibling, _el$7 = _el$0.nextSibling, _el$9 = _el$7.nextSibling;
12601
+ var _el$5 = _tmpl$436(), _el$6 = _el$5.firstChild, _el$0 = _el$6.nextSibling, _el$7 = _el$0.nextSibling, _el$9 = _el$7.nextSibling;
12501
12602
  insert(_el$5, () => ov().partial.join(", "), _el$0);
12502
12603
  _el$9.$$click = () => refetch();
12503
12604
  return _el$5;
@@ -12507,7 +12608,7 @@ function CustomerDetail(props) {
12507
12608
  return attention().length > 0;
12508
12609
  },
12509
12610
  get children() {
12510
- var _el$1 = _tmpl$530();
12611
+ var _el$1 = _tmpl$531();
12511
12612
  insert(_el$1, createComponent(For, {
12512
12613
  get each() {
12513
12614
  return attention();
@@ -12634,6 +12735,26 @@ function CustomerDetail(props) {
12634
12735
  }
12635
12736
  });
12636
12737
  }
12738
+ }), createComponent(Show, {
12739
+ get when() {
12740
+ return ov().requests.items.length > 0;
12741
+ },
12742
+ get children() {
12743
+ return createComponent(Section, {
12744
+ title: "Fill history",
12745
+ get count() {
12746
+ return ov().requests.items.length;
12747
+ },
12748
+ flush: true,
12749
+ get children() {
12750
+ return createComponent(FillHistoryTable, {
12751
+ get requests() {
12752
+ return ov().requests.items;
12753
+ }
12754
+ });
12755
+ }
12756
+ });
12757
+ }
12637
12758
  }), createComponent(Section, {
12638
12759
  title: "Payments",
12639
12760
  get count() {
@@ -12746,7 +12867,7 @@ function CustomerDetail(props) {
12746
12867
  return timeline().length > 0;
12747
12868
  },
12748
12869
  get fallback() {
12749
- return _tmpl$198();
12870
+ return _tmpl$199();
12750
12871
  },
12751
12872
  get children() {
12752
12873
  return createComponent(Timeline, {
@@ -12858,11 +12979,11 @@ function CustomerDetail(props) {
12858
12979
  })();
12859
12980
  }
12860
12981
  delegateEvents(["click", "input"]);
12861
- var _tmpl$199 = /* @__PURE__ */ template(`<label style=display:inline-flex;align-items:center;gap:0.375rem><input type=checkbox>Savings members only`);
12862
- var _tmpl$261 = /* @__PURE__ */ template(`<div style="padding:0.75rem 1rem;border-top:1px solid var(--app-admin-border-soft);display:flex;justify-content:center"><button type=button class="app-admin-btn app-admin-btn-ghost">`);
12863
- var _tmpl$344 = /* @__PURE__ */ template(`<div class=app-admin-card style=overflow:hidden><div class=app-admin-table-wrap><table class=app-admin-table><thead><tr><th>Customer</th><th>Status</th><th>Plan</th><th>Prescription</th><th>Last activity</th><th>Joined</th></tr></thead><tbody>`);
12864
- var _tmpl$436 = /* @__PURE__ */ template(`<div style=margin-top:0.75rem><button type=button class=app-admin-link-btn>Retry`);
12865
- var _tmpl$531 = /* @__PURE__ */ template(`<div><div style=display:flex;flex-direction:column;gap:0.875rem;margin-bottom:1.25rem><div style=max-width:28rem><input type=search placeholder="Search by name or email"aria-label="Search customers"class=app-admin-input></div><div class=app-admin-chips role=group aria-label="Filter by status"></div><div style=display:flex;flex-wrap:wrap;gap:1rem;font-size:0.8125rem;color:var(--app-admin-fg-muted)><label style=display:inline-flex;align-items:center;gap:0.375rem><input type=checkbox>Never completed intake`);
12982
+ var _tmpl$200 = /* @__PURE__ */ template(`<label style=display:inline-flex;align-items:center;gap:0.375rem><input type=checkbox>Savings members only`);
12983
+ var _tmpl$266 = /* @__PURE__ */ template(`<div style="padding:0.75rem 1rem;border-top:1px solid var(--app-admin-border-soft);display:flex;justify-content:center"><button type=button class="app-admin-btn app-admin-btn-ghost">`);
12984
+ var _tmpl$345 = /* @__PURE__ */ template(`<div class=app-admin-card style=overflow:hidden><div class=app-admin-table-wrap><table class=app-admin-table><thead><tr><th>Customer</th><th>Status</th><th>Plan</th><th>Prescription</th><th>Last activity</th><th>Joined</th></tr></thead><tbody>`);
12985
+ var _tmpl$437 = /* @__PURE__ */ template(`<div style=margin-top:0.75rem><button type=button class=app-admin-link-btn>Retry`);
12986
+ var _tmpl$532 = /* @__PURE__ */ template(`<div><div style=display:flex;flex-direction:column;gap:0.875rem;margin-bottom:1.25rem><div style=max-width:28rem><input type=search placeholder="Search by name or email"aria-label="Search customers"class=app-admin-input></div><div class=app-admin-chips role=group aria-label="Filter by status"></div><div style=display:flex;flex-wrap:wrap;gap:1rem;font-size:0.8125rem;color:var(--app-admin-fg-muted)><label style=display:inline-flex;align-items:center;gap:0.375rem><input type=checkbox>Never completed intake`);
12866
12987
  var _tmpl$628 = /* @__PURE__ */ template(`<div class=app-admin-text-muted style=font-size:0.8125rem>`);
12867
12988
  var _tmpl$726 = /* @__PURE__ */ template(`<span class=app-admin-text-muted style=font-size:0.75rem>`);
12868
12989
  var _tmpl$823 = /* @__PURE__ */ template(`<span style=text-transform:capitalize>`);
@@ -12977,7 +13098,7 @@ function CustomerList(props) {
12977
13098
  };
12978
13099
  const showSavingsToggle = () => savingsOnly() || rows().some((r) => r.facts?.isSavingsMember);
12979
13100
  return (() => {
12980
- var _el$ = _tmpl$531(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$5 = _el$3.nextSibling, _el$6 = _el$5.nextSibling, _el$9 = _el$6.firstChild, _el$0 = _el$9.firstChild;
13101
+ var _el$ = _tmpl$532(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$5 = _el$3.nextSibling, _el$6 = _el$5.nextSibling, _el$9 = _el$6.firstChild, _el$0 = _el$9.firstChild;
12981
13102
  insert(_el$, createComponent(PageTitle, {
12982
13103
  subtitle: "Every account on this site, with where each one is in the journey.",
12983
13104
  children: "Customers"
@@ -13013,7 +13134,7 @@ function CustomerList(props) {
13013
13134
  return showSavingsToggle();
13014
13135
  },
13015
13136
  get children() {
13016
- var _el$7 = _tmpl$199(), _el$8 = _el$7.firstChild;
13137
+ var _el$7 = _tmpl$200(), _el$8 = _el$7.firstChild;
13017
13138
  _el$8.addEventListener("change", (e) => setSavingsOnly(e.currentTarget.checked));
13018
13139
  effect(() => _el$8.checked = savingsOnly());
13019
13140
  return _el$7;
@@ -13028,7 +13149,7 @@ function CustomerList(props) {
13028
13149
  return createComponent(LoadingSpinner, {});
13029
13150
  },
13030
13151
  get children() {
13031
- var _el$1 = _tmpl$344(), _el$10 = _el$1.firstChild, _el$11 = _el$10.firstChild, _el$12 = _el$11.firstChild, _el$13 = _el$12.nextSibling;
13152
+ var _el$1 = _tmpl$345(), _el$10 = _el$1.firstChild, _el$11 = _el$10.firstChild, _el$12 = _el$11.firstChild, _el$13 = _el$12.nextSibling;
13032
13153
  insert(_el$13, createComponent(For, {
13033
13154
  get each() {
13034
13155
  return rows();
@@ -13117,7 +13238,7 @@ function CustomerList(props) {
13117
13238
  return hasMore();
13118
13239
  },
13119
13240
  get children() {
13120
- var _el$14 = _tmpl$261(), _el$15 = _el$14.firstChild;
13241
+ var _el$14 = _tmpl$266(), _el$15 = _el$14.firstChild;
13121
13242
  _el$15.$$click = loadMore;
13122
13243
  insert(_el$15, () => loadingMore() ? "Loading\u2026" : "Load more");
13123
13244
  effect(() => _el$15.disabled = loadingMore());
@@ -13132,7 +13253,7 @@ function CustomerList(props) {
13132
13253
  return page.error;
13133
13254
  },
13134
13255
  get children() {
13135
- var _el$16 = _tmpl$436(), _el$17 = _el$16.firstChild;
13256
+ var _el$16 = _tmpl$437(), _el$17 = _el$16.firstChild;
13136
13257
  _el$17.$$click = () => refetch();
13137
13258
  return _el$16;
13138
13259
  }
@@ -13229,11 +13350,11 @@ function Customers(props = {}) {
13229
13350
  })
13230
13351
  });
13231
13352
  }
13232
- var _tmpl$200 = /* @__PURE__ */ template(`<div data-testid=admin-stats style="display:grid;gap:1.25rem;grid-template-columns:repeat(auto-fit, minmax(220px, 1fr))">`);
13233
- var _tmpl$266 = /* @__PURE__ */ template(`<div>`);
13234
- var _tmpl$345 = /* @__PURE__ */ template(`<span style="display:block;font-size:0.875rem;color:var(--app-admin-fg-muted);margin:0 0 0.5rem">`);
13235
- var _tmpl$437 = /* @__PURE__ */ template(`<span class=app-admin-heading style=display:block;font-size:1.875rem;margin:0>`);
13236
- var _tmpl$532 = /* @__PURE__ */ template(`<div style="display:grid;gap:1rem;grid-template-columns:repeat(auto-fit, minmax(180px, 1fr));padding:1rem 1.25rem">`);
13353
+ var _tmpl$201 = /* @__PURE__ */ template(`<div data-testid=admin-stats style="display:grid;gap:1.25rem;grid-template-columns:repeat(auto-fit, minmax(220px, 1fr))">`);
13354
+ var _tmpl$267 = /* @__PURE__ */ template(`<div>`);
13355
+ var _tmpl$346 = /* @__PURE__ */ template(`<span style="display:block;font-size:0.875rem;color:var(--app-admin-fg-muted);margin:0 0 0.5rem">`);
13356
+ var _tmpl$438 = /* @__PURE__ */ template(`<span class=app-admin-heading style=display:block;font-size:1.875rem;margin:0>`);
13357
+ var _tmpl$533 = /* @__PURE__ */ template(`<div style="display:grid;gap:1rem;grid-template-columns:repeat(auto-fit, minmax(180px, 1fr));padding:1rem 1.25rem">`);
13237
13358
  var _tmpl$629 = /* @__PURE__ */ template(`<table class=app-admin-table><thead><tr><th>Paying</th><th>Subscribers</th><th style=text-align:right>Monthly equiv.</th><th style=width:40%>Share of MRR</th></tr></thead><tbody>`);
13238
13359
  var _tmpl$727 = /* @__PURE__ */ template(`<p style="margin:0;padding:0.75rem 1.25rem;font-size:0.75rem;color:var(--app-admin-fg-subtle)">Active, non-test subscriptions at what they're charged now, after discounts. Other billing cycles are converted to a 30-day month.`);
13239
13360
  var _tmpl$824 = /* @__PURE__ */ template(`<div data-testid=admin-recurring-revenue style=margin-top:1.5rem>`);
@@ -13288,7 +13409,7 @@ function Dashboard(props) {
13288
13409
  ];
13289
13410
  };
13290
13411
  return (() => {
13291
- var _el$ = _tmpl$266();
13412
+ var _el$ = _tmpl$267();
13292
13413
  insert(_el$, createComponent(PageTitle, {
13293
13414
  children: "Dashboard"
13294
13415
  }), null);
@@ -13310,7 +13431,7 @@ function Dashboard(props) {
13310
13431
  });
13311
13432
  },
13312
13433
  get children() {
13313
- var _el$2 = _tmpl$200();
13434
+ var _el$2 = _tmpl$201();
13314
13435
  insert(_el$2, createComponent(For, {
13315
13436
  get each() {
13316
13437
  return cards();
@@ -13341,11 +13462,11 @@ function Dashboard(props) {
13341
13462
  },
13342
13463
  get children() {
13343
13464
  return [(() => {
13344
- var _el$3 = _tmpl$345();
13465
+ var _el$3 = _tmpl$346();
13345
13466
  insert(_el$3, () => card.label);
13346
13467
  return _el$3;
13347
13468
  })(), (() => {
13348
- var _el$4 = _tmpl$437();
13469
+ var _el$4 = _tmpl$438();
13349
13470
  insert(_el$4, () => card.value);
13350
13471
  effect((_$p) => setStyleProperty(_el$4, "color", card.tint));
13351
13472
  return _el$4;
@@ -13392,7 +13513,7 @@ function RecurringRevenue(props) {
13392
13513
  flush: true,
13393
13514
  get children() {
13394
13515
  return [(() => {
13395
- var _el$6 = _tmpl$532();
13516
+ var _el$6 = _tmpl$533();
13396
13517
  insert(_el$6, createComponent(For, {
13397
13518
  get each() {
13398
13519
  return totals();
@@ -13439,9 +13560,9 @@ function RecurringRevenue(props) {
13439
13560
  return _el$5;
13440
13561
  })();
13441
13562
  }
13442
- var _tmpl$201 = /* @__PURE__ */ template(`<div style="color:var(--admin-text-muted, #64748b);font-size:14px">Connected<!> \xB7 `);
13443
- var _tmpl$267 = /* @__PURE__ */ template(`<div style="display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px 20px;border:1px solid var(--admin-border, #e2e8f0);border-radius:10px;margin-bottom:20px;background:var(--admin-surface, #fff)"><div><div style=font-weight:600>QuickBooks Payments</div></div><button class="btn btn-primary">`);
13444
- var _tmpl$346 = /* @__PURE__ */ template(`<div style="color:var(--admin-text-muted, #64748b);font-size:14px">Not connected \u2014 connect your QuickBooks account to accept payments.`);
13563
+ var _tmpl$208 = /* @__PURE__ */ template(`<div style="color:var(--admin-text-muted, #64748b);font-size:14px">Connected<!> \xB7 `);
13564
+ var _tmpl$268 = /* @__PURE__ */ template(`<div style="display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px 20px;border:1px solid var(--admin-border, #e2e8f0);border-radius:10px;margin-bottom:20px;background:var(--admin-surface, #fff)"><div><div style=font-weight:600>QuickBooks Payments</div></div><button class="btn btn-primary">`);
13565
+ var _tmpl$347 = /* @__PURE__ */ template(`<div style="color:var(--admin-text-muted, #64748b);font-size:14px">Not connected \u2014 connect your QuickBooks account to accept payments.`);
13445
13566
  function QuickBooksCard() {
13446
13567
  const [status, {
13447
13568
  refetch
@@ -13479,16 +13600,16 @@ function QuickBooksCard() {
13479
13600
  return status()?.provider === "quickbooks";
13480
13601
  },
13481
13602
  get children() {
13482
- var _el$ = _tmpl$267(), _el$2 = _el$.firstChild; _el$2.firstChild; var _el$8 = _el$2.nextSibling;
13603
+ var _el$ = _tmpl$268(), _el$2 = _el$.firstChild; _el$2.firstChild; var _el$8 = _el$2.nextSibling;
13483
13604
  insert(_el$2, createComponent(Show, {
13484
13605
  get when() {
13485
13606
  return status()?.connected;
13486
13607
  },
13487
13608
  get fallback() {
13488
- return _tmpl$346();
13609
+ return _tmpl$347();
13489
13610
  },
13490
13611
  get children() {
13491
- var _el$4 = _tmpl$201(), _el$5 = _el$4.firstChild, _el$7 = _el$5.nextSibling; _el$7.nextSibling;
13612
+ var _el$4 = _tmpl$208(), _el$5 = _el$4.firstChild, _el$7 = _el$5.nextSibling; _el$7.nextSibling;
13492
13613
  insert(_el$4, (() => {
13493
13614
  var _c$ = memo(() => !!status()?.realmId);
13494
13615
  return () => _c$() ? ` \xB7 company ${status().realmId}` : "";
@@ -13510,11 +13631,11 @@ function QuickBooksCard() {
13510
13631
  delegateEvents(["click"]);
13511
13632
 
13512
13633
  // src/pages/admin/Payments.tsx
13513
- var _tmpl$208 = /* @__PURE__ */ template(`<div class=app-admin-card style=overflow:hidden><div class=app-admin-table-wrap><table class=app-admin-table><thead><tr><th>Date</th><th>Customer</th><th>Amount</th><th>Status</th><th>Transaction ID</th><th style=width:6rem>Actions</th></tr></thead><tbody>`);
13514
- var _tmpl$268 = /* @__PURE__ */ template(`<div>`);
13515
- var _tmpl$347 = /* @__PURE__ */ template(`<button type=button class=app-admin-link-btn style=font-size:inherit;font-weight:inherit>`);
13516
- var _tmpl$438 = /* @__PURE__ */ template(`<div class=app-admin-text-muted style=font-size:0.75rem> refunded`);
13517
- var _tmpl$533 = /* @__PURE__ */ template(`<div class=app-admin-text-muted style=font-size:0.75rem>`);
13634
+ var _tmpl$209 = /* @__PURE__ */ template(`<div class=app-admin-card style=overflow:hidden><div class=app-admin-table-wrap><table class=app-admin-table><thead><tr><th>Date</th><th>Customer</th><th>Amount</th><th>Status</th><th>Transaction ID</th><th style=width:6rem>Actions</th></tr></thead><tbody>`);
13635
+ var _tmpl$269 = /* @__PURE__ */ template(`<div>`);
13636
+ var _tmpl$348 = /* @__PURE__ */ template(`<button type=button class=app-admin-link-btn style=font-size:inherit;font-weight:inherit>`);
13637
+ var _tmpl$439 = /* @__PURE__ */ template(`<div class=app-admin-text-muted style=font-size:0.75rem> refunded`);
13638
+ var _tmpl$534 = /* @__PURE__ */ template(`<div class=app-admin-text-muted style=font-size:0.75rem>`);
13518
13639
  var _tmpl$630 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-warning">`);
13519
13640
  var _tmpl$728 = /* @__PURE__ */ template(`<tr><td data-label=Date class=app-admin-text-muted></td><td data-label=Customer style=font-weight:500></td><td data-label=Amount></td><td data-label=Status></td><td data-label="Transaction ID"class="app-admin-text-mono app-admin-text-muted"style=font-size:0.75rem></td><td data-label=Actions>`);
13520
13641
  function Payments() {
@@ -13593,7 +13714,7 @@ function Payments() {
13593
13714
  };
13594
13715
  const refundable = (p) => p.status === "succeeded" && refundableCents(p) > 0;
13595
13716
  return (() => {
13596
- var _el$ = _tmpl$268();
13717
+ var _el$ = _tmpl$269();
13597
13718
  insert(_el$, createComponent(PageTitle, {
13598
13719
  children: "Payments"
13599
13720
  }), null);
@@ -13606,7 +13727,7 @@ function Payments() {
13606
13727
  return createComponent(LoadingSpinner, {});
13607
13728
  },
13608
13729
  get children() {
13609
- var _el$2 = _tmpl$208(), _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$5 = _el$4.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$6.firstChild, _el$8 = _el$7.nextSibling, _el$9 = _el$8.nextSibling, _el$0 = _el$9.nextSibling, _el$1 = _el$0.nextSibling; _el$1.nextSibling; var _el$11 = _el$5.nextSibling;
13730
+ var _el$2 = _tmpl$209(), _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$5 = _el$4.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$6.firstChild, _el$8 = _el$7.nextSibling, _el$9 = _el$8.nextSibling, _el$0 = _el$9.nextSibling, _el$1 = _el$0.nextSibling; _el$1.nextSibling; var _el$11 = _el$5.nextSibling;
13610
13731
  insert(_el$11, createComponent(For, {
13611
13732
  get each() {
13612
13733
  return payments() ?? [];
@@ -13622,7 +13743,7 @@ function Payments() {
13622
13743
  return payment.customerEmail;
13623
13744
  },
13624
13745
  get children() {
13625
- var _el$15 = _tmpl$347();
13746
+ var _el$15 = _tmpl$348();
13626
13747
  _el$15.$$click = () => nav.openCustomer(payment.customerUid);
13627
13748
  insert(_el$15, () => payment.customerEmail);
13628
13749
  return _el$15;
@@ -13634,7 +13755,7 @@ function Payments() {
13634
13755
  return memo(() => (payment.refundedAmountCents ?? 0) > 0)() && payment.status !== "refunded";
13635
13756
  },
13636
13757
  get children() {
13637
- var _el$17 = _tmpl$438(), _el$18 = _el$17.firstChild;
13758
+ var _el$17 = _tmpl$439(), _el$18 = _el$17.firstChild;
13638
13759
  insert(_el$17, () => centsToUsd(payment.refundedAmountCents), _el$18);
13639
13760
  return _el$17;
13640
13761
  }
@@ -13661,7 +13782,7 @@ function Payments() {
13661
13782
  return payment.failureReason;
13662
13783
  },
13663
13784
  get children() {
13664
- var _el$20 = _tmpl$533();
13785
+ var _el$20 = _tmpl$534();
13665
13786
  insert(_el$20, () => payment.failureReason);
13666
13787
  return _el$20;
13667
13788
  }
@@ -13753,11 +13874,11 @@ function clearApexDrugCache() {
13753
13874
  cache = null;
13754
13875
  inflight = null;
13755
13876
  }
13756
- var _tmpl$209 = /* @__PURE__ */ template(`<div class=app-admin-popover role=dialog tabindex=-1>`);
13757
- var _tmpl$269 = /* @__PURE__ */ template(`<div class=app-admin-text-muted style="font-size:0.7rem;margin:0.75rem 0 0.25rem">Per strength (blank = base price)`);
13758
- var _tmpl$348 = /* @__PURE__ */ template(`<div class=app-admin-popover-rows>`);
13759
- var _tmpl$439 = /* @__PURE__ */ template(`<div class=app-admin-field-error role=alert>`);
13760
- var _tmpl$534 = /* @__PURE__ */ template(`<form><div class=app-admin-popover-title>Price</div><label class=app-admin-label for=admin-cell-price-base></label><input id=admin-cell-price-base type=number step=0.01 min=0 inputmode=decimal class=app-admin-input><div class=app-admin-popover-actions><button type=button class="app-admin-btn app-admin-btn-ghost app-admin-btn-sm">Cancel</button><button type=submit class="app-admin-btn app-admin-btn-primary app-admin-btn-sm">`);
13877
+ var _tmpl$270 = /* @__PURE__ */ template(`<div class=app-admin-popover role=dialog tabindex=-1>`);
13878
+ var _tmpl$271 = /* @__PURE__ */ template(`<div class=app-admin-text-muted style="font-size:0.7rem;margin:0.75rem 0 0.25rem">Per strength (blank = base price)`);
13879
+ var _tmpl$349 = /* @__PURE__ */ template(`<div class=app-admin-popover-rows>`);
13880
+ var _tmpl$440 = /* @__PURE__ */ template(`<div class=app-admin-field-error role=alert>`);
13881
+ var _tmpl$535 = /* @__PURE__ */ template(`<form><div class=app-admin-popover-title>Price</div><label class=app-admin-label for=admin-cell-price-base></label><input id=admin-cell-price-base type=number step=0.01 min=0 inputmode=decimal class=app-admin-input><div class=app-admin-popover-actions><button type=button class="app-admin-btn app-admin-btn-ghost app-admin-btn-sm">Cancel</button><button type=submit class="app-admin-btn app-admin-btn-primary app-admin-btn-sm">`);
13761
13882
  var _tmpl$631 = /* @__PURE__ */ template(`<label class=app-admin-popover-row><span></span><input type=number step=0.01 min=0 inputmode=decimal class=app-admin-input>`);
13762
13883
  var _tmpl$729 = /* @__PURE__ */ template(`<div class=app-admin-popover-title>Categories`);
13763
13884
  var _tmpl$825 = /* @__PURE__ */ template(`<div class=app-admin-popover-rows role=group aria-label="Assigned categories">`);
@@ -13828,7 +13949,7 @@ function CellPopover(props) {
13828
13949
  return createComponent(Portal, {
13829
13950
  mount,
13830
13951
  get children() {
13831
- var _el$ = _tmpl$209();
13952
+ var _el$ = _tmpl$270();
13832
13953
  _el$.$$click = (e) => e.stopPropagation();
13833
13954
  var _ref$ = card;
13834
13955
  typeof _ref$ === "function" ? use(_ref$, _el$) : card = _el$;
@@ -13949,7 +14070,7 @@ function PricePopover(props) {
13949
14070
  return props.onClose;
13950
14071
  },
13951
14072
  get children() {
13952
- var _el$2 = _tmpl$534(), _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling, _el$5 = _el$4.nextSibling, _el$9 = _el$5.nextSibling, _el$0 = _el$9.firstChild, _el$1 = _el$0.nextSibling;
14073
+ var _el$2 = _tmpl$535(), _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling, _el$5 = _el$4.nextSibling, _el$9 = _el$5.nextSibling, _el$0 = _el$9.firstChild, _el$1 = _el$0.nextSibling;
13953
14074
  _el$2.addEventListener("submit", (e) => {
13954
14075
  e.preventDefault();
13955
14076
  void save();
@@ -13961,8 +14082,8 @@ function PricePopover(props) {
13961
14082
  return memo(() => !!perDose())() && rows().length > 0;
13962
14083
  },
13963
14084
  get children() {
13964
- return [_tmpl$269(), (() => {
13965
- var _el$7 = _tmpl$348();
14085
+ return [_tmpl$271(), (() => {
14086
+ var _el$7 = _tmpl$349();
13966
14087
  insert(_el$7, createComponent(For, {
13967
14088
  get each() {
13968
14089
  return rows();
@@ -13988,7 +14109,7 @@ function PricePopover(props) {
13988
14109
  return error();
13989
14110
  },
13990
14111
  get children() {
13991
- var _el$8 = _tmpl$439();
14112
+ var _el$8 = _tmpl$440();
13992
14113
  insert(_el$8, error);
13993
14114
  return _el$8;
13994
14115
  }
@@ -14102,7 +14223,7 @@ function CategoriesPopover(props) {
14102
14223
  return error();
14103
14224
  },
14104
14225
  get children() {
14105
- var _el$20 = _tmpl$439();
14226
+ var _el$20 = _tmpl$440();
14106
14227
  insert(_el$20, error);
14107
14228
  return _el$20;
14108
14229
  }
@@ -14119,11 +14240,11 @@ function CategoriesPopover(props) {
14119
14240
  });
14120
14241
  }
14121
14242
  delegateEvents(["click", "input"]);
14122
- var _tmpl$270 = /* @__PURE__ */ template(`<div class=app-admin-field-error role=alert>`);
14123
- var _tmpl$271 = /* @__PURE__ */ template(`<div class="app-admin-banner app-admin-banner--danger"role=status data-testid=catalog-missing><strong>This product's catalog item is gone.</strong> The prescribing platform no longer lists it, so strengths and pharmacies can't be edited and the product can't be sold. Any prices on file are listed under \u201CNo longer offered\u201D. <button type=button class="app-admin-btn app-admin-btn-ghost app-admin-btn-sm">Check again`);
14124
- var _tmpl$349 = /* @__PURE__ */ template(`<div class="app-admin-banner app-admin-banner--warn"role=status data-testid=catalog-read-only><span><strong>Strengths and pharmacies are read-only right now.</strong> <!> Prices and product details can still be edited.</span><button type=button class="app-admin-btn app-admin-btn-ghost app-admin-btn-sm">Try again`);
14125
- var _tmpl$440 = /* @__PURE__ */ template(`<p data-testid=catalog-stored-prices>Showing the prices on file. Which strengths are currently offered can't be checked until the prescribing platform answers.`);
14126
- var _tmpl$535 = /* @__PURE__ */ template(`<ul class=app-admin-catalog-list>`);
14243
+ var _tmpl$276 = /* @__PURE__ */ template(`<div class=app-admin-field-error role=alert>`);
14244
+ var _tmpl$277 = /* @__PURE__ */ template(`<div class="app-admin-banner app-admin-banner--danger"role=status data-testid=catalog-missing><strong>This product's catalog item is gone.</strong> The prescribing platform no longer lists it, so strengths and pharmacies can't be edited and the product can't be sold. Any prices on file are listed under \u201CNo longer offered\u201D. <button type=button class="app-admin-btn app-admin-btn-ghost app-admin-btn-sm">Check again`);
14245
+ var _tmpl$350 = /* @__PURE__ */ template(`<div class="app-admin-banner app-admin-banner--warn"role=status data-testid=catalog-read-only><span><strong>Strengths and pharmacies are read-only right now.</strong> <!> Prices and product details can still be edited.</span><button type=button class="app-admin-btn app-admin-btn-ghost app-admin-btn-sm">Try again`);
14246
+ var _tmpl$441 = /* @__PURE__ */ template(`<p data-testid=catalog-stored-prices>Showing the prices on file. Which strengths are currently offered can't be checked until the prescribing platform answers.`);
14247
+ var _tmpl$536 = /* @__PURE__ */ template(`<ul class=app-admin-catalog-list>`);
14127
14248
  var _tmpl$632 = /* @__PURE__ */ template(`<div><label class=app-admin-label for=catalog-add-value>Value</label><input id=catalog-add-value type=number step=any min=0 class=app-admin-input placeholder=2.5>`);
14128
14249
  var _tmpl$730 = /* @__PURE__ */ template(`<div><label class=app-admin-label for=catalog-add-unit>Unit</label><input id=catalog-add-unit type=text class=app-admin-input placeholder=mg>`);
14129
14250
  var _tmpl$826 = /* @__PURE__ */ template(`<div><label class=app-admin-label for=catalog-add-price>Price ($)</label><input id=catalog-add-price type=number step=0.01 min=0 inputmode=decimal class=app-admin-input placeholder=optional>`);
@@ -14147,7 +14268,7 @@ var _tmpl$2310 = /* @__PURE__ */ template(`<p style=margin:0>No new strengths to
14147
14268
  var _tmpl$2410 = /* @__PURE__ */ template(`<label class=app-admin-catalog-toggle><input type=checkbox><span><span class=app-admin-text-muted style=font-size:0.7rem> \xB7 carried by `);
14148
14269
  var _tmpl$2510 = /* @__PURE__ */ template(`<li class="app-admin-catalog-row is-muted"><div class=app-admin-catalog-row__main><span class=app-admin-catalog-row__title><span></span><span class=app-admin-text-mono></span><span class=app-admin-text-muted style=font-size:0.75rem></span></span><button type=button class="app-admin-btn app-admin-btn-danger app-admin-btn-sm">Remove price`);
14149
14270
  var _tmpl$2610 = /* @__PURE__ */ template(`<ol class=app-admin-catalog-list aria-label="Pharmacies in order of preference">`);
14150
- var _tmpl$276 = /* @__PURE__ */ template(`<form class=app-admin-catalog-row aria-label="Add a pharmacy drug"style=margin-top:0.75rem><div><label class=app-admin-label for=catalog-add-drug-filter>Find a drug</label><input id=catalog-add-drug-filter type=search class=app-admin-input placeholder="Search by drug or pharmacy"></div><div><label class=app-admin-label for=catalog-add-drug>Pharmacy drug</label><select id=catalog-add-drug class=app-admin-input><option value></option></select><p style="margin:0.375rem 0 0">A drug can only be used at its own pharmacy, and a pharmacy already listed above isn't offered again.</p></div><div class=app-admin-catalog-row__controls><button type=submit class="app-admin-btn app-admin-btn-primary app-admin-btn-sm"></button><button type=button class="app-admin-btn app-admin-btn-ghost app-admin-btn-sm">Cancel`);
14271
+ var _tmpl$278 = /* @__PURE__ */ template(`<form class=app-admin-catalog-row aria-label="Add a pharmacy drug"style=margin-top:0.75rem><div><label class=app-admin-label for=catalog-add-drug-filter>Find a drug</label><input id=catalog-add-drug-filter type=search class=app-admin-input placeholder="Search by drug or pharmacy"></div><div><label class=app-admin-label for=catalog-add-drug>Pharmacy drug</label><select id=catalog-add-drug class=app-admin-input><option value></option></select><p style="margin:0.375rem 0 0">A drug can only be used at its own pharmacy, and a pharmacy already listed above isn't offered again.</p></div><div class=app-admin-catalog-row__controls><button type=submit class="app-admin-btn app-admin-btn-primary app-admin-btn-sm"></button><button type=button class="app-admin-btn app-admin-btn-ghost app-admin-btn-sm">Cancel`);
14151
14272
  var _tmpl$285 = /* @__PURE__ */ template(`<section class=app-admin-catalog-block aria-labelledby=catalog-pharmacies-title><div class=app-admin-catalog-block__head><h3 class=app-admin-label id=catalog-pharmacies-title style=margin:0>Pharmacies</h3><span class=app-admin-catalog-row__controls><button type=button class="app-admin-btn app-admin-btn-ghost app-admin-btn-sm">Suggest equivalents</button><button type=button class="app-admin-btn app-admin-btn-primary app-admin-btn-sm">Add pharmacy drug</button></span></div><p>Prescriptions go to the first active pharmacy that can fill them, top to bottom. The order here is the order of preference. Changes here save right away.`);
14152
14273
  var _tmpl$294 = /* @__PURE__ */ template(`<p>Loading pharmacies\u2026`);
14153
14274
  var _tmpl$304 = /* @__PURE__ */ template(`<p>No pharmacy fills this product yet \u2014 it can't be filled anywhere until you add one.`);
@@ -14173,7 +14294,7 @@ var _tmpl$492 = /* @__PURE__ */ template(`<th scope=col><div class=app-admin-tex
14173
14294
  var _tmpl$502 = /* @__PURE__ */ template(`<span class=app-admin-text-muted> (withdrawn)`);
14174
14295
  var _tmpl$5110 = /* @__PURE__ */ template(`<tr><th scope=row>`);
14175
14296
  var _tmpl$5210 = /* @__PURE__ */ template(`<span class=is-ok><span aria-hidden=true>\u2713</span><span class=app-admin-sr-only> can make `);
14176
- var _tmpl$536 = /* @__PURE__ */ template(`<td>`);
14297
+ var _tmpl$537 = /* @__PURE__ */ template(`<td>`);
14177
14298
  var _tmpl$542 = /* @__PURE__ */ template(`<span class=is-miss><span aria-hidden=true>\u2715</span><span class=app-admin-sr-only> can't make `);
14178
14299
  var _tmpl$552 = /* @__PURE__ */ template(`<span class=app-admin-text-muted> \u2014 `);
14179
14300
  var _tmpl$562 = /* @__PURE__ */ template(`<p style=margin:0>Creates the product with its strengths and first pharmacy taken from this drug. You can add more pharmacies and strengths afterwards.`);
@@ -14199,7 +14320,7 @@ function FieldError(props) {
14199
14320
  return props.message;
14200
14321
  },
14201
14322
  get children() {
14202
- var _el$ = _tmpl$270();
14323
+ var _el$ = _tmpl$276();
14203
14324
  insert(_el$, () => props.message);
14204
14325
  effect(() => setAttribute(_el$, "id", props.id));
14205
14326
  return _el$;
@@ -14214,7 +14335,7 @@ function CatalogStatusBanner(props) {
14214
14335
  },
14215
14336
  keyed: true,
14216
14337
  children: (message) => (() => {
14217
- var _el$7 = _tmpl$349(), _el$8 = _el$7.firstChild, _el$9 = _el$8.firstChild, _el$0 = _el$9.nextSibling, _el$10 = _el$0.nextSibling; _el$10.nextSibling; var _el$11 = _el$8.nextSibling;
14338
+ var _el$7 = _tmpl$350(), _el$8 = _el$7.firstChild, _el$9 = _el$8.firstChild, _el$0 = _el$9.nextSibling, _el$10 = _el$0.nextSibling; _el$10.nextSibling; var _el$11 = _el$8.nextSibling;
14218
14339
  insert(_el$8, message, _el$10);
14219
14340
  _el$11.$$click = () => void props.editor.reload();
14220
14341
  return _el$7;
@@ -14224,7 +14345,7 @@ function CatalogStatusBanner(props) {
14224
14345
  return state().kind === "missing";
14225
14346
  },
14226
14347
  get children() {
14227
- var _el$2 = _tmpl$271(), _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling, _el$6 = _el$4.nextSibling;
14348
+ var _el$2 = _tmpl$277(), _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling, _el$6 = _el$4.nextSibling;
14228
14349
  _el$6.$$click = () => void props.editor.reload();
14229
14350
  return _el$2;
14230
14351
  }
@@ -14282,7 +14403,7 @@ function StrengthsSection(props) {
14282
14403
  return ed.structure().kind === "read_only";
14283
14404
  },
14284
14405
  get children() {
14285
- var _el$17 = _tmpl$440();
14406
+ var _el$17 = _tmpl$441();
14286
14407
  effect((_$p) => style(_el$17, hint2, _$p));
14287
14408
  return _el$17;
14288
14409
  }
@@ -14311,7 +14432,7 @@ function StrengthsSection(props) {
14311
14432
  })();
14312
14433
  },
14313
14434
  get children() {
14314
- var _el$18 = _tmpl$535();
14435
+ var _el$18 = _tmpl$536();
14315
14436
  insert(_el$18, createComponent(For, {
14316
14437
  get each() {
14317
14438
  return resolved();
@@ -14869,7 +14990,7 @@ function FulfillmentSection(props) {
14869
14990
  return memo(() => !!adding())() && ed.structure().kind === "editable";
14870
14991
  },
14871
14992
  get children() {
14872
- var _el$79 = _tmpl$276(), _el$80 = _el$79.firstChild, _el$81 = _el$80.firstChild, _el$82 = _el$81.nextSibling, _el$83 = _el$80.nextSibling, _el$84 = _el$83.firstChild, _el$85 = _el$84.nextSibling, _el$86 = _el$85.firstChild, _el$87 = _el$85.nextSibling, _el$88 = _el$83.nextSibling, _el$89 = _el$88.firstChild, _el$90 = _el$89.nextSibling;
14993
+ var _el$79 = _tmpl$278(), _el$80 = _el$79.firstChild, _el$81 = _el$80.firstChild, _el$82 = _el$81.nextSibling, _el$83 = _el$80.nextSibling, _el$84 = _el$83.firstChild, _el$85 = _el$84.nextSibling, _el$86 = _el$85.firstChild, _el$87 = _el$85.nextSibling, _el$88 = _el$83.nextSibling, _el$89 = _el$88.firstChild, _el$90 = _el$89.nextSibling;
14873
14994
  _el$79.addEventListener("submit", submitAdd);
14874
14995
  _el$82.$$input = (e) => setFilter(e.currentTarget.value);
14875
14996
  _el$85.addEventListener("change", (e) => setChosen(e.currentTarget.value));
@@ -15025,7 +15146,7 @@ function ReadinessSection(props) {
15025
15146
  children: (c) => {
15026
15147
  const cell = () => view().cells[d.id]?.[c.id];
15027
15148
  return (() => {
15028
- var _el$149 = _tmpl$536();
15149
+ var _el$149 = _tmpl$537();
15029
15150
  insert(_el$149, createComponent(Show, {
15030
15151
  get when() {
15031
15152
  return cell()?.producible;
@@ -15327,11 +15448,11 @@ function NewCatalogProductDialog(props) {
15327
15448
  delegateEvents(["click", "input"]);
15328
15449
 
15329
15450
  // src/pages/admin/Products.tsx
15330
- var _tmpl$277 = /* @__PURE__ */ template(`<div style="background:var(--app-admin-danger-bg);color:var(--app-admin-danger-fg);font-size:0.75rem;padding:0.5rem 0.75rem;border-radius:var(--app-admin-radius-sm);margin-bottom:0.5rem">`);
15331
- var _tmpl$278 = /* @__PURE__ */ template(`<div style=position:relative><img style="width:100%;height:8rem;object-fit:cover;border-radius:var(--app-admin-radius);border:1px solid var(--app-admin-border)"><div style="position:absolute;inset:0;background:rgba(0,0,0,0.6);border-radius:var(--app-admin-radius);display:flex;align-items:center;justify-content:center;gap:0.75rem;opacity:0;transition:opacity 0.15s"><button type=button class="app-admin-btn app-admin-btn-ghost"style=background:rgba(255,255,255,0.15);color:white></button><button type=button class="app-admin-btn app-admin-btn-danger">Remove`);
15332
- var _tmpl$350 = /* @__PURE__ */ template(`<div style=margin-bottom:1.25rem><input type=file accept=image/* style=display:none>`);
15333
- var _tmpl$441 = /* @__PURE__ */ template(`<button type=button style="width:100%;height:8rem;border:2px dashed var(--app-admin-border-strong);border-radius:var(--app-admin-radius);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:0.5rem;color:var(--app-admin-fg-muted);background:transparent;cursor:pointer;font-size:0.75rem"><span>\u{1F4F7}</span><span>`);
15334
- var _tmpl$537 = /* @__PURE__ */ template(`<option value>`);
15451
+ var _tmpl$279 = /* @__PURE__ */ template(`<div style="background:var(--app-admin-danger-bg);color:var(--app-admin-danger-fg);font-size:0.75rem;padding:0.5rem 0.75rem;border-radius:var(--app-admin-radius-sm);margin-bottom:0.5rem">`);
15452
+ var _tmpl$280 = /* @__PURE__ */ template(`<div style=position:relative><img style="width:100%;height:8rem;object-fit:cover;border-radius:var(--app-admin-radius);border:1px solid var(--app-admin-border)"><div style="position:absolute;inset:0;background:rgba(0,0,0,0.6);border-radius:var(--app-admin-radius);display:flex;align-items:center;justify-content:center;gap:0.75rem;opacity:0;transition:opacity 0.15s"><button type=button class="app-admin-btn app-admin-btn-ghost"style=background:rgba(255,255,255,0.15);color:white></button><button type=button class="app-admin-btn app-admin-btn-danger">Remove`);
15453
+ var _tmpl$351 = /* @__PURE__ */ template(`<div style=margin-bottom:1.25rem><input type=file accept=image/* style=display:none>`);
15454
+ var _tmpl$443 = /* @__PURE__ */ template(`<button type=button style="width:100%;height:8rem;border:2px dashed var(--app-admin-border-strong);border-radius:var(--app-admin-radius);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:0.5rem;color:var(--app-admin-fg-muted);background:transparent;cursor:pointer;font-size:0.75rem"><span>\u{1F4F7}</span><span>`);
15455
+ var _tmpl$538 = /* @__PURE__ */ template(`<option value>`);
15335
15456
  var _tmpl$634 = /* @__PURE__ */ template(`<option>`);
15336
15457
  var _tmpl$731 = /* @__PURE__ */ template(`<div class="app-admin-banner app-admin-banner--danger"role=status><strong>No price set.</strong> `);
15337
15458
  var _tmpl$827 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-ghost"style=margin-top:0.5rem;font-size:0.75rem>Use Default from Apex`);
@@ -15355,7 +15476,7 @@ var _tmpl$2311 = /* @__PURE__ */ template(`<div style="border-top:1px solid var(
15355
15476
  var _tmpl$2411 = /* @__PURE__ */ template(`<div><div style=padding:1.5rem><div style=display:flex;align-items:center;justify-content:space-between;margin-bottom:1.5rem><h2 class=app-admin-heading style=font-size:1.125rem;margin:0>Edit Product</h2><button type=button class="app-admin-btn app-admin-btn-ghost"style="border:none;padding:0.25rem 0.5rem;font-size:1.25rem">\xD7</button></div><div class="app-admin-text-mono app-admin-text-muted"style="font-size:0.75rem;background:var(--app-admin-surface-light);padding:0.25rem 0.5rem;border-radius:var(--app-admin-radius-sm);margin-bottom:1.5rem">Drug ID: </div><div style=display:flex;flex-direction:column;gap:1rem><div><label class=app-admin-label>Name</label><input type=text class=app-admin-input></div><div><label class=app-admin-label>Description</label><textarea rows=3 class=app-admin-input style=resize:vertical></textarea></div><div><label class=app-admin-label for=admin-product-price>Price ($)</label><input id=admin-product-price type=number step=0.01></div><div><label class=app-admin-label>Categories</label></div><div><label style=display:flex;align-items:center;gap:0.5rem;font-size:0.875rem;cursor:pointer><input type=checkbox><span>Featured product</span></label></div><div><label class=app-admin-label>Benefits (one per line)</label><textarea rows=4 class=app-admin-input style=resize:vertical></textarea></div><div class=app-admin-btn-row style=padding-top:0.5rem><button type=button class="app-admin-btn app-admin-btn-ghost"style=flex:1>Cancel</button><button type=button style=flex:1>`);
15356
15477
  var _tmpl$2511 = /* @__PURE__ */ template(`<button type=button style=font-size:0.75rem>`);
15357
15478
  var _tmpl$2611 = /* @__PURE__ */ template(`<input type=text class=app-admin-input>`);
15358
- var _tmpl$279 = /* @__PURE__ */ template(`<p style=font-size:0.75rem;color:var(--app-admin-fg-muted);margin:0>This drug publishes no Apex SKUs; requests are sent by drug id only (the prescriber selects the SKU).`);
15479
+ var _tmpl$2710 = /* @__PURE__ */ template(`<p style=font-size:0.75rem;color:var(--app-admin-fg-muted);margin:0>This drug publishes no Apex SKUs; requests are sent by drug id only (the prescriber selects the SKU).`);
15359
15480
  var _tmpl$286 = /* @__PURE__ */ template(`<p style=font-size:0.75rem;color:var(--app-admin-fg-muted);margin:0>`);
15360
15481
  var _tmpl$295 = /* @__PURE__ */ template(`<select class=app-admin-input title="Bind this strength to a pharmacy SKU"style=flex:1;min-width:0>`);
15361
15482
  var _tmpl$305 = /* @__PURE__ */ template(`<div style=display:flex;flex-direction:column;gap:0.25rem><span style=font-size:0.8125rem;color:var(--app-admin-fg)></span><div style=display:flex;gap:0.5rem;align-items:center><input type=number step=0.01 class=app-admin-input style=width:7rem>`);
@@ -15372,7 +15493,7 @@ var _tmpl$403 = /* @__PURE__ */ template(`<span>Needs a price`);
15372
15493
  var _tmpl$4111 = /* @__PURE__ */ template(`<span class=app-admin-text-muted style=font-size:0.75rem>`);
15373
15494
  var _tmpl$4211 = /* @__PURE__ */ template(`<span style=opacity:0.5>-`);
15374
15495
  var _tmpl$4311 = /* @__PURE__ */ template(`<span style="padding:0.125rem 0.375rem;background:rgba(127,127,127,0.1);border-radius:var(--app-admin-radius-sm);font-size:0.75rem">`);
15375
- var _tmpl$443 = /* @__PURE__ */ template(`<p id=new-rx-product-blocked class=app-admin-text-muted style="flex:1 1 100%;margin:0;font-size:0.8125rem">`);
15496
+ var _tmpl$444 = /* @__PURE__ */ template(`<p id=new-rx-product-blocked class=app-admin-text-muted style="flex:1 1 100%;margin:0;font-size:0.8125rem">`);
15376
15497
  var _tmpl$453 = /* @__PURE__ */ template(`<div style=display:flex;gap:0.75rem;align-items:center;flex-wrap:wrap;margin-bottom:1.25rem><div style="flex:1 1 16rem;max-width:28rem"><input type=search placeholder="Search by drug, ID, or category"aria-label="Search products"class=app-admin-input></div><button type=button class="app-admin-btn app-admin-btn-primary">New prescription product`);
15377
15498
  var _tmpl$463 = /* @__PURE__ */ template(`<table class=app-admin-table><thead></thead><tbody>`);
15378
15499
  var _tmpl$473 = /* @__PURE__ */ template(`<div class=app-admin-products-panes-host><div class=app-admin-products-transfer role=group aria-label="Move checked products"><button type=button class="app-admin-btn app-admin-btn-primary"></button><button type=button class="app-admin-btn app-admin-btn-ghost"></button></div><div class=app-admin-products-panes><section class=app-admin-section aria-labelledby=admin-products-available-title><div class=app-admin-section-header><h2 class=app-admin-section-title id=admin-products-available-title>Available to add<span class=app-admin-section-count></span></h2></div></section><section class=app-admin-section aria-labelledby=admin-products-store-title><div class=app-admin-section-header><h2 class=app-admin-section-title id=admin-products-store-title>In your store<span class=app-admin-section-count>`);
@@ -15483,7 +15604,7 @@ function ThumbnailUpload(props) {
15483
15604
  }
15484
15605
  };
15485
15606
  return (() => {
15486
- var _el$ = _tmpl$350(), _el$2 = _el$.firstChild;
15607
+ var _el$ = _tmpl$351(), _el$2 = _el$.firstChild;
15487
15608
  _el$2.addEventListener("change", (e) => {
15488
15609
  const file = e.currentTarget.files?.[0];
15489
15610
  if (file) handleFile(file);
@@ -15496,7 +15617,7 @@ function ThumbnailUpload(props) {
15496
15617
  return error();
15497
15618
  },
15498
15619
  get children() {
15499
- var _el$3 = _tmpl$277();
15620
+ var _el$3 = _tmpl$279();
15500
15621
  insert(_el$3, error);
15501
15622
  return _el$3;
15502
15623
  }
@@ -15507,7 +15628,7 @@ function ThumbnailUpload(props) {
15507
15628
  },
15508
15629
  get fallback() {
15509
15630
  return (() => {
15510
- var _el$9 = _tmpl$441(), _el$0 = _el$9.firstChild, _el$1 = _el$0.nextSibling;
15631
+ var _el$9 = _tmpl$443(), _el$0 = _el$9.firstChild, _el$1 = _el$0.nextSibling;
15511
15632
  _el$9.$$click = () => fileInput.click();
15512
15633
  insert(_el$1, () => uploading() ? "Uploading\u2026" : "Add thumbnail");
15513
15634
  effect(() => _el$9.disabled = uploading());
@@ -15515,7 +15636,7 @@ function ThumbnailUpload(props) {
15515
15636
  })();
15516
15637
  },
15517
15638
  get children() {
15518
- var _el$4 = _tmpl$278(), _el$5 = _el$4.firstChild, _el$6 = _el$5.nextSibling, _el$7 = _el$6.firstChild, _el$8 = _el$7.nextSibling;
15639
+ var _el$4 = _tmpl$280(), _el$5 = _el$4.firstChild, _el$6 = _el$5.nextSibling, _el$7 = _el$6.firstChild, _el$8 = _el$7.nextSibling;
15519
15640
  _el$6.addEventListener("mouseleave", (e) => e.currentTarget.style.opacity = "0");
15520
15641
  _el$6.addEventListener("mouseenter", (e) => e.currentTarget.style.opacity = "1");
15521
15642
  _el$7.$$click = () => fileInput.click();
@@ -15542,7 +15663,7 @@ function ThumbnailUpload(props) {
15542
15663
  }
15543
15664
  function SkuSelectOptions(props) {
15544
15665
  return [(() => {
15545
- var _el$10 = _tmpl$537();
15666
+ var _el$10 = _tmpl$538();
15546
15667
  insert(_el$10, () => props.placeholder);
15547
15668
  return _el$10;
15548
15669
  })(), createComponent(For, {
@@ -15932,7 +16053,7 @@ function ProductEditPanel(props) {
15932
16053
  return apexSkus().length > 0;
15933
16054
  },
15934
16055
  get fallback() {
15935
- return _tmpl$279();
16056
+ return _tmpl$2710();
15936
16057
  },
15937
16058
  get children() {
15938
16059
  return [(() => {
@@ -16678,7 +16799,7 @@ function Products(props) {
16678
16799
  return !canCreateCatalogProduct();
16679
16800
  },
16680
16801
  get children() {
16681
- var _el$136 = _tmpl$443();
16802
+ var _el$136 = _tmpl$444();
16682
16803
  insert(_el$136, createBlockedNote);
16683
16804
  return _el$136;
16684
16805
  }
@@ -16986,11 +17107,11 @@ function daysAgo(iso) {
16986
17107
  }
16987
17108
 
16988
17109
  // src/pages/admin/Offers.tsx
16989
- var _tmpl$280 = /* @__PURE__ */ template(`<div role=alert style="background:var(--app-admin-danger-bg);color:var(--app-admin-danger-fg);border:1px solid var(--app-admin-danger-bg-strong);font-size:0.875rem;border-radius:var(--app-admin-radius-sm);padding:0.5rem 0.75rem;margin-bottom:1rem">`);
16990
- var _tmpl$281 = /* @__PURE__ */ template(`<p class=app-admin-text-muted style=font-size:0.8125rem;margin:0>Changes apply to grants issued from now on. Grants already issued keep the terms they were issued with.`);
16991
- var _tmpl$351 = /* @__PURE__ */ template(`<input type=number min=1 max=120 aria-label="Number of further charges"class=app-admin-input style=margin-top:0.5rem>`);
16992
- var _tmpl$444 = /* @__PURE__ */ template(`<div class=app-admin-side-panel style=width:440px><div style=padding:1.5rem><div style=display:flex;align-items:center;justify-content:space-between;margin-bottom:1.5rem><h2 class=app-admin-heading style=font-size:1.125rem;margin:0></h2><button type=button class="app-admin-btn app-admin-btn-ghost"aria-label=Close style="border:none;padding:0.25rem 0.5rem;font-size:1.25rem">\xD7</button></div><div style=display:flex;flex-direction:column;gap:1rem><div><label class=app-admin-label for=offer-name>Name</label><input id=offer-name type=text maxlength=120 placeholder="$10 off every month"class=app-admin-input></div><div style="display:grid;grid-template-columns:1fr 1fr;gap:0.75rem"><div><label class=app-admin-label for=offer-discount-type>Discount type</label><select id=offer-discount-type class=app-admin-input><option value=fixed>Fixed $ off</option><option value=percent>Percent off</option></select></div><div><label class=app-admin-label for=offer-discount-value></label><input id=offer-discount-value type=number min=0 class=app-admin-input></div></div><div><label class=app-admin-label for=offer-duration>Applies to</label><select id=offer-duration class=app-admin-input><option value=indefinite>Every charge</option><option value=none>First charge only</option><option value=finite>First charge + N further charges</option></select></div><div><label class=app-admin-label>Products <span style=text-transform:none;letter-spacing:normal;opacity:0.7>(none ticked = any product)</span></label><div class=app-admin-card-soft style=padding:0.5rem;max-height:11rem;overflow-y:auto></div></div><label style=display:flex;align-items:flex-start;gap:0.5rem><input type=checkbox><span style=font-size:0.875rem>Active<span class=app-admin-text-muted style=display:block;font-size:0.75rem>Off: nobody new is given it. People already holding it keep it.</span></span></label><div style=display:flex;gap:0.75rem;padding-top:0.5rem><button type=button class="app-admin-btn app-admin-btn-ghost"style=flex:1>Cancel</button><button type=button class="app-admin-btn app-admin-btn-primary"style=flex:1>`);
16993
- var _tmpl$538 = /* @__PURE__ */ template(`<div style=color:var(--app-admin-fg-muted);font-size:0.875rem;padding:0.5rem>No products available.`);
17110
+ var _tmpl$281 = /* @__PURE__ */ template(`<div role=alert style="background:var(--app-admin-danger-bg);color:var(--app-admin-danger-fg);border:1px solid var(--app-admin-danger-bg-strong);font-size:0.875rem;border-radius:var(--app-admin-radius-sm);padding:0.5rem 0.75rem;margin-bottom:1rem">`);
17111
+ var _tmpl$287 = /* @__PURE__ */ template(`<p class=app-admin-text-muted style=font-size:0.8125rem;margin:0>Changes apply to grants issued from now on. Grants already issued keep the terms they were issued with.`);
17112
+ var _tmpl$355 = /* @__PURE__ */ template(`<input type=number min=1 max=120 aria-label="Number of further charges"class=app-admin-input style=margin-top:0.5rem>`);
17113
+ var _tmpl$445 = /* @__PURE__ */ template(`<div class=app-admin-side-panel style=width:440px><div style=padding:1.5rem><div style=display:flex;align-items:center;justify-content:space-between;margin-bottom:1.5rem><h2 class=app-admin-heading style=font-size:1.125rem;margin:0></h2><button type=button class="app-admin-btn app-admin-btn-ghost"aria-label=Close style="border:none;padding:0.25rem 0.5rem;font-size:1.25rem">\xD7</button></div><div style=display:flex;flex-direction:column;gap:1rem><div><label class=app-admin-label for=offer-name>Name</label><input id=offer-name type=text maxlength=120 placeholder="$10 off every month"class=app-admin-input></div><div style="display:grid;grid-template-columns:1fr 1fr;gap:0.75rem"><div><label class=app-admin-label for=offer-discount-type>Discount type</label><select id=offer-discount-type class=app-admin-input><option value=fixed>Fixed $ off</option><option value=percent>Percent off</option></select></div><div><label class=app-admin-label for=offer-discount-value></label><input id=offer-discount-value type=number min=0 class=app-admin-input></div></div><div><label class=app-admin-label for=offer-duration>Applies to</label><select id=offer-duration class=app-admin-input><option value=indefinite>Every charge</option><option value=none>First charge only</option><option value=finite>First charge + N further charges</option></select></div><div><label class=app-admin-label>Products <span style=text-transform:none;letter-spacing:normal;opacity:0.7>(none ticked = any product)</span></label><div class=app-admin-card-soft style=padding:0.5rem;max-height:11rem;overflow-y:auto></div></div><label style=display:flex;align-items:flex-start;gap:0.5rem><input type=checkbox><span style=font-size:0.875rem>Active<span class=app-admin-text-muted style=display:block;font-size:0.75rem>Off: nobody new is given it. People already holding it keep it.</span></span></label><div style=display:flex;gap:0.75rem;padding-top:0.5rem><button type=button class="app-admin-btn app-admin-btn-ghost"style=flex:1>Cancel</button><button type=button class="app-admin-btn app-admin-btn-primary"style=flex:1>`);
17114
+ var _tmpl$539 = /* @__PURE__ */ template(`<div style=color:var(--app-admin-fg-muted);font-size:0.875rem;padding:0.5rem>No products available.`);
16994
17115
  var _tmpl$635 = /* @__PURE__ */ template(`<label style="display:flex;align-items:center;gap:0.5rem;padding:0.375rem 0.5rem;border-radius:var(--app-admin-radius-sm);cursor:pointer"><input type=checkbox><span style=font-size:0.875rem>`);
16995
17116
  var _tmpl$732 = /* @__PURE__ */ template(`<form style=display:flex;gap:0.75rem;align-items:flex-end;flex-wrap:wrap><div style="flex:1 1 16rem"><label class=app-admin-label for=offer-grant-email>Email</label><input id=offer-grant-email type=email required placeholder=person@example.com class=app-admin-input></div><div><label class=app-admin-label for=offer-grant-days>Valid for (days)</label><input id=offer-grant-days type=number min=1 max=365 required class=app-admin-input style=width:7rem></div><button type=submit class="app-admin-btn app-admin-btn-primary">`);
16996
17117
  var _tmpl$828 = /* @__PURE__ */ template(`<p class=app-admin-text-muted style="font-size:0.75rem;margin:0.625rem 0 0">`);
@@ -17085,7 +17206,7 @@ function OfferEditPanel(props) {
17085
17206
  }
17086
17207
  };
17087
17208
  return (() => {
17088
- var _el$ = _tmpl$444(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$5 = _el$4.nextSibling, _el$7 = _el$3.nextSibling, _el$9 = _el$7.firstChild, _el$0 = _el$9.firstChild, _el$1 = _el$0.nextSibling, _el$10 = _el$9.nextSibling, _el$11 = _el$10.firstChild, _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$17 = _el$10.nextSibling, _el$18 = _el$17.firstChild, _el$19 = _el$18.nextSibling, _el$21 = _el$17.nextSibling, _el$22 = _el$21.firstChild, _el$23 = _el$22.firstChild; _el$23.nextSibling; var _el$26 = _el$22.nextSibling, _el$27 = _el$21.nextSibling, _el$28 = _el$27.firstChild, _el$29 = _el$28.nextSibling, _el$30 = _el$29.firstChild; _el$30.nextSibling; var _el$32 = _el$27.nextSibling, _el$33 = _el$32.firstChild, _el$34 = _el$33.nextSibling;
17209
+ var _el$ = _tmpl$445(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$5 = _el$4.nextSibling, _el$7 = _el$3.nextSibling, _el$9 = _el$7.firstChild, _el$0 = _el$9.firstChild, _el$1 = _el$0.nextSibling, _el$10 = _el$9.nextSibling, _el$11 = _el$10.firstChild, _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$17 = _el$10.nextSibling, _el$18 = _el$17.firstChild, _el$19 = _el$18.nextSibling, _el$21 = _el$17.nextSibling, _el$22 = _el$21.firstChild, _el$23 = _el$22.firstChild; _el$23.nextSibling; var _el$26 = _el$22.nextSibling, _el$27 = _el$21.nextSibling, _el$28 = _el$27.firstChild, _el$29 = _el$28.nextSibling, _el$30 = _el$29.firstChild; _el$30.nextSibling; var _el$32 = _el$27.nextSibling, _el$33 = _el$32.firstChild, _el$34 = _el$33.nextSibling;
17089
17210
  insert(_el$4, () => editing() ? "Edit Offer" : "New Offer");
17090
17211
  addEventListener(_el$5, "click", props.onClose, true);
17091
17212
  insert(_el$2, createComponent(Show, {
@@ -17093,7 +17214,7 @@ function OfferEditPanel(props) {
17093
17214
  return error();
17094
17215
  },
17095
17216
  get children() {
17096
- var _el$6 = _tmpl$280();
17217
+ var _el$6 = _tmpl$281();
17097
17218
  insert(_el$6, error);
17098
17219
  return _el$6;
17099
17220
  }
@@ -17103,7 +17224,7 @@ function OfferEditPanel(props) {
17103
17224
  return editing();
17104
17225
  },
17105
17226
  get children() {
17106
- return _tmpl$281();
17227
+ return _tmpl$287();
17107
17228
  }
17108
17229
  }), _el$9);
17109
17230
  _el$1.$$input = (e) => setName(e.currentTarget.value);
@@ -17116,7 +17237,7 @@ function OfferEditPanel(props) {
17116
17237
  return recurringMode() === "finite";
17117
17238
  },
17118
17239
  get children() {
17119
- var _el$20 = _tmpl$351();
17240
+ var _el$20 = _tmpl$355();
17120
17241
  _el$20.$$input = (e) => setRecurringCharges(parseInt(e.currentTarget.value, 10) || 0);
17121
17242
  effect(() => _el$20.value = recurringCharges());
17122
17243
  return _el$20;
@@ -17127,7 +17248,7 @@ function OfferEditPanel(props) {
17127
17248
  return props.products.length > 0;
17128
17249
  },
17129
17250
  get fallback() {
17130
- return _tmpl$538();
17251
+ return _tmpl$539();
17131
17252
  },
17132
17253
  get children() {
17133
17254
  return createComponent(For, {
@@ -17612,11 +17733,11 @@ function Offers() {
17612
17733
  });
17613
17734
  }
17614
17735
  delegateEvents(["click", "input"]);
17615
- var _tmpl$287 = /* @__PURE__ */ template(`<div style="background:var(--app-admin-danger-bg);color:var(--app-admin-danger-fg);border:1px solid var(--app-admin-danger-bg-strong);font-size:0.875rem;border-radius:var(--app-admin-radius-sm);padding:0.5rem 0.75rem;margin-bottom:1rem">`);
17616
- var _tmpl$288 = /* @__PURE__ */ template(`<input type=number min=1 placeholder="Number of rebills"class=app-admin-input style=margin-top:0.5rem>`);
17617
- var _tmpl$355 = /* @__PURE__ */ template(`<div class=app-admin-side-panel style=width:440px><div style=padding:1.5rem><div style=display:flex;align-items:center;justify-content:space-between;margin-bottom:1.5rem><h2 class=app-admin-heading style=font-size:1.125rem;margin:0></h2><button type=button class="app-admin-btn app-admin-btn-ghost"style="border:none;padding:0.25rem 0.5rem;font-size:1.25rem">\xD7</button></div><div style=display:flex;flex-direction:column;gap:1rem><div><label class=app-admin-label>Name</label><input type=text placeholder="Spring sale"class=app-admin-input></div><div style="display:grid;grid-template-columns:1fr 1fr;gap:0.75rem"><div><label class=app-admin-label>Discount type</label><select class=app-admin-input><option value=percent>Percent off</option><option value=fixed>Fixed $ off</option></select></div><div><label class=app-admin-label></label><input type=number min=0 class=app-admin-input></div></div><div style="display:grid;grid-template-columns:1fr 1fr;gap:0.75rem"><div><label class=app-admin-label>Start date</label><input type=datetime-local class=app-admin-input></div><div><label class=app-admin-label>End date</label><input type=datetime-local class=app-admin-input></div></div><div><label class=app-admin-label>Products <span style=text-transform:none;letter-spacing:normal;opacity:0.7>(required)</span></label><div class=app-admin-card-soft style=padding:0.5rem;max-height:11rem;overflow-y:auto></div></div><div><label class=app-admin-label>Recurring (subscriptions)</label><select class=app-admin-input><option value=none>Initial charge only</option><option value=finite>First N rebills</option><option value=indefinite>All recurring charges (indefinite)</option></select></div><label style=display:flex;align-items:center;gap:0.5rem;margin-top:0.5rem><input type=checkbox><span style=font-size:0.875rem>Exclusive (cannot stack with other discounts)</span></label><label style=display:flex;align-items:center;gap:0.5rem><input type=checkbox><span style=font-size:0.875rem>Active</span></label><div style=display:flex;gap:0.75rem;padding-top:0.5rem><button type=button class="app-admin-btn app-admin-btn-ghost"style=flex:1>Cancel</button><button type=button class="app-admin-btn app-admin-btn-primary"style=flex:1>`);
17618
- var _tmpl$445 = /* @__PURE__ */ template(`<div style=color:var(--app-admin-fg-muted);font-size:0.875rem;padding:0.5rem>No products available.`);
17619
- var _tmpl$539 = /* @__PURE__ */ template(`<label style="display:flex;align-items:center;gap:0.5rem;padding:0.375rem 0.5rem;border-radius:var(--app-admin-radius-sm);cursor:pointer"><input type=checkbox><span style=font-size:0.875rem>`);
17736
+ var _tmpl$288 = /* @__PURE__ */ template(`<div style="background:var(--app-admin-danger-bg);color:var(--app-admin-danger-fg);border:1px solid var(--app-admin-danger-bg-strong);font-size:0.875rem;border-radius:var(--app-admin-radius-sm);padding:0.5rem 0.75rem;margin-bottom:1rem">`);
17737
+ var _tmpl$289 = /* @__PURE__ */ template(`<input type=number min=1 placeholder="Number of rebills"class=app-admin-input style=margin-top:0.5rem>`);
17738
+ var _tmpl$356 = /* @__PURE__ */ template(`<div class=app-admin-side-panel style=width:440px><div style=padding:1.5rem><div style=display:flex;align-items:center;justify-content:space-between;margin-bottom:1.5rem><h2 class=app-admin-heading style=font-size:1.125rem;margin:0></h2><button type=button class="app-admin-btn app-admin-btn-ghost"style="border:none;padding:0.25rem 0.5rem;font-size:1.25rem">\xD7</button></div><div style=display:flex;flex-direction:column;gap:1rem><div><label class=app-admin-label>Name</label><input type=text placeholder="Spring sale"class=app-admin-input></div><div style="display:grid;grid-template-columns:1fr 1fr;gap:0.75rem"><div><label class=app-admin-label>Discount type</label><select class=app-admin-input><option value=percent>Percent off</option><option value=fixed>Fixed $ off</option></select></div><div><label class=app-admin-label></label><input type=number min=0 class=app-admin-input></div></div><div style="display:grid;grid-template-columns:1fr 1fr;gap:0.75rem"><div><label class=app-admin-label>Start date</label><input type=datetime-local class=app-admin-input></div><div><label class=app-admin-label>End date</label><input type=datetime-local class=app-admin-input></div></div><div><label class=app-admin-label>Products <span style=text-transform:none;letter-spacing:normal;opacity:0.7>(required)</span></label><div class=app-admin-card-soft style=padding:0.5rem;max-height:11rem;overflow-y:auto></div></div><div><label class=app-admin-label>Recurring (subscriptions)</label><select class=app-admin-input><option value=none>Initial charge only</option><option value=finite>First N rebills</option><option value=indefinite>All recurring charges (indefinite)</option></select></div><label style=display:flex;align-items:center;gap:0.5rem;margin-top:0.5rem><input type=checkbox><span style=font-size:0.875rem>Exclusive (cannot stack with other discounts)</span></label><label style=display:flex;align-items:center;gap:0.5rem><input type=checkbox><span style=font-size:0.875rem>Active</span></label><div style=display:flex;gap:0.75rem;padding-top:0.5rem><button type=button class="app-admin-btn app-admin-btn-ghost"style=flex:1>Cancel</button><button type=button class="app-admin-btn app-admin-btn-primary"style=flex:1>`);
17739
+ var _tmpl$446 = /* @__PURE__ */ template(`<div style=color:var(--app-admin-fg-muted);font-size:0.875rem;padding:0.5rem>No products available.`);
17740
+ var _tmpl$540 = /* @__PURE__ */ template(`<label style="display:flex;align-items:center;gap:0.5rem;padding:0.375rem 0.5rem;border-radius:var(--app-admin-radius-sm);cursor:pointer"><input type=checkbox><span style=font-size:0.875rem>`);
17620
17741
  var _tmpl$636 = /* @__PURE__ */ template(`<div class=app-admin-card style=overflow:hidden><table class=app-admin-table><thead><tr><th>Name</th><th>Discount</th><th>Window</th><th>Products</th><th>Status</th><th style=width:8rem></th></tr></thead><tbody>`);
17621
17742
  var _tmpl$733 = /* @__PURE__ */ template(`<div><div style=display:flex;align-items:center;justify-content:space-between;margin-bottom:2rem><button type=button class="app-admin-btn app-admin-btn-primary">+ New sale`);
17622
17743
  var _tmpl$829 = /* @__PURE__ */ template(`<span style=margin-left:0.5rem;font-size:0.75rem;color:var(--app-admin-warning-fg)>exclusive`);
@@ -17680,7 +17801,7 @@ function SaleEditPanel(props) {
17680
17801
  }
17681
17802
  };
17682
17803
  return (() => {
17683
- var _el$ = _tmpl$355(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$5 = _el$4.nextSibling, _el$7 = _el$3.nextSibling, _el$8 = _el$7.firstChild, _el$9 = _el$8.firstChild, _el$0 = _el$9.nextSibling, _el$1 = _el$8.nextSibling, _el$10 = _el$1.firstChild, _el$11 = _el$10.firstChild, _el$12 = _el$11.nextSibling, _el$13 = _el$10.nextSibling, _el$14 = _el$13.firstChild, _el$15 = _el$14.nextSibling, _el$16 = _el$1.nextSibling, _el$17 = _el$16.firstChild, _el$18 = _el$17.firstChild, _el$19 = _el$18.nextSibling, _el$20 = _el$17.nextSibling, _el$21 = _el$20.firstChild, _el$22 = _el$21.nextSibling, _el$23 = _el$16.nextSibling, _el$24 = _el$23.firstChild, _el$25 = _el$24.firstChild; _el$25.nextSibling; var _el$28 = _el$24.nextSibling, _el$29 = _el$23.nextSibling, _el$30 = _el$29.firstChild, _el$31 = _el$30.nextSibling, _el$33 = _el$29.nextSibling, _el$34 = _el$33.firstChild; _el$34.nextSibling; var _el$36 = _el$33.nextSibling, _el$37 = _el$36.firstChild; _el$37.nextSibling; var _el$39 = _el$36.nextSibling, _el$40 = _el$39.firstChild, _el$41 = _el$40.nextSibling;
17804
+ var _el$ = _tmpl$356(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$5 = _el$4.nextSibling, _el$7 = _el$3.nextSibling, _el$8 = _el$7.firstChild, _el$9 = _el$8.firstChild, _el$0 = _el$9.nextSibling, _el$1 = _el$8.nextSibling, _el$10 = _el$1.firstChild, _el$11 = _el$10.firstChild, _el$12 = _el$11.nextSibling, _el$13 = _el$10.nextSibling, _el$14 = _el$13.firstChild, _el$15 = _el$14.nextSibling, _el$16 = _el$1.nextSibling, _el$17 = _el$16.firstChild, _el$18 = _el$17.firstChild, _el$19 = _el$18.nextSibling, _el$20 = _el$17.nextSibling, _el$21 = _el$20.firstChild, _el$22 = _el$21.nextSibling, _el$23 = _el$16.nextSibling, _el$24 = _el$23.firstChild, _el$25 = _el$24.firstChild; _el$25.nextSibling; var _el$28 = _el$24.nextSibling, _el$29 = _el$23.nextSibling, _el$30 = _el$29.firstChild, _el$31 = _el$30.nextSibling, _el$33 = _el$29.nextSibling, _el$34 = _el$33.firstChild; _el$34.nextSibling; var _el$36 = _el$33.nextSibling, _el$37 = _el$36.firstChild; _el$37.nextSibling; var _el$39 = _el$36.nextSibling, _el$40 = _el$39.firstChild, _el$41 = _el$40.nextSibling;
17684
17805
  insert(_el$4, () => editing() ? "Edit Sale" : "New Sale");
17685
17806
  addEventListener(_el$5, "click", props.onClose, true);
17686
17807
  insert(_el$2, createComponent(Show, {
@@ -17688,7 +17809,7 @@ function SaleEditPanel(props) {
17688
17809
  return error();
17689
17810
  },
17690
17811
  get children() {
17691
- var _el$6 = _tmpl$287();
17812
+ var _el$6 = _tmpl$288();
17692
17813
  insert(_el$6, error);
17693
17814
  return _el$6;
17694
17815
  }
@@ -17704,7 +17825,7 @@ function SaleEditPanel(props) {
17704
17825
  return props.products.length > 0;
17705
17826
  },
17706
17827
  get fallback() {
17707
- return _tmpl$445();
17828
+ return _tmpl$446();
17708
17829
  },
17709
17830
  get children() {
17710
17831
  return createComponent(For, {
@@ -17712,7 +17833,7 @@ function SaleEditPanel(props) {
17712
17833
  return props.products;
17713
17834
  },
17714
17835
  children: (p) => (() => {
17715
- var _el$43 = _tmpl$539(), _el$44 = _el$43.firstChild, _el$45 = _el$44.nextSibling;
17836
+ var _el$43 = _tmpl$540(), _el$44 = _el$43.firstChild, _el$45 = _el$44.nextSibling;
17716
17837
  _el$44.addEventListener("change", () => toggleProduct(p.id));
17717
17838
  insert(_el$45, () => p.name);
17718
17839
  effect(() => _el$44.checked = productIds().includes(p.id));
@@ -17727,7 +17848,7 @@ function SaleEditPanel(props) {
17727
17848
  return recurringMode() === "finite";
17728
17849
  },
17729
17850
  get children() {
17730
- var _el$32 = _tmpl$288();
17851
+ var _el$32 = _tmpl$289();
17731
17852
  _el$32.$$input = (e) => setRecurringCharges(parseInt(e.currentTarget.value, 10) || 0);
17732
17853
  effect(() => _el$32.value = recurringCharges());
17733
17854
  return _el$32;
@@ -17905,11 +18026,11 @@ function formatWaiting(iso, now = Date.now()) {
17905
18026
  function isWaitingOnSupport(thread) {
17906
18027
  return thread.lastSender === "customer" && thread.status !== "closed" && thread.status !== "transferred";
17907
18028
  }
17908
- var _tmpl$289 = /* @__PURE__ */ template(`<div><div class=app-admin-text-muted>`);
17909
- var _tmpl$290 = /* @__PURE__ */ template(`<span class=app-admin-text-muted style=flex-shrink:0>`);
17910
- var _tmpl$356 = /* @__PURE__ */ template(`<div style="display:flex;align-items:center;gap:0.5rem;padding:0.375rem 0;border-bottom:1px solid var(--app-admin-border-soft);font-size:0.8125rem"><span style=flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap>`);
17911
- var _tmpl$446 = /* @__PURE__ */ template(`<div class="app-admin-card app-admin-support-col app-admin-support-rail"style=padding:0>`);
17912
- var _tmpl$540 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-ghost"style=width:100%>Open customer record`);
18029
+ var _tmpl$290 = /* @__PURE__ */ template(`<div><div class=app-admin-text-muted>`);
18030
+ var _tmpl$291 = /* @__PURE__ */ template(`<span class=app-admin-text-muted style=flex-shrink:0>`);
18031
+ var _tmpl$357 = /* @__PURE__ */ template(`<div style="display:flex;align-items:center;gap:0.5rem;padding:0.375rem 0;border-bottom:1px solid var(--app-admin-border-soft);font-size:0.8125rem"><span style=flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap>`);
18032
+ var _tmpl$447 = /* @__PURE__ */ template(`<div class="app-admin-card app-admin-support-col app-admin-support-rail"style=padding:0>`);
18033
+ var _tmpl$541 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-ghost"style=width:100%>Open customer record`);
17913
18034
  var _tmpl$637 = /* @__PURE__ */ template(`<p class=app-admin-text-muted style=margin:0;font-size:0.75rem>Some sections couldn't be loaded (<!>).`);
17914
18035
  var _tmpl$734 = /* @__PURE__ */ template(`<div class=app-admin-support-scroll data-scrollable style=padding:1rem;display:flex;flex-direction:column;gap:1.25rem><div><div style=font-weight:600></div><div class=app-admin-text-muted style=font-size:0.8125rem;overflow:hidden;text-overflow:ellipsis></div><div style=display:flex;align-items:center;gap:0.5rem;margin-top:0.5rem;flex-wrap:wrap><span class="app-admin-badge app-admin-badge--neutral"></span><span class=app-admin-text-muted style=font-size:0.75rem>Since `);
17915
18036
  var _tmpl$830 = /* @__PURE__ */ template(`<p class=app-admin-text-muted style=margin:0;font-size:0.8125rem>None.`);
@@ -17918,7 +18039,7 @@ var _tmpl$023 = /* @__PURE__ */ template(`<p class=app-admin-text-muted style=ma
17918
18039
  var _tmpl$1104 = /* @__PURE__ */ template(`<p class=app-admin-text-muted style=margin:0;font-size:0.8125rem>None open.`);
17919
18040
  function RailSection(props) {
17920
18041
  return (() => {
17921
- var _el$ = _tmpl$289(), _el$2 = _el$.firstChild;
18042
+ var _el$ = _tmpl$290(), _el$2 = _el$.firstChild;
17922
18043
  insert(_el$2, () => props.title);
17923
18044
  insert(_el$, () => props.children, null);
17924
18045
  effect((_$p) => style(_el$2, panelSectionHeader, _$p));
@@ -17927,14 +18048,14 @@ function RailSection(props) {
17927
18048
  }
17928
18049
  function RailRow(props) {
17929
18050
  return (() => {
17930
- var _el$3 = _tmpl$356(), _el$4 = _el$3.firstChild;
18051
+ var _el$3 = _tmpl$357(), _el$4 = _el$3.firstChild;
17931
18052
  insert(_el$4, () => props.left);
17932
18053
  insert(_el$3, createComponent(Show, {
17933
18054
  get when() {
17934
18055
  return props.right;
17935
18056
  },
17936
18057
  get children() {
17937
- var _el$5 = _tmpl$290();
18058
+ var _el$5 = _tmpl$291();
17938
18059
  insert(_el$5, () => props.right);
17939
18060
  return _el$5;
17940
18061
  }
@@ -17966,7 +18087,7 @@ function SupportCustomerRail(props) {
17966
18087
  const payments = () => (overview()?.payments ?? []).slice(0, 3);
17967
18088
  const requests = () => (overview()?.requests.items ?? []).filter((r) => r.status !== "completed" && r.status !== "denied");
17968
18089
  return (() => {
17969
- var _el$6 = _tmpl$446();
18090
+ var _el$6 = _tmpl$447();
17970
18091
  insert(_el$6, createComponent(Show, {
17971
18092
  get when() {
17972
18093
  return props.userId;
@@ -18005,7 +18126,7 @@ function SupportCustomerRail(props) {
18005
18126
  return props.onOpenCustomer;
18006
18127
  },
18007
18128
  get children() {
18008
- var _el$13 = _tmpl$540();
18129
+ var _el$13 = _tmpl$541();
18009
18130
  _el$13.$$click = () => props.onOpenCustomer(o().customer.uid);
18010
18131
  return _el$13;
18011
18132
  }
@@ -18134,16 +18255,16 @@ function SupportCustomerRail(props) {
18134
18255
  })();
18135
18256
  }
18136
18257
  delegateEvents(["click"]);
18137
- var _tmpl$291 = /* @__PURE__ */ template(`<div style="padding:0.625rem;border-top:1px solid var(--app-admin-border)"><button type=button class="app-admin-btn app-admin-btn-ghost"style=width:100%>`);
18138
- var _tmpl$296 = /* @__PURE__ */ template(`<div class="app-admin-card app-admin-support-col"style=padding:0><div class=app-admin-support-scroll data-scrollable>`);
18139
- var _tmpl$357 = /* @__PURE__ */ template(`<span aria-hidden=true style=width:0.5rem;height:0.5rem;border-radius:999px;background:var(--app-admin-primary);flex-shrink:0>`);
18140
- var _tmpl$447 = /* @__PURE__ */ template(`<span style=font-size:0.6875rem;font-weight:600;color:var(--app-admin-warning-fg)>Waiting `);
18141
- var _tmpl$541 = /* @__PURE__ */ template(`<span class="app-admin-badge app-admin-badge--info"style=font-size:0.6875rem>From care team`);
18258
+ var _tmpl$296 = /* @__PURE__ */ template(`<div style="padding:0.625rem;border-top:1px solid var(--app-admin-border)"><button type=button class="app-admin-btn app-admin-btn-ghost"style=width:100%>`);
18259
+ var _tmpl$297 = /* @__PURE__ */ template(`<div class="app-admin-card app-admin-support-col"style=padding:0><div class=app-admin-support-scroll data-scrollable>`);
18260
+ var _tmpl$358 = /* @__PURE__ */ template(`<span aria-hidden=true style=width:0.5rem;height:0.5rem;border-radius:999px;background:var(--app-admin-primary);flex-shrink:0>`);
18261
+ var _tmpl$448 = /* @__PURE__ */ template(`<span style=font-size:0.6875rem;font-weight:600;color:var(--app-admin-warning-fg)>Waiting `);
18262
+ var _tmpl$543 = /* @__PURE__ */ template(`<span class="app-admin-badge app-admin-badge--info"style=font-size:0.6875rem>From care team`);
18142
18263
  var _tmpl$638 = /* @__PURE__ */ template(`<span class=app-admin-text-muted style=font-size:0.6875rem>`);
18143
18264
  var _tmpl$735 = /* @__PURE__ */ template(`<button type=button class=app-admin-support-row><div style=display:flex;align-items:center;gap:0.5rem><span style=flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap></span><span class=app-admin-text-muted style=font-size:0.75rem;flex-shrink:0></span></div><div class=app-admin-text-muted style=font-size:0.8125rem;margin-top:0.1875rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap></div><div style=display:flex;align-items:center;gap:0.3125rem;margin-top:0.375rem;flex-wrap:wrap><span style=flex:1>`);
18144
18265
  function SupportQueue(props) {
18145
18266
  return (() => {
18146
- var _el$ = _tmpl$296(), _el$2 = _el$.firstChild;
18267
+ var _el$ = _tmpl$297(), _el$2 = _el$.firstChild;
18147
18268
  insert(_el$2, createComponent(Show, {
18148
18269
  get when() {
18149
18270
  return !props.loading;
@@ -18174,7 +18295,7 @@ function SupportQueue(props) {
18174
18295
  return t.adminUnread;
18175
18296
  },
18176
18297
  get children() {
18177
- return _tmpl$357();
18298
+ return _tmpl$358();
18178
18299
  }
18179
18300
  }), _el$8);
18180
18301
  insert(_el$8, () => customerLabel(t));
@@ -18192,7 +18313,7 @@ function SupportQueue(props) {
18192
18313
  })();
18193
18314
  },
18194
18315
  get children() {
18195
- var _el$10 = _tmpl$447(); _el$10.firstChild;
18316
+ var _el$10 = _tmpl$448(); _el$10.firstChild;
18196
18317
  insert(_el$10, () => formatWaiting(t.lastMessageAt), null);
18197
18318
  return _el$10;
18198
18319
  }
@@ -18202,7 +18323,7 @@ function SupportQueue(props) {
18202
18323
  return t.sourceRef?.startsWith("apex:handoff:");
18203
18324
  },
18204
18325
  get children() {
18205
- return _tmpl$541();
18326
+ return _tmpl$543();
18206
18327
  }
18207
18328
  }), null);
18208
18329
  insert(_el$1, createComponent(Show, {
@@ -18243,7 +18364,7 @@ function SupportQueue(props) {
18243
18364
  return props.hasMore;
18244
18365
  },
18245
18366
  get children() {
18246
- var _el$3 = _tmpl$291(), _el$4 = _el$3.firstChild;
18367
+ var _el$3 = _tmpl$296(), _el$4 = _el$3.firstChild;
18247
18368
  _el$4.$$click = () => props.onLoadMore();
18248
18369
  insert(_el$4, () => props.loadingMore ? "Loading\u2026" : "Load more");
18249
18370
  effect(() => _el$4.disabled = props.loadingMore);
@@ -18254,11 +18375,11 @@ function SupportQueue(props) {
18254
18375
  })();
18255
18376
  }
18256
18377
  delegateEvents(["click"]);
18257
- var _tmpl$297 = /* @__PURE__ */ template(`<svg width=14 height=14 viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=1.8 stroke-linecap=round stroke-linejoin=round aria-hidden=true style=vertical-align:-2px;margin-right:0.375rem><path d="M21.4 11.05 12.25 20.2a5.5 5.5 0 0 1-7.78-7.78l9.19-9.19a3.67 3.67 0 1 1 5.19 5.19l-9.2 9.19a1.83 1.83 0 1 1-2.59-2.59l8.49-8.48">`);
18258
- var _tmpl$298 = /* @__PURE__ */ template(`<button type=button style=display:block;padding:0;border:none;background:none;cursor:pointer;margin-top:0.5rem><img loading=lazy style=max-width:100%;max-height:15rem;border-radius:0.5rem;display:block>`, true, false, false);
18259
- var _tmpl$358 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-ghost"style=margin-top:0.5rem;font-size:0.75rem>`);
18260
- var _tmpl$448 = /* @__PURE__ */ template(`<p style=margin:0;white-space:pre-wrap;line-height:1.5>`);
18261
- var _tmpl$543 = /* @__PURE__ */ template(`<div class=app-admin-card-soft style="padding:0.75rem 0.875rem;margin-bottom:0.5rem"><div style=display:flex;justify-content:space-between;gap:1rem;margin-bottom:0.25rem><strong style=font-size:0.75rem></strong><span class=app-admin-text-muted style=font-size:0.75rem>`);
18378
+ var _tmpl$298 = /* @__PURE__ */ template(`<svg width=14 height=14 viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=1.8 stroke-linecap=round stroke-linejoin=round aria-hidden=true style=vertical-align:-2px;margin-right:0.375rem><path d="M21.4 11.05 12.25 20.2a5.5 5.5 0 0 1-7.78-7.78l9.19-9.19a3.67 3.67 0 1 1 5.19 5.19l-9.2 9.19a1.83 1.83 0 1 1-2.59-2.59l8.49-8.48">`);
18379
+ var _tmpl$299 = /* @__PURE__ */ template(`<button type=button style=display:block;padding:0;border:none;background:none;cursor:pointer;margin-top:0.5rem><img loading=lazy style=max-width:100%;max-height:15rem;border-radius:0.5rem;display:block>`, true, false, false);
18380
+ var _tmpl$359 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-ghost"style=margin-top:0.5rem;font-size:0.75rem>`);
18381
+ var _tmpl$449 = /* @__PURE__ */ template(`<p style=margin:0;white-space:pre-wrap;line-height:1.5>`);
18382
+ var _tmpl$544 = /* @__PURE__ */ template(`<div class=app-admin-card-soft style="padding:0.75rem 0.875rem;margin-bottom:0.5rem"><div style=display:flex;justify-content:space-between;gap:1rem;margin-bottom:0.25rem><strong style=font-size:0.75rem></strong><span class=app-admin-text-muted style=font-size:0.75rem>`);
18262
18383
  var _tmpl$639 = /* @__PURE__ */ template(`<div class="app-admin-card app-admin-support-col"style=padding:0>`);
18263
18384
  var _tmpl$736 = /* @__PURE__ */ template(`<button type=button class=app-admin-link-btn>View customer`);
18264
18385
  var _tmpl$831 = /* @__PURE__ */ template(`<span style="flex-shrink:0;font-size:0.75rem;font-weight:600;color:var(--app-admin-warning-fg);background:var(--app-admin-warning-bg);padding:0.1875rem 0.5rem;border-radius:999px">Waiting `);
@@ -18492,7 +18613,7 @@ ${body}` : body);
18492
18613
  if (url) window.open(url, "_blank", "noopener");
18493
18614
  else setError("Could not open that attachment.");
18494
18615
  }
18495
- const ClipIcon = () => _tmpl$297();
18616
+ const ClipIcon = () => _tmpl$298();
18496
18617
  const Attachment = (p) => {
18497
18618
  const isImage = () => p.attachment.mimeType.startsWith("image/");
18498
18619
  const [url, setUrl] = createSignal(null);
@@ -18508,7 +18629,7 @@ ${body}` : body);
18508
18629
  },
18509
18630
  get fallback() {
18510
18631
  return (() => {
18511
- var _el$4 = _tmpl$358();
18632
+ var _el$4 = _tmpl$359();
18512
18633
  _el$4.$$click = () => openAttachment(p.attachment.id);
18513
18634
  insert(_el$4, createComponent(ClipIcon, {}), null);
18514
18635
  insert(_el$4, () => p.attachment.filename, null);
@@ -18516,7 +18637,7 @@ ${body}` : body);
18516
18637
  })();
18517
18638
  },
18518
18639
  get children() {
18519
- var _el$2 = _tmpl$298(), _el$3 = _el$2.firstChild;
18640
+ var _el$2 = _tmpl$299(), _el$3 = _el$2.firstChild;
18520
18641
  _el$2.$$click = () => openAttachment(p.attachment.id);
18521
18642
  _el$3.addEventListener("error", () => {
18522
18643
  if (retried) {
@@ -18542,7 +18663,7 @@ ${body}` : body);
18542
18663
  const Bubble = (p) => {
18543
18664
  const fromSupport = () => p.msg.sender === "support";
18544
18665
  return (() => {
18545
- var _el$5 = _tmpl$543(), _el$6 = _el$5.firstChild, _el$7 = _el$6.firstChild, _el$8 = _el$7.nextSibling;
18666
+ var _el$5 = _tmpl$544(), _el$6 = _el$5.firstChild, _el$7 = _el$6.firstChild, _el$8 = _el$7.nextSibling;
18546
18667
  insert(_el$7, () => fromSupport() ? "Support" : "Customer");
18547
18668
  insert(_el$8, () => new Date(p.msg.createdAt).toLocaleString("en-US", {
18548
18669
  month: "short",
@@ -18555,7 +18676,7 @@ ${body}` : body);
18555
18676
  return p.msg.body;
18556
18677
  },
18557
18678
  get children() {
18558
- var _el$9 = _tmpl$448();
18679
+ var _el$9 = _tmpl$449();
18559
18680
  insert(_el$9, () => p.msg.body);
18560
18681
  return _el$9;
18561
18682
  }
@@ -18849,11 +18970,11 @@ ${body}` : body);
18849
18970
  delegateEvents(["click", "input", "keydown"]);
18850
18971
 
18851
18972
  // src/pages/admin/Support.tsx
18852
- var _tmpl$299 = /* @__PURE__ */ template(`<div class=app-admin-support><div style=display:flex;gap:0.5rem;align-items:center;flex-wrap:wrap;margin-bottom:0.75rem></div><div style=display:flex;gap:0.5rem;margin-bottom:0.5rem;flex-wrap:wrap></div><div style=display:flex;gap:0.375rem;margin-bottom:1rem;flex-wrap:wrap></div><div class=app-admin-support-grid>`);
18973
+ var _tmpl$300 = /* @__PURE__ */ template(`<div class=app-admin-support><div style=display:flex;gap:0.5rem;align-items:center;flex-wrap:wrap;margin-bottom:0.75rem></div><div style=display:flex;gap:0.5rem;margin-bottom:0.5rem;flex-wrap:wrap></div><div style=display:flex;gap:0.375rem;margin-bottom:1rem;flex-wrap:wrap></div><div class=app-admin-support-grid>`);
18853
18974
  var _tmpl$2100 = /* @__PURE__ */ template(`<span class="app-admin-badge app-admin-badge--warning"> awaiting a reply`);
18854
- var _tmpl$359 = /* @__PURE__ */ template(`<span class="app-admin-badge app-admin-badge--neutral"> open`);
18855
- var _tmpl$449 = /* @__PURE__ */ template(`<span class="app-admin-badge app-admin-badge--neutral"> all time`);
18856
- var _tmpl$544 = /* @__PURE__ */ template(`<span class=app-admin-text-muted style=font-size:0.75rem>Longest wait `);
18975
+ var _tmpl$360 = /* @__PURE__ */ template(`<span class="app-admin-badge app-admin-badge--neutral"> open`);
18976
+ var _tmpl$450 = /* @__PURE__ */ template(`<span class="app-admin-badge app-admin-badge--neutral"> all time`);
18977
+ var _tmpl$545 = /* @__PURE__ */ template(`<span class=app-admin-text-muted style=font-size:0.75rem>Longest wait `);
18857
18978
  var _tmpl$640 = /* @__PURE__ */ template(`<button type=button>`);
18858
18979
  var STATUS_FILTERS3 = [{
18859
18980
  value: "all",
@@ -18995,7 +19116,7 @@ function Support(props = {}) {
18995
19116
  return formatWaiting(oldest.lastMessageAt);
18996
19117
  };
18997
19118
  return (() => {
18998
- var _el$ = _tmpl$299(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling, _el$4 = _el$3.nextSibling, _el$5 = _el$4.nextSibling;
19119
+ var _el$ = _tmpl$300(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling, _el$4 = _el$3.nextSibling, _el$5 = _el$4.nextSibling;
18999
19120
  insert(_el$, createComponent(PageTitle, {
19000
19121
  subtitle: "Customer messages from the member portal",
19001
19122
  children: "Support"
@@ -19009,11 +19130,11 @@ function Support(props = {}) {
19009
19130
  insert(_el$6, () => s().unread, _el$7);
19010
19131
  return _el$6;
19011
19132
  })(), (() => {
19012
- var _el$8 = _tmpl$359(), _el$9 = _el$8.firstChild;
19133
+ var _el$8 = _tmpl$360(), _el$9 = _el$8.firstChild;
19013
19134
  insert(_el$8, () => s().open, _el$9);
19014
19135
  return _el$8;
19015
19136
  })(), (() => {
19016
- var _el$0 = _tmpl$449(), _el$1 = _el$0.firstChild;
19137
+ var _el$0 = _tmpl$450(), _el$1 = _el$0.firstChild;
19017
19138
  insert(_el$0, () => s().total, _el$1);
19018
19139
  return _el$0;
19019
19140
  })()]
@@ -19023,7 +19144,7 @@ function Support(props = {}) {
19023
19144
  return longestWait();
19024
19145
  },
19025
19146
  children: (w) => (() => {
19026
- var _el$10 = _tmpl$544(); _el$10.firstChild;
19147
+ var _el$10 = _tmpl$545(); _el$10.firstChild;
19027
19148
  insert(_el$10, w, null);
19028
19149
  return _el$10;
19029
19150
  })()
@@ -19093,10 +19214,10 @@ function Support(props = {}) {
19093
19214
  })();
19094
19215
  }
19095
19216
  delegateEvents(["click"]);
19096
- var _tmpl$300 = /* @__PURE__ */ template(`<div class=app-admin-card style=overflow:hidden><table class=app-admin-table><thead><tr><th>Date</th><th>Provider</th><th>Event Type</th><th>Status</th><th style=width:2.5rem></th></tr></thead><tbody>`);
19217
+ var _tmpl$301 = /* @__PURE__ */ template(`<div class=app-admin-card style=overflow:hidden><table class=app-admin-table><thead><tr><th>Date</th><th>Provider</th><th>Event Type</th><th>Status</th><th style=width:2.5rem></th></tr></thead><tbody>`);
19097
19218
  var _tmpl$2101 = /* @__PURE__ */ template(`<div>`);
19098
- var _tmpl$360 = /* @__PURE__ */ template(`<tr class=is-clickable><td data-label=Date class=app-admin-text-muted></td><td data-label=Provider style=font-weight:500></td><td data-label="Event type"class="app-admin-text-mono app-admin-text-muted"style=font-size:0.75rem></td><td data-label=Status></td><td class=app-admin-text-muted style=font-size:0.75rem><span style="display:inline-block;transition:transform 0.15s">\u25B6`);
19099
- var _tmpl$450 = /* @__PURE__ */ template(`<tr><td colspan=5><pre class="app-admin-text-mono app-admin-text-muted"style=font-size:0.75rem;background:var(--app-admin-surface-light);border-radius:var(--app-admin-radius-sm);padding:1rem;overflow-x:auto;white-space:pre-wrap;word-break:break-all;margin:0>`);
19219
+ var _tmpl$361 = /* @__PURE__ */ template(`<tr class=is-clickable><td data-label=Date class=app-admin-text-muted></td><td data-label=Provider style=font-weight:500></td><td data-label="Event type"class="app-admin-text-mono app-admin-text-muted"style=font-size:0.75rem></td><td data-label=Status></td><td class=app-admin-text-muted style=font-size:0.75rem><span style="display:inline-block;transition:transform 0.15s">\u25B6`);
19220
+ var _tmpl$451 = /* @__PURE__ */ template(`<tr><td colspan=5><pre class="app-admin-text-mono app-admin-text-muted"style=font-size:0.75rem;background:var(--app-admin-surface-light);border-radius:var(--app-admin-radius-sm);padding:1rem;overflow-x:auto;white-space:pre-wrap;word-break:break-all;margin:0>`);
19100
19221
  function Webhooks() {
19101
19222
  const [expanded, setExpanded] = createSignal(null);
19102
19223
  const [webhooks] = createResource(async () => {
@@ -19125,13 +19246,13 @@ function Webhooks() {
19125
19246
  return createComponent(LoadingSpinner, {});
19126
19247
  },
19127
19248
  get children() {
19128
- var _el$2 = _tmpl$300(), _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$5 = _el$4.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling, _el$8 = _el$7.nextSibling, _el$9 = _el$8.nextSibling; _el$9.nextSibling; var _el$1 = _el$4.nextSibling;
19249
+ var _el$2 = _tmpl$301(), _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$5 = _el$4.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling, _el$8 = _el$7.nextSibling, _el$9 = _el$8.nextSibling; _el$9.nextSibling; var _el$1 = _el$4.nextSibling;
19129
19250
  insert(_el$1, createComponent(For, {
19130
19251
  get each() {
19131
19252
  return webhooks() ?? [];
19132
19253
  },
19133
19254
  children: (event) => [(() => {
19134
- var _el$10 = _tmpl$360(), _el$11 = _el$10.firstChild, _el$12 = _el$11.nextSibling, _el$13 = _el$12.nextSibling, _el$14 = _el$13.nextSibling, _el$15 = _el$14.nextSibling, _el$16 = _el$15.firstChild;
19255
+ var _el$10 = _tmpl$361(), _el$11 = _el$10.firstChild, _el$12 = _el$11.nextSibling, _el$13 = _el$12.nextSibling, _el$14 = _el$13.nextSibling, _el$15 = _el$14.nextSibling, _el$16 = _el$15.firstChild;
19135
19256
  _el$10.$$click = () => toggleExpand(String(event.id));
19136
19257
  insert(_el$11, () => event.date);
19137
19258
  insert(_el$12, () => event.provider || "Authorize.Net");
@@ -19148,7 +19269,7 @@ function Webhooks() {
19148
19269
  return expanded() === String(event.id);
19149
19270
  },
19150
19271
  get children() {
19151
- var _el$17 = _tmpl$450(), _el$18 = _el$17.firstChild, _el$19 = _el$18.firstChild;
19272
+ var _el$17 = _tmpl$451(), _el$18 = _el$17.firstChild, _el$19 = _el$18.firstChild;
19152
19273
  insert(_el$19, (() => {
19153
19274
  var _c$ = memo(() => typeof event.payload === "string");
19154
19275
  return () => _c$() ? (() => {
@@ -19376,11 +19497,11 @@ function buildEmailBodyExtensions(lookup) {
19376
19497
  }
19377
19498
 
19378
19499
  // src/pages/admin/EmailBodyEditor.tsx
19379
- var _tmpl$301 = /* @__PURE__ */ template(`<button type=button>`);
19500
+ var _tmpl$306 = /* @__PURE__ */ template(`<button type=button>`);
19380
19501
  var _tmpl$2102 = /* @__PURE__ */ template(`<strong>B`);
19381
- var _tmpl$361 = /* @__PURE__ */ template(`<em>I`);
19382
- var _tmpl$451 = /* @__PURE__ */ template(`<u>U`);
19383
- var _tmpl$545 = /* @__PURE__ */ template(`<div class=app-admin-email-menu role=menu aria-label=Placeholders>`);
19502
+ var _tmpl$365 = /* @__PURE__ */ template(`<em>I`);
19503
+ var _tmpl$454 = /* @__PURE__ */ template(`<u>U`);
19504
+ var _tmpl$546 = /* @__PURE__ */ template(`<div class=app-admin-email-menu role=menu aria-label=Placeholders>`);
19384
19505
  var _tmpl$641 = /* @__PURE__ */ template(`<div class=app-admin-email-editor><div class=app-admin-email-toolbar role=toolbar aria-label=Formatting><span class=app-admin-email-tool-sep aria-hidden=true></span><span class=app-admin-email-tool-sep aria-hidden=true></span><span class=app-admin-email-tool-sep aria-hidden=true></span><div class=app-admin-email-menu-wrap><button type=button class=app-admin-email-tool aria-haspopup=menu>Insert placeholder &#9662;</button></div></div><div class=app-admin-email-canvas><div class=app-admin-email-page>`);
19385
19506
  var _tmpl$737 = /* @__PURE__ */ template(`<button type=button role=menuitem class=app-admin-email-menu-item><span class=app-admin-email-menu-token></span><span class=app-admin-email-menu-desc>`);
19386
19507
  var _tmpl$832 = /* @__PURE__ */ template(`<label class=app-admin-email-dialog-field><span></span><input type=text class=app-admin-input>`);
@@ -19641,7 +19762,7 @@ function EmailBodyEditor(props) {
19641
19762
  moveFocus(items, document.activeElement, e.key === "ArrowRight" ? 1 : -1);
19642
19763
  };
19643
19764
  const ToolButton = (p) => (() => {
19644
- var _el$ = _tmpl$301();
19765
+ var _el$ = _tmpl$306();
19645
19766
  addEventListener(_el$, "click", p.onClick, true);
19646
19767
  _el$.$$mousedown = (e) => e.preventDefault();
19647
19768
  insert(_el$, () => p.children);
@@ -19676,7 +19797,7 @@ function EmailBodyEditor(props) {
19676
19797
  pressed: () => isActive("italic"),
19677
19798
  onClick: () => run((ed) => ed.chain().focus().toggleItalic().run()),
19678
19799
  get children() {
19679
- return _tmpl$361();
19800
+ return _tmpl$365();
19680
19801
  }
19681
19802
  }), _el$7);
19682
19803
  insert(_el$3, createComponent(ToolButton, {
@@ -19684,7 +19805,7 @@ function EmailBodyEditor(props) {
19684
19805
  pressed: () => isActive("underline"),
19685
19806
  onClick: () => run((ed) => ed.chain().focus().toggleUnderline().run()),
19686
19807
  get children() {
19687
- return _tmpl$451();
19808
+ return _tmpl$454();
19688
19809
  }
19689
19810
  }), _el$7);
19690
19811
  insert(_el$3, createComponent(ToolButton, {
@@ -19730,7 +19851,7 @@ function EmailBodyEditor(props) {
19730
19851
  return menuOpen();
19731
19852
  },
19732
19853
  get children() {
19733
- var _el$10 = _tmpl$545();
19854
+ var _el$10 = _tmpl$546();
19734
19855
  _el$10.$$keydown = onMenuKeyDown;
19735
19856
  var _ref$2 = menuEl;
19736
19857
  typeof _ref$2 === "function" ? use(_ref$2, _el$10) : menuEl = _el$10;
@@ -19865,11 +19986,11 @@ function EmailBodyEditor(props) {
19865
19986
  delegateEvents(["mousedown", "click", "keydown", "input"]);
19866
19987
 
19867
19988
  // src/pages/admin/EmailTextEditor.tsx
19868
- var _tmpl$306 = /* @__PURE__ */ template(`<p style="font-size:0.75rem;color:var(--app-admin-fg-muted);margin:0.5rem 0 0">`);
19989
+ var _tmpl$307 = /* @__PURE__ */ template(`<p style="font-size:0.75rem;color:var(--app-admin-fg-muted);margin:0.5rem 0 0">`);
19869
19990
  var _tmpl$2103 = /* @__PURE__ */ template(`<div style="padding:0.75rem 0.875rem;background:var(--app-admin-info-bg);border:1px solid var(--app-admin-border);border-radius:var(--app-admin-radius-sm)"><p style=font-size:0.75rem;font-weight:600;margin-bottom:0.5rem>Placeholders<span style=font-weight:400;color:var(--app-admin-fg-muted)> &mdash; replaced with the real value when the email is sent. Click the subject or the body, then a placeholder to insert it.</span></p><div style=display:flex;flex-wrap:wrap;gap:0.375rem>`);
19870
- var _tmpl$365 = /* @__PURE__ */ template(`<p class=app-admin-field-error role=alert>This email is too long to save (<!> of <!> characters, formatting included). Shorten it.`);
19871
- var _tmpl$454 = /* @__PURE__ */ template(`<div style=display:flex;flex-direction:column;gap:1.25rem><div><label class=app-admin-label>Subject</label><input type=text aria-label=Subject class=app-admin-input><p style=font-size:0.75rem;color:var(--app-admin-fg-subtle);margin-top:0.25rem>/</p></div><div><span class=app-admin-label>Body`);
19872
- var _tmpl$546 = /* @__PURE__ */ template(`<button type=button class=app-admin-email-token-btn>`);
19991
+ var _tmpl$366 = /* @__PURE__ */ template(`<p class=app-admin-field-error role=alert>This email is too long to save (<!> of <!> characters, formatting included). Shorten it.`);
19992
+ var _tmpl$455 = /* @__PURE__ */ template(`<div style=display:flex;flex-direction:column;gap:1.25rem><div><label class=app-admin-label>Subject</label><input type=text aria-label=Subject class=app-admin-input><p style=font-size:0.75rem;color:var(--app-admin-fg-subtle);margin-top:0.25rem>/</p></div><div><span class=app-admin-label>Body`);
19993
+ var _tmpl$547 = /* @__PURE__ */ template(`<button type=button class=app-admin-email-token-btn>`);
19873
19994
  var TEMPLATE_LIMITS = {
19874
19995
  subject: 200,
19875
19996
  body: 2e4
@@ -19901,7 +20022,7 @@ function TemplateTextEditor(props) {
19901
20022
  };
19902
20023
  const bodyTooLong = () => props.value.body.length > TEMPLATE_LIMITS.body;
19903
20024
  return (() => {
19904
- var _el$ = _tmpl$454(), _el$8 = _el$.firstChild, _el$9 = _el$8.firstChild, _el$0 = _el$9.nextSibling, _el$1 = _el$0.nextSibling, _el$10 = _el$1.firstChild, _el$11 = _el$8.nextSibling; _el$11.firstChild;
20025
+ var _el$ = _tmpl$455(), _el$8 = _el$.firstChild, _el$9 = _el$8.firstChild, _el$0 = _el$9.nextSibling, _el$1 = _el$0.nextSibling, _el$10 = _el$1.firstChild, _el$11 = _el$8.nextSibling; _el$11.firstChild;
19905
20026
  insert(_el$, createComponent(Show, {
19906
20027
  get when() {
19907
20028
  return props.placeholders.length > 0;
@@ -19915,7 +20036,7 @@ function TemplateTextEditor(props) {
19915
20036
  children: (p) => {
19916
20037
  const blocked = () => target() === "subject" && !fitsSubject(p);
19917
20038
  return (() => {
19918
- var _el$20 = _tmpl$546();
20039
+ var _el$20 = _tmpl$547();
19919
20040
  _el$20.$$click = () => insertToken(p);
19920
20041
  _el$20.$$mousedown = (e) => e.preventDefault();
19921
20042
  insert(_el$20, () => p.token);
@@ -19939,7 +20060,7 @@ function TemplateTextEditor(props) {
19939
20060
  return props.note;
19940
20061
  },
19941
20062
  get children() {
19942
- var _el$7 = _tmpl$306();
20063
+ var _el$7 = _tmpl$307();
19943
20064
  insert(_el$7, () => props.note);
19944
20065
  return _el$7;
19945
20066
  }
@@ -19975,7 +20096,7 @@ function TemplateTextEditor(props) {
19975
20096
  return bodyTooLong();
19976
20097
  },
19977
20098
  get children() {
19978
- var _el$13 = _tmpl$365(), _el$14 = _el$13.firstChild, _el$18 = _el$14.nextSibling, _el$15 = _el$18.nextSibling, _el$19 = _el$15.nextSibling; _el$19.nextSibling;
20099
+ var _el$13 = _tmpl$366(), _el$14 = _el$13.firstChild, _el$18 = _el$14.nextSibling, _el$15 = _el$18.nextSibling, _el$19 = _el$15.nextSibling; _el$19.nextSibling;
19979
20100
  insert(_el$13, () => props.value.body.length.toLocaleString(), _el$18);
19980
20101
  insert(_el$13, () => TEMPLATE_LIMITS.body.toLocaleString(), _el$19);
19981
20102
  return _el$13;
@@ -19989,11 +20110,11 @@ function TemplateTextEditor(props) {
19989
20110
  delegateEvents(["input", "mousedown", "click"]);
19990
20111
 
19991
20112
  // src/pages/admin/EmailTemplates.tsx
19992
- var _tmpl$307 = /* @__PURE__ */ template(`<button type=button style="display:block;width:100%;text-align:left;padding:0.5rem 0.75rem;font-size:0.8rem;font-weight:500;border:none;border-radius:var(--app-admin-radius-sm);cursor:pointer;transition:color 0.15s, background 0.15s">`);
20113
+ var _tmpl$308 = /* @__PURE__ */ template(`<button type=button style="display:block;width:100%;text-align:left;padding:0.5rem 0.75rem;font-size:0.8rem;font-weight:500;border:none;border-radius:var(--app-admin-radius-sm);cursor:pointer;transition:color 0.15s, background 0.15s">`);
19993
20114
  var _tmpl$2104 = /* @__PURE__ */ template(`<button type=button style="display:flex;align-items:center;justify-content:space-between;width:100%;text-align:left;padding:0.4rem 0.5rem;font-size:0.7rem;font-weight:700;letter-spacing:0.03em;text-transform:uppercase;border:none;background:transparent;color:var(--app-admin-fg-subtle);cursor:pointer"><span></span><span style=font-size:0.65rem>`);
19994
- var _tmpl$366 = /* @__PURE__ */ template(`<div style=display:flex;gap:1.5rem;align-items:flex-start><div class=app-admin-card style=min-width:14rem;max-width:14rem;padding:0.5rem;flex-shrink:0;max-height:70vh;overflow-y:auto;position:sticky;top:1rem><div style=margin-bottom:0.25rem>`);
19995
- var _tmpl$455 = /* @__PURE__ */ template(`<div>`);
19996
- var _tmpl$547 = /* @__PURE__ */ template(`<div class=app-admin-empty>No email templates configured.`);
20115
+ var _tmpl$367 = /* @__PURE__ */ template(`<div style=display:flex;gap:1.5rem;align-items:flex-start><div class=app-admin-card style=min-width:14rem;max-width:14rem;padding:0.5rem;flex-shrink:0;max-height:70vh;overflow-y:auto;position:sticky;top:1rem><div style=margin-bottom:0.25rem>`);
20116
+ var _tmpl$456 = /* @__PURE__ */ template(`<div>`);
20117
+ var _tmpl$548 = /* @__PURE__ */ template(`<div class=app-admin-empty>No email templates configured.`);
19997
20118
  var _tmpl$643 = /* @__PURE__ */ template(`<div style=margin-bottom:0.25rem>`);
19998
20119
  var _tmpl$738 = /* @__PURE__ */ template(`<div class=app-admin-card style=padding:1.25rem;flex:1;min-width:0><div style=display:flex;flex-direction:column;gap:1.25rem><div style="display:flex;flex-wrap:wrap;gap:0.75rem;padding-top:1rem;border-top:1px solid var(--app-admin-border)"><button type=button class="app-admin-btn app-admin-btn-primary"></button><button type=button class="app-admin-btn app-admin-btn-ghost"></button><button type=button class="app-admin-btn app-admin-btn-ghost">`);
19999
20120
  var _tmpl$833 = /* @__PURE__ */ template(`<p style=font-size:0.75rem;color:var(--app-admin-fg-muted);margin-top:0.25rem>Used by: `);
@@ -20323,7 +20444,7 @@ function EmailTemplates(props = {}) {
20323
20444
  }
20324
20445
  };
20325
20446
  const navButton = (opts) => (() => {
20326
- var _el$ = _tmpl$307();
20447
+ var _el$ = _tmpl$308();
20327
20448
  addEventListener(_el$, "click", opts.onClick, true);
20328
20449
  insert(_el$, () => opts.label);
20329
20450
  effect((_p$) => {
@@ -20345,7 +20466,7 @@ function EmailTemplates(props = {}) {
20345
20466
  return _el$2;
20346
20467
  })();
20347
20468
  return (() => {
20348
- var _el$5 = _tmpl$455();
20469
+ var _el$5 = _tmpl$456();
20349
20470
  insert(_el$5, createComponent(PageTitle, {
20350
20471
  subtitle: "Customize the transactional emails sent to your customers, and write the ones your sequences send.",
20351
20472
  children: "Email Templates"
@@ -20363,10 +20484,10 @@ function EmailTemplates(props = {}) {
20363
20484
  return templateKeys().length > 0;
20364
20485
  },
20365
20486
  get fallback() {
20366
- return _tmpl$547();
20487
+ return _tmpl$548();
20367
20488
  },
20368
20489
  get children() {
20369
- var _el$6 = _tmpl$366(), _el$7 = _el$6.firstChild, _el$8 = _el$7.firstChild;
20490
+ var _el$6 = _tmpl$367(), _el$7 = _el$6.firstChild, _el$8 = _el$7.firstChild;
20370
20491
  insert(_el$7, createComponent(For, {
20371
20492
  get each() {
20372
20493
  return categorizedKeys();
@@ -20528,11 +20649,11 @@ function EmailTemplates(props = {}) {
20528
20649
  })();
20529
20650
  }
20530
20651
  delegateEvents(["click", "input"]);
20531
- var _tmpl$308 = /* @__PURE__ */ template(`<p class=app-admin-text-muted style="font-size:0.75rem;margin:0;padding:0.625rem 1.25rem 0">Nothing here has been emailed, and nothing will be until you send it or turn automatic sending on.`);
20652
+ var _tmpl$309 = /* @__PURE__ */ template(`<p class=app-admin-text-muted style="font-size:0.75rem;margin:0;padding:0.625rem 1.25rem 0">Nothing here has been emailed, and nothing will be until you send it or turn automatic sending on.`);
20532
20653
  var _tmpl$2105 = /* @__PURE__ */ template(`<table class=app-admin-table><thead><tr><th>Person</th><th>Came from</th><th>Waiting</th><th>Step</th><th></th></tr></thead><tbody>`);
20533
- var _tmpl$367 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-primary app-admin-btn-sm">Send all due`);
20534
- var _tmpl$456 = /* @__PURE__ */ template(`<button type=button class=app-admin-link-btn style=font-size:inherit>`);
20535
- var _tmpl$548 = /* @__PURE__ */ template(`<tr><td data-label=Person></td><td data-label="Came from"></td><td data-label=Waiting></td><td data-label=Step> of </td><td class=app-admin-table-cell--end><div style=display:flex;gap:0.375rem;justify-content:flex-end><button type=button class="app-admin-btn app-admin-btn-primary app-admin-btn-sm"></button><button type=button class="app-admin-btn app-admin-btn-ghost app-admin-btn-sm"title="Move past this step without emailing. They stay in the sequence for the next one.">Skip`);
20654
+ var _tmpl$368 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-primary app-admin-btn-sm">Send all due`);
20655
+ var _tmpl$457 = /* @__PURE__ */ template(`<button type=button class=app-admin-link-btn style=font-size:inherit>`);
20656
+ var _tmpl$549 = /* @__PURE__ */ template(`<tr><td data-label=Person></td><td data-label="Came from"></td><td data-label=Waiting></td><td data-label=Step> of </td><td class=app-admin-table-cell--end><div style=display:flex;gap:0.375rem;justify-content:flex-end><button type=button class="app-admin-btn app-admin-btn-primary app-admin-btn-sm"></button><button type=button class="app-admin-btn app-admin-btn-ghost app-admin-btn-sm"title="Move past this step without emailing. They stay in the sequence for the next one.">Skip`);
20536
20657
  var _tmpl$644 = /* @__PURE__ */ template(`<span class=app-admin-text-muted style=font-size:0.75rem>No sequences yet \u2014 create one in the Sequences tab.`);
20537
20658
  var _tmpl$739 = /* @__PURE__ */ template(`<div style=display:flex;gap:0.5rem;align-items:center;flex-wrap:wrap><select class=app-admin-input aria-label=Sequence style=width:auto><option value>Add to sequence\u2026</option></select><button type=button class="app-admin-btn app-admin-btn-primary app-admin-btn-sm">`);
20538
20659
  var _tmpl$834 = /* @__PURE__ */ template(`<option>`);
@@ -20556,16 +20677,16 @@ var _tmpl$2312 = /* @__PURE__ */ template(`<div><nav role=tablist aria-label="Se
20556
20677
  var _tmpl$2412 = /* @__PURE__ */ template(`<span style=text-transform:none>`);
20557
20678
  var _tmpl$2512 = /* @__PURE__ */ template(`<span class="app-admin-badge app-admin-badge--neutral"style=text-transform:none>`);
20558
20679
  var _tmpl$2612 = /* @__PURE__ */ template(`<span class="app-admin-badge app-admin-badge--neutral"style=text-transform:none> in it`);
20559
- var _tmpl$2710 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-ghost app-admin-btn-sm">Archive`);
20680
+ var _tmpl$2711 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-ghost app-admin-btn-sm">Archive`);
20560
20681
  var _tmpl$2810 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-primary">`);
20561
20682
  var _tmpl$2910 = /* @__PURE__ */ template(`<span style=margin-left:0.375rem;opacity:0.7>`);
20562
- var _tmpl$309 = /* @__PURE__ */ template(`<button type=button role=tab style="padding:0.625rem 1rem;margin-bottom:-1px;font-size:0.8125rem;font-weight:600;text-transform:uppercase;letter-spacing:0.05em;border-bottom:2px solid;background:none;border-top:none;border-left:none;border-right:none;cursor:pointer">`);
20683
+ var _tmpl$3010 = /* @__PURE__ */ template(`<button type=button role=tab style="padding:0.625rem 1rem;margin-bottom:-1px;font-size:0.8125rem;font-weight:600;text-transform:uppercase;letter-spacing:0.05em;border-bottom:2px solid;background:none;border-top:none;border-left:none;border-right:none;cursor:pointer">`);
20563
20684
  var _tmpl$3113 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-sm">Add step`);
20564
20685
  var _tmpl$3212 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-sm">Open Email \u203A Templates`);
20565
20686
  var _tmpl$3312 = /* @__PURE__ */ template(`<div style="padding:1rem 1.25rem;display:flex;gap:0.75rem;align-items:center;flex-wrap:wrap"><span class=app-admin-text-muted style=font-size:0.8125rem>A step sends a marketing template. Create one under Email \u203A Templates first.`);
20566
20687
  var _tmpl$3412 = /* @__PURE__ */ template(`<tr><td data-label=Person><div class=app-admin-text-muted style=font-size:0.75rem> \xB7 </div></td><td data-label="Came from"></td><td data-label=Step> of </td><td data-label="Next due"class=app-admin-text-muted></td><td class=app-admin-table-cell--end><button type=button class="app-admin-btn app-admin-btn-ghost app-admin-btn-sm">Remove`);
20567
20688
  var _tmpl$3510 = /* @__PURE__ */ template(`<div><div style=font-size:0.75rem;margin-bottom:0.25rem></div><div style=display:grid;gap:0.25rem>`);
20568
- var _tmpl$368 = /* @__PURE__ */ template(`<label style=font-size:0.8125rem;display:flex;gap:0.375rem;align-items:center><input type=checkbox>`);
20689
+ var _tmpl$369 = /* @__PURE__ */ template(`<label style=font-size:0.8125rem;display:flex;gap:0.375rem;align-items:center><input type=checkbox>`);
20569
20690
  var _tmpl$374 = /* @__PURE__ */ template(`<option> \u2014 <!> off`);
20570
20691
  var _tmpl$384 = /* @__PURE__ */ template(`<div>`);
20571
20692
  var _tmpl$394 = /* @__PURE__ */ template(`<table class=app-admin-table><thead><tr><th>Name</th><th>Steps</th><th>Fed by</th><th>Sending</th><th>In it</th><th>Due now</th><th>Sent</th><th>Bought</th><th>Unsubscribed</th></tr></thead><tbody>`);
@@ -20574,7 +20695,7 @@ var _tmpl$4112 = /* @__PURE__ */ template(`<div class=app-admin-text-muted style
20574
20695
  var _tmpl$4212 = /* @__PURE__ */ template(`<tr><td data-label=Name><button type=button class=app-admin-link-btn style=font-size:inherit;font-weight:600></button></td><td data-label=Steps></td><td data-label="Fed by"></td><td data-label=Sending></td><td data-label="In it"></td><td data-label="Due now"></td><td data-label=Sent></td><td data-label=Bought></td><td data-label=Unsubscribed>`);
20575
20696
  var _tmpl$4312 = /* @__PURE__ */ template(`<span class=app-admin-text-muted>by hand`);
20576
20697
  var _tmpl$4410 = /* @__PURE__ */ template(`<strong>`);
20577
- var _tmpl$457 = /* @__PURE__ */ template(`<span class=app-admin-text-muted>0`);
20698
+ var _tmpl$458 = /* @__PURE__ */ template(`<span class=app-admin-text-muted>0`);
20578
20699
  var FALLBACK_LINKS = ["members", "resume_survey", "home", "none"];
20579
20700
  var EMPTY_STEP = {
20580
20701
  waitHours: 24,
@@ -20661,7 +20782,7 @@ function SequenceQueue(props) {
20661
20782
  return rows().length > 0;
20662
20783
  },
20663
20784
  get children() {
20664
- var _el$5 = _tmpl$367();
20785
+ var _el$5 = _tmpl$368();
20665
20786
  _el$5.$$click = () => void sendAll();
20666
20787
  effect(() => _el$5.disabled = busy() === "all");
20667
20788
  return _el$5;
@@ -20674,7 +20795,7 @@ function SequenceQueue(props) {
20674
20795
  return !props.sequence.autoSend;
20675
20796
  },
20676
20797
  get children() {
20677
- return _tmpl$308();
20798
+ return _tmpl$309();
20678
20799
  }
20679
20800
  }), createComponent(Show, {
20680
20801
  get when() {
@@ -20702,7 +20823,7 @@ function SequenceQueue(props) {
20702
20823
  return rows();
20703
20824
  },
20704
20825
  children: (row) => (() => {
20705
- var _el$6 = _tmpl$548(), _el$7 = _el$6.firstChild, _el$9 = _el$7.nextSibling, _el$0 = _el$9.nextSibling, _el$1 = _el$0.nextSibling, _el$10 = _el$1.firstChild, _el$11 = _el$1.nextSibling, _el$12 = _el$11.firstChild, _el$13 = _el$12.firstChild, _el$14 = _el$13.nextSibling;
20826
+ var _el$6 = _tmpl$549(), _el$7 = _el$6.firstChild, _el$9 = _el$7.nextSibling, _el$0 = _el$9.nextSibling, _el$1 = _el$0.nextSibling, _el$10 = _el$1.firstChild, _el$11 = _el$1.nextSibling, _el$12 = _el$11.firstChild, _el$13 = _el$12.firstChild, _el$14 = _el$13.nextSibling;
20706
20827
  insert(_el$7, createComponent(Show, {
20707
20828
  get when() {
20708
20829
  return row.userId && nav;
@@ -20711,7 +20832,7 @@ function SequenceQueue(props) {
20711
20832
  return row.email;
20712
20833
  },
20713
20834
  get children() {
20714
- var _el$8 = _tmpl$456();
20835
+ var _el$8 = _tmpl$457();
20715
20836
  _el$8.$$click = () => nav.openCustomer(row.userId);
20716
20837
  insert(_el$8, () => row.email);
20717
20838
  return _el$8;
@@ -21083,7 +21204,7 @@ function SequenceEditor(props) {
21083
21204
  return !isNew();
21084
21205
  },
21085
21206
  get children() {
21086
- var _el$88 = _tmpl$2710();
21207
+ var _el$88 = _tmpl$2711();
21087
21208
  _el$88.$$click = () => void archive();
21088
21209
  return _el$88;
21089
21210
  }
@@ -21118,7 +21239,7 @@ function SequenceEditor(props) {
21118
21239
  return tabKeys();
21119
21240
  },
21120
21241
  children: (key) => (() => {
21121
- var _el$90 = _tmpl$309();
21242
+ var _el$90 = _tmpl$3010();
21122
21243
  _el$90.$$click = () => setTab(key);
21123
21244
  insert(_el$90, () => TAB_LABEL[key], null);
21124
21245
  insert(_el$90, createComponent(Show, {
@@ -21287,7 +21408,7 @@ function SequenceEditor(props) {
21287
21408
  return e.email;
21288
21409
  },
21289
21410
  get children() {
21290
- var _el$98 = _tmpl$456();
21411
+ var _el$98 = _tmpl$457();
21291
21412
  _el$98.$$click = () => nav.openCustomer(e.userId);
21292
21413
  insert(_el$98, () => e.email);
21293
21414
  return _el$98;
@@ -21375,7 +21496,7 @@ function SequenceEditor(props) {
21375
21496
  return SEGMENT_KEYS[g];
21376
21497
  },
21377
21498
  children: (key) => (() => {
21378
- var _el$110 = _tmpl$368(), _el$111 = _el$110.firstChild;
21499
+ var _el$110 = _tmpl$369(), _el$111 = _el$110.firstChild;
21379
21500
  _el$111.addEventListener("change", () => toggleSegment(key));
21380
21501
  insert(_el$110, () => SEGMENT_LABEL[key], null);
21381
21502
  effect(() => _el$111.checked = draft().feedSegments.includes(key));
@@ -21625,7 +21746,7 @@ function Sequences() {
21625
21746
  var _el$137 = _tmpl$4410();
21626
21747
  insert(_el$137, () => dueFor(s.id));
21627
21748
  return _el$137;
21628
- })() : _tmpl$457();
21749
+ })() : _tmpl$458();
21629
21750
  })());
21630
21751
  insert(_el$133, () => s.stats.sent);
21631
21752
  insert(_el$134, () => s.stats.boughtAfterEnroll);
@@ -21668,11 +21789,11 @@ function Sequences() {
21668
21789
  delegateEvents(["click", "input"]);
21669
21790
 
21670
21791
  // src/pages/admin/Funnel.tsx
21671
- var _tmpl$369 = /* @__PURE__ */ template(`<p style="font-size:0.75rem;color:var(--app-admin-fg-muted);margin:0.25rem 0 0">`);
21792
+ var _tmpl$370 = /* @__PURE__ */ template(`<p style="font-size:0.75rem;color:var(--app-admin-fg-muted);margin:0.25rem 0 0">`);
21672
21793
  var _tmpl$2106 = /* @__PURE__ */ template(`<div style="padding:1rem 1.25rem;border-bottom:1px solid var(--app-admin-border-soft)"><h2 class=app-admin-heading style=font-size:0.9375rem;font-weight:600;margin:0>`);
21673
- var _tmpl$370 = /* @__PURE__ */ template(`<label style=font-size:0.8125rem;display:flex;gap:0.375rem;align-items:center;margin-top:0.25rem><input type=checkbox>Savings program only (<!>)`);
21674
- var _tmpl$458 = /* @__PURE__ */ template(`<th>Account`);
21675
- var _tmpl$549 = /* @__PURE__ */ template(`<p class=app-admin-text-muted style="font-size:0.75rem;padding:0.625rem 1.25rem;margin:0">Showing the 50 most recent of <!>.`);
21794
+ var _tmpl$371 = /* @__PURE__ */ template(`<label style=font-size:0.8125rem;display:flex;gap:0.375rem;align-items:center;margin-top:0.25rem><input type=checkbox>Savings program only (<!>)`);
21795
+ var _tmpl$459 = /* @__PURE__ */ template(`<th>Account`);
21796
+ var _tmpl$550 = /* @__PURE__ */ template(`<p class=app-admin-text-muted style="font-size:0.75rem;padding:0.625rem 1.25rem;margin:0">Showing the 50 most recent of <!>.`);
21676
21797
  var _tmpl$645 = /* @__PURE__ */ template(`<div class=app-admin-card style=margin-top:1.25rem;overflow:hidden><div style="padding:1rem 1.25rem;display:grid;gap:0.5rem"></div><div style="padding:0.5rem 1.25rem 0.75rem;border-top:1px solid var(--app-admin-border-soft)"></div><table class=app-admin-table><thead><tr><th style=width:2rem><input type=checkbox aria-label="Select all"></th><th>Person</th><th>Where they stopped</th><th>Since</th></tr></thead><tbody>`);
21677
21798
  var _tmpl$740 = /* @__PURE__ */ template(`<span style=color:var(--app-admin-fg-subtle);margin-left:0.375rem> savings`);
21678
21799
  var _tmpl$835 = /* @__PURE__ */ template(`<button type=button style="display:grid;grid-template-columns:12rem 1fr 7rem;align-items:center;gap:0.75rem;background:none;border:none;padding:0.125rem 0;cursor:pointer;text-align:left;color:inherit;font:inherit"><span style=font-size:0.8125rem;color:var(--app-admin-fg-muted)></span><span style=display:block;background:var(--app-admin-border-soft);border-radius:4px;height:1.125rem><span style=display:block;height:100%;background:var(--app-admin-primary);border-radius:4px></span></span><span style=font-size:0.8125rem;text-align:right>`);
@@ -21696,7 +21817,7 @@ function CardHeader(props) {
21696
21817
  return props.note;
21697
21818
  },
21698
21819
  get children() {
21699
- var _el$3 = _tmpl$369();
21820
+ var _el$3 = _tmpl$370();
21700
21821
  insert(_el$3, () => props.note);
21701
21822
  return _el$3;
21702
21823
  }
@@ -21782,7 +21903,7 @@ function SegmentSection(props) {
21782
21903
  return hasSavings();
21783
21904
  },
21784
21905
  get children() {
21785
- var _el$6 = _tmpl$370(), _el$7 = _el$6.firstChild, _el$8 = _el$7.nextSibling, _el$0 = _el$8.nextSibling; _el$0.nextSibling;
21906
+ var _el$6 = _tmpl$371(), _el$7 = _el$6.firstChild, _el$8 = _el$7.nextSibling, _el$0 = _el$8.nextSibling; _el$0.nextSibling;
21786
21907
  _el$7.addEventListener("change", (e) => setSavingsOnly(e.currentTarget.checked));
21787
21908
  insert(_el$6, () => props.summary.savingsMembers, _el$0);
21788
21909
  effect(() => _el$7.checked = savingsOnly());
@@ -21808,7 +21929,7 @@ function SegmentSection(props) {
21808
21929
  return props.group === "b";
21809
21930
  },
21810
21931
  get children() {
21811
- return _tmpl$458();
21932
+ return _tmpl$459();
21812
21933
  }
21813
21934
  }), null);
21814
21935
  insert(_el$19, createComponent(Show, {
@@ -21922,7 +22043,7 @@ function SegmentSection(props) {
21922
22043
  return people()?.hasMore;
21923
22044
  },
21924
22045
  get children() {
21925
- var _el$20 = _tmpl$549(), _el$21 = _el$20.firstChild, _el$23 = _el$21.nextSibling; _el$23.nextSibling;
22046
+ var _el$20 = _tmpl$550(), _el$21 = _el$20.firstChild, _el$23 = _el$21.nextSibling; _el$23.nextSibling;
21926
22047
  insert(_el$20, () => people().total, _el$23);
21927
22048
  return _el$20;
21928
22049
  }
@@ -22026,11 +22147,11 @@ function Funnel() {
22026
22147
  })();
22027
22148
  }
22028
22149
  delegateEvents(["click"]);
22029
- var _tmpl$371 = /* @__PURE__ */ template(`<div>`);
22150
+ var _tmpl$375 = /* @__PURE__ */ template(`<div>`);
22030
22151
  var _tmpl$2107 = /* @__PURE__ */ template(`<div style=min-width:7.5rem><div style=font-size:0.75rem;text-transform:uppercase;letter-spacing:0.04em></div><div class=app-admin-heading style=font-size:1.375rem;font-weight:600;line-height:1.3>`);
22031
- var _tmpl$375 = /* @__PURE__ */ template(`<div style="display:flex;flex-wrap:wrap;gap:1.25rem 2rem;margin-bottom:1.25rem">`);
22032
- var _tmpl$459 = /* @__PURE__ */ template(`<table class=app-admin-table style=margin-bottom:1rem><thead><tr><th>Email</th><th>Sent</th><th>Link followed</th><th>Bought after this email</th><th>Unsubscribed after it</th></tr></thead><tbody>`);
22033
- var _tmpl$550 = /* @__PURE__ */ template(`<div> of the <!> bought before any email reached them, so no email is credited above.`);
22152
+ var _tmpl$376 = /* @__PURE__ */ template(`<div style="display:flex;flex-wrap:wrap;gap:1.25rem 2rem;margin-bottom:1.25rem">`);
22153
+ var _tmpl$460 = /* @__PURE__ */ template(`<table class=app-admin-table style=margin-bottom:1rem><thead><tr><th>Email</th><th>Sent</th><th>Link followed</th><th>Bought after this email</th><th>Unsubscribed after it</th></tr></thead><tbody>`);
22154
+ var _tmpl$551 = /* @__PURE__ */ template(`<div> of the <!> bought before any email reached them, so no email is credited above.`);
22034
22155
  var _tmpl$646 = /* @__PURE__ */ template(`<div>No longer in it: <!>.`);
22035
22156
  var _tmpl$741 = /* @__PURE__ */ template(`<div style=display:grid;gap:0.375rem>`);
22036
22157
  var _tmpl$836 = /* @__PURE__ */ template(`<h3 class=app-admin-heading style="font-size:0.875rem;font-weight:600;margin:1.25rem 0 0.5rem">Who bought`);
@@ -22074,7 +22195,7 @@ function Figure(props) {
22074
22195
  return props.note;
22075
22196
  },
22076
22197
  get children() {
22077
- var _el$4 = _tmpl$371();
22198
+ var _el$4 = _tmpl$375();
22078
22199
  insert(_el$4, () => props.note);
22079
22200
  effect((_$p) => style(_el$4, muted, _$p));
22080
22201
  return _el$4;
@@ -22120,7 +22241,7 @@ function SequenceCard(props) {
22120
22241
  },
22121
22242
  get children() {
22122
22243
  return [(() => {
22123
- var _el$5 = _tmpl$375();
22244
+ var _el$5 = _tmpl$376();
22124
22245
  insert(_el$5, createComponent(Figure, {
22125
22246
  label: "Enrolled",
22126
22247
  get value() {
@@ -22195,7 +22316,7 @@ function SequenceCard(props) {
22195
22316
  })();
22196
22317
  },
22197
22318
  get children() {
22198
- var _el$6 = _tmpl$459(), _el$7 = _el$6.firstChild, _el$8 = _el$7.nextSibling;
22319
+ var _el$6 = _tmpl$460(), _el$7 = _el$6.firstChild, _el$8 = _el$7.nextSibling;
22199
22320
  insert(_el$8, createComponent(For, {
22200
22321
  get each() {
22201
22322
  return r().steps;
@@ -22224,7 +22345,7 @@ function SequenceCard(props) {
22224
22345
  return beforeAnyEmail() > 0;
22225
22346
  },
22226
22347
  get children() {
22227
- var _el$0 = _tmpl$550(), _el$1 = _el$0.firstChild, _el$11 = _el$1.nextSibling; _el$11.nextSibling;
22348
+ var _el$0 = _tmpl$551(), _el$1 = _el$0.firstChild, _el$11 = _el$1.nextSibling; _el$11.nextSibling;
22228
22349
  insert(_el$0, beforeAnyEmail, _el$1);
22229
22350
  insert(_el$0, () => p().bought, _el$11);
22230
22351
  return _el$0;
@@ -22341,7 +22462,7 @@ function SequenceResults() {
22341
22462
  }] = createResource(() => apiFetch("/admin/funnel/report"));
22342
22463
  const days = () => report()?.sequences[0]?.attributionDays ?? 30;
22343
22464
  return (() => {
22344
- var _el$62 = _tmpl$371();
22465
+ var _el$62 = _tmpl$375();
22345
22466
  insert(_el$62, createComponent(PageTitle, {
22346
22467
  subtitle: "What each sequence has achieved. \u201CBought\u201D means bought after being enrolled; it does not show the email was the reason.",
22347
22468
  children: "Results"
@@ -22420,11 +22541,11 @@ delegateEvents(["click"]);
22420
22541
  var [supportChannelMode, setSupportChannelMode] = createSignal(null);
22421
22542
 
22422
22543
  // src/pages/admin/EmailNotifications.tsx
22423
- var _tmpl$376 = /* @__PURE__ */ template(`<p style="font-size:0.75rem;margin:0.25rem 0 0">`);
22544
+ var _tmpl$377 = /* @__PURE__ */ template(`<p style="font-size:0.75rem;margin:0.25rem 0 0">`);
22424
22545
  var _tmpl$2108 = /* @__PURE__ */ template(`<div class=app-admin-card style=margin-top:1.25rem><div style="padding:1rem 1.25rem;border-bottom:1px solid var(--app-admin-border-soft);display:flex;justify-content:space-between;align-items:center;gap:1rem"><div><h2 class=app-admin-heading style=font-size:0.9375rem;font-weight:600;margin:0></h2></div></div><div style="padding:1rem 1.25rem;display:grid;gap:0.875rem">`);
22425
- var _tmpl$377 = /* @__PURE__ */ template(`<label style=display:flex;align-items:center;gap:0.5rem;font-size:0.875rem;cursor:pointer><input type=checkbox>`);
22426
- var _tmpl$460 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-primary app-admin-btn-sm">`);
22427
- var _tmpl$551 = /* @__PURE__ */ template(`<div><div style=margin-bottom:0.375rem>Recipients</div><div style=display:flex;flex-wrap:wrap;gap:0.375rem;margin-bottom:0.5rem></div><div style=display:flex;gap:0.5rem;max-width:28rem><input type=email class=app-admin-input placeholder=admin@example.com aria-label="Add recipient"><button type=button class="app-admin-btn app-admin-btn-sm">Add`);
22546
+ var _tmpl$378 = /* @__PURE__ */ template(`<label style=display:flex;align-items:center;gap:0.5rem;font-size:0.875rem;cursor:pointer><input type=checkbox>`);
22547
+ var _tmpl$461 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-primary app-admin-btn-sm">`);
22548
+ var _tmpl$553 = /* @__PURE__ */ template(`<div><div style=margin-bottom:0.375rem>Recipients</div><div style=display:flex;flex-wrap:wrap;gap:0.375rem;margin-bottom:0.5rem></div><div style=display:flex;gap:0.5rem;max-width:28rem><input type=email class=app-admin-input placeholder=admin@example.com aria-label="Add recipient"><button type=button class="app-admin-btn app-admin-btn-sm">Add`);
22428
22549
  var _tmpl$647 = /* @__PURE__ */ template(`<div><div style=margin-bottom:0.375rem>Send a copy for</div><div style="display:grid;grid-template-columns:repeat(auto-fill, minmax(14rem, 1fr));gap:0.375rem 1rem">`);
22429
22550
  var _tmpl$742 = /* @__PURE__ */ template(`<span class=app-admin-text-muted style=font-size:0.8125rem>Nobody \u2014 admin copies go nowhere until someone is added.`);
22430
22551
  var _tmpl$837 = /* @__PURE__ */ template(`<span class="app-admin-badge app-admin-badge--neutral"style=text-transform:none;display:inline-flex;gap:0.375rem;align-items:center><button type=button style=background:none;border:none;cursor:pointer;color:inherit;padding:0;font-size:1rem;line-height:1>&times;`);
@@ -22452,7 +22573,7 @@ function Card(props) {
22452
22573
  return props.note;
22453
22574
  },
22454
22575
  get children() {
22455
- var _el$5 = _tmpl$376();
22576
+ var _el$5 = _tmpl$377();
22456
22577
  insert(_el$5, () => props.note);
22457
22578
  effect((_$p) => style(_el$5, {
22458
22579
  ...label2
@@ -22467,7 +22588,7 @@ function Card(props) {
22467
22588
  }
22468
22589
  function Toggle(props) {
22469
22590
  return (() => {
22470
- var _el$7 = _tmpl$377(), _el$8 = _el$7.firstChild;
22591
+ var _el$7 = _tmpl$378(), _el$8 = _el$7.firstChild;
22471
22592
  _el$8.addEventListener("change", (e) => props.onChange(e.currentTarget.checked));
22472
22593
  insert(_el$7, () => props.label, null);
22473
22594
  effect(() => _el$8.checked = props.checked);
@@ -22516,7 +22637,7 @@ function NotificationsCard() {
22516
22637
  note: "Who receives a copy when one of these emails goes to a customer. Clinical emails (new messages, prescription updates) are never copied.",
22517
22638
  get aside() {
22518
22639
  return (() => {
22519
- var _el$9 = _tmpl$460();
22640
+ var _el$9 = _tmpl$461();
22520
22641
  _el$9.$$click = () => void save();
22521
22642
  insert(_el$9, () => saving() ? "Saving\u2026" : "Save");
22522
22643
  effect(() => _el$9.disabled = !dirty() || saving());
@@ -22532,7 +22653,7 @@ function NotificationsCard() {
22532
22653
  return createComponent(LoadingSpinner, {});
22533
22654
  },
22534
22655
  children: (s) => [(() => {
22535
- var _el$0 = _tmpl$551(), _el$1 = _el$0.firstChild, _el$10 = _el$1.nextSibling, _el$11 = _el$10.nextSibling, _el$12 = _el$11.firstChild, _el$13 = _el$12.nextSibling;
22656
+ var _el$0 = _tmpl$553(), _el$1 = _el$0.firstChild, _el$10 = _el$1.nextSibling, _el$11 = _el$10.nextSibling, _el$12 = _el$11.firstChild, _el$13 = _el$12.nextSibling;
22536
22657
  insert(_el$10, createComponent(For, {
22537
22658
  get each() {
22538
22659
  return s().recipientEmails;
@@ -22637,7 +22758,7 @@ function BillingRemindersCard() {
22637
22758
  note: "Automated emails about upcoming renewals, expiring cards and past-due subscriptions. Each one's copy is under Templates.",
22638
22759
  get aside() {
22639
22760
  return (() => {
22640
- var _el$20 = _tmpl$460();
22761
+ var _el$20 = _tmpl$461();
22641
22762
  _el$20.$$click = () => void save();
22642
22763
  insert(_el$20, () => saving() ? "Saving\u2026" : "Save");
22643
22764
  effect(() => _el$20.disabled = !dirty() || saving());
@@ -22882,11 +23003,11 @@ function EmailNotifications() {
22882
23003
  })();
22883
23004
  }
22884
23005
  delegateEvents(["click", "input", "keydown"]);
22885
- var _tmpl$378 = /* @__PURE__ */ template(`<div class=app-admin-card style=margin-top:1.25rem><div style="padding:1rem 1.25rem;border-bottom:1px solid var(--app-admin-border-soft)"><h2 class=app-admin-heading style=font-size:0.9375rem;font-weight:600;margin:0></h2><p style="font-size:0.75rem;margin:0.25rem 0 0"></p></div><div>`);
23006
+ var _tmpl$379 = /* @__PURE__ */ template(`<div class=app-admin-card style=margin-top:1.25rem><div style="padding:1rem 1.25rem;border-bottom:1px solid var(--app-admin-border-soft)"><h2 class=app-admin-heading style=font-size:0.9375rem;font-weight:600;margin:0></h2><p style="font-size:0.75rem;margin:0.25rem 0 0"></p></div><div>`);
22886
23007
  var _tmpl$2109 = /* @__PURE__ */ template(`<div style=font-size:0.75rem;margin-top:0.25rem>`);
22887
- var _tmpl$379 = /* @__PURE__ */ template(`<div style="display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:0.875rem 1.25rem;border-bottom:1px solid var(--app-admin-border-soft)"><div style=min-width:0><div style=font-size:0.875rem;font-weight:600></div><div style=margin-top:0.125rem></div></div><div style=flex-shrink:0>`);
22888
- var _tmpl$461 = /* @__PURE__ */ template(`<div class=app-admin-notice role=alert style=margin-top:1.25rem>Features could not be loaded. `);
22889
- var _tmpl$553 = /* @__PURE__ */ template(`<div>`);
23008
+ var _tmpl$380 = /* @__PURE__ */ template(`<div style="display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:0.875rem 1.25rem;border-bottom:1px solid var(--app-admin-border-soft)"><div style=min-width:0><div style=font-size:0.875rem;font-weight:600></div><div style=margin-top:0.125rem></div></div><div style=flex-shrink:0>`);
23009
+ var _tmpl$464 = /* @__PURE__ */ template(`<div class=app-admin-notice role=alert style=margin-top:1.25rem>Features could not be loaded. `);
23010
+ var _tmpl$554 = /* @__PURE__ */ template(`<div>`);
22890
23011
  var _tmpl$648 = /* @__PURE__ */ template(`<button type=button role=switch class=app-admin-toggle><span class=app-admin-toggle__knob>`);
22891
23012
  var _tmpl$743 = /* @__PURE__ */ template(`<span class="app-admin-badge app-admin-badge--success">On`);
22892
23013
  var _tmpl$838 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-sm">Request`);
@@ -22909,7 +23030,7 @@ function formatDate2(iso) {
22909
23030
  }
22910
23031
  function Card2(props) {
22911
23032
  return (() => {
22912
- var _el$ = _tmpl$378(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling, _el$5 = _el$2.nextSibling;
23033
+ var _el$ = _tmpl$379(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling, _el$5 = _el$2.nextSibling;
22913
23034
  insert(_el$3, () => props.title);
22914
23035
  insert(_el$4, () => props.note);
22915
23036
  insert(_el$5, () => props.children);
@@ -22921,7 +23042,7 @@ function Card2(props) {
22921
23042
  }
22922
23043
  function Row(props) {
22923
23044
  return (() => {
22924
- var _el$6 = _tmpl$379(), _el$7 = _el$6.firstChild, _el$8 = _el$7.firstChild, _el$9 = _el$8.nextSibling, _el$1 = _el$7.nextSibling;
23045
+ var _el$6 = _tmpl$380(), _el$7 = _el$6.firstChild, _el$8 = _el$7.firstChild, _el$9 = _el$8.nextSibling, _el$1 = _el$7.nextSibling;
22925
23046
  insert(_el$8, () => props.feature.label);
22926
23047
  insert(_el$9, () => props.feature.description);
22927
23048
  insert(_el$7, createComponent(Show, {
@@ -23012,7 +23133,7 @@ function Features() {
23012
23133
  }
23013
23134
  };
23014
23135
  return (() => {
23015
- var _el$10 = _tmpl$553();
23136
+ var _el$10 = _tmpl$554();
23016
23137
  insert(_el$10, createComponent(PageTitle, {
23017
23138
  subtitle: "What this site has switched on, and what you can ask for",
23018
23139
  children: "Features"
@@ -23022,7 +23143,7 @@ function Features() {
23022
23143
  return data.error;
23023
23144
  },
23024
23145
  get children() {
23025
- var _el$11 = _tmpl$461(); _el$11.firstChild;
23146
+ var _el$11 = _tmpl$464(); _el$11.firstChild;
23026
23147
  insert(_el$11, () => data.error?.message, null);
23027
23148
  return _el$11;
23028
23149
  }
@@ -23200,11 +23321,11 @@ function Features() {
23200
23321
  delegateEvents(["click", "input"]);
23201
23322
 
23202
23323
  // src/pages/AdminDashboard.tsx
23203
- var _tmpl$380 = /* @__PURE__ */ template(`<span style=font-size:1rem;opacity:0.7;flex-shrink:0>`);
23324
+ var _tmpl$381 = /* @__PURE__ */ template(`<span style=font-size:1rem;opacity:0.7;flex-shrink:0>`);
23204
23325
  var _tmpl$2119 = /* @__PURE__ */ template(`<button type=button style="display:flex;align-items:center;gap:0.75rem;padding:0.625rem 0.75rem;border-radius:var(--app-admin-radius-sm);font-size:0.875rem;font-weight:500;text-align:left;border:none;cursor:pointer">`);
23205
- var _tmpl$381 = /* @__PURE__ */ template(`<div class="app-admin-root app-admin-shell"style=position:sticky><div class=app-admin-shell-header><button type=button class=app-admin-shell-menu-trigger aria-label="Open admin 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-admin-shell-header-title></span></div><div class=app-admin-backdrop aria-hidden=true></div><aside class=app-admin-sidebar><div style=padding:1.25rem><h2 style="font-size:0.7rem;font-weight:500;color:var(--app-admin-fg-muted);text-transform:uppercase;letter-spacing:0.08em;margin:0 0 1rem">Admin Panel</h2><nav style=display:flex;flex-direction:column;gap:0.25rem></nav></div></aside><div class=app-admin-content>`);
23206
- var _tmpl$464 = /* @__PURE__ */ template(`<h3 style="font-size:0.625rem;font-weight:600;color:var(--app-admin-fg-muted);text-transform:uppercase;letter-spacing:0.08em;margin:1rem 0 0.375rem;padding:0 0.75rem">`);
23207
- var _tmpl$554 = /* @__PURE__ */ template(`<div role=alert style="margin:1rem 0;padding:1.25rem 1.5rem;border:1px solid var(--app-admin-border);border-radius:var(--app-admin-radius-sm);background:var(--app-admin-surface);color:var(--app-admin-fg)"><div style=font-weight:600;margin-bottom:0.375rem>This section failed to load</div><div style=font-size:0.875rem;color:var(--app-admin-fg-muted);margin-bottom:1rem;word-break:break-word></div><button type=button style="padding:0.5rem 0.875rem;border-radius:var(--app-admin-radius-sm);border:1px solid var(--app-admin-border);background:var(--app-admin-primary-soft);color:var(--app-admin-primary-soft-fg);font-size:0.875rem;font-weight:500;cursor:pointer">Try again`);
23326
+ var _tmpl$385 = /* @__PURE__ */ template(`<div class="app-admin-root app-admin-shell"style=position:sticky><div class=app-admin-shell-header><button type=button class=app-admin-shell-menu-trigger aria-label="Open admin 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-admin-shell-header-title></span></div><div class=app-admin-backdrop aria-hidden=true></div><aside class=app-admin-sidebar><div style=padding:1.25rem><h2 style="font-size:0.7rem;font-weight:500;color:var(--app-admin-fg-muted);text-transform:uppercase;letter-spacing:0.08em;margin:0 0 1rem">Admin Panel</h2><nav style=display:flex;flex-direction:column;gap:0.25rem></nav></div></aside><div class=app-admin-content>`);
23327
+ var _tmpl$465 = /* @__PURE__ */ template(`<h3 style="font-size:0.625rem;font-weight:600;color:var(--app-admin-fg-muted);text-transform:uppercase;letter-spacing:0.08em;margin:1rem 0 0.375rem;padding:0 0.75rem">`);
23328
+ var _tmpl$555 = /* @__PURE__ */ template(`<div role=alert style="margin:1rem 0;padding:1.25rem 1.5rem;border:1px solid var(--app-admin-border);border-radius:var(--app-admin-radius-sm);background:var(--app-admin-surface);color:var(--app-admin-fg)"><div style=font-weight:600;margin-bottom:0.375rem>This section failed to load</div><div style=font-size:0.875rem;color:var(--app-admin-fg-muted);margin-bottom:1rem;word-break:break-word></div><button type=button style="padding:0.5rem 0.875rem;border-radius:var(--app-admin-radius-sm);border:1px solid var(--app-admin-border);background:var(--app-admin-primary-soft);color:var(--app-admin-primary-soft-fg);font-size:0.875rem;font-weight:500;cursor:pointer">Try again`);
23208
23329
  var _tmpl$649 = /* @__PURE__ */ template(`<div class=app-admin-root style=display:flex;align-items:center;justify-content:center;position:sticky;background:var(--app-admin-bg)><div role=status aria-label="Loading admin"style="width:1.75rem;height:1.75rem;border-radius:9999px;border:2px solid var(--app-admin-border);border-top-color:var(--app-admin-primary);animation:app-admin-gate-spin 0.8s linear infinite"></div><style>@keyframes app-admin-gate-spin { to { transform: rotate(360deg); } }`);
23209
23330
  var TAB_LABELS = {
23210
23331
  dashboard: "Dashboard",
@@ -23344,7 +23465,7 @@ function AdminDashboard(props) {
23344
23465
  return props.tabIcons?.[btnProps.tab];
23345
23466
  },
23346
23467
  get children() {
23347
- var _el$2 = _tmpl$380();
23468
+ var _el$2 = _tmpl$381();
23348
23469
  effect(() => className(_el$2, props.tabIcons[btnProps.tab]));
23349
23470
  return _el$2;
23350
23471
  }
@@ -23376,7 +23497,7 @@ function AdminDashboard(props) {
23376
23497
  return createComponent(AdminNavContext.Provider, {
23377
23498
  value: adminNav,
23378
23499
  get children() {
23379
- var _el$3 = _tmpl$381(), _el$4 = _el$3.firstChild, _el$5 = _el$4.firstChild, _el$6 = _el$5.nextSibling, _el$7 = _el$4.nextSibling, _el$8 = _el$7.nextSibling, _el$9 = _el$8.firstChild, _el$0 = _el$9.firstChild, _el$1 = _el$0.nextSibling, _el$10 = _el$8.nextSibling;
23500
+ var _el$3 = _tmpl$385(), _el$4 = _el$3.firstChild, _el$5 = _el$4.firstChild, _el$6 = _el$5.nextSibling, _el$7 = _el$4.nextSibling, _el$8 = _el$7.nextSibling, _el$9 = _el$8.firstChild, _el$0 = _el$9.firstChild, _el$1 = _el$0.nextSibling, _el$10 = _el$8.nextSibling;
23380
23501
  _el$5.$$click = () => setDrawerOpen(true);
23381
23502
  insert(_el$6, () => TAB_LABELS[currentTab()]);
23382
23503
  _el$7.$$click = () => setDrawerOpen(false);
@@ -23393,7 +23514,7 @@ function AdminDashboard(props) {
23393
23514
  return visibleGroups();
23394
23515
  },
23395
23516
  children: (group) => [(() => {
23396
- var _el$11 = _tmpl$464();
23517
+ var _el$11 = _tmpl$465();
23397
23518
  insert(_el$11, () => group.label);
23398
23519
  return _el$11;
23399
23520
  })(), createComponent(For, {
@@ -23626,7 +23747,7 @@ function AdminTabError(props) {
23626
23747
  console.error("[AdminDashboard] tab failed to render:", props.error);
23627
23748
  const message = () => props.error instanceof Error ? props.error.message : String(props.error);
23628
23749
  return (() => {
23629
- var _el$12 = _tmpl$554(), _el$13 = _el$12.firstChild, _el$14 = _el$13.nextSibling, _el$15 = _el$14.nextSibling;
23750
+ var _el$12 = _tmpl$555(), _el$13 = _el$12.firstChild, _el$14 = _el$13.nextSibling, _el$15 = _el$14.nextSibling;
23630
23751
  insert(_el$14, message);
23631
23752
  _el$15.$$click = () => props.reset();
23632
23753
  return _el$12;
@@ -23714,11 +23835,11 @@ function affiliateSubTabFromPath(pathname, base = "/admin") {
23714
23835
  }
23715
23836
  return "overview";
23716
23837
  }
23717
- var _tmpl$385 = /* @__PURE__ */ template(`<div class=app-admin-modal-backdrop><div class="app-admin-card app-admin-modal"style=max-width:32rem><div class=app-admin-modal-header><h3 class=app-admin-heading style=font-size:1rem;margin:0>Customer dashboard preview</h3><button type=button class="app-admin-btn app-admin-btn-ghost"style="border:none;padding:0.25rem 0.5rem;font-size:1.25rem">\xD7</button></div><div class=app-admin-modal-body><div style="padding:0.5rem 0.75rem;border-radius:var(--app-admin-radius-sm);background:var(--app-admin-warning-bg);color:var(--app-admin-warning-fg);font-size:0.75rem;font-weight:500">Viewing as <!> \u2014 read-only`);
23838
+ var _tmpl$386 = /* @__PURE__ */ template(`<div class=app-admin-modal-backdrop><div class="app-admin-card app-admin-modal"style=max-width:32rem><div class=app-admin-modal-header><h3 class=app-admin-heading style=font-size:1rem;margin:0>Customer dashboard preview</h3><button type=button class="app-admin-btn app-admin-btn-ghost"style="border:none;padding:0.25rem 0.5rem;font-size:1.25rem">\xD7</button></div><div class=app-admin-modal-body><div style="padding:0.5rem 0.75rem;border-radius:var(--app-admin-radius-sm);background:var(--app-admin-warning-bg);color:var(--app-admin-warning-fg);font-size:0.75rem;font-weight:500">Viewing as <!> \u2014 read-only`);
23718
23839
  var _tmpl$2120 = /* @__PURE__ */ template(`<div style="display:flex;align-items:center;justify-content:space-between;gap:0.75rem;padding:0.5rem 0.75rem;border-radius:var(--app-admin-radius-sm);background:var(--app-admin-danger-bg);color:var(--app-admin-danger-fg);font-size:0.75rem;font-weight:500"><span></span><button type=button class="app-admin-btn app-admin-btn-ghost"style="padding:0.25rem 0.75rem">Retry`);
23719
- var _tmpl$386 = /* @__PURE__ */ template(`<p style=color:var(--app-admin-fg-muted);font-size:0.875rem>Could not load this customer's dashboard.`);
23720
- var _tmpl$465 = /* @__PURE__ */ template(`<div><h3>Profile</h3><div class=app-admin-card-soft style=padding:0.75rem><p style=font-weight:600;font-size:0.9375rem;margin:0></p><p style="font-size:0.8125rem;color:var(--app-admin-fg-muted);margin:0.25rem 0 0">`);
23721
- var _tmpl$555 = /* @__PURE__ */ template(`<div><h3>Subscription`);
23840
+ var _tmpl$387 = /* @__PURE__ */ template(`<p style=color:var(--app-admin-fg-muted);font-size:0.875rem>Could not load this customer's dashboard.`);
23841
+ var _tmpl$466 = /* @__PURE__ */ template(`<div><h3>Profile</h3><div class=app-admin-card-soft style=padding:0.75rem><p style=font-weight:600;font-size:0.9375rem;margin:0></p><p style="font-size:0.8125rem;color:var(--app-admin-fg-muted);margin:0.25rem 0 0">`);
23842
+ var _tmpl$556 = /* @__PURE__ */ template(`<div><h3>Subscription`);
23722
23843
  var _tmpl$650 = /* @__PURE__ */ template(`<div style=display:flex;flex-direction:column;gap:0.5rem>`);
23723
23844
  var _tmpl$744 = /* @__PURE__ */ template(`<div><h3>Prescription requests`);
23724
23845
  var _tmpl$839 = /* @__PURE__ */ template(`<div><h3>Pending surveys`);
@@ -23738,7 +23859,7 @@ function PatientDashboardPreview(props) {
23738
23859
  authToken: () => props.token
23739
23860
  });
23740
23861
  return (() => {
23741
- var _el$ = _tmpl$385(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$5 = _el$4.nextSibling, _el$6 = _el$3.nextSibling, _el$7 = _el$6.firstChild, _el$8 = _el$7.firstChild, _el$0 = _el$8.nextSibling; _el$0.nextSibling;
23862
+ var _el$ = _tmpl$386(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$5 = _el$4.nextSibling, _el$6 = _el$3.nextSibling, _el$7 = _el$6.firstChild, _el$8 = _el$7.firstChild, _el$0 = _el$8.nextSibling; _el$0.nextSibling;
23742
23863
  _el$.$$click = (e) => {
23743
23864
  if (e.target === e.currentTarget) props.onClose();
23744
23865
  };
@@ -23769,16 +23890,16 @@ function PatientDashboardPreview(props) {
23769
23890
  return data.profile();
23770
23891
  },
23771
23892
  get fallback() {
23772
- return _tmpl$386();
23893
+ return _tmpl$387();
23773
23894
  },
23774
23895
  children: (profile) => [(() => {
23775
- var _el$13 = _tmpl$465(), _el$14 = _el$13.firstChild, _el$15 = _el$14.nextSibling, _el$16 = _el$15.firstChild, _el$17 = _el$16.nextSibling;
23896
+ var _el$13 = _tmpl$466(), _el$14 = _el$13.firstChild, _el$15 = _el$14.nextSibling, _el$16 = _el$15.firstChild, _el$17 = _el$16.nextSibling;
23776
23897
  insert(_el$16, () => [profile().firstName, profile().lastName].filter(Boolean).join(" ") || "Member");
23777
23898
  insert(_el$17, () => profile().email);
23778
23899
  effect((_$p) => style(_el$14, panelSectionHeader, _$p));
23779
23900
  return _el$13;
23780
23901
  })(), (() => {
23781
- var _el$18 = _tmpl$555(), _el$19 = _el$18.firstChild;
23902
+ var _el$18 = _tmpl$556(), _el$19 = _el$18.firstChild;
23782
23903
  insert(_el$18, createComponent(Show, {
23783
23904
  get when() {
23784
23905
  return data.subscription();
@@ -23928,9 +24049,9 @@ function PatientDashboardPreview(props) {
23928
24049
  })();
23929
24050
  }
23930
24051
  delegateEvents(["click"]);
23931
- var _tmpl$387 = /* @__PURE__ */ template(`<div style=margin-bottom:1rem>`);
24052
+ var _tmpl$388 = /* @__PURE__ */ template(`<div style=margin-bottom:1rem>`);
23932
24053
  var _tmpl$2121 = /* @__PURE__ */ template(`<form><div style=display:grid;gap:1rem;margin-bottom:1.5rem><div style="display:grid;grid-template-columns:repeat(2, 1fr);gap:1rem"></div></div><div style=margin-bottom:1.5rem></div><div style=display:flex;gap:0.75rem>`);
23933
- var _tmpl$388 = /* @__PURE__ */ template(`<div class=pay-method style="max-width:480px;margin:0 auto;padding:2rem 1.25rem"><p style="color:var(--app-portal-fg-muted, #6e6a66);margin-bottom:1.5rem">Enter a new card for your subscription. Your current card stays active until this succeeds.`);
24054
+ var _tmpl$389 = /* @__PURE__ */ template(`<div class=pay-method style="max-width:480px;margin:0 auto;padding:2rem 1.25rem"><p style="color:var(--app-portal-fg-muted, #6e6a66);margin-bottom:1.5rem">Enter a new card for your subscription. Your current card stays active until this succeeds.`);
23934
24055
  var LIVE = /* @__PURE__ */ new Set(["active", "paused", "past_due"]);
23935
24056
  function UpdatePaymentMethod(props) {
23936
24057
  const {
@@ -23960,7 +24081,7 @@ function UpdatePaymentMethod(props) {
23960
24081
  if (ok) props.onDone();
23961
24082
  }
23962
24083
  return (() => {
23963
- var _el$ = _tmpl$388(), _el$2 = _el$.firstChild;
24084
+ var _el$ = _tmpl$389(), _el$2 = _el$.firstChild;
23964
24085
  insert(_el$, createComponent(Heading, {
23965
24086
  level: 1,
23966
24087
  get children() {
@@ -23998,7 +24119,7 @@ function UpdatePaymentMethod(props) {
23998
24119
  return flow.error();
23999
24120
  },
24000
24121
  get children() {
24001
- var _el$4 = _tmpl$387();
24122
+ var _el$4 = _tmpl$388();
24002
24123
  insert(_el$4, createComponent(Banner, {
24003
24124
  variant: "error",
24004
24125
  get children() {
@@ -24076,11 +24197,11 @@ function UpdatePaymentMethod(props) {
24076
24197
  return _el$;
24077
24198
  })();
24078
24199
  }
24079
- var _tmpl$389 = /* @__PURE__ */ template(`<a class=ship__track target=_blank rel="noopener noreferrer">Track<!> \u2197`);
24200
+ var _tmpl$390 = /* @__PURE__ */ template(`<a class=ship__track target=_blank rel="noopener noreferrer">Track<!> \u2197`);
24080
24201
  var _tmpl$2122 = /* @__PURE__ */ template(`<div class=ship><p class=ship__eta></p><div class=ship__chip-row><button type=button class=ship__chip><span class=ship__num></span><i class="ph ph-copy ship__copy-icon"aria-hidden=true></i><span class=ship__copied>Copied \u2713</span></button></div><span class=portal-sr-only role=status aria-live=polite>`);
24081
- var _tmpl$390 = /* @__PURE__ */ template(`<span class=refill__cycle>Day <!> of `);
24082
- var _tmpl$466 = /* @__PURE__ */ template(`<div class=refill data-testid=refill-strip><div class=refill__head><span class=lab-label>Your plan</span></div><div class=refill__rail>`);
24083
- var _tmpl$556 = /* @__PURE__ */ template(`<span class=refill__cycle>Preparing your next fill`);
24202
+ var _tmpl$391 = /* @__PURE__ */ template(`<span class=refill__cycle>Day <!> of `);
24203
+ var _tmpl$467 = /* @__PURE__ */ template(`<div class=refill data-testid=refill-strip><div class=refill__head><span class=lab-label>Your plan</span></div><div class=refill__rail>`);
24204
+ var _tmpl$557 = /* @__PURE__ */ template(`<span class=refill__cycle>Preparing your next fill`);
24084
24205
  var _tmpl$651 = /* @__PURE__ */ template(`<div><span class=refill__dot aria-hidden=true></span><span class="lab-label refill__label"></span><span class=refill__date></span><span class=refill__rel>`);
24085
24206
  var _tmpl$745 = /* @__PURE__ */ template(`<a class=refill__action>Complete check-in \u2192`);
24086
24207
  var _tmpl$840 = /* @__PURE__ */ template(`<p class=tracker__empty-text data-testid=tracker-savings-note><strong>Member pricing is active on your account.</strong> It applies automatically when you check out.`);
@@ -24125,7 +24246,7 @@ function TrackingChip(props) {
24125
24246
  return props.url;
24126
24247
  },
24127
24248
  get children() {
24128
- var _el$8 = _tmpl$389(), _el$9 = _el$8.firstChild, _el$1 = _el$9.nextSibling; _el$1.nextSibling;
24249
+ var _el$8 = _tmpl$390(), _el$9 = _el$8.firstChild, _el$1 = _el$9.nextSibling; _el$1.nextSibling;
24129
24250
  insert(_el$8, (() => {
24130
24251
  var _c$ = memo(() => !!props.carrier);
24131
24252
  return () => _c$() ? ` with ${props.carrier}` : "";
@@ -24146,16 +24267,16 @@ function OrderTracker(props) {
24146
24267
  return refill();
24147
24268
  },
24148
24269
  children: (r) => (() => {
24149
- var _el$11 = _tmpl$466(), _el$12 = _el$11.firstChild; _el$12.firstChild; var _el$18 = _el$12.nextSibling;
24270
+ var _el$11 = _tmpl$467(), _el$12 = _el$11.firstChild; _el$12.firstChild; var _el$18 = _el$12.nextSibling;
24150
24271
  insert(_el$12, createComponent(Show, {
24151
24272
  get when() {
24152
24273
  return !r().pendingFill;
24153
24274
  },
24154
24275
  get fallback() {
24155
- return _tmpl$556();
24276
+ return _tmpl$557();
24156
24277
  },
24157
24278
  get children() {
24158
- var _el$14 = _tmpl$390(), _el$15 = _el$14.firstChild, _el$17 = _el$15.nextSibling; _el$17.nextSibling;
24279
+ var _el$14 = _tmpl$391(), _el$15 = _el$14.firstChild, _el$17 = _el$15.nextSibling; _el$17.nextSibling;
24159
24280
  insert(_el$14, () => r().cycleDay, _el$17);
24160
24281
  insert(_el$14, () => r().cycleLength, null);
24161
24282
  return _el$14;
@@ -24405,9 +24526,9 @@ function OrderTracker(props) {
24405
24526
  });
24406
24527
  }
24407
24528
  delegateEvents(["click"]);
24408
- var _tmpl$391 = /* @__PURE__ */ template(`<span class=rx-row__dose> \xB7 `);
24529
+ var _tmpl$395 = /* @__PURE__ */ template(`<span class=rx-row__dose> \xB7 `);
24409
24530
  var _tmpl$2123 = /* @__PURE__ */ template(`<div class=rx-row__body>`);
24410
- var _tmpl$395 = /* @__PURE__ */ template(`<div data-testid=rx-row><button type=button class=rx-row__head><span class=rx-row__med></span><span class=rx-row__status></span><i aria-hidden=true>`);
24531
+ var _tmpl$396 = /* @__PURE__ */ template(`<div data-testid=rx-row><button type=button class=rx-row__head><span class=rx-row__med></span><span class=rx-row__status></span><i aria-hidden=true>`);
24411
24532
  var STATUS_LABEL = {
24412
24533
  pending: "Under review",
24413
24534
  approved: "Approved",
@@ -24424,7 +24545,7 @@ function RxRow(props) {
24424
24545
  return STATUS_LABEL[props.rx.status] ?? props.rx.status;
24425
24546
  };
24426
24547
  return (() => {
24427
- var _el$ = _tmpl$395(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$6 = _el$3.nextSibling, _el$7 = _el$6.nextSibling;
24548
+ var _el$ = _tmpl$396(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$6 = _el$3.nextSibling, _el$7 = _el$6.nextSibling;
24428
24549
  _el$2.$$click = () => setOpen((v) => !v);
24429
24550
  insert(_el$3, () => props.rx.drugName ?? "Medication", null);
24430
24551
  insert(_el$3, createComponent(Show, {
@@ -24432,7 +24553,7 @@ function RxRow(props) {
24432
24553
  return props.rx.dosage;
24433
24554
  },
24434
24555
  get children() {
24435
- var _el$4 = _tmpl$391(); _el$4.firstChild;
24556
+ var _el$4 = _tmpl$395(); _el$4.firstChild;
24436
24557
  insert(_el$4, () => props.rx.dosage, null);
24437
24558
  return _el$4;
24438
24559
  }
@@ -24486,11 +24607,11 @@ function RxRow(props) {
24486
24607
  })();
24487
24608
  }
24488
24609
  delegateEvents(["click"]);
24489
- var _tmpl$396 = /* @__PURE__ */ template(`<div class=plan data-testid=plan-billing><span class=lab-label>Plan &amp; billing`);
24610
+ var _tmpl$397 = /* @__PURE__ */ template(`<div class=plan data-testid=plan-billing><span class=lab-label>Plan &amp; billing`);
24490
24611
  var _tmpl$2124 = /* @__PURE__ */ template(`<div class=plan__empty><h2 class=plan__empty-title>No active plan</h2><p class=plan__empty-text>Start your treatment to set up your monthly plan.</p><a class="portal-btn portal-btn--primary">Start your intake`);
24491
- var _tmpl$397 = /* @__PURE__ */ template(`<p class=membership__dose>`);
24492
- var _tmpl$467 = /* @__PURE__ */ template(`<div data-testid=membership-card><div class=membership__sheen aria-hidden=true></div><div class=membership__top><span class="lab-label membership__status"></span><span class=membership__brand></span></div><h2 class=membership__med></h2><div class=membership__bottom><span class=membership__price><span class=membership__per>/mo</span></span><span class=membership__renew>Renews `);
24493
- var _tmpl$557 = /* @__PURE__ */ template(`<dl class=ledger><div class=ledger__row><dt>Member since</dt><dd></dd></div><div class=ledger__row><dt>Next billing date</dt><dd></dd></div><div class=ledger__row><dt>Billing amount</dt><dd>/mo`);
24612
+ var _tmpl$398 = /* @__PURE__ */ template(`<p class=membership__dose>`);
24613
+ var _tmpl$468 = /* @__PURE__ */ template(`<div data-testid=membership-card><div class=membership__sheen aria-hidden=true></div><div class=membership__top><span class="lab-label membership__status"></span><span class=membership__brand></span></div><h2 class=membership__med></h2><div class=membership__bottom><span class=membership__price><span class=membership__per>/mo</span></span><span class=membership__renew>Renews `);
24614
+ var _tmpl$558 = /* @__PURE__ */ template(`<dl class=ledger><div class=ledger__row><dt>Member since</dt><dd></dd></div><div class=ledger__row><dt>Next billing date</dt><dd></dd></div><div class=ledger__row><dt>Billing amount</dt><dd>/mo`);
24494
24615
  var _tmpl$653 = /* @__PURE__ */ template(`<p class=plan__note>Question about billing? <button type=button class=plan__note-link>Message support`);
24495
24616
  var _tmpl$746 = /* @__PURE__ */ template(`<p class=plan__error role=alert>`);
24496
24617
  var _tmpl$841 = /* @__PURE__ */ template(`<button type=button class=plan__link-btn>`);
@@ -24541,7 +24662,7 @@ function PlanBilling(props) {
24541
24662
  }
24542
24663
  };
24543
24664
  return (() => {
24544
- var _el$ = _tmpl$396(); _el$.firstChild;
24665
+ var _el$ = _tmpl$397(); _el$.firstChild;
24545
24666
  insert(_el$, createComponent(Show, {
24546
24667
  get when() {
24547
24668
  return primary();
@@ -24554,7 +24675,7 @@ function PlanBilling(props) {
24554
24675
  })();
24555
24676
  },
24556
24677
  children: (sub) => [(() => {
24557
- var _el$7 = _tmpl$467(), _el$8 = _el$7.firstChild, _el$9 = _el$8.nextSibling, _el$0 = _el$9.firstChild, _el$1 = _el$0.nextSibling, _el$10 = _el$9.nextSibling, _el$12 = _el$10.nextSibling, _el$13 = _el$12.firstChild, _el$14 = _el$13.firstChild, _el$15 = _el$13.nextSibling; _el$15.firstChild;
24678
+ var _el$7 = _tmpl$468(), _el$8 = _el$7.firstChild, _el$9 = _el$8.nextSibling, _el$0 = _el$9.firstChild, _el$1 = _el$0.nextSibling, _el$10 = _el$9.nextSibling, _el$12 = _el$10.nextSibling, _el$13 = _el$12.firstChild, _el$14 = _el$13.firstChild, _el$15 = _el$13.nextSibling; _el$15.firstChild;
24558
24679
  insert(_el$0, () => STATUS_COPY[sub().status] || sub().status);
24559
24680
  insert(_el$1, () => props.brandName);
24560
24681
  insert(_el$10, () => sub().medicationName ?? sub().medication);
@@ -24563,7 +24684,7 @@ function PlanBilling(props) {
24563
24684
  return sub().dosage;
24564
24685
  },
24565
24686
  get children() {
24566
- var _el$11 = _tmpl$397();
24687
+ var _el$11 = _tmpl$398();
24567
24688
  insert(_el$11, () => sub().dosage);
24568
24689
  return _el$11;
24569
24690
  }
@@ -24573,7 +24694,7 @@ function PlanBilling(props) {
24573
24694
  effect(() => className(_el$7, `membership membership--${sub().status}`));
24574
24695
  return _el$7;
24575
24696
  })(), (() => {
24576
- var _el$17 = _tmpl$557(), _el$18 = _el$17.firstChild, _el$19 = _el$18.firstChild, _el$20 = _el$19.nextSibling, _el$21 = _el$18.nextSibling, _el$22 = _el$21.firstChild, _el$23 = _el$22.nextSibling, _el$24 = _el$21.nextSibling, _el$25 = _el$24.firstChild, _el$26 = _el$25.nextSibling, _el$27 = _el$26.firstChild;
24697
+ var _el$17 = _tmpl$558(), _el$18 = _el$17.firstChild, _el$19 = _el$18.firstChild, _el$20 = _el$19.nextSibling, _el$21 = _el$18.nextSibling, _el$22 = _el$21.firstChild, _el$23 = _el$22.nextSibling, _el$24 = _el$21.nextSibling, _el$25 = _el$24.firstChild, _el$26 = _el$25.nextSibling, _el$27 = _el$26.firstChild;
24577
24698
  insert(_el$20, () => formatLongDate(sub().createdAt));
24578
24699
  insert(_el$23, () => formatLongDate(sub().currentPeriodEnd));
24579
24700
  insert(_el$26, () => formatCents(sub().amountCents), _el$27);
@@ -24665,11 +24786,11 @@ function PlanBilling(props) {
24665
24786
  })();
24666
24787
  }
24667
24788
  delegateEvents(["click"]);
24668
- var _tmpl$398 = /* @__PURE__ */ template(`<p class=account__empty>We don\u2019t have your details on file yet.`);
24789
+ var _tmpl$399 = /* @__PURE__ */ template(`<p class=account__empty>We don\u2019t have your details on file yet.`);
24669
24790
  var _tmpl$2125 = /* @__PURE__ */ template(`<p class=account__note>Need to update something? <button type=button class=account__note-link>Message support</button> and we\u2019ll take care of it.`);
24670
- var _tmpl$399 = /* @__PURE__ */ template(`<button type=button class="account__support-link account__support-btn">Messages`);
24671
- var _tmpl$468 = /* @__PURE__ */ template(`<div class=account data-testid=account-panel><span class=lab-label>Account</span><h1 class=account__title>Your details</h1><dl class=account__fields></dl><div class=account__support></div><button type=button class="portal-btn portal-btn--ghost account__signout">Sign out`);
24672
- var _tmpl$558 = /* @__PURE__ */ template(`<div class=account__field><dt class=lab-label></dt><dd>`);
24791
+ var _tmpl$3100 = /* @__PURE__ */ template(`<button type=button class="account__support-link account__support-btn">Messages`);
24792
+ var _tmpl$469 = /* @__PURE__ */ template(`<div class=account data-testid=account-panel><span class=lab-label>Account</span><h1 class=account__title>Your details</h1><dl class=account__fields></dl><div class=account__support></div><button type=button class="portal-btn portal-btn--ghost account__signout">Sign out`);
24793
+ var _tmpl$559 = /* @__PURE__ */ template(`<div class=account__field><dt class=lab-label></dt><dd>`);
24673
24794
  var _tmpl$654 = /* @__PURE__ */ template(`<a class=account__support-link>`);
24674
24795
  function pick(member, ...keys) {
24675
24796
  if (!member) return "";
@@ -24711,13 +24832,13 @@ function AccountPanel(props) {
24711
24832
  value: address()
24712
24833
  }].filter((f) => f.value);
24713
24834
  return (() => {
24714
- var _el$ = _tmpl$468(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling, _el$4 = _el$3.nextSibling, _el$0 = _el$4.nextSibling, _el$10 = _el$0.nextSibling;
24835
+ var _el$ = _tmpl$469(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling, _el$4 = _el$3.nextSibling, _el$0 = _el$4.nextSibling, _el$10 = _el$0.nextSibling;
24715
24836
  insert(_el$4, createComponent(For, {
24716
24837
  get each() {
24717
24838
  return fields();
24718
24839
  },
24719
24840
  children: (f) => (() => {
24720
- var _el$11 = _tmpl$558(), _el$12 = _el$11.firstChild, _el$13 = _el$12.nextSibling;
24841
+ var _el$11 = _tmpl$559(), _el$12 = _el$11.firstChild, _el$13 = _el$12.nextSibling;
24721
24842
  insert(_el$12, () => f.label);
24722
24843
  insert(_el$13, () => f.value);
24723
24844
  return _el$11;
@@ -24728,7 +24849,7 @@ function AccountPanel(props) {
24728
24849
  return fields().length === 0;
24729
24850
  },
24730
24851
  get children() {
24731
- return _tmpl$398();
24852
+ return _tmpl$399();
24732
24853
  }
24733
24854
  }), _el$0);
24734
24855
  insert(_el$, createComponent(Show, {
@@ -24749,7 +24870,7 @@ function AccountPanel(props) {
24749
24870
  return props.messagingEnabled;
24750
24871
  },
24751
24872
  get children() {
24752
- var _el$1 = _tmpl$399();
24873
+ var _el$1 = _tmpl$3100();
24753
24874
  _el$1.$$click = () => props.onOpenMessages();
24754
24875
  return _el$1;
24755
24876
  }
@@ -24772,9 +24893,9 @@ function AccountPanel(props) {
24772
24893
  delegateEvents(["click"]);
24773
24894
  var _tmpl$400 = /* @__PURE__ */ template(`<section class="leaflet__section leaflet__section--caution"><h2 class=leaflet__h2>Birth control</h2><p class=leaflet__body>`);
24774
24895
  var _tmpl$2126 = /* @__PURE__ */ template(`<ul class=leaflet__disclaimers id=leaflet-disclaimers>`);
24775
- var _tmpl$3100 = /* @__PURE__ */ template(`<div class=leaflet data-testid=medication-guide><header class=leaflet__header><span class=lab-label>How to take it</span><h1 class=leaflet__title></h1><p class=leaflet__summary></p></header><section class=leaflet__boxed aria-label="Boxed warning"><div class=leaflet__boxed-head><i class="ph-fill ph-warning"aria-hidden=true></i><span>Important warning</span></div><p></p></section><section class="leaflet__section leaflet__section--caution"><h2 class=leaflet__h2>Do not use this medicine if\u2026</h2><ul class="leaflet__list leaflet__list--caution"></ul></section><section class=leaflet__section><h2 class=leaflet__h2>Your dose over time</h2><p class=leaflet__note>A typical step-up. Your prescriber sets your exact doses and timing.</p><ol class=titration></ol></section><section class=leaflet__section><h2 class=leaflet__h2>Giving your injection</h2><ol class=steps></ol></section><div class=leaflet__grid><section class=leaflet__section><h2 class=leaflet__h2>Storing your medicine</h2><ul class=leaflet__list></ul></section><section class=leaflet__section><h2 class=leaflet__h2>If you miss a dose</h2><p class=leaflet__body></p></section></div><div class=leaflet__grid><section class=leaflet__section><h2 class=leaflet__h2>Common side effects</h2><ul class="leaflet__list leaflet__list--check"></ul></section><section class="leaflet__section leaflet__section--alert"><h2 class=leaflet__h2>Call right away if you notice\u2026</h2><ul class="leaflet__list leaflet__list--alert"></ul></section></div><section class=leaflet__section><h2 class=leaflet__h2>When to contact your care team</h2><ul class=leaflet__list></ul></section><section class=leaflet__section><h2 class=leaflet__h2>Tips for feeling your best</h2><ul class="leaflet__list leaflet__list--check"></ul></section><section class=leaflet__footnote><button type=button class=leaflet__disclose aria-controls=leaflet-disclaimers> the important details<i aria-hidden=true>`);
24776
- var _tmpl$469 = /* @__PURE__ */ template(`<li>`);
24777
- var _tmpl$559 = /* @__PURE__ */ template(`<li><span class=titration__bead aria-hidden=true></span><div class=titration__body><div class=titration__row><span class=titration__dose></span><span class="lab-label titration__phase"></span></div><span class=titration__time></span><p class=titration__note>`);
24896
+ var _tmpl$3101 = /* @__PURE__ */ template(`<div class=leaflet data-testid=medication-guide><header class=leaflet__header><span class=lab-label>How to take it</span><h1 class=leaflet__title></h1><p class=leaflet__summary></p></header><section class=leaflet__boxed aria-label="Boxed warning"><div class=leaflet__boxed-head><i class="ph-fill ph-warning"aria-hidden=true></i><span>Important warning</span></div><p></p></section><section class="leaflet__section leaflet__section--caution"><h2 class=leaflet__h2>Do not use this medicine if\u2026</h2><ul class="leaflet__list leaflet__list--caution"></ul></section><section class=leaflet__section><h2 class=leaflet__h2>Your dose over time</h2><p class=leaflet__note>A typical step-up. Your prescriber sets your exact doses and timing.</p><ol class=titration></ol></section><section class=leaflet__section><h2 class=leaflet__h2>Giving your injection</h2><ol class=steps></ol></section><div class=leaflet__grid><section class=leaflet__section><h2 class=leaflet__h2>Storing your medicine</h2><ul class=leaflet__list></ul></section><section class=leaflet__section><h2 class=leaflet__h2>If you miss a dose</h2><p class=leaflet__body></p></section></div><div class=leaflet__grid><section class=leaflet__section><h2 class=leaflet__h2>Common side effects</h2><ul class="leaflet__list leaflet__list--check"></ul></section><section class="leaflet__section leaflet__section--alert"><h2 class=leaflet__h2>Call right away if you notice\u2026</h2><ul class="leaflet__list leaflet__list--alert"></ul></section></div><section class=leaflet__section><h2 class=leaflet__h2>When to contact your care team</h2><ul class=leaflet__list></ul></section><section class=leaflet__section><h2 class=leaflet__h2>Tips for feeling your best</h2><ul class="leaflet__list leaflet__list--check"></ul></section><section class=leaflet__footnote><button type=button class=leaflet__disclose aria-controls=leaflet-disclaimers> the important details<i aria-hidden=true>`);
24897
+ var _tmpl$470 = /* @__PURE__ */ template(`<li>`);
24898
+ var _tmpl$560 = /* @__PURE__ */ template(`<li><span class=titration__bead aria-hidden=true></span><div class=titration__body><div class=titration__row><span class=titration__dose></span><span class="lab-label titration__phase"></span></div><span class=titration__time></span><p class=titration__note>`);
24778
24899
  var _tmpl$655 = /* @__PURE__ */ template(`<li class=steps__item><span class=steps__num></span><div class=steps__body><h3 class=steps__title></h3><p class=steps__detail>`);
24779
24900
  function firstNumber(s) {
24780
24901
  const m = (s || "").match(/\d+(\.\d+)?/);
@@ -24796,7 +24917,7 @@ function MedicationGuide(props) {
24796
24917
  return "upcoming";
24797
24918
  };
24798
24919
  return (() => {
24799
- var _el$ = _tmpl$3100(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling, _el$5 = _el$4.nextSibling, _el$6 = _el$2.nextSibling, _el$7 = _el$6.firstChild, _el$8 = _el$7.nextSibling, _el$9 = _el$6.nextSibling, _el$0 = _el$9.firstChild, _el$1 = _el$0.nextSibling, _el$10 = _el$9.nextSibling, _el$11 = _el$10.firstChild, _el$12 = _el$11.nextSibling, _el$13 = _el$12.nextSibling, _el$14 = _el$10.nextSibling, _el$15 = _el$14.firstChild, _el$16 = _el$15.nextSibling, _el$17 = _el$14.nextSibling, _el$18 = _el$17.firstChild, _el$19 = _el$18.firstChild, _el$20 = _el$19.nextSibling, _el$21 = _el$18.nextSibling, _el$22 = _el$21.firstChild, _el$23 = _el$22.nextSibling, _el$27 = _el$17.nextSibling, _el$28 = _el$27.firstChild, _el$29 = _el$28.firstChild, _el$30 = _el$29.nextSibling, _el$31 = _el$28.nextSibling, _el$32 = _el$31.firstChild, _el$33 = _el$32.nextSibling, _el$34 = _el$27.nextSibling, _el$35 = _el$34.firstChild, _el$36 = _el$35.nextSibling, _el$37 = _el$34.nextSibling, _el$38 = _el$37.firstChild, _el$39 = _el$38.nextSibling, _el$40 = _el$37.nextSibling, _el$41 = _el$40.firstChild, _el$42 = _el$41.firstChild, _el$43 = _el$42.nextSibling;
24920
+ var _el$ = _tmpl$3101(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling, _el$5 = _el$4.nextSibling, _el$6 = _el$2.nextSibling, _el$7 = _el$6.firstChild, _el$8 = _el$7.nextSibling, _el$9 = _el$6.nextSibling, _el$0 = _el$9.firstChild, _el$1 = _el$0.nextSibling, _el$10 = _el$9.nextSibling, _el$11 = _el$10.firstChild, _el$12 = _el$11.nextSibling, _el$13 = _el$12.nextSibling, _el$14 = _el$10.nextSibling, _el$15 = _el$14.firstChild, _el$16 = _el$15.nextSibling, _el$17 = _el$14.nextSibling, _el$18 = _el$17.firstChild, _el$19 = _el$18.firstChild, _el$20 = _el$19.nextSibling, _el$21 = _el$18.nextSibling, _el$22 = _el$21.firstChild, _el$23 = _el$22.nextSibling, _el$27 = _el$17.nextSibling, _el$28 = _el$27.firstChild, _el$29 = _el$28.firstChild, _el$30 = _el$29.nextSibling, _el$31 = _el$28.nextSibling, _el$32 = _el$31.firstChild, _el$33 = _el$32.nextSibling, _el$34 = _el$27.nextSibling, _el$35 = _el$34.firstChild, _el$36 = _el$35.nextSibling, _el$37 = _el$34.nextSibling, _el$38 = _el$37.firstChild, _el$39 = _el$38.nextSibling, _el$40 = _el$37.nextSibling, _el$41 = _el$40.firstChild, _el$42 = _el$41.firstChild, _el$43 = _el$42.nextSibling;
24800
24921
  insert(_el$4, () => props.guide.title);
24801
24922
  insert(_el$5, () => props.guide.summary);
24802
24923
  insert(_el$8, () => props.guide.boxedWarning);
@@ -24805,7 +24926,7 @@ function MedicationGuide(props) {
24805
24926
  return props.guide.doNotUseIf;
24806
24927
  },
24807
24928
  children: (item) => (() => {
24808
- var _el$45 = _tmpl$469();
24929
+ var _el$45 = _tmpl$470();
24809
24930
  insert(_el$45, item);
24810
24931
  return _el$45;
24811
24932
  })()
@@ -24815,7 +24936,7 @@ function MedicationGuide(props) {
24815
24936
  return props.guide.titration;
24816
24937
  },
24817
24938
  children: (step, i) => (() => {
24818
- var _el$46 = _tmpl$559(), _el$47 = _el$46.firstChild, _el$48 = _el$47.nextSibling, _el$49 = _el$48.firstChild, _el$50 = _el$49.firstChild, _el$51 = _el$50.nextSibling, _el$52 = _el$49.nextSibling, _el$53 = _el$52.nextSibling;
24939
+ var _el$46 = _tmpl$560(), _el$47 = _el$46.firstChild, _el$48 = _el$47.nextSibling, _el$49 = _el$48.firstChild, _el$50 = _el$49.firstChild, _el$51 = _el$50.nextSibling, _el$52 = _el$49.nextSibling, _el$53 = _el$52.nextSibling;
24819
24940
  insert(_el$50, () => step.dose);
24820
24941
  insert(_el$51, () => step.phase);
24821
24942
  insert(_el$52, () => step.timeframe);
@@ -24841,7 +24962,7 @@ function MedicationGuide(props) {
24841
24962
  return props.guide.storage;
24842
24963
  },
24843
24964
  children: (item) => (() => {
24844
- var _el$59 = _tmpl$469();
24965
+ var _el$59 = _tmpl$470();
24845
24966
  insert(_el$59, item);
24846
24967
  return _el$59;
24847
24968
  })()
@@ -24862,7 +24983,7 @@ function MedicationGuide(props) {
24862
24983
  return props.guide.sideEffectsCommon;
24863
24984
  },
24864
24985
  children: (item) => (() => {
24865
- var _el$60 = _tmpl$469();
24986
+ var _el$60 = _tmpl$470();
24866
24987
  insert(_el$60, item);
24867
24988
  return _el$60;
24868
24989
  })()
@@ -24872,7 +24993,7 @@ function MedicationGuide(props) {
24872
24993
  return props.guide.sideEffectsSerious;
24873
24994
  },
24874
24995
  children: (item) => (() => {
24875
- var _el$61 = _tmpl$469();
24996
+ var _el$61 = _tmpl$470();
24876
24997
  insert(_el$61, item);
24877
24998
  return _el$61;
24878
24999
  })()
@@ -24882,7 +25003,7 @@ function MedicationGuide(props) {
24882
25003
  return props.guide.whenToCall;
24883
25004
  },
24884
25005
  children: (item) => (() => {
24885
- var _el$62 = _tmpl$469();
25006
+ var _el$62 = _tmpl$470();
24886
25007
  insert(_el$62, item);
24887
25008
  return _el$62;
24888
25009
  })()
@@ -24892,7 +25013,7 @@ function MedicationGuide(props) {
24892
25013
  return props.guide.tips;
24893
25014
  },
24894
25015
  children: (item) => (() => {
24895
- var _el$63 = _tmpl$469();
25016
+ var _el$63 = _tmpl$470();
24896
25017
  insert(_el$63, item);
24897
25018
  return _el$63;
24898
25019
  })()
@@ -24910,7 +25031,7 @@ function MedicationGuide(props) {
24910
25031
  return props.guide.disclaimers;
24911
25032
  },
24912
25033
  children: (item) => (() => {
24913
- var _el$64 = _tmpl$469();
25034
+ var _el$64 = _tmpl$470();
24914
25035
  insert(_el$64, item);
24915
25036
  return _el$64;
24916
25037
  })()
@@ -24933,9 +25054,9 @@ function MedicationGuide(props) {
24933
25054
  delegateEvents(["click"]);
24934
25055
  var _tmpl$401 = /* @__PURE__ */ template(`<span data-testid=channel-chip>`);
24935
25056
  var _tmpl$2127 = /* @__PURE__ */ template(`<span class=channel-chip__category>`);
24936
- var _tmpl$3101 = /* @__PURE__ */ template(`<div class=msg-list__header><div class=msg-list__header-title><button type=button class=msg-list__back aria-label="Choose a different team"data-testid=messages-choose-different><i class="ph-thin ph-arrow-left"aria-hidden=true></i></button><h2 class=msg-list__title></h2></div><button type=button class=msg-list__new data-testid=messages-new-support><i class="ph-thin ph-plus"aria-hidden=true></i>New message`);
24937
- var _tmpl$470 = /* @__PURE__ */ template(`<div class=msg-list__state><div class=request-status__spinner>`);
24938
- var _tmpl$560 = /* @__PURE__ */ template(`<div class="msg-list__state msg-list__state--empty"data-testid=messages-empty><i class="ph-thin ph-chat-circle msg-list__empty-icon"aria-hidden=true></i><p class=msg-list__empty-title>No conversations yet.</p><p class=msg-list__empty-hint>`);
25057
+ var _tmpl$3102 = /* @__PURE__ */ template(`<div class=msg-list__header><div class=msg-list__header-title><button type=button class=msg-list__back aria-label="Choose a different team"data-testid=messages-choose-different><i class="ph-thin ph-arrow-left"aria-hidden=true></i></button><h2 class=msg-list__title></h2></div><button type=button class=msg-list__new data-testid=messages-new-support><i class="ph-thin ph-plus"aria-hidden=true></i>New message`);
25058
+ var _tmpl$471 = /* @__PURE__ */ template(`<div class=msg-list__state><div class=request-status__spinner>`);
25059
+ var _tmpl$561 = /* @__PURE__ */ template(`<div class="msg-list__state msg-list__state--empty"data-testid=messages-empty><i class="ph-thin ph-chat-circle msg-list__empty-icon"aria-hidden=true></i><p class=msg-list__empty-title>No conversations yet.</p><p class=msg-list__empty-hint>`);
24939
25060
  var _tmpl$656 = /* @__PURE__ */ template(`<div class=msg-list__scroll data-scrollable>`);
24940
25061
  var _tmpl$747 = /* @__PURE__ */ template(`<span class=msg-list__pip>`);
24941
25062
  var _tmpl$842 = /* @__PURE__ */ template(`<button type=button><div class=msg-list__row><span class=msg-list__name-group><span class=msg-list__name></span></span><span class=msg-list__time></span></div><div class=msg-list__row><span class=msg-list__preview>`);
@@ -24959,10 +25080,10 @@ var _tmpl$2313 = /* @__PURE__ */ template(`<p class=msg-choice__notice-text data
24959
25080
  var _tmpl$2413 = /* @__PURE__ */ template(`<div class="msg-thread msg-choice"data-testid=messages-gate><div class=msg-thread__header><div><h3 class=msg-thread__name>Messages</h3><p class=msg-thread__role>Who do you want to talk to?</p></div></div><div class=msg-choice__options><button type=button class=msg-choice__option data-testid=gate-care-team><i class="ph-thin ph-heartbeat msg-choice__option-icon"aria-hidden=true></i><span class=msg-choice__option-title>My care team</span><span class=msg-choice__option-sub>Treatment, medication or side effects</span></button><button type=button class=msg-choice__option data-testid=gate-support><i class="ph-thin ph-lifebuoy msg-choice__option-icon"aria-hidden=true></i><span class=msg-choice__option-title>Support</span><span class=msg-choice__option-sub>Account, orders, billing or the website`);
24960
25081
  var _tmpl$2513 = /* @__PURE__ */ template(`<span class="msg-choice__option-spinner request-status__spinner"data-testid=gate-care-loading>`);
24961
25082
  var _tmpl$2613 = /* @__PURE__ */ template(`<span class="msg-choice__option-spinner request-status__spinner"data-testid=gate-support-loading>`);
24962
- var _tmpl$2711 = /* @__PURE__ */ template(`<div class="msg-thread msg-choice"data-testid=care-team-notice><div class=msg-thread__header><button type=button class=msg-thread__back-btn aria-label=Back><i class="ph-thin ph-arrow-left"aria-hidden=true></i></button><div><h3 class=msg-thread__name>Care team</h3><p class=msg-thread__role>Goes to your care team</p></div></div><div class=msg-choice__notice><p class=msg-choice__notice-text>Your care team will reach out after reviewing your case. If you have a question about your account or order in the meantime, send it to support.</p><button type=button class="portal-btn portal-btn--primary"data-testid=care-team-notice-switch>Message support instead`);
25083
+ var _tmpl$2712 = /* @__PURE__ */ template(`<div class="msg-thread msg-choice"data-testid=care-team-notice><div class=msg-thread__header><button type=button class=msg-thread__back-btn aria-label=Back><i class="ph-thin ph-arrow-left"aria-hidden=true></i></button><div><h3 class=msg-thread__name>Care team</h3><p class=msg-thread__role>Goes to your care team</p></div></div><div class=msg-choice__notice><p class=msg-choice__notice-text>Your care team will reach out after reviewing your case. If you have a question about your account or order in the meantime, send it to support.</p><button type=button class="portal-btn portal-btn--primary"data-testid=care-team-notice-switch>Message support instead`);
24963
25084
  var _tmpl$2811 = /* @__PURE__ */ template(`<div class="msg-thread msg-choice"data-testid=support-email-sent><div class=msg-thread__header><button type=button class=msg-thread__back-btn aria-label=Back><i class="ph-thin ph-arrow-left"aria-hidden=true></i></button><div><h3 class=msg-thread__name>Message sent</h3><p class=msg-thread__role>Support</p></div></div><div class=msg-choice__notice><p class=msg-choice__notice-text>Thanks, your message is on its way to our support team. We'll reply by email, usually within one business day.</p><button type=button class="portal-btn portal-btn--primary"data-testid=support-email-another>Send another message`);
24964
25085
  var _tmpl$2911 = /* @__PURE__ */ template(`<span class=msg-thread__status data-testid=thread-status-closed>Resolved`);
24965
- var _tmpl$3010 = /* @__PURE__ */ template(`<span class=msg-thread__status data-testid=thread-status-transferred>Moved to care team`);
25086
+ var _tmpl$3011 = /* @__PURE__ */ template(`<span class=msg-thread__status data-testid=thread-status-transferred>Moved to care team`);
24966
25087
  var _tmpl$3114 = /* @__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><div class=msg-thread__title-row><h3 class=msg-thread__name></h3></div><p class=msg-thread__role>`);
24967
25088
  var _tmpl$3213 = /* @__PURE__ */ template(`<div class=msg-thread__banner><button type=button class=msg-thread__banner-link data-testid=continue-with-care-team>Continue with your care team`);
24968
25089
  var _tmpl$3313 = /* @__PURE__ */ template(`<div class=msg-thread__messages data-scrollable><div>`);
@@ -25201,7 +25322,7 @@ function MessagesPanel(props) {
25201
25322
  })();
25202
25323
  const channelConversations = () => thread().conversations().filter((c) => c.source === (channel() === "care" ? "clinical" : "support"));
25203
25324
  const ConversationList = () => [(() => {
25204
- var _el$3 = _tmpl$3101(), _el$4 = _el$3.firstChild, _el$5 = _el$4.firstChild, _el$6 = _el$5.nextSibling, _el$7 = _el$4.nextSibling;
25325
+ var _el$3 = _tmpl$3102(), _el$4 = _el$3.firstChild, _el$5 = _el$4.firstChild, _el$6 = _el$5.nextSibling, _el$7 = _el$4.nextSibling;
25205
25326
  _el$5.$$click = goToGate;
25206
25327
  insert(_el$6, () => channel() === "care" ? "My care team" : "Support");
25207
25328
  _el$7.$$click = openCompose;
@@ -25213,7 +25334,7 @@ function MessagesPanel(props) {
25213
25334
  return thread().loadingConversations();
25214
25335
  },
25215
25336
  get children() {
25216
- return _tmpl$470();
25337
+ return _tmpl$471();
25217
25338
  }
25218
25339
  }), null);
25219
25340
  insert(_el$8, createComponent(Show, {
@@ -25221,7 +25342,7 @@ function MessagesPanel(props) {
25221
25342
  return memo(() => !!!thread().loadingConversations())() && channelConversations().length === 0;
25222
25343
  },
25223
25344
  get children() {
25224
- var _el$0 = _tmpl$560(), _el$1 = _el$0.firstChild, _el$10 = _el$1.nextSibling, _el$11 = _el$10.nextSibling;
25345
+ var _el$0 = _tmpl$561(), _el$1 = _el$0.firstChild, _el$10 = _el$1.nextSibling, _el$11 = _el$10.nextSibling;
25225
25346
  insert(_el$11, createComponent(Show, {
25226
25347
  get when() {
25227
25348
  return channel() === "care";
@@ -25584,7 +25705,7 @@ function MessagesPanel(props) {
25584
25705
  return _el$70;
25585
25706
  })();
25586
25707
  const CareTeamNotice = () => (() => {
25587
- var _el$86 = _tmpl$2711(), _el$87 = _el$86.firstChild, _el$88 = _el$87.firstChild, _el$89 = _el$87.nextSibling, _el$90 = _el$89.firstChild, _el$91 = _el$90.nextSibling;
25708
+ var _el$86 = _tmpl$2712(), _el$87 = _el$86.firstChild, _el$88 = _el$87.firstChild, _el$89 = _el$87.nextSibling, _el$90 = _el$89.firstChild, _el$91 = _el$90.nextSibling;
25588
25709
  _el$88.$$click = () => setComposing(false);
25589
25710
  _el$91.$$click = () => {
25590
25711
  switchChannel("support");
@@ -25629,7 +25750,7 @@ function MessagesPanel(props) {
25629
25750
  return memo(() => selectedConvo()?.source === "support")() && selectedConvo()?.status === "transferred";
25630
25751
  },
25631
25752
  get children() {
25632
- return _tmpl$3010();
25753
+ return _tmpl$3011();
25633
25754
  }
25634
25755
  }), null);
25635
25756
  return _el$98;
@@ -25649,7 +25770,7 @@ function MessagesPanel(props) {
25649
25770
  return thread().loadingMessages();
25650
25771
  },
25651
25772
  get children() {
25652
- return _tmpl$470();
25773
+ return _tmpl$471();
25653
25774
  }
25654
25775
  }), _el$110);
25655
25776
  insert(_el$108, createComponent(For, {
@@ -25835,9 +25956,9 @@ function MessagesPanel(props) {
25835
25956
  delegateEvents(["click", "input", "keydown"]);
25836
25957
  var _tmpl$406 = /* @__PURE__ */ template(`<ul class=history-list data-testid=history-list>`);
25837
25958
  var _tmpl$2129 = /* @__PURE__ */ template(`<div class=portal-state data-testid=history-error><p>We couldn't load your submitted surveys. Please try again in a moment.`);
25838
- var _tmpl$3102 = /* @__PURE__ */ template(`<div class=portal-state data-testid=history-empty><p>No submitted questionnaires yet.</p><p class=history-hint>Your intake and refill check-in answers will appear here once you've submitted them.`);
25839
- var _tmpl$471 = /* @__PURE__ */ template(`<li><button type=button class=history-row><span class=history-row__mode></span><span class=history-row__date></span><i class="ph-thin ph-caret-right portal-icon"aria-hidden=true>`);
25840
- var _tmpl$561 = /* @__PURE__ */ template(`<div data-testid=history-detail><button type=button class="portal-btn portal-btn--ghost history-back"><i class="ph-thin ph-caret-left portal-icon"aria-hidden=true></i> All questionnaires`);
25959
+ var _tmpl$3103 = /* @__PURE__ */ template(`<div class=portal-state data-testid=history-empty><p>No submitted questionnaires yet.</p><p class=history-hint>Your intake and refill check-in answers will appear here once you've submitted them.`);
25960
+ var _tmpl$474 = /* @__PURE__ */ template(`<li><button type=button class=history-row><span class=history-row__mode></span><span class=history-row__date></span><i class="ph-thin ph-caret-right portal-icon"aria-hidden=true>`);
25961
+ var _tmpl$563 = /* @__PURE__ */ template(`<div data-testid=history-detail><button type=button class="portal-btn portal-btn--ghost history-back"><i class="ph-thin ph-caret-left portal-icon"aria-hidden=true></i> All questionnaires`);
25841
25962
  var _tmpl$657 = /* @__PURE__ */ template(`<div class=portal-state><div class=request-status__spinner></div><p>Loading your answers\u2026`);
25842
25963
  var _tmpl$748 = /* @__PURE__ */ template(`<div class=portal-state data-testid=history-detail-error><p>We couldn't load this questionnaire. Please try again in a moment.`);
25843
25964
  var _tmpl$843 = /* @__PURE__ */ template(`<article class=history-transcript><header class=history-transcript__head><h2></h2><p class=history-transcript__meta>Submitted <!>. Your answers are shown exactly as they were at the time \u2014 they aren't updated afterwards.`);
@@ -25880,7 +26001,7 @@ function SurveyHistory() {
25880
26001
  return (list() ?? []).length > 0;
25881
26002
  },
25882
26003
  get fallback() {
25883
- return _tmpl$3102();
26004
+ return _tmpl$3103();
25884
26005
  },
25885
26006
  get children() {
25886
26007
  var _el$ = _tmpl$406();
@@ -25889,7 +26010,7 @@ function SurveyHistory() {
25889
26010
  return list();
25890
26011
  },
25891
26012
  children: (item) => (() => {
25892
- var _el$4 = _tmpl$471(), _el$5 = _el$4.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling;
26013
+ var _el$4 = _tmpl$474(), _el$5 = _el$4.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling;
25893
26014
  _el$5.$$click = () => setSelectedId(item.id);
25894
26015
  insert(_el$6, () => MODE_LABELS[item.mode] ?? "Questionnaire");
25895
26016
  insert(_el$7, () => formatDate3(item.submittedAt) ?? "Date unavailable");
@@ -25902,7 +26023,7 @@ function SurveyHistory() {
25902
26023
  }
25903
26024
  });
25904
26025
  const DetailView = () => (() => {
25905
- var _el$8 = _tmpl$561(), _el$9 = _el$8.firstChild;
26026
+ var _el$8 = _tmpl$563(), _el$9 = _el$8.firstChild;
25906
26027
  _el$9.$$click = () => setSelectedId(null);
25907
26028
  insert(_el$8, createComponent(Show, {
25908
26029
  get when() {
@@ -25982,9 +26103,9 @@ delegateEvents(["click"]);
25982
26103
  // src/pages/MemberPortal.tsx
25983
26104
  var _tmpl$407 = /* @__PURE__ */ template(`<span class=portal-item__live aria-label="In progress">`);
25984
26105
  var _tmpl$2130 = /* @__PURE__ */ template(`<span>`);
25985
- var _tmpl$3103 = /* @__PURE__ */ template(`<button type=button><i aria-hidden=true></i><span class=portal-item__label>`);
25986
- var _tmpl$474 = /* @__PURE__ */ template(`<div class=rx-others data-testid=rx-others><span class=lab-label>Other orders`);
25987
- var _tmpl$563 = /* @__PURE__ */ template(`<div class=rx-stack>`);
26106
+ var _tmpl$3104 = /* @__PURE__ */ template(`<button type=button><i aria-hidden=true></i><span class=portal-item__label>`);
26107
+ var _tmpl$475 = /* @__PURE__ */ template(`<div class=rx-others data-testid=rx-others><span class=lab-label>Other orders`);
26108
+ var _tmpl$564 = /* @__PURE__ */ template(`<div class=rx-stack>`);
25988
26109
  var _tmpl$658 = /* @__PURE__ */ template(`<div class=portal-state><div class=request-status__spinner></div><p>Loading your portal\u2026`);
25989
26110
  var _tmpl$749 = /* @__PURE__ */ template(`<div class="request-status__error portal-state"><p class=request-status__error-text></p><button type=button class="portal-btn portal-btn--ghost">Try again`);
25990
26111
  var _tmpl$844 = /* @__PURE__ */ template(`<p class=portal-rail__hi>Hi, `);
@@ -26119,7 +26240,7 @@ function MemberPortal(props) {
26119
26240
  return tabs();
26120
26241
  },
26121
26242
  children: (item) => (() => {
26122
- var _el$ = _tmpl$3103(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling;
26243
+ var _el$ = _tmpl$3104(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling;
26123
26244
  _el$.$$click = () => selectTab(item.key);
26124
26245
  insert(_el$3, () => item.label);
26125
26246
  insert(_el$, createComponent(Show, {
@@ -26193,7 +26314,7 @@ function MemberPortal(props) {
26193
26314
  });
26194
26315
  },
26195
26316
  children: (primary) => (() => {
26196
- var _el$6 = _tmpl$563();
26317
+ var _el$6 = _tmpl$564();
26197
26318
  insert(_el$6, createComponent(OrderTracker, {
26198
26319
  get request() {
26199
26320
  return data.toTrackerRequest(primary());
@@ -26223,7 +26344,7 @@ function MemberPortal(props) {
26223
26344
  return data.otherRx().length > 0;
26224
26345
  },
26225
26346
  get children() {
26226
- var _el$7 = _tmpl$474(); _el$7.firstChild;
26347
+ var _el$7 = _tmpl$475(); _el$7.firstChild;
26227
26348
  insert(_el$7, createComponent(For, {
26228
26349
  get each() {
26229
26350
  return data.otherRx();
@@ -26448,9 +26569,9 @@ function MemberPortal(props) {
26448
26569
  delegateEvents(["click"]);
26449
26570
  var _tmpl$408 = /* @__PURE__ */ template(`<div style="padding:1rem 1.25rem;border-radius:var(--app-affiliate-radius);background:var(--app-affiliate-warning-bg);color:var(--app-affiliate-warning-fg);border:1px solid var(--app-affiliate-border)">Your affiliate account is awaiting approval. Once an admin activates it, your referral link will start earning commissions.`);
26450
26571
  var _tmpl$2131 = /* @__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)>Overview`);
26451
- var _tmpl$3104 = /* @__PURE__ */ template(`<div style=color:var(--app-affiliate-fg-muted)>Loading stats\u2026`);
26452
- var _tmpl$475 = /* @__PURE__ */ template(`<div style="display:grid;grid-template-columns:repeat(auto-fit, minmax(180px, 1fr));gap:1rem">`);
26453
- var _tmpl$564 = /* @__PURE__ */ template(`<div style="padding:1.25rem;background:var(--app-affiliate-surface);border:1px solid var(--app-affiliate-border);border-radius:var(--app-affiliate-radius)"><div style=font-size:0.75rem;text-transform:uppercase;letter-spacing:0.05em;color:var(--app-affiliate-fg-muted);margin-bottom:0.5rem></div><div style=font-family:var(--app-affiliate-font-display);font-size:1.75rem;color:var(--app-affiliate-fg)>`);
26572
+ var _tmpl$3105 = /* @__PURE__ */ template(`<div style=color:var(--app-affiliate-fg-muted)>Loading stats\u2026`);
26573
+ var _tmpl$476 = /* @__PURE__ */ template(`<div style="display:grid;grid-template-columns:repeat(auto-fit, minmax(180px, 1fr));gap:1rem">`);
26574
+ var _tmpl$565 = /* @__PURE__ */ template(`<div style="padding:1.25rem;background:var(--app-affiliate-surface);border:1px solid var(--app-affiliate-border);border-radius:var(--app-affiliate-radius)"><div style=font-size:0.75rem;text-transform:uppercase;letter-spacing:0.05em;color:var(--app-affiliate-fg-muted);margin-bottom:0.5rem></div><div style=font-family:var(--app-affiliate-font-display);font-size:1.75rem;color:var(--app-affiliate-fg)>`);
26454
26575
  function formatMoney(cents) {
26455
26576
  return `$${(cents / 100).toFixed(2)}`;
26456
26577
  }
@@ -26497,16 +26618,16 @@ function AffiliateOverview() {
26497
26618
  return stats();
26498
26619
  },
26499
26620
  get fallback() {
26500
- return _tmpl$3104();
26621
+ return _tmpl$3105();
26501
26622
  },
26502
26623
  children: (s) => (() => {
26503
- var _el$5 = _tmpl$475();
26624
+ var _el$5 = _tmpl$476();
26504
26625
  insert(_el$5, createComponent(For, {
26505
26626
  get each() {
26506
26627
  return cards(s());
26507
26628
  },
26508
26629
  children: (card) => (() => {
26509
- var _el$6 = _tmpl$564(), _el$7 = _el$6.firstChild, _el$8 = _el$7.nextSibling;
26630
+ var _el$6 = _tmpl$565(), _el$7 = _el$6.firstChild, _el$8 = _el$7.nextSibling;
26510
26631
  insert(_el$7, () => card.label);
26511
26632
  insert(_el$8, () => card.value);
26512
26633
  return _el$6;
@@ -26520,9 +26641,9 @@ function AffiliateOverview() {
26520
26641
  }
26521
26642
  var _tmpl$409 = /* @__PURE__ */ template(`<div style="background:var(--app-affiliate-surface);border:1px solid var(--app-affiliate-border);border-radius:var(--app-affiliate-radius);overflow:hidden"><table class=app-affiliate-table style=width:100%;border-collapse:collapse;font-size:0.875rem><thead><tr style=background:var(--app-affiliate-surface-light)><th>Date</th><th>Type</th><th>Order total</th><th>Commission</th><th>Status</th></tr></thead><tbody>`);
26522
26643
  var _tmpl$2132 = /* @__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)>Conversions`);
26523
- var _tmpl$3105 = /* @__PURE__ */ template(`<div style="padding:2rem;background:var(--app-affiliate-surface);border:1px solid var(--app-affiliate-border);border-radius:var(--app-affiliate-radius);color:var(--app-affiliate-fg-muted);text-align:center">No conversions yet. Share your referral link to start earning.`);
26524
- var _tmpl$476 = /* @__PURE__ */ template(`<span title="Override commission earned on a sub-affiliate's sale"style="margin-left:0.4rem;padding:0.1rem 0.45rem;border-radius:999px;font-size:0.65rem;font-weight:600;background:var(--app-affiliate-primary-soft);color:var(--app-affiliate-primary-soft-fg)">Override`);
26525
- var _tmpl$565 = /* @__PURE__ */ template(`<tr style="border-top:1px solid var(--app-affiliate-border)"><td data-label=Date></td><td data-label=Type></td><td data-label="Order total"></td><td data-label=Commission style=color:var(--app-affiliate-fg);font-weight:600></td><td data-label=Status><span style="padding:0.2rem 0.6rem;border-radius:999px;font-size:0.75rem;font-weight:600">`);
26644
+ var _tmpl$3106 = /* @__PURE__ */ template(`<div style="padding:2rem;background:var(--app-affiliate-surface);border:1px solid var(--app-affiliate-border);border-radius:var(--app-affiliate-radius);color:var(--app-affiliate-fg-muted);text-align:center">No conversions yet. Share your referral link to start earning.`);
26645
+ var _tmpl$477 = /* @__PURE__ */ template(`<span title="Override commission earned on a sub-affiliate's sale"style="margin-left:0.4rem;padding:0.1rem 0.45rem;border-radius:999px;font-size:0.65rem;font-weight:600;background:var(--app-affiliate-primary-soft);color:var(--app-affiliate-primary-soft-fg)">Override`);
26646
+ var _tmpl$566 = /* @__PURE__ */ template(`<tr style="border-top:1px solid var(--app-affiliate-border)"><td data-label=Date></td><td data-label=Type></td><td data-label="Order total"></td><td data-label=Commission style=color:var(--app-affiliate-fg);font-weight:600></td><td data-label=Status><span style="padding:0.2rem 0.6rem;border-radius:999px;font-size:0.75rem;font-weight:600">`);
26526
26647
  function formatMoney2(cents) {
26527
26648
  return `$${(cents / 100).toFixed(2)}`;
26528
26649
  }
@@ -26566,7 +26687,7 @@ function AffiliateConversions() {
26566
26687
  return (conversions() ?? []).length > 0;
26567
26688
  },
26568
26689
  get fallback() {
26569
- return _tmpl$3105();
26690
+ return _tmpl$3106();
26570
26691
  },
26571
26692
  get children() {
26572
26693
  var _el$3 = _tmpl$409(), _el$4 = _el$3.firstChild, _el$5 = _el$4.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$6.firstChild, _el$8 = _el$7.nextSibling, _el$9 = _el$8.nextSibling, _el$0 = _el$9.nextSibling, _el$1 = _el$0.nextSibling, _el$10 = _el$5.nextSibling;
@@ -26575,7 +26696,7 @@ function AffiliateConversions() {
26575
26696
  return conversions();
26576
26697
  },
26577
26698
  children: (c) => (() => {
26578
- var _el$12 = _tmpl$565(), _el$13 = _el$12.firstChild, _el$14 = _el$13.nextSibling, _el$16 = _el$14.nextSibling, _el$17 = _el$16.nextSibling, _el$18 = _el$17.nextSibling, _el$19 = _el$18.firstChild;
26699
+ var _el$12 = _tmpl$566(), _el$13 = _el$12.firstChild, _el$14 = _el$13.nextSibling, _el$16 = _el$14.nextSibling, _el$17 = _el$16.nextSibling, _el$18 = _el$17.nextSibling, _el$19 = _el$18.firstChild;
26579
26700
  insert(_el$13, () => formatDate4(c.createdAt));
26580
26701
  insert(_el$14, () => c.paymentType, null);
26581
26702
  insert(_el$14, createComponent(Show, {
@@ -26583,7 +26704,7 @@ function AffiliateConversions() {
26583
26704
  return c.tier === 2;
26584
26705
  },
26585
26706
  get children() {
26586
- return _tmpl$476();
26707
+ return _tmpl$477();
26587
26708
  }
26588
26709
  }), null);
26589
26710
  insert(_el$16, () => formatMoney2(c.orderTotalCents));
@@ -26654,10 +26775,10 @@ function td() {
26654
26775
  color: "var(--app-affiliate-fg)"
26655
26776
  };
26656
26777
  }
26657
- var _tmpl$477 = /* @__PURE__ */ template(`<div style="background:var(--app-affiliate-surface);border:1px solid var(--app-affiliate-border);border-radius:var(--app-affiliate-radius);overflow:hidden"><table class=app-affiliate-table style=width:100%;border-collapse:collapse;font-size:0.875rem><thead><tr style=background:var(--app-affiliate-surface-light)><th>Code</th><th>Name</th><th>Status</th><th>Joined</th></tr></thead><tbody>`);
26778
+ var _tmpl$478 = /* @__PURE__ */ template(`<div style="background:var(--app-affiliate-surface);border:1px solid var(--app-affiliate-border);border-radius:var(--app-affiliate-radius);overflow:hidden"><table class=app-affiliate-table style=width:100%;border-collapse:collapse;font-size:0.875rem><thead><tr style=background:var(--app-affiliate-surface-light)><th>Code</th><th>Name</th><th>Status</th><th>Joined</th></tr></thead><tbody>`);
26658
26779
  var _tmpl$2133 = /* @__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)>Downline</h1><p style=margin:0;color:var(--app-affiliate-fg-muted);font-size:0.875rem>Affiliates you've referred. You earn an override commission on every qualifying sale they make \u2014 those show up as \u201COverride\u201D rows on your Conversions.`);
26659
- var _tmpl$3106 = /* @__PURE__ */ template(`<div style="padding:2rem;background:var(--app-affiliate-surface);border:1px solid var(--app-affiliate-border);border-radius:var(--app-affiliate-radius);color:var(--app-affiliate-fg-muted);text-align:center">No sub-affiliates yet.`);
26660
- var _tmpl$478 = /* @__PURE__ */ template(`<tr style="border-top:1px solid var(--app-affiliate-border)"><td data-label=Code style=font-family:var(--app-affiliate-font-mono)></td><td data-label=Name></td><td data-label=Status><span style="padding:0.2rem 0.6rem;border-radius:999px;font-size:0.75rem;font-weight:600"></span></td><td data-label=Joined>`);
26780
+ var _tmpl$3107 = /* @__PURE__ */ template(`<div style="padding:2rem;background:var(--app-affiliate-surface);border:1px solid var(--app-affiliate-border);border-radius:var(--app-affiliate-radius);color:var(--app-affiliate-fg-muted);text-align:center">No sub-affiliates yet.`);
26781
+ var _tmpl$479 = /* @__PURE__ */ template(`<tr style="border-top:1px solid var(--app-affiliate-border)"><td data-label=Code style=font-family:var(--app-affiliate-font-mono)></td><td data-label=Name></td><td data-label=Status><span style="padding:0.2rem 0.6rem;border-radius:999px;font-size:0.75rem;font-weight:600"></span></td><td data-label=Joined>`);
26661
26782
  function formatDate5(iso) {
26662
26783
  const d = new Date(iso);
26663
26784
  if (Number.isNaN(d.getTime())) return iso;
@@ -26696,16 +26817,16 @@ function AffiliateDownline() {
26696
26817
  return (downline() ?? []).length > 0;
26697
26818
  },
26698
26819
  get fallback() {
26699
- return _tmpl$3106();
26820
+ return _tmpl$3107();
26700
26821
  },
26701
26822
  get children() {
26702
- var _el$4 = _tmpl$477(), _el$5 = _el$4.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$6.firstChild, _el$8 = _el$7.firstChild, _el$9 = _el$8.nextSibling, _el$0 = _el$9.nextSibling, _el$1 = _el$0.nextSibling, _el$10 = _el$6.nextSibling;
26823
+ var _el$4 = _tmpl$478(), _el$5 = _el$4.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$6.firstChild, _el$8 = _el$7.firstChild, _el$9 = _el$8.nextSibling, _el$0 = _el$9.nextSibling, _el$1 = _el$0.nextSibling, _el$10 = _el$6.nextSibling;
26703
26824
  insert(_el$10, createComponent(For, {
26704
26825
  get each() {
26705
26826
  return downline();
26706
26827
  },
26707
26828
  children: (d) => (() => {
26708
- var _el$12 = _tmpl$478(), _el$13 = _el$12.firstChild, _el$14 = _el$13.nextSibling, _el$15 = _el$14.nextSibling, _el$16 = _el$15.firstChild, _el$17 = _el$15.nextSibling;
26829
+ var _el$12 = _tmpl$479(), _el$13 = _el$12.firstChild, _el$14 = _el$13.nextSibling, _el$15 = _el$14.nextSibling, _el$16 = _el$15.firstChild, _el$17 = _el$15.nextSibling;
26709
26830
  insert(_el$13, () => d.affiliateCode);
26710
26831
  insert(_el$14, () => [d.firstName, d.lastName].filter(Boolean).join(" ") || "\u2014");
26711
26832
  insert(_el$16, () => d.status);
@@ -26768,9 +26889,9 @@ function td2() {
26768
26889
  color: "var(--app-affiliate-fg)"
26769
26890
  };
26770
26891
  }
26771
- var _tmpl$479 = /* @__PURE__ */ template(`<div style="padding:1.5rem;background:var(--app-affiliate-surface);border:1px solid var(--app-affiliate-border);border-radius:var(--app-affiliate-radius);display:flex;flex-direction:column;gap:0.75rem"><div style=font-size:0.75rem;text-transform:uppercase;letter-spacing:0.05em;color:var(--app-affiliate-fg-muted)>Share this link</div><div style=display:flex;gap:0.5rem;align-items:stretch;flex-wrap:wrap><code style="flex:1;min-width:16rem;padding:0.75rem 1rem;background:var(--app-affiliate-surface-light);border-radius:var(--app-affiliate-radius-sm);font-family:var(--app-affiliate-font-mono);color:var(--app-affiliate-fg);word-break:break-all"></code><button type=button style="padding:0.75rem 1.25rem;background:var(--app-affiliate-primary);color:var(--app-affiliate-primary-fg);border:none;border-radius:var(--app-affiliate-radius-sm);font-weight:600;cursor:pointer"></button></div><div style=font-size:0.875rem;color:var(--app-affiliate-fg-muted)>Anyone who visits this URL has a tracking cookie set for the duration of your program. If they sign up and subscribe within the cookie window, you earn commission on the conversion.`);
26892
+ var _tmpl$480 = /* @__PURE__ */ template(`<div style="padding:1.5rem;background:var(--app-affiliate-surface);border:1px solid var(--app-affiliate-border);border-radius:var(--app-affiliate-radius);display:flex;flex-direction:column;gap:0.75rem"><div style=font-size:0.75rem;text-transform:uppercase;letter-spacing:0.05em;color:var(--app-affiliate-fg-muted)>Share this link</div><div style=display:flex;gap:0.5rem;align-items:stretch;flex-wrap:wrap><code style="flex:1;min-width:16rem;padding:0.75rem 1rem;background:var(--app-affiliate-surface-light);border-radius:var(--app-affiliate-radius-sm);font-family:var(--app-affiliate-font-mono);color:var(--app-affiliate-fg);word-break:break-all"></code><button type=button style="padding:0.75rem 1.25rem;background:var(--app-affiliate-primary);color:var(--app-affiliate-primary-fg);border:none;border-radius:var(--app-affiliate-radius-sm);font-weight:600;cursor:pointer"></button></div><div style=font-size:0.875rem;color:var(--app-affiliate-fg-muted)>Anyone who visits this URL has a tracking cookie set for the duration of your program. If they sign up and subscribe within the cookie window, you earn commission on the conversion.`);
26772
26893
  var _tmpl$2134 = /* @__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)>Referral link`);
26773
- var _tmpl$3107 = /* @__PURE__ */ template(`<div style=color:var(--app-affiliate-fg-muted)>Your referral link will appear here once your account is approved.`);
26894
+ var _tmpl$3108 = /* @__PURE__ */ template(`<div style=color:var(--app-affiliate-fg-muted)>Your referral link will appear here once your account is approved.`);
26774
26895
  function AffiliateReferralLink() {
26775
26896
  const {
26776
26897
  links
@@ -26801,10 +26922,10 @@ function AffiliateReferralLink() {
26801
26922
  return homepageLink();
26802
26923
  },
26803
26924
  get fallback() {
26804
- return _tmpl$3107();
26925
+ return _tmpl$3108();
26805
26926
  },
26806
26927
  get children() {
26807
- var _el$3 = _tmpl$479(), _el$4 = _el$3.firstChild, _el$5 = _el$4.nextSibling, _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling; _el$5.nextSibling;
26928
+ var _el$3 = _tmpl$480(), _el$4 = _el$3.firstChild, _el$5 = _el$4.nextSibling, _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling; _el$5.nextSibling;
26808
26929
  insert(_el$6, homepageLink);
26809
26930
  _el$7.$$click = copy;
26810
26931
  insert(_el$7, () => copied() ? "Copied" : "Copy");
@@ -26815,10 +26936,10 @@ function AffiliateReferralLink() {
26815
26936
  })();
26816
26937
  }
26817
26938
  delegateEvents(["click"]);
26818
- var _tmpl$480 = /* @__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.`);
26939
+ var _tmpl$481 = /* @__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.`);
26819
26940
  var _tmpl$2135 = /* @__PURE__ */ template(`<div style=color:var(--app-affiliate-fg-muted)>Loading\u2026`);
26820
- var _tmpl$3108 = /* @__PURE__ */ template(`<div style="background:var(--app-affiliate-surface);border:1px solid var(--app-affiliate-border);border-radius:var(--app-affiliate-radius);overflow:hidden">`);
26821
- var _tmpl$481 = /* @__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)>`);
26941
+ var _tmpl$3109 = /* @__PURE__ */ template(`<div style="background:var(--app-affiliate-surface);border:1px solid var(--app-affiliate-border);border-radius:var(--app-affiliate-radius);overflow:hidden">`);
26942
+ var _tmpl$484 = /* @__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)>`);
26822
26943
  var STATUS_LABEL2 = {
26823
26944
  pending: "Pending approval",
26824
26945
  active: "Active",
@@ -26853,7 +26974,7 @@ function AffiliateSettings() {
26853
26974
  value: a.paymentEmail ?? "\u2014"
26854
26975
  }];
26855
26976
  return (() => {
26856
- var _el$ = _tmpl$480(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling, _el$4 = _el$3.firstChild; _el$3.nextSibling;
26977
+ var _el$ = _tmpl$481(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling, _el$4 = _el$3.firstChild; _el$3.nextSibling;
26857
26978
  insert(_el$, createComponent(Show, {
26858
26979
  get when() {
26859
26980
  return affiliate();
@@ -26862,13 +26983,13 @@ function AffiliateSettings() {
26862
26983
  return _tmpl$2135();
26863
26984
  },
26864
26985
  children: (a) => (() => {
26865
- var _el$7 = _tmpl$3108();
26986
+ var _el$7 = _tmpl$3109();
26866
26987
  insert(_el$7, createComponent(For, {
26867
26988
  get each() {
26868
26989
  return rows(a());
26869
26990
  },
26870
26991
  children: (row) => (() => {
26871
- var _el$8 = _tmpl$481(), _el$9 = _el$8.firstChild, _el$0 = _el$9.nextSibling;
26992
+ var _el$8 = _tmpl$484(), _el$9 = _el$8.firstChild, _el$0 = _el$9.nextSibling;
26872
26993
  insert(_el$9, () => row.label);
26873
26994
  insert(_el$0, () => row.value);
26874
26995
  return _el$8;
@@ -26884,10 +27005,10 @@ function AffiliateSettings() {
26884
27005
  delegateEvents(["click"]);
26885
27006
 
26886
27007
  // src/pages/AffiliatePortal.tsx
26887
- var _tmpl$484 = /* @__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>`);
27008
+ var _tmpl$485 = /* @__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>`);
26888
27009
  var _tmpl$2136 = /* @__PURE__ */ template(`<span style=font-size:1rem;opacity:0.7;flex-shrink:0>`);
26889
- var _tmpl$3109 = /* @__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">`);
26890
- var _tmpl$485 = /* @__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); } }`);
27010
+ var _tmpl$3115 = /* @__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">`);
27011
+ var _tmpl$486 = /* @__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); } }`);
26891
27012
  var TAB_LABELS2 = {
26892
27013
  overview: "Overview",
26893
27014
  conversions: "Conversions",
@@ -26932,7 +27053,7 @@ function AffiliatePortal(props) {
26932
27053
  });
26933
27054
  },
26934
27055
  get children() {
26935
- var _el$ = _tmpl$484(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling, _el$5 = _el$2.nextSibling, _el$6 = _el$5.nextSibling, _el$7 = _el$6.firstChild, _el$8 = _el$7.firstChild, _el$9 = _el$8.nextSibling, _el$0 = _el$6.nextSibling;
27056
+ var _el$ = _tmpl$485(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling, _el$5 = _el$2.nextSibling, _el$6 = _el$5.nextSibling, _el$7 = _el$6.firstChild, _el$8 = _el$7.firstChild, _el$9 = _el$8.nextSibling, _el$0 = _el$6.nextSibling;
26936
27057
  _el$3.$$click = () => setDrawerOpen(true);
26937
27058
  insert(_el$4, () => TAB_LABELS2[currentTab()]);
26938
27059
  _el$5.$$click = () => setDrawerOpen(false);
@@ -26941,7 +27062,7 @@ function AffiliatePortal(props) {
26941
27062
  return orderedTabs();
26942
27063
  },
26943
27064
  children: (tab) => (() => {
26944
- var _el$1 = _tmpl$3109();
27065
+ var _el$1 = _tmpl$3115();
26945
27066
  _el$1.$$click = () => handleTabClick(tab);
26946
27067
  insert(_el$1, createComponent(Show, {
26947
27068
  get when() {
@@ -27030,7 +27151,7 @@ function AffiliatePortal(props) {
27030
27151
  }
27031
27152
  function AffiliateGateSpinner(props) {
27032
27153
  return (() => {
27033
- var _el$11 = _tmpl$485(); _el$11.firstChild;
27154
+ var _el$11 = _tmpl$486(); _el$11.firstChild;
27034
27155
  effect((_p$) => {
27035
27156
  var _v$8 = props.topOffset, _v$9 = `calc(100vh - ${props.topOffset})`;
27036
27157
  _v$8 !== _p$.e && setStyleProperty(_el$11, "top", _p$.e = _v$8);
@@ -27044,11 +27165,11 @@ function AffiliateGateSpinner(props) {
27044
27165
  })();
27045
27166
  }
27046
27167
  delegateEvents(["click"]);
27047
- var _tmpl$486 = /* @__PURE__ */ template(`<div style=position:relative><input><button type=button style="position:absolute;top:0;right:0;height:100%;display:flex;align-items:center;padding:0 0.75rem;background:transparent;border:none;color:var(--app-affiliate-fg-muted);cursor:pointer;font-size:0.75rem;font-weight:600;text-transform:uppercase;letter-spacing:0.05em">`);
27168
+ var _tmpl$487 = /* @__PURE__ */ template(`<div style=position:relative><input><button type=button style="position:absolute;top:0;right:0;height:100%;display:flex;align-items:center;padding:0 0.75rem;background:transparent;border:none;color:var(--app-affiliate-fg-muted);cursor:pointer;font-size:0.75rem;font-weight:600;text-transform:uppercase;letter-spacing:0.05em">`);
27048
27169
  function AffiliatePasswordInput(props) {
27049
27170
  const [visible, setVisible] = createSignal(false);
27050
27171
  return (() => {
27051
- var _el$ = _tmpl$486(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling;
27172
+ var _el$ = _tmpl$487(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling;
27052
27173
  _el$2.$$input = (e) => props.onInput(e.currentTarget.value);
27053
27174
  _el$3.$$click = () => setVisible((v) => !v);
27054
27175
  insert(_el$3, () => visible() ? "Hide" : "Show");
@@ -27089,11 +27210,11 @@ function inputStyle() {
27089
27210
  delegateEvents(["input", "click"]);
27090
27211
 
27091
27212
  // src/pages/AffiliateRegister.tsx
27092
- var _tmpl$487 = /* @__PURE__ */ template(`<input type=text required autocomplete=given-name>`);
27213
+ var _tmpl$488 = /* @__PURE__ */ template(`<input type=text required autocomplete=given-name>`);
27093
27214
  var _tmpl$2137 = /* @__PURE__ */ template(`<input type=text required autocomplete=family-name>`);
27094
- var _tmpl$3115 = /* @__PURE__ */ template(`<input type=email required autocomplete=email>`);
27095
- var _tmpl$488 = /* @__PURE__ */ template(`<input type=text required minlength=4>`);
27096
- var _tmpl$566 = /* @__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">`);
27215
+ var _tmpl$3116 = /* @__PURE__ */ template(`<input type=email required autocomplete=email>`);
27216
+ var _tmpl$489 = /* @__PURE__ */ template(`<input type=text required minlength=4>`);
27217
+ var _tmpl$567 = /* @__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">`);
27097
27218
  var _tmpl$659 = /* @__PURE__ */ template(`<button type=button>Already have an account? Log in`);
27098
27219
  var _tmpl$750 = /* @__PURE__ */ template(`<form style=display:flex;flex-direction:column;gap:0.875rem><div style="padding:0.625rem 0.875rem;background:var(--app-affiliate-surface-light);border:1px solid var(--app-affiliate-border);border-radius:var(--app-affiliate-radius-sm);font-size:0.8125rem;line-height:1.5;color:var(--app-affiliate-fg-muted)">A customer's purchase earns you commission only if they reached the site through your referral link \u2014 the site address with <code>?ref=</code> appended:<div style=font-weight:600;word-break:break-all;margin-top:0.25rem;color:var(--app-affiliate-fg)>/?ref=</div>Make sure any marketing materials use that full link for tracking, not just the website address itself.</div><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">`);
27099
27220
  var _tmpl$845 = /* @__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:28rem;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"><div><h1 style="font-family:var(--app-affiliate-font-display);margin:0 0 0.5rem;font-size:1.5rem">Become an affiliate</h1><p style=margin:0;color:var(--app-affiliate-fg-muted);font-size:0.875rem>New applications are reviewed by an admin before activation.`);
@@ -27144,7 +27265,7 @@ function AffiliateRegister(props) {
27144
27265
  insert(_el$6, createComponent(Row2, {
27145
27266
  label: "First name",
27146
27267
  get children() {
27147
- var _el$7 = _tmpl$487();
27268
+ var _el$7 = _tmpl$488();
27148
27269
  _el$7.$$input = (e) => setFirstName(e.currentTarget.value);
27149
27270
  effect((_$p) => style(_el$7, inputStyle2(), _$p));
27150
27271
  effect(() => _el$7.value = firstName());
@@ -27164,7 +27285,7 @@ function AffiliateRegister(props) {
27164
27285
  insert(_el$6, createComponent(Row2, {
27165
27286
  label: "Email",
27166
27287
  get children() {
27167
- var _el$9 = _tmpl$3115();
27288
+ var _el$9 = _tmpl$3116();
27168
27289
  _el$9.$$input = (e) => setEmail(e.currentTarget.value);
27169
27290
  effect((_$p) => style(_el$9, inputStyle2(), _$p));
27170
27291
  effect(() => _el$9.value = email());
@@ -27190,7 +27311,7 @@ function AffiliateRegister(props) {
27190
27311
  label: "Affiliate code",
27191
27312
  hint: "The handle in your referral URL (4+ characters)",
27192
27313
  get children() {
27193
- var _el$0 = _tmpl$488();
27314
+ var _el$0 = _tmpl$489();
27194
27315
  _el$0.$$input = (e) => setAffiliateCode(e.currentTarget.value);
27195
27316
  effect((_$p) => style(_el$0, inputStyle2(), _$p));
27196
27317
  effect(() => _el$0.value = affiliateCode());
@@ -27205,7 +27326,7 @@ function AffiliateRegister(props) {
27205
27326
  return error();
27206
27327
  },
27207
27328
  get children() {
27208
- var _el$17 = _tmpl$566();
27329
+ var _el$17 = _tmpl$567();
27209
27330
  insert(_el$17, error);
27210
27331
  return _el$17;
27211
27332
  }
@@ -27283,10 +27404,10 @@ function linkStyle() {
27283
27404
  };
27284
27405
  }
27285
27406
  delegateEvents(["input", "click"]);
27286
- var _tmpl$489 = /* @__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">`);
27407
+ var _tmpl$490 = /* @__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">`);
27287
27408
  var _tmpl$2138 = /* @__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?`);
27288
- var _tmpl$3116 = /* @__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`);
27289
- var _tmpl$490 = /* @__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">`);
27409
+ var _tmpl$3117 = /* @__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`);
27410
+ var _tmpl$491 = /* @__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">`);
27290
27411
  function AffiliateLogin(props) {
27291
27412
  const [email, setEmail] = createSignal("");
27292
27413
  const [password, setPassword] = createSignal("");
@@ -27306,7 +27427,7 @@ function AffiliateLogin(props) {
27306
27427
  }
27307
27428
  }
27308
27429
  return (() => {
27309
- var _el$ = _tmpl$490(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling, _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$1 = _el$8.nextSibling;
27430
+ var _el$ = _tmpl$491(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling, _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$1 = _el$8.nextSibling;
27310
27431
  _el$4.addEventListener("submit", handleSubmit);
27311
27432
  _el$7.$$input = (e) => setEmail(e.currentTarget.value);
27312
27433
  insert(_el$8, createComponent(AffiliatePasswordInput, {
@@ -27322,7 +27443,7 @@ function AffiliateLogin(props) {
27322
27443
  return error();
27323
27444
  },
27324
27445
  get children() {
27325
- var _el$0 = _tmpl$489();
27446
+ var _el$0 = _tmpl$490();
27326
27447
  insert(_el$0, error);
27327
27448
  return _el$0;
27328
27449
  }
@@ -27343,7 +27464,7 @@ function AffiliateLogin(props) {
27343
27464
  return props.onNavigateRegister;
27344
27465
  },
27345
27466
  get children() {
27346
- var _el$11 = _tmpl$3116();
27467
+ var _el$11 = _tmpl$3117();
27347
27468
  _el$11.$$click = () => props.onNavigateRegister?.();
27348
27469
  return _el$11;
27349
27470
  }
@@ -27391,11 +27512,11 @@ function inputStyle3() {
27391
27512
  };
27392
27513
  }
27393
27514
  delegateEvents(["input", "click"]);
27394
- var _tmpl$491 = /* @__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">`);
27515
+ var _tmpl$494 = /* @__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">`);
27395
27516
  var _tmpl$2139 = /* @__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">`);
27396
- var _tmpl$3117 = /* @__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`);
27397
- var _tmpl$494 = /* @__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">`);
27398
- var _tmpl$567 = /* @__PURE__ */ template(`<p style=margin:0;font-size:0.8125rem;opacity:0.8>The link is good for one hour. If nothing arrives, check your spam folder \u2014 and make sure this is the address you signed up with.`);
27517
+ var _tmpl$3118 = /* @__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`);
27518
+ var _tmpl$495 = /* @__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">`);
27519
+ var _tmpl$568 = /* @__PURE__ */ template(`<p style=margin:0;font-size:0.8125rem;opacity:0.8>The link is good for one hour. If nothing arrives, check your spam folder \u2014 and make sure this is the address you signed up with.`);
27399
27520
  var _tmpl$660 = /* @__PURE__ */ template(`<button type=button 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;cursor:pointer">Back to sign in`);
27400
27521
  function ForgotPasswordPage(props) {
27401
27522
  const [email, setEmail] = createSignal("");
@@ -27419,17 +27540,17 @@ function ForgotPasswordPage(props) {
27419
27540
  }
27420
27541
  }
27421
27542
  return (() => {
27422
- var _el$ = _tmpl$3117(), _el$2 = _el$.firstChild; _el$2.firstChild;
27543
+ var _el$ = _tmpl$3118(), _el$2 = _el$.firstChild; _el$2.firstChild;
27423
27544
  insert(_el$2, createComponent(Show, {
27424
27545
  get when() {
27425
27546
  return !message();
27426
27547
  },
27427
27548
  get fallback() {
27428
27549
  return [(() => {
27429
- var _el$0 = _tmpl$494();
27550
+ var _el$0 = _tmpl$495();
27430
27551
  insert(_el$0, message);
27431
27552
  return _el$0;
27432
- })(), _tmpl$567(), createComponent(Show, {
27553
+ })(), _tmpl$568(), createComponent(Show, {
27433
27554
  get when() {
27434
27555
  return props.onDone;
27435
27556
  },
@@ -27449,7 +27570,7 @@ function ForgotPasswordPage(props) {
27449
27570
  return error();
27450
27571
  },
27451
27572
  get children() {
27452
- var _el$8 = _tmpl$491();
27573
+ var _el$8 = _tmpl$494();
27453
27574
  insert(_el$8, error);
27454
27575
  return _el$8;
27455
27576
  }
@@ -27499,10 +27620,10 @@ function inputStyle4() {
27499
27620
  };
27500
27621
  }
27501
27622
  delegateEvents(["input", "click"]);
27502
- var _tmpl$495 = /* @__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">`);
27623
+ var _tmpl$496 = /* @__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">`);
27503
27624
  var _tmpl$2140 = /* @__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">`);
27504
- var _tmpl$3118 = /* @__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`);
27505
- var _tmpl$496 = /* @__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">`);
27625
+ var _tmpl$3119 = /* @__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`);
27626
+ var _tmpl$497 = /* @__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">`);
27506
27627
  function queryParam(name) {
27507
27628
  if (typeof window === "undefined") return "";
27508
27629
  return new URLSearchParams(window.location.search).get(name) ?? "";
@@ -27542,14 +27663,14 @@ function ResetPasswordPage(props) {
27542
27663
  }
27543
27664
  }
27544
27665
  return (() => {
27545
- var _el$ = _tmpl$3118(), _el$2 = _el$.firstChild; _el$2.firstChild;
27666
+ var _el$ = _tmpl$3119(), _el$2 = _el$.firstChild; _el$2.firstChild;
27546
27667
  insert(_el$2, createComponent(Show, {
27547
27668
  get when() {
27548
27669
  return !message();
27549
27670
  },
27550
27671
  get fallback() {
27551
27672
  return (() => {
27552
- var _el$11 = _tmpl$496();
27673
+ var _el$11 = _tmpl$497();
27553
27674
  insert(_el$11, message);
27554
27675
  return _el$11;
27555
27676
  })();
@@ -27564,7 +27685,7 @@ function ResetPasswordPage(props) {
27564
27685
  return error();
27565
27686
  },
27566
27687
  get children() {
27567
- var _el$1 = _tmpl$495();
27688
+ var _el$1 = _tmpl$496();
27568
27689
  insert(_el$1, error);
27569
27690
  return _el$1;
27570
27691
  }
@@ -27619,11 +27740,11 @@ function inputStyle5() {
27619
27740
  };
27620
27741
  }
27621
27742
  delegateEvents(["input"]);
27622
- var _tmpl$497 = /* @__PURE__ */ template(`<div>`);
27743
+ var _tmpl$498 = /* @__PURE__ */ template(`<div>`);
27623
27744
  var _tmpl$2141 = /* @__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>`);
27624
- var _tmpl$3119 = /* @__PURE__ */ template(`<button type=button>Back to login`);
27625
- var _tmpl$498 = /* @__PURE__ */ template(`<div class=app-affiliate-root><div><h1>Reset your password`);
27626
- var _tmpl$568 = /* @__PURE__ */ template(`<p style=margin:0;font-size:0.9rem>`);
27745
+ var _tmpl$3120 = /* @__PURE__ */ template(`<button type=button>Back to login`);
27746
+ var _tmpl$499 = /* @__PURE__ */ template(`<div class=app-affiliate-root><div><h1>Reset your password`);
27747
+ var _tmpl$569 = /* @__PURE__ */ template(`<p style=margin:0;font-size:0.9rem>`);
27627
27748
  function AffiliateForgotPassword(props) {
27628
27749
  const [email, setEmail] = createSignal("");
27629
27750
  const [submitting, setSubmitting] = createSignal(false);
@@ -27646,14 +27767,14 @@ function AffiliateForgotPassword(props) {
27646
27767
  }
27647
27768
  }
27648
27769
  return (() => {
27649
- var _el$ = _tmpl$498(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild;
27770
+ var _el$ = _tmpl$499(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild;
27650
27771
  insert(_el$2, createComponent(Show, {
27651
27772
  get when() {
27652
27773
  return !message();
27653
27774
  },
27654
27775
  get fallback() {
27655
27776
  return (() => {
27656
- var _el$1 = _tmpl$568();
27777
+ var _el$1 = _tmpl$569();
27657
27778
  insert(_el$1, message);
27658
27779
  return _el$1;
27659
27780
  })();
@@ -27667,7 +27788,7 @@ function AffiliateForgotPassword(props) {
27667
27788
  return error();
27668
27789
  },
27669
27790
  get children() {
27670
- var _el$8 = _tmpl$497();
27791
+ var _el$8 = _tmpl$498();
27671
27792
  insert(_el$8, error);
27672
27793
  effect((_$p) => style(_el$8, errorStyle(), _$p));
27673
27794
  return _el$8;
@@ -27696,7 +27817,7 @@ function AffiliateForgotPassword(props) {
27696
27817
  return props.onNavigateLogin;
27697
27818
  },
27698
27819
  get children() {
27699
- var _el$0 = _tmpl$3119();
27820
+ var _el$0 = _tmpl$3120();
27700
27821
  _el$0.$$click = () => props.onNavigateLogin?.();
27701
27822
  effect((_$p) => style(_el$0, linkStyle2(), _$p));
27702
27823
  return _el$0;
@@ -27802,9 +27923,9 @@ function linkStyle2() {
27802
27923
  };
27803
27924
  }
27804
27925
  delegateEvents(["input", "click"]);
27805
- var _tmpl$499 = /* @__PURE__ */ template(`<div>`);
27926
+ var _tmpl$500 = /* @__PURE__ */ template(`<div>`);
27806
27927
  var _tmpl$2142 = /* @__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>`);
27807
- var _tmpl$3120 = /* @__PURE__ */ template(`<div class=app-affiliate-root><div><h1>Choose a new password`);
27928
+ var _tmpl$3121 = /* @__PURE__ */ template(`<div class=app-affiliate-root><div><h1>Choose a new password`);
27808
27929
  var _tmpl$4100 = /* @__PURE__ */ template(`<p style=margin:0;font-size:0.9rem>Your password has been reset. You can now log in with your new password.`);
27809
27930
  function queryParam2(name) {
27810
27931
  if (typeof window === "undefined") return "";
@@ -27849,7 +27970,7 @@ function AffiliateResetPassword(props) {
27849
27970
  }
27850
27971
  }
27851
27972
  return (() => {
27852
- var _el$ = _tmpl$3120(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild;
27973
+ var _el$ = _tmpl$3121(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild;
27853
27974
  insert(_el$2, createComponent(Show, {
27854
27975
  get when() {
27855
27976
  return !done();
@@ -27883,7 +28004,7 @@ function AffiliateResetPassword(props) {
27883
28004
  return error();
27884
28005
  },
27885
28006
  get children() {
27886
- var _el$9 = _tmpl$499();
28007
+ var _el$9 = _tmpl$500();
27887
28008
  insert(_el$9, error);
27888
28009
  effect((_$p) => style(_el$9, errorStyle2(), _$p));
27889
28010
  return _el$9;
@@ -27982,5 +28103,5 @@ function primaryButtonStyle2(submitting) {
27982
28103
  }
27983
28104
 
27984
28105
  export { ADMIN_TAB_SEGMENTS, AFFILIATE_SUB_TAB_SEGMENTS, AddressFields, AdminDashboard, AffiliateForgotPassword, AffiliateLogin, AffiliatePortal, AffiliateRegister, AffiliateResetPassword, CartCheckoutPage, CheckoutPage, EmailTemplates, ForgotPasswordPage, MemberPortal, PatientDashboardPreview, RegisterPage, ResetPasswordPage, SignupPage, SubscribePage, SurveyPage, SurveyV2Page, UpdatePaymentMethod, adminTabFromPath, adminTabPath, affiliateSubTabFromPath, affiliateSubTabPath };
27985
- //# sourceMappingURL=YTKBUMDA.js.map
27986
- //# sourceMappingURL=YTKBUMDA.js.map
28106
+ //# sourceMappingURL=M6JEZQ5L.js.map
28107
+ //# sourceMappingURL=M6JEZQ5L.js.map