@apextelemed/partner-core 0.17.0-dev.52 → 0.17.0-dev.54

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 (42) hide show
  1. package/README.md +28 -1
  2. package/dist/api/index.d.ts +1 -1
  3. package/dist/api/index.js +3 -3
  4. package/dist/api/index.jsx +5 -3
  5. package/dist/chunk/{37UEVJEC.jsx → BI7NBPCA.jsx} +30 -1
  6. package/dist/chunk/{IQDVS3XA.jsx → CAG35QKZ.jsx} +5 -5
  7. package/dist/chunk/{TLDELI22.jsx → DC24EAWT.jsx} +11 -5
  8. package/dist/chunk/{2HDMTWLH.js → F5PDIE2J.js} +6 -6
  9. package/dist/chunk/{2HDMTWLH.js.map → F5PDIE2J.js.map} +1 -1
  10. package/dist/chunk/{5HQAA4UO.jsx → HXBRBHFR.jsx} +2 -2
  11. package/dist/chunk/{BYDMO5RM.js → MQRPGAH7.js} +12 -6
  12. package/dist/chunk/MQRPGAH7.js.map +1 -0
  13. package/dist/chunk/{RDZDD5UW.js → MUNFWRXF.js} +31 -3
  14. package/dist/chunk/MUNFWRXF.js.map +1 -0
  15. package/dist/chunk/{FTZ52PMM.jsx → P3TJ6ALH.jsx} +2 -2
  16. package/dist/chunk/{BJXD2NQQ.jsx → Q2L3CZPR.jsx} +2 -2
  17. package/dist/chunk/{T37L6JE6.jsx → VUDLDIMS.jsx} +1313 -831
  18. package/dist/chunk/{6V7RVUXX.js → WTQ63KR4.js} +3 -3
  19. package/dist/chunk/{6V7RVUXX.js.map → WTQ63KR4.js.map} +1 -1
  20. package/dist/chunk/{FXRGPBYU.js → XDRP4X2N.js} +3 -3
  21. package/dist/chunk/{FXRGPBYU.js.map → XDRP4X2N.js.map} +1 -1
  22. package/dist/chunk/{A6FJGQIS.js → XI4OZ4SZ.js} +3 -3
  23. package/dist/chunk/{A6FJGQIS.js.map → XI4OZ4SZ.js.map} +1 -1
  24. package/dist/chunk/{O7H7DAWO.js → Z5QDFCLZ.js} +1242 -765
  25. package/dist/chunk/Z5QDFCLZ.js.map +1 -0
  26. package/dist/{client-BLh8hFAu.d.ts → client-BH1wq2Pp.d.ts} +79 -2
  27. package/dist/flows/index.d.ts +12 -3
  28. package/dist/flows/index.js +6 -6
  29. package/dist/flows/index.jsx +6 -6
  30. package/dist/index/index.d.ts +2 -2
  31. package/dist/index/index.js +7 -7
  32. package/dist/index/index.jsx +11 -7
  33. package/dist/pages/index.d.ts +29 -3
  34. package/dist/pages/index.js +5 -5
  35. package/dist/pages/index.jsx +7 -5
  36. package/dist/stores/index.d.ts +1 -1
  37. package/dist/stores/index.js +2 -2
  38. package/dist/stores/index.jsx +2 -2
  39. package/package.json +1 -1
  40. package/dist/chunk/BYDMO5RM.js.map +0 -1
  41. package/dist/chunk/O7H7DAWO.js.map +0 -1
  42. package/dist/chunk/RDZDD5UW.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, US_STATE_OPTIONS, availableStateOptions, 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, useStrengthMatches, skuBindingModeFor, isCssColorValue, categoryLabel, formatConversationTime, buildTrackerView, ACCOUNT_SOURCE_LABEL, fmtDay, createCatalogProduct, addCatalogItemAsProduct, applyPriceDrafts, resolveStrengthPrices, invalidDraftKeys, orphanKey, ORPHAN_REASON, useAddPharmacy, READINESS_LABEL, useCatalogConversion, formatCalendarDate, formatMessageTime, formatEventDate, formatStageDate, offerSummaryText, LIFECYCLE_TONE, buildTrackingUrl, buildStrengthRows, isLeftForReview, doseIdOf, pharmacyLabel, isImageAttachment, buildRefillView, toTrackerRequest, needsReview, visibleWarnings, compareStrengths, MATCH_DEPENDENT_WARNINGS, SOURCE_FIELD_NOTE, MATCH_HOW_LABEL, explainFinding, matchKey } from './BYDMO5RM.js';
3
- import { fetchFunnelConfig } from './6V7RVUXX.js';
2
+ import { SUPPORT_CATEGORIES, useSurveyFlow, reconcileCartAgainstCatalog, resolveSurveyV2DrugIntent, emailGateAnswered, redeemResumeLink, useSurveyV2Flow, US_STATE_OPTIONS, availableStateOptions, 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, useStrengthMatches, skuBindingModeFor, isCssColorValue, categoryLabel, formatConversationTime, buildTrackerView, ACCOUNT_SOURCE_LABEL, fmtDay, createCatalogProduct, addCatalogItemAsProduct, applyPriceDrafts, resolveStrengthPrices, invalidDraftKeys, orphanKey, ORPHAN_REASON, useAddPharmacy, READINESS_LABEL, useCatalogConversion, formatCalendarDate, formatMessageTime, formatEventDate, formatStageDate, offerSummaryText, LIFECYCLE_TONE, buildTrackingUrl, buildStrengthRows, isLeftForReview, doseIdOf, pharmacyLabel, isImageAttachment, buildRefillView, toTrackerRequest, needsReview, visibleWarnings, compareStrengths, MATCH_DEPENDENT_WARNINGS, SOURCE_FIELD_NOTE, MATCH_HOW_LABEL, explainFinding, matchKey } from './MQRPGAH7.js';
3
+ import { fetchFunnelConfig } from './WTQ63KR4.js';
4
4
  import { usePrimitives } from './67KHO66G.js';
5
- import { cart_default, auth_default, affiliateAuth_default } from './A6FJGQIS.js';
6
- import { usersApi, adminApi, membersApi, offersApi, affiliatePortalApi, authApi, adminAffiliatesApi, apiFetch, apexApi, adminCatalogApi, SUPPORT_ATTACHMENT_MIME_TYPES, SUPPORT_ATTACHMENT_MAX_BYTES, ApiError, subscriptionsApi } from './RDZDD5UW.js';
5
+ import { cart_default, auth_default, affiliateAuth_default } from './XI4OZ4SZ.js';
6
+ import { usersApi, adminApi, membersApi, offersApi, authApi, affiliatePortalApi, adminAffiliatesApi, apiFetch, apexApi, adminCatalogApi, SUPPORT_ATTACHMENT_MIME_TYPES, SUPPORT_ATTACHMENT_MAX_BYTES, ADMIN_ROLES, ApiError, subscriptionsApi } from './MUNFWRXF.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';
@@ -12178,6 +12178,11 @@ function SupportSummary(props) {
12178
12178
  });
12179
12179
  }
12180
12180
  delegateEvents(["click"]);
12181
+ var [adminMe, setAdminMe] = createSignal(void 0);
12182
+ function adminCan(permission) {
12183
+ const me = adminMe();
12184
+ return me ? me.permissions.includes(permission) : true;
12185
+ }
12181
12186
 
12182
12187
  // src/pages/admin/customers/CustomerDetail.tsx
12183
12188
  var _tmpl$191 = /* @__PURE__ */ template(`<div class=app-admin-detail>`);
@@ -12197,7 +12202,7 @@ var _tmpl$1212 = /* @__PURE__ */ template(`<p class=app-admin-text-muted style=m
12197
12202
  var _tmpl$1310 = /* @__PURE__ */ template(`<div class=app-admin-table-wrap><table class=app-admin-table><thead><tr><th>Date</th><th>Items</th><th>Total</th><th>Status</th></tr></thead><tbody>`);
12198
12203
  var _tmpl$1410 = /* @__PURE__ */ template(`<p class=app-admin-text-muted style=margin:0;font-size:0.875rem>No subscriptions.`);
12199
12204
  var _tmpl$1510 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-ghost app-admin-btn-sm"title="Cancel any prescription request still awaiting prescriber review. Approved and completed prescriptions are untouched.">`);
12200
- var _tmpl$1610 = /* @__PURE__ */ template(`<p class=app-admin-text-muted style=margin:0;font-size:0.875rem>No prescription requests.`);
12205
+ var _tmpl$1610 = /* @__PURE__ */ template(`<p class=app-admin-text-muted style=margin:0;font-size:0.875rem>`);
12201
12206
  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>`);
12202
12207
  var _tmpl$1810 = /* @__PURE__ */ template(`<button type=button class=app-admin-link-btn>`);
12203
12208
  var _tmpl$199 = /* @__PURE__ */ template(`<p class=app-admin-text-muted style=margin:0;font-size:0.875rem>Nothing recorded yet.`);
@@ -12704,16 +12709,21 @@ function CustomerDetail(props) {
12704
12709
  return ov().requests.items.length;
12705
12710
  },
12706
12711
  get action() {
12707
- return (() => {
12708
- var _el$31 = _tmpl$1510();
12709
- _el$31.$$click = handleCancelUnapprovedRequests;
12710
- insert(_el$31, (() => {
12711
- var _c$ = memo(() => busy() === "cancel-requests");
12712
- return () => _c$() ? "Canceling\u2026" : memo(() => pendingRequests().length > 0)() ? `Cancel unapproved requests (${pendingRequests().length})` : "Cancel unapproved requests";
12713
- })());
12714
- effect(() => _el$31.disabled = busy() === "cancel-requests");
12715
- return _el$31;
12716
- })();
12712
+ return createComponent(Show, {
12713
+ get when() {
12714
+ return adminCan("patient.support");
12715
+ },
12716
+ get children() {
12717
+ var _el$31 = _tmpl$1510();
12718
+ _el$31.$$click = handleCancelUnapprovedRequests;
12719
+ insert(_el$31, (() => {
12720
+ var _c$ = memo(() => busy() === "cancel-requests");
12721
+ return () => _c$() ? "Canceling\u2026" : memo(() => pendingRequests().length > 0)() ? `Cancel unapproved requests (${pendingRequests().length})` : "Cancel unapproved requests";
12722
+ })());
12723
+ effect(() => _el$31.disabled = busy() === "cancel-requests");
12724
+ return _el$31;
12725
+ }
12726
+ });
12717
12727
  },
12718
12728
  get children() {
12719
12729
  return createComponent(Show, {
@@ -12721,7 +12731,11 @@ function CustomerDetail(props) {
12721
12731
  return ov().requests.items.length > 0;
12722
12732
  },
12723
12733
  get fallback() {
12724
- return _tmpl$1610();
12734
+ return (() => {
12735
+ var _el$32 = _tmpl$1610();
12736
+ insert(_el$32, () => ov().rxRedacted ? "Prescription details aren't shown for your admin role." : "No prescription requests.");
12737
+ return _el$32;
12738
+ })();
12725
12739
  },
12726
12740
  get children() {
12727
12741
  var _el$24 = _tmpl$1115();
@@ -14262,12 +14276,12 @@ var _tmpl$632 = /* @__PURE__ */ template(`<strong>`);
14262
14276
  var _tmpl$730 = /* @__PURE__ */ template(`<span class=app-admin-convert-detail>`);
14263
14277
  var _tmpl$826 = /* @__PURE__ */ template(`<div><span>`);
14264
14278
  var _tmpl$923 = /* @__PURE__ */ template(`<div class=app-admin-convert-wait role=status aria-live=polite data-testid=add-pharmacy-waiting><div class=app-admin-spinner></div><strong>`);
14265
- var _tmpl$020 = /* @__PURE__ */ template(`<div class=app-admin-catalog-row__main style=flex-wrap:wrap><span class=app-admin-catalog-row__title style=font-size:0.875rem><span><strong> subscriber</strong> <!> on <strong></strong>. Which strength is that now?</span></span><select class=app-admin-input style=width:auto;min-width:10rem><option value>Leave for review`);
14279
+ var _tmpl$020 = /* @__PURE__ */ template(`<div class=app-admin-catalog-row__main style=flex-wrap:wrap><span class=app-admin-catalog-row__title style=font-size:0.875rem><span><strong> subscriber</strong> <!> on <strong></strong>. Which strength is that now?</span></span><select class=app-admin-input style=width:auto;min-width:10rem><option value>`);
14266
14280
  var _tmpl$1101 = /* @__PURE__ */ template(`<span class=app-admin-text-muted>(<!>)`);
14267
14281
  var _tmpl$1015 = /* @__PURE__ */ template(`<div class=app-admin-convert-findings>`);
14268
14282
  var _tmpl$1116 = /* @__PURE__ */ template(`<div><h4 class=app-admin-label style="margin:0 0 0.5rem">Strengths and prices</h4><table class=app-admin-table data-testid=add-pharmacy-strengths><thead><tr><th scope=col>Strength</th><th scope=col>Now</th><th scope=col>After saving</th></tr></thead><tbody>`);
14269
14283
  var _tmpl$1213 = /* @__PURE__ */ template(`<p role=status aria-live=polite data-testid=add-pharmacy-replanning style="margin:0.25rem 0 0">Updating prices\u2026`);
14270
- var _tmpl$1311 = /* @__PURE__ */ template(`<div data-testid=add-pharmacy-match><h4 class=app-admin-label style="margin:0 0 0.5rem">Subscribers on strengths that changed</h4><ul class=app-admin-catalog-list style=margin:0></ul><p class=app-admin-text-muted style="margin:0.5rem 0 0">Picking a strength keeps these subscribers\u2019 refills on it and carries the old price over. Left for review, their refills still go out but are flagged for a person to check. You can change this later on the product.`);
14284
+ var _tmpl$1311 = /* @__PURE__ */ template(`<div data-testid=add-pharmacy-match><h4 class=app-admin-label style="margin:0 0 0.5rem">Subscribers on strengths that changed</h4><ul class=app-admin-catalog-list style=margin:0></ul><p class=app-admin-text-muted style="margin:0.5rem 0 0">`);
14271
14285
  var _tmpl$1411 = /* @__PURE__ */ template(`<div><h4 class=app-admin-label style="margin:0 0 0.25rem">Set a price for each new strength</h4><p>A strength can't be sold until it has a price. The member price is optional.</p><ul class=app-admin-catalog-list style=margin:0>`);
14272
14286
  var _tmpl$1511 = /* @__PURE__ */ template(`<div class=app-admin-convert data-testid=add-pharmacy-review><p style=margin:0;font-size:0.875rem>Adding <strong></strong> to <!>.`);
14273
14287
  var _tmpl$1611 = /* @__PURE__ */ template(`<button type=button class=app-admin-banner__dismiss aria-label=Dismiss>\xD7`);
@@ -14456,13 +14470,14 @@ function MatchQuestion(props) {
14456
14470
  insert(_el$32, name);
14457
14471
  insert(_el$27, createComponent(Show, {
14458
14472
  get when() {
14459
- return q().price != null;
14473
+ return memo(() => !!!props.flatFee)() && q().price != null;
14460
14474
  },
14461
14475
  get children() {
14462
14476
  return [" \u2014 ", memo(() => fmtPrice(q().price))];
14463
14477
  }
14464
14478
  }), _el$33);
14465
14479
  _el$35.addEventListener("change", (e) => props.flow.setMatchAnswer(q().source, e.currentTarget.value === "" ? null : e.currentTarget.value));
14480
+ insert(_el$36, () => props.flatFee ? "Not matched" : "Leave for review");
14466
14481
  insert(_el$35, createComponent(For, {
14467
14482
  get each() {
14468
14483
  return props.options;
@@ -14519,30 +14534,30 @@ function Review(props) {
14519
14534
  },
14520
14535
  keyed: true,
14521
14536
  children: (n) => (() => {
14522
- var _el$66 = _tmpl$1711(), _el$67 = _el$66.firstChild;
14523
- insert(_el$67, () => n.message);
14524
- insert(_el$66, createComponent(Show, {
14537
+ var _el$67 = _tmpl$1711(), _el$68 = _el$67.firstChild;
14538
+ insert(_el$68, () => n.message);
14539
+ insert(_el$67, createComponent(Show, {
14525
14540
  get when() {
14526
14541
  return n.tone !== "danger";
14527
14542
  },
14528
14543
  get children() {
14529
- var _el$68 = _tmpl$1611();
14530
- _el$68.$$click = () => flow.dismissNotice();
14531
- return _el$68;
14544
+ var _el$69 = _tmpl$1611();
14545
+ _el$69.$$click = () => flow.dismissNotice();
14546
+ return _el$69;
14532
14547
  }
14533
14548
  }), null);
14534
14549
  effect((_p$) => {
14535
14550
  var _v$10 = `app-admin-banner app-admin-banner--${n.tone}`, _v$11 = n.tone === "danger" ? "alert" : "status", _v$12 = n.code;
14536
- _v$10 !== _p$.e && className(_el$66, _p$.e = _v$10);
14537
- _v$11 !== _p$.t && setAttribute(_el$66, "role", _p$.t = _v$11);
14538
- _v$12 !== _p$.a && setAttribute(_el$66, "data-code", _p$.a = _v$12);
14551
+ _v$10 !== _p$.e && className(_el$67, _p$.e = _v$10);
14552
+ _v$11 !== _p$.t && setAttribute(_el$67, "role", _p$.t = _v$11);
14553
+ _v$12 !== _p$.a && setAttribute(_el$67, "data-code", _p$.a = _v$12);
14539
14554
  return _p$;
14540
14555
  }, {
14541
14556
  e: void 0,
14542
14557
  t: void 0,
14543
14558
  a: void 0
14544
14559
  });
14545
- return _el$66;
14560
+ return _el$67;
14546
14561
  })()
14547
14562
  }), null);
14548
14563
  insert(_el$38, createComponent(Show, {
@@ -14592,23 +14607,23 @@ function Review(props) {
14592
14607
  return compareStrengths(p());
14593
14608
  },
14594
14609
  children: (row) => (() => {
14595
- var _el$69 = _tmpl$1811(), _el$70 = _el$69.firstChild, _el$71 = _el$70.nextSibling, _el$72 = _el$71.nextSibling, _el$73 = _el$72.firstChild;
14596
- insert(_el$70, () => row.dosage);
14597
- insert(_el$71, (() => {
14610
+ var _el$70 = _tmpl$1811(), _el$71 = _el$70.firstChild, _el$72 = _el$71.nextSibling, _el$73 = _el$72.nextSibling, _el$74 = _el$73.firstChild;
14611
+ insert(_el$71, () => row.dosage);
14612
+ insert(_el$72, (() => {
14598
14613
  var _c$2 = memo(() => row.before === void 0);
14599
14614
  return () => _c$2() ? "Not sold" : priceText(row.before);
14600
14615
  })());
14601
- insert(_el$73, (() => {
14616
+ insert(_el$74, (() => {
14602
14617
  var _c$3 = memo(() => row.after == null);
14603
14618
  return () => _c$3() ? "Needs a price" : fmtPrice(row.after);
14604
14619
  })());
14605
- insert(_el$72, createComponent(Show, {
14620
+ insert(_el$73, createComponent(Show, {
14606
14621
  get when() {
14607
14622
  return row.isNew;
14608
14623
  },
14609
14624
  children: " (new)"
14610
14625
  }), null);
14611
- return _el$69;
14626
+ return _el$70;
14612
14627
  })()
14613
14628
  }));
14614
14629
  return _el$52;
@@ -14619,38 +14634,51 @@ function Review(props) {
14619
14634
  return (p().matchQuestions ?? []).length > 0;
14620
14635
  },
14621
14636
  get children() {
14622
- var _el$57 = _tmpl$1311(), _el$58 = _el$57.firstChild, _el$59 = _el$58.nextSibling, _el$60 = _el$59.nextSibling;
14623
- insert(_el$59, createComponent(Index, {
14637
+ var _el$57 = _tmpl$1311(), _el$58 = _el$57.firstChild; _el$58.firstChild; var _el$60 = _el$58.nextSibling, _el$61 = _el$60.nextSibling;
14638
+ insert(_el$58, () => p().flatFee ? " (optional)" : "", null);
14639
+ insert(_el$60, createComponent(Index, {
14624
14640
  get each() {
14625
14641
  return p().matchQuestions;
14626
14642
  },
14627
14643
  children: (q) => (() => {
14628
- var _el$74 = _tmpl$1910();
14629
- insert(_el$74, createComponent(MatchQuestion, {
14644
+ var _el$75 = _tmpl$1910();
14645
+ insert(_el$75, createComponent(MatchQuestion, {
14630
14646
  flow,
14631
14647
  get question() {
14632
14648
  return q();
14633
14649
  },
14634
14650
  get options() {
14635
14651
  return p().doseOptions ?? [];
14652
+ },
14653
+ get flatFee() {
14654
+ return p().flatFee === true;
14636
14655
  }
14637
14656
  }));
14638
- return _el$74;
14657
+ return _el$75;
14639
14658
  })()
14640
14659
  }));
14660
+ insert(_el$61, createComponent(Show, {
14661
+ get when() {
14662
+ return p().flatFee;
14663
+ },
14664
+ get fallback() {
14665
+ return "Picking a strength keeps these subscribers\u2019 refills on it and carries the old price over. Left for review, their refills still go out but are flagged for a person to check. You can change this later on the product.";
14666
+ },
14667
+ children: "This product charges one price, so this doesn\u2019t affect refills today. It\u2019s used if you switch to per-strength pricing, and you can change it later on the product."
14668
+ }));
14641
14669
  insert(_el$57, createComponent(Show, {
14642
14670
  get when() {
14643
14671
  return flow.replanning();
14644
14672
  },
14645
14673
  get children() {
14646
- var _el$61 = _tmpl$1213();
14647
- effect((_$p) => style(_el$61, {
14674
+ var _el$62 = _tmpl$1213();
14675
+ effect((_$p) => style(_el$62, {
14648
14676
  ...hint2
14649
14677
  }, _$p));
14650
- return _el$61;
14678
+ return _el$62;
14651
14679
  }
14652
14680
  }), null);
14653
- effect((_$p) => style(_el$60, {
14681
+ effect((_$p) => style(_el$61, {
14654
14682
  ...hint2
14655
14683
  }, _$p));
14656
14684
  return _el$57;
@@ -14661,8 +14689,8 @@ function Review(props) {
14661
14689
  return p().pricesRequired.length > 0;
14662
14690
  },
14663
14691
  get children() {
14664
- var _el$62 = _tmpl$1411(), _el$63 = _el$62.firstChild, _el$64 = _el$63.nextSibling, _el$65 = _el$64.nextSibling;
14665
- insert(_el$65, createComponent(For, {
14692
+ var _el$63 = _tmpl$1411(), _el$64 = _el$63.firstChild, _el$65 = _el$64.nextSibling, _el$66 = _el$65.nextSibling;
14693
+ insert(_el$66, createComponent(For, {
14666
14694
  get each() {
14667
14695
  return p().pricesRequired;
14668
14696
  },
@@ -14670,21 +14698,21 @@ function Review(props) {
14670
14698
  const invalid = () => flow.flagged().has(r.doseId) || (flow.prices()[r.doseId] ?? "").trim() !== "" && flow.missing().includes(r.doseId);
14671
14699
  const savingsBad = () => flow.savingsInvalid().includes(r.doseId);
14672
14700
  return (() => {
14673
- var _el$75 = _tmpl$2211(), _el$76 = _el$75.firstChild, _el$77 = _el$76.firstChild, _el$78 = _el$77.firstChild, _el$79 = _el$77.nextSibling, _el$80 = _el$79.firstChild, _el$81 = _el$80.nextSibling;
14674
- insert(_el$78, () => r.dosage);
14675
- _el$80.$$input = (e) => flow.setPrice(r.doseId, e.currentTarget.value);
14676
- _el$81.$$input = (e) => flow.setSavingsPrice(r.doseId, e.currentTarget.value);
14677
- insert(_el$75, createComponent(Show, {
14701
+ var _el$76 = _tmpl$2211(), _el$77 = _el$76.firstChild, _el$78 = _el$77.firstChild, _el$79 = _el$78.firstChild, _el$80 = _el$78.nextSibling, _el$81 = _el$80.firstChild, _el$82 = _el$81.nextSibling;
14702
+ insert(_el$79, () => r.dosage);
14703
+ _el$81.$$input = (e) => flow.setPrice(r.doseId, e.currentTarget.value);
14704
+ _el$82.$$input = (e) => flow.setSavingsPrice(r.doseId, e.currentTarget.value);
14705
+ insert(_el$76, createComponent(Show, {
14678
14706
  get when() {
14679
14707
  return invalid();
14680
14708
  },
14681
14709
  get children() {
14682
- var _el$82 = _tmpl$2010(), _el$83 = _el$82.firstChild, _el$85 = _el$83.nextSibling; _el$85.nextSibling;
14683
- insert(_el$82, () => r.dosage, _el$85);
14684
- return _el$82;
14710
+ var _el$83 = _tmpl$2010(), _el$84 = _el$83.firstChild, _el$86 = _el$84.nextSibling; _el$86.nextSibling;
14711
+ insert(_el$83, () => r.dosage, _el$86);
14712
+ return _el$83;
14685
14713
  }
14686
14714
  }), null);
14687
- insert(_el$75, createComponent(Show, {
14715
+ insert(_el$76, createComponent(Show, {
14688
14716
  get when() {
14689
14717
  return savingsBad();
14690
14718
  },
@@ -14694,13 +14722,13 @@ function Review(props) {
14694
14722
  }), null);
14695
14723
  effect((_p$) => {
14696
14724
  var _v$13 = !!invalid(), _v$14 = `Price for ${r.dosage}`, _v$15 = invalid() ? "true" : void 0, _v$16 = flow.state().kind === "saving", _v$17 = `Member price for ${r.dosage} (optional)`, _v$18 = savingsBad() ? "true" : void 0, _v$19 = flow.state().kind === "saving";
14697
- _v$13 !== _p$.e && _el$75.classList.toggle("is-flagged", _p$.e = _v$13);
14698
- _v$14 !== _p$.t && setAttribute(_el$80, "aria-label", _p$.t = _v$14);
14699
- _v$15 !== _p$.a && setAttribute(_el$80, "aria-invalid", _p$.a = _v$15);
14700
- _v$16 !== _p$.o && (_el$80.disabled = _p$.o = _v$16);
14701
- _v$17 !== _p$.i && setAttribute(_el$81, "aria-label", _p$.i = _v$17);
14702
- _v$18 !== _p$.n && setAttribute(_el$81, "aria-invalid", _p$.n = _v$18);
14703
- _v$19 !== _p$.s && (_el$81.disabled = _p$.s = _v$19);
14725
+ _v$13 !== _p$.e && _el$76.classList.toggle("is-flagged", _p$.e = _v$13);
14726
+ _v$14 !== _p$.t && setAttribute(_el$81, "aria-label", _p$.t = _v$14);
14727
+ _v$15 !== _p$.a && setAttribute(_el$81, "aria-invalid", _p$.a = _v$15);
14728
+ _v$16 !== _p$.o && (_el$81.disabled = _p$.o = _v$16);
14729
+ _v$17 !== _p$.i && setAttribute(_el$82, "aria-label", _p$.i = _v$17);
14730
+ _v$18 !== _p$.n && setAttribute(_el$82, "aria-invalid", _p$.n = _v$18);
14731
+ _v$19 !== _p$.s && (_el$82.disabled = _p$.s = _v$19);
14704
14732
  return _p$;
14705
14733
  }, {
14706
14734
  e: void 0,
@@ -14711,14 +14739,14 @@ function Review(props) {
14711
14739
  n: void 0,
14712
14740
  s: void 0
14713
14741
  });
14714
- effect(() => _el$80.value = flow.prices()[r.doseId] ?? "");
14715
- effect(() => _el$81.value = flow.savingsPrices()[r.doseId] ?? "");
14716
- return _el$75;
14742
+ effect(() => _el$81.value = flow.prices()[r.doseId] ?? "");
14743
+ effect(() => _el$82.value = flow.savingsPrices()[r.doseId] ?? "");
14744
+ return _el$76;
14717
14745
  })();
14718
14746
  }
14719
14747
  }));
14720
- effect((_$p) => style(_el$64, hint2, _$p));
14721
- return _el$62;
14748
+ effect((_$p) => style(_el$65, hint2, _$p));
14749
+ return _el$63;
14722
14750
  }
14723
14751
  }), null);
14724
14752
  return _el$38;
@@ -14760,9 +14788,9 @@ function AddPharmacyDialog(props) {
14760
14788
  return kind() === "planning";
14761
14789
  },
14762
14790
  get children() {
14763
- var _el$87 = _tmpl$2310();
14764
- _el$87.$$click = () => flow.cancel();
14765
- return _el$87;
14791
+ var _el$88 = _tmpl$2310();
14792
+ _el$88.$$click = () => flow.cancel();
14793
+ return _el$88;
14766
14794
  }
14767
14795
  }), createComponent(Match, {
14768
14796
  get when() {
@@ -14770,22 +14798,22 @@ function AddPharmacyDialog(props) {
14770
14798
  },
14771
14799
  get children() {
14772
14800
  return [(() => {
14773
- var _el$88 = _tmpl$2310();
14774
- _el$88.$$click = () => flow.cancel();
14775
- return _el$88;
14801
+ var _el$89 = _tmpl$2310();
14802
+ _el$89.$$click = () => flow.cancel();
14803
+ return _el$89;
14776
14804
  })(), (() => {
14777
- var _el$89 = _tmpl$2410();
14778
- _el$89.$$click = () => void flow.save();
14805
+ var _el$90 = _tmpl$2410();
14806
+ _el$90.$$click = () => void flow.save();
14779
14807
  effect((_p$) => {
14780
14808
  var _v$20 = !flow.canSave(), _v$21 = flow.canSave() ? void 0 : "Resolve what is shown above first";
14781
- _v$20 !== _p$.e && (_el$89.disabled = _p$.e = _v$20);
14782
- _v$21 !== _p$.t && setAttribute(_el$89, "title", _p$.t = _v$21);
14809
+ _v$20 !== _p$.e && (_el$90.disabled = _p$.e = _v$20);
14810
+ _v$21 !== _p$.t && setAttribute(_el$90, "title", _p$.t = _v$21);
14783
14811
  return _p$;
14784
14812
  }, {
14785
14813
  e: void 0,
14786
14814
  t: void 0
14787
14815
  });
14788
- return _el$89;
14816
+ return _el$90;
14789
14817
  })()];
14790
14818
  }
14791
14819
  }), createComponent(Match, {
@@ -14794,17 +14822,17 @@ function AddPharmacyDialog(props) {
14794
14822
  },
14795
14823
  get children() {
14796
14824
  return [(() => {
14797
- var _el$90 = _tmpl$2510();
14798
- _el$90.$$click = () => flow.cancel();
14799
- return _el$90;
14825
+ var _el$91 = _tmpl$2510();
14826
+ _el$91.$$click = () => flow.cancel();
14827
+ return _el$91;
14800
14828
  })(), createComponent(Show, {
14801
14829
  get when() {
14802
14830
  return !flow.state().unconfirmed;
14803
14831
  },
14804
14832
  get children() {
14805
- var _el$91 = _tmpl$2610();
14806
- _el$91.$$click = () => flow.backToPicking();
14807
- return _el$91;
14833
+ var _el$92 = _tmpl$2610();
14834
+ _el$92.$$click = () => flow.backToPicking();
14835
+ return _el$92;
14808
14836
  }
14809
14837
  }), createComponent(Show, {
14810
14838
  get when() {
@@ -14812,13 +14840,13 @@ function AddPharmacyDialog(props) {
14812
14840
  },
14813
14841
  get children() {
14814
14842
  return [(() => {
14815
- var _el$92 = _tmpl$278();
14816
- _el$92.$$click = () => void flow.startOver();
14817
- return _el$92;
14818
- })(), (() => {
14819
- var _el$93 = _tmpl$285();
14820
- _el$93.$$click = () => void flow.retry();
14843
+ var _el$93 = _tmpl$278();
14844
+ _el$93.$$click = () => void flow.startOver();
14821
14845
  return _el$93;
14846
+ })(), (() => {
14847
+ var _el$94 = _tmpl$285();
14848
+ _el$94.$$click = () => void flow.retry();
14849
+ return _el$94;
14822
14850
  })()];
14823
14851
  }
14824
14852
  }), createComponent(Show, {
@@ -14826,9 +14854,9 @@ function AddPharmacyDialog(props) {
14826
14854
  return memo(() => !!!flow.state().unconfirmed)() && flow.state().canRetry;
14827
14855
  },
14828
14856
  get children() {
14829
- var _el$94 = _tmpl$295();
14830
- _el$94.$$click = () => void flow.retry();
14831
- return _el$94;
14857
+ var _el$95 = _tmpl$295();
14858
+ _el$95.$$click = () => void flow.retry();
14859
+ return _el$95;
14832
14860
  }
14833
14861
  })];
14834
14862
  }
@@ -14871,36 +14899,36 @@ function AddPharmacyDialog(props) {
14871
14899
  return memo(() => kind() === "reviewing")() && simple();
14872
14900
  },
14873
14901
  get children() {
14874
- var _el$95 = _tmpl$304(), _el$96 = _el$95.firstChild, _el$97 = _el$96.firstChild, _el$98 = _el$97.nextSibling, _el$99 = _el$98.nextSibling, _el$101 = _el$99.nextSibling; _el$101.nextSibling; var _el$102 = _el$96.nextSibling;
14875
- insert(_el$95, createComponent(Show, {
14902
+ var _el$96 = _tmpl$304(), _el$97 = _el$96.firstChild, _el$98 = _el$97.firstChild, _el$99 = _el$98.nextSibling, _el$100 = _el$99.nextSibling, _el$102 = _el$100.nextSibling; _el$102.nextSibling; var _el$103 = _el$97.nextSibling;
14903
+ insert(_el$96, createComponent(Show, {
14876
14904
  get when() {
14877
14905
  return flow.notice();
14878
14906
  },
14879
14907
  keyed: true,
14880
14908
  children: (n) => (() => {
14881
- var _el$106 = _tmpl$3310(), _el$107 = _el$106.firstChild;
14882
- insert(_el$107, () => n.message);
14909
+ var _el$107 = _tmpl$3310(), _el$108 = _el$107.firstChild;
14910
+ insert(_el$108, () => n.message);
14883
14911
  effect((_p$) => {
14884
14912
  var _v$22 = `app-admin-banner app-admin-banner--${n.tone}`, _v$23 = n.code;
14885
- _v$22 !== _p$.e && className(_el$106, _p$.e = _v$22);
14886
- _v$23 !== _p$.t && setAttribute(_el$106, "data-code", _p$.t = _v$23);
14913
+ _v$22 !== _p$.e && className(_el$107, _p$.e = _v$22);
14914
+ _v$23 !== _p$.t && setAttribute(_el$107, "data-code", _p$.t = _v$23);
14887
14915
  return _p$;
14888
14916
  }, {
14889
14917
  e: void 0,
14890
14918
  t: void 0
14891
14919
  });
14892
- return _el$106;
14920
+ return _el$107;
14893
14921
  })()
14894
- }), _el$96);
14895
- insert(_el$98, (() => {
14922
+ }), _el$97);
14923
+ insert(_el$99, (() => {
14896
14924
  var _c$4 = memo(() => !!reviewPlan());
14897
14925
  return () => _c$4() ? pharmacyLabel(reviewPlan()) : "";
14898
14926
  })());
14899
- insert(_el$96, () => props.productName, _el$101);
14900
- effect((_$p) => style(_el$102, {
14927
+ insert(_el$97, () => props.productName, _el$102);
14928
+ effect((_$p) => style(_el$103, {
14901
14929
  ...hint2
14902
14930
  }, _$p));
14903
- return _el$95;
14931
+ return _el$96;
14904
14932
  }
14905
14933
  }), createComponent(Match, {
14906
14934
  get when() {
@@ -14922,11 +14950,11 @@ function AddPharmacyDialog(props) {
14922
14950
  return createComponent(Waiting, {
14923
14951
  title: "Saving\u2026 this can take up to a minute. Don\u2019t close this page.",
14924
14952
  get children() {
14925
- var _el$103 = _tmpl$3111();
14926
- effect((_$p) => style(_el$103, {
14953
+ var _el$104 = _tmpl$3111();
14954
+ effect((_$p) => style(_el$104, {
14927
14955
  ...hint2
14928
14956
  }, _$p));
14929
- return _el$103;
14957
+ return _el$104;
14930
14958
  }
14931
14959
  });
14932
14960
  }
@@ -14935,9 +14963,9 @@ function AddPharmacyDialog(props) {
14935
14963
  return kind() === "failed";
14936
14964
  },
14937
14965
  get children() {
14938
- var _el$104 = _tmpl$3210(), _el$105 = _el$104.firstChild;
14939
- insert(_el$105, () => flow.state().message);
14940
- return _el$104;
14966
+ var _el$105 = _tmpl$3210(), _el$106 = _el$105.firstChild;
14967
+ insert(_el$106, () => flow.state().message);
14968
+ return _el$105;
14941
14969
  }
14942
14970
  })];
14943
14971
  }
@@ -14956,8 +14984,8 @@ function SinglePharmacySection(props) {
14956
14984
  const rows = () => props.product.pharmacies ?? [];
14957
14985
  const excluded = createMemo(() => new Set(rows().flatMap((p) => p.pharmacyId ? [p.pharmacyId] : [])));
14958
14986
  return (() => {
14959
- var _el$108 = _tmpl$363(), _el$109 = _el$108.firstChild, _el$110 = _el$109.firstChild, _el$111 = _el$110.nextSibling, _el$112 = _el$109.nextSibling; _el$112.firstChild;
14960
- insert(_el$111, createComponent(AddPharmacyButton, {
14987
+ var _el$109 = _tmpl$363(), _el$110 = _el$109.firstChild, _el$111 = _el$110.firstChild, _el$112 = _el$111.nextSibling, _el$113 = _el$110.nextSibling; _el$113.firstChild;
14988
+ insert(_el$112, createComponent(AddPharmacyButton, {
14961
14989
  flow,
14962
14990
  get unsaved() {
14963
14991
  return props.unsaved;
@@ -14967,7 +14995,7 @@ function SinglePharmacySection(props) {
14967
14995
  },
14968
14996
  describedBy: "product-pharmacies-hint"
14969
14997
  }));
14970
- insert(_el$112, createComponent(Show, {
14998
+ insert(_el$113, createComponent(Show, {
14971
14999
  get when() {
14972
15000
  return props.unsaved;
14973
15001
  },
@@ -14975,7 +15003,7 @@ function SinglePharmacySection(props) {
14975
15003
  return _tmpl$3410();
14976
15004
  }
14977
15005
  }), null);
14978
- insert(_el$108, createComponent(Show, {
15006
+ insert(_el$109, createComponent(Show, {
14979
15007
  get when() {
14980
15008
  return known();
14981
15009
  },
@@ -14991,36 +15019,36 @@ function SinglePharmacySection(props) {
14991
15019
  return _tmpl$382();
14992
15020
  },
14993
15021
  get children() {
14994
- var _el$116 = _tmpl$353();
14995
- insert(_el$116, createComponent(For, {
15022
+ var _el$117 = _tmpl$353();
15023
+ insert(_el$117, createComponent(For, {
14996
15024
  get each() {
14997
15025
  return rows();
14998
15026
  },
14999
15027
  children: (p) => (() => {
15000
- var _el$119 = _tmpl$402(), _el$120 = _el$119.firstChild, _el$121 = _el$120.firstChild, _el$122 = _el$121.nextSibling, _el$123 = _el$122.firstChild, _el$125 = _el$123.nextSibling; _el$125.firstChild;
15001
- insert(_el$121, () => p.rank);
15002
- insert(_el$123, () => p.pharmacyName ?? p.drugName ?? "Pharmacy");
15003
- insert(_el$122, createComponent(Show, {
15028
+ var _el$120 = _tmpl$402(), _el$121 = _el$120.firstChild, _el$122 = _el$121.firstChild, _el$123 = _el$122.nextSibling, _el$124 = _el$123.firstChild, _el$126 = _el$124.nextSibling; _el$126.firstChild;
15029
+ insert(_el$122, () => p.rank);
15030
+ insert(_el$124, () => p.pharmacyName ?? p.drugName ?? "Pharmacy");
15031
+ insert(_el$123, createComponent(Show, {
15004
15032
  get when() {
15005
15033
  return memo(() => !!p.pharmacyName)() && p.drugName;
15006
15034
  },
15007
15035
  get children() {
15008
- var _el$124 = _tmpl$392();
15009
- insert(_el$124, () => p.drugName);
15010
- return _el$124;
15036
+ var _el$125 = _tmpl$392();
15037
+ insert(_el$125, () => p.drugName);
15038
+ return _el$125;
15011
15039
  }
15012
- }), _el$125);
15013
- insert(_el$125, () => p.rank, null);
15014
- effect(() => _el$119.classList.toggle("is-muted", !p.enabled));
15015
- return _el$119;
15040
+ }), _el$126);
15041
+ insert(_el$126, () => p.rank, null);
15042
+ effect(() => _el$120.classList.toggle("is-muted", !p.enabled));
15043
+ return _el$120;
15016
15044
  })()
15017
15045
  }));
15018
- return _el$116;
15046
+ return _el$117;
15019
15047
  }
15020
15048
  });
15021
15049
  }
15022
15050
  }), null);
15023
- insert(_el$108, createComponent(Show, {
15051
+ insert(_el$109, createComponent(Show, {
15024
15052
  get when() {
15025
15053
  return flow.state().kind === "picking";
15026
15054
  },
@@ -15033,13 +15061,13 @@ function SinglePharmacySection(props) {
15033
15061
  });
15034
15062
  }
15035
15063
  }), null);
15036
- insert(_el$108, createComponent(AddPharmacyDialog, {
15064
+ insert(_el$109, createComponent(AddPharmacyDialog, {
15037
15065
  flow,
15038
15066
  get productName() {
15039
15067
  return props.product.name;
15040
15068
  }
15041
15069
  }), null);
15042
- return _el$108;
15070
+ return _el$109;
15043
15071
  })();
15044
15072
  }
15045
15073
  delegateEvents(["click", "input"]);
@@ -16219,18 +16247,21 @@ function NewCatalogProductDialog(props) {
16219
16247
  delegateEvents(["click", "input"]);
16220
16248
  var _tmpl$281 = /* @__PURE__ */ template(`<strong style=font-size:0.6875rem>`);
16221
16249
  var _tmpl$287 = /* @__PURE__ */ template(`<div class="app-admin-banner app-admin-banner--warn"role=group data-testid=strength-match-decision style=flex-direction:column;align-items:flex-start><span><strong></strong> has no price of its own. Sell it at the old price of <strong></strong>?</span><span class=app-admin-catalog-row__controls><button type=button class="app-admin-btn app-admin-btn-primary app-admin-btn-sm">Use </button><button type=button class="app-admin-btn app-admin-btn-ghost app-admin-btn-sm">Don't use it</button><button type=button class="app-admin-btn app-admin-btn-ghost app-admin-btn-sm">Cancel</button></span><span class=app-admin-text-muted style=font-size:0.6875rem>If you don't use it, <!> has no price until one is set in Strengths.`);
16222
- var _tmpl$355 = /* @__PURE__ */ template(`<span class="app-admin-badge app-admin-badge--warning">Needs review`);
16223
- var _tmpl$444 = /* @__PURE__ */ template(`<div class=app-admin-field-error role=alert>`);
16224
- var _tmpl$539 = /* @__PURE__ */ template(`<li class=app-admin-catalog-row data-testid=strength-match-row><div class=app-admin-catalog-row__main style=flex-wrap:wrap><span class=app-admin-catalog-row__title style=font-size:0.875rem><span><strong> subscriber</strong> on <strong></strong></span></span><select class=app-admin-input style=width:auto;min-width:10rem><option value>Leave for review`);
16225
- var _tmpl$635 = /* @__PURE__ */ template(`<option>`);
16226
- var _tmpl$732 = /* @__PURE__ */ template(`<div class=app-admin-catalog-block__head><h3 class=app-admin-label id=strength-matches-title style=margin:0>Subscribers' strengths`);
16227
- var _tmpl$828 = /* @__PURE__ */ template(`<strong>`);
16228
- var _tmpl$925 = /* @__PURE__ */ template(`<p id=strength-matches-hint>Which strength each older strength is now. A change applies from each subscriber's next refill; refills already sent keep what they have. It doesn't change what any strength sells for. `);
16229
- var _tmpl$022 = /* @__PURE__ */ template(`<ul class=app-admin-catalog-list aria-label="Older strengths subscribers are on">`);
16230
- var _tmpl$1103 = /* @__PURE__ */ template(`<section class=app-admin-catalog-block aria-labelledby=strength-matches-title data-testid=strength-matches>`);
16231
- var _tmpl$1017 = /* @__PURE__ */ template(`<p class=app-admin-catalog-hint>`);
16232
- var _tmpl$1118 = /* @__PURE__ */ template(`<div role=status data-testid=strength-matches-failed><h3 class=app-admin-label id=strength-matches-title style="margin:0 0 0.25rem">Subscribers' strengths</h3><p class=app-admin-catalog-hint>Couldn't load subscribers' strengths. <button type=button class="app-admin-btn app-admin-btn-ghost app-admin-btn-sm">Try again`);
16233
- var _tmpl$1215 = /* @__PURE__ */ template(`<div class="app-admin-banner app-admin-banner--warn"role=status data-testid=strength-matches-notice><span></span><button type=button class=app-admin-banner__dismiss aria-label=Dismiss>\xD7`);
16250
+ var _tmpl$355 = /* @__PURE__ */ template(`<span><strong> subscriber</strong> on <strong>`);
16251
+ var _tmpl$444 = /* @__PURE__ */ template(`<span class="app-admin-badge app-admin-badge--warning">Needs review`);
16252
+ var _tmpl$539 = /* @__PURE__ */ template(`<div class=app-admin-field-error role=alert>`);
16253
+ var _tmpl$635 = /* @__PURE__ */ template(`<li class=app-admin-catalog-row data-testid=strength-match-row><div class=app-admin-catalog-row__main style=flex-wrap:wrap><span class=app-admin-catalog-row__title style=font-size:0.875rem></span><select class=app-admin-input style=width:auto;min-width:10rem><option value>`);
16254
+ var _tmpl$732 = /* @__PURE__ */ template(`<span><strong></strong> \u2014 no subscribers on it right now`);
16255
+ var _tmpl$828 = /* @__PURE__ */ template(`<option>`);
16256
+ var _tmpl$925 = /* @__PURE__ */ template(`<div class=app-admin-catalog-block__head><h3 class=app-admin-label id=strength-matches-title style=margin:0>Subscribers' strengths`);
16257
+ var _tmpl$022 = /* @__PURE__ */ template(`<span class=app-admin-text-muted data-testid=strength-matches-flat-fee-note>This product charges one price, so this doesn't affect refills today. It's used if you switch to per-strength pricing.`);
16258
+ var _tmpl$1103 = /* @__PURE__ */ template(`<strong>`);
16259
+ var _tmpl$1017 = /* @__PURE__ */ template(`<p id=strength-matches-hint> `);
16260
+ var _tmpl$1118 = /* @__PURE__ */ template(`<ul class=app-admin-catalog-list aria-label="Older strengths subscribers are on">`);
16261
+ var _tmpl$1215 = /* @__PURE__ */ template(`<section class=app-admin-catalog-block aria-labelledby=strength-matches-title data-testid=strength-matches>`);
16262
+ var _tmpl$1313 = /* @__PURE__ */ template(`<p class=app-admin-catalog-hint>`);
16263
+ var _tmpl$1413 = /* @__PURE__ */ template(`<div role=status data-testid=strength-matches-failed><h3 class=app-admin-label id=strength-matches-title style="margin:0 0 0.25rem">Subscribers' strengths</h3><p class=app-admin-catalog-hint>Couldn't load subscribers' strengths. <button type=button class="app-admin-btn app-admin-btn-ghost app-admin-btn-sm">Try again`);
16264
+ var _tmpl$1513 = /* @__PURE__ */ template(`<div class="app-admin-banner app-admin-banner--warn"role=status data-testid=strength-matches-notice><span></span><button type=button class=app-admin-banner__dismiss aria-label=Dismiss>\xD7`);
16234
16265
  var hint4 = {
16235
16266
  "font-size": "0.6875rem",
16236
16267
  color: "var(--app-admin-fg-muted)",
@@ -16238,7 +16269,7 @@ var hint4 = {
16238
16269
  "line-height": 1.4
16239
16270
  };
16240
16271
  var idPart = (s) => s.replace(/[^A-Za-z0-9_-]/g, "_");
16241
- var optionLabel = (o) => `${o.label} \u2014 ${o.price == null ? "no price yet" : fmtPrice(o.price)}`;
16272
+ var optionLabel = (o, flatFee) => flatFee ? o.label : `${o.label} \u2014 ${o.price == null ? "no price yet" : fmtPrice(o.price)}`;
16242
16273
  function refocus(el) {
16243
16274
  queueMicrotask(() => {
16244
16275
  if (!el || !el.isConnected) return;
@@ -16292,6 +16323,7 @@ function MatchRow(props) {
16292
16323
  const flow = props.flow;
16293
16324
  const row = () => flow.rows().find((r) => r.dosage === props.dosage);
16294
16325
  const n = () => row()?.subscriberCount ?? 0;
16326
+ const flatFee = () => flow.flatFee();
16295
16327
  const err = () => flow.errors()[props.dosage];
16296
16328
  const errorId = () => `strength-match-error-${idPart(props.dosage)}`;
16297
16329
  const decision = () => {
@@ -16309,16 +16341,32 @@ function MatchRow(props) {
16309
16341
  refocus(select);
16310
16342
  };
16311
16343
  return (() => {
16312
- var _el$14 = _tmpl$539(), _el$15 = _el$14.firstChild, _el$16 = _el$15.firstChild, _el$17 = _el$16.firstChild, _el$18 = _el$17.firstChild, _el$19 = _el$18.firstChild, _el$20 = _el$18.nextSibling, _el$22 = _el$20.nextSibling, _el$24 = _el$16.nextSibling; _el$24.firstChild;
16313
- insert(_el$18, n, _el$19);
16314
- insert(_el$18, () => n() === 1 ? "" : "s", null);
16315
- insert(_el$22, () => props.dosage);
16344
+ var _el$14 = _tmpl$635(), _el$15 = _el$14.firstChild, _el$16 = _el$15.firstChild, _el$24 = _el$16.nextSibling, _el$25 = _el$24.firstChild;
16316
16345
  insert(_el$16, createComponent(Show, {
16317
16346
  get when() {
16318
- return memo(() => !!row())() && isLeftForReview(row());
16347
+ return !(flatFee() && n() === 0);
16348
+ },
16349
+ get fallback() {
16350
+ return (() => {
16351
+ var _el$27 = _tmpl$732(), _el$28 = _el$27.firstChild;
16352
+ insert(_el$28, () => props.dosage);
16353
+ return _el$27;
16354
+ })();
16355
+ },
16356
+ get children() {
16357
+ var _el$17 = _tmpl$355(), _el$18 = _el$17.firstChild, _el$19 = _el$18.firstChild, _el$20 = _el$18.nextSibling, _el$22 = _el$20.nextSibling;
16358
+ insert(_el$18, n, _el$19);
16359
+ insert(_el$18, () => n() === 1 ? "" : "s", null);
16360
+ insert(_el$22, () => props.dosage);
16361
+ return _el$17;
16362
+ }
16363
+ }), null);
16364
+ insert(_el$16, createComponent(Show, {
16365
+ get when() {
16366
+ return memo(() => !!(!flatFee() && row()))() && isLeftForReview(row());
16319
16367
  },
16320
16368
  get children() {
16321
- return _tmpl$355();
16369
+ return _tmpl$444();
16322
16370
  }
16323
16371
  }), null);
16324
16372
  _el$24.addEventListener("change", (e) => {
@@ -16326,15 +16374,16 @@ function MatchRow(props) {
16326
16374
  });
16327
16375
  var _ref$2 = select;
16328
16376
  typeof _ref$2 === "function" ? use(_ref$2, _el$24) : select = _el$24;
16377
+ insert(_el$25, () => flatFee() ? "Not matched" : "Leave for review");
16329
16378
  insert(_el$24, createComponent(For, {
16330
16379
  get each() {
16331
16380
  return flow.doseOptions();
16332
16381
  },
16333
16382
  children: (o) => (() => {
16334
- var _el$27 = _tmpl$635();
16335
- insert(_el$27, () => optionLabel(o));
16336
- effect(() => _el$27.value = o.doseId);
16337
- return _el$27;
16383
+ var _el$29 = _tmpl$828();
16384
+ insert(_el$29, () => optionLabel(o, flatFee()));
16385
+ effect(() => _el$29.value = o.doseId);
16386
+ return _el$29;
16338
16387
  })()
16339
16388
  }), null);
16340
16389
  insert(_el$14, createComponent(Show, {
@@ -16362,7 +16411,7 @@ function MatchRow(props) {
16362
16411
  return err();
16363
16412
  },
16364
16413
  get children() {
16365
- var _el$26 = _tmpl$444();
16414
+ var _el$26 = _tmpl$539();
16366
16415
  insert(_el$26, err);
16367
16416
  effect(() => setAttribute(_el$26, "id", errorId()));
16368
16417
  return _el$26;
@@ -16392,60 +16441,71 @@ function StrengthMatchesSection(props) {
16392
16441
  return shown();
16393
16442
  },
16394
16443
  get children() {
16395
- var _el$28 = _tmpl$1103();
16396
- insert(_el$28, createComponent(Show, {
16444
+ var _el$30 = _tmpl$1215();
16445
+ insert(_el$30, createComponent(Show, {
16397
16446
  get when() {
16398
16447
  return !failed();
16399
16448
  },
16400
16449
  get fallback() {
16401
16450
  return (() => {
16402
- var _el$36 = _tmpl$1118(), _el$37 = _el$36.firstChild, _el$38 = _el$37.nextSibling, _el$39 = _el$38.firstChild, _el$41 = _el$39.nextSibling;
16403
- _el$41.$$click = () => void flow.reload();
16404
- insert(_el$36, createComponent(Show, {
16451
+ var _el$38 = _tmpl$1413(), _el$39 = _el$38.firstChild, _el$40 = _el$39.nextSibling, _el$41 = _el$40.firstChild, _el$43 = _el$41.nextSibling;
16452
+ _el$43.$$click = () => void flow.reload();
16453
+ insert(_el$38, createComponent(Show, {
16405
16454
  get when() {
16406
16455
  return flow.notice();
16407
16456
  },
16408
16457
  get children() {
16409
- var _el$42 = _tmpl$1017();
16410
- insert(_el$42, () => flow.notice());
16411
- return _el$42;
16458
+ var _el$44 = _tmpl$1313();
16459
+ insert(_el$44, () => flow.notice());
16460
+ return _el$44;
16412
16461
  }
16413
16462
  }), null);
16414
- return _el$36;
16463
+ return _el$38;
16415
16464
  })();
16416
16465
  },
16417
16466
  get children() {
16418
16467
  return [(() => {
16419
- var _el$29 = _tmpl$732(); _el$29.firstChild;
16420
- return _el$29;
16421
- })(), (() => {
16422
16468
  var _el$31 = _tmpl$925(); _el$31.firstChild;
16423
- style(_el$31, hint4);
16424
- insert(_el$31, createComponent(Show, {
16469
+ return _el$31;
16470
+ })(), (() => {
16471
+ var _el$33 = _tmpl$1017(), _el$35 = _el$33.firstChild;
16472
+ style(_el$33, hint4);
16473
+ insert(_el$33, createComponent(Show, {
16474
+ get when() {
16475
+ return flow.flatFee();
16476
+ },
16477
+ get fallback() {
16478
+ return "Which strength each older strength is now. A change applies from each subscriber's next refill; refills already sent keep what they have. It doesn't change what any strength sells for.";
16479
+ },
16480
+ get children() {
16481
+ return ["Which strength each older strength is now.", " ", _tmpl$022()];
16482
+ }
16483
+ }), _el$35);
16484
+ insert(_el$33, createComponent(Show, {
16425
16485
  get when() {
16426
16486
  return props.unsaved;
16427
16487
  },
16428
16488
  get children() {
16429
- var _el$34 = _tmpl$828();
16430
- insert(_el$34, UNSAVED_HINT);
16431
- return _el$34;
16489
+ var _el$36 = _tmpl$1103();
16490
+ insert(_el$36, UNSAVED_HINT);
16491
+ return _el$36;
16432
16492
  }
16433
16493
  }), null);
16434
- return _el$31;
16494
+ return _el$33;
16435
16495
  })(), createComponent(Show, {
16436
16496
  get when() {
16437
16497
  return flow.notice();
16438
16498
  },
16439
16499
  keyed: true,
16440
16500
  children: (message) => (() => {
16441
- var _el$43 = _tmpl$1215(), _el$44 = _el$43.firstChild, _el$45 = _el$44.nextSibling;
16442
- insert(_el$44, message);
16443
- _el$45.$$click = () => flow.dismissNotice();
16444
- return _el$43;
16501
+ var _el$45 = _tmpl$1513(), _el$46 = _el$45.firstChild, _el$47 = _el$46.nextSibling;
16502
+ insert(_el$46, message);
16503
+ _el$47.$$click = () => flow.dismissNotice();
16504
+ return _el$45;
16445
16505
  })()
16446
16506
  }), (() => {
16447
- var _el$35 = _tmpl$022();
16448
- insert(_el$35, createComponent(For, {
16507
+ var _el$37 = _tmpl$1118();
16508
+ insert(_el$37, createComponent(For, {
16449
16509
  get each() {
16450
16510
  return dosages();
16451
16511
  },
@@ -16457,11 +16517,11 @@ function StrengthMatchesSection(props) {
16457
16517
  }
16458
16518
  })
16459
16519
  }));
16460
- return _el$35;
16520
+ return _el$37;
16461
16521
  })()];
16462
16522
  }
16463
16523
  }));
16464
- return _el$28;
16524
+ return _el$30;
16465
16525
  }
16466
16526
  });
16467
16527
  }
@@ -16480,9 +16540,9 @@ var _tmpl$1104 = /* @__PURE__ */ template(`<div class="app-admin-banner app-admi
16480
16540
  var _tmpl$1018 = /* @__PURE__ */ template(`<li>The catalog item <strong></strong> (<span class=app-admin-text-mono></span>) will be switched on and the product moved onto it.`);
16481
16541
  var _tmpl$1119 = /* @__PURE__ */ template(`<div><h4 class=app-admin-label style="margin:0 0 0.5rem">This can\u2019t be converted yet`);
16482
16542
  var _tmpl$1216 = /* @__PURE__ */ template(`<div><h4 class=app-admin-label style="margin:0 0 0.5rem">Things to know`);
16483
- var _tmpl$1313 = /* @__PURE__ */ template(`<div class=app-admin-convert data-testid=conversion-step-intro><p style=margin:0;font-size:0.875rem;line-height:1.5><strong></strong> is sold from an individual pharmacy drug (<span class=app-admin-text-mono></span>). Converting moves it onto a <strong>catalog product</strong> on your prescribing platform, so you manage its strengths and pharmacies here.</p><ul class=app-admin-convert-list><li>You choose which of the new strengths each current price moves to. Nothing carries over unless you say so.</li><li>The product keeps its name, categories, subscribers and order history. Only its link to the prescribing platform and the links on its prices change.</li><li>You can undo the conversion afterwards.`);
16484
- var _tmpl$1413 = /* @__PURE__ */ template(`<li>A catalog item is created from this drug first. It starts switched off: nothing is sold from it and your product stays exactly as it is until you convert.`);
16485
- var _tmpl$1513 = /* @__PURE__ */ template(`<div class=app-admin-convert data-testid=conversion-step-prepare><p style=margin:0;font-size:0.875rem;line-height:1.5>To show you the new strengths, we first create the catalog item from <span class=app-admin-text-mono></span> on your prescribing platform.</p><ul class=app-admin-convert-list><li>The item is created <strong>switched off</strong>: nothing is sold from it.</li><li> is not changed and keeps selling exactly as it does now.</li><li>Its strengths appear on the next step, where you match your current prices to them.</li><li>You can stop after this step; the item simply waits for you.`);
16543
+ var _tmpl$1314 = /* @__PURE__ */ template(`<div class=app-admin-convert data-testid=conversion-step-intro><p style=margin:0;font-size:0.875rem;line-height:1.5><strong></strong> is sold from an individual pharmacy drug (<span class=app-admin-text-mono></span>). Converting moves it onto a <strong>catalog product</strong> on your prescribing platform, so you manage its strengths and pharmacies here.</p><ul class=app-admin-convert-list><li>You choose which of the new strengths each current price moves to. Nothing carries over unless you say so.</li><li>The product keeps its name, categories, subscribers and order history. Only its link to the prescribing platform and the links on its prices change.</li><li>You can undo the conversion afterwards.`);
16544
+ var _tmpl$1414 = /* @__PURE__ */ template(`<li>A catalog item is created from this drug first. It starts switched off: nothing is sold from it and your product stays exactly as it is until you convert.`);
16545
+ var _tmpl$1514 = /* @__PURE__ */ template(`<div class=app-admin-convert data-testid=conversion-step-prepare><p style=margin:0;font-size:0.875rem;line-height:1.5>To show you the new strengths, we first create the catalog item from <span class=app-admin-text-mono></span> on your prescribing platform.</p><ul class=app-admin-convert-list><li>The item is created <strong>switched off</strong>: nothing is sold from it.</li><li> is not changed and keeps selling exactly as it does now.</li><li>Its strengths appear on the next step, where you match your current prices to them.</li><li>You can stop after this step; the item simply waits for you.`);
16486
16546
  var _tmpl$1613 = /* @__PURE__ */ template(`<span class="app-admin-badge app-admin-badge--warning">Subscribers flagged`);
16487
16547
  var _tmpl$1713 = /* @__PURE__ */ template(`<option value=__not_carried_over__>Not carried over`);
16488
16548
  var _tmpl$1813 = /* @__PURE__ */ template(`<span data-testid=conversion-how>`);
@@ -16688,7 +16748,7 @@ function WhatWillHappen(props) {
16688
16748
  const p = () => props.flow.preview();
16689
16749
  const target = () => p()?.target ?? null;
16690
16750
  return (() => {
16691
- var _el$14 = _tmpl$1313(), _el$20 = _el$14.firstChild, _el$21 = _el$20.firstChild, _el$22 = _el$21.nextSibling, _el$23 = _el$22.nextSibling, _el$24 = _el$20.nextSibling, _el$30 = _el$24.firstChild;
16751
+ var _el$14 = _tmpl$1314(), _el$20 = _el$14.firstChild, _el$21 = _el$20.firstChild, _el$22 = _el$21.nextSibling, _el$23 = _el$22.nextSibling, _el$24 = _el$20.nextSibling, _el$30 = _el$24.firstChild;
16692
16752
  insert(_el$14, createComponent(Show, {
16693
16753
  get when() {
16694
16754
  return p()?.stage === "active_not_committed";
@@ -16706,7 +16766,7 @@ function WhatWillHappen(props) {
16706
16766
  return target()?.kind === "existing";
16707
16767
  },
16708
16768
  get fallback() {
16709
- return _tmpl$1413();
16769
+ return _tmpl$1414();
16710
16770
  },
16711
16771
  get children() {
16712
16772
  var _el$25 = _tmpl$1018(), _el$26 = _el$25.firstChild, _el$27 = _el$26.nextSibling, _el$28 = _el$27.nextSibling, _el$29 = _el$28.nextSibling;
@@ -16750,7 +16810,7 @@ function WhatWillHappen(props) {
16750
16810
  }
16751
16811
  function Prepare(props) {
16752
16812
  return (() => {
16753
- var _el$36 = _tmpl$1513(), _el$37 = _el$36.firstChild, _el$38 = _el$37.firstChild, _el$40 = _el$38.nextSibling, _el$41 = _el$37.nextSibling, _el$42 = _el$41.firstChild, _el$43 = _el$42.nextSibling, _el$44 = _el$43.firstChild;
16813
+ var _el$36 = _tmpl$1514(), _el$37 = _el$36.firstChild, _el$38 = _el$37.firstChild, _el$40 = _el$38.nextSibling, _el$41 = _el$37.nextSibling, _el$42 = _el$41.firstChild, _el$43 = _el$42.nextSibling, _el$44 = _el$43.firstChild;
16754
16814
  insert(_el$40, () => props.product.apexDrugId);
16755
16815
  insert(_el$43, () => props.product.name, _el$44);
16756
16816
  return _el$36;
@@ -17765,9 +17825,9 @@ var _tmpl$1105 = /* @__PURE__ */ template(`<p style=font-size:0.75rem;color:var(
17765
17825
  var _tmpl$1019 = /* @__PURE__ */ template(`<div><label class=app-admin-label>Pricing</label><div style="display:grid;grid-template-columns:1fr 1fr;gap:0.5rem"></div><p style="font-size:0.6875rem;color:var(--app-admin-fg-muted);margin:0.375rem 0 0;line-height:1.4">`);
17766
17826
  var _tmpl$1120 = /* @__PURE__ */ template(`<select class=app-admin-input><option value>Lowest available strength`);
17767
17827
  var _tmpl$1217 = /* @__PURE__ */ template(`<div><label class=app-admin-label>Fallback strength</label><p style="font-size:0.6875rem;color:var(--app-admin-fg-muted);margin:0.375rem 0 0;line-height:1.4">Used when a customer reaches checkout without choosing one. Otherwise the lowest available strength.`);
17768
- var _tmpl$1314 = /* @__PURE__ */ template(`<label style=display:flex;align-items:center;gap:0.5rem;font-size:0.875rem;cursor:pointer><input type=checkbox><span>Prescriber picks the strength (no fixed strength sent)`);
17769
- var _tmpl$1414 = /* @__PURE__ */ template(`<label style=display:flex;align-items:center;gap:0.5rem;font-size:0.875rem;cursor:pointer><input type=checkbox><span>Prescriber picks the strength`);
17770
- var _tmpl$1514 = /* @__PURE__ */ template(`<div style=margin-top:0.5rem><label class=app-admin-label>Pharmacy product</label><select class=app-admin-input>`);
17828
+ var _tmpl$1315 = /* @__PURE__ */ template(`<label style=display:flex;align-items:center;gap:0.5rem;font-size:0.875rem;cursor:pointer><input type=checkbox><span>Prescriber picks the strength (no fixed strength sent)`);
17829
+ var _tmpl$1415 = /* @__PURE__ */ template(`<label style=display:flex;align-items:center;gap:0.5rem;font-size:0.875rem;cursor:pointer><input type=checkbox><span>Prescriber picks the strength`);
17830
+ var _tmpl$1515 = /* @__PURE__ */ template(`<div style=margin-top:0.5rem><label class=app-admin-label>Pharmacy product</label><select class=app-admin-input>`);
17771
17831
  var _tmpl$1614 = /* @__PURE__ */ template(`<div style=margin-top:0.5rem><label class=app-admin-label>Pharmacy product</label><select class=app-admin-input title="The pharmacy product this strength is sent as">`);
17772
17832
  var _tmpl$1714 = /* @__PURE__ */ template(`<div><label class=app-admin-label>Strength sent to the pharmacy</label><p style="font-size:0.6875rem;color:var(--app-admin-fg-muted);margin:0.375rem 0 0.5rem;line-height:1.4">Bind each strength to a specific Apex SKU so the exact product is sent to the pharmacy \u2014 no fuzzy label matching. Turn on \u201CPrescriber picks\u201D for a titration product with no fixed SKU at order time.`);
17773
17833
  var _tmpl$1814 = /* @__PURE__ */ template(`<div style=display:flex;flex-direction:column;gap:0.625rem>`);
@@ -18342,7 +18402,7 @@ function ProductEditPanel(props) {
18342
18402
  },
18343
18403
  get children() {
18344
18404
  return [(() => {
18345
- var _el$48 = _tmpl$1314(), _el$49 = _el$48.firstChild;
18405
+ var _el$48 = _tmpl$1315(), _el$49 = _el$48.firstChild;
18346
18406
  _el$49.addEventListener("change", (e) => setPrescriberPicks(e.currentTarget.checked));
18347
18407
  effect(() => _el$49.checked = prescriberPicks());
18348
18408
  return _el$48;
@@ -18378,7 +18438,7 @@ function ProductEditPanel(props) {
18378
18438
  },
18379
18439
  get children() {
18380
18440
  return [(() => {
18381
- var _el$53 = _tmpl$1414(), _el$54 = _el$53.firstChild;
18441
+ var _el$53 = _tmpl$1415(), _el$54 = _el$53.firstChild;
18382
18442
  _el$54.addEventListener("change", (e) => setPrescriberPicks(e.currentTarget.checked));
18383
18443
  effect(() => _el$54.checked = prescriberPicks());
18384
18444
  return _el$53;
@@ -18387,7 +18447,7 @@ function ProductEditPanel(props) {
18387
18447
  return memo(() => !!!prescriberPicks())() && pricingMode() === "flat_fee";
18388
18448
  },
18389
18449
  get children() {
18390
- var _el$55 = _tmpl$1514(), _el$56 = _el$55.firstChild, _el$57 = _el$56.nextSibling;
18450
+ var _el$55 = _tmpl$1515(), _el$56 = _el$55.firstChild, _el$57 = _el$56.nextSibling;
18391
18451
  _el$57.addEventListener("change", (e) => setProductSkuId(e.currentTarget.value));
18392
18452
  insert(_el$57, createComponent(SkuSelectOptions, {
18393
18453
  get skus() {
@@ -19522,9 +19582,9 @@ var _tmpl$1106 = /* @__PURE__ */ template(`<div><div class=app-admin-section-sta
19522
19582
  var _tmpl$1020 = /* @__PURE__ */ template(`<span>`);
19523
19583
  var _tmpl$1121 = /* @__PURE__ */ template(`<button type=button class=app-admin-link-btn style=font-size:inherit>`);
19524
19584
  var _tmpl$1218 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-ghost app-admin-btn-sm">Revoke`);
19525
- var _tmpl$1315 = /* @__PURE__ */ template(`<tr><td data-label=Person></td><td data-label=State><span></span></td><td data-label="Deadline to claim"class=app-admin-text-muted></td><td data-label="Issued by"><div class=app-admin-text-muted style=font-size:0.75rem></div></td><td class=app-admin-table-cell--end>`);
19526
- var _tmpl$1415 = /* @__PURE__ */ template(`<div class=app-admin-alerts style=margin-bottom:1rem>`);
19527
- var _tmpl$1515 = /* @__PURE__ */ template(`<div class=app-admin-card style=overflow:hidden><table class=app-admin-table><thead><tr><th>Name</th><th>Amount</th><th>Applies to</th><th>Grants</th><th>Handed out by</th><th>Status</th><th style=width:12rem></th></tr></thead><tbody>`);
19585
+ var _tmpl$1316 = /* @__PURE__ */ template(`<tr><td data-label=Person></td><td data-label=State><span></span></td><td data-label="Deadline to claim"class=app-admin-text-muted></td><td data-label="Issued by"><div class=app-admin-text-muted style=font-size:0.75rem></div></td><td class=app-admin-table-cell--end>`);
19586
+ var _tmpl$1416 = /* @__PURE__ */ template(`<div class=app-admin-alerts style=margin-bottom:1rem>`);
19587
+ var _tmpl$1516 = /* @__PURE__ */ template(`<div class=app-admin-card style=overflow:hidden><table class=app-admin-table><thead><tr><th>Name</th><th>Amount</th><th>Applies to</th><th>Grants</th><th>Handed out by</th><th>Status</th><th style=width:12rem></th></tr></thead><tbody>`);
19528
19588
  var _tmpl$1615 = /* @__PURE__ */ template(`<div><div style=display:flex;align-items:flex-start;justify-content:space-between;gap:1rem;margin-bottom:2rem><button type=button class="app-admin-btn app-admin-btn-primary"style=white-space:nowrap>+ New offer`);
19529
19589
  var _tmpl$1715 = /* @__PURE__ */ template(`<div class=app-admin-text-muted style=font-size:0.75rem;font-weight:400>`);
19530
19590
  var _tmpl$1815 = /* @__PURE__ */ template(`<tr><td data-label=Name style=font-weight:500></td><td data-label=Amount> off</td><td data-label="Applies to"></td><td data-label=Grants> open \xB7 <!> claimed<div class=app-admin-text-muted style=font-size:0.75rem> expired \xB7 <!> revoked</div></td><td data-label="Handed out by"class=app-admin-text-muted></td><td data-label=Status><span></span></td><td data-label=Actions><button type=button style=color:var(--app-admin-primary-soft-fg)>Grants</button><button type=button style=color:var(--app-admin-primary-soft-fg);margin-left:0.75rem>Edit</button><button type=button style=color:var(--app-admin-danger-fg);margin-left:0.75rem>Archive`);
@@ -19857,7 +19917,7 @@ function OfferGrants(props) {
19857
19917
  return grants();
19858
19918
  },
19859
19919
  children: (g) => (() => {
19860
- var _el$56 = _tmpl$1315(), _el$57 = _el$56.firstChild, _el$59 = _el$57.nextSibling, _el$60 = _el$59.firstChild, _el$61 = _el$59.nextSibling, _el$62 = _el$61.nextSibling, _el$63 = _el$62.firstChild, _el$64 = _el$62.nextSibling;
19920
+ var _el$56 = _tmpl$1316(), _el$57 = _el$56.firstChild, _el$59 = _el$57.nextSibling, _el$60 = _el$59.firstChild, _el$61 = _el$59.nextSibling, _el$62 = _el$61.nextSibling, _el$63 = _el$62.firstChild, _el$64 = _el$62.nextSibling;
19861
19921
  insert(_el$57, createComponent(Show, {
19862
19922
  get when() {
19863
19923
  return g.userId && nav;
@@ -19985,7 +20045,7 @@ function Offers() {
19985
20045
  return loadError() || archiveError();
19986
20046
  },
19987
20047
  get children() {
19988
- var _el$69 = _tmpl$1415();
20048
+ var _el$69 = _tmpl$1416();
19989
20049
  insert(_el$69, createComponent(Show, {
19990
20050
  get when() {
19991
20051
  return loadError();
@@ -20025,7 +20085,7 @@ function Offers() {
20025
20085
  return createComponent(LoadingSpinner, {});
20026
20086
  },
20027
20087
  get children() {
20028
- var _el$70 = _tmpl$1515(), _el$71 = _el$70.firstChild, _el$72 = _el$71.firstChild, _el$73 = _el$72.firstChild, _el$74 = _el$73.firstChild, _el$75 = _el$74.nextSibling, _el$76 = _el$75.nextSibling, _el$77 = _el$76.nextSibling, _el$78 = _el$77.nextSibling, _el$79 = _el$78.nextSibling; _el$79.nextSibling; var _el$81 = _el$72.nextSibling;
20088
+ var _el$70 = _tmpl$1516(), _el$71 = _el$70.firstChild, _el$72 = _el$71.firstChild, _el$73 = _el$72.firstChild, _el$74 = _el$73.firstChild, _el$75 = _el$74.nextSibling, _el$76 = _el$75.nextSibling, _el$77 = _el$76.nextSibling, _el$78 = _el$77.nextSibling, _el$79 = _el$78.nextSibling; _el$79.nextSibling; var _el$81 = _el$72.nextSibling;
20029
20089
  insert(_el$81, createComponent(For, {
20030
20090
  get each() {
20031
20091
  return offers();
@@ -20790,9 +20850,9 @@ var _tmpl$1108 = /* @__PURE__ */ template(`<p role=alert style="margin:0.5rem 0
20790
20850
  var _tmpl$1021 = /* @__PURE__ */ template(`<div style="padding:1rem 1.25rem 0.75rem;border-bottom:1px solid var(--app-admin-border)"><div style=display:flex;justify-content:space-between;gap:1rem;align-items:flex-start><div style=min-width:0><h3 style="margin:0 0 0.25rem"></h3><p class=app-admin-text-muted style=margin:0;font-size:0.8125rem></p></div></div><div style=display:flex;gap:0.375rem;align-items:center;margin-top:0.75rem;flex-wrap:wrap><select class=app-admin-input aria-label=Category style="font-size:0.75rem;width:auto;padding:0.125rem 0.5rem"><option value>Uncategorized</option></select><span style=flex:1>`);
20791
20851
  var _tmpl$1122 = /* @__PURE__ */ template(`<p style=margin:0>The customer's messages in this thread will be sent to their prescriber as one message and removed from support. Support's replies stay. This can't be undone.`);
20792
20852
  var _tmpl$1219 = /* @__PURE__ */ template(`<div class=app-admin-support-scroll data-scrollable style="padding:1rem 1.25rem"><div>`);
20793
- var _tmpl$1316 = /* @__PURE__ */ template(`<p role=alert style="margin:0 0 0.5rem;font-size:0.8125rem;color:var(--app-admin-danger-fg)">`);
20794
- var _tmpl$1416 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-ghost">Send &amp; resolve`);
20795
- var _tmpl$1516 = /* @__PURE__ */ template(`<form style="padding:0.75rem 1.25rem 1rem;border-top:1px solid var(--app-admin-border)"><div style=display:flex;gap:0.375rem;flex-wrap:wrap;margin-bottom:0.5rem></div><textarea class=app-admin-input rows=3 maxlength=5000 placeholder="Write a reply\u2026"aria-label=Reply style=width:100%></textarea><div style=display:flex;gap:0.5rem;align-items:center;margin-top:0.5rem;flex-wrap:wrap><button type=submit class="app-admin-btn app-admin-btn-primary"></button><label class="app-admin-btn app-admin-btn-ghost"style=cursor:pointer>Attach<input type=file style=display:none>`);
20853
+ var _tmpl$1317 = /* @__PURE__ */ template(`<p role=alert style="margin:0 0 0.5rem;font-size:0.8125rem;color:var(--app-admin-danger-fg)">`);
20854
+ var _tmpl$1417 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-ghost">Send &amp; resolve`);
20855
+ var _tmpl$1517 = /* @__PURE__ */ template(`<form style="padding:0.75rem 1.25rem 1rem;border-top:1px solid var(--app-admin-border)"><div style=display:flex;gap:0.375rem;flex-wrap:wrap;margin-bottom:0.5rem></div><textarea class=app-admin-input rows=3 maxlength=5000 placeholder="Write a reply\u2026"aria-label=Reply style=width:100%></textarea><div style=display:flex;gap:0.5rem;align-items:center;margin-top:0.5rem;flex-wrap:wrap><button type=submit class="app-admin-btn app-admin-btn-primary"></button><label class="app-admin-btn app-admin-btn-ghost"style=cursor:pointer>Attach<input type=file style=display:none>`);
20796
20856
  var _tmpl$1616 = /* @__PURE__ */ template(`<option>`);
20797
20857
  var _tmpl$1716 = /* @__PURE__ */ template(`<button type=button style=font-size:0.75rem>`);
20798
20858
  var _tmpl$1816 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-ghost">Cancel`);
@@ -21282,14 +21342,14 @@ ${body}` : body);
21282
21342
  typeof _ref$2 === "function" ? use(_ref$2, _el$26) : transcriptEnd.setEnd = _el$26;
21283
21343
  return _el$25;
21284
21344
  })(), (() => {
21285
- var _el$27 = _tmpl$1516(), _el$29 = _el$27.firstChild, _el$30 = _el$29.nextSibling, _el$31 = _el$30.nextSibling, _el$32 = _el$31.firstChild, _el$34 = _el$32.nextSibling, _el$35 = _el$34.firstChild, _el$36 = _el$35.nextSibling;
21345
+ var _el$27 = _tmpl$1517(), _el$29 = _el$27.firstChild, _el$30 = _el$29.nextSibling, _el$31 = _el$30.nextSibling, _el$32 = _el$31.firstChild, _el$34 = _el$32.nextSibling, _el$35 = _el$34.firstChild, _el$36 = _el$35.nextSibling;
21286
21346
  _el$27.addEventListener("submit", sendReply);
21287
21347
  insert(_el$27, createComponent(Show, {
21288
21348
  get when() {
21289
21349
  return error();
21290
21350
  },
21291
21351
  get children() {
21292
- var _el$28 = _tmpl$1316();
21352
+ var _el$28 = _tmpl$1317();
21293
21353
  insert(_el$28, error);
21294
21354
  return _el$28;
21295
21355
  }
@@ -21313,7 +21373,7 @@ ${body}` : body);
21313
21373
  return memo(() => d().thread.status !== "closed")() && d().thread.status !== "transferred";
21314
21374
  },
21315
21375
  get children() {
21316
- var _el$33 = _tmpl$1416();
21376
+ var _el$33 = _tmpl$1417();
21317
21377
  _el$33.$$click = (e) => void sendReply(e, {
21318
21378
  resolve: true
21319
21379
  });
@@ -23064,9 +23124,9 @@ var _tmpl$1124 = /* @__PURE__ */ template(`<div style="display:grid;grid-templat
23064
23124
  var _tmpl$1023 = /* @__PURE__ */ template(`<p class=app-admin-text-muted style="font-size:0.75rem;margin:0;padding:0.625rem 1.25rem 0">Each step waits the given hours after the previous one (the first, after enrollment), then sends its template with the chosen link.`);
23065
23125
  var _tmpl$1125 = /* @__PURE__ */ template(`<table class=app-admin-table><thead><tr><th>Person</th><th>Came from</th><th>Step</th><th>Next due</th><th></th></tr></thead><tbody>`);
23066
23126
  var _tmpl$1220 = /* @__PURE__ */ template(`<div style=display:grid;gap:0.75rem><label><span>Name</span><input class=app-admin-input maxlength=120 placeholder="Finish your visit"></label><label><span>Notes (internal)</span><input class=app-admin-input maxlength=500 placeholder="Who this is for and why">`);
23067
- var _tmpl$1317 = /* @__PURE__ */ template(`<label><input type=checkbox aria-label="Send automatically when a step is due"><span>Send automatically when a step is due<span class=app-admin-text-muted style=display:block;font-size:0.75rem;margin-top:0.125rem>`);
23068
- var _tmpl$1417 = /* @__PURE__ */ template(`<label><span>Only enroll people who entered in the last (days)</span><input class=app-admin-input type=number min=1 max=365><span class=app-admin-text-muted style=font-size:0.75rem>So a feed never mails months-old accounts. Add those by hand if you want them.`);
23069
- var _tmpl$1517 = /* @__PURE__ */ template(`<label style=font-size:0.8125rem;display:flex;gap:0.375rem;align-items:center><input type=checkbox>Skip people whose questionnaire did not qualify`);
23127
+ var _tmpl$1318 = /* @__PURE__ */ template(`<label><input type=checkbox aria-label="Send automatically when a step is due"><span>Send automatically when a step is due<span class=app-admin-text-muted style=display:block;font-size:0.75rem;margin-top:0.125rem>`);
23128
+ var _tmpl$1418 = /* @__PURE__ */ template(`<label><span>Only enroll people who entered in the last (days)</span><input class=app-admin-input type=number min=1 max=365><span class=app-admin-text-muted style=font-size:0.75rem>So a feed never mails months-old accounts. Add those by hand if you want them.`);
23129
+ var _tmpl$1518 = /* @__PURE__ */ template(`<label style=font-size:0.8125rem;display:flex;gap:0.375rem;align-items:center><input type=checkbox>Skip people whose questionnaire did not qualify`);
23070
23130
  var _tmpl$1617 = /* @__PURE__ */ template(`<div style=display:grid;gap:0.75rem><p class=app-admin-text-muted style=font-size:0.75rem;margin:0>Anyone you add from the Funnel tab. Tick segments to also enroll whoever enters them (the hourly check adds and removes them; their clock starts at their own entry).</p><label><input type=checkbox aria-label="Savings-program members only"><span>Savings-program members only<span class=app-admin-text-muted style=display:block;font-size:0.75rem;margin-top:0.125rem>Re-checked at every send: someone who is no longer a member in good standing is removed instead of emailed.`);
23071
23131
  var _tmpl$1717 = /* @__PURE__ */ template(`<option selected>`);
23072
23132
  var _tmpl$1817 = /* @__PURE__ */ template(`<label><span>Valid for (days)</span><input class=app-admin-input type=number min=1 max=365 aria-label="Offer valid for days"style=width:6rem><span class=app-admin-text-muted style=font-size:0.75rem>Each person gets their own deadline, counted from the day they were enrolled.`);
@@ -23873,7 +23933,7 @@ function SequenceEditor(props) {
23873
23933
  insert(_el$44, createComponent(Section, {
23874
23934
  title: "Sending",
23875
23935
  get children() {
23876
- var _el$52 = _tmpl$1317(), _el$53 = _el$52.firstChild, _el$54 = _el$53.nextSibling, _el$55 = _el$54.firstChild, _el$56 = _el$55.nextSibling;
23936
+ var _el$52 = _tmpl$1318(), _el$53 = _el$52.firstChild, _el$54 = _el$53.nextSibling, _el$55 = _el$54.firstChild, _el$56 = _el$55.nextSibling;
23877
23937
  _el$53.addEventListener("change", (e) => update({
23878
23938
  autoSend: e.currentTarget.checked
23879
23939
  }));
@@ -23916,7 +23976,7 @@ function SequenceEditor(props) {
23916
23976
  },
23917
23977
  get children() {
23918
23978
  return [(() => {
23919
- var _el$59 = _tmpl$1417(), _el$60 = _el$59.firstChild, _el$61 = _el$60.nextSibling; _el$61.nextSibling;
23979
+ var _el$59 = _tmpl$1418(), _el$60 = _el$59.firstChild, _el$61 = _el$60.nextSibling; _el$61.nextSibling;
23920
23980
  _el$61.$$input = (e) => update({
23921
23981
  feedMaxAgeDays: Number(e.currentTarget.value)
23922
23982
  });
@@ -23932,7 +23992,7 @@ function SequenceEditor(props) {
23932
23992
  effect(() => _el$61.value = draft().feedMaxAgeDays ?? 30);
23933
23993
  return _el$59;
23934
23994
  })(), (() => {
23935
- var _el$63 = _tmpl$1517(), _el$64 = _el$63.firstChild;
23995
+ var _el$63 = _tmpl$1518(), _el$64 = _el$63.firstChild;
23936
23996
  _el$64.addEventListener("change", (e) => update({
23937
23997
  feedQualifiedOnly: e.currentTarget.checked
23938
23998
  }));
@@ -24204,9 +24264,9 @@ var _tmpl$1126 = /* @__PURE__ */ template(`<span class="app-admin-badge app-admi
24204
24264
  var _tmpl$1024 = /* @__PURE__ */ template(`<div class=app-admin-text-muted style=font-size:0.75rem>`);
24205
24265
  var _tmpl$1127 = /* @__PURE__ */ template(`<span class="app-admin-badge app-admin-badge--info"style=margin-left:0.5rem>Savings`);
24206
24266
  var _tmpl$1221 = /* @__PURE__ */ template(`<td data-label=Account><span class=app-admin-text-muted>`);
24207
- var _tmpl$1318 = /* @__PURE__ */ template(`<tr><td><input type=checkbox></td><td data-label=Person><div></div></td><td data-label="Where they stopped"></td><td data-label=Since class=app-admin-text-muted>`);
24208
- var _tmpl$1418 = /* @__PURE__ */ template(`<div><div style=margin-bottom:1rem><select class=app-admin-input style=width:auto><option value=7>Last 7 days</option><option value=30>Last 30 days</option><option value=90>Last 90 days`);
24209
- var _tmpl$1518 = /* @__PURE__ */ template(`<div class=app-admin-card style=margin-top:1.25rem><div style=padding:1.25rem;display:flex;align-items:flex-end;gap:0.375rem;height:9rem>`);
24267
+ var _tmpl$1319 = /* @__PURE__ */ template(`<tr><td><input type=checkbox></td><td data-label=Person><div></div></td><td data-label="Where they stopped"></td><td data-label=Since class=app-admin-text-muted>`);
24268
+ var _tmpl$1419 = /* @__PURE__ */ template(`<div><div style=margin-bottom:1rem><select class=app-admin-input style=width:auto><option value=7>Last 7 days</option><option value=30>Last 30 days</option><option value=90>Last 90 days`);
24269
+ var _tmpl$1519 = /* @__PURE__ */ template(`<div class=app-admin-card style=margin-top:1.25rem><div style=padding:1.25rem;display:flex;align-items:flex-end;gap:0.375rem;height:9rem>`);
24210
24270
  var _tmpl$1618 = /* @__PURE__ */ template(`<span style=font-size:0.6875rem;color:var(--app-admin-fg-muted)>`);
24211
24271
  var _tmpl$1718 = /* @__PURE__ */ template(`<div style=flex:1;display:flex;flex-direction:column;align-items:center;gap:0.25rem;height:100%;justify-content:flex-end><div style="width:100%;max-width:1.75rem;border-radius:4px 4px 0 0"></div><span style=font-size:0.625rem;color:var(--app-admin-fg-subtle)>`);
24212
24272
  function CardHeader(props) {
@@ -24363,7 +24423,7 @@ function SegmentSection(props) {
24363
24423
  return page().people;
24364
24424
  },
24365
24425
  children: (p) => (() => {
24366
- var _el$35 = _tmpl$1318(), _el$36 = _el$35.firstChild, _el$37 = _el$36.firstChild, _el$38 = _el$36.nextSibling, _el$39 = _el$38.firstChild, _el$43 = _el$38.nextSibling, _el$44 = _el$43.nextSibling;
24426
+ var _el$35 = _tmpl$1319(), _el$36 = _el$35.firstChild, _el$37 = _el$36.firstChild, _el$38 = _el$36.nextSibling, _el$39 = _el$38.firstChild, _el$43 = _el$38.nextSibling, _el$44 = _el$43.nextSibling;
24367
24427
  _el$37.addEventListener("change", (e) => setSelected({
24368
24428
  ...selected(),
24369
24429
  [p.email]: e.currentTarget.checked
@@ -24459,7 +24519,7 @@ function Funnel() {
24459
24519
  const [segments] = createResource(days, (d) => apiFetch(`/admin/funnel/segments?days=${d}`));
24460
24520
  const dropoffMax = () => Math.max(1, ...(summary()?.stepDropoff ?? []).map((b) => b.count));
24461
24521
  return (() => {
24462
- var _el$48 = _tmpl$1418(), _el$49 = _el$48.firstChild, _el$50 = _el$49.firstChild;
24522
+ var _el$48 = _tmpl$1419(), _el$49 = _el$48.firstChild, _el$50 = _el$49.firstChild;
24463
24523
  insert(_el$48, createComponent(PageTitle, {
24464
24524
  subtitle: "Who stopped short of a subscription, and where",
24465
24525
  children: "Funnel"
@@ -24499,7 +24559,7 @@ function Funnel() {
24499
24559
  return summary();
24500
24560
  },
24501
24561
  children: (s) => (() => {
24502
- var _el$51 = _tmpl$1518(), _el$52 = _el$51.firstChild;
24562
+ var _el$51 = _tmpl$1519(), _el$52 = _el$51.firstChild;
24503
24563
  insert(_el$51, createComponent(CardHeader, {
24504
24564
  title: "Where abandons quit",
24505
24565
  get note() {
@@ -24562,9 +24622,9 @@ var _tmpl$1128 = /* @__PURE__ */ template(`<span>`);
24562
24622
  var _tmpl$1025 = /* @__PURE__ */ template(`<p style=margin:0>Nobody has been enrolled in this sequence yet.`);
24563
24623
  var _tmpl$1129 = /* @__PURE__ */ template(`<p style="margin:0 0 1rem">No emails have gone out yet.`);
24564
24624
  var _tmpl$1222 = /* @__PURE__ */ template(`<tr><td data-label=Email style=min-width:14rem><strong>.</strong> </td><td data-label=Sent></td><td data-label="Link followed"></td><td data-label="Bought after this email"></td><td data-label="Unsubscribed after it">`);
24565
- var _tmpl$1319 = /* @__PURE__ */ template(`<span>a step since removed`);
24566
- var _tmpl$1419 = /* @__PURE__ */ template(`<div>Offer: <!> granted \u2014 <!> open, <!> claimed, <!> expired<!>.`);
24567
- var _tmpl$1519 = /* @__PURE__ */ template(`<td data-label="Claimed the offer">`);
24625
+ var _tmpl$1320 = /* @__PURE__ */ template(`<span>a step since removed`);
24626
+ var _tmpl$1420 = /* @__PURE__ */ template(`<div>Offer: <!> granted \u2014 <!> open, <!> claimed, <!> expired<!>.`);
24627
+ var _tmpl$1520 = /* @__PURE__ */ template(`<td data-label="Claimed the offer">`);
24568
24628
  var _tmpl$1619 = /* @__PURE__ */ template(`<tr><td data-label=Person></td><td data-label=Bought></td><td data-label="Last email before buying"></td><td data-label="Followed a link"></td><td data-label="Paid since">`);
24569
24629
  var _tmpl$1719 = /* @__PURE__ */ template(`<span>none yet`);
24570
24630
  var _tmpl$1818 = /* @__PURE__ */ template(`<span>No`);
@@ -24726,7 +24786,7 @@ function SequenceCard(props) {
24726
24786
  var _el$30 = _tmpl$1222(), _el$31 = _el$30.firstChild, _el$32 = _el$31.firstChild, _el$33 = _el$32.firstChild; _el$32.nextSibling; var _el$35 = _el$31.nextSibling, _el$36 = _el$35.nextSibling, _el$37 = _el$36.nextSibling, _el$38 = _el$37.nextSibling;
24727
24787
  insert(_el$32, () => s.stepIndex + 1, _el$33);
24728
24788
  insert(_el$31, () => s.templateName ?? (() => {
24729
- var _el$39 = _tmpl$1319();
24789
+ var _el$39 = _tmpl$1320();
24730
24790
  effect((_$p) => style(_el$39, muted, _$p));
24731
24791
  return _el$39;
24732
24792
  })(), null);
@@ -24767,7 +24827,7 @@ function SequenceCard(props) {
24767
24827
  return r().offer;
24768
24828
  },
24769
24829
  children: (offer) => (() => {
24770
- var _el$40 = _tmpl$1419(), _el$41 = _el$40.firstChild, _el$47 = _el$41.nextSibling, _el$42 = _el$47.nextSibling, _el$48 = _el$42.nextSibling, _el$43 = _el$48.nextSibling, _el$49 = _el$43.nextSibling, _el$44 = _el$49.nextSibling, _el$50 = _el$44.nextSibling, _el$45 = _el$50.nextSibling, _el$51 = _el$45.nextSibling; _el$51.nextSibling;
24830
+ var _el$40 = _tmpl$1420(), _el$41 = _el$40.firstChild, _el$47 = _el$41.nextSibling, _el$42 = _el$47.nextSibling, _el$48 = _el$42.nextSibling, _el$43 = _el$48.nextSibling, _el$49 = _el$43.nextSibling, _el$44 = _el$49.nextSibling, _el$50 = _el$44.nextSibling, _el$45 = _el$50.nextSibling, _el$51 = _el$45.nextSibling; _el$51.nextSibling;
24771
24831
  insert(_el$40, () => offer().granted, _el$47);
24772
24832
  insert(_el$40, () => offer().states.open, _el$48);
24773
24833
  insert(_el$40, () => offer().states.claimed, _el$49);
@@ -24831,7 +24891,7 @@ function SequenceCard(props) {
24831
24891
  return r().offer;
24832
24892
  },
24833
24893
  get children() {
24834
- var _el$57 = _tmpl$1519();
24894
+ var _el$57 = _tmpl$1520();
24835
24895
  insert(_el$57, (() => {
24836
24896
  var _c$3 = memo(() => !!b.claimedOffer);
24837
24897
  return () => _c$3() ? "Yes" : (() => {
@@ -24956,8 +25016,8 @@ var _tmpl$1130 = /* @__PURE__ */ template(`<span class="app-admin-badge app-admi
24956
25016
  var _tmpl$1026 = /* @__PURE__ */ template(`<label style=display:flex;gap:0.5rem;align-items:flex-start;cursor:pointer><input type=radio name=support-channel-mode style=margin-top:0.1875rem><span><span style=font-size:0.875rem;display:block></span><span style=font-size:0.75rem>`);
24957
25017
  var _tmpl$1131 = /* @__PURE__ */ template(`<span style=font-size:0.75rem;color:var(--app-admin-danger-fg)>Enter the inbox that should receive support messages.`);
24958
25018
  var _tmpl$1223 = /* @__PURE__ */ template(`<label style=display:grid;gap:0.25rem;max-width:24rem><span>Support inbox</span><input type=email class=app-admin-input data-testid=support-channel-email-input placeholder=help@example.com>`);
24959
- var _tmpl$1320 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-primary app-admin-btn-sm"data-testid=support-channel-save>`);
24960
- var _tmpl$1420 = /* @__PURE__ */ template(`<div>`);
25019
+ var _tmpl$1321 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-primary app-admin-btn-sm"data-testid=support-channel-save>`);
25020
+ var _tmpl$1421 = /* @__PURE__ */ template(`<div>`);
24961
25021
  function humanize2(key) {
24962
25022
  return key.replace(/([A-Z])/g, " $1").replace(/[_-]/g, " ").replace(/^\w/, (c) => c.toUpperCase()).trim();
24963
25023
  }
@@ -25346,7 +25406,7 @@ function SupportChannelCard() {
25346
25406
  note: "Where messages from the member portal's Support form go. Care-team messages are not affected.",
25347
25407
  get aside() {
25348
25408
  return (() => {
25349
- var _el$51 = _tmpl$1320();
25409
+ var _el$51 = _tmpl$1321();
25350
25410
  _el$51.$$click = save;
25351
25411
  insert(_el$51, () => saving() ? "Saving\u2026" : "Save");
25352
25412
  effect(() => _el$51.disabled = !dirty() || saving() || needsInbox());
@@ -25392,7 +25452,7 @@ function SupportChannelCard() {
25392
25452
  }
25393
25453
  function EmailNotifications() {
25394
25454
  return (() => {
25395
- var _el$52 = _tmpl$1420();
25455
+ var _el$52 = _tmpl$1421();
25396
25456
  insert(_el$52, createComponent(PageTitle, {
25397
25457
  subtitle: "Who gets admin copies, and when the automated billing reminders go out",
25398
25458
  children: "Notifications"
@@ -25720,14 +25780,369 @@ function Features() {
25720
25780
  })();
25721
25781
  }
25722
25782
  delegateEvents(["click", "input"]);
25783
+ var _tmpl$401 = /* @__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">`);
25784
+ var _tmpl$2126 = /* @__PURE__ */ template(`<form style=display:flex;flex-direction:column;gap:0.875rem><label style=display:flex;flex-direction:column;gap:0.35rem><span>Choose a 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">`);
25785
+ var _tmpl$3102 = /* @__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>Accept your admin invite`);
25786
+ var _tmpl$470 = /* @__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">`);
25787
+ function queryParam(name) {
25788
+ if (typeof window === "undefined") return "";
25789
+ return new URLSearchParams(window.location.search).get(name) ?? "";
25790
+ }
25791
+ var MIN_PASSWORD_LENGTH = 8;
25792
+ var ADMIN_INVITE_PARAM = "adminInvite";
25793
+ function isAdminInviteLink() {
25794
+ return typeof window !== "undefined" && new URLSearchParams(window.location.search).has(ADMIN_INVITE_PARAM);
25795
+ }
25796
+ function AcceptAdminInvitePage(props) {
25797
+ const token = () => props.token ?? queryParam("token");
25798
+ const email = () => props.email ?? queryParam("email");
25799
+ const [password, setPassword] = createSignal("");
25800
+ const [confirm2, setConfirm] = createSignal("");
25801
+ const [submitting, setSubmitting] = createSignal(false);
25802
+ const [error, setError] = createSignal(null);
25803
+ const [message, setMessage] = createSignal(null);
25804
+ async function handleSubmit(e) {
25805
+ e.preventDefault();
25806
+ setError(null);
25807
+ if (!token() || !email()) {
25808
+ setError("This invite link is incomplete. Ask the person who invited you to send a new one.");
25809
+ return;
25810
+ }
25811
+ if (password().length < MIN_PASSWORD_LENGTH) {
25812
+ setError(`Use at least ${MIN_PASSWORD_LENGTH} characters.`);
25813
+ return;
25814
+ }
25815
+ if (password() !== confirm2()) {
25816
+ setError("Passwords do not match.");
25817
+ return;
25818
+ }
25819
+ setSubmitting(true);
25820
+ try {
25821
+ await authApi.acceptAdminInvite({
25822
+ email: email().trim().toLowerCase(),
25823
+ token: token(),
25824
+ password: password()
25825
+ });
25826
+ setMessage("You\u2019re all set. Sign in with this email and your new password.");
25827
+ props.onSuccess?.();
25828
+ } catch (err) {
25829
+ setError(err instanceof Error ? err.message : "Something went wrong");
25830
+ } finally {
25831
+ setSubmitting(false);
25832
+ }
25833
+ }
25834
+ return (() => {
25835
+ var _el$ = _tmpl$3102(), _el$2 = _el$.firstChild; _el$2.firstChild;
25836
+ insert(_el$2, createComponent(Show, {
25837
+ get when() {
25838
+ return !message();
25839
+ },
25840
+ get fallback() {
25841
+ return (() => {
25842
+ var _el$11 = _tmpl$470();
25843
+ insert(_el$11, message);
25844
+ return _el$11;
25845
+ })();
25846
+ },
25847
+ get children() {
25848
+ var _el$4 = _tmpl$2126(), _el$5 = _el$4.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling, _el$8 = _el$5.nextSibling, _el$9 = _el$8.firstChild, _el$0 = _el$9.nextSibling, _el$10 = _el$8.nextSibling;
25849
+ _el$4.addEventListener("submit", handleSubmit);
25850
+ _el$7.$$input = (e) => setPassword(e.currentTarget.value);
25851
+ _el$0.$$input = (e) => setConfirm(e.currentTarget.value);
25852
+ insert(_el$4, createComponent(Show, {
25853
+ get when() {
25854
+ return error();
25855
+ },
25856
+ get children() {
25857
+ var _el$1 = _tmpl$401();
25858
+ insert(_el$1, error);
25859
+ return _el$1;
25860
+ }
25861
+ }), _el$10);
25862
+ insert(_el$10, () => submitting() ? "Saving\u2026" : "Accept invite");
25863
+ effect((_p$) => {
25864
+ var _v$ = labelStyle(), _v$2 = inputStyle(), _v$3 = labelStyle(), _v$4 = inputStyle(), _v$5 = submitting(), _v$6 = submitting() ? "not-allowed" : "pointer", _v$7 = submitting() ? 0.7 : 1;
25865
+ _p$.e = style(_el$6, _v$, _p$.e);
25866
+ _p$.t = style(_el$7, _v$2, _p$.t);
25867
+ _p$.a = style(_el$9, _v$3, _p$.a);
25868
+ _p$.o = style(_el$0, _v$4, _p$.o);
25869
+ _v$5 !== _p$.i && (_el$10.disabled = _p$.i = _v$5);
25870
+ _v$6 !== _p$.n && setStyleProperty(_el$10, "cursor", _p$.n = _v$6);
25871
+ _v$7 !== _p$.s && setStyleProperty(_el$10, "opacity", _p$.s = _v$7);
25872
+ return _p$;
25873
+ }, {
25874
+ e: void 0,
25875
+ t: void 0,
25876
+ a: void 0,
25877
+ o: void 0,
25878
+ i: void 0,
25879
+ n: void 0,
25880
+ s: void 0
25881
+ });
25882
+ effect(() => _el$7.value = password());
25883
+ effect(() => _el$0.value = confirm2());
25884
+ return _el$4;
25885
+ }
25886
+ }), null);
25887
+ return _el$;
25888
+ })();
25889
+ }
25890
+ function labelStyle() {
25891
+ return {
25892
+ "font-size": "0.75rem",
25893
+ "text-transform": "uppercase",
25894
+ "letter-spacing": "0.05em",
25895
+ color: "var(--app-affiliate-fg-muted)"
25896
+ };
25897
+ }
25898
+ function inputStyle() {
25899
+ return {
25900
+ width: "100%",
25901
+ padding: "0.625rem 0.75rem",
25902
+ background: "var(--app-affiliate-surface-light)",
25903
+ color: "var(--app-affiliate-fg)",
25904
+ border: "1px solid var(--app-affiliate-border)",
25905
+ "border-radius": "var(--app-affiliate-radius-sm)",
25906
+ "font-size": "0.9rem",
25907
+ "font-family": "inherit",
25908
+ "box-sizing": "border-box"
25909
+ };
25910
+ }
25911
+ delegateEvents(["input"]);
25912
+
25913
+ // src/pages/admin/Admins.tsx
25914
+ var _tmpl$407 = /* @__PURE__ */ template(`<option value disabled>Unknown role`);
25915
+ var _tmpl$2127 = /* @__PURE__ */ template(`<select class=app-admin-input>`);
25916
+ var _tmpl$3103 = /* @__PURE__ */ template(`<option>`);
25917
+ var _tmpl$471 = /* @__PURE__ */ template(`<div class=app-admin-card-soft style="padding:0.625rem 0.875rem;margin-top:0.75rem;font-size:0.875rem">`);
25918
+ var _tmpl$560 = /* @__PURE__ */ template(`<table class=app-admin-table><thead><tr><th>Admin</th><th>Role</th><th style=text-align:right></th></tr></thead><tbody>`);
25919
+ var _tmpl$656 = /* @__PURE__ */ template(`<div class=app-admin-heading style="font-size:1rem;margin:1.5rem 0 0.5rem">Pending invites`);
25920
+ var _tmpl$749 = /* @__PURE__ */ template(`<table class=app-admin-table><thead><tr><th>Email</th><th>Role when they join</th><th>Expires</th><th style=text-align:right></th></tr></thead><tbody>`);
25921
+ var _tmpl$842 = /* @__PURE__ */ template(`<div><form class=app-admin-card style=padding:1rem;margin-bottom:1.5rem><div class=app-admin-heading style=font-size:1rem;margin-bottom:0.75rem>Invite an admin</div><div style=display:flex;gap:0.75rem;flex-wrap:wrap;align-items:flex-end><label style="display:flex;flex-direction:column;gap:0.25rem;flex:1 1 16rem"><span class=app-admin-label>Email</span><input class=app-admin-input type=email required placeholder=name@example.com></label><label style=display:flex;flex-direction:column;gap:0.25rem><span class=app-admin-label>Role</span></label><button type=submit class="app-admin-btn app-admin-btn-primary"></button></div><div class=app-admin-text-muted style=font-size:0.8125rem;margin-top:0.5rem>: `);
25922
+ var _tmpl$939 = /* @__PURE__ */ template(`<span class=app-admin-text-muted> (you)`);
25923
+ var _tmpl$035 = /* @__PURE__ */ template(`<tr><td></td><td></td><td style=text-align:right><button type=button class="app-admin-btn app-admin-btn-ghost">Remove`);
25924
+ var _tmpl$1134 = /* @__PURE__ */ template(`<tr><td></td><td></td><td class=app-admin-text-muted></td><td style=text-align:right><button type=button class="app-admin-btn app-admin-btn-ghost">Withdraw`);
25925
+ var ADMIN_ROLE_SUMMARY = {
25926
+ owner: "Everything, including managing admins",
25927
+ support: "Customers, patient records, support, subscriptions and refunds",
25928
+ accounting: "Payments, refunds and subscriptions \u2014 no patient prescription data",
25929
+ marketing: "Funnel, promotions, catalog and email copy \u2014 no patient data"
25930
+ };
25931
+ var ROLE_LABEL = {
25932
+ owner: "Owner",
25933
+ support: "Support agent",
25934
+ accounting: "Accounting",
25935
+ marketing: "Marketing"
25936
+ };
25937
+ function defaultAcceptUrl() {
25938
+ if (typeof window === "undefined") return "";
25939
+ return `${window.location.origin}${window.location.pathname}?${ADMIN_INVITE_PARAM}=1`;
25940
+ }
25941
+ function RoleSelect(props) {
25942
+ return (() => {
25943
+ var _el$ = _tmpl$2127();
25944
+ _el$.addEventListener("change", (e) => props.onChange(e.currentTarget.value));
25945
+ insert(_el$, createComponent(Show, {
25946
+ get when() {
25947
+ return props.value === null;
25948
+ },
25949
+ get children() {
25950
+ return _tmpl$407();
25951
+ }
25952
+ }), null);
25953
+ insert(_el$, createComponent(For, {
25954
+ each: ADMIN_ROLES,
25955
+ children: (r) => (() => {
25956
+ var _el$3 = _tmpl$3103();
25957
+ _el$3.value = r;
25958
+ insert(_el$3, () => ROLE_LABEL[r]);
25959
+ return _el$3;
25960
+ })()
25961
+ }), null);
25962
+ effect(() => _el$.disabled = props.disabled);
25963
+ effect(() => _el$.value = props.value ?? "");
25964
+ return _el$;
25965
+ })();
25966
+ }
25967
+ function Admins(props) {
25968
+ const [team, {
25969
+ refetch
25970
+ }] = createResource(() => adminApi.listAdminTeam());
25971
+ const [email, setEmail] = createSignal("");
25972
+ const [role, setRole] = createSignal("marketing");
25973
+ const [inviting, setInviting] = createSignal(false);
25974
+ const [apexNote, setApexNote] = createSignal(null);
25975
+ async function run(action, success) {
25976
+ try {
25977
+ await action();
25978
+ toastSuccess(success);
25979
+ } catch (err) {
25980
+ toastError(err instanceof Error ? err.message : "Something went wrong");
25981
+ }
25982
+ await refetch();
25983
+ }
25984
+ async function invite(e) {
25985
+ e.preventDefault();
25986
+ const address = email().trim().toLowerCase();
25987
+ if (!address) return;
25988
+ setInviting(true);
25989
+ setApexNote(null);
25990
+ try {
25991
+ const result = await adminApi.inviteAdmin({
25992
+ email: address,
25993
+ adminRole: role(),
25994
+ acceptUrl: props.acceptInviteUrl ?? defaultAcceptUrl()
25995
+ });
25996
+ if (result.apexInviteRequired) {
25997
+ setApexNote(`${address} will be a ${ROLE_LABEL[role()]} once they sign in. This site's admins sign in with their Apex partner portal account, so also invite them as a user there.`);
25998
+ toastSuccess("Role saved for their first sign-in");
25999
+ } else {
26000
+ toastSuccess(`Invite sent to ${address}`);
26001
+ }
26002
+ setEmail("");
26003
+ setRole("marketing");
26004
+ } catch (err) {
26005
+ toastError(err instanceof Error ? err.message : "Failed to send invite");
26006
+ } finally {
26007
+ setInviting(false);
26008
+ await refetch();
26009
+ }
26010
+ }
26011
+ const changeRole = (a, next) => run(() => adminApi.setAdminRole(a.id, next), `${a.email} is now ${ROLE_LABEL[next]}`);
26012
+ const remove = (a) => {
26013
+ if (!window.confirm(`Remove admin access for ${a.email}? Their account stays; they just can't use the admin.`)) return;
26014
+ void run(() => adminApi.removeAdmin(a.id), `Removed ${a.email}`);
26015
+ };
26016
+ const changeInviteRole = (i, next) => run(() => adminApi.updateAdminInvite(i.id, next), `${i.email} will join as ${ROLE_LABEL[next]}`);
26017
+ const cancelInvite = (i) => {
26018
+ if (!window.confirm(`Withdraw the invite for ${i.email}?`)) return;
26019
+ void run(() => adminApi.cancelAdminInvite(i.id), `Invite for ${i.email} withdrawn`);
26020
+ };
26021
+ const isMe = (a) => adminMe()?.uid === a.id;
26022
+ return (() => {
26023
+ var _el$4 = _tmpl$842(), _el$5 = _el$4.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling, _el$8 = _el$7.firstChild, _el$9 = _el$8.firstChild, _el$0 = _el$9.nextSibling, _el$1 = _el$8.nextSibling; _el$1.firstChild; var _el$11 = _el$1.nextSibling, _el$12 = _el$7.nextSibling, _el$13 = _el$12.firstChild;
26024
+ insert(_el$4, createComponent(PageTitle, {
26025
+ subtitle: "Who can use this admin, and what each person can see and do.",
26026
+ children: "Admins"
26027
+ }), _el$5);
26028
+ _el$5.addEventListener("submit", invite);
26029
+ _el$0.$$input = (e) => setEmail(e.currentTarget.value);
26030
+ insert(_el$1, createComponent(RoleSelect, {
26031
+ get value() {
26032
+ return role();
26033
+ },
26034
+ onChange: setRole
26035
+ }), null);
26036
+ insert(_el$11, () => inviting() ? "Sending\u2026" : "Send invite");
26037
+ insert(_el$12, () => ROLE_LABEL[role()], _el$13);
26038
+ insert(_el$12, () => ADMIN_ROLE_SUMMARY[role()], null);
26039
+ insert(_el$5, createComponent(Show, {
26040
+ get when() {
26041
+ return apexNote();
26042
+ },
26043
+ get children() {
26044
+ var _el$14 = _tmpl$471();
26045
+ insert(_el$14, apexNote);
26046
+ return _el$14;
26047
+ }
26048
+ }), null);
26049
+ insert(_el$4, createComponent(Show, {
26050
+ get when() {
26051
+ return !team.loading;
26052
+ },
26053
+ get fallback() {
26054
+ return createComponent(LoadingSpinner, {});
26055
+ },
26056
+ get children() {
26057
+ return createComponent(Show, {
26058
+ get when() {
26059
+ return !team.error;
26060
+ },
26061
+ get fallback() {
26062
+ return createComponent(EmptyState, {
26063
+ message: "Couldn't load the admin team."
26064
+ });
26065
+ },
26066
+ get children() {
26067
+ return [(() => {
26068
+ var _el$15 = _tmpl$560(), _el$16 = _el$15.firstChild, _el$17 = _el$16.firstChild, _el$18 = _el$17.firstChild, _el$19 = _el$18.nextSibling; _el$19.nextSibling; var _el$21 = _el$16.nextSibling;
26069
+ insert(_el$21, createComponent(For, {
26070
+ get each() {
26071
+ return team()?.admins ?? [];
26072
+ },
26073
+ children: (a) => (() => {
26074
+ var _el$31 = _tmpl$035(), _el$32 = _el$31.firstChild, _el$34 = _el$32.nextSibling, _el$35 = _el$34.nextSibling, _el$36 = _el$35.firstChild;
26075
+ insert(_el$32, () => a.email, null);
26076
+ insert(_el$32, createComponent(Show, {
26077
+ get when() {
26078
+ return isMe(a);
26079
+ },
26080
+ get children() {
26081
+ return _tmpl$939();
26082
+ }
26083
+ }), null);
26084
+ insert(_el$34, createComponent(RoleSelect, {
26085
+ get value() {
26086
+ return a.adminRole;
26087
+ },
26088
+ onChange: (r) => void changeRole(a, r)
26089
+ }));
26090
+ _el$36.$$click = () => remove(a);
26091
+ return _el$31;
26092
+ })()
26093
+ }));
26094
+ return _el$15;
26095
+ })(), createComponent(Show, {
26096
+ get when() {
26097
+ return (team()?.invites ?? []).length > 0;
26098
+ },
26099
+ get children() {
26100
+ return [_tmpl$656(), (() => {
26101
+ var _el$23 = _tmpl$749(), _el$24 = _el$23.firstChild, _el$25 = _el$24.firstChild, _el$26 = _el$25.firstChild, _el$27 = _el$26.nextSibling, _el$28 = _el$27.nextSibling; _el$28.nextSibling; var _el$30 = _el$24.nextSibling;
26102
+ insert(_el$30, createComponent(For, {
26103
+ get each() {
26104
+ return team()?.invites ?? [];
26105
+ },
26106
+ children: (i) => (() => {
26107
+ var _el$37 = _tmpl$1134(), _el$38 = _el$37.firstChild, _el$39 = _el$38.nextSibling, _el$40 = _el$39.nextSibling, _el$41 = _el$40.nextSibling, _el$42 = _el$41.firstChild;
26108
+ insert(_el$38, () => i.email);
26109
+ insert(_el$39, createComponent(RoleSelect, {
26110
+ get value() {
26111
+ return i.adminRole;
26112
+ },
26113
+ onChange: (r) => void changeInviteRole(i, r)
26114
+ }));
26115
+ insert(_el$40, (() => {
26116
+ var _c$ = memo(() => !!i.expiresAt);
26117
+ return () => _c$() ? new Date(i.expiresAt).toLocaleDateString() : "At first sign-in";
26118
+ })());
26119
+ _el$42.$$click = () => cancelInvite(i);
26120
+ return _el$37;
26121
+ })()
26122
+ }));
26123
+ return _el$23;
26124
+ })()];
26125
+ }
26126
+ })];
26127
+ }
26128
+ });
26129
+ }
26130
+ }), null);
26131
+ effect(() => _el$11.disabled = inviting());
26132
+ effect(() => _el$0.value = email());
26133
+ return _el$4;
26134
+ })();
26135
+ }
26136
+ delegateEvents(["input", "click"]);
25723
26137
 
25724
26138
  // src/pages/AdminDashboard.tsx
25725
- var _tmpl$401 = /* @__PURE__ */ template(`<span style=font-size:1rem;opacity:0.7;flex-shrink:0>`);
25726
- var _tmpl$2126 = /* @__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">`);
25727
- var _tmpl$3102 = /* @__PURE__ */ template(`<div class="app-admin-root app-admin-shell"data-scrollable 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>`);
25728
- var _tmpl$470 = /* @__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">`);
25729
- var _tmpl$560 = /* @__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`);
25730
- var _tmpl$656 = /* @__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); } }`);
26139
+ var _tmpl$408 = /* @__PURE__ */ template(`<span style=font-size:1rem;opacity:0.7;flex-shrink:0>`);
26140
+ var _tmpl$2128 = /* @__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">`);
26141
+ var _tmpl$3104 = /* @__PURE__ */ template(`<div class="app-admin-root app-admin-shell"data-scrollable 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>`);
26142
+ var _tmpl$475 = /* @__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">`);
26143
+ var _tmpl$561 = /* @__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>Not available for your role</div><div style=color:var(--app-admin-fg-muted);font-size:0.875rem>Ask an owner of this site if you need access to this section.`);
26144
+ var _tmpl$657 = /* @__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`);
26145
+ var _tmpl$750 = /* @__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); } }`);
25731
26146
  var TAB_LABELS = {
25732
26147
  dashboard: "Dashboard",
25733
26148
  customers: "Customers",
@@ -25746,7 +26161,34 @@ var TAB_LABELS = {
25746
26161
  funnel: "Funnel",
25747
26162
  sequences: "Sequences",
25748
26163
  "sequence-results": "Results",
25749
- features: "Features"
26164
+ features: "Features",
26165
+ admins: "Admins"
26166
+ };
26167
+ var TAB_PERMISSION = {
26168
+ dashboard: null,
26169
+ customers: "customers.read",
26170
+ payments: "billing.read",
26171
+ subscriptions: "customers.read",
26172
+ products: "catalog.read",
26173
+ categories: "catalog.read",
26174
+ sales: "promotions.read",
26175
+ "promo-codes": "promotions.read",
26176
+ offers: "promotions.read",
26177
+ affiliates: "affiliates.read",
26178
+ support: "patient.support",
26179
+ webhooks: "patient.support",
26180
+ "email-templates": "emailTemplates.write",
26181
+ funnel: "funnel.read",
26182
+ sequences: "funnel.read",
26183
+ "sequence-results": "funnel.read",
26184
+ "email-notifications": "settings.write",
26185
+ features: "settings.write",
26186
+ admins: "admins.manage"
26187
+ };
26188
+ var roleAllows = (tab) => {
26189
+ const permission = TAB_PERMISSION[tab];
26190
+ if (permission === null) return true;
26191
+ return adminMe() !== void 0 && adminCan(permission);
25750
26192
  };
25751
26193
  var DEFAULT_TOP_TABS = ["dashboard"];
25752
26194
  var DEFAULT_TAB_GROUPS = [
@@ -25777,12 +26219,12 @@ var DEFAULT_TAB_GROUPS = [
25777
26219
  // What this site has switched on, and what it can ask for.
25778
26220
  {
25779
26221
  label: "Settings",
25780
- tabs: ["features"]
26222
+ tabs: ["features", "admins"]
25781
26223
  }
25782
26224
  ];
25783
26225
  var filterEnabled = (tabs, enabled) => enabled ? tabs.filter((t) => enabled.includes(t)) : tabs;
25784
26226
  function AdminDashboard(props) {
25785
- const withoutHidden = (tabs) => supportChannelMode() === "email" ? tabs.filter((t) => t !== "support") : tabs;
26227
+ const withoutHidden = (tabs) => (supportChannelMode() === "email" ? tabs.filter((t) => t !== "support") : tabs).filter(roleAllows);
25786
26228
  const visibleTopTabs = () => withoutHidden(filterEnabled(props.topTabs ?? DEFAULT_TOP_TABS, props.enabledTabs));
25787
26229
  const visibleGroups = () => (props.tabGroups ?? DEFAULT_TAB_GROUPS).map((g) => ({
25788
26230
  label: g.label,
@@ -25798,9 +26240,10 @@ function AdminDashboard(props) {
25798
26240
  createEffect(() => {
25799
26241
  setAdminToast(props.toast);
25800
26242
  });
26243
+ const inviteLink = isAdminInviteLink();
25801
26244
  createEffect(() => {
25802
26245
  const auth = props.auth;
25803
- if (!auth) return;
26246
+ if (!auth || inviteLink) return;
25804
26247
  if (!auth.isAuthenticated()) {
25805
26248
  auth.onUnauthenticated?.();
25806
26249
  return;
@@ -25810,10 +26253,15 @@ function AdminDashboard(props) {
25810
26253
  }
25811
26254
  });
25812
26255
  const adminAllowed = () => {
26256
+ if (inviteLink) return false;
25813
26257
  const auth = props.auth;
25814
26258
  if (!auth) return true;
25815
26259
  return auth.isAuthenticated() && auth.isHydrated() && auth.isAdmin();
25816
26260
  };
26261
+ createEffect(() => {
26262
+ if (!adminAllowed()) return;
26263
+ void Promise.resolve().then(() => adminApi.getMe()).then(setAdminMe).catch(() => setAdminMe(null));
26264
+ });
25817
26265
  createEffect(() => {
25818
26266
  if (!adminAllowed()) return;
25819
26267
  void adminApi.getSupportChannel().then((s) => setSupportChannelMode(s.mode)).catch(() => {
@@ -25859,14 +26307,14 @@ function AdminDashboard(props) {
25859
26307
  };
25860
26308
  const topOffset = () => props.topOffset ?? "0px";
25861
26309
  const TabButton = (btnProps) => (() => {
25862
- var _el$ = _tmpl$2126();
26310
+ var _el$ = _tmpl$2128();
25863
26311
  _el$.$$click = () => handleTabClick(btnProps.tab);
25864
26312
  insert(_el$, createComponent(Show, {
25865
26313
  get when() {
25866
26314
  return props.tabIcons?.[btnProps.tab];
25867
26315
  },
25868
26316
  get children() {
25869
- var _el$2 = _tmpl$401();
26317
+ var _el$2 = _tmpl$408();
25870
26318
  effect(() => className(_el$2, props.tabIcons[btnProps.tab]));
25871
26319
  return _el$2;
25872
26320
  }
@@ -25883,6 +26331,7 @@ function AdminDashboard(props) {
25883
26331
  });
25884
26332
  return _el$;
25885
26333
  })();
26334
+ if (inviteLink) return createComponent(AcceptAdminInvitePage, {});
25886
26335
  return createComponent(Show, {
25887
26336
  get when() {
25888
26337
  return adminAllowed();
@@ -25898,7 +26347,7 @@ function AdminDashboard(props) {
25898
26347
  return createComponent(AdminNavContext.Provider, {
25899
26348
  value: adminNav,
25900
26349
  get children() {
25901
- 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, _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;
26350
+ var _el$3 = _tmpl$3104(), _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;
25902
26351
  _el$5.$$click = () => setDrawerOpen(true);
25903
26352
  insert(_el$6, () => TAB_LABELS[currentTab()]);
25904
26353
  _el$7.$$click = () => setDrawerOpen(false);
@@ -25915,7 +26364,7 @@ function AdminDashboard(props) {
25915
26364
  return visibleGroups();
25916
26365
  },
25917
26366
  children: (group) => [(() => {
25918
- var _el$11 = _tmpl$470();
26367
+ var _el$11 = _tmpl$475();
25919
26368
  insert(_el$11, () => group.label);
25920
26369
  return _el$11;
25921
26370
  })(), createComponent(For, {
@@ -25939,184 +26388,205 @@ function AdminDashboard(props) {
25939
26388
  reset
25940
26389
  }),
25941
26390
  get children() {
25942
- return createComponent(Switch, {
26391
+ return createComponent(Show, {
26392
+ get when() {
26393
+ return adminMe() === void 0 || roleAllows(currentTab());
26394
+ },
25943
26395
  get fallback() {
25944
- return createComponent(Dashboard, {
25945
- onSelectTab: handleTabClick,
25946
- isTabEnabled
25947
- });
26396
+ return createComponent(RoleForbidden, {});
25948
26397
  },
25949
26398
  get children() {
25950
- return [createComponent(Match, {
25951
- get when() {
25952
- return currentTab() === "dashboard";
25953
- },
25954
- get children() {
26399
+ return createComponent(Switch, {
26400
+ get fallback() {
25955
26401
  return createComponent(Dashboard, {
25956
26402
  onSelectTab: handleTabClick,
25957
26403
  isTabEnabled
25958
26404
  });
25959
- }
25960
- }), createComponent(Match, {
25961
- get when() {
25962
- return currentTab() === "customers";
25963
26405
  },
25964
26406
  get children() {
25965
- return createComponent(Customers, {
25966
- get passwordResetRedirectUrl() {
25967
- return props.passwordResetRedirectUrl;
26407
+ return [createComponent(Match, {
26408
+ get when() {
26409
+ return currentTab() === "dashboard";
25968
26410
  },
25969
- get activeUid() {
25970
- return props.customers?.activeUid;
26411
+ get children() {
26412
+ return createComponent(Dashboard, {
26413
+ onSelectTab: handleTabClick,
26414
+ isTabEnabled
26415
+ });
26416
+ }
26417
+ }), createComponent(Match, {
26418
+ get when() {
26419
+ return currentTab() === "customers";
25971
26420
  },
25972
- get onSelectCustomer() {
25973
- return props.customers?.onSelectCustomer;
26421
+ get children() {
26422
+ return createComponent(Customers, {
26423
+ get passwordResetRedirectUrl() {
26424
+ return props.passwordResetRedirectUrl;
26425
+ },
26426
+ get activeUid() {
26427
+ return props.customers?.activeUid;
26428
+ },
26429
+ get onSelectCustomer() {
26430
+ return props.customers?.onSelectCustomer;
26431
+ },
26432
+ get initialUid() {
26433
+ return pendingCustomerUid();
26434
+ }
26435
+ });
26436
+ }
26437
+ }), createComponent(Match, {
26438
+ get when() {
26439
+ return currentTab() === "payments";
25974
26440
  },
25975
- get initialUid() {
25976
- return pendingCustomerUid();
26441
+ get children() {
26442
+ return createComponent(Payments, {});
25977
26443
  }
25978
- });
25979
- }
25980
- }), createComponent(Match, {
25981
- get when() {
25982
- return currentTab() === "payments";
25983
- },
25984
- get children() {
25985
- return createComponent(Payments, {});
25986
- }
25987
- }), createComponent(Match, {
25988
- get when() {
25989
- return currentTab() === "subscriptions";
25990
- },
25991
- get children() {
25992
- return createComponent(Customers, {
25993
- get passwordResetRedirectUrl() {
25994
- return props.passwordResetRedirectUrl;
26444
+ }), createComponent(Match, {
26445
+ get when() {
26446
+ return currentTab() === "subscriptions";
25995
26447
  },
25996
- initialFilter: "active",
25997
- get activeUid() {
25998
- return props.customers?.activeUid;
26448
+ get children() {
26449
+ return createComponent(Customers, {
26450
+ get passwordResetRedirectUrl() {
26451
+ return props.passwordResetRedirectUrl;
26452
+ },
26453
+ initialFilter: "active",
26454
+ get activeUid() {
26455
+ return props.customers?.activeUid;
26456
+ },
26457
+ get onSelectCustomer() {
26458
+ return props.customers?.onSelectCustomer;
26459
+ }
26460
+ });
26461
+ }
26462
+ }), createComponent(Match, {
26463
+ get when() {
26464
+ return currentTab() === "products";
25999
26465
  },
26000
- get onSelectCustomer() {
26001
- return props.customers?.onSelectCustomer;
26466
+ get children() {
26467
+ return createComponent(Products, {
26468
+ get productDefaultsLookup() {
26469
+ return props.productDefaultsLookup;
26470
+ }
26471
+ });
26002
26472
  }
26003
- });
26004
- }
26005
- }), createComponent(Match, {
26006
- get when() {
26007
- return currentTab() === "products";
26008
- },
26009
- get children() {
26010
- return createComponent(Products, {
26011
- get productDefaultsLookup() {
26012
- return props.productDefaultsLookup;
26473
+ }), createComponent(Match, {
26474
+ get when() {
26475
+ return currentTab() === "categories";
26476
+ },
26477
+ get children() {
26478
+ return createComponent(Categories, {});
26013
26479
  }
26014
- });
26015
- }
26016
- }), createComponent(Match, {
26017
- get when() {
26018
- return currentTab() === "categories";
26019
- },
26020
- get children() {
26021
- return createComponent(Categories, {});
26022
- }
26023
- }), createComponent(Match, {
26024
- get when() {
26025
- return currentTab() === "sales";
26026
- },
26027
- get children() {
26028
- return createComponent(Sales, {});
26029
- }
26030
- }), createComponent(Match, {
26031
- get when() {
26032
- return currentTab() === "promo-codes";
26033
- },
26034
- get children() {
26035
- return createComponent(PromoCodes, {
26036
- get affiliatesEnabled() {
26037
- return affiliatesEnabled();
26480
+ }), createComponent(Match, {
26481
+ get when() {
26482
+ return currentTab() === "sales";
26483
+ },
26484
+ get children() {
26485
+ return createComponent(Sales, {});
26038
26486
  }
26039
- });
26040
- }
26041
- }), createComponent(Match, {
26042
- get when() {
26043
- return currentTab() === "offers";
26044
- },
26045
- get children() {
26046
- return createComponent(Offers, {});
26047
- }
26048
- }), createComponent(Match, {
26049
- get when() {
26050
- return currentTab() === "affiliates";
26051
- },
26052
- get children() {
26053
- return createComponent(Affiliates, mergeProps(() => props.affiliates ?? {}));
26054
- }
26055
- }), createComponent(Match, {
26056
- get when() {
26057
- return currentTab() === "support";
26058
- },
26059
- get children() {
26060
- return createComponent(Support, {
26061
- get initialThreadId() {
26062
- return pendingThreadId();
26487
+ }), createComponent(Match, {
26488
+ get when() {
26489
+ return currentTab() === "promo-codes";
26490
+ },
26491
+ get children() {
26492
+ return createComponent(PromoCodes, {
26493
+ get affiliatesEnabled() {
26494
+ return affiliatesEnabled();
26495
+ }
26496
+ });
26063
26497
  }
26064
- });
26065
- }
26066
- }), createComponent(Match, {
26067
- get when() {
26068
- return currentTab() === "webhooks";
26069
- },
26070
- get children() {
26071
- return createComponent(Webhooks, {});
26072
- }
26073
- }), createComponent(Match, {
26074
- get when() {
26075
- return currentTab() === "email-templates";
26076
- },
26077
- get children() {
26078
- return createComponent(EmailTemplates, {
26079
- get initialCustomTemplateId() {
26080
- return pendingTemplateId();
26498
+ }), createComponent(Match, {
26499
+ get when() {
26500
+ return currentTab() === "offers";
26501
+ },
26502
+ get children() {
26503
+ return createComponent(Offers, {});
26081
26504
  }
26082
- });
26083
- }
26084
- }), createComponent(Match, {
26085
- get when() {
26086
- return currentTab() === "funnel";
26087
- },
26088
- get children() {
26089
- return createComponent(Funnel, {});
26090
- }
26091
- }), createComponent(Match, {
26092
- get when() {
26093
- return currentTab() === "sequences";
26094
- },
26095
- get children() {
26096
- return createComponent(Sequences, {});
26097
- }
26098
- }), createComponent(Match, {
26099
- get when() {
26100
- return currentTab() === "sequence-results";
26101
- },
26102
- get children() {
26103
- return createComponent(SequenceResults, {});
26104
- }
26105
- }), createComponent(Match, {
26106
- get when() {
26107
- return currentTab() === "email-notifications";
26108
- },
26109
- get children() {
26110
- return createComponent(EmailNotifications, {});
26111
- }
26112
- }), createComponent(Match, {
26113
- get when() {
26114
- return currentTab() === "features";
26115
- },
26116
- get children() {
26117
- return createComponent(Features, {});
26505
+ }), createComponent(Match, {
26506
+ get when() {
26507
+ return currentTab() === "affiliates";
26508
+ },
26509
+ get children() {
26510
+ return createComponent(Affiliates, mergeProps(() => props.affiliates ?? {}));
26511
+ }
26512
+ }), createComponent(Match, {
26513
+ get when() {
26514
+ return currentTab() === "support";
26515
+ },
26516
+ get children() {
26517
+ return createComponent(Support, {
26518
+ get initialThreadId() {
26519
+ return pendingThreadId();
26520
+ }
26521
+ });
26522
+ }
26523
+ }), createComponent(Match, {
26524
+ get when() {
26525
+ return currentTab() === "webhooks";
26526
+ },
26527
+ get children() {
26528
+ return createComponent(Webhooks, {});
26529
+ }
26530
+ }), createComponent(Match, {
26531
+ get when() {
26532
+ return currentTab() === "email-templates";
26533
+ },
26534
+ get children() {
26535
+ return createComponent(EmailTemplates, {
26536
+ get initialCustomTemplateId() {
26537
+ return pendingTemplateId();
26538
+ }
26539
+ });
26540
+ }
26541
+ }), createComponent(Match, {
26542
+ get when() {
26543
+ return currentTab() === "funnel";
26544
+ },
26545
+ get children() {
26546
+ return createComponent(Funnel, {});
26547
+ }
26548
+ }), createComponent(Match, {
26549
+ get when() {
26550
+ return currentTab() === "sequences";
26551
+ },
26552
+ get children() {
26553
+ return createComponent(Sequences, {});
26554
+ }
26555
+ }), createComponent(Match, {
26556
+ get when() {
26557
+ return currentTab() === "sequence-results";
26558
+ },
26559
+ get children() {
26560
+ return createComponent(SequenceResults, {});
26561
+ }
26562
+ }), createComponent(Match, {
26563
+ get when() {
26564
+ return currentTab() === "email-notifications";
26565
+ },
26566
+ get children() {
26567
+ return createComponent(EmailNotifications, {});
26568
+ }
26569
+ }), createComponent(Match, {
26570
+ get when() {
26571
+ return currentTab() === "features";
26572
+ },
26573
+ get children() {
26574
+ return createComponent(Features, {});
26575
+ }
26576
+ }), createComponent(Match, {
26577
+ get when() {
26578
+ return currentTab() === "admins";
26579
+ },
26580
+ get children() {
26581
+ return createComponent(Admins, {
26582
+ get acceptInviteUrl() {
26583
+ return props.adminInviteAcceptUrl;
26584
+ }
26585
+ });
26586
+ }
26587
+ })];
26118
26588
  }
26119
- })];
26589
+ });
26120
26590
  }
26121
26591
  });
26122
26592
  }
@@ -26144,29 +26614,35 @@ function AdminDashboard(props) {
26144
26614
  }
26145
26615
  });
26146
26616
  }
26617
+ function RoleForbidden() {
26618
+ return (() => {
26619
+ var _el$12 = _tmpl$561(), _el$13 = _el$12.firstChild; _el$13.nextSibling;
26620
+ return _el$12;
26621
+ })();
26622
+ }
26147
26623
  function AdminTabError(props) {
26148
26624
  console.error("[AdminDashboard] tab failed to render:", props.error);
26149
26625
  const message = () => props.error instanceof Error ? props.error.message : String(props.error);
26150
26626
  return (() => {
26151
- var _el$12 = _tmpl$560(), _el$13 = _el$12.firstChild, _el$14 = _el$13.nextSibling, _el$15 = _el$14.nextSibling;
26152
- insert(_el$14, message);
26153
- _el$15.$$click = () => props.reset();
26154
- return _el$12;
26627
+ var _el$15 = _tmpl$657(), _el$16 = _el$15.firstChild, _el$17 = _el$16.nextSibling, _el$18 = _el$17.nextSibling;
26628
+ insert(_el$17, message);
26629
+ _el$18.$$click = () => props.reset();
26630
+ return _el$15;
26155
26631
  })();
26156
26632
  }
26157
26633
  function AdminGateSpinner(props) {
26158
26634
  return (() => {
26159
- var _el$16 = _tmpl$656(); _el$16.firstChild;
26635
+ var _el$19 = _tmpl$750(); _el$19.firstChild;
26160
26636
  effect((_p$) => {
26161
26637
  var _v$8 = props.topOffset, _v$9 = `calc(100vh - ${props.topOffset})`;
26162
- _v$8 !== _p$.e && setStyleProperty(_el$16, "top", _p$.e = _v$8);
26163
- _v$9 !== _p$.t && setStyleProperty(_el$16, "height", _p$.t = _v$9);
26638
+ _v$8 !== _p$.e && setStyleProperty(_el$19, "top", _p$.e = _v$8);
26639
+ _v$9 !== _p$.t && setStyleProperty(_el$19, "height", _p$.t = _v$9);
26164
26640
  return _p$;
26165
26641
  }, {
26166
26642
  e: void 0,
26167
26643
  t: void 0
26168
26644
  });
26169
- return _el$16;
26645
+ return _el$19;
26170
26646
  })();
26171
26647
  }
26172
26648
  delegateEvents(["click"]);
@@ -26190,7 +26666,8 @@ var ADMIN_TAB_SEGMENTS = {
26190
26666
  sequences: "sequences",
26191
26667
  "sequence-results": "sequence-results",
26192
26668
  "email-notifications": "email-notifications",
26193
- features: "features"
26669
+ features: "features",
26670
+ admins: "admins"
26194
26671
  };
26195
26672
  var AFFILIATE_SUB_TAB_SEGMENTS = {
26196
26673
  overview: "",
@@ -26236,23 +26713,23 @@ function affiliateSubTabFromPath(pathname, base = "/admin") {
26236
26713
  }
26237
26714
  return "overview";
26238
26715
  }
26239
- var _tmpl$407 = /* @__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`);
26240
- var _tmpl$2127 = /* @__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`);
26241
- var _tmpl$3103 = /* @__PURE__ */ template(`<p style=color:var(--app-admin-fg-muted);font-size:0.875rem>Could not load this customer's dashboard.`);
26242
- var _tmpl$471 = /* @__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">`);
26243
- var _tmpl$561 = /* @__PURE__ */ template(`<div><h3>Subscription`);
26244
- var _tmpl$657 = /* @__PURE__ */ template(`<div style=display:flex;flex-direction:column;gap:0.5rem>`);
26245
- var _tmpl$749 = /* @__PURE__ */ template(`<div><h3>Prescription requests`);
26246
- var _tmpl$842 = /* @__PURE__ */ template(`<div><h3>Pending surveys`);
26247
- var _tmpl$939 = /* @__PURE__ */ template(`<p style=color:var(--app-admin-fg-muted);font-size:0.875rem>No active subscription.`);
26248
- var _tmpl$035 = /* @__PURE__ */ template(`<p style="font-size:0.75rem;color:var(--app-admin-fg-muted);margin:0.25rem 0 0">Next charge `);
26249
- var _tmpl$1134 = /* @__PURE__ */ template(`<div class=app-admin-card-soft style=padding:0.75rem><div style=display:flex;align-items:center;justify-content:space-between><span style=font-size:0.875rem;font-weight:500>`);
26716
+ var _tmpl$409 = /* @__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`);
26717
+ var _tmpl$2129 = /* @__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`);
26718
+ var _tmpl$3105 = /* @__PURE__ */ template(`<p style=color:var(--app-admin-fg-muted);font-size:0.875rem>Could not load this customer's dashboard.`);
26719
+ var _tmpl$476 = /* @__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">`);
26720
+ var _tmpl$564 = /* @__PURE__ */ template(`<div><h3>Subscription`);
26721
+ var _tmpl$658 = /* @__PURE__ */ template(`<div style=display:flex;flex-direction:column;gap:0.5rem>`);
26722
+ var _tmpl$751 = /* @__PURE__ */ template(`<div><h3>Prescription requests`);
26723
+ var _tmpl$843 = /* @__PURE__ */ template(`<div><h3>Pending surveys`);
26724
+ var _tmpl$940 = /* @__PURE__ */ template(`<p style=color:var(--app-admin-fg-muted);font-size:0.875rem>No active subscription.`);
26725
+ var _tmpl$036 = /* @__PURE__ */ template(`<p style="font-size:0.75rem;color:var(--app-admin-fg-muted);margin:0.25rem 0 0">Next charge `);
26726
+ var _tmpl$1135 = /* @__PURE__ */ template(`<div class=app-admin-card-soft style=padding:0.75rem><div style=display:flex;align-items:center;justify-content:space-between><span style=font-size:0.875rem;font-weight:500>`);
26250
26727
  var _tmpl$1028 = /* @__PURE__ */ template(`<p style="font-size:0.75rem;color:var(--app-admin-fg-muted);margin:0.25rem 0 0">`);
26251
- var _tmpl$1135 = /* @__PURE__ */ template(`<div><h3>Prescription status</h3><div class=app-admin-card-soft style=padding:0.75rem><div style=display:flex;align-items:center;justify-content:space-between><span style=font-size:0.875rem;font-weight:500>Current request`);
26728
+ var _tmpl$1136 = /* @__PURE__ */ template(`<div><h3>Prescription status</h3><div class=app-admin-card-soft style=padding:0.75rem><div style=display:flex;align-items:center;justify-content:space-between><span style=font-size:0.875rem;font-weight:500>Current request`);
26252
26729
  var _tmpl$1224 = /* @__PURE__ */ template(`<p style=color:var(--app-admin-fg-muted);font-size:0.875rem>No prescription requests.`);
26253
- var _tmpl$1321 = /* @__PURE__ */ template(`<span style=font-size:0.75rem;color:var(--app-admin-fg-muted);margin-left:0.5rem>`);
26254
- var _tmpl$1421 = /* @__PURE__ */ template(`<span> \xB7 `);
26255
- var _tmpl$1520 = /* @__PURE__ */ template(`<div class=app-admin-card-soft style=padding:0.75rem><div style=display:flex;align-items:center;justify-content:space-between><div><span style=font-size:0.875rem;font-weight:500></span></div></div><div style=font-size:0.75rem;color:var(--app-admin-fg-muted);margin-top:0.25rem>`);
26730
+ var _tmpl$1322 = /* @__PURE__ */ template(`<span style=font-size:0.75rem;color:var(--app-admin-fg-muted);margin-left:0.5rem>`);
26731
+ var _tmpl$1422 = /* @__PURE__ */ template(`<span> \xB7 `);
26732
+ var _tmpl$1521 = /* @__PURE__ */ template(`<div class=app-admin-card-soft style=padding:0.75rem><div style=display:flex;align-items:center;justify-content:space-between><div><span style=font-size:0.875rem;font-weight:500></span></div></div><div style=font-size:0.75rem;color:var(--app-admin-fg-muted);margin-top:0.25rem>`);
26256
26733
  var _tmpl$1620 = /* @__PURE__ */ template(`<p style=color:var(--app-admin-fg-muted);font-size:0.875rem>No pending surveys.`);
26257
26734
  var _tmpl$1720 = /* @__PURE__ */ template(`<div class=app-admin-card-soft style=padding:0.75rem><span style=font-size:0.875rem;font-weight:500></span><span style=font-size:0.75rem;color:var(--app-admin-fg-muted);margin-left:0.5rem>Cycle `);
26258
26735
  function PatientDashboardPreview(props) {
@@ -26260,7 +26737,7 @@ function PatientDashboardPreview(props) {
26260
26737
  authToken: () => props.token
26261
26738
  });
26262
26739
  return (() => {
26263
- var _el$ = _tmpl$407(), _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;
26740
+ var _el$ = _tmpl$409(), _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;
26264
26741
  _el$.$$click = (e) => {
26265
26742
  if (e.target === e.currentTarget) props.onClose();
26266
26743
  };
@@ -26272,7 +26749,7 @@ function PatientDashboardPreview(props) {
26272
26749
  },
26273
26750
  keyed: true,
26274
26751
  children: (msg) => (() => {
26275
- var _el$1 = _tmpl$2127(), _el$10 = _el$1.firstChild, _el$11 = _el$10.nextSibling;
26752
+ var _el$1 = _tmpl$2129(), _el$10 = _el$1.firstChild, _el$11 = _el$10.nextSibling;
26276
26753
  insert(_el$10, msg);
26277
26754
  _el$11.$$click = () => data.retry();
26278
26755
  return _el$1;
@@ -26291,25 +26768,25 @@ function PatientDashboardPreview(props) {
26291
26768
  return data.profile();
26292
26769
  },
26293
26770
  get fallback() {
26294
- return _tmpl$3103();
26771
+ return _tmpl$3105();
26295
26772
  },
26296
26773
  children: (profile) => [(() => {
26297
- var _el$13 = _tmpl$471(), _el$14 = _el$13.firstChild, _el$15 = _el$14.nextSibling, _el$16 = _el$15.firstChild, _el$17 = _el$16.nextSibling;
26774
+ var _el$13 = _tmpl$476(), _el$14 = _el$13.firstChild, _el$15 = _el$14.nextSibling, _el$16 = _el$15.firstChild, _el$17 = _el$16.nextSibling;
26298
26775
  insert(_el$16, () => [profile().firstName, profile().lastName].filter(Boolean).join(" ") || "Member");
26299
26776
  insert(_el$17, () => profile().email);
26300
26777
  effect((_$p) => style(_el$14, panelSectionHeader, _$p));
26301
26778
  return _el$13;
26302
26779
  })(), (() => {
26303
- var _el$18 = _tmpl$561(), _el$19 = _el$18.firstChild;
26780
+ var _el$18 = _tmpl$564(), _el$19 = _el$18.firstChild;
26304
26781
  insert(_el$18, createComponent(Show, {
26305
26782
  get when() {
26306
26783
  return data.subscription();
26307
26784
  },
26308
26785
  get fallback() {
26309
- return _tmpl$939();
26786
+ return _tmpl$940();
26310
26787
  },
26311
26788
  children: (sub) => (() => {
26312
- var _el$27 = _tmpl$1134(), _el$28 = _el$27.firstChild, _el$29 = _el$28.firstChild;
26789
+ var _el$27 = _tmpl$1135(), _el$28 = _el$27.firstChild, _el$29 = _el$28.firstChild;
26313
26790
  insert(_el$29, createComponent(Show, {
26314
26791
  get when() {
26315
26792
  return sub().amount != null;
@@ -26329,7 +26806,7 @@ function PatientDashboardPreview(props) {
26329
26806
  return sub().nextBillingDate;
26330
26807
  },
26331
26808
  get children() {
26332
- var _el$30 = _tmpl$035(); _el$30.firstChild;
26809
+ var _el$30 = _tmpl$036(); _el$30.firstChild;
26333
26810
  insert(_el$30, () => fmtDate(sub().nextBillingDate), null);
26334
26811
  return _el$30;
26335
26812
  }
@@ -26344,7 +26821,7 @@ function PatientDashboardPreview(props) {
26344
26821
  return data.rxStatus();
26345
26822
  },
26346
26823
  children: (rx) => (() => {
26347
- var _el$32 = _tmpl$1135(), _el$33 = _el$32.firstChild, _el$34 = _el$33.nextSibling, _el$35 = _el$34.firstChild; _el$35.firstChild;
26824
+ var _el$32 = _tmpl$1136(), _el$33 = _el$32.firstChild, _el$34 = _el$33.nextSibling, _el$35 = _el$34.firstChild; _el$35.firstChild;
26348
26825
  insert(_el$35, createComponent(StatusBadge, {
26349
26826
  get status() {
26350
26827
  return rx().status;
@@ -26364,7 +26841,7 @@ function PatientDashboardPreview(props) {
26364
26841
  return _el$32;
26365
26842
  })()
26366
26843
  }), (() => {
26367
- var _el$20 = _tmpl$749(), _el$21 = _el$20.firstChild;
26844
+ var _el$20 = _tmpl$751(), _el$21 = _el$20.firstChild;
26368
26845
  insert(_el$20, createComponent(Show, {
26369
26846
  get when() {
26370
26847
  return (data.rxList() ?? []).length > 0;
@@ -26373,20 +26850,20 @@ function PatientDashboardPreview(props) {
26373
26850
  return _tmpl$1224();
26374
26851
  },
26375
26852
  get children() {
26376
- var _el$22 = _tmpl$657();
26853
+ var _el$22 = _tmpl$658();
26377
26854
  insert(_el$22, createComponent(For, {
26378
26855
  get each() {
26379
26856
  return data.rxList();
26380
26857
  },
26381
26858
  children: (req) => (() => {
26382
- var _el$39 = _tmpl$1520(), _el$40 = _el$39.firstChild, _el$41 = _el$40.firstChild, _el$42 = _el$41.firstChild, _el$44 = _el$40.nextSibling;
26859
+ var _el$39 = _tmpl$1521(), _el$40 = _el$39.firstChild, _el$41 = _el$40.firstChild, _el$42 = _el$41.firstChild, _el$44 = _el$40.nextSibling;
26383
26860
  insert(_el$42, () => req.drugName || req.drugId || "Prescription");
26384
26861
  insert(_el$41, createComponent(Show, {
26385
26862
  get when() {
26386
26863
  return req.dosage;
26387
26864
  },
26388
26865
  get children() {
26389
- var _el$43 = _tmpl$1321();
26866
+ var _el$43 = _tmpl$1322();
26390
26867
  insert(_el$43, () => req.dosage);
26391
26868
  return _el$43;
26392
26869
  }
@@ -26401,7 +26878,7 @@ function PatientDashboardPreview(props) {
26401
26878
  return req.priceCents != null;
26402
26879
  },
26403
26880
  get children() {
26404
- var _el$45 = _tmpl$1421(), _el$46 = _el$45.firstChild;
26881
+ var _el$45 = _tmpl$1422(), _el$46 = _el$45.firstChild;
26405
26882
  insert(_el$45, () => centsToUsd(req.priceCents), _el$46);
26406
26883
  return _el$45;
26407
26884
  }
@@ -26416,7 +26893,7 @@ function PatientDashboardPreview(props) {
26416
26893
  effect((_$p) => style(_el$21, panelSectionHeader, _$p));
26417
26894
  return _el$20;
26418
26895
  })(), (() => {
26419
- var _el$23 = _tmpl$842(), _el$24 = _el$23.firstChild;
26896
+ var _el$23 = _tmpl$843(), _el$24 = _el$23.firstChild;
26420
26897
  insert(_el$23, createComponent(Show, {
26421
26898
  get when() {
26422
26899
  return (data.pendingSurveys() ?? []).length > 0;
@@ -26425,7 +26902,7 @@ function PatientDashboardPreview(props) {
26425
26902
  return _tmpl$1620();
26426
26903
  },
26427
26904
  get children() {
26428
- var _el$25 = _tmpl$657();
26905
+ var _el$25 = _tmpl$658();
26429
26906
  insert(_el$25, createComponent(For, {
26430
26907
  get each() {
26431
26908
  return data.pendingSurveys();
@@ -26450,9 +26927,9 @@ function PatientDashboardPreview(props) {
26450
26927
  })();
26451
26928
  }
26452
26929
  delegateEvents(["click"]);
26453
- var _tmpl$408 = /* @__PURE__ */ template(`<div style=margin-bottom:1rem>`);
26454
- var _tmpl$2128 = /* @__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>`);
26455
- var _tmpl$3104 = /* @__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.`);
26930
+ var _tmpl$477 = /* @__PURE__ */ template(`<div style=margin-bottom:1rem>`);
26931
+ var _tmpl$2130 = /* @__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>`);
26932
+ var _tmpl$3106 = /* @__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.`);
26456
26933
  var LIVE = /* @__PURE__ */ new Set(["active", "paused", "past_due"]);
26457
26934
  function UpdatePaymentMethod(props) {
26458
26935
  const {
@@ -26482,7 +26959,7 @@ function UpdatePaymentMethod(props) {
26482
26959
  if (ok) props.onDone();
26483
26960
  }
26484
26961
  return (() => {
26485
- var _el$ = _tmpl$3104(), _el$2 = _el$.firstChild;
26962
+ var _el$ = _tmpl$3106(), _el$2 = _el$.firstChild;
26486
26963
  insert(_el$, createComponent(Heading, {
26487
26964
  level: 1,
26488
26965
  get children() {
@@ -26513,14 +26990,14 @@ function UpdatePaymentMethod(props) {
26513
26990
  return memo(() => !!!resolving())() && !noSubscription();
26514
26991
  },
26515
26992
  get children() {
26516
- var _el$3 = _tmpl$2128(), _el$5 = _el$3.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$5.nextSibling, _el$8 = _el$7.nextSibling;
26993
+ var _el$3 = _tmpl$2130(), _el$5 = _el$3.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$5.nextSibling, _el$8 = _el$7.nextSibling;
26517
26994
  _el$3.addEventListener("submit", handleSubmit);
26518
26995
  insert(_el$3, createComponent(Show, {
26519
26996
  get when() {
26520
26997
  return flow.error();
26521
26998
  },
26522
26999
  get children() {
26523
- var _el$4 = _tmpl$408();
27000
+ var _el$4 = _tmpl$477();
26524
27001
  insert(_el$4, createComponent(Banner, {
26525
27002
  variant: "error",
26526
27003
  get children() {
@@ -26598,23 +27075,23 @@ function UpdatePaymentMethod(props) {
26598
27075
  return _el$;
26599
27076
  })();
26600
27077
  }
26601
- var _tmpl$409 = /* @__PURE__ */ template(`<a class=ship__track target=_blank rel="noopener noreferrer">Track<!> \u2197`);
26602
- var _tmpl$2129 = /* @__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>`);
26603
- var _tmpl$3105 = /* @__PURE__ */ template(`<span class=refill__cycle>Day <!> of `);
26604
- var _tmpl$475 = /* @__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>`);
26605
- var _tmpl$564 = /* @__PURE__ */ template(`<span class=refill__cycle>Preparing your next fill`);
26606
- var _tmpl$658 = /* @__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>`);
26607
- var _tmpl$750 = /* @__PURE__ */ template(`<a class=refill__action>Complete check-in \u2192`);
26608
- var _tmpl$843 = /* @__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.`);
26609
- var _tmpl$940 = /* @__PURE__ */ template(`<div class=tracker><span class=lab-label>Your order</span><div class=tracker__empty data-testid=tracker-empty><div class=tracker__empty-mark aria-hidden=true><span class=tracker__empty-bead></span></div><h2 class=tracker__empty-title>Your journey starts here</h2><p class=tracker__empty-text></p><a class="portal-btn portal-btn--primary">Start your intake`);
26610
- var _tmpl$036 = /* @__PURE__ */ template(`<p class=tracker__empty-text data-testid=tracker-offer-note><strong>You have <!> waiting.</strong> It applies automatically at checkout \u2014 finish your intake by <!> to keep it.`);
26611
- var _tmpl$1136 = /* @__PURE__ */ template(`<span class=thread__halo aria-hidden=true>`);
27078
+ var _tmpl$478 = /* @__PURE__ */ template(`<a class=ship__track target=_blank rel="noopener noreferrer">Track<!> \u2197`);
27079
+ var _tmpl$2131 = /* @__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>`);
27080
+ var _tmpl$3107 = /* @__PURE__ */ template(`<span class=refill__cycle>Day <!> of `);
27081
+ var _tmpl$479 = /* @__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>`);
27082
+ var _tmpl$565 = /* @__PURE__ */ template(`<span class=refill__cycle>Preparing your next fill`);
27083
+ var _tmpl$659 = /* @__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>`);
27084
+ var _tmpl$752 = /* @__PURE__ */ template(`<a class=refill__action>Complete check-in \u2192`);
27085
+ var _tmpl$844 = /* @__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.`);
27086
+ var _tmpl$941 = /* @__PURE__ */ template(`<div class=tracker><span class=lab-label>Your order</span><div class=tracker__empty data-testid=tracker-empty><div class=tracker__empty-mark aria-hidden=true><span class=tracker__empty-bead></span></div><h2 class=tracker__empty-title>Your journey starts here</h2><p class=tracker__empty-text></p><a class="portal-btn portal-btn--primary">Start your intake`);
27087
+ var _tmpl$037 = /* @__PURE__ */ template(`<p class=tracker__empty-text data-testid=tracker-offer-note><strong>You have <!> waiting.</strong> It applies automatically at checkout \u2014 finish your intake by <!> to keep it.`);
27088
+ var _tmpl$1137 = /* @__PURE__ */ template(`<span class=thread__halo aria-hidden=true>`);
26612
27089
  var _tmpl$1029 = /* @__PURE__ */ template(`<time class=thread__time>`);
26613
- var _tmpl$1137 = /* @__PURE__ */ template(`<h2 class=thread__hero>`);
27090
+ var _tmpl$1138 = /* @__PURE__ */ template(`<h2 class=thread__hero>`);
26614
27091
  var _tmpl$1225 = /* @__PURE__ */ template(`<p class=thread__caption>`);
26615
- var _tmpl$1322 = /* @__PURE__ */ template(`<button type=button class="portal-btn portal-btn--ghost thread__action">Where's my order?`);
26616
- var _tmpl$1422 = /* @__PURE__ */ template(`<button type=button class="portal-btn portal-btn--primary thread__action">Message your care team`);
26617
- var _tmpl$1521 = /* @__PURE__ */ template(`<button type=button class="portal-btn portal-btn--ghost thread__action">Talk to your provider`);
27092
+ var _tmpl$1323 = /* @__PURE__ */ template(`<button type=button class="portal-btn portal-btn--ghost thread__action">Where's my order?`);
27093
+ var _tmpl$1423 = /* @__PURE__ */ template(`<button type=button class="portal-btn portal-btn--primary thread__action">Message your care team`);
27094
+ var _tmpl$1522 = /* @__PURE__ */ template(`<button type=button class="portal-btn portal-btn--ghost thread__action">Talk to your provider`);
26618
27095
  var _tmpl$1621 = /* @__PURE__ */ template(`<li><div class=thread__rail><span class=thread__bead></span></div><div><div class=thread__top><span class="lab-label thread__label">`);
26619
27096
  var _tmpl$1721 = /* @__PURE__ */ template(`<p class="thread__caption thread__await"data-testid=await-messaging>Your care team is reviewing your request. You\u2019ll be able to message them here once your consult begins.`);
26620
27097
  var _tmpl$1819 = /* @__PURE__ */ template(`<p class="thread__caption thread__await"data-testid=await-messaging>Your provider will follow up with you about next steps.`);
@@ -26636,7 +27113,7 @@ function TrackingChip(props) {
26636
27113
  }
26637
27114
  };
26638
27115
  return (() => {
26639
- var _el$ = _tmpl$2129(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling, _el$4 = _el$3.firstChild, _el$5 = _el$4.firstChild, _el$6 = _el$5.nextSibling, _el$7 = _el$6.nextSibling, _el$10 = _el$3.nextSibling;
27116
+ var _el$ = _tmpl$2131(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling, _el$4 = _el$3.firstChild, _el$5 = _el$4.firstChild, _el$6 = _el$5.nextSibling, _el$7 = _el$6.nextSibling, _el$10 = _el$3.nextSibling;
26640
27117
  insert(_el$2, () => props.eta);
26641
27118
  _el$4.$$click = copy;
26642
27119
  insert(_el$5, () => props.number);
@@ -26647,7 +27124,7 @@ function TrackingChip(props) {
26647
27124
  return props.url;
26648
27125
  },
26649
27126
  get children() {
26650
- var _el$8 = _tmpl$409(), _el$9 = _el$8.firstChild, _el$1 = _el$9.nextSibling; _el$1.nextSibling;
27127
+ var _el$8 = _tmpl$478(), _el$9 = _el$8.firstChild, _el$1 = _el$9.nextSibling; _el$1.nextSibling;
26651
27128
  insert(_el$8, (() => {
26652
27129
  var _c$ = memo(() => !!props.carrier);
26653
27130
  return () => _c$() ? ` with ${props.carrier}` : "";
@@ -26668,16 +27145,16 @@ function OrderTracker(props) {
26668
27145
  return refill();
26669
27146
  },
26670
27147
  children: (r) => (() => {
26671
- var _el$11 = _tmpl$475(), _el$12 = _el$11.firstChild; _el$12.firstChild; var _el$18 = _el$12.nextSibling;
27148
+ var _el$11 = _tmpl$479(), _el$12 = _el$11.firstChild; _el$12.firstChild; var _el$18 = _el$12.nextSibling;
26672
27149
  insert(_el$12, createComponent(Show, {
26673
27150
  get when() {
26674
27151
  return !r().pendingFill;
26675
27152
  },
26676
27153
  get fallback() {
26677
- return _tmpl$564();
27154
+ return _tmpl$565();
26678
27155
  },
26679
27156
  get children() {
26680
- var _el$14 = _tmpl$3105(), _el$15 = _el$14.firstChild, _el$17 = _el$15.nextSibling; _el$17.nextSibling;
27157
+ var _el$14 = _tmpl$3107(), _el$15 = _el$14.firstChild, _el$17 = _el$15.nextSibling; _el$17.nextSibling;
26681
27158
  insert(_el$14, () => r().cycleDay, _el$17);
26682
27159
  insert(_el$14, () => r().cycleLength, null);
26683
27160
  return _el$14;
@@ -26688,7 +27165,7 @@ function OrderTracker(props) {
26688
27165
  return r().events;
26689
27166
  },
26690
27167
  children: (e) => (() => {
26691
- var _el$20 = _tmpl$658(), _el$21 = _el$20.firstChild, _el$22 = _el$21.nextSibling, _el$23 = _el$22.nextSibling, _el$24 = _el$23.nextSibling;
27168
+ var _el$20 = _tmpl$659(), _el$21 = _el$20.firstChild, _el$22 = _el$21.nextSibling, _el$23 = _el$22.nextSibling, _el$24 = _el$23.nextSibling;
26692
27169
  insert(_el$22, () => e.label);
26693
27170
  insert(_el$23, () => formatEventDate(e.date));
26694
27171
  insert(_el$24, (() => {
@@ -26701,7 +27178,7 @@ function OrderTracker(props) {
26701
27178
  },
26702
27179
  keyed: true,
26703
27180
  children: (rid) => (() => {
26704
- var _el$25 = _tmpl$750();
27181
+ var _el$25 = _tmpl$752();
26705
27182
  effect(() => setAttribute(_el$25, "href", props.renewHref(rid)));
26706
27183
  return _el$25;
26707
27184
  })()
@@ -26715,14 +27192,14 @@ function OrderTracker(props) {
26715
27192
  })()
26716
27193
  });
26717
27194
  const EmptyState2 = () => (() => {
26718
- var _el$26 = _tmpl$940(), _el$27 = _el$26.firstChild, _el$28 = _el$27.nextSibling, _el$29 = _el$28.firstChild, _el$30 = _el$29.nextSibling, _el$32 = _el$30.nextSibling, _el$33 = _el$32.nextSibling;
27195
+ var _el$26 = _tmpl$941(), _el$27 = _el$26.firstChild, _el$28 = _el$27.nextSibling, _el$29 = _el$28.firstChild, _el$30 = _el$29.nextSibling, _el$32 = _el$30.nextSibling, _el$33 = _el$32.nextSibling;
26719
27196
  insert(_el$26, createComponent(RefillStrip, {}), _el$28);
26720
27197
  insert(_el$28, createComponent(Show, {
26721
27198
  get when() {
26722
27199
  return props.savingsMember;
26723
27200
  },
26724
27201
  get children() {
26725
- return _tmpl$843();
27202
+ return _tmpl$844();
26726
27203
  }
26727
27204
  }), _el$32);
26728
27205
  insert(_el$28, createComponent(Show, {
@@ -26730,7 +27207,7 @@ function OrderTracker(props) {
26730
27207
  return props.offers?.[0];
26731
27208
  },
26732
27209
  children: (offer) => (() => {
26733
- var _el$34 = _tmpl$036(), _el$35 = _el$34.firstChild, _el$36 = _el$35.firstChild, _el$38 = _el$36.nextSibling; _el$38.nextSibling; var _el$39 = _el$35.nextSibling, _el$41 = _el$39.nextSibling; _el$41.nextSibling;
27210
+ var _el$34 = _tmpl$037(), _el$35 = _el$34.firstChild, _el$36 = _el$35.firstChild, _el$38 = _el$36.nextSibling; _el$38.nextSibling; var _el$39 = _el$35.nextSibling, _el$41 = _el$39.nextSibling; _el$41.nextSibling;
26734
27211
  insert(_el$35, () => offerSummaryText(offer()), _el$38);
26735
27212
  insert(_el$34, () => offer().deadlineText, _el$41);
26736
27213
  return _el$34;
@@ -26749,7 +27226,7 @@ function OrderTracker(props) {
26749
27226
  insert(_el$44, createComponent(Show, {
26750
27227
  when: isActive,
26751
27228
  get children() {
26752
- return _tmpl$1136();
27229
+ return _tmpl$1137();
26753
27230
  }
26754
27231
  }));
26755
27232
  className(_el$46, `thread__content${isActive ? " thread__content--active" : ""}`);
@@ -26769,7 +27246,7 @@ function OrderTracker(props) {
26769
27246
  return s.heroWord;
26770
27247
  },
26771
27248
  get children() {
26772
- var _el$50 = _tmpl$1137();
27249
+ var _el$50 = _tmpl$1138();
26773
27250
  insert(_el$50, () => s.heroWord);
26774
27251
  return _el$50;
26775
27252
  }
@@ -26807,7 +27284,7 @@ function OrderTracker(props) {
26807
27284
  return props.messagingEnabled;
26808
27285
  },
26809
27286
  get children() {
26810
- var _el$52 = _tmpl$1322();
27287
+ var _el$52 = _tmpl$1323();
26811
27288
  _el$52.$$click = () => props.onOpenMessages({
26812
27289
  channel: "support",
26813
27290
  category: "orders"
@@ -26830,7 +27307,7 @@ function OrderTracker(props) {
26830
27307
  return _tmpl$1721();
26831
27308
  },
26832
27309
  get children() {
26833
- var _el$53 = _tmpl$1422();
27310
+ var _el$53 = _tmpl$1423();
26834
27311
  _el$53.$$click = () => props.onOpenMessages({
26835
27312
  channel: "care"
26836
27313
  });
@@ -26852,7 +27329,7 @@ function OrderTracker(props) {
26852
27329
  return _tmpl$1819();
26853
27330
  },
26854
27331
  get children() {
26855
- var _el$54 = _tmpl$1521();
27332
+ var _el$54 = _tmpl$1522();
26856
27333
  _el$54.$$click = () => props.onOpenMessages({
26857
27334
  channel: "care"
26858
27335
  });
@@ -26927,9 +27404,9 @@ function OrderTracker(props) {
26927
27404
  });
26928
27405
  }
26929
27406
  delegateEvents(["click"]);
26930
- var _tmpl$476 = /* @__PURE__ */ template(`<span class=rx-row__dose> \xB7 `);
26931
- var _tmpl$2130 = /* @__PURE__ */ template(`<div class=rx-row__body>`);
26932
- var _tmpl$3106 = /* @__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>`);
27407
+ var _tmpl$480 = /* @__PURE__ */ template(`<span class=rx-row__dose> \xB7 `);
27408
+ var _tmpl$2132 = /* @__PURE__ */ template(`<div class=rx-row__body>`);
27409
+ var _tmpl$3108 = /* @__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>`);
26933
27410
  var STATUS_LABEL = {
26934
27411
  pending: "Under review",
26935
27412
  approved: "Approved",
@@ -26946,7 +27423,7 @@ function RxRow(props) {
26946
27423
  return STATUS_LABEL[props.rx.status] ?? props.rx.status;
26947
27424
  };
26948
27425
  return (() => {
26949
- var _el$ = _tmpl$3106(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$6 = _el$3.nextSibling, _el$7 = _el$6.nextSibling;
27426
+ var _el$ = _tmpl$3108(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$6 = _el$3.nextSibling, _el$7 = _el$6.nextSibling;
26950
27427
  _el$2.$$click = () => setOpen((v) => !v);
26951
27428
  insert(_el$3, () => props.rx.drugName ?? "Medication", null);
26952
27429
  insert(_el$3, createComponent(Show, {
@@ -26954,7 +27431,7 @@ function RxRow(props) {
26954
27431
  return props.rx.dosage;
26955
27432
  },
26956
27433
  get children() {
26957
- var _el$4 = _tmpl$476(); _el$4.firstChild;
27434
+ var _el$4 = _tmpl$480(); _el$4.firstChild;
26958
27435
  insert(_el$4, () => props.rx.dosage, null);
26959
27436
  return _el$4;
26960
27437
  }
@@ -26965,7 +27442,7 @@ function RxRow(props) {
26965
27442
  return open();
26966
27443
  },
26967
27444
  get children() {
26968
- var _el$8 = _tmpl$2130();
27445
+ var _el$8 = _tmpl$2132();
26969
27446
  insert(_el$8, createComponent(OrderTracker, {
26970
27447
  get request() {
26971
27448
  return props.request;
@@ -27008,17 +27485,17 @@ function RxRow(props) {
27008
27485
  })();
27009
27486
  }
27010
27487
  delegateEvents(["click"]);
27011
- var _tmpl$477 = /* @__PURE__ */ template(`<div class=plan data-testid=plan-billing><span class=lab-label>Plan &amp; billing`);
27012
- var _tmpl$2131 = /* @__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`);
27013
- var _tmpl$3107 = /* @__PURE__ */ template(`<p class=membership__dose>`);
27014
- var _tmpl$478 = /* @__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 `);
27015
- var _tmpl$565 = /* @__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`);
27016
- var _tmpl$659 = /* @__PURE__ */ template(`<p class=plan__note>Question about billing? <button type=button class=plan__note-link>Message support`);
27017
- var _tmpl$751 = /* @__PURE__ */ template(`<p class=plan__error role=alert>`);
27018
- var _tmpl$844 = /* @__PURE__ */ template(`<button type=button class=plan__link-btn>`);
27019
- var _tmpl$941 = /* @__PURE__ */ template(`<button type=button class="plan__link-btn plan__link-btn--quiet">Cancel subscription`);
27020
- var _tmpl$037 = /* @__PURE__ */ template(`<div class=plan__actions><a class=plan__link-btn>Update payment method`);
27021
- var _tmpl$1138 = /* @__PURE__ */ template(`<div class=confirm data-testid=cancel-confirm><p class=confirm__text>Cancel your subscription? You\u2019ll keep access until the end of your current billing period on <!>.</p><div class=confirm__actions><button type=button class="portal-btn portal-btn--ghost">Keep my plan</button><button type=button class="portal-btn portal-btn--danger">`);
27488
+ var _tmpl$481 = /* @__PURE__ */ template(`<div class=plan data-testid=plan-billing><span class=lab-label>Plan &amp; billing`);
27489
+ var _tmpl$2133 = /* @__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`);
27490
+ var _tmpl$3109 = /* @__PURE__ */ template(`<p class=membership__dose>`);
27491
+ var _tmpl$485 = /* @__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 `);
27492
+ var _tmpl$566 = /* @__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`);
27493
+ var _tmpl$660 = /* @__PURE__ */ template(`<p class=plan__note>Question about billing? <button type=button class=plan__note-link>Message support`);
27494
+ var _tmpl$753 = /* @__PURE__ */ template(`<p class=plan__error role=alert>`);
27495
+ var _tmpl$845 = /* @__PURE__ */ template(`<button type=button class=plan__link-btn>`);
27496
+ var _tmpl$942 = /* @__PURE__ */ template(`<button type=button class="plan__link-btn plan__link-btn--quiet">Cancel subscription`);
27497
+ var _tmpl$038 = /* @__PURE__ */ template(`<div class=plan__actions><a class=plan__link-btn>Update payment method`);
27498
+ var _tmpl$1139 = /* @__PURE__ */ template(`<div class=confirm data-testid=cancel-confirm><p class=confirm__text>Cancel your subscription? You\u2019ll keep access until the end of your current billing period on <!>.</p><div class=confirm__actions><button type=button class="portal-btn portal-btn--ghost">Keep my plan</button><button type=button class="portal-btn portal-btn--danger">`);
27022
27499
  function formatCents(cents) {
27023
27500
  if (cents == null || Number.isNaN(cents)) return "\u2014";
27024
27501
  return `$${(cents / 100).toFixed(2)}`;
@@ -27063,20 +27540,20 @@ function PlanBilling(props) {
27063
27540
  }
27064
27541
  };
27065
27542
  return (() => {
27066
- var _el$ = _tmpl$477(); _el$.firstChild;
27543
+ var _el$ = _tmpl$481(); _el$.firstChild;
27067
27544
  insert(_el$, createComponent(Show, {
27068
27545
  get when() {
27069
27546
  return primary();
27070
27547
  },
27071
27548
  get fallback() {
27072
27549
  return (() => {
27073
- var _el$3 = _tmpl$2131(), _el$4 = _el$3.firstChild, _el$5 = _el$4.nextSibling, _el$6 = _el$5.nextSibling;
27550
+ var _el$3 = _tmpl$2133(), _el$4 = _el$3.firstChild, _el$5 = _el$4.nextSibling, _el$6 = _el$5.nextSibling;
27074
27551
  effect(() => setAttribute(_el$6, "href", props.intakeHref));
27075
27552
  return _el$3;
27076
27553
  })();
27077
27554
  },
27078
27555
  children: (sub) => [(() => {
27079
- var _el$7 = _tmpl$478(), _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;
27556
+ var _el$7 = _tmpl$485(), _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;
27080
27557
  insert(_el$0, () => STATUS_COPY[sub().status] || sub().status);
27081
27558
  insert(_el$1, () => props.brandName);
27082
27559
  insert(_el$10, () => sub().medicationName ?? sub().medication);
@@ -27085,7 +27562,7 @@ function PlanBilling(props) {
27085
27562
  return sub().dosage;
27086
27563
  },
27087
27564
  get children() {
27088
- var _el$11 = _tmpl$3107();
27565
+ var _el$11 = _tmpl$3109();
27089
27566
  insert(_el$11, () => sub().dosage);
27090
27567
  return _el$11;
27091
27568
  }
@@ -27095,7 +27572,7 @@ function PlanBilling(props) {
27095
27572
  effect(() => className(_el$7, `membership membership--${sub().status}`));
27096
27573
  return _el$7;
27097
27574
  })(), (() => {
27098
- var _el$17 = _tmpl$565(), _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;
27575
+ var _el$17 = _tmpl$566(), _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;
27099
27576
  insert(_el$20, () => formatLongDate(sub().createdAt));
27100
27577
  insert(_el$23, () => formatLongDate(sub().currentPeriodEnd));
27101
27578
  insert(_el$26, () => formatCents(sub().amountCents), _el$27);
@@ -27105,7 +27582,7 @@ function PlanBilling(props) {
27105
27582
  return props.messagingEnabled;
27106
27583
  },
27107
27584
  get children() {
27108
- var _el$28 = _tmpl$659(), _el$29 = _el$28.firstChild, _el$31 = _el$29.nextSibling;
27585
+ var _el$28 = _tmpl$660(), _el$29 = _el$28.firstChild, _el$31 = _el$29.nextSibling;
27109
27586
  _el$31.$$click = () => props.onOpenMessages({
27110
27587
  channel: "support",
27111
27588
  category: "billing"
@@ -27117,18 +27594,18 @@ function PlanBilling(props) {
27117
27594
  return error();
27118
27595
  },
27119
27596
  get children() {
27120
- var _el$32 = _tmpl$751();
27597
+ var _el$32 = _tmpl$753();
27121
27598
  insert(_el$32, error);
27122
27599
  return _el$32;
27123
27600
  }
27124
27601
  }), (() => {
27125
- var _el$33 = _tmpl$037(), _el$36 = _el$33.firstChild;
27602
+ var _el$33 = _tmpl$038(), _el$36 = _el$33.firstChild;
27126
27603
  insert(_el$33, createComponent(Show, {
27127
27604
  get when() {
27128
27605
  return sub().status === "active";
27129
27606
  },
27130
27607
  get children() {
27131
- var _el$34 = _tmpl$844();
27608
+ var _el$34 = _tmpl$845();
27132
27609
  _el$34.$$click = () => run("pause", () => subscriptionsApi.pause(sub().id));
27133
27610
  insert(_el$34, () => action() === "pause" ? "Pausing\u2026" : "Pause subscription");
27134
27611
  effect(() => _el$34.disabled = !!action());
@@ -27140,7 +27617,7 @@ function PlanBilling(props) {
27140
27617
  return sub().status === "paused";
27141
27618
  },
27142
27619
  get children() {
27143
- var _el$35 = _tmpl$844();
27620
+ var _el$35 = _tmpl$845();
27144
27621
  _el$35.$$click = () => run("resume", () => subscriptionsApi.resume(sub().id));
27145
27622
  insert(_el$35, () => action() === "resume" ? "Resuming\u2026" : "Resume subscription");
27146
27623
  effect(() => _el$35.disabled = !!action());
@@ -27152,7 +27629,7 @@ function PlanBilling(props) {
27152
27629
  return memo(() => sub().status !== "cancelled")() && sub().status !== "expired";
27153
27630
  },
27154
27631
  get children() {
27155
- var _el$37 = _tmpl$941();
27632
+ var _el$37 = _tmpl$942();
27156
27633
  _el$37.$$click = () => setConfirmCancel(true);
27157
27634
  effect(() => _el$37.disabled = !!action());
27158
27635
  return _el$37;
@@ -27165,7 +27642,7 @@ function PlanBilling(props) {
27165
27642
  return confirmCancel();
27166
27643
  },
27167
27644
  get children() {
27168
- var _el$38 = _tmpl$1138(), _el$39 = _el$38.firstChild, _el$40 = _el$39.firstChild, _el$42 = _el$40.nextSibling; _el$42.nextSibling; var _el$43 = _el$39.nextSibling, _el$44 = _el$43.firstChild, _el$45 = _el$44.nextSibling;
27645
+ var _el$38 = _tmpl$1139(), _el$39 = _el$38.firstChild, _el$40 = _el$39.firstChild, _el$42 = _el$40.nextSibling; _el$42.nextSibling; var _el$43 = _el$39.nextSibling, _el$44 = _el$43.firstChild, _el$45 = _el$44.nextSibling;
27169
27646
  insert(_el$39, () => formatLongDate(sub().currentPeriodEnd), _el$42);
27170
27647
  _el$44.$$click = () => setConfirmCancel(false);
27171
27648
  _el$45.$$click = () => run("cancel", () => subscriptionsApi.cancel(sub().id)).then(() => setConfirmCancel(false));
@@ -27187,12 +27664,12 @@ function PlanBilling(props) {
27187
27664
  })();
27188
27665
  }
27189
27666
  delegateEvents(["click"]);
27190
- var _tmpl$479 = /* @__PURE__ */ template(`<p class=account__empty>We don\u2019t have your details on file yet.`);
27191
- var _tmpl$2132 = /* @__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.`);
27192
- var _tmpl$3108 = /* @__PURE__ */ template(`<button type=button class="account__support-link account__support-btn">Messages`);
27193
- var _tmpl$480 = /* @__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`);
27194
- var _tmpl$566 = /* @__PURE__ */ template(`<div class=account__field><dt class=lab-label></dt><dd>`);
27195
- var _tmpl$660 = /* @__PURE__ */ template(`<a class=account__support-link>`);
27667
+ var _tmpl$486 = /* @__PURE__ */ template(`<p class=account__empty>We don\u2019t have your details on file yet.`);
27668
+ var _tmpl$2134 = /* @__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.`);
27669
+ var _tmpl$3116 = /* @__PURE__ */ template(`<button type=button class="account__support-link account__support-btn">Messages`);
27670
+ var _tmpl$487 = /* @__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`);
27671
+ var _tmpl$567 = /* @__PURE__ */ template(`<div class=account__field><dt class=lab-label></dt><dd>`);
27672
+ var _tmpl$661 = /* @__PURE__ */ template(`<a class=account__support-link>`);
27196
27673
  function pick(member, ...keys) {
27197
27674
  if (!member) return "";
27198
27675
  for (const k of keys) {
@@ -27233,13 +27710,13 @@ function AccountPanel(props) {
27233
27710
  value: address()
27234
27711
  }].filter((f) => f.value);
27235
27712
  return (() => {
27236
- var _el$ = _tmpl$480(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling, _el$4 = _el$3.nextSibling, _el$0 = _el$4.nextSibling, _el$10 = _el$0.nextSibling;
27713
+ var _el$ = _tmpl$487(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling, _el$4 = _el$3.nextSibling, _el$0 = _el$4.nextSibling, _el$10 = _el$0.nextSibling;
27237
27714
  insert(_el$4, createComponent(For, {
27238
27715
  get each() {
27239
27716
  return fields();
27240
27717
  },
27241
27718
  children: (f) => (() => {
27242
- var _el$11 = _tmpl$566(), _el$12 = _el$11.firstChild, _el$13 = _el$12.nextSibling;
27719
+ var _el$11 = _tmpl$567(), _el$12 = _el$11.firstChild, _el$13 = _el$12.nextSibling;
27243
27720
  insert(_el$12, () => f.label);
27244
27721
  insert(_el$13, () => f.value);
27245
27722
  return _el$11;
@@ -27250,7 +27727,7 @@ function AccountPanel(props) {
27250
27727
  return fields().length === 0;
27251
27728
  },
27252
27729
  get children() {
27253
- return _tmpl$479();
27730
+ return _tmpl$486();
27254
27731
  }
27255
27732
  }), _el$0);
27256
27733
  insert(_el$, createComponent(Show, {
@@ -27258,7 +27735,7 @@ function AccountPanel(props) {
27258
27735
  return props.messagingEnabled;
27259
27736
  },
27260
27737
  get children() {
27261
- var _el$6 = _tmpl$2132(), _el$7 = _el$6.firstChild, _el$9 = _el$7.nextSibling;
27738
+ var _el$6 = _tmpl$2134(), _el$7 = _el$6.firstChild, _el$9 = _el$7.nextSibling;
27262
27739
  _el$9.$$click = () => props.onOpenMessages({
27263
27740
  channel: "support",
27264
27741
  category: "account"
@@ -27271,7 +27748,7 @@ function AccountPanel(props) {
27271
27748
  return props.messagingEnabled;
27272
27749
  },
27273
27750
  get children() {
27274
- var _el$1 = _tmpl$3108();
27751
+ var _el$1 = _tmpl$3116();
27275
27752
  _el$1.$$click = () => props.onOpenMessages();
27276
27753
  return _el$1;
27277
27754
  }
@@ -27281,7 +27758,7 @@ function AccountPanel(props) {
27281
27758
  return props.legalLinks ?? [];
27282
27759
  },
27283
27760
  children: (link) => (() => {
27284
- var _el$14 = _tmpl$660();
27761
+ var _el$14 = _tmpl$661();
27285
27762
  insert(_el$14, () => link.label);
27286
27763
  effect(() => setAttribute(_el$14, "href", link.href));
27287
27764
  return _el$14;
@@ -27292,12 +27769,12 @@ function AccountPanel(props) {
27292
27769
  })();
27293
27770
  }
27294
27771
  delegateEvents(["click"]);
27295
- var _tmpl$481 = /* @__PURE__ */ template(`<section class="leaflet__section leaflet__section--caution"><h2 class=leaflet__h2>Birth control</h2><p class=leaflet__body>`);
27296
- var _tmpl$2133 = /* @__PURE__ */ template(`<ul class=leaflet__disclaimers id=leaflet-disclaimers>`);
27297
- var _tmpl$3109 = /* @__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>`);
27298
- var _tmpl$485 = /* @__PURE__ */ template(`<li>`);
27299
- var _tmpl$567 = /* @__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>`);
27300
- var _tmpl$661 = /* @__PURE__ */ template(`<li class=steps__item><span class=steps__num></span><div class=steps__body><h3 class=steps__title></h3><p class=steps__detail>`);
27772
+ var _tmpl$488 = /* @__PURE__ */ template(`<section class="leaflet__section leaflet__section--caution"><h2 class=leaflet__h2>Birth control</h2><p class=leaflet__body>`);
27773
+ var _tmpl$2135 = /* @__PURE__ */ template(`<ul class=leaflet__disclaimers id=leaflet-disclaimers>`);
27774
+ var _tmpl$3117 = /* @__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>`);
27775
+ var _tmpl$489 = /* @__PURE__ */ template(`<li>`);
27776
+ var _tmpl$568 = /* @__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>`);
27777
+ var _tmpl$664 = /* @__PURE__ */ template(`<li class=steps__item><span class=steps__num></span><div class=steps__body><h3 class=steps__title></h3><p class=steps__detail>`);
27301
27778
  function firstNumber(s) {
27302
27779
  const m = (s || "").match(/\d+(\.\d+)?/);
27303
27780
  return m ? m[0] : null;
@@ -27318,7 +27795,7 @@ function MedicationGuide(props) {
27318
27795
  return "upcoming";
27319
27796
  };
27320
27797
  return (() => {
27321
- var _el$ = _tmpl$3109(), _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;
27798
+ var _el$ = _tmpl$3117(), _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;
27322
27799
  insert(_el$4, () => props.guide.title);
27323
27800
  insert(_el$5, () => props.guide.summary);
27324
27801
  insert(_el$8, () => props.guide.boxedWarning);
@@ -27327,7 +27804,7 @@ function MedicationGuide(props) {
27327
27804
  return props.guide.doNotUseIf;
27328
27805
  },
27329
27806
  children: (item) => (() => {
27330
- var _el$45 = _tmpl$485();
27807
+ var _el$45 = _tmpl$489();
27331
27808
  insert(_el$45, item);
27332
27809
  return _el$45;
27333
27810
  })()
@@ -27337,7 +27814,7 @@ function MedicationGuide(props) {
27337
27814
  return props.guide.titration;
27338
27815
  },
27339
27816
  children: (step, i) => (() => {
27340
- var _el$46 = _tmpl$567(), _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;
27817
+ var _el$46 = _tmpl$568(), _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;
27341
27818
  insert(_el$50, () => step.dose);
27342
27819
  insert(_el$51, () => step.phase);
27343
27820
  insert(_el$52, () => step.timeframe);
@@ -27351,7 +27828,7 @@ function MedicationGuide(props) {
27351
27828
  return props.guide.injectionSteps;
27352
27829
  },
27353
27830
  children: (step) => (() => {
27354
- var _el$54 = _tmpl$661(), _el$55 = _el$54.firstChild, _el$56 = _el$55.nextSibling, _el$57 = _el$56.firstChild, _el$58 = _el$57.nextSibling;
27831
+ var _el$54 = _tmpl$664(), _el$55 = _el$54.firstChild, _el$56 = _el$55.nextSibling, _el$57 = _el$56.firstChild, _el$58 = _el$57.nextSibling;
27355
27832
  insert(_el$55, () => step.n);
27356
27833
  insert(_el$57, () => step.title);
27357
27834
  insert(_el$58, () => step.detail);
@@ -27363,7 +27840,7 @@ function MedicationGuide(props) {
27363
27840
  return props.guide.storage;
27364
27841
  },
27365
27842
  children: (item) => (() => {
27366
- var _el$59 = _tmpl$485();
27843
+ var _el$59 = _tmpl$489();
27367
27844
  insert(_el$59, item);
27368
27845
  return _el$59;
27369
27846
  })()
@@ -27374,7 +27851,7 @@ function MedicationGuide(props) {
27374
27851
  return props.guide.contraception;
27375
27852
  },
27376
27853
  get children() {
27377
- var _el$24 = _tmpl$481(), _el$25 = _el$24.firstChild, _el$26 = _el$25.nextSibling;
27854
+ var _el$24 = _tmpl$488(), _el$25 = _el$24.firstChild, _el$26 = _el$25.nextSibling;
27378
27855
  insert(_el$26, () => props.guide.contraception);
27379
27856
  return _el$24;
27380
27857
  }
@@ -27384,7 +27861,7 @@ function MedicationGuide(props) {
27384
27861
  return props.guide.sideEffectsCommon;
27385
27862
  },
27386
27863
  children: (item) => (() => {
27387
- var _el$60 = _tmpl$485();
27864
+ var _el$60 = _tmpl$489();
27388
27865
  insert(_el$60, item);
27389
27866
  return _el$60;
27390
27867
  })()
@@ -27394,7 +27871,7 @@ function MedicationGuide(props) {
27394
27871
  return props.guide.sideEffectsSerious;
27395
27872
  },
27396
27873
  children: (item) => (() => {
27397
- var _el$61 = _tmpl$485();
27874
+ var _el$61 = _tmpl$489();
27398
27875
  insert(_el$61, item);
27399
27876
  return _el$61;
27400
27877
  })()
@@ -27404,7 +27881,7 @@ function MedicationGuide(props) {
27404
27881
  return props.guide.whenToCall;
27405
27882
  },
27406
27883
  children: (item) => (() => {
27407
- var _el$62 = _tmpl$485();
27884
+ var _el$62 = _tmpl$489();
27408
27885
  insert(_el$62, item);
27409
27886
  return _el$62;
27410
27887
  })()
@@ -27414,7 +27891,7 @@ function MedicationGuide(props) {
27414
27891
  return props.guide.tips;
27415
27892
  },
27416
27893
  children: (item) => (() => {
27417
- var _el$63 = _tmpl$485();
27894
+ var _el$63 = _tmpl$489();
27418
27895
  insert(_el$63, item);
27419
27896
  return _el$63;
27420
27897
  })()
@@ -27426,13 +27903,13 @@ function MedicationGuide(props) {
27426
27903
  return showDisclaimers();
27427
27904
  },
27428
27905
  get children() {
27429
- var _el$44 = _tmpl$2133();
27906
+ var _el$44 = _tmpl$2135();
27430
27907
  insert(_el$44, createComponent(For, {
27431
27908
  get each() {
27432
27909
  return props.guide.disclaimers;
27433
27910
  },
27434
27911
  children: (item) => (() => {
27435
- var _el$64 = _tmpl$485();
27912
+ var _el$64 = _tmpl$489();
27436
27913
  insert(_el$64, item);
27437
27914
  return _el$64;
27438
27915
  })()
@@ -27453,29 +27930,29 @@ function MedicationGuide(props) {
27453
27930
  })();
27454
27931
  }
27455
27932
  delegateEvents(["click"]);
27456
- var _tmpl$486 = /* @__PURE__ */ template(`<span data-testid=channel-chip>`);
27457
- var _tmpl$2134 = /* @__PURE__ */ template(`<span class=channel-chip__category>`);
27458
- var _tmpl$3116 = /* @__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`);
27459
- var _tmpl$487 = /* @__PURE__ */ template(`<div class=msg-list__state><div class=request-status__spinner>`);
27460
- var _tmpl$568 = /* @__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>`);
27461
- var _tmpl$664 = /* @__PURE__ */ template(`<div class=msg-list__scroll data-scrollable>`);
27462
- var _tmpl$752 = /* @__PURE__ */ template(`<span class=msg-list__pip>`);
27463
- var _tmpl$845 = /* @__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>`);
27464
- var _tmpl$942 = /* @__PURE__ */ template(`<button type=button class=msg-attachment__image-link><img class=msg-attachment__image loading=lazy>`, true, false, false);
27465
- var _tmpl$038 = /* @__PURE__ */ template(`<button type=button class=msg-attachment__file><span class=msg-attachment__file-icon aria-hidden=true><i class="ph-thin ph-paperclip"></i></span><span class=msg-attachment__file-info><span class=msg-attachment__file-name></span><span class=msg-attachment__file-size>`);
27466
- var _tmpl$1139 = /* @__PURE__ */ template(`<span class=msg-attachment__fallback>`);
27933
+ var _tmpl$490 = /* @__PURE__ */ template(`<span data-testid=channel-chip>`);
27934
+ var _tmpl$2136 = /* @__PURE__ */ template(`<span class=channel-chip__category>`);
27935
+ var _tmpl$3118 = /* @__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`);
27936
+ var _tmpl$491 = /* @__PURE__ */ template(`<div class=msg-list__state><div class=request-status__spinner>`);
27937
+ var _tmpl$569 = /* @__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>`);
27938
+ var _tmpl$665 = /* @__PURE__ */ template(`<div class=msg-list__scroll data-scrollable>`);
27939
+ var _tmpl$754 = /* @__PURE__ */ template(`<span class=msg-list__pip>`);
27940
+ var _tmpl$846 = /* @__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>`);
27941
+ var _tmpl$943 = /* @__PURE__ */ template(`<button type=button class=msg-attachment__image-link><img class=msg-attachment__image loading=lazy>`, true, false, false);
27942
+ var _tmpl$039 = /* @__PURE__ */ template(`<button type=button class=msg-attachment__file><span class=msg-attachment__file-icon aria-hidden=true><i class="ph-thin ph-paperclip"></i></span><span class=msg-attachment__file-info><span class=msg-attachment__file-name></span><span class=msg-attachment__file-size>`);
27943
+ var _tmpl$1140 = /* @__PURE__ */ template(`<span class=msg-attachment__fallback>`);
27467
27944
  var _tmpl$1030 = /* @__PURE__ */ template(`<p class=msg-thread__sender>`);
27468
- var _tmpl$1140 = /* @__PURE__ */ template(`<div class=msg-thread__text>`);
27945
+ var _tmpl$1141 = /* @__PURE__ */ template(`<div class=msg-thread__text>`);
27469
27946
  var _tmpl$1226 = /* @__PURE__ */ template(`<div class=msg-attachment>`);
27470
- var _tmpl$1323 = /* @__PURE__ */ template(`<div><div><p class=msg-thread__meta>`);
27471
- var _tmpl$1423 = /* @__PURE__ */ template(`<p class=msg-thread__system data-testid=system-message>`);
27472
- var _tmpl$1522 = /* @__PURE__ */ template(`<p class=msg-thread__text>`);
27947
+ var _tmpl$1324 = /* @__PURE__ */ template(`<div><div><p class=msg-thread__meta>`);
27948
+ var _tmpl$1424 = /* @__PURE__ */ template(`<p class=msg-thread__system data-testid=system-message>`);
27949
+ var _tmpl$1523 = /* @__PURE__ */ template(`<p class=msg-thread__text>`);
27473
27950
  var _tmpl$1622 = /* @__PURE__ */ template(`<button type=button class="msg-compose__staged-remove msg-compose__staged-remove--inline">Remove file`);
27474
27951
  var _tmpl$1722 = /* @__PURE__ */ template(`<p class=msg-compose__error role=alert>`);
27475
27952
  var _tmpl$1820 = /* @__PURE__ */ template(`<form class="msg-thread msg-thread--compose"data-testid=support-compose><div class=msg-thread__header><button type=button class=msg-thread__back-btn aria-label=Back data-testid=support-compose-back><i class="ph-thin ph-arrow-left"aria-hidden=true></i></button><div><h3 class=msg-thread__name>Message support</h3><p class=msg-thread__role data-testid=support-compose-reply-note></p></div></div><div class=msg-compose__new><label class=msg-compose__label id=support-category-label>What's this about? <span class=msg-compose__label-optional>(optional)</span></label><div class=msg-compose__categories role=group aria-labelledby=support-category-label></div><label class=msg-compose__label for=support-subject>Subject</label><input id=support-subject class=msg-compose__subject type=text maxlength=500 required placeholder="e.g. Question about my order"><label class=msg-compose__label for=support-body>How can we help?</label><textarea id=support-body class=msg-compose__body rows=6 maxlength=5000 required placeholder="Tell us what's going on\u2026"></textarea><label class="msg-compose__attach msg-compose__attach--block"title="Attach a file"><i class="ph-thin ph-paperclip"aria-hidden=true></i><span class=msg-compose__attach-label></span><input class=msg-compose__file-input type=file data-testid=support-compose-attach></label><button type=submit class=msg-compose__send data-testid=support-compose-send>`);
27476
27953
  var _tmpl$1918 = /* @__PURE__ */ template(`<button type=button>`);
27477
27954
  var _tmpl$2018 = /* @__PURE__ */ template(`<form class="msg-thread msg-thread--compose"data-testid=care-compose><div class=msg-thread__header><button type=button class=msg-thread__back-btn aria-label=Back data-testid=care-compose-back><i class="ph-thin ph-arrow-left"aria-hidden=true></i></button><div><h3 class=msg-thread__name>Message your care team</h3><p class=msg-thread__role>Your prescriber or their team will reply</p></div></div><div class=msg-compose__new><label class=msg-compose__label for=care-body>Message</label><textarea id=care-body class=msg-compose__body rows=6 maxlength=5000 required placeholder="Tell your care team what's going on\u2026"></textarea><label class="msg-compose__attach msg-compose__attach--block"title="Attach a file"><i class="ph-thin ph-paperclip"aria-hidden=true></i><span class=msg-compose__attach-label></span><input class=msg-compose__file-input type=file data-testid=care-compose-attach></label><button type=submit class=msg-compose__send data-testid=care-compose-send>`);
27478
- var _tmpl$2135 = /* @__PURE__ */ template(`<span class=msg-choice__option-badge data-testid=gate-care-badge>`);
27955
+ var _tmpl$2137 = /* @__PURE__ */ template(`<span class=msg-choice__option-badge data-testid=gate-care-badge>`);
27479
27956
  var _tmpl$2217 = /* @__PURE__ */ template(`<span class=msg-choice__option-badge data-testid=gate-support-badge>`);
27480
27957
  var _tmpl$2315 = /* @__PURE__ */ template(`<p class=msg-choice__notice-text data-testid=messages-gate-note>That conversation isn't available.`);
27481
27958
  var _tmpl$2415 = /* @__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`);
@@ -27485,7 +27962,7 @@ var _tmpl$2714 = /* @__PURE__ */ template(`<div class="msg-thread msg-choice"dat
27485
27962
  var _tmpl$2813 = /* @__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`);
27486
27963
  var _tmpl$2911 = /* @__PURE__ */ template(`<span class=msg-thread__status data-testid=thread-status-closed>Resolved`);
27487
27964
  var _tmpl$3011 = /* @__PURE__ */ template(`<span class=msg-thread__status data-testid=thread-status-transferred>Moved to care team`);
27488
- var _tmpl$3117 = /* @__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>`);
27965
+ var _tmpl$3119 = /* @__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>`);
27489
27966
  var _tmpl$3215 = /* @__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`);
27490
27967
  var _tmpl$3315 = /* @__PURE__ */ template(`<div class=msg-thread__messages data-scrollable><div>`);
27491
27968
  var _tmpl$3415 = /* @__PURE__ */ template(`<span class=msg-compose__error role=alert>`);
@@ -27698,14 +28175,14 @@ function MessagesPanel(props) {
27698
28175
  }
27699
28176
  }
27700
28177
  const ChannelChip = (p) => (() => {
27701
- var _el$ = _tmpl$486();
28178
+ var _el$ = _tmpl$490();
27702
28179
  insert(_el$, () => p.source === "clinical" ? "Care team" : "Support", null);
27703
28180
  insert(_el$, createComponent(Show, {
27704
28181
  get when() {
27705
28182
  return memo(() => p.source === "support")() && categoryLabel(p.category);
27706
28183
  },
27707
28184
  children: (label3) => (() => {
27708
- var _el$2 = _tmpl$2134();
28185
+ var _el$2 = _tmpl$2136();
27709
28186
  insert(_el$2, label3);
27710
28187
  return _el$2;
27711
28188
  })()
@@ -27723,19 +28200,19 @@ function MessagesPanel(props) {
27723
28200
  })();
27724
28201
  const channelConversations = () => thread().conversations().filter((c) => c.source === (channel() === "care" ? "clinical" : "support"));
27725
28202
  const ConversationList = () => [(() => {
27726
- var _el$3 = _tmpl$3116(), _el$4 = _el$3.firstChild, _el$5 = _el$4.firstChild, _el$6 = _el$5.nextSibling, _el$7 = _el$4.nextSibling;
28203
+ var _el$3 = _tmpl$3118(), _el$4 = _el$3.firstChild, _el$5 = _el$4.firstChild, _el$6 = _el$5.nextSibling, _el$7 = _el$4.nextSibling;
27727
28204
  _el$5.$$click = goToGate;
27728
28205
  insert(_el$6, () => channel() === "care" ? "My care team" : "Support");
27729
28206
  _el$7.$$click = openCompose;
27730
28207
  return _el$3;
27731
28208
  })(), (() => {
27732
- var _el$8 = _tmpl$664();
28209
+ var _el$8 = _tmpl$665();
27733
28210
  insert(_el$8, createComponent(Show, {
27734
28211
  get when() {
27735
28212
  return thread().loadingConversations();
27736
28213
  },
27737
28214
  get children() {
27738
- return _tmpl$487();
28215
+ return _tmpl$491();
27739
28216
  }
27740
28217
  }), null);
27741
28218
  insert(_el$8, createComponent(Show, {
@@ -27743,7 +28220,7 @@ function MessagesPanel(props) {
27743
28220
  return memo(() => !!!thread().loadingConversations())() && channelConversations().length === 0;
27744
28221
  },
27745
28222
  get children() {
27746
- var _el$0 = _tmpl$568(), _el$1 = _el$0.firstChild, _el$10 = _el$1.nextSibling, _el$11 = _el$10.nextSibling;
28223
+ var _el$0 = _tmpl$569(), _el$1 = _el$0.firstChild, _el$10 = _el$1.nextSibling, _el$11 = _el$10.nextSibling;
27747
28224
  insert(_el$11, createComponent(Show, {
27748
28225
  get when() {
27749
28226
  return channel() === "care";
@@ -27759,7 +28236,7 @@ function MessagesPanel(props) {
27759
28236
  return channelConversations();
27760
28237
  },
27761
28238
  children: (convo) => (() => {
27762
- var _el$12 = _tmpl$845(), _el$13 = _el$12.firstChild, _el$14 = _el$13.firstChild, _el$15 = _el$14.firstChild, _el$16 = _el$14.nextSibling, _el$17 = _el$13.nextSibling, _el$18 = _el$17.firstChild;
28239
+ var _el$12 = _tmpl$846(), _el$13 = _el$12.firstChild, _el$14 = _el$13.firstChild, _el$15 = _el$14.firstChild, _el$16 = _el$14.nextSibling, _el$17 = _el$13.nextSibling, _el$18 = _el$17.firstChild;
27763
28240
  _el$12.$$click = () => thread().selectConversation(convo.id);
27764
28241
  insert(_el$15, () => convo.participantName ?? "Provider");
27765
28242
  insert(_el$14, createComponent(ChannelChip, {
@@ -27777,7 +28254,7 @@ function MessagesPanel(props) {
27777
28254
  return (convo.unreadCount ?? 0) > 0;
27778
28255
  },
27779
28256
  get children() {
27780
- var _el$19 = _tmpl$752();
28257
+ var _el$19 = _tmpl$754();
27781
28258
  insert(_el$19, () => convo.unreadCount);
27782
28259
  return _el$19;
27783
28260
  }
@@ -27819,7 +28296,7 @@ function MessagesPanel(props) {
27819
28296
  },
27820
28297
  get fallback() {
27821
28298
  return (() => {
27822
- var _el$22 = _tmpl$038(), _el$23 = _el$22.firstChild, _el$24 = _el$23.nextSibling, _el$25 = _el$24.firstChild, _el$26 = _el$25.nextSibling;
28299
+ var _el$22 = _tmpl$039(), _el$23 = _el$22.firstChild, _el$24 = _el$23.nextSibling, _el$25 = _el$24.firstChild, _el$26 = _el$25.nextSibling;
27823
28300
  _el$22.$$click = openDocument;
27824
28301
  insert(_el$25, () => p.attachment.filename);
27825
28302
  insert(_el$26, () => formatFileSize(p.attachment.sizeBytes));
@@ -27834,13 +28311,13 @@ function MessagesPanel(props) {
27834
28311
  },
27835
28312
  get fallback() {
27836
28313
  return (() => {
27837
- var _el$27 = _tmpl$1139();
28314
+ var _el$27 = _tmpl$1140();
27838
28315
  insert(_el$27, () => failed() ? "Attachment unavailable" : "Loading\u2026");
27839
28316
  return _el$27;
27840
28317
  })();
27841
28318
  },
27842
28319
  get children() {
27843
- var _el$20 = _tmpl$942(), _el$21 = _el$20.firstChild;
28320
+ var _el$20 = _tmpl$943(), _el$21 = _el$20.firstChild;
27844
28321
  _el$20.$$click = openDocument;
27845
28322
  _el$21.addEventListener("error", () => {
27846
28323
  if (retried) {
@@ -27874,13 +28351,13 @@ function MessagesPanel(props) {
27874
28351
  },
27875
28352
  get fallback() {
27876
28353
  return (() => {
27877
- var _el$34 = _tmpl$1423();
28354
+ var _el$34 = _tmpl$1424();
27878
28355
  insert(_el$34, body);
27879
28356
  return _el$34;
27880
28357
  })();
27881
28358
  },
27882
28359
  get children() {
27883
- var _el$28 = _tmpl$1323(), _el$29 = _el$28.firstChild, _el$33 = _el$29.firstChild;
28360
+ var _el$28 = _tmpl$1324(), _el$29 = _el$28.firstChild, _el$33 = _el$29.firstChild;
27884
28361
  insert(_el$29, createComponent(Show, {
27885
28362
  get when() {
27886
28363
  return memo(() => !!!isOwn())() && p.msg.senderName;
@@ -27902,13 +28379,13 @@ function MessagesPanel(props) {
27902
28379
  },
27903
28380
  get fallback() {
27904
28381
  return (() => {
27905
- var _el$35 = _tmpl$1522();
28382
+ var _el$35 = _tmpl$1523();
27906
28383
  insert(_el$35, body);
27907
28384
  return _el$35;
27908
28385
  })();
27909
28386
  },
27910
28387
  get children() {
27911
- var _el$31 = _tmpl$1140();
28388
+ var _el$31 = _tmpl$1141();
27912
28389
  effect(() => _el$31.innerHTML = sanitizeMessageHtml(body()));
27913
28390
  return _el$31;
27914
28391
  }
@@ -28067,7 +28544,7 @@ function MessagesPanel(props) {
28067
28544
  return careUnreadCount() > 0;
28068
28545
  },
28069
28546
  get children() {
28070
- var _el$77 = _tmpl$2135();
28547
+ var _el$77 = _tmpl$2137();
28071
28548
  insert(_el$77, careUnreadCount);
28072
28549
  return _el$77;
28073
28550
  }
@@ -28121,7 +28598,7 @@ function MessagesPanel(props) {
28121
28598
  return _el$92;
28122
28599
  })();
28123
28600
  const Thread = () => [(() => {
28124
- var _el$98 = _tmpl$3117(), _el$99 = _el$98.firstChild, _el$100 = _el$99.nextSibling, _el$101 = _el$100.firstChild, _el$102 = _el$101.firstChild, _el$103 = _el$101.nextSibling;
28601
+ var _el$98 = _tmpl$3119(), _el$99 = _el$98.firstChild, _el$100 = _el$99.nextSibling, _el$101 = _el$100.firstChild, _el$102 = _el$101.firstChild, _el$103 = _el$101.nextSibling;
28125
28602
  _el$99.$$click = () => thread().clearSelection();
28126
28603
  insert(_el$102, () => selectedConvo()?.participantName ?? "Provider");
28127
28604
  insert(_el$101, createComponent(Show, {
@@ -28171,7 +28648,7 @@ function MessagesPanel(props) {
28171
28648
  return thread().loadingMessages();
28172
28649
  },
28173
28650
  get children() {
28174
- return _tmpl$487();
28651
+ return _tmpl$491();
28175
28652
  }
28176
28653
  }), _el$110);
28177
28654
  insert(_el$108, createComponent(For, {
@@ -28355,17 +28832,17 @@ function MessagesPanel(props) {
28355
28832
  })();
28356
28833
  }
28357
28834
  delegateEvents(["click", "input", "keydown"]);
28358
- var _tmpl$488 = /* @__PURE__ */ template(`<ul class=history-list data-testid=history-list>`);
28359
- var _tmpl$2136 = /* @__PURE__ */ template(`<div class=portal-state data-testid=history-error><p>We couldn't load your submitted surveys. Please try again in a moment.`);
28360
- var _tmpl$3118 = /* @__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.`);
28361
- var _tmpl$489 = /* @__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>`);
28362
- var _tmpl$569 = /* @__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`);
28363
- var _tmpl$665 = /* @__PURE__ */ template(`<div class=portal-state><div class=request-status__spinner></div><p>Loading your answers\u2026`);
28364
- var _tmpl$753 = /* @__PURE__ */ template(`<div class=portal-state data-testid=history-detail-error><p>We couldn't load this questionnaire. Please try again in a moment.`);
28365
- var _tmpl$846 = /* @__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.`);
28366
- var _tmpl$943 = /* @__PURE__ */ template(`<section class=history-section><h3 class=lab-label>`);
28367
- var _tmpl$039 = /* @__PURE__ */ template(`<div class=history-qa><p class=history-qa__q></p><p class=history-qa__a>`);
28368
- var _tmpl$1141 = /* @__PURE__ */ template(`<div class=survey-history data-testid=survey-history>`);
28835
+ var _tmpl$495 = /* @__PURE__ */ template(`<ul class=history-list data-testid=history-list>`);
28836
+ var _tmpl$2138 = /* @__PURE__ */ template(`<div class=portal-state data-testid=history-error><p>We couldn't load your submitted surveys. Please try again in a moment.`);
28837
+ var _tmpl$3120 = /* @__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.`);
28838
+ var _tmpl$496 = /* @__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>`);
28839
+ var _tmpl$570 = /* @__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`);
28840
+ var _tmpl$666 = /* @__PURE__ */ template(`<div class=portal-state><div class=request-status__spinner></div><p>Loading your answers\u2026`);
28841
+ var _tmpl$755 = /* @__PURE__ */ template(`<div class=portal-state data-testid=history-detail-error><p>We couldn't load this questionnaire. Please try again in a moment.`);
28842
+ var _tmpl$847 = /* @__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.`);
28843
+ var _tmpl$944 = /* @__PURE__ */ template(`<section class=history-section><h3 class=lab-label>`);
28844
+ var _tmpl$040 = /* @__PURE__ */ template(`<div class=history-qa><p class=history-qa__q></p><p class=history-qa__a>`);
28845
+ var _tmpl$1142 = /* @__PURE__ */ template(`<div class=survey-history data-testid=survey-history>`);
28369
28846
  var _tmpl$1031 = /* @__PURE__ */ template(`<div class=portal-state><div class=request-status__spinner></div><p>Loading your submitted surveys\u2026`);
28370
28847
  var MODE_LABELS = {
28371
28848
  initial: "Intake questionnaire",
@@ -28394,7 +28871,7 @@ function SurveyHistory() {
28394
28871
  return !list.error;
28395
28872
  },
28396
28873
  get fallback() {
28397
- return _tmpl$2136();
28874
+ return _tmpl$2138();
28398
28875
  },
28399
28876
  get children() {
28400
28877
  return createComponent(Show, {
@@ -28402,16 +28879,16 @@ function SurveyHistory() {
28402
28879
  return (list() ?? []).length > 0;
28403
28880
  },
28404
28881
  get fallback() {
28405
- return _tmpl$3118();
28882
+ return _tmpl$3120();
28406
28883
  },
28407
28884
  get children() {
28408
- var _el$ = _tmpl$488();
28885
+ var _el$ = _tmpl$495();
28409
28886
  insert(_el$, createComponent(For, {
28410
28887
  get each() {
28411
28888
  return list();
28412
28889
  },
28413
28890
  children: (item) => (() => {
28414
- var _el$4 = _tmpl$489(), _el$5 = _el$4.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling;
28891
+ var _el$4 = _tmpl$496(), _el$5 = _el$4.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling;
28415
28892
  _el$5.$$click = () => setSelectedId(item.id);
28416
28893
  insert(_el$6, () => MODE_LABELS[item.mode] ?? "Questionnaire");
28417
28894
  insert(_el$7, () => formatDate3(item.submittedAt) ?? "Date unavailable");
@@ -28424,14 +28901,14 @@ function SurveyHistory() {
28424
28901
  }
28425
28902
  });
28426
28903
  const DetailView = () => (() => {
28427
- var _el$8 = _tmpl$569(), _el$9 = _el$8.firstChild;
28904
+ var _el$8 = _tmpl$570(), _el$9 = _el$8.firstChild;
28428
28905
  _el$9.$$click = () => setSelectedId(null);
28429
28906
  insert(_el$8, createComponent(Show, {
28430
28907
  get when() {
28431
28908
  return !detail.loading;
28432
28909
  },
28433
28910
  get fallback() {
28434
- return _tmpl$665();
28911
+ return _tmpl$666();
28435
28912
  },
28436
28913
  get children() {
28437
28914
  return createComponent(Show, {
@@ -28439,10 +28916,10 @@ function SurveyHistory() {
28439
28916
  return memo(() => !!!detail.error)() && detail();
28440
28917
  },
28441
28918
  get fallback() {
28442
- return _tmpl$753();
28919
+ return _tmpl$755();
28443
28920
  },
28444
28921
  children: (t) => (() => {
28445
- var _el$10 = _tmpl$846(), _el$11 = _el$10.firstChild, _el$12 = _el$11.firstChild, _el$13 = _el$12.nextSibling, _el$14 = _el$13.firstChild, _el$16 = _el$14.nextSibling; _el$16.nextSibling;
28922
+ var _el$10 = _tmpl$847(), _el$11 = _el$10.firstChild, _el$12 = _el$11.firstChild, _el$13 = _el$12.nextSibling, _el$14 = _el$13.firstChild, _el$16 = _el$14.nextSibling; _el$16.nextSibling;
28446
28923
  insert(_el$12, () => MODE_LABELS[t().mode] ?? "Questionnaire");
28447
28924
  insert(_el$13, () => formatDate3(t().completedAt ?? t().createdAt) ?? "\u2014", _el$16);
28448
28925
  insert(_el$10, createComponent(For, {
@@ -28450,14 +28927,14 @@ function SurveyHistory() {
28450
28927
  return t().sections;
28451
28928
  },
28452
28929
  children: (section) => (() => {
28453
- var _el$17 = _tmpl$943(), _el$18 = _el$17.firstChild;
28930
+ var _el$17 = _tmpl$944(), _el$18 = _el$17.firstChild;
28454
28931
  insert(_el$18, () => section.title);
28455
28932
  insert(_el$17, createComponent(For, {
28456
28933
  get each() {
28457
28934
  return section.items;
28458
28935
  },
28459
28936
  children: (item) => (() => {
28460
- var _el$19 = _tmpl$039(), _el$20 = _el$19.firstChild, _el$21 = _el$20.nextSibling;
28937
+ var _el$19 = _tmpl$040(), _el$20 = _el$19.firstChild, _el$21 = _el$20.nextSibling;
28461
28938
  insert(_el$20, () => item.question);
28462
28939
  insert(_el$21, () => item.answer);
28463
28940
  return _el$19;
@@ -28474,7 +28951,7 @@ function SurveyHistory() {
28474
28951
  return _el$8;
28475
28952
  })();
28476
28953
  return (() => {
28477
- var _el$22 = _tmpl$1141();
28954
+ var _el$22 = _tmpl$1142();
28478
28955
  insert(_el$22, createComponent(Show, {
28479
28956
  get when() {
28480
28957
  return !list.loading || selectedId();
@@ -28502,19 +28979,19 @@ function SurveyHistory() {
28502
28979
  delegateEvents(["click"]);
28503
28980
 
28504
28981
  // src/pages/MemberPortal.tsx
28505
- var _tmpl$490 = /* @__PURE__ */ template(`<span class=portal-item__live aria-label="In progress">`);
28506
- var _tmpl$2137 = /* @__PURE__ */ template(`<span>`);
28507
- var _tmpl$3119 = /* @__PURE__ */ template(`<button type=button><i aria-hidden=true></i><span class=portal-item__label>`);
28508
- var _tmpl$491 = /* @__PURE__ */ template(`<div class=rx-others data-testid=rx-others><span class=lab-label>Other orders`);
28509
- var _tmpl$570 = /* @__PURE__ */ template(`<div class=rx-stack>`);
28510
- var _tmpl$666 = /* @__PURE__ */ template(`<div class=portal-state><div class=request-status__spinner></div><p>Loading your portal\u2026`);
28511
- var _tmpl$754 = /* @__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`);
28512
- var _tmpl$847 = /* @__PURE__ */ template(`<p class=portal-rail__hi>Hi, `);
28513
- var _tmpl$944 = /* @__PURE__ */ template(`<a class=portal-rail__back data-testid=rail-back>\u2190 Back to shop`);
28514
- var _tmpl$040 = /* @__PURE__ */ template(`<a class=portal-topbar-back data-testid=mobile-back><span aria-hidden=true>\u2190</span> Back to shop`);
28515
- var _tmpl$1142 = /* @__PURE__ */ template(`<main class=portal data-testid=member-portal><aside class=portal-rail><div class=portal-rail__brand><a class=portal-rail__logo></a><span class=portal-rail__dot aria-hidden=true></span></div><nav class=portal-rail__nav aria-label="Portal sections"></nav><div class=portal-rail__foot><button type=button class=portal-rail__signout>\u2014 Sign out</button></div></aside><section class=portal-content><div></div></section><nav class=portal-tabs aria-label="Portal sections">`);
28982
+ var _tmpl$497 = /* @__PURE__ */ template(`<span class=portal-item__live aria-label="In progress">`);
28983
+ var _tmpl$2139 = /* @__PURE__ */ template(`<span>`);
28984
+ var _tmpl$3121 = /* @__PURE__ */ template(`<button type=button><i aria-hidden=true></i><span class=portal-item__label>`);
28985
+ var _tmpl$498 = /* @__PURE__ */ template(`<div class=rx-others data-testid=rx-others><span class=lab-label>Other orders`);
28986
+ var _tmpl$571 = /* @__PURE__ */ template(`<div class=rx-stack>`);
28987
+ var _tmpl$667 = /* @__PURE__ */ template(`<div class=portal-state><div class=request-status__spinner></div><p>Loading your portal\u2026`);
28988
+ var _tmpl$756 = /* @__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`);
28989
+ var _tmpl$848 = /* @__PURE__ */ template(`<p class=portal-rail__hi>Hi, `);
28990
+ var _tmpl$945 = /* @__PURE__ */ template(`<a class=portal-rail__back data-testid=rail-back>\u2190 Back to shop`);
28991
+ var _tmpl$041 = /* @__PURE__ */ template(`<a class=portal-topbar-back data-testid=mobile-back><span aria-hidden=true>\u2190</span> Back to shop`);
28992
+ var _tmpl$1143 = /* @__PURE__ */ template(`<main class=portal data-testid=member-portal><aside class=portal-rail><div class=portal-rail__brand><a class=portal-rail__logo></a><span class=portal-rail__dot aria-hidden=true></span></div><nav class=portal-rail__nav aria-label="Portal sections"></nav><div class=portal-rail__foot><button type=button class=portal-rail__signout>\u2014 Sign out</button></div></aside><section class=portal-content><div></div></section><nav class=portal-tabs aria-label="Portal sections">`);
28516
28993
  var _tmpl$1032 = /* @__PURE__ */ template(`<span class=portal-rail__wordmark>`);
28517
- var _tmpl$1143 = /* @__PURE__ */ template(`<img>`);
28994
+ var _tmpl$1144 = /* @__PURE__ */ template(`<img>`);
28518
28995
  var ICONS = {
28519
28996
  tracker: "ph-thin ph-path",
28520
28997
  instructions: "ph-thin ph-first-aid-kit",
@@ -28641,7 +29118,7 @@ function MemberPortal(props) {
28641
29118
  return tabs();
28642
29119
  },
28643
29120
  children: (item) => (() => {
28644
- var _el$ = _tmpl$3119(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling;
29121
+ var _el$ = _tmpl$3121(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling;
28645
29122
  _el$.$$click = () => selectTab(item.key);
28646
29123
  insert(_el$3, () => item.label);
28647
29124
  insert(_el$, createComponent(Show, {
@@ -28649,7 +29126,7 @@ function MemberPortal(props) {
28649
29126
  return memo(() => item.key === "tracker")() && inMotion();
28650
29127
  },
28651
29128
  get children() {
28652
- return _tmpl$490();
29129
+ return _tmpl$497();
28653
29130
  }
28654
29131
  }), null);
28655
29132
  insert(_el$, createComponent(Show, {
@@ -28657,7 +29134,7 @@ function MemberPortal(props) {
28657
29134
  return memo(() => item.key === "messages")() && unreadTotal() > 0;
28658
29135
  },
28659
29136
  get children() {
28660
- var _el$5 = _tmpl$2137();
29137
+ var _el$5 = _tmpl$2139();
28661
29138
  insert(_el$5, (() => {
28662
29139
  var _c$ = memo(() => unreadTotal() > 99);
28663
29140
  return () => _c$() ? "99+" : unreadTotal();
@@ -28715,7 +29192,7 @@ function MemberPortal(props) {
28715
29192
  });
28716
29193
  },
28717
29194
  children: (primary) => (() => {
28718
- var _el$6 = _tmpl$570();
29195
+ var _el$6 = _tmpl$571();
28719
29196
  insert(_el$6, createComponent(OrderTracker, {
28720
29197
  get request() {
28721
29198
  return data.toTrackerRequest(primary());
@@ -28745,7 +29222,7 @@ function MemberPortal(props) {
28745
29222
  return data.otherRx().length > 0;
28746
29223
  },
28747
29224
  get children() {
28748
- var _el$7 = _tmpl$491(); _el$7.firstChild;
29225
+ var _el$7 = _tmpl$498(); _el$7.firstChild;
28749
29226
  insert(_el$7, createComponent(For, {
28750
29227
  get each() {
28751
29228
  return data.otherRx();
@@ -28781,7 +29258,7 @@ function MemberPortal(props) {
28781
29258
  return !data.loading();
28782
29259
  },
28783
29260
  get fallback() {
28784
- return _tmpl$666();
29261
+ return _tmpl$667();
28785
29262
  },
28786
29263
  get children() {
28787
29264
  return createComponent(Show, {
@@ -28790,7 +29267,7 @@ function MemberPortal(props) {
28790
29267
  },
28791
29268
  get fallback() {
28792
29269
  return (() => {
28793
- var _el$0 = _tmpl$754(), _el$1 = _el$0.firstChild, _el$10 = _el$1.nextSibling;
29270
+ var _el$0 = _tmpl$756(), _el$1 = _el$0.firstChild, _el$10 = _el$1.nextSibling;
28794
29271
  insert(_el$1, () => data.error());
28795
29272
  _el$10.$$click = () => data.refetch();
28796
29273
  return _el$0;
@@ -28887,7 +29364,7 @@ function MemberPortal(props) {
28887
29364
  }
28888
29365
  });
28889
29366
  return (() => {
28890
- var _el$11 = _tmpl$1142(), _el$12 = _el$11.firstChild, _el$13 = _el$12.firstChild, _el$14 = _el$13.firstChild, _el$17 = _el$13.nextSibling, _el$18 = _el$17.nextSibling, _el$20 = _el$18.firstChild, _el$22 = _el$12.nextSibling, _el$23 = _el$22.firstChild, _el$24 = _el$22.nextSibling;
29367
+ var _el$11 = _tmpl$1143(), _el$12 = _el$11.firstChild, _el$13 = _el$12.firstChild, _el$14 = _el$13.firstChild, _el$17 = _el$13.nextSibling, _el$18 = _el$17.nextSibling, _el$20 = _el$18.firstChild, _el$22 = _el$12.nextSibling, _el$23 = _el$22.firstChild, _el$24 = _el$22.nextSibling;
28891
29368
  insert(_el$14, createComponent(Show, {
28892
29369
  get when() {
28893
29370
  return props.brand.logoSrc;
@@ -28900,7 +29377,7 @@ function MemberPortal(props) {
28900
29377
  })();
28901
29378
  },
28902
29379
  children: (src) => (() => {
28903
- var _el$26 = _tmpl$1143();
29380
+ var _el$26 = _tmpl$1144();
28904
29381
  effect((_p$) => {
28905
29382
  var _v$8 = src(), _v$9 = props.brand.name;
28906
29383
  _v$8 !== _p$.e && setAttribute(_el$26, "src", _p$.e = _v$8);
@@ -28918,7 +29395,7 @@ function MemberPortal(props) {
28918
29395
  return data.firstName() !== "Member";
28919
29396
  },
28920
29397
  get children() {
28921
- var _el$15 = _tmpl$847(); _el$15.firstChild;
29398
+ var _el$15 = _tmpl$848(); _el$15.firstChild;
28922
29399
  insert(_el$15, () => data.firstName(), null);
28923
29400
  return _el$15;
28924
29401
  }
@@ -28931,7 +29408,7 @@ function MemberPortal(props) {
28931
29408
  return showBackLink();
28932
29409
  },
28933
29410
  get children() {
28934
- var _el$19 = _tmpl$944();
29411
+ var _el$19 = _tmpl$945();
28935
29412
  effect(() => setAttribute(_el$19, "href", catalogHref()));
28936
29413
  return _el$19;
28937
29414
  }
@@ -28942,7 +29419,7 @@ function MemberPortal(props) {
28942
29419
  return showBackLink();
28943
29420
  },
28944
29421
  get children() {
28945
- var _el$21 = _tmpl$040();
29422
+ var _el$21 = _tmpl$041();
28946
29423
  effect(() => setAttribute(_el$21, "href", catalogHref()));
28947
29424
  return _el$21;
28948
29425
  }
@@ -28968,11 +29445,11 @@ function MemberPortal(props) {
28968
29445
  })();
28969
29446
  }
28970
29447
  delegateEvents(["click"]);
28971
- var _tmpl$495 = /* @__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.`);
28972
- var _tmpl$2138 = /* @__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`);
28973
- var _tmpl$3120 = /* @__PURE__ */ template(`<div style=color:var(--app-affiliate-fg-muted)>Loading stats\u2026`);
28974
- var _tmpl$496 = /* @__PURE__ */ template(`<div style="display:grid;grid-template-columns:repeat(auto-fit, minmax(180px, 1fr));gap:1rem">`);
28975
- var _tmpl$571 = /* @__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)>`);
29448
+ var _tmpl$499 = /* @__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.`);
29449
+ var _tmpl$2140 = /* @__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`);
29450
+ var _tmpl$3122 = /* @__PURE__ */ template(`<div style=color:var(--app-affiliate-fg-muted)>Loading stats\u2026`);
29451
+ var _tmpl$4100 = /* @__PURE__ */ template(`<div style="display:grid;grid-template-columns:repeat(auto-fit, minmax(180px, 1fr));gap:1rem">`);
29452
+ var _tmpl$574 = /* @__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)>`);
28976
29453
  function formatMoney(cents) {
28977
29454
  return `$${(cents / 100).toFixed(2)}`;
28978
29455
  }
@@ -29005,13 +29482,13 @@ function AffiliateOverview() {
29005
29482
  value: `${(s.conversionRate * 100).toFixed(1)}%`
29006
29483
  }];
29007
29484
  return (() => {
29008
- var _el$ = _tmpl$2138(); _el$.firstChild;
29485
+ var _el$ = _tmpl$2140(); _el$.firstChild;
29009
29486
  insert(_el$, createComponent(Show, {
29010
29487
  get when() {
29011
29488
  return isPending();
29012
29489
  },
29013
29490
  get children() {
29014
- return _tmpl$495();
29491
+ return _tmpl$499();
29015
29492
  }
29016
29493
  }), null);
29017
29494
  insert(_el$, createComponent(Show, {
@@ -29019,16 +29496,16 @@ function AffiliateOverview() {
29019
29496
  return stats();
29020
29497
  },
29021
29498
  get fallback() {
29022
- return _tmpl$3120();
29499
+ return _tmpl$3122();
29023
29500
  },
29024
29501
  children: (s) => (() => {
29025
- var _el$5 = _tmpl$496();
29502
+ var _el$5 = _tmpl$4100();
29026
29503
  insert(_el$5, createComponent(For, {
29027
29504
  get each() {
29028
29505
  return cards(s());
29029
29506
  },
29030
29507
  children: (card) => (() => {
29031
- var _el$6 = _tmpl$571(), _el$7 = _el$6.firstChild, _el$8 = _el$7.nextSibling;
29508
+ var _el$6 = _tmpl$574(), _el$7 = _el$6.firstChild, _el$8 = _el$7.nextSibling;
29032
29509
  insert(_el$7, () => card.label);
29033
29510
  insert(_el$8, () => card.value);
29034
29511
  return _el$6;
@@ -29040,11 +29517,11 @@ function AffiliateOverview() {
29040
29517
  return _el$;
29041
29518
  })();
29042
29519
  }
29043
- var _tmpl$497 = /* @__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>`);
29044
- var _tmpl$2139 = /* @__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`);
29045
- var _tmpl$3121 = /* @__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.`);
29046
- var _tmpl$498 = /* @__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`);
29047
- var _tmpl$574 = /* @__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">`);
29520
+ var _tmpl$500 = /* @__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>`);
29521
+ var _tmpl$2141 = /* @__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`);
29522
+ var _tmpl$3123 = /* @__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.`);
29523
+ var _tmpl$4101 = /* @__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`);
29524
+ var _tmpl$575 = /* @__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">`);
29048
29525
  function formatMoney2(cents) {
29049
29526
  return `$${(cents / 100).toFixed(2)}`;
29050
29527
  }
@@ -29082,22 +29559,22 @@ function AffiliateConversions() {
29082
29559
  limit: 100
29083
29560
  });
29084
29561
  return (() => {
29085
- var _el$ = _tmpl$2139(); _el$.firstChild;
29562
+ var _el$ = _tmpl$2141(); _el$.firstChild;
29086
29563
  insert(_el$, createComponent(Show, {
29087
29564
  get when() {
29088
29565
  return (conversions() ?? []).length > 0;
29089
29566
  },
29090
29567
  get fallback() {
29091
- return _tmpl$3121();
29568
+ return _tmpl$3123();
29092
29569
  },
29093
29570
  get children() {
29094
- var _el$3 = _tmpl$497(), _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;
29571
+ var _el$3 = _tmpl$500(), _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;
29095
29572
  insert(_el$10, createComponent(For, {
29096
29573
  get each() {
29097
29574
  return conversions();
29098
29575
  },
29099
29576
  children: (c) => (() => {
29100
- var _el$12 = _tmpl$574(), _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;
29577
+ var _el$12 = _tmpl$575(), _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;
29101
29578
  insert(_el$13, () => formatDate4(c.createdAt));
29102
29579
  insert(_el$14, () => c.paymentType, null);
29103
29580
  insert(_el$14, createComponent(Show, {
@@ -29105,7 +29582,7 @@ function AffiliateConversions() {
29105
29582
  return c.tier === 2;
29106
29583
  },
29107
29584
  get children() {
29108
- return _tmpl$498();
29585
+ return _tmpl$4101();
29109
29586
  }
29110
29587
  }), null);
29111
29588
  insert(_el$16, () => formatMoney2(c.orderTotalCents));
@@ -29176,10 +29653,10 @@ function td() {
29176
29653
  color: "var(--app-affiliate-fg)"
29177
29654
  };
29178
29655
  }
29179
- var _tmpl$499 = /* @__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>`);
29180
- var _tmpl$2140 = /* @__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.`);
29181
- var _tmpl$3122 = /* @__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.`);
29182
- var _tmpl$4100 = /* @__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>`);
29656
+ var _tmpl$501 = /* @__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>`);
29657
+ var _tmpl$2142 = /* @__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.`);
29658
+ var _tmpl$3124 = /* @__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.`);
29659
+ var _tmpl$4102 = /* @__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>`);
29183
29660
  function formatDate5(iso) {
29184
29661
  const d = new Date(iso);
29185
29662
  if (Number.isNaN(d.getTime())) return iso;
@@ -29212,22 +29689,22 @@ function AffiliateDownline() {
29212
29689
  downline
29213
29690
  } = useAffiliateDownline();
29214
29691
  return (() => {
29215
- var _el$ = _tmpl$2140(), _el$2 = _el$.firstChild; _el$2.nextSibling;
29692
+ var _el$ = _tmpl$2142(), _el$2 = _el$.firstChild; _el$2.nextSibling;
29216
29693
  insert(_el$, createComponent(Show, {
29217
29694
  get when() {
29218
29695
  return (downline() ?? []).length > 0;
29219
29696
  },
29220
29697
  get fallback() {
29221
- return _tmpl$3122();
29698
+ return _tmpl$3124();
29222
29699
  },
29223
29700
  get children() {
29224
- var _el$4 = _tmpl$499(), _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;
29701
+ var _el$4 = _tmpl$501(), _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;
29225
29702
  insert(_el$10, createComponent(For, {
29226
29703
  get each() {
29227
29704
  return downline();
29228
29705
  },
29229
29706
  children: (d) => (() => {
29230
- var _el$12 = _tmpl$4100(), _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;
29707
+ var _el$12 = _tmpl$4102(), _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;
29231
29708
  insert(_el$13, () => d.affiliateCode);
29232
29709
  insert(_el$14, () => [d.firstName, d.lastName].filter(Boolean).join(" ") || "\u2014");
29233
29710
  insert(_el$16, () => d.status);
@@ -29290,9 +29767,9 @@ function td2() {
29290
29767
  color: "var(--app-affiliate-fg)"
29291
29768
  };
29292
29769
  }
29293
- var _tmpl$500 = /* @__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.`);
29294
- var _tmpl$2141 = /* @__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`);
29295
- var _tmpl$3123 = /* @__PURE__ */ template(`<div style=color:var(--app-affiliate-fg-muted)>Your referral link will appear here once your account is approved.`);
29770
+ var _tmpl$505 = /* @__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.`);
29771
+ var _tmpl$2143 = /* @__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`);
29772
+ var _tmpl$3125 = /* @__PURE__ */ template(`<div style=color:var(--app-affiliate-fg-muted)>Your referral link will appear here once your account is approved.`);
29296
29773
  function AffiliateReferralLink() {
29297
29774
  const {
29298
29775
  links
@@ -29317,16 +29794,16 @@ function AffiliateReferralLink() {
29317
29794
  }
29318
29795
  }
29319
29796
  return (() => {
29320
- var _el$ = _tmpl$2141(); _el$.firstChild;
29797
+ var _el$ = _tmpl$2143(); _el$.firstChild;
29321
29798
  insert(_el$, createComponent(Show, {
29322
29799
  get when() {
29323
29800
  return homepageLink();
29324
29801
  },
29325
29802
  get fallback() {
29326
- return _tmpl$3123();
29803
+ return _tmpl$3125();
29327
29804
  },
29328
29805
  get children() {
29329
- var _el$3 = _tmpl$500(), _el$4 = _el$3.firstChild, _el$5 = _el$4.nextSibling, _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling; _el$5.nextSibling;
29806
+ var _el$3 = _tmpl$505(), _el$4 = _el$3.firstChild, _el$5 = _el$4.nextSibling, _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling; _el$5.nextSibling;
29330
29807
  insert(_el$6, homepageLink);
29331
29808
  _el$7.$$click = copy;
29332
29809
  insert(_el$7, () => copied() ? "Copied" : "Copy");
@@ -29337,10 +29814,10 @@ function AffiliateReferralLink() {
29337
29814
  })();
29338
29815
  }
29339
29816
  delegateEvents(["click"]);
29340
- var _tmpl$501 = /* @__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.`);
29341
- var _tmpl$2142 = /* @__PURE__ */ template(`<div style=color:var(--app-affiliate-fg-muted)>Loading\u2026`);
29342
- var _tmpl$3124 = /* @__PURE__ */ template(`<div style="background:var(--app-affiliate-surface);border:1px solid var(--app-affiliate-border);border-radius:var(--app-affiliate-radius);overflow:hidden">`);
29343
- var _tmpl$4101 = /* @__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)>`);
29817
+ var _tmpl$506 = /* @__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.`);
29818
+ var _tmpl$2144 = /* @__PURE__ */ template(`<div style=color:var(--app-affiliate-fg-muted)>Loading\u2026`);
29819
+ var _tmpl$3126 = /* @__PURE__ */ template(`<div style="background:var(--app-affiliate-surface);border:1px solid var(--app-affiliate-border);border-radius:var(--app-affiliate-radius);overflow:hidden">`);
29820
+ var _tmpl$4103 = /* @__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)>`);
29344
29821
  var STATUS_LABEL2 = {
29345
29822
  pending: "Pending approval",
29346
29823
  active: "Active",
@@ -29375,22 +29852,22 @@ function AffiliateSettings() {
29375
29852
  value: a.paymentEmail ?? "\u2014"
29376
29853
  }];
29377
29854
  return (() => {
29378
- var _el$ = _tmpl$501(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling, _el$4 = _el$3.firstChild; _el$3.nextSibling;
29855
+ var _el$ = _tmpl$506(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling, _el$4 = _el$3.firstChild; _el$3.nextSibling;
29379
29856
  insert(_el$, createComponent(Show, {
29380
29857
  get when() {
29381
29858
  return affiliate();
29382
29859
  },
29383
29860
  get fallback() {
29384
- return _tmpl$2142();
29861
+ return _tmpl$2144();
29385
29862
  },
29386
29863
  children: (a) => (() => {
29387
- var _el$7 = _tmpl$3124();
29864
+ var _el$7 = _tmpl$3126();
29388
29865
  insert(_el$7, createComponent(For, {
29389
29866
  get each() {
29390
29867
  return rows(a());
29391
29868
  },
29392
29869
  children: (row) => (() => {
29393
- var _el$8 = _tmpl$4101(), _el$9 = _el$8.firstChild, _el$0 = _el$9.nextSibling;
29870
+ var _el$8 = _tmpl$4103(), _el$9 = _el$8.firstChild, _el$0 = _el$9.nextSibling;
29394
29871
  insert(_el$9, () => row.label);
29395
29872
  insert(_el$0, () => row.value);
29396
29873
  return _el$8;
@@ -29406,10 +29883,10 @@ function AffiliateSettings() {
29406
29883
  delegateEvents(["click"]);
29407
29884
 
29408
29885
  // src/pages/AffiliatePortal.tsx
29409
- var _tmpl$505 = /* @__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>`);
29410
- var _tmpl$2143 = /* @__PURE__ */ template(`<span style=font-size:1rem;opacity:0.7;flex-shrink:0>`);
29411
- var _tmpl$3125 = /* @__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">`);
29412
- var _tmpl$4102 = /* @__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); } }`);
29886
+ var _tmpl$507 = /* @__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>`);
29887
+ var _tmpl$2145 = /* @__PURE__ */ template(`<span style=font-size:1rem;opacity:0.7;flex-shrink:0>`);
29888
+ var _tmpl$3127 = /* @__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">`);
29889
+ var _tmpl$4104 = /* @__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); } }`);
29413
29890
  var TAB_LABELS2 = {
29414
29891
  overview: "Overview",
29415
29892
  conversions: "Conversions",
@@ -29454,7 +29931,7 @@ function AffiliatePortal(props) {
29454
29931
  });
29455
29932
  },
29456
29933
  get children() {
29457
- var _el$ = _tmpl$505(), _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;
29934
+ var _el$ = _tmpl$507(), _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;
29458
29935
  _el$3.$$click = () => setDrawerOpen(true);
29459
29936
  insert(_el$4, () => TAB_LABELS2[currentTab()]);
29460
29937
  _el$5.$$click = () => setDrawerOpen(false);
@@ -29463,14 +29940,14 @@ function AffiliatePortal(props) {
29463
29940
  return orderedTabs();
29464
29941
  },
29465
29942
  children: (tab) => (() => {
29466
- var _el$1 = _tmpl$3125();
29943
+ var _el$1 = _tmpl$3127();
29467
29944
  _el$1.$$click = () => handleTabClick(tab);
29468
29945
  insert(_el$1, createComponent(Show, {
29469
29946
  get when() {
29470
29947
  return props.tabIcons?.[tab];
29471
29948
  },
29472
29949
  get children() {
29473
- var _el$10 = _tmpl$2143();
29950
+ var _el$10 = _tmpl$2145();
29474
29951
  effect(() => className(_el$10, props.tabIcons[tab]));
29475
29952
  return _el$10;
29476
29953
  }
@@ -29552,7 +30029,7 @@ function AffiliatePortal(props) {
29552
30029
  }
29553
30030
  function AffiliateGateSpinner(props) {
29554
30031
  return (() => {
29555
- var _el$11 = _tmpl$4102(); _el$11.firstChild;
30032
+ var _el$11 = _tmpl$4104(); _el$11.firstChild;
29556
30033
  effect((_p$) => {
29557
30034
  var _v$8 = props.topOffset, _v$9 = `calc(100vh - ${props.topOffset})`;
29558
30035
  _v$8 !== _p$.e && setStyleProperty(_el$11, "top", _p$.e = _v$8);
@@ -29566,16 +30043,16 @@ function AffiliateGateSpinner(props) {
29566
30043
  })();
29567
30044
  }
29568
30045
  delegateEvents(["click"]);
29569
- var _tmpl$506 = /* @__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">`);
30046
+ var _tmpl$508 = /* @__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">`);
29570
30047
  function AffiliatePasswordInput(props) {
29571
30048
  const [visible, setVisible] = createSignal(false);
29572
30049
  return (() => {
29573
- var _el$ = _tmpl$506(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling;
30050
+ var _el$ = _tmpl$508(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling;
29574
30051
  _el$2.$$input = (e) => props.onInput(e.currentTarget.value);
29575
30052
  _el$3.$$click = () => setVisible((v) => !v);
29576
30053
  insert(_el$3, () => visible() ? "Hide" : "Show");
29577
30054
  effect((_p$) => {
29578
- var _v$ = visible() ? "text" : "password", _v$2 = props.required, _v$3 = props.minLength, _v$4 = props.autocomplete, _v$5 = inputStyle(), _v$6 = visible() ? "Hide password" : "Show password";
30055
+ var _v$ = visible() ? "text" : "password", _v$2 = props.required, _v$3 = props.minLength, _v$4 = props.autocomplete, _v$5 = inputStyle2(), _v$6 = visible() ? "Hide password" : "Show password";
29579
30056
  _v$ !== _p$.e && setAttribute(_el$2, "type", _p$.e = _v$);
29580
30057
  _v$2 !== _p$.t && (_el$2.required = _p$.t = _v$2);
29581
30058
  _v$3 !== _p$.a && setAttribute(_el$2, "minlength", _p$.a = _v$3);
@@ -29595,7 +30072,7 @@ function AffiliatePasswordInput(props) {
29595
30072
  return _el$;
29596
30073
  })();
29597
30074
  }
29598
- function inputStyle() {
30075
+ function inputStyle2() {
29599
30076
  return {
29600
30077
  width: "100%",
29601
30078
  padding: "0.625rem 2.9rem 0.625rem 0.75rem",
@@ -29611,17 +30088,17 @@ function inputStyle() {
29611
30088
  delegateEvents(["input", "click"]);
29612
30089
 
29613
30090
  // src/pages/AffiliateRegister.tsx
29614
- var _tmpl$507 = /* @__PURE__ */ template(`<input type=text required autocomplete=given-name>`);
29615
- var _tmpl$2144 = /* @__PURE__ */ template(`<input type=text required autocomplete=family-name>`);
29616
- var _tmpl$3126 = /* @__PURE__ */ template(`<input type=email required autocomplete=email>`);
29617
- var _tmpl$4103 = /* @__PURE__ */ template(`<input type=text required minlength=4>`);
29618
- var _tmpl$575 = /* @__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">`);
29619
- var _tmpl$667 = /* @__PURE__ */ template(`<button type=button>Already have an account? Log in`);
29620
- var _tmpl$755 = /* @__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">`);
29621
- var _tmpl$848 = /* @__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.`);
29622
- var _tmpl$945 = /* @__PURE__ */ template(`<div style=padding:1rem;background:var(--app-affiliate-success-bg);color:var(--app-affiliate-success-fg);border-radius:var(--app-affiliate-radius-sm);font-size:0.875rem>Thanks \u2014 we received your application. You'll be able to log in once it's approved.`);
29623
- var _tmpl$041 = /* @__PURE__ */ template(`<span style=font-size:0.75rem;color:var(--app-affiliate-fg-subtle)>`);
29624
- var _tmpl$1144 = /* @__PURE__ */ template(`<label style=display:flex;flex-direction:column;gap:0.35rem><span style=font-size:0.75rem;text-transform:uppercase;letter-spacing:0.05em;color:var(--app-affiliate-fg-muted)>`);
30091
+ var _tmpl$509 = /* @__PURE__ */ template(`<input type=text required autocomplete=given-name>`);
30092
+ var _tmpl$2146 = /* @__PURE__ */ template(`<input type=text required autocomplete=family-name>`);
30093
+ var _tmpl$3128 = /* @__PURE__ */ template(`<input type=email required autocomplete=email>`);
30094
+ var _tmpl$4105 = /* @__PURE__ */ template(`<input type=text required minlength=4>`);
30095
+ var _tmpl$576 = /* @__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">`);
30096
+ var _tmpl$668 = /* @__PURE__ */ template(`<button type=button>Already have an account? Log in`);
30097
+ var _tmpl$757 = /* @__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">`);
30098
+ var _tmpl$849 = /* @__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.`);
30099
+ var _tmpl$946 = /* @__PURE__ */ template(`<div style=padding:1rem;background:var(--app-affiliate-success-bg);color:var(--app-affiliate-success-fg);border-radius:var(--app-affiliate-radius-sm);font-size:0.875rem>Thanks \u2014 we received your application. You'll be able to log in once it's approved.`);
30100
+ var _tmpl$042 = /* @__PURE__ */ template(`<span style=font-size:0.75rem;color:var(--app-affiliate-fg-subtle)>`);
30101
+ var _tmpl$1145 = /* @__PURE__ */ template(`<label style=display:flex;flex-direction:column;gap:0.35rem><span style=font-size:0.75rem;text-transform:uppercase;letter-spacing:0.05em;color:var(--app-affiliate-fg-muted)>`);
29625
30102
  function AffiliateRegister(props) {
29626
30103
  const [firstName, setFirstName] = createSignal("");
29627
30104
  const [lastName, setLastName] = createSignal("");
@@ -29652,23 +30129,23 @@ function AffiliateRegister(props) {
29652
30129
  }
29653
30130
  }
29654
30131
  return (() => {
29655
- var _el$ = _tmpl$848(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild; _el$4.nextSibling;
30132
+ var _el$ = _tmpl$849(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild; _el$4.nextSibling;
29656
30133
  insert(_el$2, createComponent(Show, {
29657
30134
  get when() {
29658
30135
  return !submitted();
29659
30136
  },
29660
30137
  get fallback() {
29661
- return _tmpl$945();
30138
+ return _tmpl$946();
29662
30139
  },
29663
30140
  get children() {
29664
- var _el$6 = _tmpl$755(), _el$1 = _el$6.firstChild, _el$10 = _el$1.firstChild, _el$12 = _el$10.nextSibling; _el$12.firstChild; var _el$14 = _el$12.nextSibling, _el$15 = _el$14.nextSibling, _el$16 = _el$15.firstChild, _el$18 = _el$1.nextSibling;
30141
+ var _el$6 = _tmpl$757(), _el$1 = _el$6.firstChild, _el$10 = _el$1.firstChild, _el$12 = _el$10.nextSibling; _el$12.firstChild; var _el$14 = _el$12.nextSibling, _el$15 = _el$14.nextSibling, _el$16 = _el$15.firstChild, _el$18 = _el$1.nextSibling;
29665
30142
  _el$6.addEventListener("submit", handleSubmit);
29666
30143
  insert(_el$6, createComponent(Row2, {
29667
30144
  label: "First name",
29668
30145
  get children() {
29669
- var _el$7 = _tmpl$507();
30146
+ var _el$7 = _tmpl$509();
29670
30147
  _el$7.$$input = (e) => setFirstName(e.currentTarget.value);
29671
- effect((_$p) => style(_el$7, inputStyle2(), _$p));
30148
+ effect((_$p) => style(_el$7, inputStyle3(), _$p));
29672
30149
  effect(() => _el$7.value = firstName());
29673
30150
  return _el$7;
29674
30151
  }
@@ -29676,9 +30153,9 @@ function AffiliateRegister(props) {
29676
30153
  insert(_el$6, createComponent(Row2, {
29677
30154
  label: "Last name",
29678
30155
  get children() {
29679
- var _el$8 = _tmpl$2144();
30156
+ var _el$8 = _tmpl$2146();
29680
30157
  _el$8.$$input = (e) => setLastName(e.currentTarget.value);
29681
- effect((_$p) => style(_el$8, inputStyle2(), _$p));
30158
+ effect((_$p) => style(_el$8, inputStyle3(), _$p));
29682
30159
  effect(() => _el$8.value = lastName());
29683
30160
  return _el$8;
29684
30161
  }
@@ -29686,9 +30163,9 @@ function AffiliateRegister(props) {
29686
30163
  insert(_el$6, createComponent(Row2, {
29687
30164
  label: "Email",
29688
30165
  get children() {
29689
- var _el$9 = _tmpl$3126();
30166
+ var _el$9 = _tmpl$3128();
29690
30167
  _el$9.$$input = (e) => setEmail(e.currentTarget.value);
29691
- effect((_$p) => style(_el$9, inputStyle2(), _$p));
30168
+ effect((_$p) => style(_el$9, inputStyle3(), _$p));
29692
30169
  effect(() => _el$9.value = email());
29693
30170
  return _el$9;
29694
30171
  }
@@ -29712,9 +30189,9 @@ function AffiliateRegister(props) {
29712
30189
  label: "Affiliate code",
29713
30190
  hint: "The handle in your referral URL (4+ characters)",
29714
30191
  get children() {
29715
- var _el$0 = _tmpl$4103();
30192
+ var _el$0 = _tmpl$4105();
29716
30193
  _el$0.$$input = (e) => setAffiliateCode(e.currentTarget.value);
29717
- effect((_$p) => style(_el$0, inputStyle2(), _$p));
30194
+ effect((_$p) => style(_el$0, inputStyle3(), _$p));
29718
30195
  effect(() => _el$0.value = affiliateCode());
29719
30196
  return _el$0;
29720
30197
  }
@@ -29727,7 +30204,7 @@ function AffiliateRegister(props) {
29727
30204
  return error();
29728
30205
  },
29729
30206
  get children() {
29730
- var _el$17 = _tmpl$575();
30207
+ var _el$17 = _tmpl$576();
29731
30208
  insert(_el$17, error);
29732
30209
  return _el$17;
29733
30210
  }
@@ -29738,7 +30215,7 @@ function AffiliateRegister(props) {
29738
30215
  return props.onNavigateLogin;
29739
30216
  },
29740
30217
  get children() {
29741
- var _el$19 = _tmpl$667();
30218
+ var _el$19 = _tmpl$668();
29742
30219
  _el$19.$$click = () => props.onNavigateLogin?.();
29743
30220
  effect((_$p) => style(_el$19, linkStyle(), _$p));
29744
30221
  return _el$19;
@@ -29763,7 +30240,7 @@ function AffiliateRegister(props) {
29763
30240
  }
29764
30241
  function Row2(props) {
29765
30242
  return (() => {
29766
- var _el$21 = _tmpl$1144(), _el$22 = _el$21.firstChild;
30243
+ var _el$21 = _tmpl$1145(), _el$22 = _el$21.firstChild;
29767
30244
  insert(_el$22, () => props.label);
29768
30245
  insert(_el$21, () => props.children, null);
29769
30246
  insert(_el$21, createComponent(Show, {
@@ -29771,7 +30248,7 @@ function Row2(props) {
29771
30248
  return props.hint;
29772
30249
  },
29773
30250
  get children() {
29774
- var _el$23 = _tmpl$041();
30251
+ var _el$23 = _tmpl$042();
29775
30252
  insert(_el$23, () => props.hint);
29776
30253
  return _el$23;
29777
30254
  }
@@ -29779,7 +30256,7 @@ function Row2(props) {
29779
30256
  return _el$21;
29780
30257
  })();
29781
30258
  }
29782
- function inputStyle2() {
30259
+ function inputStyle3() {
29783
30260
  return {
29784
30261
  width: "100%",
29785
30262
  padding: "0.625rem 0.75rem",
@@ -29805,10 +30282,10 @@ function linkStyle() {
29805
30282
  };
29806
30283
  }
29807
30284
  delegateEvents(["input", "click"]);
29808
- var _tmpl$508 = /* @__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">`);
29809
- var _tmpl$2145 = /* @__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?`);
29810
- var _tmpl$3127 = /* @__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`);
29811
- var _tmpl$4104 = /* @__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">`);
30285
+ var _tmpl$577 = /* @__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">`);
30286
+ var _tmpl$2147 = /* @__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?`);
30287
+ var _tmpl$3129 = /* @__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`);
30288
+ var _tmpl$4106 = /* @__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">`);
29812
30289
  function AffiliateLogin(props) {
29813
30290
  const [email, setEmail] = createSignal("");
29814
30291
  const [password, setPassword] = createSignal("");
@@ -29828,7 +30305,7 @@ function AffiliateLogin(props) {
29828
30305
  }
29829
30306
  }
29830
30307
  return (() => {
29831
- var _el$ = _tmpl$4104(), _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;
30308
+ var _el$ = _tmpl$4106(), _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;
29832
30309
  _el$4.addEventListener("submit", handleSubmit);
29833
30310
  _el$7.$$input = (e) => setEmail(e.currentTarget.value);
29834
30311
  insert(_el$8, createComponent(AffiliatePasswordInput, {
@@ -29844,7 +30321,7 @@ function AffiliateLogin(props) {
29844
30321
  return error();
29845
30322
  },
29846
30323
  get children() {
29847
- var _el$0 = _tmpl$508();
30324
+ var _el$0 = _tmpl$577();
29848
30325
  insert(_el$0, error);
29849
30326
  return _el$0;
29850
30327
  }
@@ -29855,7 +30332,7 @@ function AffiliateLogin(props) {
29855
30332
  return props.onNavigateForgotPassword;
29856
30333
  },
29857
30334
  get children() {
29858
- var _el$10 = _tmpl$2145();
30335
+ var _el$10 = _tmpl$2147();
29859
30336
  _el$10.$$click = () => props.onNavigateForgotPassword?.();
29860
30337
  return _el$10;
29861
30338
  }
@@ -29865,13 +30342,13 @@ function AffiliateLogin(props) {
29865
30342
  return props.onNavigateRegister;
29866
30343
  },
29867
30344
  get children() {
29868
- var _el$11 = _tmpl$3127();
30345
+ var _el$11 = _tmpl$3129();
29869
30346
  _el$11.$$click = () => props.onNavigateRegister?.();
29870
30347
  return _el$11;
29871
30348
  }
29872
30349
  }), null);
29873
30350
  effect((_p$) => {
29874
- var _v$ = labelStyle(), _v$2 = inputStyle3(), _v$3 = labelStyle(), _v$4 = submitting(), _v$5 = submitting() ? "not-allowed" : "pointer", _v$6 = submitting() ? 0.7 : 1;
30351
+ var _v$ = labelStyle2(), _v$2 = inputStyle4(), _v$3 = labelStyle2(), _v$4 = submitting(), _v$5 = submitting() ? "not-allowed" : "pointer", _v$6 = submitting() ? 0.7 : 1;
29875
30352
  _p$.e = style(_el$6, _v$, _p$.e);
29876
30353
  _p$.t = style(_el$7, _v$2, _p$.t);
29877
30354
  _p$.a = style(_el$9, _v$3, _p$.a);
@@ -29891,7 +30368,7 @@ function AffiliateLogin(props) {
29891
30368
  return _el$;
29892
30369
  })();
29893
30370
  }
29894
- function labelStyle() {
30371
+ function labelStyle2() {
29895
30372
  return {
29896
30373
  "font-size": "0.75rem",
29897
30374
  "text-transform": "uppercase",
@@ -29899,7 +30376,7 @@ function labelStyle() {
29899
30376
  color: "var(--app-affiliate-fg-muted)"
29900
30377
  };
29901
30378
  }
29902
- function inputStyle3() {
30379
+ function inputStyle4() {
29903
30380
  return {
29904
30381
  width: "100%",
29905
30382
  padding: "0.625rem 0.75rem",
@@ -29913,12 +30390,12 @@ function inputStyle3() {
29913
30390
  };
29914
30391
  }
29915
30392
  delegateEvents(["input", "click"]);
29916
- var _tmpl$509 = /* @__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">`);
29917
- var _tmpl$2146 = /* @__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">`);
29918
- var _tmpl$3128 = /* @__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`);
29919
- var _tmpl$4105 = /* @__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">`);
29920
- var _tmpl$576 = /* @__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.`);
29921
- var _tmpl$668 = /* @__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`);
30393
+ var _tmpl$578 = /* @__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">`);
30394
+ var _tmpl$2148 = /* @__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">`);
30395
+ var _tmpl$3130 = /* @__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`);
30396
+ var _tmpl$4107 = /* @__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">`);
30397
+ var _tmpl$579 = /* @__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.`);
30398
+ var _tmpl$669 = /* @__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`);
29922
30399
  function ForgotPasswordPage(props) {
29923
30400
  const [email, setEmail] = createSignal("");
29924
30401
  const [submitting, setSubmitting] = createSignal(false);
@@ -29941,29 +30418,29 @@ function ForgotPasswordPage(props) {
29941
30418
  }
29942
30419
  }
29943
30420
  return (() => {
29944
- var _el$ = _tmpl$3128(), _el$2 = _el$.firstChild; _el$2.firstChild;
30421
+ var _el$ = _tmpl$3130(), _el$2 = _el$.firstChild; _el$2.firstChild;
29945
30422
  insert(_el$2, createComponent(Show, {
29946
30423
  get when() {
29947
30424
  return !message();
29948
30425
  },
29949
30426
  get fallback() {
29950
30427
  return [(() => {
29951
- var _el$0 = _tmpl$4105();
30428
+ var _el$0 = _tmpl$4107();
29952
30429
  insert(_el$0, message);
29953
30430
  return _el$0;
29954
- })(), _tmpl$576(), createComponent(Show, {
30431
+ })(), _tmpl$579(), createComponent(Show, {
29955
30432
  get when() {
29956
30433
  return props.onDone;
29957
30434
  },
29958
30435
  get children() {
29959
- var _el$10 = _tmpl$668();
30436
+ var _el$10 = _tmpl$669();
29960
30437
  _el$10.$$click = () => props.onDone?.();
29961
30438
  return _el$10;
29962
30439
  }
29963
30440
  })];
29964
30441
  },
29965
30442
  get children() {
29966
- var _el$4 = _tmpl$2146(), _el$5 = _el$4.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling, _el$9 = _el$5.nextSibling;
30443
+ var _el$4 = _tmpl$2148(), _el$5 = _el$4.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling, _el$9 = _el$5.nextSibling;
29967
30444
  _el$4.addEventListener("submit", handleSubmit);
29968
30445
  _el$7.$$input = (e) => setEmail(e.currentTarget.value);
29969
30446
  insert(_el$4, createComponent(Show, {
@@ -29971,14 +30448,14 @@ function ForgotPasswordPage(props) {
29971
30448
  return error();
29972
30449
  },
29973
30450
  get children() {
29974
- var _el$8 = _tmpl$509();
30451
+ var _el$8 = _tmpl$578();
29975
30452
  insert(_el$8, error);
29976
30453
  return _el$8;
29977
30454
  }
29978
30455
  }), _el$9);
29979
30456
  insert(_el$9, () => submitting() ? "Sending\u2026" : "Send reset link");
29980
30457
  effect((_p$) => {
29981
- var _v$ = labelStyle2(), _v$2 = inputStyle4(), _v$3 = submitting(), _v$4 = submitting() ? "not-allowed" : "pointer", _v$5 = submitting() ? 0.7 : 1;
30458
+ var _v$ = labelStyle3(), _v$2 = inputStyle5(), _v$3 = submitting(), _v$4 = submitting() ? "not-allowed" : "pointer", _v$5 = submitting() ? 0.7 : 1;
29982
30459
  _p$.e = style(_el$6, _v$, _p$.e);
29983
30460
  _p$.t = style(_el$7, _v$2, _p$.t);
29984
30461
  _v$3 !== _p$.a && (_el$9.disabled = _p$.a = _v$3);
@@ -29999,7 +30476,7 @@ function ForgotPasswordPage(props) {
29999
30476
  return _el$;
30000
30477
  })();
30001
30478
  }
30002
- function labelStyle2() {
30479
+ function labelStyle3() {
30003
30480
  return {
30004
30481
  "font-size": "0.75rem",
30005
30482
  "text-transform": "uppercase",
@@ -30007,7 +30484,7 @@ function labelStyle2() {
30007
30484
  color: "var(--app-affiliate-fg-muted)"
30008
30485
  };
30009
30486
  }
30010
- function inputStyle4() {
30487
+ function inputStyle5() {
30011
30488
  return {
30012
30489
  width: "100%",
30013
30490
  padding: "0.625rem 0.75rem",
@@ -30021,17 +30498,17 @@ function inputStyle4() {
30021
30498
  };
30022
30499
  }
30023
30500
  delegateEvents(["input", "click"]);
30024
- var _tmpl$577 = /* @__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">`);
30025
- var _tmpl$2147 = /* @__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">`);
30026
- var _tmpl$3129 = /* @__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`);
30027
- var _tmpl$4106 = /* @__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">`);
30028
- function queryParam(name) {
30501
+ var _tmpl$580 = /* @__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">`);
30502
+ var _tmpl$2149 = /* @__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">`);
30503
+ var _tmpl$3131 = /* @__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`);
30504
+ var _tmpl$4108 = /* @__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">`);
30505
+ function queryParam2(name) {
30029
30506
  if (typeof window === "undefined") return "";
30030
30507
  return new URLSearchParams(window.location.search).get(name) ?? "";
30031
30508
  }
30032
30509
  function ResetPasswordPage(props) {
30033
- const token = () => props.token ?? queryParam("token");
30034
- const email = () => props.email ?? queryParam("email");
30510
+ const token = () => props.token ?? queryParam2("token");
30511
+ const email = () => props.email ?? queryParam2("email");
30035
30512
  const [password, setPassword] = createSignal("");
30036
30513
  const [confirm2, setConfirm] = createSignal("");
30037
30514
  const [submitting, setSubmitting] = createSignal(false);
@@ -30064,20 +30541,20 @@ function ResetPasswordPage(props) {
30064
30541
  }
30065
30542
  }
30066
30543
  return (() => {
30067
- var _el$ = _tmpl$3129(), _el$2 = _el$.firstChild; _el$2.firstChild;
30544
+ var _el$ = _tmpl$3131(), _el$2 = _el$.firstChild; _el$2.firstChild;
30068
30545
  insert(_el$2, createComponent(Show, {
30069
30546
  get when() {
30070
30547
  return !message();
30071
30548
  },
30072
30549
  get fallback() {
30073
30550
  return (() => {
30074
- var _el$11 = _tmpl$4106();
30551
+ var _el$11 = _tmpl$4108();
30075
30552
  insert(_el$11, message);
30076
30553
  return _el$11;
30077
30554
  })();
30078
30555
  },
30079
30556
  get children() {
30080
- var _el$4 = _tmpl$2147(), _el$5 = _el$4.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling, _el$8 = _el$5.nextSibling, _el$9 = _el$8.firstChild, _el$0 = _el$9.nextSibling, _el$10 = _el$8.nextSibling;
30557
+ var _el$4 = _tmpl$2149(), _el$5 = _el$4.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling, _el$8 = _el$5.nextSibling, _el$9 = _el$8.firstChild, _el$0 = _el$9.nextSibling, _el$10 = _el$8.nextSibling;
30081
30558
  _el$4.addEventListener("submit", handleSubmit);
30082
30559
  _el$7.$$input = (e) => setPassword(e.currentTarget.value);
30083
30560
  _el$0.$$input = (e) => setConfirm(e.currentTarget.value);
@@ -30086,14 +30563,14 @@ function ResetPasswordPage(props) {
30086
30563
  return error();
30087
30564
  },
30088
30565
  get children() {
30089
- var _el$1 = _tmpl$577();
30566
+ var _el$1 = _tmpl$580();
30090
30567
  insert(_el$1, error);
30091
30568
  return _el$1;
30092
30569
  }
30093
30570
  }), _el$10);
30094
30571
  insert(_el$10, () => submitting() ? "Resetting\u2026" : "Reset password");
30095
30572
  effect((_p$) => {
30096
- var _v$ = labelStyle3(), _v$2 = inputStyle5(), _v$3 = labelStyle3(), _v$4 = inputStyle5(), _v$5 = submitting(), _v$6 = submitting() ? "not-allowed" : "pointer", _v$7 = submitting() ? 0.7 : 1;
30573
+ var _v$ = labelStyle4(), _v$2 = inputStyle6(), _v$3 = labelStyle4(), _v$4 = inputStyle6(), _v$5 = submitting(), _v$6 = submitting() ? "not-allowed" : "pointer", _v$7 = submitting() ? 0.7 : 1;
30097
30574
  _p$.e = style(_el$6, _v$, _p$.e);
30098
30575
  _p$.t = style(_el$7, _v$2, _p$.t);
30099
30576
  _p$.a = style(_el$9, _v$3, _p$.a);
@@ -30119,7 +30596,7 @@ function ResetPasswordPage(props) {
30119
30596
  return _el$;
30120
30597
  })();
30121
30598
  }
30122
- function labelStyle3() {
30599
+ function labelStyle4() {
30123
30600
  return {
30124
30601
  "font-size": "0.75rem",
30125
30602
  "text-transform": "uppercase",
@@ -30127,7 +30604,7 @@ function labelStyle3() {
30127
30604
  color: "var(--app-affiliate-fg-muted)"
30128
30605
  };
30129
30606
  }
30130
- function inputStyle5() {
30607
+ function inputStyle6() {
30131
30608
  return {
30132
30609
  width: "100%",
30133
30610
  padding: "0.625rem 0.75rem",
@@ -30141,11 +30618,11 @@ function inputStyle5() {
30141
30618
  };
30142
30619
  }
30143
30620
  delegateEvents(["input"]);
30144
- var _tmpl$578 = /* @__PURE__ */ template(`<div>`);
30145
- var _tmpl$2148 = /* @__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>`);
30146
- var _tmpl$3130 = /* @__PURE__ */ template(`<button type=button>Back to login`);
30147
- var _tmpl$4107 = /* @__PURE__ */ template(`<div class=app-affiliate-root><div><h1>Reset your password`);
30148
- var _tmpl$579 = /* @__PURE__ */ template(`<p style=margin:0;font-size:0.9rem>`);
30621
+ var _tmpl$581 = /* @__PURE__ */ template(`<div>`);
30622
+ var _tmpl$2150 = /* @__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>`);
30623
+ var _tmpl$3132 = /* @__PURE__ */ template(`<button type=button>Back to login`);
30624
+ var _tmpl$4109 = /* @__PURE__ */ template(`<div class=app-affiliate-root><div><h1>Reset your password`);
30625
+ var _tmpl$584 = /* @__PURE__ */ template(`<p style=margin:0;font-size:0.9rem>`);
30149
30626
  function AffiliateForgotPassword(props) {
30150
30627
  const [email, setEmail] = createSignal("");
30151
30628
  const [submitting, setSubmitting] = createSignal(false);
@@ -30168,20 +30645,20 @@ function AffiliateForgotPassword(props) {
30168
30645
  }
30169
30646
  }
30170
30647
  return (() => {
30171
- var _el$ = _tmpl$4107(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild;
30648
+ var _el$ = _tmpl$4109(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild;
30172
30649
  insert(_el$2, createComponent(Show, {
30173
30650
  get when() {
30174
30651
  return !message();
30175
30652
  },
30176
30653
  get fallback() {
30177
30654
  return (() => {
30178
- var _el$1 = _tmpl$579();
30655
+ var _el$1 = _tmpl$584();
30179
30656
  insert(_el$1, message);
30180
30657
  return _el$1;
30181
30658
  })();
30182
30659
  },
30183
30660
  get children() {
30184
- var _el$4 = _tmpl$2148(), _el$5 = _el$4.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling, _el$9 = _el$5.nextSibling;
30661
+ var _el$4 = _tmpl$2150(), _el$5 = _el$4.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling, _el$9 = _el$5.nextSibling;
30185
30662
  _el$4.addEventListener("submit", handleSubmit);
30186
30663
  _el$7.$$input = (e) => setEmail(e.currentTarget.value);
30187
30664
  insert(_el$4, createComponent(Show, {
@@ -30189,7 +30666,7 @@ function AffiliateForgotPassword(props) {
30189
30666
  return error();
30190
30667
  },
30191
30668
  get children() {
30192
- var _el$8 = _tmpl$578();
30669
+ var _el$8 = _tmpl$581();
30193
30670
  insert(_el$8, error);
30194
30671
  effect((_$p) => style(_el$8, errorStyle(), _$p));
30195
30672
  return _el$8;
@@ -30197,7 +30674,7 @@ function AffiliateForgotPassword(props) {
30197
30674
  }), _el$9);
30198
30675
  insert(_el$9, () => submitting() ? "Sending\u2026" : "Send reset link");
30199
30676
  effect((_p$) => {
30200
- var _v$ = labelStyle4(), _v$2 = inputStyle6(), _v$3 = submitting(), _v$4 = primaryButtonStyle(submitting());
30677
+ var _v$ = labelStyle5(), _v$2 = inputStyle7(), _v$3 = submitting(), _v$4 = primaryButtonStyle(submitting());
30201
30678
  _p$.e = style(_el$6, _v$, _p$.e);
30202
30679
  _p$.t = style(_el$7, _v$2, _p$.t);
30203
30680
  _v$3 !== _p$.a && (_el$9.disabled = _p$.a = _v$3);
@@ -30218,7 +30695,7 @@ function AffiliateForgotPassword(props) {
30218
30695
  return props.onNavigateLogin;
30219
30696
  },
30220
30697
  get children() {
30221
- var _el$0 = _tmpl$3130();
30698
+ var _el$0 = _tmpl$3132();
30222
30699
  _el$0.$$click = () => props.onNavigateLogin?.();
30223
30700
  effect((_$p) => style(_el$0, linkStyle2(), _$p));
30224
30701
  return _el$0;
@@ -30269,7 +30746,7 @@ function headingStyle() {
30269
30746
  "font-size": "1.5rem"
30270
30747
  };
30271
30748
  }
30272
- function labelStyle4() {
30749
+ function labelStyle5() {
30273
30750
  return {
30274
30751
  "font-size": "0.75rem",
30275
30752
  "text-transform": "uppercase",
@@ -30277,7 +30754,7 @@ function labelStyle4() {
30277
30754
  color: "var(--app-affiliate-fg-muted)"
30278
30755
  };
30279
30756
  }
30280
- function inputStyle6() {
30757
+ function inputStyle7() {
30281
30758
  return {
30282
30759
  width: "100%",
30283
30760
  padding: "0.625rem 0.75rem",
@@ -30324,17 +30801,17 @@ function linkStyle2() {
30324
30801
  };
30325
30802
  }
30326
30803
  delegateEvents(["input", "click"]);
30327
- var _tmpl$580 = /* @__PURE__ */ template(`<div>`);
30328
- var _tmpl$2149 = /* @__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>`);
30329
- var _tmpl$3131 = /* @__PURE__ */ template(`<div class=app-affiliate-root><div><h1>Choose a new password`);
30330
- var _tmpl$4108 = /* @__PURE__ */ template(`<p style=margin:0;font-size:0.9rem>Your password has been reset. You can now log in with your new password.`);
30331
- function queryParam2(name) {
30804
+ var _tmpl$585 = /* @__PURE__ */ template(`<div>`);
30805
+ var _tmpl$2151 = /* @__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>`);
30806
+ var _tmpl$3133 = /* @__PURE__ */ template(`<div class=app-affiliate-root><div><h1>Choose a new password`);
30807
+ var _tmpl$4115 = /* @__PURE__ */ template(`<p style=margin:0;font-size:0.9rem>Your password has been reset. You can now log in with your new password.`);
30808
+ function queryParam3(name) {
30332
30809
  if (typeof window === "undefined") return "";
30333
30810
  return new URLSearchParams(window.location.search).get(name) ?? "";
30334
30811
  }
30335
30812
  function AffiliateResetPassword(props) {
30336
- const token = () => props.token ?? queryParam2("token");
30337
- const email = () => props.email ?? queryParam2("email");
30813
+ const token = () => props.token ?? queryParam3("token");
30814
+ const email = () => props.email ?? queryParam3("email");
30338
30815
  const [password, setPassword] = createSignal("");
30339
30816
  const [confirm2, setConfirm] = createSignal("");
30340
30817
  const [submitting, setSubmitting] = createSignal(false);
@@ -30371,16 +30848,16 @@ function AffiliateResetPassword(props) {
30371
30848
  }
30372
30849
  }
30373
30850
  return (() => {
30374
- var _el$ = _tmpl$3131(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild;
30851
+ var _el$ = _tmpl$3133(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild;
30375
30852
  insert(_el$2, createComponent(Show, {
30376
30853
  get when() {
30377
30854
  return !done();
30378
30855
  },
30379
30856
  get fallback() {
30380
- return _tmpl$4108();
30857
+ return _tmpl$4115();
30381
30858
  },
30382
30859
  get children() {
30383
- var _el$4 = _tmpl$2149(), _el$5 = _el$4.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$5.nextSibling, _el$8 = _el$7.firstChild, _el$0 = _el$7.nextSibling;
30860
+ var _el$4 = _tmpl$2151(), _el$5 = _el$4.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$5.nextSibling, _el$8 = _el$7.firstChild, _el$0 = _el$7.nextSibling;
30384
30861
  _el$4.addEventListener("submit", handleSubmit);
30385
30862
  insert(_el$5, createComponent(AffiliatePasswordInput, {
30386
30863
  required: true,
@@ -30405,7 +30882,7 @@ function AffiliateResetPassword(props) {
30405
30882
  return error();
30406
30883
  },
30407
30884
  get children() {
30408
- var _el$9 = _tmpl$580();
30885
+ var _el$9 = _tmpl$585();
30409
30886
  insert(_el$9, error);
30410
30887
  effect((_$p) => style(_el$9, errorStyle2(), _$p));
30411
30888
  return _el$9;
@@ -30413,7 +30890,7 @@ function AffiliateResetPassword(props) {
30413
30890
  }), _el$0);
30414
30891
  insert(_el$0, () => submitting() ? "Saving\u2026" : "Set new password");
30415
30892
  effect((_p$) => {
30416
- var _v$ = labelStyle5(), _v$2 = labelStyle5(), _v$3 = submitting(), _v$4 = primaryButtonStyle2(submitting());
30893
+ var _v$ = labelStyle6(), _v$2 = labelStyle6(), _v$3 = submitting(), _v$4 = primaryButtonStyle2(submitting());
30417
30894
  _p$.e = style(_el$6, _v$, _p$.e);
30418
30895
  _p$.t = style(_el$8, _v$2, _p$.t);
30419
30896
  _v$3 !== _p$.a && (_el$0.disabled = _p$.a = _v$3);
@@ -30473,7 +30950,7 @@ function headingStyle2() {
30473
30950
  "font-size": "1.5rem"
30474
30951
  };
30475
30952
  }
30476
- function labelStyle5() {
30953
+ function labelStyle6() {
30477
30954
  return {
30478
30955
  "font-size": "0.75rem",
30479
30956
  "text-transform": "uppercase",
@@ -30503,6 +30980,6 @@ function primaryButtonStyle2(submitting) {
30503
30980
  };
30504
30981
  }
30505
30982
 
30506
- 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 };
30507
- //# sourceMappingURL=O7H7DAWO.js.map
30508
- //# sourceMappingURL=O7H7DAWO.js.map
30983
+ export { ADMIN_TAB_SEGMENTS, AFFILIATE_SUB_TAB_SEGMENTS, AcceptAdminInvitePage, AddressFields, AdminDashboard, AffiliateForgotPassword, AffiliateLogin, AffiliatePortal, AffiliateRegister, AffiliateResetPassword, CartCheckoutPage, CheckoutPage, EmailTemplates, ForgotPasswordPage, MemberPortal, PatientDashboardPreview, RegisterPage, ResetPasswordPage, SignupPage, SubscribePage, SurveyPage, SurveyV2Page, UpdatePaymentMethod, adminTabFromPath, adminTabPath, affiliateSubTabFromPath, affiliateSubTabPath };
30984
+ //# sourceMappingURL=Z5QDFCLZ.js.map
30985
+ //# sourceMappingURL=Z5QDFCLZ.js.map