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

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 (41) hide show
  1. package/dist/api/index.d.ts +1 -1
  2. package/dist/api/index.js +3 -3
  3. package/dist/api/index.jsx +5 -3
  4. package/dist/chunk/{ANKLNWGB.js → 2HDMTWLH.js} +6 -6
  5. package/dist/chunk/{ANKLNWGB.js.map → 2HDMTWLH.js.map} +1 -1
  6. package/dist/chunk/{PHSZOZVK.jsx → 37UEVJEC.jsx} +12 -1
  7. package/dist/chunk/{HM5L6J62.jsx → 5HQAA4UO.jsx} +2 -2
  8. package/dist/chunk/{Z6PDUPOU.js → 6V7RVUXX.js} +3 -3
  9. package/dist/chunk/{Z6PDUPOU.js.map → 6V7RVUXX.js.map} +1 -1
  10. package/dist/chunk/{AXXQJC6M.js → A6FJGQIS.js} +3 -3
  11. package/dist/chunk/{AXXQJC6M.js.map → A6FJGQIS.js.map} +1 -1
  12. package/dist/chunk/{545PPOE5.jsx → BJXD2NQQ.jsx} +2 -2
  13. package/dist/chunk/{LFSDVMIY.js → BYDMO5RM.js} +208 -6
  14. package/dist/chunk/BYDMO5RM.js.map +1 -0
  15. package/dist/chunk/{3SPMZ7FK.jsx → FTZ52PMM.jsx} +2 -2
  16. package/dist/chunk/{TFA64PLK.js → FXRGPBYU.js} +3 -3
  17. package/dist/chunk/{TFA64PLK.js.map → FXRGPBYU.js.map} +1 -1
  18. package/dist/chunk/{P4NWFY4T.jsx → IQDVS3XA.jsx} +5 -5
  19. package/dist/chunk/{L4DFQMYM.js → O7H7DAWO.js} +959 -683
  20. package/dist/chunk/O7H7DAWO.js.map +1 -0
  21. package/dist/chunk/{ICGZXU3R.js → RDZDD5UW.js} +13 -3
  22. package/dist/chunk/RDZDD5UW.js.map +1 -0
  23. package/dist/chunk/{OZZGMI6C.jsx → T37L6JE6.jsx} +1188 -999
  24. package/dist/chunk/{VE5ACNFB.jsx → TLDELI22.jsx} +220 -5
  25. package/dist/{client-Baf1FSEp.d.ts → client-BLh8hFAu.d.ts} +35 -1
  26. package/dist/flows/index.d.ts +142 -2
  27. package/dist/flows/index.js +6 -6
  28. package/dist/flows/index.jsx +24 -8
  29. package/dist/index/index.d.ts +2 -2
  30. package/dist/index/index.js +7 -7
  31. package/dist/index/index.jsx +27 -9
  32. package/dist/pages/index.d.ts +1 -1
  33. package/dist/pages/index.js +5 -5
  34. package/dist/pages/index.jsx +5 -5
  35. package/dist/stores/index.d.ts +1 -1
  36. package/dist/stores/index.js +2 -2
  37. package/dist/stores/index.jsx +2 -2
  38. package/package.json +1 -1
  39. package/dist/chunk/ICGZXU3R.js.map +0 -1
  40. package/dist/chunk/L4DFQMYM.js.map +0 -1
  41. package/dist/chunk/LFSDVMIY.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, 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, pharmacyLabel, isImageAttachment, buildRefillView, toTrackerRequest, needsReview, visibleWarnings, compareStrengths, MATCH_DEPENDENT_WARNINGS, SOURCE_FIELD_NOTE, MATCH_HOW_LABEL, explainFinding, matchKey } from './LFSDVMIY.js';
3
- import { fetchFunnelConfig } from './Z6PDUPOU.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';
4
4
  import { usePrimitives } from './67KHO66G.js';
5
- import { cart_default, auth_default, affiliateAuth_default } from './AXXQJC6M.js';
6
- import { usersApi, adminApi, membersApi, offersApi, affiliatePortalApi, authApi, adminAffiliatesApi, apiFetch, apexApi, adminCatalogApi, SUPPORT_ATTACHMENT_MIME_TYPES, SUPPORT_ATTACHMENT_MAX_BYTES, ApiError, subscriptionsApi } from './ICGZXU3R.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';
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';
@@ -14267,7 +14267,7 @@ var _tmpl$1101 = /* @__PURE__ */ template(`<span class=app-admin-text-muted>(<!>
14267
14267
  var _tmpl$1015 = /* @__PURE__ */ template(`<div class=app-admin-convert-findings>`);
14268
14268
  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
14269
  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.`);
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.`);
14271
14271
  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
14272
  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
14273
  var _tmpl$1611 = /* @__PURE__ */ template(`<button type=button class=app-admin-banner__dismiss aria-label=Dismiss>\xD7`);
@@ -14330,7 +14330,7 @@ function AddPharmacyPicker(props) {
14330
14330
  drugs: q ? g.drugs.filter((d) => `${d.name} ${g.pharmacyName}`.toLowerCase().includes(q)) : g.drugs
14331
14331
  })).filter((g) => g.drugs.length > 0);
14332
14332
  });
14333
- const optionLabel = (d) => props.classification && d.classification !== props.classification ? `${d.name} (${d.classification} \u2014 mismatched)` : d.name;
14333
+ const optionLabel2 = (d) => props.classification && d.classification !== props.classification ? `${d.name} (${d.classification} \u2014 mismatched)` : d.name;
14334
14334
  const none = () => flow.drugsStatus() === "ready" && groups().length === 0 && filter().trim() === "";
14335
14335
  return (() => {
14336
14336
  var _el$2 = _tmpl$350(), _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.nextSibling, _el$9 = _el$8.firstChild, _el$0 = _el$8.nextSibling, _el$13 = _el$6.nextSibling, _el$14 = _el$13.firstChild, _el$15 = _el$14.nextSibling;
@@ -14356,7 +14356,7 @@ function AddPharmacyPicker(props) {
14356
14356
  },
14357
14357
  children: (d) => (() => {
14358
14358
  var _el$17 = _tmpl$536();
14359
- insert(_el$17, () => optionLabel(d));
14359
+ insert(_el$17, () => optionLabel2(d));
14360
14360
  effect(() => _el$17.value = d.id);
14361
14361
  return _el$17;
14362
14362
  })()
@@ -16217,20 +16217,269 @@ function NewCatalogProductDialog(props) {
16217
16217
  });
16218
16218
  }
16219
16219
  delegateEvents(["click", "input"]);
16220
- var _tmpl$281 = /* @__PURE__ */ template(`<strong>`);
16221
- var _tmpl$287 = /* @__PURE__ */ template(`<span class=app-admin-convert-detail>`);
16222
- var _tmpl$355 = /* @__PURE__ */ template(`<div><span>`);
16223
- var _tmpl$444 = /* @__PURE__ */ template(`<div class=app-admin-convert-findings>`);
16224
- var _tmpl$539 = /* @__PURE__ */ template(`<button type=button class=app-admin-banner__dismiss aria-label=Dismiss>\xD7`);
16225
- var _tmpl$635 = /* @__PURE__ */ template(`<div data-testid=conversion-notice><span>`);
16226
- var _tmpl$732 = /* @__PURE__ */ template(`<ol class=app-admin-convert-steps aria-label=Steps>`);
16227
- var _tmpl$828 = /* @__PURE__ */ template(`<span class=app-admin-sr-only> (not needed)`);
16228
- var _tmpl$925 = /* @__PURE__ */ template(`<li>. `);
16229
- var _tmpl$022 = /* @__PURE__ */ template(`<div class=app-admin-convert-wait role=status aria-live=polite data-testid=conversion-waiting><div class=app-admin-spinner></div><strong>`);
16230
- var _tmpl$1103 = /* @__PURE__ */ template(`<div class="app-admin-banner app-admin-banner--warn"role=status data-testid=conversion-unfinished><span><strong>A conversion of this product was started but hasn\u2019t finished.</strong><span class=app-admin-convert-detail>Until it does, this product\u2019s strengths are hidden in your store. Refills are not affected. If you only just started it, it may still be finishing \u2014 check again in a minute. Otherwise review the strengths and convert again to finish it.</span><button type=button class="app-admin-btn app-admin-btn-ghost app-admin-btn-sm"style=margin-top:0.5rem>Check again`);
16231
- var _tmpl$1017 = /* @__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.`);
16232
- var _tmpl$1118 = /* @__PURE__ */ template(`<div><h4 class=app-admin-label style="margin:0 0 0.5rem">This can\u2019t be converted yet`);
16233
- var _tmpl$1215 = /* @__PURE__ */ template(`<div><h4 class=app-admin-label style="margin:0 0 0.5rem">Things to know`);
16220
+ var _tmpl$281 = /* @__PURE__ */ template(`<strong style=font-size:0.6875rem>`);
16221
+ 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`);
16234
+ var hint4 = {
16235
+ "font-size": "0.6875rem",
16236
+ color: "var(--app-admin-fg-muted)",
16237
+ margin: "0 0 0.625rem",
16238
+ "line-height": 1.4
16239
+ };
16240
+ 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)}`;
16242
+ function refocus(el) {
16243
+ queueMicrotask(() => {
16244
+ if (!el || !el.isConnected) return;
16245
+ const active = document.activeElement;
16246
+ if (active && active !== document.body && active !== el) return;
16247
+ el.focus();
16248
+ });
16249
+ }
16250
+ function Decision(props) {
16251
+ let useButton;
16252
+ onMount(() => queueMicrotask(() => useButton?.focus()));
16253
+ const old = () => fmtPrice(props.decision.price);
16254
+ return (() => {
16255
+ var _el$ = _tmpl$287(), _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$7.firstChild; var _el$9 = _el$7.nextSibling, _el$0 = _el$9.nextSibling, _el$1 = _el$6.nextSibling, _el$10 = _el$1.firstChild, _el$12 = _el$10.nextSibling; _el$12.nextSibling;
16256
+ insert(_el$3, () => props.decision.doseLabel);
16257
+ insert(_el$5, old);
16258
+ _el$7.$$click = () => props.onDecide(true);
16259
+ var _ref$ = useButton;
16260
+ typeof _ref$ === "function" ? use(_ref$, _el$7) : useButton = _el$7;
16261
+ insert(_el$7, old, null);
16262
+ _el$9.$$click = () => props.onDecide(false);
16263
+ _el$0.$$click = () => props.onCancel();
16264
+ insert(_el$1, () => props.decision.doseLabel, _el$12);
16265
+ insert(_el$, createComponent(Show, {
16266
+ get when() {
16267
+ return props.unsaved;
16268
+ },
16269
+ get children() {
16270
+ var _el$13 = _tmpl$281();
16271
+ insert(_el$13, UNSAVED_HINT);
16272
+ return _el$13;
16273
+ }
16274
+ }), null);
16275
+ effect((_p$) => {
16276
+ var _v$ = `Price for ${props.decision.doseLabel}`, _v$2 = props.disabled, _v$3 = props.disabled, _v$4 = props.disabled;
16277
+ _v$ !== _p$.e && setAttribute(_el$, "aria-label", _p$.e = _v$);
16278
+ _v$2 !== _p$.t && (_el$7.disabled = _p$.t = _v$2);
16279
+ _v$3 !== _p$.a && (_el$9.disabled = _p$.a = _v$3);
16280
+ _v$4 !== _p$.o && (_el$0.disabled = _p$.o = _v$4);
16281
+ return _p$;
16282
+ }, {
16283
+ e: void 0,
16284
+ t: void 0,
16285
+ a: void 0,
16286
+ o: void 0
16287
+ });
16288
+ return _el$;
16289
+ })();
16290
+ }
16291
+ function MatchRow(props) {
16292
+ const flow = props.flow;
16293
+ const row = () => flow.rows().find((r) => r.dosage === props.dosage);
16294
+ const n = () => row()?.subscriberCount ?? 0;
16295
+ const err = () => flow.errors()[props.dosage];
16296
+ const errorId = () => `strength-match-error-${idPart(props.dosage)}`;
16297
+ const decision = () => {
16298
+ const p = flow.pending();
16299
+ return p && p.dosage === props.dosage ? p : null;
16300
+ };
16301
+ let select;
16302
+ createEffect(() => {
16303
+ const value = flow.valueOf(props.dosage);
16304
+ flow.doseOptions();
16305
+ if (select) select.value = value;
16306
+ });
16307
+ const settle = () => {
16308
+ if (select) select.value = flow.valueOf(props.dosage);
16309
+ refocus(select);
16310
+ };
16311
+ 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);
16316
+ insert(_el$16, createComponent(Show, {
16317
+ get when() {
16318
+ return memo(() => !!row())() && isLeftForReview(row());
16319
+ },
16320
+ get children() {
16321
+ return _tmpl$355();
16322
+ }
16323
+ }), null);
16324
+ _el$24.addEventListener("change", (e) => {
16325
+ void flow.setMatch(props.dosage, doseIdOf(e.currentTarget.value)).then(settle);
16326
+ });
16327
+ var _ref$2 = select;
16328
+ typeof _ref$2 === "function" ? use(_ref$2, _el$24) : select = _el$24;
16329
+ insert(_el$24, createComponent(For, {
16330
+ get each() {
16331
+ return flow.doseOptions();
16332
+ },
16333
+ 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;
16338
+ })()
16339
+ }), null);
16340
+ insert(_el$14, createComponent(Show, {
16341
+ get when() {
16342
+ return decision();
16343
+ },
16344
+ keyed: true,
16345
+ children: (d) => createComponent(Decision, {
16346
+ decision: d,
16347
+ get disabled() {
16348
+ return flow.busy() || !!props.unsaved;
16349
+ },
16350
+ get unsaved() {
16351
+ return props.unsaved;
16352
+ },
16353
+ onDecide: (carry) => void flow.decide(carry).then(settle),
16354
+ onCancel: () => {
16355
+ flow.cancelDecision();
16356
+ settle();
16357
+ }
16358
+ })
16359
+ }), null);
16360
+ insert(_el$14, createComponent(Show, {
16361
+ get when() {
16362
+ return err();
16363
+ },
16364
+ get children() {
16365
+ var _el$26 = _tmpl$444();
16366
+ insert(_el$26, err);
16367
+ effect(() => setAttribute(_el$26, "id", errorId()));
16368
+ return _el$26;
16369
+ }
16370
+ }), null);
16371
+ effect((_p$) => {
16372
+ var _v$5 = `Strength for subscribers on ${props.dosage}`, _v$6 = err() ? errorId() : void 0, _v$7 = flow.busy() || props.unsaved;
16373
+ _v$5 !== _p$.e && setAttribute(_el$24, "aria-label", _p$.e = _v$5);
16374
+ _v$6 !== _p$.t && setAttribute(_el$24, "aria-describedby", _p$.t = _v$6);
16375
+ _v$7 !== _p$.a && (_el$24.disabled = _p$.a = _v$7);
16376
+ return _p$;
16377
+ }, {
16378
+ e: void 0,
16379
+ t: void 0,
16380
+ a: void 0
16381
+ });
16382
+ return _el$14;
16383
+ })();
16384
+ }
16385
+ function StrengthMatchesSection(props) {
16386
+ const flow = props.flow;
16387
+ const failed = () => flow.status() === "failed";
16388
+ const shown = () => failed() || flow.status() === "ready" && flow.rows().length > 0;
16389
+ const dosages = () => flow.rows().map((r) => r.dosage);
16390
+ return createComponent(Show, {
16391
+ get when() {
16392
+ return shown();
16393
+ },
16394
+ get children() {
16395
+ var _el$28 = _tmpl$1103();
16396
+ insert(_el$28, createComponent(Show, {
16397
+ get when() {
16398
+ return !failed();
16399
+ },
16400
+ get fallback() {
16401
+ 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, {
16405
+ get when() {
16406
+ return flow.notice();
16407
+ },
16408
+ get children() {
16409
+ var _el$42 = _tmpl$1017();
16410
+ insert(_el$42, () => flow.notice());
16411
+ return _el$42;
16412
+ }
16413
+ }), null);
16414
+ return _el$36;
16415
+ })();
16416
+ },
16417
+ get children() {
16418
+ return [(() => {
16419
+ var _el$29 = _tmpl$732(); _el$29.firstChild;
16420
+ return _el$29;
16421
+ })(), (() => {
16422
+ var _el$31 = _tmpl$925(); _el$31.firstChild;
16423
+ style(_el$31, hint4);
16424
+ insert(_el$31, createComponent(Show, {
16425
+ get when() {
16426
+ return props.unsaved;
16427
+ },
16428
+ get children() {
16429
+ var _el$34 = _tmpl$828();
16430
+ insert(_el$34, UNSAVED_HINT);
16431
+ return _el$34;
16432
+ }
16433
+ }), null);
16434
+ return _el$31;
16435
+ })(), createComponent(Show, {
16436
+ get when() {
16437
+ return flow.notice();
16438
+ },
16439
+ keyed: true,
16440
+ 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;
16445
+ })()
16446
+ }), (() => {
16447
+ var _el$35 = _tmpl$022();
16448
+ insert(_el$35, createComponent(For, {
16449
+ get each() {
16450
+ return dosages();
16451
+ },
16452
+ children: (dosage) => createComponent(MatchRow, {
16453
+ flow,
16454
+ dosage,
16455
+ get unsaved() {
16456
+ return props.unsaved;
16457
+ }
16458
+ })
16459
+ }));
16460
+ return _el$35;
16461
+ })()];
16462
+ }
16463
+ }));
16464
+ return _el$28;
16465
+ }
16466
+ });
16467
+ }
16468
+ delegateEvents(["click"]);
16469
+ var _tmpl$288 = /* @__PURE__ */ template(`<strong>`);
16470
+ var _tmpl$289 = /* @__PURE__ */ template(`<span class=app-admin-convert-detail>`);
16471
+ var _tmpl$356 = /* @__PURE__ */ template(`<div><span>`);
16472
+ var _tmpl$445 = /* @__PURE__ */ template(`<div class=app-admin-convert-findings>`);
16473
+ var _tmpl$540 = /* @__PURE__ */ template(`<button type=button class=app-admin-banner__dismiss aria-label=Dismiss>\xD7`);
16474
+ var _tmpl$636 = /* @__PURE__ */ template(`<div data-testid=conversion-notice><span>`);
16475
+ var _tmpl$733 = /* @__PURE__ */ template(`<ol class=app-admin-convert-steps aria-label=Steps>`);
16476
+ var _tmpl$829 = /* @__PURE__ */ template(`<span class=app-admin-sr-only> (not needed)`);
16477
+ var _tmpl$926 = /* @__PURE__ */ template(`<li>. `);
16478
+ var _tmpl$023 = /* @__PURE__ */ template(`<div class=app-admin-convert-wait role=status aria-live=polite data-testid=conversion-waiting><div class=app-admin-spinner></div><strong>`);
16479
+ var _tmpl$1104 = /* @__PURE__ */ template(`<div class="app-admin-banner app-admin-banner--warn"role=status data-testid=conversion-unfinished><span><strong>A conversion of this product was started but hasn\u2019t finished.</strong><span class=app-admin-convert-detail>Until it does, this product\u2019s strengths are hidden in your store. Refills are not affected. If you only just started it, it may still be finishing \u2014 check again in a minute. Otherwise review the strengths and convert again to finish it.</span><button type=button class="app-admin-btn app-admin-btn-ghost app-admin-btn-sm"style=margin-top:0.5rem>Check again`);
16480
+ 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
+ var _tmpl$1119 = /* @__PURE__ */ template(`<div><h4 class=app-admin-label style="margin:0 0 0.5rem">This can\u2019t be converted yet`);
16482
+ var _tmpl$1216 = /* @__PURE__ */ template(`<div><h4 class=app-admin-label style="margin:0 0 0.5rem">Things to know`);
16234
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.`);
16235
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.`);
16236
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.`);
@@ -16246,14 +16495,14 @@ var _tmpl$2412 = /* @__PURE__ */ template(`<ul class=app-admin-catalog-list>`);
16246
16495
  var _tmpl$2512 = /* @__PURE__ */ template(`<div style=display:flex;align-items:center;gap:0.75rem;flex-wrap:wrap><span data-testid=conversion-undecided> still to decide.</span><button type=button class="app-admin-btn app-admin-btn-ghost app-admin-btn-sm">Leave the rest as not carried over`);
16247
16496
  var _tmpl$2612 = /* @__PURE__ */ template(`<div class="app-admin-banner app-admin-banner--warn"role=status data-testid=conversion-flagged-summary><span><strong> subscriber<!> will be flagged for review at their next renewal.</strong><span class=app-admin-convert-detail>Their refills still go out; each is held for a person to check until the product\u2019s prices are fixed.`);
16248
16497
  var _tmpl$2711 = /* @__PURE__ */ template(`<div class=app-admin-convert data-testid=conversion-step-review><p style=margin:0;font-size:0.875rem;line-height:1.5>Match each current strength to one of the new item\u2019s strengths \u2014 its price moves with it. A strength you don\u2019t carry over keeps its price on file but is never sold.`);
16249
- var _tmpl$288 = /* @__PURE__ */ template(`<p>This product has no prices or subscribers to carry over.`);
16498
+ var _tmpl$2810 = /* @__PURE__ */ template(`<p>This product has no prices or subscribers to carry over.`);
16250
16499
  var _tmpl$297 = /* @__PURE__ */ template(`<div class=app-admin-convert data-testid=conversion-step-confirm>`);
16251
16500
  var _tmpl$306 = /* @__PURE__ */ template(`<p style=margin:0;font-size:0.875rem;line-height:1.5><strong></strong> will sell from the catalog item <strong></strong> (<span class=app-admin-text-mono></span>) instead of its pharmacy drug. This is what changes:`);
16252
16501
  var _tmpl$3113 = /* @__PURE__ */ template(`<ul class=app-admin-convert-list data-testid=conversion-changes><li>The catalog item is switched on and this product is moved onto it.`);
16253
16502
  var _tmpl$3212 = /* @__PURE__ */ template(`<div><h4 class=app-admin-label style="margin:0 0 0.5rem">What the product sells after the switch</h4><ul class=app-admin-convert-list data-testid=conversion-after>`);
16254
16503
  var _tmpl$3312 = /* @__PURE__ */ template(`<div class="app-admin-banner app-admin-banner--warn"role=status><span><strong> subscriber<!> will be flagged for review at their next renewal.`);
16255
16504
  var _tmpl$3412 = /* @__PURE__ */ template(`<p>Converting takes about a minute. For part of that time this product\u2019s strengths may be missing from your store; existing subscriptions and refills keep working. You can undo the conversion afterwards.`);
16256
- var _tmpl$356 = /* @__PURE__ */ template(`<li> \u2192 <strong>`);
16505
+ var _tmpl$357 = /* @__PURE__ */ template(`<li> \u2192 <strong>`);
16257
16506
  var _tmpl$365 = /* @__PURE__ */ template(`<li> \u2192 <strong>not carried over`);
16258
16507
  var _tmpl$374 = /* @__PURE__ */ template(`<li>: `);
16259
16508
  var _tmpl$384 = /* @__PURE__ */ template(`<strong>needs a price before it can be sold`);
@@ -16262,7 +16511,7 @@ var _tmpl$404 = /* @__PURE__ */ template(`<div class="app-admin-banner app-admin
16262
16511
  var _tmpl$4111 = /* @__PURE__ */ template(`<section class=app-admin-catalog-block data-testid=conversion-undo aria-labelledby=conversion-undo-title><h4 class=app-admin-label id=conversion-undo-title style="margin:0 0 0.5rem">Undo conversion</h4><p style=margin-bottom:0.5rem>Puts this product back on its original pharmacy drug and its original prices, exactly as they were before it was converted. It does <strong>not</strong> undo everything:</p><ul class=app-admin-convert-list style=font-size:0.75rem><li>Requests already placed under the catalog item keep it.</li><li>Refills of subscriptions whose last request used the catalog item keep using it \u2014 that works only while the item stays switched on.</li><li>The catalog item still exists; undoing doesn\u2019t delete it.</li><li>If the item stays switched on, this product shows no strengths in your store until you switch it off or convert the product again.</li></ul><p style="margin:0.5rem 0">After the undo we list exactly what it did not undo.</p><label class=app-admin-catalog-toggle style="margin:0.5rem 0"><input type=checkbox><span>Also switch off the catalog item</span></label><p style=margin-bottom:0.75rem>Only done when nothing else uses the item. If it can\u2019t be switched off we say why; the product is restored either way.`);
16263
16512
  var _tmpl$4211 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-danger">Undo conversion\u2026`);
16264
16513
  var _tmpl$4311 = /* @__PURE__ */ template(`<div class=app-admin-convert data-testid=conversion-undone><div class="app-admin-banner app-admin-banner--success"role=status><span><strong>The conversion was undone.</strong> The product is back on its original pharmacy drug and prices.`);
16265
- var _tmpl$445 = /* @__PURE__ */ template(`<p>The catalog item <span class=app-admin-text-mono></span> was switched off.`);
16514
+ var _tmpl$446 = /* @__PURE__ */ template(`<p>The catalog item <span class=app-admin-text-mono></span> was switched off.`);
16266
16515
  var _tmpl$453 = /* @__PURE__ */ template(`<div class="app-admin-banner app-admin-banner--warn"role=status data-testid=conversion-not-switched-off><span><strong>The catalog item was not switched off:</strong><ul class=app-admin-convert-list style=margin-top:0.25rem>`);
16267
16516
  var _tmpl$463 = /* @__PURE__ */ template(`<p>Later edits to the product\u2019s links and prices were overwritten; their values were recorded first.`);
16268
16517
  var _tmpl$473 = /* @__PURE__ */ template(`<p>Other products still use <span class=app-admin-text-mono></span>: <!>.`);
@@ -16281,7 +16530,7 @@ var _tmpl$593 = /* @__PURE__ */ template(`<button type=button class="app-admin-b
16281
16530
  var _tmpl$603 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-primary">Finish switching on`);
16282
16531
  var _tmpl$6111 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-primary">Close`);
16283
16532
  var _tmpl$6211 = /* @__PURE__ */ template(`<div class="app-admin-banner app-admin-banner--danger"role=alert data-testid=conversion-unreadable style=margin-bottom:0><span>`);
16284
- var _tmpl$636 = /* @__PURE__ */ template(`<p>It\u2019s created switched off. Your product isn\u2019t touched.`);
16533
+ var _tmpl$637 = /* @__PURE__ */ template(`<p>It\u2019s created switched off. Your product isn\u2019t touched.`);
16285
16534
  var _tmpl$643 = /* @__PURE__ */ template(`<div class="app-admin-banner app-admin-banner--warn"role=status data-testid=conversion-unfinished><span><strong>An earlier conversion didn\u2019t finish.</strong> Its catalog item is switched on but this product hasn\u2019t been moved onto it, so its strengths are hidden in your store. Confirm the strengths below and convert again to finish it.`);
16286
16535
  var _tmpl$653 = /* @__PURE__ */ template(`<p>We\u2019re switching on the catalog item, waiting for your store\u2019s servers to catch up, then moving the product. If the page does get closed, reopen this product afterwards: this screen always shows exactly where the conversion stands.`);
16287
16536
  var _tmpl$663 = /* @__PURE__ */ template(`<p>`);
@@ -16289,9 +16538,9 @@ var _tmpl$672 = /* @__PURE__ */ template(`<div class="app-admin-banner app-admin
16289
16538
  var _tmpl$682 = /* @__PURE__ */ template(`<div class="app-admin-banner app-admin-banner--success"role=status data-testid=conversion-done style=margin-bottom:0><span><strong>Converted to the catalog item `);
16290
16539
  var _tmpl$692 = /* @__PURE__ */ template(`<div class="app-admin-banner app-admin-banner--success"role=status data-testid=conversion-done style=margin-bottom:0><span><strong>Converted.</strong> <!> now sells from its catalog item. Opening it in the catalog editor\u2026`);
16291
16540
  var _tmpl$702 = /* @__PURE__ */ template(`<span class=app-admin-convert-detail>on <!> \xB7 <span class=app-admin-text-mono>`);
16292
- var _tmpl$733 = /* @__PURE__ */ template(`<strong>The change didn\u2019t finish, so this product can\u2019t be sold yet.`);
16541
+ var _tmpl$734 = /* @__PURE__ */ template(`<strong>The change didn\u2019t finish, so this product can\u2019t be sold yet.`);
16293
16542
  var _tmpl$742 = /* @__PURE__ */ template(`<section class=app-admin-catalog-block data-testid=catalog-conversion-status aria-labelledby=conversion-status-title><div class=app-admin-catalog-block__head><h3 class=app-admin-label id=conversion-status-title style=margin:0>Recent pharmacy change</h3><button type=button class="app-admin-btn app-admin-btn-ghost app-admin-btn-sm"></button></div><p class=app-admin-catalog-hint>This product\u2019s pharmacies were changed on <!>. You can undo that while it is still recent. `);
16294
- var hint4 = {
16543
+ var hint5 = {
16295
16544
  "font-size": "0.75rem",
16296
16545
  color: "var(--app-admin-fg-muted)",
16297
16546
  margin: "0",
@@ -16301,7 +16550,7 @@ var NONE = "__not_carried_over__";
16301
16550
  function Finding2(props) {
16302
16551
  const copy = () => explainFinding(props.item);
16303
16552
  return (() => {
16304
- var _el$ = _tmpl$355(), _el$2 = _el$.firstChild;
16553
+ var _el$ = _tmpl$356(), _el$2 = _el$.firstChild;
16305
16554
  insert(_el$2, createComponent(Show, {
16306
16555
  get when() {
16307
16556
  return copy().title;
@@ -16311,11 +16560,11 @@ function Finding2(props) {
16311
16560
  },
16312
16561
  get children() {
16313
16562
  return [(() => {
16314
- var _el$3 = _tmpl$281();
16563
+ var _el$3 = _tmpl$288();
16315
16564
  insert(_el$3, () => copy().title);
16316
16565
  return _el$3;
16317
16566
  })(), (() => {
16318
- var _el$4 = _tmpl$287();
16567
+ var _el$4 = _tmpl$289();
16319
16568
  insert(_el$4, () => copy().message);
16320
16569
  return _el$4;
16321
16570
  })()];
@@ -16342,7 +16591,7 @@ function Findings(props) {
16342
16591
  return shown().length > 0;
16343
16592
  },
16344
16593
  get children() {
16345
- var _el$5 = _tmpl$444();
16594
+ var _el$5 = _tmpl$445();
16346
16595
  insert(_el$5, createComponent(For, {
16347
16596
  get each() {
16348
16597
  return shown();
@@ -16365,14 +16614,14 @@ function NoticeBanner(props) {
16365
16614
  },
16366
16615
  keyed: true,
16367
16616
  children: (n) => (() => {
16368
- var _el$6 = _tmpl$635(), _el$7 = _el$6.firstChild;
16617
+ var _el$6 = _tmpl$636(), _el$7 = _el$6.firstChild;
16369
16618
  insert(_el$7, () => n.message);
16370
16619
  insert(_el$6, createComponent(Show, {
16371
16620
  get when() {
16372
16621
  return n.tone !== "danger";
16373
16622
  },
16374
16623
  get children() {
16375
- var _el$8 = _tmpl$539();
16624
+ var _el$8 = _tmpl$540();
16376
16625
  _el$8.$$click = () => props.flow.dismissNotice();
16377
16626
  return _el$8;
16378
16627
  }
@@ -16395,11 +16644,11 @@ function NoticeBanner(props) {
16395
16644
  var STEP_LABELS = ["What will happen", "Prepare", "Review strengths", "Convert"];
16396
16645
  function Steps(props) {
16397
16646
  return (() => {
16398
- var _el$9 = _tmpl$732();
16647
+ var _el$9 = _tmpl$733();
16399
16648
  insert(_el$9, createComponent(For, {
16400
16649
  each: STEP_LABELS,
16401
16650
  children: (label3, i) => (() => {
16402
- var _el$0 = _tmpl$925(), _el$1 = _el$0.firstChild;
16651
+ var _el$0 = _tmpl$926(), _el$1 = _el$0.firstChild;
16403
16652
  insert(_el$0, () => i() + 1, _el$1);
16404
16653
  insert(_el$0, label3, null);
16405
16654
  insert(_el$0, createComponent(Show, {
@@ -16407,7 +16656,7 @@ function Steps(props) {
16407
16656
  return memo(() => i() === 1)() && props.skipPrepare;
16408
16657
  },
16409
16658
  get children() {
16410
- return _tmpl$828();
16659
+ return _tmpl$829();
16411
16660
  }
16412
16661
  }), null);
16413
16662
  effect((_p$) => {
@@ -16429,7 +16678,7 @@ function Steps(props) {
16429
16678
  }
16430
16679
  function Waiting2(props) {
16431
16680
  return (() => {
16432
- var _el$11 = _tmpl$022(), _el$12 = _el$11.firstChild, _el$13 = _el$12.nextSibling;
16681
+ var _el$11 = _tmpl$023(), _el$12 = _el$11.firstChild, _el$13 = _el$12.nextSibling;
16433
16682
  insert(_el$13, () => props.title);
16434
16683
  insert(_el$11, () => props.children, null);
16435
16684
  return _el$11;
@@ -16445,7 +16694,7 @@ function WhatWillHappen(props) {
16445
16694
  return p()?.stage === "active_not_committed";
16446
16695
  },
16447
16696
  get children() {
16448
- var _el$15 = _tmpl$1103(), _el$16 = _el$15.firstChild, _el$17 = _el$16.firstChild, _el$18 = _el$17.nextSibling, _el$19 = _el$18.nextSibling;
16697
+ var _el$15 = _tmpl$1104(), _el$16 = _el$15.firstChild, _el$17 = _el$16.firstChild, _el$18 = _el$17.nextSibling, _el$19 = _el$18.nextSibling;
16449
16698
  _el$19.$$click = () => void props.flow.reload();
16450
16699
  return _el$15;
16451
16700
  }
@@ -16460,7 +16709,7 @@ function WhatWillHappen(props) {
16460
16709
  return _tmpl$1413();
16461
16710
  },
16462
16711
  get children() {
16463
- var _el$25 = _tmpl$1017(), _el$26 = _el$25.firstChild, _el$27 = _el$26.nextSibling, _el$28 = _el$27.nextSibling, _el$29 = _el$28.nextSibling;
16712
+ 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;
16464
16713
  insert(_el$27, () => target().itemName);
16465
16714
  insert(_el$29, () => target().itemId);
16466
16715
  return _el$25;
@@ -16471,7 +16720,7 @@ function WhatWillHappen(props) {
16471
16720
  return (p()?.blockers.length ?? 0) > 0;
16472
16721
  },
16473
16722
  get children() {
16474
- var _el$31 = _tmpl$1118(); _el$31.firstChild;
16723
+ var _el$31 = _tmpl$1119(); _el$31.firstChild;
16475
16724
  insert(_el$31, createComponent(Findings, {
16476
16725
  get items() {
16477
16726
  return p().blockers;
@@ -16486,7 +16735,7 @@ function WhatWillHappen(props) {
16486
16735
  return (p()?.warnings.length ?? 0) > 0;
16487
16736
  },
16488
16737
  get children() {
16489
- var _el$33 = _tmpl$1215(); _el$33.firstChild;
16738
+ var _el$33 = _tmpl$1216(); _el$33.firstChild;
16490
16739
  insert(_el$33, createComponent(Findings, {
16491
16740
  get items() {
16492
16741
  return p().warnings;
@@ -16649,8 +16898,8 @@ function Review2(props) {
16649
16898
  },
16650
16899
  get fallback() {
16651
16900
  return (() => {
16652
- var _el$77 = _tmpl$288();
16653
- effect((_$p) => style(_el$77, hint4, _$p));
16901
+ var _el$77 = _tmpl$2810();
16902
+ effect((_$p) => style(_el$77, hint5, _$p));
16654
16903
  return _el$77;
16655
16904
  })();
16656
16905
  },
@@ -16678,7 +16927,7 @@ function Review2(props) {
16678
16927
  var _el$67 = _tmpl$2512(), _el$68 = _el$67.firstChild, _el$69 = _el$68.firstChild, _el$70 = _el$68.nextSibling;
16679
16928
  insert(_el$68, () => props.flow.undecidedCount(), _el$69);
16680
16929
  _el$70.$$click = () => props.flow.leaveUndecidedUnmatched();
16681
- effect((_$p) => style(_el$68, hint4, _$p));
16930
+ effect((_$p) => style(_el$68, hint5, _$p));
16682
16931
  return _el$67;
16683
16932
  }
16684
16933
  }), null);
@@ -16732,7 +16981,7 @@ function Confirm(props) {
16732
16981
  return summary.carried;
16733
16982
  },
16734
16983
  children: (c) => (() => {
16735
- var _el$98 = _tmpl$356(), _el$99 = _el$98.firstChild, _el$100 = _el$99.nextSibling;
16984
+ var _el$98 = _tmpl$357(), _el$99 = _el$98.firstChild, _el$100 = _el$99.nextSibling;
16736
16985
  insert(_el$98, () => c.label, _el$99);
16737
16986
  insert(_el$98, createComponent(Show, {
16738
16987
  get when() {
@@ -16789,7 +17038,7 @@ function Confirm(props) {
16789
17038
  },
16790
17039
  get children() {
16791
17040
  return [(() => {
16792
- var _el$107 = _tmpl$281();
17041
+ var _el$107 = _tmpl$288();
16793
17042
  insert(_el$107, () => fmtPrice(x.price));
16794
17043
  return _el$107;
16795
17044
  })(), createComponent(Show, {
@@ -16816,7 +17065,7 @@ function Confirm(props) {
16816
17065
  }
16817
17066
  }), (() => {
16818
17067
  var _el$97 = _tmpl$3412();
16819
- effect((_$p) => style(_el$97, hint4, _$p));
17068
+ effect((_$p) => style(_el$97, hint5, _$p));
16820
17069
  return _el$97;
16821
17070
  })()]
16822
17071
  }));
@@ -16872,11 +17121,11 @@ function UndoSection(props) {
16872
17121
  }), null);
16873
17122
  effect((_p$) => {
16874
17123
  var _v$13 = {
16875
- ...hint4
17124
+ ...hint5
16876
17125
  }, _v$14 = {
16877
- ...hint4
17126
+ ...hint5
16878
17127
  }, _v$15 = props.flow.busy(), _v$16 = {
16879
- ...hint4
17128
+ ...hint5
16880
17129
  };
16881
17130
  _p$.e = style(_el$111, _v$13, _p$.e);
16882
17131
  _p$.t = style(_el$113, _v$14, _p$.t);
@@ -16910,9 +17159,9 @@ function UndoneReport(props) {
16910
17159
  return r.item.deactivated;
16911
17160
  },
16912
17161
  get children() {
16913
- var _el$132 = _tmpl$445(), _el$133 = _el$132.firstChild, _el$134 = _el$133.nextSibling;
17162
+ var _el$132 = _tmpl$446(), _el$133 = _el$132.firstChild, _el$134 = _el$133.nextSibling;
16914
17163
  insert(_el$134, () => r.item.id);
16915
- effect((_$p) => style(_el$132, hint4, _$p));
17164
+ effect((_$p) => style(_el$132, hint5, _$p));
16916
17165
  return _el$132;
16917
17166
  }
16918
17167
  }), createComponent(Show, {
@@ -16939,7 +17188,7 @@ function UndoneReport(props) {
16939
17188
  },
16940
17189
  get children() {
16941
17190
  var _el$139 = _tmpl$463();
16942
- effect((_$p) => style(_el$139, hint4, _$p));
17191
+ effect((_$p) => style(_el$139, hint5, _$p));
16943
17192
  return _el$139;
16944
17193
  }
16945
17194
  }), createComponent(Show, {
@@ -16950,7 +17199,7 @@ function UndoneReport(props) {
16950
17199
  var _el$140 = _tmpl$473(), _el$141 = _el$140.firstChild, _el$142 = _el$141.nextSibling, _el$143 = _el$142.nextSibling, _el$146 = _el$143.nextSibling; _el$146.nextSibling;
16951
17200
  insert(_el$142, () => r.item.id);
16952
17201
  insert(_el$140, () => r.otherProductsOnItem.join(", "), _el$146);
16953
- effect((_$p) => style(_el$140, hint4, _$p));
17202
+ effect((_$p) => style(_el$140, hint5, _$p));
16954
17203
  return _el$140;
16955
17204
  }
16956
17205
  }), (() => {
@@ -17290,8 +17539,8 @@ function CatalogConversionDialog(props) {
17290
17539
  return createComponent(Waiting2, {
17291
17540
  title: "Creating the catalog item\u2026",
17292
17541
  get children() {
17293
- var _el$173 = _tmpl$636();
17294
- effect((_$p) => style(_el$173, hint4, _$p));
17542
+ var _el$173 = _tmpl$637();
17543
+ effect((_$p) => style(_el$173, hint5, _$p));
17295
17544
  return _el$173;
17296
17545
  }
17297
17546
  });
@@ -17338,7 +17587,7 @@ function CatalogConversionDialog(props) {
17338
17587
  },
17339
17588
  get children() {
17340
17589
  var _el$175 = _tmpl$653();
17341
- effect((_$p) => style(_el$175, hint4, _$p));
17590
+ effect((_$p) => style(_el$175, hint5, _$p));
17342
17591
  return _el$175;
17343
17592
  }
17344
17593
  });
@@ -17353,7 +17602,7 @@ function CatalogConversionDialog(props) {
17353
17602
  get children() {
17354
17603
  var _el$176 = _tmpl$663();
17355
17604
  insert(_el$176, () => flow.state().reason === "in_progress" ? "This product\u2019s conversion is still running on the server. We\u2019ll keep checking; nothing else can be started until it ends." : "We lost the connection while converting, but the server may still be finishing. We\u2019ll keep checking; nothing is sent again.");
17356
- effect((_$p) => style(_el$176, hint4, _$p));
17605
+ effect((_$p) => style(_el$176, hint5, _$p));
17357
17606
  return _el$176;
17358
17607
  }
17359
17608
  });
@@ -17477,7 +17726,7 @@ function CatalogConversionStatusSection(props) {
17477
17726
  return flow.state().kind === "finish_activation";
17478
17727
  },
17479
17728
  get children() {
17480
- return _tmpl$733();
17729
+ return _tmpl$734();
17481
17730
  }
17482
17731
  }), null);
17483
17732
  insert(_el$202, createComponent(Show, {
@@ -17502,20 +17751,20 @@ function CatalogConversionStatusSection(props) {
17502
17751
  delegateEvents(["click"]);
17503
17752
 
17504
17753
  // src/pages/admin/Products.tsx
17505
- var _tmpl$289 = /* @__PURE__ */ template(`<div style="background:var(--app-admin-danger-bg);color:var(--app-admin-danger-fg);font-size:0.75rem;padding:0.5rem 0.75rem;border-radius:var(--app-admin-radius-sm);margin-bottom:0.5rem">`);
17506
- var _tmpl$290 = /* @__PURE__ */ template(`<div style=position:relative><img style="width:100%;height:8rem;object-fit:cover;border-radius:var(--app-admin-radius);border:1px solid var(--app-admin-border)"><div style="position:absolute;inset:0;background:rgba(0,0,0,0.6);border-radius:var(--app-admin-radius);display:flex;align-items:center;justify-content:center;gap:0.75rem;opacity:0;transition:opacity 0.15s"><button type=button class="app-admin-btn app-admin-btn-ghost"style=background:rgba(255,255,255,0.15);color:white></button><button type=button class="app-admin-btn app-admin-btn-danger">Remove`);
17507
- var _tmpl$357 = /* @__PURE__ */ template(`<div style=margin-bottom:1.25rem><input type=file accept=image/* style=display:none>`);
17508
- var _tmpl$446 = /* @__PURE__ */ template(`<button type=button style="width:100%;height:8rem;border:2px dashed var(--app-admin-border-strong);border-radius:var(--app-admin-radius);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:0.5rem;color:var(--app-admin-fg-muted);background:transparent;cursor:pointer;font-size:0.75rem"><span>\u{1F4F7}</span><span>`);
17509
- var _tmpl$540 = /* @__PURE__ */ template(`<option value>`);
17510
- var _tmpl$637 = /* @__PURE__ */ template(`<option>`);
17511
- var _tmpl$734 = /* @__PURE__ */ template(`<div class="app-admin-banner app-admin-banner--danger"role=status><strong>No price set.</strong> `);
17512
- var _tmpl$829 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-ghost"style=margin-top:0.5rem;font-size:0.75rem>Use Default from Apex`);
17513
- var _tmpl$926 = /* @__PURE__ */ template(`<span class=app-admin-text-muted> \u2014 required to add to store`);
17514
- var _tmpl$023 = /* @__PURE__ */ template(`<div id=admin-product-price-error class=app-admin-field-error role=alert>`);
17515
- var _tmpl$1104 = /* @__PURE__ */ template(`<p style=font-size:0.75rem;color:var(--app-admin-fg-muted);margin:0;line-height:1.4>One strength: <span class=app-admin-text-mono></span> \u2014 the price above is the price. A compounded blend lists every ingredient's strength in that one label.`);
17516
- var _tmpl$1018 = /* @__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">`);
17517
- var _tmpl$1119 = /* @__PURE__ */ template(`<select class=app-admin-input><option value>Lowest available strength`);
17518
- var _tmpl$1216 = /* @__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.`);
17754
+ var _tmpl$290 = /* @__PURE__ */ template(`<div style="background:var(--app-admin-danger-bg);color:var(--app-admin-danger-fg);font-size:0.75rem;padding:0.5rem 0.75rem;border-radius:var(--app-admin-radius-sm);margin-bottom:0.5rem">`);
17755
+ var _tmpl$291 = /* @__PURE__ */ template(`<div style=position:relative><img style="width:100%;height:8rem;object-fit:cover;border-radius:var(--app-admin-radius);border:1px solid var(--app-admin-border)"><div style="position:absolute;inset:0;background:rgba(0,0,0,0.6);border-radius:var(--app-admin-radius);display:flex;align-items:center;justify-content:center;gap:0.75rem;opacity:0;transition:opacity 0.15s"><button type=button class="app-admin-btn app-admin-btn-ghost"style=background:rgba(255,255,255,0.15);color:white></button><button type=button class="app-admin-btn app-admin-btn-danger">Remove`);
17756
+ var _tmpl$358 = /* @__PURE__ */ template(`<div style=margin-bottom:1.25rem><input type=file accept=image/* style=display:none>`);
17757
+ var _tmpl$447 = /* @__PURE__ */ template(`<button type=button style="width:100%;height:8rem;border:2px dashed var(--app-admin-border-strong);border-radius:var(--app-admin-radius);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:0.5rem;color:var(--app-admin-fg-muted);background:transparent;cursor:pointer;font-size:0.75rem"><span>\u{1F4F7}</span><span>`);
17758
+ var _tmpl$541 = /* @__PURE__ */ template(`<option value>`);
17759
+ var _tmpl$638 = /* @__PURE__ */ template(`<option>`);
17760
+ var _tmpl$735 = /* @__PURE__ */ template(`<div class="app-admin-banner app-admin-banner--danger"role=status><strong>No price set.</strong> `);
17761
+ var _tmpl$830 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-ghost"style=margin-top:0.5rem;font-size:0.75rem>Use Default from Apex`);
17762
+ var _tmpl$927 = /* @__PURE__ */ template(`<span class=app-admin-text-muted> \u2014 required to add to store`);
17763
+ var _tmpl$024 = /* @__PURE__ */ template(`<div id=admin-product-price-error class=app-admin-field-error role=alert>`);
17764
+ var _tmpl$1105 = /* @__PURE__ */ template(`<p style=font-size:0.75rem;color:var(--app-admin-fg-muted);margin:0;line-height:1.4>One strength: <span class=app-admin-text-mono></span> \u2014 the price above is the price. A compounded blend lists every ingredient's strength in that one label.`);
17765
+ 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
+ var _tmpl$1120 = /* @__PURE__ */ template(`<select class=app-admin-input><option value>Lowest available strength`);
17767
+ 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.`);
17519
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)`);
17520
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`);
17521
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>`);
@@ -17531,14 +17780,14 @@ var _tmpl$2413 = /* @__PURE__ */ template(`<div><div style=padding:1.5rem><div s
17531
17780
  var _tmpl$2513 = /* @__PURE__ */ template(`<button type=button style=font-size:0.75rem>`);
17532
17781
  var _tmpl$2613 = /* @__PURE__ */ template(`<input type=text class=app-admin-input>`);
17533
17782
  var _tmpl$2712 = /* @__PURE__ */ template(`<p style=font-size:0.75rem;color:var(--app-admin-fg-muted);margin:0>This drug publishes no Apex SKUs; requests are sent by drug id only (the prescriber selects the SKU).`);
17534
- var _tmpl$2810 = /* @__PURE__ */ template(`<p style=font-size:0.75rem;color:var(--app-admin-fg-muted);margin:0>`);
17783
+ var _tmpl$2811 = /* @__PURE__ */ template(`<p style=font-size:0.75rem;color:var(--app-admin-fg-muted);margin:0>`);
17535
17784
  var _tmpl$298 = /* @__PURE__ */ template(`<select class=app-admin-input title="The pharmacy product this strength is sent as"style=flex:1;min-width:0>`);
17536
17785
  var _tmpl$307 = /* @__PURE__ */ template(`<div style=display:flex;flex-direction:column;gap:0.25rem><span style=font-size:0.8125rem;color:var(--app-admin-fg)></span><div style=display:flex;gap:0.5rem;align-items:center><input type=number step=0.01 class=app-admin-input style=width:7rem>`);
17537
17786
  var _tmpl$3114 = /* @__PURE__ */ template(`<p style=font-size:0.75rem;color:var(--app-admin-fg-muted);margin:0>No categories defined yet. Create some on the Categories tab.`);
17538
17787
  var _tmpl$3213 = /* @__PURE__ */ template(`<label style=display:flex;align-items:center;gap:0.5rem;font-size:0.875rem;cursor:pointer><input type=checkbox><span>`);
17539
17788
  var _tmpl$3313 = /* @__PURE__ */ template(`<div style=margin-top:0.5rem;font-size:0.75rem;color:var(--app-admin-warning-fg)><div style=margin-bottom:0.25rem>Unknown categories on this product:</div><div style=display:flex;flex-wrap:wrap;gap:0.375rem>`);
17540
17789
  var _tmpl$3413 = /* @__PURE__ */ template(`<span style="display:inline-flex;align-items:center;gap:0.25rem;padding:0.125rem 0.5rem;background:var(--app-admin-warning-bg);border:1px solid var(--app-admin-warning-bg-strong);border-radius:var(--app-admin-radius-sm)"><button type=button title=Remove style=background:none;border:none;color:inherit;cursor:pointer;line-height:1;padding:0>\xD7`);
17541
- var _tmpl$358 = /* @__PURE__ */ template(`<tr><th class=app-admin-table-cell--check><input type=checkbox></th><th>Drug</th><th>Price</th><th class=app-admin-products-col-dosages>Strengths</th><th>Categories</th><th class=app-admin-table-cell--actions><span class=app-admin-sr-only>Actions`);
17790
+ var _tmpl$359 = /* @__PURE__ */ template(`<tr><th class=app-admin-table-cell--check><input type=checkbox></th><th>Drug</th><th>Price</th><th class=app-admin-products-col-dosages>Strengths</th><th>Categories</th><th class=app-admin-table-cell--actions><span class=app-admin-sr-only>Actions`);
17542
17791
  var _tmpl$366 = /* @__PURE__ */ template(`<span class=app-admin-text-muted title="Priced and ready \u2014 check it and press &quot;Add to store&quot;"style=font-size:0.7rem;margin-left:0.5rem;white-space:nowrap>Ready to add`);
17543
17792
  var _tmpl$375 = /* @__PURE__ */ template(`<span style=opacity:0.6;font-size:0.75rem>Set categories`);
17544
17793
  var _tmpl$385 = /* @__PURE__ */ template(`<tr tabindex=0 title="Click to edit price and details; use the checkbox to move it"><td class="app-admin-table-cell--no-label app-admin-table-cell--check"><input type=checkbox></td><td data-label=Drug class=app-admin-table-cell--title><div class=app-admin-product-cell><span class=app-admin-product-thumb></span><div class=app-admin-product-cell__text><span class=app-admin-product-name></span><div class="app-admin-product-id app-admin-text-mono app-admin-text-muted"></div></div></div></td><td data-label=Price class=app-admin-table-cell--num><button type=button></button></td><td data-label=Strengths class="app-admin-text-muted app-admin-products-col-dosages"style=font-size:0.75rem></td><td data-label=Categories class=app-admin-text-muted><button type=button class=app-admin-cell-btn title="Set categories"style=display:flex;flex-wrap:wrap;gap:0.25rem></button></td><td class="app-admin-table-cell--no-label app-admin-table-cell--actions"><button type=button class="app-admin-btn app-admin-btn-ghost app-admin-btn-sm"title="Edit price, strengths, categories and details"><span aria-hidden=true>\u270E</span> Edit`);
@@ -17547,7 +17796,7 @@ var _tmpl$405 = /* @__PURE__ */ template(`<span>Needs a price`);
17547
17796
  var _tmpl$4112 = /* @__PURE__ */ template(`<span class=app-admin-text-muted style=font-size:0.75rem>`);
17548
17797
  var _tmpl$4212 = /* @__PURE__ */ template(`<span style=opacity:0.5>-`);
17549
17798
  var _tmpl$4312 = /* @__PURE__ */ template(`<span style="padding:0.125rem 0.375rem;background:rgba(127,127,127,0.1);border-radius:var(--app-admin-radius-sm);font-size:0.75rem">`);
17550
- var _tmpl$447 = /* @__PURE__ */ template(`<p id=new-rx-product-blocked class=app-admin-text-muted style="flex:1 1 100%;margin:0;font-size:0.8125rem">`);
17799
+ var _tmpl$448 = /* @__PURE__ */ template(`<p id=new-rx-product-blocked class=app-admin-text-muted style="flex:1 1 100%;margin:0;font-size:0.8125rem">`);
17551
17800
  var _tmpl$454 = /* @__PURE__ */ template(`<div style=display:flex;gap:0.75rem;align-items:center;flex-wrap:wrap;margin-bottom:1.25rem><div style="flex:1 1 16rem;max-width:28rem"><input type=search placeholder="Search by drug, ID, or category"aria-label="Search products"class=app-admin-input></div><button type=button class="app-admin-btn app-admin-btn-primary">New prescription product`);
17552
17801
  var _tmpl$464 = /* @__PURE__ */ template(`<table class=app-admin-table><thead></thead><tbody>`);
17553
17802
  var _tmpl$474 = /* @__PURE__ */ template(`<div class=app-admin-products-panes-host><div class=app-admin-products-transfer role=group aria-label="Move checked products"><button type=button class="app-admin-btn app-admin-btn-primary"></button><button type=button class="app-admin-btn app-admin-btn-ghost"></button></div><div class=app-admin-products-panes><section class=app-admin-section aria-labelledby=admin-products-available-title><div class=app-admin-section-header><h2 class=app-admin-section-title id=admin-products-available-title>Available to add<span class=app-admin-section-count></span></h2></div></section><section class=app-admin-section aria-labelledby=admin-products-store-title><div class=app-admin-section-header><h2 class=app-admin-section-title id=admin-products-store-title>In your store<span class=app-admin-section-count>`);
@@ -17658,7 +17907,7 @@ function ThumbnailUpload(props) {
17658
17907
  }
17659
17908
  };
17660
17909
  return (() => {
17661
- var _el$ = _tmpl$357(), _el$2 = _el$.firstChild;
17910
+ var _el$ = _tmpl$358(), _el$2 = _el$.firstChild;
17662
17911
  _el$2.addEventListener("change", (e) => {
17663
17912
  const file = e.currentTarget.files?.[0];
17664
17913
  if (file) handleFile(file);
@@ -17671,7 +17920,7 @@ function ThumbnailUpload(props) {
17671
17920
  return error();
17672
17921
  },
17673
17922
  get children() {
17674
- var _el$3 = _tmpl$289();
17923
+ var _el$3 = _tmpl$290();
17675
17924
  insert(_el$3, error);
17676
17925
  return _el$3;
17677
17926
  }
@@ -17682,7 +17931,7 @@ function ThumbnailUpload(props) {
17682
17931
  },
17683
17932
  get fallback() {
17684
17933
  return (() => {
17685
- var _el$9 = _tmpl$446(), _el$0 = _el$9.firstChild, _el$1 = _el$0.nextSibling;
17934
+ var _el$9 = _tmpl$447(), _el$0 = _el$9.firstChild, _el$1 = _el$0.nextSibling;
17686
17935
  _el$9.$$click = () => fileInput.click();
17687
17936
  insert(_el$1, () => uploading() ? "Uploading\u2026" : "Add thumbnail");
17688
17937
  effect(() => _el$9.disabled = uploading());
@@ -17690,7 +17939,7 @@ function ThumbnailUpload(props) {
17690
17939
  })();
17691
17940
  },
17692
17941
  get children() {
17693
- var _el$4 = _tmpl$290(), _el$5 = _el$4.firstChild, _el$6 = _el$5.nextSibling, _el$7 = _el$6.firstChild, _el$8 = _el$7.nextSibling;
17942
+ var _el$4 = _tmpl$291(), _el$5 = _el$4.firstChild, _el$6 = _el$5.nextSibling, _el$7 = _el$6.firstChild, _el$8 = _el$7.nextSibling;
17694
17943
  _el$6.addEventListener("mouseleave", (e) => e.currentTarget.style.opacity = "0");
17695
17944
  _el$6.addEventListener("mouseenter", (e) => e.currentTarget.style.opacity = "1");
17696
17945
  _el$7.$$click = () => fileInput.click();
@@ -17717,7 +17966,7 @@ function ThumbnailUpload(props) {
17717
17966
  }
17718
17967
  function SkuSelectOptions(props) {
17719
17968
  return [(() => {
17720
- var _el$10 = _tmpl$540();
17969
+ var _el$10 = _tmpl$541();
17721
17970
  insert(_el$10, () => props.placeholder);
17722
17971
  return _el$10;
17723
17972
  })(), createComponent(For, {
@@ -17725,7 +17974,7 @@ function SkuSelectOptions(props) {
17725
17974
  return props.skus;
17726
17975
  },
17727
17976
  children: (s) => (() => {
17728
- var _el$11 = _tmpl$637();
17977
+ var _el$11 = _tmpl$638();
17729
17978
  insert(_el$11, () => s.label, null);
17730
17979
  insert(_el$11, () => s.active === false ? " (inactive)" : "", null);
17731
17980
  effect(() => _el$11.value = s.id);
@@ -17755,6 +18004,14 @@ function ProductEditPanel(props) {
17755
18004
  enabled: isCatalog,
17756
18005
  onProductChanged: () => props.onRefresh()
17757
18006
  });
18007
+ const strengthMatches = useStrengthMatches({
18008
+ product: () => editor.product(),
18009
+ enabled: isCatalog,
18010
+ onChanged: async () => {
18011
+ await editor.reload();
18012
+ await props.onStrengthMatchChanged?.();
18013
+ }
18014
+ });
17758
18015
  const apexDosages = () => props.apexDrug?.dosages ?? [];
17759
18016
  const singleStrength = () => !isCatalog() && !loadingDosages() && apexDosages().length === 1;
17760
18017
  const apexSkus = () => props.apexDrug?.skus ?? [];
@@ -17952,7 +18209,7 @@ function ProductEditPanel(props) {
17952
18209
  return !formIsPriced();
17953
18210
  },
17954
18211
  get children() {
17955
- var _el$17 = _tmpl$734(), _el$18 = _el$17.firstChild; _el$18.nextSibling;
18212
+ var _el$17 = _tmpl$735(), _el$18 = _el$17.firstChild; _el$18.nextSibling;
17956
18213
  insert(_el$17, () => props.product.active ? "Customers can see this product but cannot buy it. Set a price below." : "Set a price below before this product can be added to your store.", null);
17957
18214
  return _el$17;
17958
18215
  }
@@ -17983,7 +18240,7 @@ function ProductEditPanel(props) {
17983
18240
  return memo(() => !!apexAdCopy())() && apexAdCopy() !== description();
17984
18241
  },
17985
18242
  get children() {
17986
- var _el$29 = _tmpl$829();
18243
+ var _el$29 = _tmpl$830();
17987
18244
  _el$29.$$click = () => setDescription(apexAdCopy());
17988
18245
  return _el$29;
17989
18246
  }
@@ -17993,7 +18250,7 @@ function ProductEditPanel(props) {
17993
18250
  return !props.product.active;
17994
18251
  },
17995
18252
  get children() {
17996
- return _tmpl$926();
18253
+ return _tmpl$927();
17997
18254
  }
17998
18255
  }), null);
17999
18256
  _el$34.$$input = (e) => setPrice(e.currentTarget.value);
@@ -18004,7 +18261,7 @@ function ProductEditPanel(props) {
18004
18261
  return priceError();
18005
18262
  },
18006
18263
  get children() {
18007
- var _el$35 = _tmpl$023();
18264
+ var _el$35 = _tmpl$024();
18008
18265
  insert(_el$35, priceError);
18009
18266
  return _el$35;
18010
18267
  }
@@ -18014,7 +18271,7 @@ function ProductEditPanel(props) {
18014
18271
  return singleStrength();
18015
18272
  },
18016
18273
  get children() {
18017
- var _el$36 = _tmpl$1104(), _el$37 = _el$36.firstChild, _el$38 = _el$37.nextSibling;
18274
+ var _el$36 = _tmpl$1105(), _el$37 = _el$36.firstChild, _el$38 = _el$37.nextSibling;
18018
18275
  insert(_el$38, () => apexDosages()[0]);
18019
18276
  return _el$36;
18020
18277
  }
@@ -18024,7 +18281,7 @@ function ProductEditPanel(props) {
18024
18281
  return !singleStrength();
18025
18282
  },
18026
18283
  get children() {
18027
- var _el$39 = _tmpl$1018(), _el$40 = _el$39.firstChild, _el$41 = _el$40.nextSibling, _el$42 = _el$41.nextSibling;
18284
+ var _el$39 = _tmpl$1019(), _el$40 = _el$39.firstChild, _el$41 = _el$40.nextSibling, _el$42 = _el$41.nextSibling;
18028
18285
  insert(_el$41, createComponent(For, {
18029
18286
  each: ["per_dose", "flat_fee"],
18030
18287
  children: (mode) => (() => {
@@ -18044,7 +18301,7 @@ function ProductEditPanel(props) {
18044
18301
  return memo(() => !!(!isCatalog() && !singleStrength()))() && pricingMode() === "per_dose";
18045
18302
  },
18046
18303
  get children() {
18047
- var _el$43 = _tmpl$1216(), _el$44 = _el$43.firstChild, _el$47 = _el$44.nextSibling;
18304
+ var _el$43 = _tmpl$1217(), _el$44 = _el$43.firstChild, _el$47 = _el$44.nextSibling;
18048
18305
  insert(_el$43, createComponent(Show, {
18049
18306
  get when() {
18050
18307
  return apexDosages().length > 0;
@@ -18059,14 +18316,14 @@ function ProductEditPanel(props) {
18059
18316
  })();
18060
18317
  },
18061
18318
  get children() {
18062
- var _el$45 = _tmpl$1119(); _el$45.firstChild;
18319
+ var _el$45 = _tmpl$1120(); _el$45.firstChild;
18063
18320
  _el$45.addEventListener("change", (e) => setDosageOverride(e.currentTarget.value));
18064
18321
  insert(_el$45, createComponent(For, {
18065
18322
  get each() {
18066
18323
  return apexDosages();
18067
18324
  },
18068
18325
  children: (d) => (() => {
18069
- var _el$87 = _tmpl$637();
18326
+ var _el$87 = _tmpl$638();
18070
18327
  _el$87.value = d;
18071
18328
  insert(_el$87, d);
18072
18329
  return _el$87;
@@ -18098,6 +18355,11 @@ function ProductEditPanel(props) {
18098
18355
  get flatFee() {
18099
18356
  return pricingMode() === "flat_fee";
18100
18357
  }
18358
+ }), createComponent(StrengthMatchesSection, {
18359
+ flow: strengthMatches,
18360
+ get unsaved() {
18361
+ return hasUnsavedEdits();
18362
+ }
18101
18363
  })];
18102
18364
  }
18103
18365
  }), _el$68);
@@ -18174,7 +18436,7 @@ function ProductEditPanel(props) {
18174
18436
  },
18175
18437
  get fallback() {
18176
18438
  return (() => {
18177
- var _el$89 = _tmpl$2810();
18439
+ var _el$89 = _tmpl$2811();
18178
18440
  insert(_el$89, () => loadingDosages() ? "Loading strengths\u2026" : "No strengths available from the pharmacy yet.");
18179
18441
  return _el$89;
18180
18442
  })();
@@ -18450,6 +18712,19 @@ function Products(props) {
18450
18712
  toastSuccess(`${added.pharmacyName} added. Reopen the product from the list.`);
18451
18713
  }
18452
18714
  };
18715
+ const handleStrengthMatchChanged = async (productId) => {
18716
+ refresh();
18717
+ try {
18718
+ const {
18719
+ product
18720
+ } = await adminApi.getProduct(productId);
18721
+ setEditingProduct(product);
18722
+ toastSuccess("Subscribers\u2019 strengths updated.");
18723
+ } catch {
18724
+ setEditingProduct(null);
18725
+ toastSuccess("Updated. Reopen the product from the list.");
18726
+ }
18727
+ };
18453
18728
  const legacyRxCount = createMemo(() => (products() ?? []).filter((p) => p.apexDrugId && !isCatalogItemId(p.apexDrugId)).length);
18454
18729
  const canCreateCatalogProduct = () => legacyRxCount() === 0;
18455
18730
  const createBlockedNote = () => "New prescription products can\u2019t be created on this site yet.";
@@ -18758,7 +19033,7 @@ function Products(props) {
18758
19033
  const all = () => list.length > 0 && list.every(isChecked);
18759
19034
  const some = () => !all() && list.some(isChecked);
18760
19035
  return (() => {
18761
- var _el$104 = _tmpl$358(), _el$105 = _el$104.firstChild, _el$106 = _el$105.firstChild;
19036
+ var _el$104 = _tmpl$359(), _el$105 = _el$104.firstChild, _el$106 = _el$105.firstChild;
18762
19037
  _el$106.addEventListener("change", (e) => setCheckedFor(list.map((x) => x.drugId), e.currentTarget.checked));
18763
19038
  use((el) => createEffect(() => el.indeterminate = some()), _el$106);
18764
19039
  effect(() => setAttribute(_el$106, "aria-label", `Select all ${list.length} shown in ${listLabel}`));
@@ -18922,7 +19197,7 @@ function Products(props) {
18922
19197
  return !canCreateCatalogProduct();
18923
19198
  },
18924
19199
  get children() {
18925
- var _el$136 = _tmpl$447();
19200
+ var _el$136 = _tmpl$448();
18926
19201
  insert(_el$136, createBlockedNote);
18927
19202
  return _el$136;
18928
19203
  }
@@ -19158,6 +19433,7 @@ function Products(props) {
19158
19433
  onRefresh: refresh,
19159
19434
  onConversionChanged: (change) => void handleConversionChanged(product().id, change),
19160
19435
  onPharmacyAdded: (added) => void handlePharmacyAdded(product().id, added),
19436
+ onStrengthMatchChanged: () => handleStrengthMatchChanged(product().id),
19161
19437
  onClose: () => setEditingProduct(null),
19162
19438
  onDirtyProbe: (fn) => editorIsDirty = fn,
19163
19439
  onRemove: () => {
@@ -19232,20 +19508,20 @@ function daysAgo(iso) {
19232
19508
  }
19233
19509
 
19234
19510
  // src/pages/admin/Offers.tsx
19235
- var _tmpl$291 = /* @__PURE__ */ template(`<div role=alert style="background:var(--app-admin-danger-bg);color:var(--app-admin-danger-fg);border:1px solid var(--app-admin-danger-bg-strong);font-size:0.875rem;border-radius:var(--app-admin-radius-sm);padding:0.5rem 0.75rem;margin-bottom:1rem">`);
19236
- var _tmpl$299 = /* @__PURE__ */ template(`<p class=app-admin-text-muted style=font-size:0.8125rem;margin:0>Changes apply to grants issued from now on. Grants already issued keep the terms they were issued with.`);
19237
- var _tmpl$359 = /* @__PURE__ */ template(`<input type=number min=1 max=120 aria-label="Number of further charges"class=app-admin-input style=margin-top:0.5rem>`);
19238
- var _tmpl$448 = /* @__PURE__ */ template(`<div class=app-admin-side-panel style=width:440px><div style=padding:1.5rem><div style=display:flex;align-items:center;justify-content:space-between;margin-bottom:1.5rem><h2 class=app-admin-heading style=font-size:1.125rem;margin:0></h2><button type=button class="app-admin-btn app-admin-btn-ghost"aria-label=Close style="border:none;padding:0.25rem 0.5rem;font-size:1.25rem">\xD7</button></div><div style=display:flex;flex-direction:column;gap:1rem><div><label class=app-admin-label for=offer-name>Name</label><input id=offer-name type=text maxlength=120 placeholder="$10 off every month"class=app-admin-input></div><div style="display:grid;grid-template-columns:1fr 1fr;gap:0.75rem"><div><label class=app-admin-label for=offer-discount-type>Discount type</label><select id=offer-discount-type class=app-admin-input><option value=fixed>Fixed $ off</option><option value=percent>Percent off</option></select></div><div><label class=app-admin-label for=offer-discount-value></label><input id=offer-discount-value type=number min=0 class=app-admin-input></div></div><div><label class=app-admin-label for=offer-duration>Applies to</label><select id=offer-duration class=app-admin-input><option value=indefinite>Every charge</option><option value=none>First charge only</option><option value=finite>First charge + N further charges</option></select></div><div><label class=app-admin-label>Products <span style=text-transform:none;letter-spacing:normal;opacity:0.7>(none ticked = any product)</span></label><div class=app-admin-card-soft style=padding:0.5rem;max-height:11rem;overflow-y:auto></div></div><label style=display:flex;align-items:flex-start;gap:0.5rem><input type=checkbox><span style=font-size:0.875rem>Active<span class=app-admin-text-muted style=display:block;font-size:0.75rem>Off: nobody new is given it. People already holding it keep it.</span></span></label><div style=display:flex;gap:0.75rem;padding-top:0.5rem><button type=button class="app-admin-btn app-admin-btn-ghost"style=flex:1>Cancel</button><button type=button class="app-admin-btn app-admin-btn-primary"style=flex:1>`);
19239
- var _tmpl$541 = /* @__PURE__ */ template(`<div style=color:var(--app-admin-fg-muted);font-size:0.875rem;padding:0.5rem>No products available.`);
19240
- var _tmpl$638 = /* @__PURE__ */ template(`<label style="display:flex;align-items:center;gap:0.5rem;padding:0.375rem 0.5rem;border-radius:var(--app-admin-radius-sm);cursor:pointer"><input type=checkbox><span style=font-size:0.875rem>`);
19241
- var _tmpl$735 = /* @__PURE__ */ template(`<form style=display:flex;gap:0.75rem;align-items:flex-end;flex-wrap:wrap><div style="flex:1 1 16rem"><label class=app-admin-label for=offer-grant-email>Email</label><input id=offer-grant-email type=email required placeholder=person@example.com class=app-admin-input></div><div><label class=app-admin-label for=offer-grant-days>Valid for (days)</label><input id=offer-grant-days type=number min=1 max=365 required class=app-admin-input style=width:7rem></div><button type=submit class="app-admin-btn app-admin-btn-primary">`);
19242
- var _tmpl$830 = /* @__PURE__ */ template(`<p class=app-admin-text-muted style="font-size:0.75rem;margin:0.625rem 0 0">`);
19243
- var _tmpl$927 = /* @__PURE__ */ template(`<table class=app-admin-table><thead><tr><th>Person</th><th>State</th><th>Deadline to claim</th><th>Issued by</th><th></th></tr></thead><tbody>`);
19244
- var _tmpl$024 = /* @__PURE__ */ template(`<div style="padding:0.75rem 1.25rem"><button type=button class="app-admin-btn app-admin-btn-sm">Load more`);
19245
- var _tmpl$1105 = /* @__PURE__ */ template(`<div><div class=app-admin-section-stack>`);
19246
- var _tmpl$1019 = /* @__PURE__ */ template(`<span>`);
19247
- var _tmpl$1120 = /* @__PURE__ */ template(`<button type=button class=app-admin-link-btn style=font-size:inherit>`);
19248
- var _tmpl$1217 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-ghost app-admin-btn-sm">Revoke`);
19511
+ var _tmpl$299 = /* @__PURE__ */ template(`<div role=alert style="background:var(--app-admin-danger-bg);color:var(--app-admin-danger-fg);border:1px solid var(--app-admin-danger-bg-strong);font-size:0.875rem;border-radius:var(--app-admin-radius-sm);padding:0.5rem 0.75rem;margin-bottom:1rem">`);
19512
+ var _tmpl$2100 = /* @__PURE__ */ template(`<p class=app-admin-text-muted style=font-size:0.8125rem;margin:0>Changes apply to grants issued from now on. Grants already issued keep the terms they were issued with.`);
19513
+ var _tmpl$360 = /* @__PURE__ */ template(`<input type=number min=1 max=120 aria-label="Number of further charges"class=app-admin-input style=margin-top:0.5rem>`);
19514
+ var _tmpl$449 = /* @__PURE__ */ template(`<div class=app-admin-side-panel style=width:440px><div style=padding:1.5rem><div style=display:flex;align-items:center;justify-content:space-between;margin-bottom:1.5rem><h2 class=app-admin-heading style=font-size:1.125rem;margin:0></h2><button type=button class="app-admin-btn app-admin-btn-ghost"aria-label=Close style="border:none;padding:0.25rem 0.5rem;font-size:1.25rem">\xD7</button></div><div style=display:flex;flex-direction:column;gap:1rem><div><label class=app-admin-label for=offer-name>Name</label><input id=offer-name type=text maxlength=120 placeholder="$10 off every month"class=app-admin-input></div><div style="display:grid;grid-template-columns:1fr 1fr;gap:0.75rem"><div><label class=app-admin-label for=offer-discount-type>Discount type</label><select id=offer-discount-type class=app-admin-input><option value=fixed>Fixed $ off</option><option value=percent>Percent off</option></select></div><div><label class=app-admin-label for=offer-discount-value></label><input id=offer-discount-value type=number min=0 class=app-admin-input></div></div><div><label class=app-admin-label for=offer-duration>Applies to</label><select id=offer-duration class=app-admin-input><option value=indefinite>Every charge</option><option value=none>First charge only</option><option value=finite>First charge + N further charges</option></select></div><div><label class=app-admin-label>Products <span style=text-transform:none;letter-spacing:normal;opacity:0.7>(none ticked = any product)</span></label><div class=app-admin-card-soft style=padding:0.5rem;max-height:11rem;overflow-y:auto></div></div><label style=display:flex;align-items:flex-start;gap:0.5rem><input type=checkbox><span style=font-size:0.875rem>Active<span class=app-admin-text-muted style=display:block;font-size:0.75rem>Off: nobody new is given it. People already holding it keep it.</span></span></label><div style=display:flex;gap:0.75rem;padding-top:0.5rem><button type=button class="app-admin-btn app-admin-btn-ghost"style=flex:1>Cancel</button><button type=button class="app-admin-btn app-admin-btn-primary"style=flex:1>`);
19515
+ var _tmpl$544 = /* @__PURE__ */ template(`<div style=color:var(--app-admin-fg-muted);font-size:0.875rem;padding:0.5rem>No products available.`);
19516
+ var _tmpl$639 = /* @__PURE__ */ template(`<label style="display:flex;align-items:center;gap:0.5rem;padding:0.375rem 0.5rem;border-radius:var(--app-admin-radius-sm);cursor:pointer"><input type=checkbox><span style=font-size:0.875rem>`);
19517
+ var _tmpl$736 = /* @__PURE__ */ template(`<form style=display:flex;gap:0.75rem;align-items:flex-end;flex-wrap:wrap><div style="flex:1 1 16rem"><label class=app-admin-label for=offer-grant-email>Email</label><input id=offer-grant-email type=email required placeholder=person@example.com class=app-admin-input></div><div><label class=app-admin-label for=offer-grant-days>Valid for (days)</label><input id=offer-grant-days type=number min=1 max=365 required class=app-admin-input style=width:7rem></div><button type=submit class="app-admin-btn app-admin-btn-primary">`);
19518
+ var _tmpl$831 = /* @__PURE__ */ template(`<p class=app-admin-text-muted style="font-size:0.75rem;margin:0.625rem 0 0">`);
19519
+ var _tmpl$928 = /* @__PURE__ */ template(`<table class=app-admin-table><thead><tr><th>Person</th><th>State</th><th>Deadline to claim</th><th>Issued by</th><th></th></tr></thead><tbody>`);
19520
+ var _tmpl$025 = /* @__PURE__ */ template(`<div style="padding:0.75rem 1.25rem"><button type=button class="app-admin-btn app-admin-btn-sm">Load more`);
19521
+ var _tmpl$1106 = /* @__PURE__ */ template(`<div><div class=app-admin-section-stack>`);
19522
+ var _tmpl$1020 = /* @__PURE__ */ template(`<span>`);
19523
+ var _tmpl$1121 = /* @__PURE__ */ template(`<button type=button class=app-admin-link-btn style=font-size:inherit>`);
19524
+ var _tmpl$1218 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-ghost app-admin-btn-sm">Revoke`);
19249
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>`);
19250
19526
  var _tmpl$1415 = /* @__PURE__ */ template(`<div class=app-admin-alerts style=margin-bottom:1rem>`);
19251
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>`);
@@ -19331,7 +19607,7 @@ function OfferEditPanel(props) {
19331
19607
  }
19332
19608
  };
19333
19609
  return (() => {
19334
- var _el$ = _tmpl$448(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$5 = _el$4.nextSibling, _el$7 = _el$3.nextSibling, _el$9 = _el$7.firstChild, _el$0 = _el$9.firstChild, _el$1 = _el$0.nextSibling, _el$10 = _el$9.nextSibling, _el$11 = _el$10.firstChild, _el$12 = _el$11.firstChild, _el$13 = _el$12.nextSibling, _el$14 = _el$11.nextSibling, _el$15 = _el$14.firstChild, _el$16 = _el$15.nextSibling, _el$17 = _el$10.nextSibling, _el$18 = _el$17.firstChild, _el$19 = _el$18.nextSibling, _el$21 = _el$17.nextSibling, _el$22 = _el$21.firstChild, _el$23 = _el$22.firstChild; _el$23.nextSibling; var _el$26 = _el$22.nextSibling, _el$27 = _el$21.nextSibling, _el$28 = _el$27.firstChild, _el$29 = _el$28.nextSibling, _el$30 = _el$29.firstChild; _el$30.nextSibling; var _el$32 = _el$27.nextSibling, _el$33 = _el$32.firstChild, _el$34 = _el$33.nextSibling;
19610
+ var _el$ = _tmpl$449(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$5 = _el$4.nextSibling, _el$7 = _el$3.nextSibling, _el$9 = _el$7.firstChild, _el$0 = _el$9.firstChild, _el$1 = _el$0.nextSibling, _el$10 = _el$9.nextSibling, _el$11 = _el$10.firstChild, _el$12 = _el$11.firstChild, _el$13 = _el$12.nextSibling, _el$14 = _el$11.nextSibling, _el$15 = _el$14.firstChild, _el$16 = _el$15.nextSibling, _el$17 = _el$10.nextSibling, _el$18 = _el$17.firstChild, _el$19 = _el$18.nextSibling, _el$21 = _el$17.nextSibling, _el$22 = _el$21.firstChild, _el$23 = _el$22.firstChild; _el$23.nextSibling; var _el$26 = _el$22.nextSibling, _el$27 = _el$21.nextSibling, _el$28 = _el$27.firstChild, _el$29 = _el$28.nextSibling, _el$30 = _el$29.firstChild; _el$30.nextSibling; var _el$32 = _el$27.nextSibling, _el$33 = _el$32.firstChild, _el$34 = _el$33.nextSibling;
19335
19611
  insert(_el$4, () => editing() ? "Edit Offer" : "New Offer");
19336
19612
  addEventListener(_el$5, "click", props.onClose, true);
19337
19613
  insert(_el$2, createComponent(Show, {
@@ -19339,7 +19615,7 @@ function OfferEditPanel(props) {
19339
19615
  return error();
19340
19616
  },
19341
19617
  get children() {
19342
- var _el$6 = _tmpl$291();
19618
+ var _el$6 = _tmpl$299();
19343
19619
  insert(_el$6, error);
19344
19620
  return _el$6;
19345
19621
  }
@@ -19349,7 +19625,7 @@ function OfferEditPanel(props) {
19349
19625
  return editing();
19350
19626
  },
19351
19627
  get children() {
19352
- return _tmpl$299();
19628
+ return _tmpl$2100();
19353
19629
  }
19354
19630
  }), _el$9);
19355
19631
  _el$1.$$input = (e) => setName(e.currentTarget.value);
@@ -19362,7 +19638,7 @@ function OfferEditPanel(props) {
19362
19638
  return recurringMode() === "finite";
19363
19639
  },
19364
19640
  get children() {
19365
- var _el$20 = _tmpl$359();
19641
+ var _el$20 = _tmpl$360();
19366
19642
  _el$20.$$input = (e) => setRecurringCharges(parseInt(e.currentTarget.value, 10) || 0);
19367
19643
  effect(() => _el$20.value = recurringCharges());
19368
19644
  return _el$20;
@@ -19373,7 +19649,7 @@ function OfferEditPanel(props) {
19373
19649
  return props.products.length > 0;
19374
19650
  },
19375
19651
  get fallback() {
19376
- return _tmpl$541();
19652
+ return _tmpl$544();
19377
19653
  },
19378
19654
  get children() {
19379
19655
  return createComponent(For, {
@@ -19381,7 +19657,7 @@ function OfferEditPanel(props) {
19381
19657
  return props.products;
19382
19658
  },
19383
19659
  children: (p) => (() => {
19384
- var _el$36 = _tmpl$638(), _el$37 = _el$36.firstChild, _el$38 = _el$37.nextSibling;
19660
+ var _el$36 = _tmpl$639(), _el$37 = _el$36.firstChild, _el$38 = _el$37.nextSibling;
19385
19661
  _el$37.addEventListener("change", () => toggleProduct(p.id));
19386
19662
  insert(_el$38, () => p.name);
19387
19663
  effect(() => _el$37.checked = productIds().includes(p.id));
@@ -19496,7 +19772,7 @@ function OfferGrants(props) {
19496
19772
  }
19497
19773
  };
19498
19774
  return (() => {
19499
- var _el$39 = _tmpl$1105(), _el$40 = _el$39.firstChild;
19775
+ var _el$39 = _tmpl$1106(), _el$40 = _el$39.firstChild;
19500
19776
  insert(_el$39, createComponent(DetailHeader, {
19501
19777
  backLabel: "Offers",
19502
19778
  onBack: () => props.onBack(),
@@ -19508,7 +19784,7 @@ function OfferGrants(props) {
19508
19784
  },
19509
19785
  get badges() {
19510
19786
  return (() => {
19511
- var _el$55 = _tmpl$1019();
19787
+ var _el$55 = _tmpl$1020();
19512
19788
  insert(_el$55, () => props.offer.isActive ? "active" : "inactive");
19513
19789
  effect(() => className(_el$55, `app-admin-badge ${props.offer.isActive ? "app-admin-badge--success" : "app-admin-badge--neutral"}`));
19514
19790
  return _el$55;
@@ -19519,7 +19795,7 @@ function OfferGrants(props) {
19519
19795
  title: "Give to a person",
19520
19796
  get children() {
19521
19797
  return [(() => {
19522
- var _el$41 = _tmpl$735(), _el$42 = _el$41.firstChild, _el$43 = _el$42.firstChild, _el$44 = _el$43.nextSibling, _el$45 = _el$42.nextSibling, _el$46 = _el$45.firstChild, _el$47 = _el$46.nextSibling, _el$48 = _el$45.nextSibling;
19798
+ var _el$41 = _tmpl$736(), _el$42 = _el$41.firstChild, _el$43 = _el$42.firstChild, _el$44 = _el$43.nextSibling, _el$45 = _el$42.nextSibling, _el$46 = _el$45.firstChild, _el$47 = _el$46.nextSibling, _el$48 = _el$45.nextSibling;
19523
19799
  _el$41.addEventListener("submit", give);
19524
19800
  _el$44.$$input = (e) => setEmail(e.currentTarget.value);
19525
19801
  _el$47.$$input = (e) => setValidDays(Number(e.currentTarget.value));
@@ -19529,7 +19805,7 @@ function OfferGrants(props) {
19529
19805
  effect(() => _el$47.value = validDays());
19530
19806
  return _el$41;
19531
19807
  })(), (() => {
19532
- var _el$49 = _tmpl$830();
19808
+ var _el$49 = _tmpl$831();
19533
19809
  insert(_el$49, () => props.offer.isActive ? "A person holds an offer once. Giving it again returns the grant they already have, with its original deadline." : "This offer is switched off, so it cannot be given to anyone new.");
19534
19810
  return _el$49;
19535
19811
  })()];
@@ -19575,7 +19851,7 @@ function OfferGrants(props) {
19575
19851
  },
19576
19852
  get children() {
19577
19853
  return [(() => {
19578
- var _el$50 = _tmpl$927(), _el$51 = _el$50.firstChild, _el$52 = _el$51.nextSibling;
19854
+ var _el$50 = _tmpl$928(), _el$51 = _el$50.firstChild, _el$52 = _el$51.nextSibling;
19579
19855
  insert(_el$52, createComponent(For, {
19580
19856
  get each() {
19581
19857
  return grants();
@@ -19590,7 +19866,7 @@ function OfferGrants(props) {
19590
19866
  return g.email;
19591
19867
  },
19592
19868
  get children() {
19593
- var _el$58 = _tmpl$1120();
19869
+ var _el$58 = _tmpl$1121();
19594
19870
  _el$58.$$click = () => nav.openCustomer(g.userId);
19595
19871
  insert(_el$58, () => g.email);
19596
19872
  return _el$58;
@@ -19605,7 +19881,7 @@ function OfferGrants(props) {
19605
19881
  return g.state === "open";
19606
19882
  },
19607
19883
  get children() {
19608
- var _el$65 = _tmpl$1217();
19884
+ var _el$65 = _tmpl$1218();
19609
19885
  _el$65.$$click = () => void revoke(g);
19610
19886
  effect((_p$) => {
19611
19887
  var _v$3 = busy() === g.id, _v$4 = `Revoke ${g.email}`;
@@ -19629,7 +19905,7 @@ function OfferGrants(props) {
19629
19905
  return hasMore();
19630
19906
  },
19631
19907
  get children() {
19632
- var _el$53 = _tmpl$024(), _el$54 = _el$53.firstChild;
19908
+ var _el$53 = _tmpl$025(), _el$54 = _el$53.firstChild;
19633
19909
  _el$54.$$click = () => void load(false);
19634
19910
  return _el$53;
19635
19911
  }
@@ -19859,14 +20135,14 @@ function Offers() {
19859
20135
  }
19860
20136
  delegateEvents(["click", "input"]);
19861
20137
  var _tmpl$300 = /* @__PURE__ */ template(`<div style="background:var(--app-admin-danger-bg);color:var(--app-admin-danger-fg);border:1px solid var(--app-admin-danger-bg-strong);font-size:0.875rem;border-radius:var(--app-admin-radius-sm);padding:0.5rem 0.75rem;margin-bottom:1rem">`);
19862
- var _tmpl$2100 = /* @__PURE__ */ template(`<input type=number min=1 placeholder="Number of rebills"class=app-admin-input style=margin-top:0.5rem>`);
19863
- var _tmpl$360 = /* @__PURE__ */ template(`<div class=app-admin-side-panel style=width:440px><div style=padding:1.5rem><div style=display:flex;align-items:center;justify-content:space-between;margin-bottom:1.5rem><h2 class=app-admin-heading style=font-size:1.125rem;margin:0></h2><button type=button class="app-admin-btn app-admin-btn-ghost"style="border:none;padding:0.25rem 0.5rem;font-size:1.25rem">\xD7</button></div><div style=display:flex;flex-direction:column;gap:1rem><div><label class=app-admin-label>Name</label><input type=text placeholder="Spring sale"class=app-admin-input></div><div style="display:grid;grid-template-columns:1fr 1fr;gap:0.75rem"><div><label class=app-admin-label>Discount type</label><select class=app-admin-input><option value=percent>Percent off</option><option value=fixed>Fixed $ off</option></select></div><div><label class=app-admin-label></label><input type=number min=0 class=app-admin-input></div></div><div style="display:grid;grid-template-columns:1fr 1fr;gap:0.75rem"><div><label class=app-admin-label>Start date</label><input type=datetime-local class=app-admin-input></div><div><label class=app-admin-label>End date</label><input type=datetime-local class=app-admin-input></div></div><div><label class=app-admin-label>Products <span style=text-transform:none;letter-spacing:normal;opacity:0.7>(required)</span></label><div class=app-admin-card-soft style=padding:0.5rem;max-height:11rem;overflow-y:auto></div></div><div><label class=app-admin-label>Recurring (subscriptions)</label><select class=app-admin-input><option value=none>Initial charge only</option><option value=finite>First N rebills</option><option value=indefinite>All recurring charges (indefinite)</option></select></div><label style=display:flex;align-items:center;gap:0.5rem;margin-top:0.5rem><input type=checkbox><span style=font-size:0.875rem>Exclusive (cannot stack with other discounts)</span></label><label style=display:flex;align-items:center;gap:0.5rem><input type=checkbox><span style=font-size:0.875rem>Active</span></label><div style=display:flex;gap:0.75rem;padding-top:0.5rem><button type=button class="app-admin-btn app-admin-btn-ghost"style=flex:1>Cancel</button><button type=button class="app-admin-btn app-admin-btn-primary"style=flex:1>`);
19864
- var _tmpl$449 = /* @__PURE__ */ template(`<div style=color:var(--app-admin-fg-muted);font-size:0.875rem;padding:0.5rem>No products available.`);
19865
- var _tmpl$544 = /* @__PURE__ */ template(`<label style="display:flex;align-items:center;gap:0.5rem;padding:0.375rem 0.5rem;border-radius:var(--app-admin-radius-sm);cursor:pointer"><input type=checkbox><span style=font-size:0.875rem>`);
19866
- var _tmpl$639 = /* @__PURE__ */ template(`<div class=app-admin-card style=overflow:hidden><table class=app-admin-table><thead><tr><th>Name</th><th>Discount</th><th>Window</th><th>Products</th><th>Status</th><th style=width:8rem></th></tr></thead><tbody>`);
19867
- var _tmpl$736 = /* @__PURE__ */ template(`<div><div style=display:flex;align-items:center;justify-content:space-between;margin-bottom:2rem><button type=button class="app-admin-btn app-admin-btn-primary">+ New sale`);
19868
- var _tmpl$831 = /* @__PURE__ */ template(`<span style=margin-left:0.5rem;font-size:0.75rem;color:var(--app-admin-warning-fg)>exclusive`);
19869
- var _tmpl$928 = /* @__PURE__ */ template(`<tr><td data-label=Name style=font-weight:500></td><td data-label=Discount></td><td data-label=Window class=app-admin-text-muted> \u2192 </td><td data-label=Products class=app-admin-text-muted></td><td data-label=Status><span></span></td><td data-label=Actions><button type=button style=background:none;border:none;color:var(--app-admin-primary-soft-fg);cursor:pointer;font-size:0.875rem>Edit</button><button type=button style=background:none;border:none;color:var(--app-admin-danger-fg);cursor:pointer;font-size:0.875rem;margin-left:0.75rem>Delete`);
20138
+ var _tmpl$2101 = /* @__PURE__ */ template(`<input type=number min=1 placeholder="Number of rebills"class=app-admin-input style=margin-top:0.5rem>`);
20139
+ var _tmpl$361 = /* @__PURE__ */ template(`<div class=app-admin-side-panel style=width:440px><div style=padding:1.5rem><div style=display:flex;align-items:center;justify-content:space-between;margin-bottom:1.5rem><h2 class=app-admin-heading style=font-size:1.125rem;margin:0></h2><button type=button class="app-admin-btn app-admin-btn-ghost"style="border:none;padding:0.25rem 0.5rem;font-size:1.25rem">\xD7</button></div><div style=display:flex;flex-direction:column;gap:1rem><div><label class=app-admin-label>Name</label><input type=text placeholder="Spring sale"class=app-admin-input></div><div style="display:grid;grid-template-columns:1fr 1fr;gap:0.75rem"><div><label class=app-admin-label>Discount type</label><select class=app-admin-input><option value=percent>Percent off</option><option value=fixed>Fixed $ off</option></select></div><div><label class=app-admin-label></label><input type=number min=0 class=app-admin-input></div></div><div style="display:grid;grid-template-columns:1fr 1fr;gap:0.75rem"><div><label class=app-admin-label>Start date</label><input type=datetime-local class=app-admin-input></div><div><label class=app-admin-label>End date</label><input type=datetime-local class=app-admin-input></div></div><div><label class=app-admin-label>Products <span style=text-transform:none;letter-spacing:normal;opacity:0.7>(required)</span></label><div class=app-admin-card-soft style=padding:0.5rem;max-height:11rem;overflow-y:auto></div></div><div><label class=app-admin-label>Recurring (subscriptions)</label><select class=app-admin-input><option value=none>Initial charge only</option><option value=finite>First N rebills</option><option value=indefinite>All recurring charges (indefinite)</option></select></div><label style=display:flex;align-items:center;gap:0.5rem;margin-top:0.5rem><input type=checkbox><span style=font-size:0.875rem>Exclusive (cannot stack with other discounts)</span></label><label style=display:flex;align-items:center;gap:0.5rem><input type=checkbox><span style=font-size:0.875rem>Active</span></label><div style=display:flex;gap:0.75rem;padding-top:0.5rem><button type=button class="app-admin-btn app-admin-btn-ghost"style=flex:1>Cancel</button><button type=button class="app-admin-btn app-admin-btn-primary"style=flex:1>`);
20140
+ var _tmpl$450 = /* @__PURE__ */ template(`<div style=color:var(--app-admin-fg-muted);font-size:0.875rem;padding:0.5rem>No products available.`);
20141
+ var _tmpl$545 = /* @__PURE__ */ template(`<label style="display:flex;align-items:center;gap:0.5rem;padding:0.375rem 0.5rem;border-radius:var(--app-admin-radius-sm);cursor:pointer"><input type=checkbox><span style=font-size:0.875rem>`);
20142
+ var _tmpl$640 = /* @__PURE__ */ template(`<div class=app-admin-card style=overflow:hidden><table class=app-admin-table><thead><tr><th>Name</th><th>Discount</th><th>Window</th><th>Products</th><th>Status</th><th style=width:8rem></th></tr></thead><tbody>`);
20143
+ var _tmpl$737 = /* @__PURE__ */ template(`<div><div style=display:flex;align-items:center;justify-content:space-between;margin-bottom:2rem><button type=button class="app-admin-btn app-admin-btn-primary">+ New sale`);
20144
+ var _tmpl$832 = /* @__PURE__ */ template(`<span style=margin-left:0.5rem;font-size:0.75rem;color:var(--app-admin-warning-fg)>exclusive`);
20145
+ var _tmpl$929 = /* @__PURE__ */ template(`<tr><td data-label=Name style=font-weight:500></td><td data-label=Discount></td><td data-label=Window class=app-admin-text-muted> \u2192 </td><td data-label=Products class=app-admin-text-muted></td><td data-label=Status><span></span></td><td data-label=Actions><button type=button style=background:none;border:none;color:var(--app-admin-primary-soft-fg);cursor:pointer;font-size:0.875rem>Edit</button><button type=button style=background:none;border:none;color:var(--app-admin-danger-fg);cursor:pointer;font-size:0.875rem;margin-left:0.75rem>Delete`);
19870
20146
  function SaleEditPanel(props) {
19871
20147
  const editing = () => props.sale !== null;
19872
20148
  const initial = props.sale;
@@ -19926,7 +20202,7 @@ function SaleEditPanel(props) {
19926
20202
  }
19927
20203
  };
19928
20204
  return (() => {
19929
- var _el$ = _tmpl$360(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$5 = _el$4.nextSibling, _el$7 = _el$3.nextSibling, _el$8 = _el$7.firstChild, _el$9 = _el$8.firstChild, _el$0 = _el$9.nextSibling, _el$1 = _el$8.nextSibling, _el$10 = _el$1.firstChild, _el$11 = _el$10.firstChild, _el$12 = _el$11.nextSibling, _el$13 = _el$10.nextSibling, _el$14 = _el$13.firstChild, _el$15 = _el$14.nextSibling, _el$16 = _el$1.nextSibling, _el$17 = _el$16.firstChild, _el$18 = _el$17.firstChild, _el$19 = _el$18.nextSibling, _el$20 = _el$17.nextSibling, _el$21 = _el$20.firstChild, _el$22 = _el$21.nextSibling, _el$23 = _el$16.nextSibling, _el$24 = _el$23.firstChild, _el$25 = _el$24.firstChild; _el$25.nextSibling; var _el$28 = _el$24.nextSibling, _el$29 = _el$23.nextSibling, _el$30 = _el$29.firstChild, _el$31 = _el$30.nextSibling, _el$33 = _el$29.nextSibling, _el$34 = _el$33.firstChild; _el$34.nextSibling; var _el$36 = _el$33.nextSibling, _el$37 = _el$36.firstChild; _el$37.nextSibling; var _el$39 = _el$36.nextSibling, _el$40 = _el$39.firstChild, _el$41 = _el$40.nextSibling;
20205
+ var _el$ = _tmpl$361(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$5 = _el$4.nextSibling, _el$7 = _el$3.nextSibling, _el$8 = _el$7.firstChild, _el$9 = _el$8.firstChild, _el$0 = _el$9.nextSibling, _el$1 = _el$8.nextSibling, _el$10 = _el$1.firstChild, _el$11 = _el$10.firstChild, _el$12 = _el$11.nextSibling, _el$13 = _el$10.nextSibling, _el$14 = _el$13.firstChild, _el$15 = _el$14.nextSibling, _el$16 = _el$1.nextSibling, _el$17 = _el$16.firstChild, _el$18 = _el$17.firstChild, _el$19 = _el$18.nextSibling, _el$20 = _el$17.nextSibling, _el$21 = _el$20.firstChild, _el$22 = _el$21.nextSibling, _el$23 = _el$16.nextSibling, _el$24 = _el$23.firstChild, _el$25 = _el$24.firstChild; _el$25.nextSibling; var _el$28 = _el$24.nextSibling, _el$29 = _el$23.nextSibling, _el$30 = _el$29.firstChild, _el$31 = _el$30.nextSibling, _el$33 = _el$29.nextSibling, _el$34 = _el$33.firstChild; _el$34.nextSibling; var _el$36 = _el$33.nextSibling, _el$37 = _el$36.firstChild; _el$37.nextSibling; var _el$39 = _el$36.nextSibling, _el$40 = _el$39.firstChild, _el$41 = _el$40.nextSibling;
19930
20206
  insert(_el$4, () => editing() ? "Edit Sale" : "New Sale");
19931
20207
  addEventListener(_el$5, "click", props.onClose, true);
19932
20208
  insert(_el$2, createComponent(Show, {
@@ -19950,7 +20226,7 @@ function SaleEditPanel(props) {
19950
20226
  return props.products.length > 0;
19951
20227
  },
19952
20228
  get fallback() {
19953
- return _tmpl$449();
20229
+ return _tmpl$450();
19954
20230
  },
19955
20231
  get children() {
19956
20232
  return createComponent(For, {
@@ -19958,7 +20234,7 @@ function SaleEditPanel(props) {
19958
20234
  return props.products;
19959
20235
  },
19960
20236
  children: (p) => (() => {
19961
- var _el$43 = _tmpl$544(), _el$44 = _el$43.firstChild, _el$45 = _el$44.nextSibling;
20237
+ var _el$43 = _tmpl$545(), _el$44 = _el$43.firstChild, _el$45 = _el$44.nextSibling;
19962
20238
  _el$44.addEventListener("change", () => toggleProduct(p.id));
19963
20239
  insert(_el$45, () => p.name);
19964
20240
  effect(() => _el$44.checked = productIds().includes(p.id));
@@ -19973,7 +20249,7 @@ function SaleEditPanel(props) {
19973
20249
  return recurringMode() === "finite";
19974
20250
  },
19975
20251
  get children() {
19976
- var _el$32 = _tmpl$2100();
20252
+ var _el$32 = _tmpl$2101();
19977
20253
  _el$32.$$input = (e) => setRecurringCharges(parseInt(e.currentTarget.value, 10) || 0);
19978
20254
  effect(() => _el$32.value = recurringCharges());
19979
20255
  return _el$32;
@@ -20044,7 +20320,7 @@ function Sales() {
20044
20320
  }
20045
20321
  };
20046
20322
  return (() => {
20047
- var _el$46 = _tmpl$736(), _el$47 = _el$46.firstChild, _el$48 = _el$47.firstChild;
20323
+ var _el$46 = _tmpl$737(), _el$47 = _el$46.firstChild, _el$48 = _el$47.firstChild;
20048
20324
  insert(_el$47, createComponent(PageTitle, {
20049
20325
  subtitle: "Named promotions applied directly to selected products at checkout.",
20050
20326
  children: "Sales"
@@ -20058,20 +20334,20 @@ function Sales() {
20058
20334
  return createComponent(LoadingSpinner, {});
20059
20335
  },
20060
20336
  get children() {
20061
- var _el$49 = _tmpl$639(), _el$50 = _el$49.firstChild, _el$51 = _el$50.firstChild, _el$52 = _el$51.firstChild, _el$53 = _el$52.firstChild, _el$54 = _el$53.nextSibling, _el$55 = _el$54.nextSibling, _el$56 = _el$55.nextSibling, _el$57 = _el$56.nextSibling; _el$57.nextSibling; var _el$59 = _el$51.nextSibling;
20337
+ var _el$49 = _tmpl$640(), _el$50 = _el$49.firstChild, _el$51 = _el$50.firstChild, _el$52 = _el$51.firstChild, _el$53 = _el$52.firstChild, _el$54 = _el$53.nextSibling, _el$55 = _el$54.nextSibling, _el$56 = _el$55.nextSibling, _el$57 = _el$56.nextSibling; _el$57.nextSibling; var _el$59 = _el$51.nextSibling;
20062
20338
  insert(_el$59, createComponent(For, {
20063
20339
  get each() {
20064
20340
  return sales() ?? [];
20065
20341
  },
20066
20342
  children: (s) => (() => {
20067
- var _el$60 = _tmpl$928(), _el$61 = _el$60.firstChild, _el$63 = _el$61.nextSibling, _el$64 = _el$63.nextSibling, _el$65 = _el$64.firstChild, _el$66 = _el$64.nextSibling, _el$67 = _el$66.nextSibling, _el$68 = _el$67.firstChild, _el$69 = _el$67.nextSibling, _el$70 = _el$69.firstChild, _el$71 = _el$70.nextSibling;
20343
+ var _el$60 = _tmpl$929(), _el$61 = _el$60.firstChild, _el$63 = _el$61.nextSibling, _el$64 = _el$63.nextSibling, _el$65 = _el$64.firstChild, _el$66 = _el$64.nextSibling, _el$67 = _el$66.nextSibling, _el$68 = _el$67.firstChild, _el$69 = _el$67.nextSibling, _el$70 = _el$69.firstChild, _el$71 = _el$70.nextSibling;
20068
20344
  insert(_el$61, () => s.name, null);
20069
20345
  insert(_el$61, createComponent(Show, {
20070
20346
  get when() {
20071
20347
  return s.isExclusive;
20072
20348
  },
20073
20349
  get children() {
20074
- return _tmpl$831();
20350
+ return _tmpl$832();
20075
20351
  }
20076
20352
  }), null);
20077
20353
  insert(_el$63, () => fmtDiscount(s.discountType, s.discountValueCents));
@@ -20152,16 +20428,16 @@ function isWaitingOnSupport(thread) {
20152
20428
  return thread.lastSender === "customer" && thread.status !== "closed" && thread.status !== "transferred";
20153
20429
  }
20154
20430
  var _tmpl$301 = /* @__PURE__ */ template(`<div><div class=app-admin-text-muted>`);
20155
- var _tmpl$2101 = /* @__PURE__ */ template(`<span class=app-admin-text-muted style=flex-shrink:0>`);
20156
- var _tmpl$361 = /* @__PURE__ */ template(`<div style="display:flex;align-items:center;gap:0.5rem;padding:0.375rem 0;border-bottom:1px solid var(--app-admin-border-soft);font-size:0.8125rem"><span style=flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap>`);
20157
- var _tmpl$450 = /* @__PURE__ */ template(`<div class="app-admin-card app-admin-support-col app-admin-support-rail"style=padding:0>`);
20158
- var _tmpl$545 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-ghost"style=width:100%>Open customer record`);
20159
- var _tmpl$640 = /* @__PURE__ */ template(`<p class=app-admin-text-muted style=margin:0;font-size:0.75rem>Some sections couldn't be loaded (<!>).`);
20160
- var _tmpl$737 = /* @__PURE__ */ template(`<div class=app-admin-support-scroll data-scrollable style=padding:1rem;display:flex;flex-direction:column;gap:1.25rem><div><div style=font-weight:600></div><div class=app-admin-text-muted style=font-size:0.8125rem;overflow:hidden;text-overflow:ellipsis></div><div style=display:flex;align-items:center;gap:0.5rem;margin-top:0.5rem;flex-wrap:wrap><span class="app-admin-badge app-admin-badge--neutral"></span><span class=app-admin-text-muted style=font-size:0.75rem>Since `);
20161
- var _tmpl$832 = /* @__PURE__ */ template(`<p class=app-admin-text-muted style=margin:0;font-size:0.8125rem>None.`);
20162
- var _tmpl$929 = /* @__PURE__ */ template(`<div style=margin-bottom:0.5rem><div class=app-admin-text-muted style=font-size:0.75rem;margin-top:0.25rem>`);
20163
- var _tmpl$025 = /* @__PURE__ */ template(`<p class=app-admin-text-muted style=margin:0;font-size:0.8125rem>No payments yet.`);
20164
- var _tmpl$1106 = /* @__PURE__ */ template(`<p class=app-admin-text-muted style=margin:0;font-size:0.8125rem>None open.`);
20431
+ var _tmpl$2102 = /* @__PURE__ */ template(`<span class=app-admin-text-muted style=flex-shrink:0>`);
20432
+ var _tmpl$367 = /* @__PURE__ */ template(`<div style="display:flex;align-items:center;gap:0.5rem;padding:0.375rem 0;border-bottom:1px solid var(--app-admin-border-soft);font-size:0.8125rem"><span style=flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap>`);
20433
+ var _tmpl$451 = /* @__PURE__ */ template(`<div class="app-admin-card app-admin-support-col app-admin-support-rail"style=padding:0>`);
20434
+ var _tmpl$546 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-ghost"style=width:100%>Open customer record`);
20435
+ var _tmpl$641 = /* @__PURE__ */ template(`<p class=app-admin-text-muted style=margin:0;font-size:0.75rem>Some sections couldn't be loaded (<!>).`);
20436
+ var _tmpl$738 = /* @__PURE__ */ template(`<div class=app-admin-support-scroll data-scrollable style=padding:1rem;display:flex;flex-direction:column;gap:1.25rem><div><div style=font-weight:600></div><div class=app-admin-text-muted style=font-size:0.8125rem;overflow:hidden;text-overflow:ellipsis></div><div style=display:flex;align-items:center;gap:0.5rem;margin-top:0.5rem;flex-wrap:wrap><span class="app-admin-badge app-admin-badge--neutral"></span><span class=app-admin-text-muted style=font-size:0.75rem>Since `);
20437
+ var _tmpl$833 = /* @__PURE__ */ template(`<p class=app-admin-text-muted style=margin:0;font-size:0.8125rem>None.`);
20438
+ var _tmpl$930 = /* @__PURE__ */ template(`<div style=margin-bottom:0.5rem><div class=app-admin-text-muted style=font-size:0.75rem;margin-top:0.25rem>`);
20439
+ var _tmpl$026 = /* @__PURE__ */ template(`<p class=app-admin-text-muted style=margin:0;font-size:0.8125rem>No payments yet.`);
20440
+ var _tmpl$1107 = /* @__PURE__ */ template(`<p class=app-admin-text-muted style=margin:0;font-size:0.8125rem>None open.`);
20165
20441
  function RailSection(props) {
20166
20442
  return (() => {
20167
20443
  var _el$ = _tmpl$301(), _el$2 = _el$.firstChild;
@@ -20173,14 +20449,14 @@ function RailSection(props) {
20173
20449
  }
20174
20450
  function RailRow(props) {
20175
20451
  return (() => {
20176
- var _el$3 = _tmpl$361(), _el$4 = _el$3.firstChild;
20452
+ var _el$3 = _tmpl$367(), _el$4 = _el$3.firstChild;
20177
20453
  insert(_el$4, () => props.left);
20178
20454
  insert(_el$3, createComponent(Show, {
20179
20455
  get when() {
20180
20456
  return props.right;
20181
20457
  },
20182
20458
  get children() {
20183
- var _el$5 = _tmpl$2101();
20459
+ var _el$5 = _tmpl$2102();
20184
20460
  insert(_el$5, () => props.right);
20185
20461
  return _el$5;
20186
20462
  }
@@ -20212,7 +20488,7 @@ function SupportCustomerRail(props) {
20212
20488
  const payments = () => (overview()?.payments ?? []).slice(0, 3);
20213
20489
  const requests = () => (overview()?.requests.items ?? []).filter((r) => r.status !== "completed" && r.status !== "denied");
20214
20490
  return (() => {
20215
- var _el$6 = _tmpl$450();
20491
+ var _el$6 = _tmpl$451();
20216
20492
  insert(_el$6, createComponent(Show, {
20217
20493
  get when() {
20218
20494
  return props.userId;
@@ -20241,7 +20517,7 @@ function SupportCustomerRail(props) {
20241
20517
  });
20242
20518
  },
20243
20519
  children: (o) => (() => {
20244
- var _el$7 = _tmpl$737(), _el$8 = _el$7.firstChild, _el$9 = _el$8.firstChild, _el$0 = _el$9.nextSibling, _el$1 = _el$0.nextSibling, _el$10 = _el$1.firstChild, _el$11 = _el$10.nextSibling; _el$11.firstChild;
20520
+ var _el$7 = _tmpl$738(), _el$8 = _el$7.firstChild, _el$9 = _el$8.firstChild, _el$0 = _el$9.nextSibling, _el$1 = _el$0.nextSibling, _el$10 = _el$1.firstChild, _el$11 = _el$10.nextSibling; _el$11.firstChild;
20245
20521
  insert(_el$9, () => [o().customer.firstName, o().customer.lastName].filter(Boolean).join(" ") || o().customer.email);
20246
20522
  insert(_el$0, () => o().customer.email);
20247
20523
  insert(_el$10, () => o().lifecycle.label);
@@ -20251,7 +20527,7 @@ function SupportCustomerRail(props) {
20251
20527
  return props.onOpenCustomer;
20252
20528
  },
20253
20529
  get children() {
20254
- var _el$13 = _tmpl$545();
20530
+ var _el$13 = _tmpl$546();
20255
20531
  _el$13.$$click = () => props.onOpenCustomer(o().customer.uid);
20256
20532
  return _el$13;
20257
20533
  }
@@ -20264,7 +20540,7 @@ function SupportCustomerRail(props) {
20264
20540
  return subscriptions().length > 0;
20265
20541
  },
20266
20542
  get fallback() {
20267
- return _tmpl$832();
20543
+ return _tmpl$833();
20268
20544
  },
20269
20545
  get children() {
20270
20546
  return createComponent(For, {
@@ -20272,7 +20548,7 @@ function SupportCustomerRail(props) {
20272
20548
  return subscriptions();
20273
20549
  },
20274
20550
  children: (s) => (() => {
20275
- var _el$19 = _tmpl$929(), _el$20 = _el$19.firstChild;
20551
+ var _el$19 = _tmpl$930(), _el$20 = _el$19.firstChild;
20276
20552
  insert(_el$19, createComponent(RailRow, {
20277
20553
  get left() {
20278
20554
  return s.medicationName || s.medication || "Subscription";
@@ -20305,7 +20581,7 @@ function SupportCustomerRail(props) {
20305
20581
  return payments().length > 0;
20306
20582
  },
20307
20583
  get fallback() {
20308
- return _tmpl$025();
20584
+ return _tmpl$026();
20309
20585
  },
20310
20586
  get children() {
20311
20587
  return createComponent(For, {
@@ -20336,7 +20612,7 @@ function SupportCustomerRail(props) {
20336
20612
  return requests().length > 0;
20337
20613
  },
20338
20614
  get fallback() {
20339
- return _tmpl$1106();
20615
+ return _tmpl$1107();
20340
20616
  },
20341
20617
  get children() {
20342
20618
  return createComponent(For, {
@@ -20364,7 +20640,7 @@ function SupportCustomerRail(props) {
20364
20640
  return o().partial.length > 0;
20365
20641
  },
20366
20642
  get children() {
20367
- var _el$14 = _tmpl$640(), _el$15 = _el$14.firstChild, _el$17 = _el$15.nextSibling; _el$17.nextSibling;
20643
+ var _el$14 = _tmpl$641(), _el$15 = _el$14.firstChild, _el$17 = _el$15.nextSibling; _el$17.nextSibling;
20368
20644
  insert(_el$14, () => o().partial.join(", "), _el$17);
20369
20645
  return _el$14;
20370
20646
  }
@@ -20381,15 +20657,15 @@ function SupportCustomerRail(props) {
20381
20657
  }
20382
20658
  delegateEvents(["click"]);
20383
20659
  var _tmpl$308 = /* @__PURE__ */ template(`<div style="padding:0.625rem;border-top:1px solid var(--app-admin-border)"><button type=button class="app-admin-btn app-admin-btn-ghost"style=width:100%>`);
20384
- var _tmpl$2102 = /* @__PURE__ */ template(`<div class="app-admin-card app-admin-support-col"style=padding:0><div class=app-admin-support-scroll data-scrollable>`);
20385
- var _tmpl$367 = /* @__PURE__ */ template(`<span aria-hidden=true style=width:0.5rem;height:0.5rem;border-radius:999px;background:var(--app-admin-primary);flex-shrink:0>`);
20386
- var _tmpl$451 = /* @__PURE__ */ template(`<span style=font-size:0.6875rem;font-weight:600;color:var(--app-admin-warning-fg)>Waiting `);
20387
- var _tmpl$546 = /* @__PURE__ */ template(`<span class="app-admin-badge app-admin-badge--info"style=font-size:0.6875rem>From care team`);
20388
- var _tmpl$641 = /* @__PURE__ */ template(`<span class=app-admin-text-muted style=font-size:0.6875rem>`);
20389
- var _tmpl$738 = /* @__PURE__ */ template(`<button type=button class=app-admin-support-row><div style=display:flex;align-items:center;gap:0.5rem><span style=flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap></span><span class=app-admin-text-muted style=font-size:0.75rem;flex-shrink:0></span></div><div class=app-admin-text-muted style=font-size:0.8125rem;margin-top:0.1875rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap></div><div style=display:flex;align-items:center;gap:0.3125rem;margin-top:0.375rem;flex-wrap:wrap><span style=flex:1>`);
20660
+ var _tmpl$2103 = /* @__PURE__ */ template(`<div class="app-admin-card app-admin-support-col"style=padding:0><div class=app-admin-support-scroll data-scrollable>`);
20661
+ var _tmpl$368 = /* @__PURE__ */ template(`<span aria-hidden=true style=width:0.5rem;height:0.5rem;border-radius:999px;background:var(--app-admin-primary);flex-shrink:0>`);
20662
+ var _tmpl$455 = /* @__PURE__ */ template(`<span style=font-size:0.6875rem;font-weight:600;color:var(--app-admin-warning-fg)>Waiting `);
20663
+ var _tmpl$547 = /* @__PURE__ */ template(`<span class="app-admin-badge app-admin-badge--info"style=font-size:0.6875rem>From care team`);
20664
+ var _tmpl$644 = /* @__PURE__ */ template(`<span class=app-admin-text-muted style=font-size:0.6875rem>`);
20665
+ var _tmpl$739 = /* @__PURE__ */ template(`<button type=button class=app-admin-support-row><div style=display:flex;align-items:center;gap:0.5rem><span style=flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap></span><span class=app-admin-text-muted style=font-size:0.75rem;flex-shrink:0></span></div><div class=app-admin-text-muted style=font-size:0.8125rem;margin-top:0.1875rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap></div><div style=display:flex;align-items:center;gap:0.3125rem;margin-top:0.375rem;flex-wrap:wrap><span style=flex:1>`);
20390
20666
  function SupportQueue(props) {
20391
20667
  return (() => {
20392
- var _el$ = _tmpl$2102(), _el$2 = _el$.firstChild;
20668
+ var _el$ = _tmpl$2103(), _el$2 = _el$.firstChild;
20393
20669
  insert(_el$2, createComponent(Show, {
20394
20670
  get when() {
20395
20671
  return !props.loading;
@@ -20413,14 +20689,14 @@ function SupportQueue(props) {
20413
20689
  return props.threads;
20414
20690
  },
20415
20691
  children: (t) => (() => {
20416
- var _el$5 = _tmpl$738(), _el$6 = _el$5.firstChild, _el$8 = _el$6.firstChild, _el$9 = _el$8.nextSibling, _el$0 = _el$6.nextSibling, _el$1 = _el$0.nextSibling, _el$12 = _el$1.firstChild;
20692
+ var _el$5 = _tmpl$739(), _el$6 = _el$5.firstChild, _el$8 = _el$6.firstChild, _el$9 = _el$8.nextSibling, _el$0 = _el$6.nextSibling, _el$1 = _el$0.nextSibling, _el$12 = _el$1.firstChild;
20417
20693
  _el$5.$$click = () => props.onSelect(t.id);
20418
20694
  insert(_el$6, createComponent(Show, {
20419
20695
  get when() {
20420
20696
  return t.adminUnread;
20421
20697
  },
20422
20698
  get children() {
20423
- return _tmpl$367();
20699
+ return _tmpl$368();
20424
20700
  }
20425
20701
  }), _el$8);
20426
20702
  insert(_el$8, () => customerLabel(t));
@@ -20432,13 +20708,13 @@ function SupportQueue(props) {
20432
20708
  },
20433
20709
  get fallback() {
20434
20710
  return (() => {
20435
- var _el$15 = _tmpl$641();
20711
+ var _el$15 = _tmpl$644();
20436
20712
  insert(_el$15, () => t.lastSender === "support" ? "You replied" : "");
20437
20713
  return _el$15;
20438
20714
  })();
20439
20715
  },
20440
20716
  get children() {
20441
- var _el$10 = _tmpl$451(); _el$10.firstChild;
20717
+ var _el$10 = _tmpl$455(); _el$10.firstChild;
20442
20718
  insert(_el$10, () => formatWaiting(t.lastMessageAt), null);
20443
20719
  return _el$10;
20444
20720
  }
@@ -20448,7 +20724,7 @@ function SupportQueue(props) {
20448
20724
  return t.sourceRef?.startsWith("apex:handoff:");
20449
20725
  },
20450
20726
  get children() {
20451
- return _tmpl$546();
20727
+ return _tmpl$547();
20452
20728
  }
20453
20729
  }), null);
20454
20730
  insert(_el$1, createComponent(Show, {
@@ -20456,7 +20732,7 @@ function SupportQueue(props) {
20456
20732
  return categoryLabel(t.category);
20457
20733
  },
20458
20734
  get children() {
20459
- var _el$14 = _tmpl$641();
20735
+ var _el$14 = _tmpl$644();
20460
20736
  insert(_el$14, () => categoryLabel(t.category));
20461
20737
  return _el$14;
20462
20738
  }
@@ -20501,19 +20777,19 @@ function SupportQueue(props) {
20501
20777
  }
20502
20778
  delegateEvents(["click"]);
20503
20779
  var _tmpl$309 = /* @__PURE__ */ template(`<svg width=14 height=14 viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=1.8 stroke-linecap=round stroke-linejoin=round aria-hidden=true style=vertical-align:-2px;margin-right:0.375rem><path d="M21.4 11.05 12.25 20.2a5.5 5.5 0 0 1-7.78-7.78l9.19-9.19a3.67 3.67 0 1 1 5.19 5.19l-9.2 9.19a1.83 1.83 0 1 1-2.59-2.59l8.49-8.48">`);
20504
- var _tmpl$2103 = /* @__PURE__ */ template(`<button type=button style=display:block;padding:0;border:none;background:none;cursor:pointer;margin-top:0.5rem><img loading=lazy style=max-width:100%;max-height:15rem;border-radius:0.5rem;display:block>`, true, false, false);
20505
- var _tmpl$368 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-ghost"style=margin-top:0.5rem;font-size:0.75rem>`);
20506
- var _tmpl$455 = /* @__PURE__ */ template(`<p style=margin:0;white-space:pre-wrap;line-height:1.5>`);
20507
- var _tmpl$547 = /* @__PURE__ */ template(`<div class=app-admin-card-soft style="padding:0.75rem 0.875rem;margin-bottom:0.5rem"><div style=display:flex;justify-content:space-between;gap:1rem;margin-bottom:0.25rem><strong style=font-size:0.75rem></strong><span class=app-admin-text-muted style=font-size:0.75rem>`);
20508
- var _tmpl$644 = /* @__PURE__ */ template(`<div class="app-admin-card app-admin-support-col"style=padding:0>`);
20509
- var _tmpl$739 = /* @__PURE__ */ template(`<button type=button class=app-admin-link-btn>View customer`);
20510
- var _tmpl$833 = /* @__PURE__ */ template(`<span style="flex-shrink:0;font-size:0.75rem;font-weight:600;color:var(--app-admin-warning-fg);background:var(--app-admin-warning-bg);padding:0.1875rem 0.5rem;border-radius:999px">Waiting `);
20511
- var _tmpl$930 = /* @__PURE__ */ template(`<span class="app-admin-badge app-admin-badge--info"style=font-size:0.6875rem>From care team`);
20512
- var _tmpl$026 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-ghost"style=font-size:0.75rem>Forward to care team`);
20513
- var _tmpl$1107 = /* @__PURE__ */ template(`<p role=alert style="margin:0.5rem 0 0;font-size:0.75rem;color:var(--app-admin-danger-fg)">`);
20514
- var _tmpl$1020 = /* @__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>`);
20515
- var _tmpl$1121 = /* @__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.`);
20516
- var _tmpl$1218 = /* @__PURE__ */ template(`<div class=app-admin-support-scroll data-scrollable style="padding:1rem 1.25rem"><div>`);
20780
+ var _tmpl$2104 = /* @__PURE__ */ template(`<button type=button style=display:block;padding:0;border:none;background:none;cursor:pointer;margin-top:0.5rem><img loading=lazy style=max-width:100%;max-height:15rem;border-radius:0.5rem;display:block>`, true, false, false);
20781
+ var _tmpl$369 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-ghost"style=margin-top:0.5rem;font-size:0.75rem>`);
20782
+ var _tmpl$456 = /* @__PURE__ */ template(`<p style=margin:0;white-space:pre-wrap;line-height:1.5>`);
20783
+ var _tmpl$548 = /* @__PURE__ */ template(`<div class=app-admin-card-soft style="padding:0.75rem 0.875rem;margin-bottom:0.5rem"><div style=display:flex;justify-content:space-between;gap:1rem;margin-bottom:0.25rem><strong style=font-size:0.75rem></strong><span class=app-admin-text-muted style=font-size:0.75rem>`);
20784
+ var _tmpl$645 = /* @__PURE__ */ template(`<div class="app-admin-card app-admin-support-col"style=padding:0>`);
20785
+ var _tmpl$740 = /* @__PURE__ */ template(`<button type=button class=app-admin-link-btn>View customer`);
20786
+ var _tmpl$834 = /* @__PURE__ */ template(`<span style="flex-shrink:0;font-size:0.75rem;font-weight:600;color:var(--app-admin-warning-fg);background:var(--app-admin-warning-bg);padding:0.1875rem 0.5rem;border-radius:999px">Waiting `);
20787
+ var _tmpl$931 = /* @__PURE__ */ template(`<span class="app-admin-badge app-admin-badge--info"style=font-size:0.6875rem>From care team`);
20788
+ var _tmpl$027 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-ghost"style=font-size:0.75rem>Forward to care team`);
20789
+ var _tmpl$1108 = /* @__PURE__ */ template(`<p role=alert style="margin:0.5rem 0 0;font-size:0.75rem;color:var(--app-admin-danger-fg)">`);
20790
+ 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
+ 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
+ var _tmpl$1219 = /* @__PURE__ */ template(`<div class=app-admin-support-scroll data-scrollable style="padding:1rem 1.25rem"><div>`);
20517
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)">`);
20518
20794
  var _tmpl$1416 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-ghost">Send &amp; resolve`);
20519
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>`);
@@ -20754,7 +21030,7 @@ ${body}` : body);
20754
21030
  },
20755
21031
  get fallback() {
20756
21032
  return (() => {
20757
- var _el$4 = _tmpl$368();
21033
+ var _el$4 = _tmpl$369();
20758
21034
  _el$4.$$click = () => openAttachment(p.attachment.id);
20759
21035
  insert(_el$4, createComponent(ClipIcon, {}), null);
20760
21036
  insert(_el$4, () => p.attachment.filename, null);
@@ -20762,7 +21038,7 @@ ${body}` : body);
20762
21038
  })();
20763
21039
  },
20764
21040
  get children() {
20765
- var _el$2 = _tmpl$2103(), _el$3 = _el$2.firstChild;
21041
+ var _el$2 = _tmpl$2104(), _el$3 = _el$2.firstChild;
20766
21042
  _el$2.$$click = () => openAttachment(p.attachment.id);
20767
21043
  _el$3.addEventListener("error", () => {
20768
21044
  if (retried) {
@@ -20788,7 +21064,7 @@ ${body}` : body);
20788
21064
  const Bubble = (p) => {
20789
21065
  const fromSupport = () => p.msg.sender === "support";
20790
21066
  return (() => {
20791
- var _el$5 = _tmpl$547(), _el$6 = _el$5.firstChild, _el$7 = _el$6.firstChild, _el$8 = _el$7.nextSibling;
21067
+ var _el$5 = _tmpl$548(), _el$6 = _el$5.firstChild, _el$7 = _el$6.firstChild, _el$8 = _el$7.nextSibling;
20792
21068
  insert(_el$7, () => fromSupport() ? "Support" : "Customer");
20793
21069
  insert(_el$8, () => new Date(p.msg.createdAt).toLocaleString("en-US", {
20794
21070
  month: "short",
@@ -20801,7 +21077,7 @@ ${body}` : body);
20801
21077
  return p.msg.body;
20802
21078
  },
20803
21079
  get children() {
20804
- var _el$9 = _tmpl$455();
21080
+ var _el$9 = _tmpl$456();
20805
21081
  insert(_el$9, () => p.msg.body);
20806
21082
  return _el$9;
20807
21083
  }
@@ -20831,7 +21107,7 @@ ${body}` : body);
20831
21107
  })();
20832
21108
  };
20833
21109
  return (() => {
20834
- var _el$0 = _tmpl$644();
21110
+ var _el$0 = _tmpl$645();
20835
21111
  insert(_el$0, createComponent(Show, {
20836
21112
  get when() {
20837
21113
  return props.threadId;
@@ -20860,7 +21136,7 @@ ${body}` : body);
20860
21136
  });
20861
21137
  },
20862
21138
  children: (d) => [(() => {
20863
- var _el$1 = _tmpl$1020(), _el$10 = _el$1.firstChild, _el$11 = _el$10.firstChild, _el$12 = _el$11.firstChild, _el$13 = _el$12.nextSibling, _el$17 = _el$10.nextSibling, _el$19 = _el$17.firstChild; _el$19.firstChild; _el$19.nextSibling;
21139
+ var _el$1 = _tmpl$1021(), _el$10 = _el$1.firstChild, _el$11 = _el$10.firstChild, _el$12 = _el$11.firstChild, _el$13 = _el$12.nextSibling, _el$17 = _el$10.nextSibling, _el$19 = _el$17.firstChild; _el$19.firstChild; _el$19.nextSibling;
20864
21140
  insert(_el$12, () => d().thread.subject);
20865
21141
  insert(_el$13, () => d().customer?.email ?? "Unknown customer", null);
20866
21142
  insert(_el$13, createComponent(Show, {
@@ -20869,7 +21145,7 @@ ${body}` : body);
20869
21145
  },
20870
21146
  get children() {
20871
21147
  return [" \xB7 ", (() => {
20872
- var _el$14 = _tmpl$739();
21148
+ var _el$14 = _tmpl$740();
20873
21149
  _el$14.$$click = () => props.onOpenCustomer(d().thread.userId);
20874
21150
  return _el$14;
20875
21151
  })()];
@@ -20880,7 +21156,7 @@ ${body}` : body);
20880
21156
  return isWaitingOnSupport(d().thread);
20881
21157
  },
20882
21158
  get children() {
20883
- var _el$15 = _tmpl$833(); _el$15.firstChild;
21159
+ var _el$15 = _tmpl$834(); _el$15.firstChild;
20884
21160
  insert(_el$15, () => formatWaiting(d().thread.lastMessageAt), null);
20885
21161
  return _el$15;
20886
21162
  }
@@ -20890,7 +21166,7 @@ ${body}` : body);
20890
21166
  return d().thread.sourceRef?.startsWith("apex:handoff:");
20891
21167
  },
20892
21168
  get children() {
20893
- return _tmpl$930();
21169
+ return _tmpl$931();
20894
21170
  }
20895
21171
  }), _el$19);
20896
21172
  _el$19.addEventListener("change", (e) => changeCategory(e.currentTarget.value || null));
@@ -20926,7 +21202,7 @@ ${body}` : body);
20926
21202
  return _el$38;
20927
21203
  })()
20928
21204
  }), (() => {
20929
- var _el$22 = _tmpl$026();
21205
+ var _el$22 = _tmpl$027();
20930
21206
  _el$22.$$click = () => {
20931
21207
  setTransferError(null);
20932
21208
  setTransferModalOpen(true);
@@ -20941,7 +21217,7 @@ ${body}` : body);
20941
21217
  return transferError();
20942
21218
  },
20943
21219
  get children() {
20944
- var _el$23 = _tmpl$1107();
21220
+ var _el$23 = _tmpl$1108();
20945
21221
  insert(_el$23, transferError);
20946
21222
  return _el$23;
20947
21223
  }
@@ -20986,12 +21262,12 @@ ${body}` : body);
20986
21262
  })()];
20987
21263
  },
20988
21264
  get children() {
20989
- return _tmpl$1121();
21265
+ return _tmpl$1122();
20990
21266
  }
20991
21267
  });
20992
21268
  }
20993
21269
  }), (() => {
20994
- var _el$25 = _tmpl$1218(), _el$26 = _el$25.firstChild;
21270
+ var _el$25 = _tmpl$1219(), _el$26 = _el$25.firstChild;
20995
21271
  var _ref$ = transcriptEnd.setContainer;
20996
21272
  typeof _ref$ === "function" ? use(_ref$, _el$25) : transcriptEnd.setContainer = _el$25;
20997
21273
  insert(_el$25, createComponent(For, {
@@ -21095,12 +21371,12 @@ ${body}` : body);
21095
21371
  delegateEvents(["click", "input", "keydown"]);
21096
21372
 
21097
21373
  // src/pages/admin/Support.tsx
21098
- var _tmpl$369 = /* @__PURE__ */ template(`<div class=app-admin-support><div style=display:flex;gap:0.5rem;align-items:center;flex-wrap:wrap;margin-bottom:0.75rem></div><div style=display:flex;gap:0.5rem;margin-bottom:0.5rem;flex-wrap:wrap></div><div style=display:flex;gap:0.375rem;margin-bottom:1rem;flex-wrap:wrap></div><div class=app-admin-support-grid>`);
21099
- var _tmpl$2104 = /* @__PURE__ */ template(`<span class="app-admin-badge app-admin-badge--warning"> awaiting a reply`);
21100
- var _tmpl$370 = /* @__PURE__ */ template(`<span class="app-admin-badge app-admin-badge--neutral"> open`);
21101
- var _tmpl$456 = /* @__PURE__ */ template(`<span class="app-admin-badge app-admin-badge--neutral"> all time`);
21102
- var _tmpl$548 = /* @__PURE__ */ template(`<span class=app-admin-text-muted style=font-size:0.75rem>Longest wait `);
21103
- var _tmpl$645 = /* @__PURE__ */ template(`<button type=button>`);
21374
+ var _tmpl$370 = /* @__PURE__ */ template(`<div class=app-admin-support><div style=display:flex;gap:0.5rem;align-items:center;flex-wrap:wrap;margin-bottom:0.75rem></div><div style=display:flex;gap:0.5rem;margin-bottom:0.5rem;flex-wrap:wrap></div><div style=display:flex;gap:0.375rem;margin-bottom:1rem;flex-wrap:wrap></div><div class=app-admin-support-grid>`);
21375
+ var _tmpl$2105 = /* @__PURE__ */ template(`<span class="app-admin-badge app-admin-badge--warning"> awaiting a reply`);
21376
+ var _tmpl$371 = /* @__PURE__ */ template(`<span class="app-admin-badge app-admin-badge--neutral"> open`);
21377
+ var _tmpl$457 = /* @__PURE__ */ template(`<span class="app-admin-badge app-admin-badge--neutral"> all time`);
21378
+ var _tmpl$549 = /* @__PURE__ */ template(`<span class=app-admin-text-muted style=font-size:0.75rem>Longest wait `);
21379
+ var _tmpl$646 = /* @__PURE__ */ template(`<button type=button>`);
21104
21380
  var STATUS_FILTERS3 = [{
21105
21381
  value: "all",
21106
21382
  label: "All"
@@ -21241,7 +21517,7 @@ function Support(props = {}) {
21241
21517
  return formatWaiting(oldest.lastMessageAt);
21242
21518
  };
21243
21519
  return (() => {
21244
- var _el$ = _tmpl$369(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling, _el$4 = _el$3.nextSibling, _el$5 = _el$4.nextSibling;
21520
+ var _el$ = _tmpl$370(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling, _el$4 = _el$3.nextSibling, _el$5 = _el$4.nextSibling;
21245
21521
  insert(_el$, createComponent(PageTitle, {
21246
21522
  subtitle: "Customer messages from the member portal",
21247
21523
  children: "Support"
@@ -21251,15 +21527,15 @@ function Support(props = {}) {
21251
21527
  return stats();
21252
21528
  },
21253
21529
  children: (s) => [(() => {
21254
- var _el$6 = _tmpl$2104(), _el$7 = _el$6.firstChild;
21530
+ var _el$6 = _tmpl$2105(), _el$7 = _el$6.firstChild;
21255
21531
  insert(_el$6, () => s().unread, _el$7);
21256
21532
  return _el$6;
21257
21533
  })(), (() => {
21258
- var _el$8 = _tmpl$370(), _el$9 = _el$8.firstChild;
21534
+ var _el$8 = _tmpl$371(), _el$9 = _el$8.firstChild;
21259
21535
  insert(_el$8, () => s().open, _el$9);
21260
21536
  return _el$8;
21261
21537
  })(), (() => {
21262
- var _el$0 = _tmpl$456(), _el$1 = _el$0.firstChild;
21538
+ var _el$0 = _tmpl$457(), _el$1 = _el$0.firstChild;
21263
21539
  insert(_el$0, () => s().total, _el$1);
21264
21540
  return _el$0;
21265
21541
  })()]
@@ -21269,7 +21545,7 @@ function Support(props = {}) {
21269
21545
  return longestWait();
21270
21546
  },
21271
21547
  children: (w) => (() => {
21272
- var _el$10 = _tmpl$548(); _el$10.firstChild;
21548
+ var _el$10 = _tmpl$549(); _el$10.firstChild;
21273
21549
  insert(_el$10, w, null);
21274
21550
  return _el$10;
21275
21551
  })()
@@ -21277,7 +21553,7 @@ function Support(props = {}) {
21277
21553
  insert(_el$3, createComponent(For, {
21278
21554
  each: STATUS_FILTERS3,
21279
21555
  children: (f) => (() => {
21280
- var _el$12 = _tmpl$645();
21556
+ var _el$12 = _tmpl$646();
21281
21557
  _el$12.$$click = () => changeFilters(() => setStatusFilter(f.value));
21282
21558
  insert(_el$12, () => f.label);
21283
21559
  effect(() => className(_el$12, `app-admin-btn ${statusFilter() === f.value ? "app-admin-btn-primary" : "app-admin-btn-ghost"}`));
@@ -21339,10 +21615,10 @@ function Support(props = {}) {
21339
21615
  })();
21340
21616
  }
21341
21617
  delegateEvents(["click"]);
21342
- var _tmpl$371 = /* @__PURE__ */ template(`<div class=app-admin-card style=overflow:hidden><table class=app-admin-table><thead><tr><th>Date</th><th>Provider</th><th>Event Type</th><th>Status</th><th style=width:2.5rem></th></tr></thead><tbody>`);
21343
- var _tmpl$2105 = /* @__PURE__ */ template(`<div>`);
21344
- var _tmpl$376 = /* @__PURE__ */ template(`<tr class=is-clickable><td data-label=Date class=app-admin-text-muted></td><td data-label=Provider style=font-weight:500></td><td data-label="Event type"class="app-admin-text-mono app-admin-text-muted"style=font-size:0.75rem></td><td data-label=Status></td><td class=app-admin-text-muted style=font-size:0.75rem><span style="display:inline-block;transition:transform 0.15s">\u25B6`);
21345
- var _tmpl$457 = /* @__PURE__ */ template(`<tr><td colspan=5><pre class="app-admin-text-mono app-admin-text-muted"style=font-size:0.75rem;background:var(--app-admin-surface-light);border-radius:var(--app-admin-radius-sm);padding:1rem;overflow-x:auto;white-space:pre-wrap;word-break:break-all;margin:0>`);
21618
+ var _tmpl$376 = /* @__PURE__ */ template(`<div class=app-admin-card style=overflow:hidden><table class=app-admin-table><thead><tr><th>Date</th><th>Provider</th><th>Event Type</th><th>Status</th><th style=width:2.5rem></th></tr></thead><tbody>`);
21619
+ var _tmpl$2106 = /* @__PURE__ */ template(`<div>`);
21620
+ var _tmpl$377 = /* @__PURE__ */ template(`<tr class=is-clickable><td data-label=Date class=app-admin-text-muted></td><td data-label=Provider style=font-weight:500></td><td data-label="Event type"class="app-admin-text-mono app-admin-text-muted"style=font-size:0.75rem></td><td data-label=Status></td><td class=app-admin-text-muted style=font-size:0.75rem><span style="display:inline-block;transition:transform 0.15s">\u25B6`);
21621
+ var _tmpl$458 = /* @__PURE__ */ template(`<tr><td colspan=5><pre class="app-admin-text-mono app-admin-text-muted"style=font-size:0.75rem;background:var(--app-admin-surface-light);border-radius:var(--app-admin-radius-sm);padding:1rem;overflow-x:auto;white-space:pre-wrap;word-break:break-all;margin:0>`);
21346
21622
  function Webhooks() {
21347
21623
  const [expanded, setExpanded] = createSignal(null);
21348
21624
  const [webhooks] = createResource(async () => {
@@ -21359,7 +21635,7 @@ function Webhooks() {
21359
21635
  setExpanded((prev) => prev === id ? null : id);
21360
21636
  };
21361
21637
  return (() => {
21362
- var _el$ = _tmpl$2105();
21638
+ var _el$ = _tmpl$2106();
21363
21639
  insert(_el$, createComponent(PageTitle, {
21364
21640
  children: "Webhook Events"
21365
21641
  }), null);
@@ -21371,13 +21647,13 @@ function Webhooks() {
21371
21647
  return createComponent(LoadingSpinner, {});
21372
21648
  },
21373
21649
  get children() {
21374
- var _el$2 = _tmpl$371(), _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$5 = _el$4.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling, _el$8 = _el$7.nextSibling, _el$9 = _el$8.nextSibling; _el$9.nextSibling; var _el$1 = _el$4.nextSibling;
21650
+ var _el$2 = _tmpl$376(), _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$5 = _el$4.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling, _el$8 = _el$7.nextSibling, _el$9 = _el$8.nextSibling; _el$9.nextSibling; var _el$1 = _el$4.nextSibling;
21375
21651
  insert(_el$1, createComponent(For, {
21376
21652
  get each() {
21377
21653
  return webhooks() ?? [];
21378
21654
  },
21379
21655
  children: (event) => [(() => {
21380
- var _el$10 = _tmpl$376(), _el$11 = _el$10.firstChild, _el$12 = _el$11.nextSibling, _el$13 = _el$12.nextSibling, _el$14 = _el$13.nextSibling, _el$15 = _el$14.nextSibling, _el$16 = _el$15.firstChild;
21656
+ var _el$10 = _tmpl$377(), _el$11 = _el$10.firstChild, _el$12 = _el$11.nextSibling, _el$13 = _el$12.nextSibling, _el$14 = _el$13.nextSibling, _el$15 = _el$14.nextSibling, _el$16 = _el$15.firstChild;
21381
21657
  _el$10.$$click = () => toggleExpand(String(event.id));
21382
21658
  insert(_el$11, () => event.date);
21383
21659
  insert(_el$12, () => event.provider || "Authorize.Net");
@@ -21394,7 +21670,7 @@ function Webhooks() {
21394
21670
  return expanded() === String(event.id);
21395
21671
  },
21396
21672
  get children() {
21397
- var _el$17 = _tmpl$457(), _el$18 = _el$17.firstChild, _el$19 = _el$18.firstChild;
21673
+ var _el$17 = _tmpl$458(), _el$18 = _el$17.firstChild, _el$19 = _el$18.firstChild;
21398
21674
  insert(_el$19, (() => {
21399
21675
  var _c$ = memo(() => typeof event.payload === "string");
21400
21676
  return () => _c$() ? (() => {
@@ -21622,19 +21898,19 @@ function buildEmailBodyExtensions(lookup) {
21622
21898
  }
21623
21899
 
21624
21900
  // src/pages/admin/EmailBodyEditor.tsx
21625
- var _tmpl$377 = /* @__PURE__ */ template(`<button type=button>`);
21626
- var _tmpl$2106 = /* @__PURE__ */ template(`<strong>B`);
21627
- var _tmpl$378 = /* @__PURE__ */ template(`<em>I`);
21628
- var _tmpl$458 = /* @__PURE__ */ template(`<u>U`);
21629
- var _tmpl$549 = /* @__PURE__ */ template(`<div class=app-admin-email-menu role=menu aria-label=Placeholders>`);
21630
- var _tmpl$646 = /* @__PURE__ */ template(`<div class=app-admin-email-editor><div class=app-admin-email-toolbar role=toolbar aria-label=Formatting><span class=app-admin-email-tool-sep aria-hidden=true></span><span class=app-admin-email-tool-sep aria-hidden=true></span><span class=app-admin-email-tool-sep aria-hidden=true></span><div class=app-admin-email-menu-wrap><button type=button class=app-admin-email-tool aria-haspopup=menu>Insert placeholder &#9662;</button></div></div><div class=app-admin-email-canvas><div class=app-admin-email-page>`);
21631
- var _tmpl$740 = /* @__PURE__ */ template(`<button type=button role=menuitem class=app-admin-email-menu-item><span class=app-admin-email-menu-token></span><span class=app-admin-email-menu-desc>`);
21632
- var _tmpl$834 = /* @__PURE__ */ template(`<label class=app-admin-email-dialog-field><span></span><input type=text class=app-admin-input>`);
21633
- var _tmpl$931 = /* @__PURE__ */ template(`<label class=app-admin-email-dialog-field><span>Web address</span><input type=text inputmode=url class=app-admin-input placeholder=https://>`);
21634
- var _tmpl$027 = /* @__PURE__ */ template(`<p class=app-admin-field-error role=alert>`);
21635
- var _tmpl$1108 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-ghost">`);
21636
- var _tmpl$1021 = /* @__PURE__ */ template(`<div class=app-admin-email-dialog role=group><label class=app-admin-email-dialog-field><span>Link to</span><select class=app-admin-input><option value=__custom__>A web address</option></select></label><div class=app-admin-email-dialog-actions><button type=button class="app-admin-btn app-admin-btn-primary"></button><button type=button class="app-admin-btn app-admin-btn-ghost">Cancel`);
21637
- var _tmpl$1122 = /* @__PURE__ */ template(`<option> (<!>)`);
21901
+ var _tmpl$378 = /* @__PURE__ */ template(`<button type=button>`);
21902
+ var _tmpl$2107 = /* @__PURE__ */ template(`<strong>B`);
21903
+ var _tmpl$379 = /* @__PURE__ */ template(`<em>I`);
21904
+ var _tmpl$459 = /* @__PURE__ */ template(`<u>U`);
21905
+ var _tmpl$550 = /* @__PURE__ */ template(`<div class=app-admin-email-menu role=menu aria-label=Placeholders>`);
21906
+ var _tmpl$647 = /* @__PURE__ */ template(`<div class=app-admin-email-editor><div class=app-admin-email-toolbar role=toolbar aria-label=Formatting><span class=app-admin-email-tool-sep aria-hidden=true></span><span class=app-admin-email-tool-sep aria-hidden=true></span><span class=app-admin-email-tool-sep aria-hidden=true></span><div class=app-admin-email-menu-wrap><button type=button class=app-admin-email-tool aria-haspopup=menu>Insert placeholder &#9662;</button></div></div><div class=app-admin-email-canvas><div class=app-admin-email-page>`);
21907
+ var _tmpl$741 = /* @__PURE__ */ template(`<button type=button role=menuitem class=app-admin-email-menu-item><span class=app-admin-email-menu-token></span><span class=app-admin-email-menu-desc>`);
21908
+ var _tmpl$835 = /* @__PURE__ */ template(`<label class=app-admin-email-dialog-field><span></span><input type=text class=app-admin-input>`);
21909
+ var _tmpl$932 = /* @__PURE__ */ template(`<label class=app-admin-email-dialog-field><span>Web address</span><input type=text inputmode=url class=app-admin-input placeholder=https://>`);
21910
+ var _tmpl$028 = /* @__PURE__ */ template(`<p class=app-admin-field-error role=alert>`);
21911
+ var _tmpl$1109 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-ghost">`);
21912
+ var _tmpl$1022 = /* @__PURE__ */ template(`<div class=app-admin-email-dialog role=group><label class=app-admin-email-dialog-field><span>Link to</span><select class=app-admin-input><option value=__custom__>A web address</option></select></label><div class=app-admin-email-dialog-actions><button type=button class="app-admin-btn app-admin-btn-primary"></button><button type=button class="app-admin-btn app-admin-btn-ghost">Cancel`);
21913
+ var _tmpl$1123 = /* @__PURE__ */ template(`<option> (<!>)`);
21638
21914
  var CUSTOM_TARGET = "__custom__";
21639
21915
  var placeholderKey = (list) => list.map((p) => p.token).join("|");
21640
21916
  function EmailBodyEditor(props) {
@@ -21840,9 +22116,9 @@ function EmailBodyEditor(props) {
21840
22116
  };
21841
22117
  let menuButton;
21842
22118
  let menuEl;
21843
- const closeMenu = (refocus = false) => {
22119
+ const closeMenu = (refocus2 = false) => {
21844
22120
  setMenuOpen(false);
21845
- if (refocus) menuButton.focus();
22121
+ if (refocus2) menuButton.focus();
21846
22122
  };
21847
22123
  const onDocPointerDown = (e) => {
21848
22124
  if (!menuOpen()) return;
@@ -21887,7 +22163,7 @@ function EmailBodyEditor(props) {
21887
22163
  moveFocus(items, document.activeElement, e.key === "ArrowRight" ? 1 : -1);
21888
22164
  };
21889
22165
  const ToolButton = (p) => (() => {
21890
- var _el$ = _tmpl$377();
22166
+ var _el$ = _tmpl$378();
21891
22167
  addEventListener(_el$, "click", p.onClick, true);
21892
22168
  _el$.$$mousedown = (e) => e.preventDefault();
21893
22169
  insert(_el$, () => p.children);
@@ -21907,14 +22183,14 @@ function EmailBodyEditor(props) {
21907
22183
  return _el$;
21908
22184
  })();
21909
22185
  return (() => {
21910
- var _el$2 = _tmpl$646(), _el$3 = _el$2.firstChild, _el$7 = _el$3.firstChild, _el$8 = _el$7.nextSibling, _el$9 = _el$8.nextSibling, _el$0 = _el$9.nextSibling, _el$1 = _el$0.firstChild, _el$11 = _el$3.nextSibling, _el$12 = _el$11.firstChild;
22186
+ var _el$2 = _tmpl$647(), _el$3 = _el$2.firstChild, _el$7 = _el$3.firstChild, _el$8 = _el$7.nextSibling, _el$9 = _el$8.nextSibling, _el$0 = _el$9.nextSibling, _el$1 = _el$0.firstChild, _el$11 = _el$3.nextSibling, _el$12 = _el$11.firstChild;
21911
22187
  _el$3.$$keydown = onToolbarKeyDown;
21912
22188
  insert(_el$3, createComponent(ToolButton, {
21913
22189
  label: "Bold",
21914
22190
  pressed: () => isActive("bold"),
21915
22191
  onClick: () => run((ed) => ed.chain().focus().toggleBold().run()),
21916
22192
  get children() {
21917
- return _tmpl$2106();
22193
+ return _tmpl$2107();
21918
22194
  }
21919
22195
  }), _el$7);
21920
22196
  insert(_el$3, createComponent(ToolButton, {
@@ -21922,7 +22198,7 @@ function EmailBodyEditor(props) {
21922
22198
  pressed: () => isActive("italic"),
21923
22199
  onClick: () => run((ed) => ed.chain().focus().toggleItalic().run()),
21924
22200
  get children() {
21925
- return _tmpl$378();
22201
+ return _tmpl$379();
21926
22202
  }
21927
22203
  }), _el$7);
21928
22204
  insert(_el$3, createComponent(ToolButton, {
@@ -21930,7 +22206,7 @@ function EmailBodyEditor(props) {
21930
22206
  pressed: () => isActive("underline"),
21931
22207
  onClick: () => run((ed) => ed.chain().focus().toggleUnderline().run()),
21932
22208
  get children() {
21933
- return _tmpl$458();
22209
+ return _tmpl$459();
21934
22210
  }
21935
22211
  }), _el$7);
21936
22212
  insert(_el$3, createComponent(ToolButton, {
@@ -21976,7 +22252,7 @@ function EmailBodyEditor(props) {
21976
22252
  return menuOpen();
21977
22253
  },
21978
22254
  get children() {
21979
- var _el$10 = _tmpl$549();
22255
+ var _el$10 = _tmpl$550();
21980
22256
  _el$10.$$keydown = onMenuKeyDown;
21981
22257
  var _ref$2 = menuEl;
21982
22258
  typeof _ref$2 === "function" ? use(_ref$2, _el$10) : menuEl = _el$10;
@@ -21985,7 +22261,7 @@ function EmailBodyEditor(props) {
21985
22261
  return props.placeholders;
21986
22262
  },
21987
22263
  children: (p) => (() => {
21988
- var _el$13 = _tmpl$740(), _el$14 = _el$13.firstChild, _el$15 = _el$14.nextSibling;
22264
+ var _el$13 = _tmpl$741(), _el$14 = _el$13.firstChild, _el$15 = _el$14.nextSibling;
21989
22265
  _el$13.$$click = () => {
21990
22266
  closeMenu();
21991
22267
  insertPlaceholder(p.token);
@@ -22003,14 +22279,14 @@ function EmailBodyEditor(props) {
22003
22279
  return dialog();
22004
22280
  },
22005
22281
  children: (d) => (() => {
22006
- var _el$16 = _tmpl$1021(), _el$20 = _el$16.firstChild, _el$21 = _el$20.firstChild, _el$22 = _el$21.nextSibling, _el$23 = _el$22.firstChild, _el$28 = _el$20.nextSibling, _el$29 = _el$28.firstChild, _el$31 = _el$29.nextSibling;
22282
+ var _el$16 = _tmpl$1022(), _el$20 = _el$16.firstChild, _el$21 = _el$20.firstChild, _el$22 = _el$21.nextSibling, _el$23 = _el$22.firstChild, _el$28 = _el$20.nextSibling, _el$29 = _el$28.firstChild, _el$31 = _el$29.nextSibling;
22007
22283
  _el$16.$$keydown = onDialogKeyDown;
22008
22284
  insert(_el$16, createComponent(Show, {
22009
22285
  get when() {
22010
22286
  return d().needsText;
22011
22287
  },
22012
22288
  get children() {
22013
- var _el$17 = _tmpl$834(), _el$18 = _el$17.firstChild, _el$19 = _el$18.nextSibling;
22289
+ var _el$17 = _tmpl$835(), _el$18 = _el$17.firstChild, _el$19 = _el$18.nextSibling;
22014
22290
  insert(_el$18, () => d().mode === "button" ? "Button label" : "Link text");
22015
22291
  _el$19.$$input = (e) => patchDialog({
22016
22292
  text: e.currentTarget.value
@@ -22031,7 +22307,7 @@ function EmailBodyEditor(props) {
22031
22307
  return urlPlaceholders();
22032
22308
  },
22033
22309
  children: (p) => (() => {
22034
- var _el$32 = _tmpl$1122(), _el$33 = _el$32.firstChild, _el$35 = _el$33.nextSibling; _el$35.nextSibling;
22310
+ var _el$32 = _tmpl$1123(), _el$33 = _el$32.firstChild, _el$35 = _el$33.nextSibling; _el$35.nextSibling;
22035
22311
  insert(_el$32, () => p.description, _el$33);
22036
22312
  insert(_el$32, () => p.token, _el$35);
22037
22313
  effect(() => _el$32.selected = d().target === p.token);
@@ -22044,7 +22320,7 @@ function EmailBodyEditor(props) {
22044
22320
  return d().target === CUSTOM_TARGET;
22045
22321
  },
22046
22322
  get children() {
22047
- var _el$24 = _tmpl$931(), _el$25 = _el$24.firstChild, _el$26 = _el$25.nextSibling;
22323
+ var _el$24 = _tmpl$932(), _el$25 = _el$24.firstChild, _el$26 = _el$25.nextSibling;
22048
22324
  _el$26.$$input = (e) => patchDialog({
22049
22325
  url: e.currentTarget.value
22050
22326
  });
@@ -22060,7 +22336,7 @@ function EmailBodyEditor(props) {
22060
22336
  return d().error;
22061
22337
  },
22062
22338
  get children() {
22063
- var _el$27 = _tmpl$027();
22339
+ var _el$27 = _tmpl$028();
22064
22340
  insert(_el$27, () => d().error);
22065
22341
  return _el$27;
22066
22342
  }
@@ -22075,7 +22351,7 @@ function EmailBodyEditor(props) {
22075
22351
  return d().editing;
22076
22352
  },
22077
22353
  get children() {
22078
- var _el$30 = _tmpl$1108();
22354
+ var _el$30 = _tmpl$1109();
22079
22355
  _el$30.$$click = removeTarget;
22080
22356
  insert(_el$30, () => d().mode === "button" ? "Remove button" : "Remove link");
22081
22357
  return _el$30;
@@ -22111,11 +22387,11 @@ function EmailBodyEditor(props) {
22111
22387
  delegateEvents(["mousedown", "click", "keydown", "input"]);
22112
22388
 
22113
22389
  // src/pages/admin/EmailTextEditor.tsx
22114
- var _tmpl$379 = /* @__PURE__ */ template(`<p style="font-size:0.75rem;color:var(--app-admin-fg-muted);margin:0.5rem 0 0">`);
22115
- var _tmpl$2107 = /* @__PURE__ */ template(`<div style="padding:0.75rem 0.875rem;background:var(--app-admin-info-bg);border:1px solid var(--app-admin-border);border-radius:var(--app-admin-radius-sm)"><p style=font-size:0.75rem;font-weight:600;margin-bottom:0.5rem>Placeholders<span style=font-weight:400;color:var(--app-admin-fg-muted)> &mdash; replaced with the real value when the email is sent. Click the subject or the body, then a placeholder to insert it.</span></p><div style=display:flex;flex-wrap:wrap;gap:0.375rem>`);
22116
- var _tmpl$380 = /* @__PURE__ */ template(`<p class=app-admin-field-error role=alert>This email is too long to save (<!> of <!> characters, formatting included). Shorten it.`);
22117
- var _tmpl$459 = /* @__PURE__ */ template(`<div style=display:flex;flex-direction:column;gap:1.25rem><div><label class=app-admin-label>Subject</label><input type=text aria-label=Subject class=app-admin-input><p style=font-size:0.75rem;color:var(--app-admin-fg-subtle);margin-top:0.25rem>/</p></div><div><span class=app-admin-label>Body`);
22118
- var _tmpl$550 = /* @__PURE__ */ template(`<button type=button class=app-admin-email-token-btn>`);
22390
+ var _tmpl$380 = /* @__PURE__ */ template(`<p style="font-size:0.75rem;color:var(--app-admin-fg-muted);margin:0.5rem 0 0">`);
22391
+ var _tmpl$2108 = /* @__PURE__ */ template(`<div style="padding:0.75rem 0.875rem;background:var(--app-admin-info-bg);border:1px solid var(--app-admin-border);border-radius:var(--app-admin-radius-sm)"><p style=font-size:0.75rem;font-weight:600;margin-bottom:0.5rem>Placeholders<span style=font-weight:400;color:var(--app-admin-fg-muted)> &mdash; replaced with the real value when the email is sent. Click the subject or the body, then a placeholder to insert it.</span></p><div style=display:flex;flex-wrap:wrap;gap:0.375rem>`);
22392
+ var _tmpl$381 = /* @__PURE__ */ template(`<p class=app-admin-field-error role=alert>This email is too long to save (<!> of <!> characters, formatting included). Shorten it.`);
22393
+ var _tmpl$460 = /* @__PURE__ */ template(`<div style=display:flex;flex-direction:column;gap:1.25rem><div><label class=app-admin-label>Subject</label><input type=text aria-label=Subject class=app-admin-input><p style=font-size:0.75rem;color:var(--app-admin-fg-subtle);margin-top:0.25rem>/</p></div><div><span class=app-admin-label>Body`);
22394
+ var _tmpl$551 = /* @__PURE__ */ template(`<button type=button class=app-admin-email-token-btn>`);
22119
22395
  var TEMPLATE_LIMITS = {
22120
22396
  subject: 200,
22121
22397
  body: 2e4
@@ -22147,13 +22423,13 @@ function TemplateTextEditor(props) {
22147
22423
  };
22148
22424
  const bodyTooLong = () => props.value.body.length > TEMPLATE_LIMITS.body;
22149
22425
  return (() => {
22150
- var _el$ = _tmpl$459(), _el$8 = _el$.firstChild, _el$9 = _el$8.firstChild, _el$0 = _el$9.nextSibling, _el$1 = _el$0.nextSibling, _el$10 = _el$1.firstChild, _el$11 = _el$8.nextSibling; _el$11.firstChild;
22426
+ var _el$ = _tmpl$460(), _el$8 = _el$.firstChild, _el$9 = _el$8.firstChild, _el$0 = _el$9.nextSibling, _el$1 = _el$0.nextSibling, _el$10 = _el$1.firstChild, _el$11 = _el$8.nextSibling; _el$11.firstChild;
22151
22427
  insert(_el$, createComponent(Show, {
22152
22428
  get when() {
22153
22429
  return props.placeholders.length > 0;
22154
22430
  },
22155
22431
  get children() {
22156
- var _el$2 = _tmpl$2107(), _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild; _el$4.nextSibling; var _el$6 = _el$3.nextSibling;
22432
+ var _el$2 = _tmpl$2108(), _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild; _el$4.nextSibling; var _el$6 = _el$3.nextSibling;
22157
22433
  insert(_el$6, createComponent(For, {
22158
22434
  get each() {
22159
22435
  return props.placeholders;
@@ -22161,7 +22437,7 @@ function TemplateTextEditor(props) {
22161
22437
  children: (p) => {
22162
22438
  const blocked = () => target() === "subject" && !fitsSubject(p);
22163
22439
  return (() => {
22164
- var _el$20 = _tmpl$550();
22440
+ var _el$20 = _tmpl$551();
22165
22441
  _el$20.$$click = () => insertToken(p);
22166
22442
  _el$20.$$mousedown = (e) => e.preventDefault();
22167
22443
  insert(_el$20, () => p.token);
@@ -22185,7 +22461,7 @@ function TemplateTextEditor(props) {
22185
22461
  return props.note;
22186
22462
  },
22187
22463
  get children() {
22188
- var _el$7 = _tmpl$379();
22464
+ var _el$7 = _tmpl$380();
22189
22465
  insert(_el$7, () => props.note);
22190
22466
  return _el$7;
22191
22467
  }
@@ -22221,7 +22497,7 @@ function TemplateTextEditor(props) {
22221
22497
  return bodyTooLong();
22222
22498
  },
22223
22499
  get children() {
22224
- var _el$13 = _tmpl$380(), _el$14 = _el$13.firstChild, _el$18 = _el$14.nextSibling, _el$15 = _el$18.nextSibling, _el$19 = _el$15.nextSibling; _el$19.nextSibling;
22500
+ var _el$13 = _tmpl$381(), _el$14 = _el$13.firstChild, _el$18 = _el$14.nextSibling, _el$15 = _el$18.nextSibling, _el$19 = _el$15.nextSibling; _el$19.nextSibling;
22225
22501
  insert(_el$13, () => props.value.body.length.toLocaleString(), _el$18);
22226
22502
  insert(_el$13, () => TEMPLATE_LIMITS.body.toLocaleString(), _el$19);
22227
22503
  return _el$13;
@@ -22235,16 +22511,16 @@ function TemplateTextEditor(props) {
22235
22511
  delegateEvents(["input", "mousedown", "click"]);
22236
22512
 
22237
22513
  // src/pages/admin/EmailTemplates.tsx
22238
- var _tmpl$381 = /* @__PURE__ */ template(`<button type=button style="display:block;width:100%;text-align:left;padding:0.5rem 0.75rem;font-size:0.8rem;font-weight:500;border:none;border-radius:var(--app-admin-radius-sm);cursor:pointer;transition:color 0.15s, background 0.15s">`);
22239
- var _tmpl$2108 = /* @__PURE__ */ template(`<button type=button style="display:flex;align-items:center;justify-content:space-between;width:100%;text-align:left;padding:0.4rem 0.5rem;font-size:0.7rem;font-weight:700;letter-spacing:0.03em;text-transform:uppercase;border:none;background:transparent;color:var(--app-admin-fg-subtle);cursor:pointer"><span></span><span style=font-size:0.65rem>`);
22240
- var _tmpl$386 = /* @__PURE__ */ template(`<div style=display:flex;gap:1.5rem;align-items:flex-start><div class=app-admin-card style=min-width:14rem;max-width:14rem;padding:0.5rem;flex-shrink:0;max-height:70vh;overflow-y:auto;position:sticky;top:1rem><div style=margin-bottom:0.25rem>`);
22241
- var _tmpl$460 = /* @__PURE__ */ template(`<div>`);
22242
- var _tmpl$551 = /* @__PURE__ */ template(`<div class=app-admin-empty>No email templates configured.`);
22243
- var _tmpl$647 = /* @__PURE__ */ template(`<div style=margin-bottom:0.25rem>`);
22244
- var _tmpl$741 = /* @__PURE__ */ template(`<div class=app-admin-card style=padding:1.25rem;flex:1;min-width:0><div style=display:flex;flex-direction:column;gap:1.25rem><div style="display:flex;flex-wrap:wrap;gap:0.75rem;padding-top:1rem;border-top:1px solid var(--app-admin-border)"><button type=button class="app-admin-btn app-admin-btn-primary"></button><button type=button class="app-admin-btn app-admin-btn-ghost"></button><button type=button class="app-admin-btn app-admin-btn-ghost">`);
22245
- var _tmpl$835 = /* @__PURE__ */ template(`<p style=font-size:0.75rem;color:var(--app-admin-fg-muted);margin-top:0.25rem>Used by: `);
22246
- var _tmpl$932 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-danger">`);
22247
- var _tmpl$028 = /* @__PURE__ */ template(`<div class=app-admin-card style=padding:1.25rem;flex:1;min-width:0><div style=display:flex;flex-direction:column;gap:1.25rem><div><label class=app-admin-label>Name</label><input type=text aria-label=Name maxlength=120 placeholder="Finish your visit"class=app-admin-input><p style=font-size:0.75rem;color:var(--app-admin-fg-subtle);margin-top:0.25rem>How it appears when picking a template for a sequence step.</p></div><div style="display:flex;flex-wrap:wrap;gap:0.75rem;padding-top:1rem;border-top:1px solid var(--app-admin-border)"><button type=button class="app-admin-btn app-admin-btn-primary"></button><button type=button class="app-admin-btn app-admin-btn-ghost">`);
22514
+ var _tmpl$386 = /* @__PURE__ */ template(`<button type=button style="display:block;width:100%;text-align:left;padding:0.5rem 0.75rem;font-size:0.8rem;font-weight:500;border:none;border-radius:var(--app-admin-radius-sm);cursor:pointer;transition:color 0.15s, background 0.15s">`);
22515
+ var _tmpl$2109 = /* @__PURE__ */ template(`<button type=button style="display:flex;align-items:center;justify-content:space-between;width:100%;text-align:left;padding:0.4rem 0.5rem;font-size:0.7rem;font-weight:700;letter-spacing:0.03em;text-transform:uppercase;border:none;background:transparent;color:var(--app-admin-fg-subtle);cursor:pointer"><span></span><span style=font-size:0.65rem>`);
22516
+ var _tmpl$387 = /* @__PURE__ */ template(`<div style=display:flex;gap:1.5rem;align-items:flex-start><div class=app-admin-card style=min-width:14rem;max-width:14rem;padding:0.5rem;flex-shrink:0;max-height:70vh;overflow-y:auto;position:sticky;top:1rem><div style=margin-bottom:0.25rem>`);
22517
+ var _tmpl$461 = /* @__PURE__ */ template(`<div>`);
22518
+ var _tmpl$554 = /* @__PURE__ */ template(`<div class=app-admin-empty>No email templates configured.`);
22519
+ var _tmpl$648 = /* @__PURE__ */ template(`<div style=margin-bottom:0.25rem>`);
22520
+ var _tmpl$743 = /* @__PURE__ */ template(`<div class=app-admin-card style=padding:1.25rem;flex:1;min-width:0><div style=display:flex;flex-direction:column;gap:1.25rem><div style="display:flex;flex-wrap:wrap;gap:0.75rem;padding-top:1rem;border-top:1px solid var(--app-admin-border)"><button type=button class="app-admin-btn app-admin-btn-primary"></button><button type=button class="app-admin-btn app-admin-btn-ghost"></button><button type=button class="app-admin-btn app-admin-btn-ghost">`);
22521
+ var _tmpl$836 = /* @__PURE__ */ template(`<p style=font-size:0.75rem;color:var(--app-admin-fg-muted);margin-top:0.25rem>Used by: `);
22522
+ var _tmpl$933 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-danger">`);
22523
+ var _tmpl$029 = /* @__PURE__ */ template(`<div class=app-admin-card style=padding:1.25rem;flex:1;min-width:0><div style=display:flex;flex-direction:column;gap:1.25rem><div><label class=app-admin-label>Name</label><input type=text aria-label=Name maxlength=120 placeholder="Finish your visit"class=app-admin-input><p style=font-size:0.75rem;color:var(--app-admin-fg-subtle);margin-top:0.25rem>How it appears when picking a template for a sequence step.</p></div><div style="display:flex;flex-wrap:wrap;gap:0.75rem;padding-top:1rem;border-top:1px solid var(--app-admin-border)"><button type=button class="app-admin-btn app-admin-btn-primary"></button><button type=button class="app-admin-btn app-admin-btn-ghost">`);
22248
22524
  var CATEGORY_DEFS = [{
22249
22525
  label: "Subscription & Billing",
22250
22526
  keys: ["subscriptionConfirmation", "paymentFailed", "subscriptionSuspended", "subscriptionExpiring", "renewalReminder", "cardExpiring", "pastDueNudge"]
@@ -22569,7 +22845,7 @@ function EmailTemplates(props = {}) {
22569
22845
  }
22570
22846
  };
22571
22847
  const navButton = (opts) => (() => {
22572
- var _el$ = _tmpl$381();
22848
+ var _el$ = _tmpl$386();
22573
22849
  addEventListener(_el$, "click", opts.onClick, true);
22574
22850
  insert(_el$, () => opts.label);
22575
22851
  effect((_p$) => {
@@ -22584,14 +22860,14 @@ function EmailTemplates(props = {}) {
22584
22860
  return _el$;
22585
22861
  })();
22586
22862
  const groupHeader = (label3) => (() => {
22587
- var _el$2 = _tmpl$2108(), _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling;
22863
+ var _el$2 = _tmpl$2109(), _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling;
22588
22864
  _el$2.$$click = () => toggleCategory(label3);
22589
22865
  insert(_el$3, label3);
22590
22866
  insert(_el$4, () => collapsed()[label3] ? "\u25B8" : "\u25BE");
22591
22867
  return _el$2;
22592
22868
  })();
22593
22869
  return (() => {
22594
- var _el$5 = _tmpl$460();
22870
+ var _el$5 = _tmpl$461();
22595
22871
  insert(_el$5, createComponent(PageTitle, {
22596
22872
  subtitle: "Customize the transactional emails sent to your customers, and write the ones your sequences send.",
22597
22873
  children: "Email Templates"
@@ -22609,16 +22885,16 @@ function EmailTemplates(props = {}) {
22609
22885
  return templateKeys().length > 0;
22610
22886
  },
22611
22887
  get fallback() {
22612
- return _tmpl$551();
22888
+ return _tmpl$554();
22613
22889
  },
22614
22890
  get children() {
22615
- var _el$6 = _tmpl$386(), _el$7 = _el$6.firstChild, _el$8 = _el$7.firstChild;
22891
+ var _el$6 = _tmpl$387(), _el$7 = _el$6.firstChild, _el$8 = _el$7.firstChild;
22616
22892
  insert(_el$7, createComponent(For, {
22617
22893
  get each() {
22618
22894
  return categorizedKeys();
22619
22895
  },
22620
22896
  children: (group) => (() => {
22621
- var _el$0 = _tmpl$647();
22897
+ var _el$0 = _tmpl$648();
22622
22898
  insert(_el$0, () => groupHeader(group.label), null);
22623
22899
  insert(_el$0, createComponent(Show, {
22624
22900
  get when() {
@@ -22674,7 +22950,7 @@ function EmailTemplates(props = {}) {
22674
22950
  return memo(() => !!!isCustomSelected())() && currentDraft();
22675
22951
  },
22676
22952
  children: (cur) => (() => {
22677
- var _el$1 = _tmpl$741(), _el$10 = _el$1.firstChild, _el$11 = _el$10.firstChild, _el$12 = _el$11.firstChild, _el$13 = _el$12.nextSibling, _el$14 = _el$13.nextSibling;
22953
+ var _el$1 = _tmpl$743(), _el$10 = _el$1.firstChild, _el$11 = _el$10.firstChild, _el$12 = _el$11.firstChild, _el$13 = _el$12.nextSibling, _el$14 = _el$13.nextSibling;
22678
22954
  insert(_el$10, createComponent(TemplateTextEditor, {
22679
22955
  get value() {
22680
22956
  return cur();
@@ -22709,7 +22985,7 @@ function EmailTemplates(props = {}) {
22709
22985
  return memo(() => !!isCustomSelected())() && customDraft();
22710
22986
  },
22711
22987
  children: (cd) => (() => {
22712
- var _el$15 = _tmpl$028(), _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$23 = _el$17.nextSibling, _el$24 = _el$23.firstChild, _el$25 = _el$24.nextSibling;
22988
+ var _el$15 = _tmpl$029(), _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$23 = _el$17.nextSibling, _el$24 = _el$23.firstChild, _el$25 = _el$24.nextSibling;
22713
22989
  _el$19.$$input = (e) => updateCustom({
22714
22990
  name: e.currentTarget.value
22715
22991
  });
@@ -22718,7 +22994,7 @@ function EmailTemplates(props = {}) {
22718
22994
  return (activeCustom()?.usedBy.length ?? 0) > 0;
22719
22995
  },
22720
22996
  get children() {
22721
- var _el$21 = _tmpl$835(); _el$21.firstChild;
22997
+ var _el$21 = _tmpl$836(); _el$21.firstChild;
22722
22998
  insert(_el$21, () => activeCustom().usedBy.map((u) => u.sequenceName).join(", "), null);
22723
22999
  return _el$21;
22724
23000
  }
@@ -22745,7 +23021,7 @@ function EmailTemplates(props = {}) {
22745
23021
  return activeCustomId();
22746
23022
  },
22747
23023
  get children() {
22748
- var _el$26 = _tmpl$932();
23024
+ var _el$26 = _tmpl$933();
22749
23025
  _el$26.$$click = () => void handleDeleteCustom();
22750
23026
  insert(_el$26, () => deleting() ? "Deleting\u2026" : "Delete");
22751
23027
  effect(() => _el$26.disabled = deleting());
@@ -22774,20 +23050,20 @@ function EmailTemplates(props = {}) {
22774
23050
  })();
22775
23051
  }
22776
23052
  delegateEvents(["click", "input"]);
22777
- var _tmpl$387 = /* @__PURE__ */ template(`<p class=app-admin-text-muted style="font-size:0.75rem;margin:0;padding:0.625rem 1.25rem 0">Nothing here has been emailed, and nothing will be until you send it or turn automatic sending on.`);
22778
- var _tmpl$2109 = /* @__PURE__ */ template(`<table class=app-admin-table><thead><tr><th>Person</th><th>Came from</th><th>Waiting</th><th>Step</th><th></th></tr></thead><tbody>`);
22779
- var _tmpl$388 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-primary app-admin-btn-sm">Send all due`);
22780
- var _tmpl$461 = /* @__PURE__ */ template(`<button type=button class=app-admin-link-btn style=font-size:inherit>`);
22781
- var _tmpl$554 = /* @__PURE__ */ template(`<tr><td data-label=Person></td><td data-label="Came from"></td><td data-label=Waiting></td><td data-label=Step> of </td><td class=app-admin-table-cell--end><div style=display:flex;gap:0.375rem;justify-content:flex-end><button type=button class="app-admin-btn app-admin-btn-primary app-admin-btn-sm"></button><button type=button class="app-admin-btn app-admin-btn-ghost app-admin-btn-sm"title="Move past this step without emailing. They stay in the sequence for the next one.">Skip`);
22782
- var _tmpl$648 = /* @__PURE__ */ template(`<span class=app-admin-text-muted style=font-size:0.75rem>No sequences yet \u2014 create one in the Sequences tab.`);
22783
- var _tmpl$743 = /* @__PURE__ */ template(`<div style=display:flex;gap:0.5rem;align-items:center;flex-wrap:wrap><select class=app-admin-input aria-label=Sequence style=width:auto><option value>Add to sequence\u2026</option></select><button type=button class="app-admin-btn app-admin-btn-primary app-admin-btn-sm">`);
22784
- var _tmpl$836 = /* @__PURE__ */ template(`<option>`);
22785
- var _tmpl$933 = /* @__PURE__ */ template(`<option>(deleted template)`);
22786
- var _tmpl$029 = /* @__PURE__ */ template(`<option> (unavailable)`);
22787
- var _tmpl$1109 = /* @__PURE__ */ template(`<div style="display:grid;grid-template-columns:2rem minmax(7rem, 9rem) minmax(12rem, 2fr) auto minmax(10rem, 1fr) auto;gap:0.5rem;align-items:center;padding:0.625rem 1.25rem"><span class=app-admin-text-muted style=font-size:0.8125rem;font-weight:600></span><label style=display:flex;gap:0.375rem;align-items:center;font-size:0.8125rem><span class=app-admin-text-muted></span><input class=app-admin-input type=number min=1 max=720 style=width:4.5rem><span class=app-admin-text-muted>h</span></label><select class=app-admin-input><option value>Choose a template\u2026</option></select><button type=button class=app-admin-link-btn style=font-size:0.8125rem;white-space:nowrap>Edit template</button><select class=app-admin-input></select><div style=display:flex;gap:0.25rem><button type=button class="app-admin-btn app-admin-btn-ghost app-admin-btn-sm">Test</button><button type=button class="app-admin-btn app-admin-btn-ghost app-admin-btn-sm"title="Remove step">\xD7`);
22788
- var _tmpl$1022 = /* @__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.`);
22789
- var _tmpl$1123 = /* @__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>`);
22790
- var _tmpl$1219 = /* @__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">`);
23053
+ var _tmpl$388 = /* @__PURE__ */ template(`<p class=app-admin-text-muted style="font-size:0.75rem;margin:0;padding:0.625rem 1.25rem 0">Nothing here has been emailed, and nothing will be until you send it or turn automatic sending on.`);
23054
+ var _tmpl$2119 = /* @__PURE__ */ template(`<table class=app-admin-table><thead><tr><th>Person</th><th>Came from</th><th>Waiting</th><th>Step</th><th></th></tr></thead><tbody>`);
23055
+ var _tmpl$389 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-primary app-admin-btn-sm">Send all due`);
23056
+ var _tmpl$465 = /* @__PURE__ */ template(`<button type=button class=app-admin-link-btn style=font-size:inherit>`);
23057
+ var _tmpl$555 = /* @__PURE__ */ template(`<tr><td data-label=Person></td><td data-label="Came from"></td><td data-label=Waiting></td><td data-label=Step> of </td><td class=app-admin-table-cell--end><div style=display:flex;gap:0.375rem;justify-content:flex-end><button type=button class="app-admin-btn app-admin-btn-primary app-admin-btn-sm"></button><button type=button class="app-admin-btn app-admin-btn-ghost app-admin-btn-sm"title="Move past this step without emailing. They stay in the sequence for the next one.">Skip`);
23058
+ var _tmpl$649 = /* @__PURE__ */ template(`<span class=app-admin-text-muted style=font-size:0.75rem>No sequences yet \u2014 create one in the Sequences tab.`);
23059
+ var _tmpl$744 = /* @__PURE__ */ template(`<div style=display:flex;gap:0.5rem;align-items:center;flex-wrap:wrap><select class=app-admin-input aria-label=Sequence style=width:auto><option value>Add to sequence\u2026</option></select><button type=button class="app-admin-btn app-admin-btn-primary app-admin-btn-sm">`);
23060
+ var _tmpl$837 = /* @__PURE__ */ template(`<option>`);
23061
+ var _tmpl$934 = /* @__PURE__ */ template(`<option>(deleted template)`);
23062
+ var _tmpl$030 = /* @__PURE__ */ template(`<option> (unavailable)`);
23063
+ var _tmpl$1124 = /* @__PURE__ */ template(`<div style="display:grid;grid-template-columns:2rem minmax(7rem, 9rem) minmax(12rem, 2fr) auto minmax(10rem, 1fr) auto;gap:0.5rem;align-items:center;padding:0.625rem 1.25rem"><span class=app-admin-text-muted style=font-size:0.8125rem;font-weight:600></span><label style=display:flex;gap:0.375rem;align-items:center;font-size:0.8125rem><span class=app-admin-text-muted></span><input class=app-admin-input type=number min=1 max=720 style=width:4.5rem><span class=app-admin-text-muted>h</span></label><select class=app-admin-input><option value>Choose a template\u2026</option></select><button type=button class=app-admin-link-btn style=font-size:0.8125rem;white-space:nowrap>Edit template</button><select class=app-admin-input></select><div style=display:flex;gap:0.25rem><button type=button class="app-admin-btn app-admin-btn-ghost app-admin-btn-sm">Test</button><button type=button class="app-admin-btn app-admin-btn-ghost app-admin-btn-sm"title="Remove step">\xD7`);
23064
+ 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
+ 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
+ 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">`);
22791
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>`);
22792
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.`);
22793
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`);
@@ -22796,14 +23072,14 @@ var _tmpl$1717 = /* @__PURE__ */ template(`<option selected>`);
22796
23072
  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.`);
22797
23073
  var _tmpl$1915 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-sm">Open Offers`);
22798
23074
  var _tmpl$2015 = /* @__PURE__ */ template(`<div style=display:flex;gap:0.75rem;align-items:center;flex-wrap:wrap><span class=app-admin-text-muted style=font-size:0.75rem>No active offers yet. Create one under Marketing \u203A Offers.`);
22799
- var _tmpl$2119 = /* @__PURE__ */ template(`<div style=display:grid;gap:0.75rem><label><span>Offer</span><select class=app-admin-input aria-label=Offer><option value>None</option></select><span class=app-admin-text-muted style=font-size:0.75rem>Granted to each person when they are enrolled. A step is not sent once their offer has lapsed.`);
23075
+ var _tmpl$2120 = /* @__PURE__ */ template(`<div style=display:grid;gap:0.75rem><label><span>Offer</span><select class=app-admin-input aria-label=Offer><option value>None</option></select><span class=app-admin-text-muted style=font-size:0.75rem>Granted to each person when they are enrolled. A step is not sent once their offer has lapsed.`);
22800
23076
  var _tmpl$2215 = /* @__PURE__ */ template(`<div style=max-width:40rem>`);
22801
23077
  var _tmpl$2314 = /* @__PURE__ */ template(`<div><nav role=tablist aria-label="Sequence sections"style="display:flex;gap:0.25rem;border-bottom:1px solid var(--app-admin-border);margin:1rem 0 1.25rem">`);
22802
23078
  var _tmpl$2414 = /* @__PURE__ */ template(`<span style=text-transform:none>`);
22803
23079
  var _tmpl$2514 = /* @__PURE__ */ template(`<span class="app-admin-badge app-admin-badge--neutral"style=text-transform:none>`);
22804
23080
  var _tmpl$2614 = /* @__PURE__ */ template(`<span class="app-admin-badge app-admin-badge--neutral"style=text-transform:none> in it`);
22805
23081
  var _tmpl$2713 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-ghost app-admin-btn-sm">Archive`);
22806
- var _tmpl$2811 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-primary">`);
23082
+ var _tmpl$2812 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-primary">`);
22807
23083
  var _tmpl$2910 = /* @__PURE__ */ template(`<span style=margin-left:0.375rem;opacity:0.7>`);
22808
23084
  var _tmpl$3010 = /* @__PURE__ */ template(`<button type=button role=tab style="padding:0.625rem 1rem;margin-bottom:-1px;font-size:0.8125rem;font-weight:600;text-transform:uppercase;letter-spacing:0.05em;border-bottom:2px solid;background:none;border-top:none;border-left:none;border-right:none;cursor:pointer">`);
22809
23085
  var _tmpl$3115 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-sm">Add step`);
@@ -22813,7 +23089,7 @@ var _tmpl$3414 = /* @__PURE__ */ template(`<tr><td data-label=Person><div class=
22813
23089
  var _tmpl$3510 = /* @__PURE__ */ template(`<div><div style=font-size:0.75rem;margin-bottom:0.25rem></div><div style=display:grid;gap:0.25rem>`);
22814
23090
  var _tmpl$3610 = /* @__PURE__ */ template(`<label style=font-size:0.8125rem;display:flex;gap:0.375rem;align-items:center><input type=checkbox>`);
22815
23091
  var _tmpl$3710 = /* @__PURE__ */ template(`<option> \u2014 <!> off`);
22816
- var _tmpl$389 = /* @__PURE__ */ template(`<div>`);
23092
+ var _tmpl$3810 = /* @__PURE__ */ template(`<div>`);
22817
23093
  var _tmpl$396 = /* @__PURE__ */ template(`<table class=app-admin-table><thead><tr><th>Name</th><th>Steps</th><th>Fed by</th><th>Sending</th><th>In it</th><th>Due now</th><th>Sent</th><th>Bought</th><th>Unsubscribed</th></tr></thead><tbody>`);
22818
23094
  var _tmpl$406 = /* @__PURE__ */ template(`<div class=app-admin-card style=margin-top:1.25rem;overflow:hidden><div style="padding:1rem 1.25rem;border-bottom:1px solid var(--app-admin-border-soft);display:flex;justify-content:space-between;align-items:center"><h2 class=app-admin-heading style=font-size:0.9375rem;font-weight:600;margin:0>Sequences</h2><button type=button class="app-admin-btn app-admin-btn-primary app-admin-btn-sm">New sequence`);
22819
23095
  var _tmpl$4113 = /* @__PURE__ */ template(`<div class=app-admin-text-muted style=font-size:0.75rem>`);
@@ -22907,7 +23183,7 @@ function SequenceQueue(props) {
22907
23183
  return rows().length > 0;
22908
23184
  },
22909
23185
  get children() {
22910
- var _el$5 = _tmpl$388();
23186
+ var _el$5 = _tmpl$389();
22911
23187
  _el$5.$$click = () => void sendAll();
22912
23188
  effect(() => _el$5.disabled = busy() === "all");
22913
23189
  return _el$5;
@@ -22920,7 +23196,7 @@ function SequenceQueue(props) {
22920
23196
  return !props.sequence.autoSend;
22921
23197
  },
22922
23198
  get children() {
22923
- return _tmpl$387();
23199
+ return _tmpl$388();
22924
23200
  }
22925
23201
  }), createComponent(Show, {
22926
23202
  get when() {
@@ -22942,13 +23218,13 @@ function SequenceQueue(props) {
22942
23218
  });
22943
23219
  },
22944
23220
  get children() {
22945
- var _el$2 = _tmpl$2109(), _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling;
23221
+ var _el$2 = _tmpl$2119(), _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling;
22946
23222
  insert(_el$4, createComponent(For, {
22947
23223
  get each() {
22948
23224
  return rows();
22949
23225
  },
22950
23226
  children: (row) => (() => {
22951
- var _el$6 = _tmpl$554(), _el$7 = _el$6.firstChild, _el$9 = _el$7.nextSibling, _el$0 = _el$9.nextSibling, _el$1 = _el$0.nextSibling, _el$10 = _el$1.firstChild, _el$11 = _el$1.nextSibling, _el$12 = _el$11.firstChild, _el$13 = _el$12.firstChild, _el$14 = _el$13.nextSibling;
23227
+ var _el$6 = _tmpl$555(), _el$7 = _el$6.firstChild, _el$9 = _el$7.nextSibling, _el$0 = _el$9.nextSibling, _el$1 = _el$0.nextSibling, _el$10 = _el$1.firstChild, _el$11 = _el$1.nextSibling, _el$12 = _el$11.firstChild, _el$13 = _el$12.firstChild, _el$14 = _el$13.nextSibling;
22952
23228
  insert(_el$7, createComponent(Show, {
22953
23229
  get when() {
22954
23230
  return row.userId && nav;
@@ -22957,7 +23233,7 @@ function SequenceQueue(props) {
22957
23233
  return row.email;
22958
23234
  },
22959
23235
  get children() {
22960
- var _el$8 = _tmpl$461();
23236
+ var _el$8 = _tmpl$465();
22961
23237
  _el$8.$$click = () => nav.openCustomer(row.userId);
22962
23238
  insert(_el$8, () => row.email);
22963
23239
  return _el$8;
@@ -23037,14 +23313,14 @@ function AddToSequence(props) {
23037
23313
  }
23038
23314
  };
23039
23315
  return (() => {
23040
- var _el$15 = _tmpl$743(), _el$16 = _el$15.firstChild; _el$16.firstChild; var _el$18 = _el$16.nextSibling;
23316
+ var _el$15 = _tmpl$744(), _el$16 = _el$15.firstChild; _el$16.firstChild; var _el$18 = _el$16.nextSibling;
23041
23317
  _el$16.addEventListener("change", (e) => setTarget(e.currentTarget.value));
23042
23318
  insert(_el$16, createComponent(For, {
23043
23319
  get each() {
23044
23320
  return sequences()?.sequences ?? [];
23045
23321
  },
23046
23322
  children: (s) => (() => {
23047
- var _el$20 = _tmpl$836();
23323
+ var _el$20 = _tmpl$837();
23048
23324
  insert(_el$20, () => s.name);
23049
23325
  effect(() => _el$20.value = s.id);
23050
23326
  return _el$20;
@@ -23060,7 +23336,7 @@ function AddToSequence(props) {
23060
23336
  return memo(() => !!sequences())() && sequences().sequences.length === 0;
23061
23337
  },
23062
23338
  get children() {
23063
- return _tmpl$648();
23339
+ return _tmpl$649();
23064
23340
  }
23065
23341
  }), null);
23066
23342
  effect(() => _el$18.disabled = busy() || !target() || props.people.length === 0);
@@ -23077,7 +23353,7 @@ function StepRow(props) {
23077
23353
  const missingTemplate = () => props.step.templateId && !props.templates.some((t) => t.id === props.step.templateId);
23078
23354
  const canEditTemplate = () => !!nav && !!props.step.templateId && !missingTemplate();
23079
23355
  return (() => {
23080
- var _el$21 = _tmpl$1109(), _el$22 = _el$21.firstChild, _el$23 = _el$22.nextSibling, _el$24 = _el$23.firstChild, _el$25 = _el$24.nextSibling, _el$26 = _el$23.nextSibling; _el$26.firstChild; var _el$29 = _el$26.nextSibling, _el$30 = _el$29.nextSibling, _el$33 = _el$30.nextSibling, _el$34 = _el$33.firstChild, _el$35 = _el$34.nextSibling;
23356
+ var _el$21 = _tmpl$1124(), _el$22 = _el$21.firstChild, _el$23 = _el$22.nextSibling, _el$24 = _el$23.firstChild, _el$25 = _el$24.nextSibling, _el$26 = _el$23.nextSibling; _el$26.firstChild; var _el$29 = _el$26.nextSibling, _el$30 = _el$29.nextSibling, _el$33 = _el$30.nextSibling, _el$34 = _el$33.firstChild, _el$35 = _el$34.nextSibling;
23081
23357
  insert(_el$22, () => props.index + 1);
23082
23358
  insert(_el$24, () => props.index === 0 ? "after" : "+");
23083
23359
  _el$25.$$input = (e) => set("waitHours", Number(e.currentTarget.value));
@@ -23087,7 +23363,7 @@ function StepRow(props) {
23087
23363
  return missingTemplate();
23088
23364
  },
23089
23365
  get children() {
23090
- var _el$28 = _tmpl$933();
23366
+ var _el$28 = _tmpl$934();
23091
23367
  effect(() => _el$28.value = props.step.templateId);
23092
23368
  return _el$28;
23093
23369
  }
@@ -23097,7 +23373,7 @@ function StepRow(props) {
23097
23373
  return props.templates;
23098
23374
  },
23099
23375
  children: (t) => (() => {
23100
- var _el$36 = _tmpl$836();
23376
+ var _el$36 = _tmpl$837();
23101
23377
  insert(_el$36, () => t.name);
23102
23378
  effect(() => _el$36.value = t.id);
23103
23379
  return _el$36;
@@ -23110,7 +23386,7 @@ function StepRow(props) {
23110
23386
  return memo(() => !!props.step.link)() && !props.links.includes(props.step.link);
23111
23387
  },
23112
23388
  get children() {
23113
- var _el$31 = _tmpl$029(), _el$32 = _el$31.firstChild;
23389
+ var _el$31 = _tmpl$030(), _el$32 = _el$31.firstChild;
23114
23390
  insert(_el$31, () => LINK_LABEL[props.step.link], _el$32);
23115
23391
  effect(() => _el$31.value = props.step.link);
23116
23392
  return _el$31;
@@ -23121,7 +23397,7 @@ function StepRow(props) {
23121
23397
  return props.links;
23122
23398
  },
23123
23399
  children: (l) => (() => {
23124
- var _el$37 = _tmpl$836();
23400
+ var _el$37 = _tmpl$837();
23125
23401
  _el$37.value = l;
23126
23402
  insert(_el$37, () => LINK_LABEL[l]);
23127
23403
  return _el$37;
@@ -23334,7 +23610,7 @@ function SequenceEditor(props) {
23334
23610
  return _el$88;
23335
23611
  }
23336
23612
  }), (() => {
23337
- var _el$89 = _tmpl$2811();
23613
+ var _el$89 = _tmpl$2812();
23338
23614
  _el$89.$$click = () => void save();
23339
23615
  insert(_el$89, (() => {
23340
23616
  var _c$3 = memo(() => !!saving());
@@ -23455,7 +23731,7 @@ function SequenceEditor(props) {
23455
23731
  })();
23456
23732
  },
23457
23733
  get children() {
23458
- return [_tmpl$1022(), createComponent(Index, {
23734
+ return [_tmpl$1023(), createComponent(Index, {
23459
23735
  get each() {
23460
23736
  return draft().steps;
23461
23737
  },
@@ -23518,7 +23794,7 @@ function SequenceEditor(props) {
23518
23794
  });
23519
23795
  },
23520
23796
  get children() {
23521
- var _el$41 = _tmpl$1123(), _el$42 = _el$41.firstChild, _el$43 = _el$42.nextSibling;
23797
+ var _el$41 = _tmpl$1125(), _el$42 = _el$41.firstChild, _el$43 = _el$42.nextSibling;
23522
23798
  insert(_el$43, createComponent(For, {
23523
23799
  get each() {
23524
23800
  return enrollments().enrollments;
@@ -23533,7 +23809,7 @@ function SequenceEditor(props) {
23533
23809
  return e.email;
23534
23810
  },
23535
23811
  get children() {
23536
- var _el$98 = _tmpl$461();
23812
+ var _el$98 = _tmpl$465();
23537
23813
  _el$98.$$click = () => nav.openCustomer(e.userId);
23538
23814
  insert(_el$98, () => e.email);
23539
23815
  return _el$98;
@@ -23569,7 +23845,7 @@ function SequenceEditor(props) {
23569
23845
  insert(_el$44, createComponent(Section, {
23570
23846
  title: "About",
23571
23847
  get children() {
23572
- var _el$45 = _tmpl$1219(), _el$46 = _el$45.firstChild, _el$47 = _el$46.firstChild, _el$48 = _el$47.nextSibling, _el$49 = _el$46.nextSibling, _el$50 = _el$49.firstChild, _el$51 = _el$50.nextSibling;
23848
+ var _el$45 = _tmpl$1220(), _el$46 = _el$45.firstChild, _el$47 = _el$46.firstChild, _el$48 = _el$47.nextSibling, _el$49 = _el$46.nextSibling, _el$50 = _el$49.firstChild, _el$51 = _el$50.nextSibling;
23573
23849
  _el$48.$$input = (e) => update({
23574
23850
  name: e.currentTarget.value
23575
23851
  });
@@ -23676,7 +23952,7 @@ function SequenceEditor(props) {
23676
23952
  insert(_el$44, createComponent(Section, {
23677
23953
  title: "Offer",
23678
23954
  get children() {
23679
- var _el$70 = _tmpl$2119(), _el$71 = _el$70.firstChild, _el$72 = _el$71.firstChild, _el$73 = _el$72.nextSibling, _el$74 = _el$73.firstChild; _el$73.nextSibling;
23955
+ var _el$70 = _tmpl$2120(), _el$71 = _el$70.firstChild, _el$72 = _el$71.firstChild, _el$73 = _el$72.nextSibling, _el$74 = _el$73.firstChild; _el$73.nextSibling;
23680
23956
  _el$73.addEventListener("change", (e) => {
23681
23957
  const offerId = e.currentTarget.value || null;
23682
23958
  update({
@@ -23801,7 +24077,7 @@ function Sequences() {
23801
24077
  void refetchQueue();
23802
24078
  };
23803
24079
  return (() => {
23804
- var _el$116 = _tmpl$389();
24080
+ var _el$116 = _tmpl$3810();
23805
24081
  insert(_el$116, createComponent(Show, {
23806
24082
  get when() {
23807
24083
  return !editing();
@@ -23915,19 +24191,19 @@ delegateEvents(["click", "input"]);
23915
24191
 
23916
24192
  // src/pages/admin/Funnel.tsx
23917
24193
  var _tmpl$390 = /* @__PURE__ */ template(`<p style="font-size:0.75rem;color:var(--app-admin-fg-muted);margin:0.25rem 0 0">`);
23918
- var _tmpl$2120 = /* @__PURE__ */ template(`<div style="padding:1rem 1.25rem;border-bottom:1px solid var(--app-admin-border-soft)"><h2 class=app-admin-heading style=font-size:0.9375rem;font-weight:600;margin:0>`);
24194
+ var _tmpl$2121 = /* @__PURE__ */ template(`<div style="padding:1rem 1.25rem;border-bottom:1px solid var(--app-admin-border-soft)"><h2 class=app-admin-heading style=font-size:0.9375rem;font-weight:600;margin:0>`);
23919
24195
  var _tmpl$391 = /* @__PURE__ */ template(`<label style=font-size:0.8125rem;display:flex;gap:0.375rem;align-items:center;margin-top:0.25rem><input type=checkbox>Savings program only (<!>)`);
23920
- var _tmpl$465 = /* @__PURE__ */ template(`<th>Account`);
23921
- var _tmpl$555 = /* @__PURE__ */ template(`<p class=app-admin-text-muted style="font-size:0.75rem;padding:0.625rem 1.25rem;margin:0">Showing the 50 most recent of <!>.`);
23922
- var _tmpl$649 = /* @__PURE__ */ template(`<div class=app-admin-card style=margin-top:1.25rem;overflow:hidden><div style="padding:1rem 1.25rem;display:grid;gap:0.5rem"></div><div style="padding:0.5rem 1.25rem 0.75rem;border-top:1px solid var(--app-admin-border-soft)"></div><table class=app-admin-table><thead><tr><th style=width:2rem><input type=checkbox aria-label="Select all"></th><th>Person</th><th>Where they stopped</th><th>Since</th></tr></thead><tbody>`);
23923
- var _tmpl$744 = /* @__PURE__ */ template(`<span style=color:var(--app-admin-fg-subtle);margin-left:0.375rem> savings`);
23924
- var _tmpl$837 = /* @__PURE__ */ template(`<button type=button style="display:grid;grid-template-columns:12rem 1fr 7rem;align-items:center;gap:0.75rem;background:none;border:none;padding:0.125rem 0;cursor:pointer;text-align:left;color:inherit;font:inherit"><span style=font-size:0.8125rem;color:var(--app-admin-fg-muted)></span><span style=display:block;background:var(--app-admin-border-soft);border-radius:4px;height:1.125rem><span style=display:block;height:100%;background:var(--app-admin-primary);border-radius:4px></span></span><span style=font-size:0.8125rem;text-align:right>`);
23925
- var _tmpl$934 = /* @__PURE__ */ template(`<tr><td colspan=5>`);
23926
- var _tmpl$030 = /* @__PURE__ */ template(`<button type=button class=app-admin-link-btn style=font-size:inherit;font-weight:inherit>`);
23927
- var _tmpl$1124 = /* @__PURE__ */ template(`<span class="app-admin-badge app-admin-badge--neutral"style=margin-left:0.5rem>Opted out`);
23928
- var _tmpl$1023 = /* @__PURE__ */ template(`<div class=app-admin-text-muted style=font-size:0.75rem>`);
23929
- var _tmpl$1125 = /* @__PURE__ */ template(`<span class="app-admin-badge app-admin-badge--info"style=margin-left:0.5rem>Savings`);
23930
- var _tmpl$1220 = /* @__PURE__ */ template(`<td data-label=Account><span class=app-admin-text-muted>`);
24196
+ var _tmpl$466 = /* @__PURE__ */ template(`<th>Account`);
24197
+ var _tmpl$556 = /* @__PURE__ */ template(`<p class=app-admin-text-muted style="font-size:0.75rem;padding:0.625rem 1.25rem;margin:0">Showing the 50 most recent of <!>.`);
24198
+ var _tmpl$650 = /* @__PURE__ */ template(`<div class=app-admin-card style=margin-top:1.25rem;overflow:hidden><div style="padding:1rem 1.25rem;display:grid;gap:0.5rem"></div><div style="padding:0.5rem 1.25rem 0.75rem;border-top:1px solid var(--app-admin-border-soft)"></div><table class=app-admin-table><thead><tr><th style=width:2rem><input type=checkbox aria-label="Select all"></th><th>Person</th><th>Where they stopped</th><th>Since</th></tr></thead><tbody>`);
24199
+ var _tmpl$745 = /* @__PURE__ */ template(`<span style=color:var(--app-admin-fg-subtle);margin-left:0.375rem> savings`);
24200
+ var _tmpl$838 = /* @__PURE__ */ template(`<button type=button style="display:grid;grid-template-columns:12rem 1fr 7rem;align-items:center;gap:0.75rem;background:none;border:none;padding:0.125rem 0;cursor:pointer;text-align:left;color:inherit;font:inherit"><span style=font-size:0.8125rem;color:var(--app-admin-fg-muted)></span><span style=display:block;background:var(--app-admin-border-soft);border-radius:4px;height:1.125rem><span style=display:block;height:100%;background:var(--app-admin-primary);border-radius:4px></span></span><span style=font-size:0.8125rem;text-align:right>`);
24201
+ var _tmpl$935 = /* @__PURE__ */ template(`<tr><td colspan=5>`);
24202
+ var _tmpl$031 = /* @__PURE__ */ template(`<button type=button class=app-admin-link-btn style=font-size:inherit;font-weight:inherit>`);
24203
+ var _tmpl$1126 = /* @__PURE__ */ template(`<span class="app-admin-badge app-admin-badge--neutral"style=margin-left:0.5rem>Opted out`);
24204
+ var _tmpl$1024 = /* @__PURE__ */ template(`<div class=app-admin-text-muted style=font-size:0.75rem>`);
24205
+ var _tmpl$1127 = /* @__PURE__ */ template(`<span class="app-admin-badge app-admin-badge--info"style=margin-left:0.5rem>Savings`);
24206
+ var _tmpl$1221 = /* @__PURE__ */ template(`<td data-label=Account><span class=app-admin-text-muted>`);
23931
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>`);
23932
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`);
23933
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>`);
@@ -23935,7 +24211,7 @@ var _tmpl$1618 = /* @__PURE__ */ template(`<span style=font-size:0.6875rem;color
23935
24211
  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)>`);
23936
24212
  function CardHeader(props) {
23937
24213
  return (() => {
23938
- var _el$ = _tmpl$2120(), _el$2 = _el$.firstChild;
24214
+ var _el$ = _tmpl$2121(), _el$2 = _el$.firstChild;
23939
24215
  insert(_el$2, () => props.title);
23940
24216
  insert(_el$, createComponent(Show, {
23941
24217
  get when() {
@@ -23977,7 +24253,7 @@ function SegmentSection(props) {
23977
24253
  const allPicked = () => selectable().length > 0 && picked().length === selectable().length;
23978
24254
  const toggleAll = () => setSelected(allPicked() ? {} : Object.fromEntries(selectable().map((p) => [p.email, true])));
23979
24255
  return (() => {
23980
- var _el$4 = _tmpl$649(), _el$5 = _el$4.firstChild, _el$1 = _el$5.nextSibling, _el$10 = _el$1.nextSibling, _el$11 = _el$10.firstChild, _el$12 = _el$11.firstChild, _el$13 = _el$12.firstChild, _el$14 = _el$13.firstChild, _el$15 = _el$13.nextSibling, _el$16 = _el$15.nextSibling; _el$16.nextSibling; var _el$19 = _el$11.nextSibling;
24256
+ var _el$4 = _tmpl$650(), _el$5 = _el$4.firstChild, _el$1 = _el$5.nextSibling, _el$10 = _el$1.nextSibling, _el$11 = _el$10.firstChild, _el$12 = _el$11.firstChild, _el$13 = _el$12.firstChild, _el$14 = _el$13.firstChild, _el$15 = _el$13.nextSibling, _el$16 = _el$15.nextSibling; _el$16.nextSibling; var _el$19 = _el$11.nextSibling;
23981
24257
  insert(_el$4, createComponent(CardHeader, {
23982
24258
  get title() {
23983
24259
  return `${props.title} \u2014 ${props.summary.total}`;
@@ -23991,7 +24267,7 @@ function SegmentSection(props) {
23991
24267
  return props.summary.segments;
23992
24268
  },
23993
24269
  children: (seg) => (() => {
23994
- var _el$24 = _tmpl$837(), _el$25 = _el$24.firstChild, _el$26 = _el$25.nextSibling, _el$27 = _el$26.firstChild, _el$28 = _el$26.nextSibling;
24270
+ var _el$24 = _tmpl$838(), _el$25 = _el$24.firstChild, _el$26 = _el$25.nextSibling, _el$27 = _el$26.firstChild, _el$28 = _el$26.nextSibling;
23995
24271
  _el$24.$$click = () => setFilter(filter() === seg.key ? "all" : seg.key);
23996
24272
  insert(_el$25, () => SEGMENT_LABEL[seg.key]);
23997
24273
  insert(_el$28, () => seg.count, null);
@@ -24000,7 +24276,7 @@ function SegmentSection(props) {
24000
24276
  return hasSavings();
24001
24277
  },
24002
24278
  get children() {
24003
- var _el$29 = _tmpl$744(), _el$30 = _el$29.firstChild;
24279
+ var _el$29 = _tmpl$745(), _el$30 = _el$29.firstChild;
24004
24280
  insert(_el$29, () => seg.savingsMembers, _el$30);
24005
24281
  return _el$29;
24006
24282
  }
@@ -24054,7 +24330,7 @@ function SegmentSection(props) {
24054
24330
  return props.group === "b";
24055
24331
  },
24056
24332
  get children() {
24057
- return _tmpl$465();
24333
+ return _tmpl$466();
24058
24334
  }
24059
24335
  }), null);
24060
24336
  insert(_el$19, createComponent(Show, {
@@ -24063,7 +24339,7 @@ function SegmentSection(props) {
24063
24339
  },
24064
24340
  get fallback() {
24065
24341
  return (() => {
24066
- var _el$31 = _tmpl$934(), _el$32 = _el$31.firstChild;
24342
+ var _el$31 = _tmpl$935(), _el$32 = _el$31.firstChild;
24067
24343
  insert(_el$32, createComponent(LoadingSpinner, {}));
24068
24344
  return _el$31;
24069
24345
  })();
@@ -24074,7 +24350,7 @@ function SegmentSection(props) {
24074
24350
  },
24075
24351
  get fallback() {
24076
24352
  return (() => {
24077
- var _el$33 = _tmpl$934(), _el$34 = _el$33.firstChild;
24353
+ var _el$33 = _tmpl$935(), _el$34 = _el$33.firstChild;
24078
24354
  insert(_el$34, createComponent(EmptyState, {
24079
24355
  message: "Nobody here in this window"
24080
24356
  }));
@@ -24100,7 +24376,7 @@ function SegmentSection(props) {
24100
24376
  return p.name || p.email;
24101
24377
  },
24102
24378
  get children() {
24103
- var _el$40 = _tmpl$030();
24379
+ var _el$40 = _tmpl$031();
24104
24380
  _el$40.$$click = () => nav.openCustomer(p.userId);
24105
24381
  insert(_el$40, () => p.name || p.email);
24106
24382
  return _el$40;
@@ -24111,7 +24387,7 @@ function SegmentSection(props) {
24111
24387
  return p.optedOut;
24112
24388
  },
24113
24389
  get children() {
24114
- return _tmpl$1124();
24390
+ return _tmpl$1126();
24115
24391
  }
24116
24392
  }), null);
24117
24393
  insert(_el$38, createComponent(Show, {
@@ -24119,7 +24395,7 @@ function SegmentSection(props) {
24119
24395
  return p.name;
24120
24396
  },
24121
24397
  get children() {
24122
- var _el$42 = _tmpl$1023();
24398
+ var _el$42 = _tmpl$1024();
24123
24399
  insert(_el$42, () => p.email);
24124
24400
  return _el$42;
24125
24401
  }
@@ -24131,7 +24407,7 @@ function SegmentSection(props) {
24131
24407
  return props.group === "b";
24132
24408
  },
24133
24409
  get children() {
24134
- var _el$45 = _tmpl$1220(), _el$46 = _el$45.firstChild;
24410
+ var _el$45 = _tmpl$1221(), _el$46 = _el$45.firstChild;
24135
24411
  insert(_el$46, (() => {
24136
24412
  var _c$ = memo(() => !!p.accountCreatedAt);
24137
24413
  return () => _c$() ? formatDate(p.accountCreatedAt) : "\u2014";
@@ -24141,7 +24417,7 @@ function SegmentSection(props) {
24141
24417
  return p.savingsMember;
24142
24418
  },
24143
24419
  get children() {
24144
- return _tmpl$1125();
24420
+ return _tmpl$1127();
24145
24421
  }
24146
24422
  }), null);
24147
24423
  return _el$45;
@@ -24168,7 +24444,7 @@ function SegmentSection(props) {
24168
24444
  return people()?.hasMore;
24169
24445
  },
24170
24446
  get children() {
24171
- var _el$20 = _tmpl$555(), _el$21 = _el$20.firstChild, _el$23 = _el$21.nextSibling; _el$23.nextSibling;
24447
+ var _el$20 = _tmpl$556(), _el$21 = _el$20.firstChild, _el$23 = _el$21.nextSibling; _el$23.nextSibling;
24172
24448
  insert(_el$20, () => people().total, _el$23);
24173
24449
  return _el$20;
24174
24450
  }
@@ -24273,19 +24549,19 @@ function Funnel() {
24273
24549
  }
24274
24550
  delegateEvents(["click"]);
24275
24551
  var _tmpl$397 = /* @__PURE__ */ template(`<div>`);
24276
- var _tmpl$2121 = /* @__PURE__ */ template(`<div style=min-width:7.5rem><div style=font-size:0.75rem;text-transform:uppercase;letter-spacing:0.04em></div><div class=app-admin-heading style=font-size:1.375rem;font-weight:600;line-height:1.3>`);
24552
+ var _tmpl$2122 = /* @__PURE__ */ template(`<div style=min-width:7.5rem><div style=font-size:0.75rem;text-transform:uppercase;letter-spacing:0.04em></div><div class=app-admin-heading style=font-size:1.375rem;font-weight:600;line-height:1.3>`);
24277
24553
  var _tmpl$398 = /* @__PURE__ */ template(`<div style="display:flex;flex-wrap:wrap;gap:1.25rem 2rem;margin-bottom:1.25rem">`);
24278
- var _tmpl$466 = /* @__PURE__ */ template(`<table class=app-admin-table style=margin-bottom:1rem><thead><tr><th>Email</th><th>Sent</th><th>Link followed</th><th>Bought after this email</th><th>Unsubscribed after it</th></tr></thead><tbody>`);
24279
- var _tmpl$556 = /* @__PURE__ */ template(`<div> of the <!> bought before any email reached them, so no email is credited above.`);
24280
- var _tmpl$650 = /* @__PURE__ */ template(`<div>No longer in it: <!>.`);
24281
- var _tmpl$745 = /* @__PURE__ */ template(`<div style=display:grid;gap:0.375rem>`);
24282
- var _tmpl$838 = /* @__PURE__ */ template(`<h3 class=app-admin-heading style="font-size:0.875rem;font-weight:600;margin:1.25rem 0 0.5rem">Who bought`);
24283
- var _tmpl$935 = /* @__PURE__ */ template(`<th>Claimed the offer`);
24284
- var _tmpl$031 = /* @__PURE__ */ template(`<table class=app-admin-table><thead><tr><th>Person</th><th>Bought</th><th>Last email before buying</th><th>Followed a link</th><th>Paid since</th></tr></thead><tbody>`);
24285
- var _tmpl$1126 = /* @__PURE__ */ template(`<span>`);
24286
- var _tmpl$1024 = /* @__PURE__ */ template(`<p style=margin:0>Nobody has been enrolled in this sequence yet.`);
24287
- var _tmpl$1127 = /* @__PURE__ */ template(`<p style="margin:0 0 1rem">No emails have gone out yet.`);
24288
- var _tmpl$1221 = /* @__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">`);
24554
+ var _tmpl$467 = /* @__PURE__ */ template(`<table class=app-admin-table style=margin-bottom:1rem><thead><tr><th>Email</th><th>Sent</th><th>Link followed</th><th>Bought after this email</th><th>Unsubscribed after it</th></tr></thead><tbody>`);
24555
+ var _tmpl$557 = /* @__PURE__ */ template(`<div> of the <!> bought before any email reached them, so no email is credited above.`);
24556
+ var _tmpl$651 = /* @__PURE__ */ template(`<div>No longer in it: <!>.`);
24557
+ var _tmpl$746 = /* @__PURE__ */ template(`<div style=display:grid;gap:0.375rem>`);
24558
+ var _tmpl$839 = /* @__PURE__ */ template(`<h3 class=app-admin-heading style="font-size:0.875rem;font-weight:600;margin:1.25rem 0 0.5rem">Who bought`);
24559
+ var _tmpl$936 = /* @__PURE__ */ template(`<th>Claimed the offer`);
24560
+ var _tmpl$032 = /* @__PURE__ */ template(`<table class=app-admin-table><thead><tr><th>Person</th><th>Bought</th><th>Last email before buying</th><th>Followed a link</th><th>Paid since</th></tr></thead><tbody>`);
24561
+ var _tmpl$1128 = /* @__PURE__ */ template(`<span>`);
24562
+ var _tmpl$1025 = /* @__PURE__ */ template(`<p style=margin:0>Nobody has been enrolled in this sequence yet.`);
24563
+ var _tmpl$1129 = /* @__PURE__ */ template(`<p style="margin:0 0 1rem">No emails have gone out yet.`);
24564
+ 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">`);
24289
24565
  var _tmpl$1319 = /* @__PURE__ */ template(`<span>a step since removed`);
24290
24566
  var _tmpl$1419 = /* @__PURE__ */ template(`<div>Offer: <!> granted \u2014 <!> open, <!> claimed, <!> expired<!>.`);
24291
24567
  var _tmpl$1519 = /* @__PURE__ */ template(`<td data-label="Claimed the offer">`);
@@ -24294,7 +24570,7 @@ var _tmpl$1719 = /* @__PURE__ */ template(`<span>none yet`);
24294
24570
  var _tmpl$1818 = /* @__PURE__ */ template(`<span>No`);
24295
24571
  var _tmpl$1916 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-sm">Open Sequences`);
24296
24572
  var _tmpl$2016 = /* @__PURE__ */ template(`<div style=display:flex;justify-content:flex-end;gap:0.5rem;margin-bottom:0.75rem><button type=button class="app-admin-btn app-admin-btn-sm">Refresh`);
24297
- var _tmpl$2122 = /* @__PURE__ */ template(`<div style=display:grid;gap:1.25rem>`);
24573
+ var _tmpl$2123 = /* @__PURE__ */ template(`<div style=display:grid;gap:1.25rem>`);
24298
24574
  var _tmpl$2216 = /* @__PURE__ */ template(`<div style=margin-top:1.25rem;display:grid;gap:0.25rem><div>A purchase counts if it happened while the person was in the sequence, or within <!> days of their last email from it.</div><div>A link counts as followed when the person\u2019s browser opens the site from the email. Emails sent before link tracking was added show none.</div><div>Paid is every settled payment from those buyers since they were enrolled, not only the first.`);
24299
24575
  var muted = {
24300
24576
  color: "var(--app-admin-fg-muted)",
@@ -24312,7 +24588,7 @@ function money(cents) {
24312
24588
  }
24313
24589
  function Figure(props) {
24314
24590
  return (() => {
24315
- var _el$ = _tmpl$2121(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling;
24591
+ var _el$ = _tmpl$2122(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling;
24316
24592
  insert(_el$2, () => props.label);
24317
24593
  insert(_el$3, () => props.value);
24318
24594
  insert(_el$, createComponent(Show, {
@@ -24344,7 +24620,7 @@ function SequenceCard(props) {
24344
24620
  },
24345
24621
  get action() {
24346
24622
  return (() => {
24347
- var _el$27 = _tmpl$1126();
24623
+ var _el$27 = _tmpl$1128();
24348
24624
  insert(_el$27, () => r().sequence.autoSend ? "Sending automatically" : "Sent on review");
24349
24625
  effect((_$p) => style(_el$27, muted, _$p));
24350
24626
  return _el$27;
@@ -24357,7 +24633,7 @@ function SequenceCard(props) {
24357
24633
  },
24358
24634
  get fallback() {
24359
24635
  return (() => {
24360
- var _el$28 = _tmpl$1024();
24636
+ var _el$28 = _tmpl$1025();
24361
24637
  effect((_$p) => style(_el$28, {
24362
24638
  ...muted
24363
24639
  }, _$p));
@@ -24433,7 +24709,7 @@ function SequenceCard(props) {
24433
24709
  },
24434
24710
  get fallback() {
24435
24711
  return (() => {
24436
- var _el$29 = _tmpl$1127();
24712
+ var _el$29 = _tmpl$1129();
24437
24713
  effect((_$p) => style(_el$29, {
24438
24714
  ...muted
24439
24715
  }, _$p));
@@ -24441,13 +24717,13 @@ function SequenceCard(props) {
24441
24717
  })();
24442
24718
  },
24443
24719
  get children() {
24444
- var _el$6 = _tmpl$466(), _el$7 = _el$6.firstChild, _el$8 = _el$7.nextSibling;
24720
+ var _el$6 = _tmpl$467(), _el$7 = _el$6.firstChild, _el$8 = _el$7.nextSibling;
24445
24721
  insert(_el$8, createComponent(For, {
24446
24722
  get each() {
24447
24723
  return r().steps;
24448
24724
  },
24449
24725
  children: (s) => (() => {
24450
- var _el$30 = _tmpl$1221(), _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;
24726
+ 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;
24451
24727
  insert(_el$32, () => s.stepIndex + 1, _el$33);
24452
24728
  insert(_el$31, () => s.templateName ?? (() => {
24453
24729
  var _el$39 = _tmpl$1319();
@@ -24464,13 +24740,13 @@ function SequenceCard(props) {
24464
24740
  return _el$6;
24465
24741
  }
24466
24742
  }), (() => {
24467
- var _el$9 = _tmpl$745();
24743
+ var _el$9 = _tmpl$746();
24468
24744
  insert(_el$9, createComponent(Show, {
24469
24745
  get when() {
24470
24746
  return beforeAnyEmail() > 0;
24471
24747
  },
24472
24748
  get children() {
24473
- var _el$0 = _tmpl$556(), _el$1 = _el$0.firstChild, _el$11 = _el$1.nextSibling; _el$11.nextSibling;
24749
+ var _el$0 = _tmpl$557(), _el$1 = _el$0.firstChild, _el$11 = _el$1.nextSibling; _el$11.nextSibling;
24474
24750
  insert(_el$0, beforeAnyEmail, _el$1);
24475
24751
  insert(_el$0, () => p().bought, _el$11);
24476
24752
  return _el$0;
@@ -24481,7 +24757,7 @@ function SequenceCard(props) {
24481
24757
  return leftParts().length > 0;
24482
24758
  },
24483
24759
  get children() {
24484
- var _el$12 = _tmpl$650(), _el$13 = _el$12.firstChild, _el$15 = _el$13.nextSibling; _el$15.nextSibling;
24760
+ var _el$12 = _tmpl$651(), _el$13 = _el$12.firstChild, _el$15 = _el$13.nextSibling; _el$15.nextSibling;
24485
24761
  insert(_el$12, () => leftParts().join(", "), _el$15);
24486
24762
  return _el$12;
24487
24763
  }
@@ -24516,14 +24792,14 @@ function SequenceCard(props) {
24516
24792
  return r().buyers.length > 0;
24517
24793
  },
24518
24794
  get children() {
24519
- return [_tmpl$838(), (() => {
24520
- var _el$17 = _tmpl$031(), _el$18 = _el$17.firstChild, _el$19 = _el$18.firstChild, _el$20 = _el$19.firstChild, _el$21 = _el$20.nextSibling, _el$22 = _el$21.nextSibling, _el$23 = _el$22.nextSibling, _el$25 = _el$23.nextSibling, _el$26 = _el$18.nextSibling;
24795
+ return [_tmpl$839(), (() => {
24796
+ var _el$17 = _tmpl$032(), _el$18 = _el$17.firstChild, _el$19 = _el$18.firstChild, _el$20 = _el$19.firstChild, _el$21 = _el$20.nextSibling, _el$22 = _el$21.nextSibling, _el$23 = _el$22.nextSibling, _el$25 = _el$23.nextSibling, _el$26 = _el$18.nextSibling;
24521
24797
  insert(_el$19, createComponent(Show, {
24522
24798
  get when() {
24523
24799
  return r().offer;
24524
24800
  },
24525
24801
  get children() {
24526
- return _tmpl$935();
24802
+ return _tmpl$936();
24527
24803
  }
24528
24804
  }), _el$25);
24529
24805
  insert(_el$26, createComponent(For, {
@@ -24635,7 +24911,7 @@ function SequenceResults() {
24635
24911
  _el$65.$$click = () => void refetch();
24636
24912
  return _el$63;
24637
24913
  })(), (() => {
24638
- var _el$66 = _tmpl$2122();
24914
+ var _el$66 = _tmpl$2123();
24639
24915
  insert(_el$66, createComponent(For, {
24640
24916
  get each() {
24641
24917
  return report().sequences;
@@ -24667,19 +24943,19 @@ var [supportChannelMode, setSupportChannelMode] = createSignal(null);
24667
24943
 
24668
24944
  // src/pages/admin/EmailNotifications.tsx
24669
24945
  var _tmpl$399 = /* @__PURE__ */ template(`<p style="font-size:0.75rem;margin:0.25rem 0 0">`);
24670
- var _tmpl$2123 = /* @__PURE__ */ template(`<div class=app-admin-card style=margin-top:1.25rem><div style="padding:1rem 1.25rem;border-bottom:1px solid var(--app-admin-border-soft);display:flex;justify-content:space-between;align-items:center;gap:1rem"><div><h2 class=app-admin-heading style=font-size:0.9375rem;font-weight:600;margin:0></h2></div></div><div style="padding:1rem 1.25rem;display:grid;gap:0.875rem">`);
24946
+ var _tmpl$2124 = /* @__PURE__ */ template(`<div class=app-admin-card style=margin-top:1.25rem><div style="padding:1rem 1.25rem;border-bottom:1px solid var(--app-admin-border-soft);display:flex;justify-content:space-between;align-items:center;gap:1rem"><div><h2 class=app-admin-heading style=font-size:0.9375rem;font-weight:600;margin:0></h2></div></div><div style="padding:1rem 1.25rem;display:grid;gap:0.875rem">`);
24671
24947
  var _tmpl$3100 = /* @__PURE__ */ template(`<label style=display:flex;align-items:center;gap:0.5rem;font-size:0.875rem;cursor:pointer><input type=checkbox>`);
24672
- var _tmpl$467 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-primary app-admin-btn-sm">`);
24673
- var _tmpl$557 = /* @__PURE__ */ template(`<div><div style=margin-bottom:0.375rem>Recipients</div><div style=display:flex;flex-wrap:wrap;gap:0.375rem;margin-bottom:0.5rem></div><div style=display:flex;gap:0.5rem;max-width:28rem><input type=email class=app-admin-input placeholder=admin@example.com aria-label="Add recipient"><button type=button class="app-admin-btn app-admin-btn-sm">Add`);
24674
- var _tmpl$651 = /* @__PURE__ */ template(`<div><div style=margin-bottom:0.375rem>Send a copy for</div><div style="display:grid;grid-template-columns:repeat(auto-fill, minmax(14rem, 1fr));gap:0.375rem 1rem">`);
24675
- var _tmpl$746 = /* @__PURE__ */ template(`<span class=app-admin-text-muted style=font-size:0.8125rem>Nobody \u2014 admin copies go nowhere until someone is added.`);
24676
- var _tmpl$839 = /* @__PURE__ */ template(`<span class="app-admin-badge app-admin-badge--neutral"style=text-transform:none;display:inline-flex;gap:0.375rem;align-items:center><button type=button style=background:none;border:none;cursor:pointer;color:inherit;padding:0;font-size:1rem;line-height:1>&times;`);
24677
- var _tmpl$936 = /* @__PURE__ */ template(`<div style="display:grid;grid-template-columns:repeat(auto-fit, minmax(15rem, 1fr));gap:1rem"><div class=app-admin-card-soft style=padding:0.875rem;display:grid;gap:0.5rem><div>Days before renewal</div><div style=display:flex;flex-wrap:wrap;gap:0.375rem></div><div style=display:flex;gap:0.5rem><input type=number class=app-admin-input min=1 max=90 placeholder="e.g. 7"aria-label="Add days before"style=width:6rem><button type=button class="app-admin-btn app-admin-btn-sm">Add</button></div></div><div class=app-admin-card-soft style=padding:0.875rem;display:grid;gap:0.5rem><label style=display:grid;gap:0.25rem><span>Days before expiry</span><input type=number class=app-admin-input min=7 max=90></label></div><div class=app-admin-card-soft style=padding:0.875rem;display:grid;gap:0.5rem><label style=display:grid;gap:0.25rem><span>Every (days)</span><input type=number class=app-admin-input min=1 max=30></label><label style=display:grid;gap:0.25rem><span>At most (nudges)</span><input type=number class=app-admin-input min=1 max=20>`);
24678
- var _tmpl$032 = /* @__PURE__ */ template(`<button type=button style=background:none;border:none;cursor:pointer;color:inherit;padding:0>&times;`);
24679
- var _tmpl$1128 = /* @__PURE__ */ template(`<span class="app-admin-badge app-admin-badge--neutral"style=text-transform:none;display:inline-flex;gap:0.375rem>d`);
24680
- var _tmpl$1025 = /* @__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>`);
24681
- var _tmpl$1129 = /* @__PURE__ */ template(`<span style=font-size:0.75rem;color:var(--app-admin-danger-fg)>Enter the inbox that should receive support messages.`);
24682
- var _tmpl$1222 = /* @__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>`);
24948
+ var _tmpl$468 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-primary app-admin-btn-sm">`);
24949
+ var _tmpl$558 = /* @__PURE__ */ template(`<div><div style=margin-bottom:0.375rem>Recipients</div><div style=display:flex;flex-wrap:wrap;gap:0.375rem;margin-bottom:0.5rem></div><div style=display:flex;gap:0.5rem;max-width:28rem><input type=email class=app-admin-input placeholder=admin@example.com aria-label="Add recipient"><button type=button class="app-admin-btn app-admin-btn-sm">Add`);
24950
+ var _tmpl$654 = /* @__PURE__ */ template(`<div><div style=margin-bottom:0.375rem>Send a copy for</div><div style="display:grid;grid-template-columns:repeat(auto-fill, minmax(14rem, 1fr));gap:0.375rem 1rem">`);
24951
+ var _tmpl$747 = /* @__PURE__ */ template(`<span class=app-admin-text-muted style=font-size:0.8125rem>Nobody \u2014 admin copies go nowhere until someone is added.`);
24952
+ var _tmpl$840 = /* @__PURE__ */ template(`<span class="app-admin-badge app-admin-badge--neutral"style=text-transform:none;display:inline-flex;gap:0.375rem;align-items:center><button type=button style=background:none;border:none;cursor:pointer;color:inherit;padding:0;font-size:1rem;line-height:1>&times;`);
24953
+ var _tmpl$937 = /* @__PURE__ */ template(`<div style="display:grid;grid-template-columns:repeat(auto-fit, minmax(15rem, 1fr));gap:1rem"><div class=app-admin-card-soft style=padding:0.875rem;display:grid;gap:0.5rem><div>Days before renewal</div><div style=display:flex;flex-wrap:wrap;gap:0.375rem></div><div style=display:flex;gap:0.5rem><input type=number class=app-admin-input min=1 max=90 placeholder="e.g. 7"aria-label="Add days before"style=width:6rem><button type=button class="app-admin-btn app-admin-btn-sm">Add</button></div></div><div class=app-admin-card-soft style=padding:0.875rem;display:grid;gap:0.5rem><label style=display:grid;gap:0.25rem><span>Days before expiry</span><input type=number class=app-admin-input min=7 max=90></label></div><div class=app-admin-card-soft style=padding:0.875rem;display:grid;gap:0.5rem><label style=display:grid;gap:0.25rem><span>Every (days)</span><input type=number class=app-admin-input min=1 max=30></label><label style=display:grid;gap:0.25rem><span>At most (nudges)</span><input type=number class=app-admin-input min=1 max=20>`);
24954
+ var _tmpl$033 = /* @__PURE__ */ template(`<button type=button style=background:none;border:none;cursor:pointer;color:inherit;padding:0>&times;`);
24955
+ var _tmpl$1130 = /* @__PURE__ */ template(`<span class="app-admin-badge app-admin-badge--neutral"style=text-transform:none;display:inline-flex;gap:0.375rem>d`);
24956
+ 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
+ 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
+ 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>`);
24683
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>`);
24684
24960
  var _tmpl$1420 = /* @__PURE__ */ template(`<div>`);
24685
24961
  function humanize2(key) {
@@ -24691,7 +24967,7 @@ var label2 = {
24691
24967
  };
24692
24968
  function Card(props) {
24693
24969
  return (() => {
24694
- var _el$ = _tmpl$2123(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$6 = _el$2.nextSibling;
24970
+ var _el$ = _tmpl$2124(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$6 = _el$2.nextSibling;
24695
24971
  insert(_el$4, () => props.title);
24696
24972
  insert(_el$3, createComponent(Show, {
24697
24973
  get when() {
@@ -24762,7 +25038,7 @@ function NotificationsCard() {
24762
25038
  note: "Who receives a copy when one of these emails goes to a customer. Clinical emails (new messages, prescription updates) are never copied.",
24763
25039
  get aside() {
24764
25040
  return (() => {
24765
- var _el$9 = _tmpl$467();
25041
+ var _el$9 = _tmpl$468();
24766
25042
  _el$9.$$click = () => void save();
24767
25043
  insert(_el$9, () => saving() ? "Saving\u2026" : "Save");
24768
25044
  effect(() => _el$9.disabled = !dirty() || saving());
@@ -24778,16 +25054,16 @@ function NotificationsCard() {
24778
25054
  return createComponent(LoadingSpinner, {});
24779
25055
  },
24780
25056
  children: (s) => [(() => {
24781
- var _el$0 = _tmpl$557(), _el$1 = _el$0.firstChild, _el$10 = _el$1.nextSibling, _el$11 = _el$10.nextSibling, _el$12 = _el$11.firstChild, _el$13 = _el$12.nextSibling;
25057
+ var _el$0 = _tmpl$558(), _el$1 = _el$0.firstChild, _el$10 = _el$1.nextSibling, _el$11 = _el$10.nextSibling, _el$12 = _el$11.firstChild, _el$13 = _el$12.nextSibling;
24782
25058
  insert(_el$10, createComponent(For, {
24783
25059
  get each() {
24784
25060
  return s().recipientEmails;
24785
25061
  },
24786
25062
  get fallback() {
24787
- return _tmpl$746();
25063
+ return _tmpl$747();
24788
25064
  },
24789
25065
  children: (email) => (() => {
24790
- var _el$18 = _tmpl$839(), _el$19 = _el$18.firstChild;
25066
+ var _el$18 = _tmpl$840(), _el$19 = _el$18.firstChild;
24791
25067
  insert(_el$18, email, _el$19);
24792
25068
  _el$19.$$click = () => update({
24793
25069
  recipientEmails: s().recipientEmails.filter((e) => e !== email)
@@ -24805,7 +25081,7 @@ function NotificationsCard() {
24805
25081
  effect(() => _el$12.value = newEmail());
24806
25082
  return _el$0;
24807
25083
  })(), (() => {
24808
- var _el$14 = _tmpl$651(), _el$15 = _el$14.firstChild, _el$16 = _el$15.nextSibling;
25084
+ var _el$14 = _tmpl$654(), _el$15 = _el$14.firstChild, _el$16 = _el$15.nextSibling;
24809
25085
  insert(_el$16, createComponent(For, {
24810
25086
  get each() {
24811
25087
  return Object.keys(s().enabledEvents);
@@ -24883,7 +25159,7 @@ function BillingRemindersCard() {
24883
25159
  note: "Automated emails about upcoming renewals, expiring cards and past-due subscriptions. Each one's copy is under Templates.",
24884
25160
  get aside() {
24885
25161
  return (() => {
24886
- var _el$20 = _tmpl$467();
25162
+ var _el$20 = _tmpl$468();
24887
25163
  _el$20.$$click = () => void save();
24888
25164
  insert(_el$20, () => saving() ? "Saving\u2026" : "Save");
24889
25165
  effect(() => _el$20.disabled = !dirty() || saving());
@@ -24899,7 +25175,7 @@ function BillingRemindersCard() {
24899
25175
  return createComponent(LoadingSpinner, {});
24900
25176
  },
24901
25177
  children: (s) => (() => {
24902
- var _el$21 = _tmpl$936(), _el$22 = _el$21.firstChild, _el$23 = _el$22.firstChild, _el$24 = _el$23.nextSibling, _el$25 = _el$24.nextSibling, _el$26 = _el$25.firstChild, _el$27 = _el$26.nextSibling, _el$28 = _el$22.nextSibling, _el$29 = _el$28.firstChild, _el$30 = _el$29.firstChild, _el$31 = _el$30.nextSibling, _el$32 = _el$28.nextSibling, _el$33 = _el$32.firstChild, _el$34 = _el$33.firstChild, _el$35 = _el$34.nextSibling, _el$36 = _el$33.nextSibling, _el$37 = _el$36.firstChild, _el$38 = _el$37.nextSibling;
25178
+ var _el$21 = _tmpl$937(), _el$22 = _el$21.firstChild, _el$23 = _el$22.firstChild, _el$24 = _el$23.nextSibling, _el$25 = _el$24.nextSibling, _el$26 = _el$25.firstChild, _el$27 = _el$26.nextSibling, _el$28 = _el$22.nextSibling, _el$29 = _el$28.firstChild, _el$30 = _el$29.firstChild, _el$31 = _el$30.nextSibling, _el$32 = _el$28.nextSibling, _el$33 = _el$32.firstChild, _el$34 = _el$33.firstChild, _el$35 = _el$34.nextSibling, _el$36 = _el$33.nextSibling, _el$37 = _el$36.firstChild, _el$38 = _el$37.nextSibling;
24903
25179
  insert(_el$22, createComponent(Toggle, {
24904
25180
  label: "Renewal reminder",
24905
25181
  get checked() {
@@ -24917,14 +25193,14 @@ function BillingRemindersCard() {
24917
25193
  return s().renewalReminder.daysBefore;
24918
25194
  },
24919
25195
  children: (d) => (() => {
24920
- var _el$39 = _tmpl$1128(), _el$40 = _el$39.firstChild;
25196
+ var _el$39 = _tmpl$1130(), _el$40 = _el$39.firstChild;
24921
25197
  insert(_el$39, d, _el$40);
24922
25198
  insert(_el$39, createComponent(Show, {
24923
25199
  get when() {
24924
25200
  return s().renewalReminder.daysBefore.length > 1;
24925
25201
  },
24926
25202
  get children() {
24927
- var _el$41 = _tmpl$032();
25203
+ var _el$41 = _tmpl$033();
24928
25204
  _el$41.$$click = () => update({
24929
25205
  renewalReminder: {
24930
25206
  ...s().renewalReminder,
@@ -25047,7 +25323,7 @@ function SupportChannelCard() {
25047
25323
  }
25048
25324
  };
25049
25325
  const option = (mode, title, note) => (() => {
25050
- var _el$42 = _tmpl$1025(), _el$43 = _el$42.firstChild, _el$44 = _el$43.nextSibling, _el$45 = _el$44.firstChild, _el$46 = _el$45.nextSibling;
25326
+ var _el$42 = _tmpl$1026(), _el$43 = _el$42.firstChild, _el$44 = _el$43.nextSibling, _el$45 = _el$44.firstChild, _el$46 = _el$45.nextSibling;
25051
25327
  _el$43.addEventListener("change", () => update({
25052
25328
  mode
25053
25329
  }));
@@ -25087,7 +25363,7 @@ function SupportChannelCard() {
25087
25363
  },
25088
25364
  get children() {
25089
25365
  return [memo(() => option("portal", "Admin portal", "Customers get a two-way conversation in their portal, and you reply from the Support tab.")), memo(() => option("email", "Email inbox", "Customers see only the Support form. Each message is emailed to the address below; reply to that email to answer them. The Support tab is hidden and nothing is kept in the portal.")), (() => {
25090
- var _el$47 = _tmpl$1222(), _el$48 = _el$47.firstChild, _el$49 = _el$48.nextSibling;
25366
+ var _el$47 = _tmpl$1223(), _el$48 = _el$47.firstChild, _el$49 = _el$48.nextSibling;
25091
25367
  _el$49.$$input = (ev) => update({
25092
25368
  email: ev.currentTarget.value
25093
25369
  });
@@ -25096,7 +25372,7 @@ function SupportChannelCard() {
25096
25372
  return needsInbox();
25097
25373
  },
25098
25374
  get children() {
25099
- var _el$50 = _tmpl$1129();
25375
+ var _el$50 = _tmpl$1131();
25100
25376
  effect((_$p) => style(_el$50, {
25101
25377
  ...label2
25102
25378
  }, _$p));
@@ -25129,18 +25405,18 @@ function EmailNotifications() {
25129
25405
  }
25130
25406
  delegateEvents(["click", "input", "keydown"]);
25131
25407
  var _tmpl$400 = /* @__PURE__ */ template(`<div class=app-admin-card style=margin-top:1.25rem><div style="padding:1rem 1.25rem;border-bottom:1px solid var(--app-admin-border-soft)"><h2 class=app-admin-heading style=font-size:0.9375rem;font-weight:600;margin:0></h2><p style="font-size:0.75rem;margin:0.25rem 0 0"></p></div><div>`);
25132
- var _tmpl$2124 = /* @__PURE__ */ template(`<div style=font-size:0.75rem;margin-top:0.25rem>`);
25408
+ var _tmpl$2125 = /* @__PURE__ */ template(`<div style=font-size:0.75rem;margin-top:0.25rem>`);
25133
25409
  var _tmpl$3101 = /* @__PURE__ */ template(`<div style="display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:0.875rem 1.25rem;border-bottom:1px solid var(--app-admin-border-soft)"><div style=min-width:0><div style=font-size:0.875rem;font-weight:600></div><div style=margin-top:0.125rem></div></div><div style=flex-shrink:0>`);
25134
- var _tmpl$468 = /* @__PURE__ */ template(`<div class=app-admin-notice role=alert style=margin-top:1.25rem>Features could not be loaded. `);
25135
- var _tmpl$558 = /* @__PURE__ */ template(`<div>`);
25136
- var _tmpl$654 = /* @__PURE__ */ template(`<button type=button role=switch class=app-admin-toggle><span class=app-admin-toggle__knob>`);
25137
- var _tmpl$747 = /* @__PURE__ */ template(`<span class="app-admin-badge app-admin-badge--success">On`);
25138
- var _tmpl$840 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-sm">Request`);
25139
- var _tmpl$937 = /* @__PURE__ */ template(`<span class="app-admin-badge app-admin-badge--info"style=text-transform:none>Requested `);
25140
- var _tmpl$033 = /* @__PURE__ */ template(`<p style="margin:0 0 0.875rem">`);
25141
- var _tmpl$1130 = /* @__PURE__ */ template(`<label style=display:grid;gap:0.25rem><span>Anything we should know? (optional)</span><textarea class=app-admin-input rows=4 maxlength=1000>`);
25142
- var _tmpl$1026 = /* @__PURE__ */ template(`<p style="font-size:0.75rem;margin:0.75rem 0 0">We'll email our team and reply to you. Nothing changes on your site until we turn it on.`);
25143
- var _tmpl$1131 = /* @__PURE__ */ template(`<div class=app-admin-btn-row><button type=button class=app-admin-btn>Cancel</button><button type=button class="app-admin-btn app-admin-btn-primary">`);
25410
+ var _tmpl$469 = /* @__PURE__ */ template(`<div class=app-admin-notice role=alert style=margin-top:1.25rem>Features could not be loaded. `);
25411
+ var _tmpl$559 = /* @__PURE__ */ template(`<div>`);
25412
+ var _tmpl$655 = /* @__PURE__ */ template(`<button type=button role=switch class=app-admin-toggle><span class=app-admin-toggle__knob>`);
25413
+ var _tmpl$748 = /* @__PURE__ */ template(`<span class="app-admin-badge app-admin-badge--success">On`);
25414
+ var _tmpl$841 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-sm">Request`);
25415
+ var _tmpl$938 = /* @__PURE__ */ template(`<span class="app-admin-badge app-admin-badge--info"style=text-transform:none>Requested `);
25416
+ var _tmpl$034 = /* @__PURE__ */ template(`<p style="margin:0 0 0.875rem">`);
25417
+ var _tmpl$1132 = /* @__PURE__ */ template(`<label style=display:grid;gap:0.25rem><span>Anything we should know? (optional)</span><textarea class=app-admin-input rows=4 maxlength=1000>`);
25418
+ var _tmpl$1027 = /* @__PURE__ */ template(`<p style="font-size:0.75rem;margin:0.75rem 0 0">We'll email our team and reply to you. Nothing changes on your site until we turn it on.`);
25419
+ var _tmpl$1133 = /* @__PURE__ */ template(`<div class=app-admin-btn-row><button type=button class=app-admin-btn>Cancel</button><button type=button class="app-admin-btn app-admin-btn-primary">`);
25144
25420
  var muted2 = {
25145
25421
  "font-size": "0.8125rem",
25146
25422
  color: "var(--app-admin-fg-muted)"
@@ -25175,7 +25451,7 @@ function Row(props) {
25175
25451
  return props.note;
25176
25452
  },
25177
25453
  get children() {
25178
- var _el$0 = _tmpl$2124();
25454
+ var _el$0 = _tmpl$2125();
25179
25455
  insert(_el$0, () => props.note);
25180
25456
  effect((_$p) => style(_el$0, {
25181
25457
  ...muted2
@@ -25258,7 +25534,7 @@ function Features() {
25258
25534
  }
25259
25535
  };
25260
25536
  return (() => {
25261
- var _el$10 = _tmpl$558();
25537
+ var _el$10 = _tmpl$559();
25262
25538
  insert(_el$10, createComponent(PageTitle, {
25263
25539
  subtitle: "What this site has switched on, and what you can ask for",
25264
25540
  children: "Features"
@@ -25268,7 +25544,7 @@ function Features() {
25268
25544
  return data.error;
25269
25545
  },
25270
25546
  get children() {
25271
- var _el$11 = _tmpl$468(); _el$11.firstChild;
25547
+ var _el$11 = _tmpl$469(); _el$11.firstChild;
25272
25548
  insert(_el$11, () => data.error?.message, null);
25273
25549
  return _el$11;
25274
25550
  }
@@ -25305,7 +25581,7 @@ function Features() {
25305
25581
  return memo(() => !!blockedBy(f))() ? `Turn on "${blockedBy(f).label}" first.` : void 0;
25306
25582
  },
25307
25583
  get children() {
25308
- var _el$13 = _tmpl$654();
25584
+ var _el$13 = _tmpl$655();
25309
25585
  _el$13.$$click = () => void toggle(f);
25310
25586
  effect((_p$) => {
25311
25587
  var _v$3 = f.enabled, _v$4 = f.label, _v$5 = !!f.enabled, _v$6 = !!(busyKey() === f.key), _v$7 = !!busyKey() || !!blockedBy(f), _v$8 = blockedBy(f) ? {
@@ -25355,7 +25631,7 @@ function Features() {
25355
25631
  return !f.enabled;
25356
25632
  },
25357
25633
  get fallback() {
25358
- return _tmpl$747();
25634
+ return _tmpl$748();
25359
25635
  },
25360
25636
  get children() {
25361
25637
  return createComponent(Show, {
@@ -25364,14 +25640,14 @@ function Features() {
25364
25640
  },
25365
25641
  get fallback() {
25366
25642
  return (() => {
25367
- var _el$15 = _tmpl$840();
25643
+ var _el$15 = _tmpl$841();
25368
25644
  _el$15.$$click = () => openRequest(f);
25369
25645
  effect(() => setAttribute(_el$15, "aria-label", `Request ${f.label}`));
25370
25646
  return _el$15;
25371
25647
  })();
25372
25648
  },
25373
25649
  children: (r) => (() => {
25374
- var _el$16 = _tmpl$937(); _el$16.firstChild;
25650
+ var _el$16 = _tmpl$938(); _el$16.firstChild;
25375
25651
  insert(_el$16, () => formatDate2(r().requestedAt), null);
25376
25652
  effect(() => setAttribute(_el$16, "title", `Requested by ${r().requestedBy}`));
25377
25653
  return _el$16;
@@ -25400,7 +25676,7 @@ function Features() {
25400
25676
  onClose: () => !sending() && setRequesting(null),
25401
25677
  get footer() {
25402
25678
  return (() => {
25403
- var _el$23 = _tmpl$1131(), _el$24 = _el$23.firstChild, _el$25 = _el$24.nextSibling;
25679
+ var _el$23 = _tmpl$1133(), _el$24 = _el$23.firstChild, _el$25 = _el$24.nextSibling;
25404
25680
  _el$24.$$click = () => setRequesting(null);
25405
25681
  _el$25.$$click = () => void sendRequest();
25406
25682
  insert(_el$25, () => sending() ? "Sending\u2026" : "Send request");
@@ -25418,20 +25694,20 @@ function Features() {
25418
25694
  },
25419
25695
  get children() {
25420
25696
  return [(() => {
25421
- var _el$18 = _tmpl$033();
25697
+ var _el$18 = _tmpl$034();
25422
25698
  insert(_el$18, () => f().description);
25423
25699
  effect((_$p) => style(_el$18, {
25424
25700
  ...muted2
25425
25701
  }, _$p));
25426
25702
  return _el$18;
25427
25703
  })(), (() => {
25428
- var _el$19 = _tmpl$1130(), _el$20 = _el$19.firstChild, _el$21 = _el$20.nextSibling;
25704
+ var _el$19 = _tmpl$1132(), _el$20 = _el$19.firstChild, _el$21 = _el$20.nextSibling;
25429
25705
  _el$21.$$input = (e) => setNote(e.currentTarget.value);
25430
25706
  effect((_$p) => style(_el$20, muted2, _$p));
25431
25707
  effect(() => _el$21.value = note());
25432
25708
  return _el$19;
25433
25709
  })(), (() => {
25434
- var _el$22 = _tmpl$1026();
25710
+ var _el$22 = _tmpl$1027();
25435
25711
  effect((_$p) => style(_el$22, {
25436
25712
  ...muted2
25437
25713
  }, _$p));
@@ -25447,11 +25723,11 @@ delegateEvents(["click", "input"]);
25447
25723
 
25448
25724
  // src/pages/AdminDashboard.tsx
25449
25725
  var _tmpl$401 = /* @__PURE__ */ template(`<span style=font-size:1rem;opacity:0.7;flex-shrink:0>`);
25450
- var _tmpl$2125 = /* @__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">`);
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">`);
25451
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>`);
25452
- var _tmpl$469 = /* @__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">`);
25453
- var _tmpl$559 = /* @__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`);
25454
- var _tmpl$655 = /* @__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); } }`);
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); } }`);
25455
25731
  var TAB_LABELS = {
25456
25732
  dashboard: "Dashboard",
25457
25733
  customers: "Customers",
@@ -25583,7 +25859,7 @@ function AdminDashboard(props) {
25583
25859
  };
25584
25860
  const topOffset = () => props.topOffset ?? "0px";
25585
25861
  const TabButton = (btnProps) => (() => {
25586
- var _el$ = _tmpl$2125();
25862
+ var _el$ = _tmpl$2126();
25587
25863
  _el$.$$click = () => handleTabClick(btnProps.tab);
25588
25864
  insert(_el$, createComponent(Show, {
25589
25865
  get when() {
@@ -25639,7 +25915,7 @@ function AdminDashboard(props) {
25639
25915
  return visibleGroups();
25640
25916
  },
25641
25917
  children: (group) => [(() => {
25642
- var _el$11 = _tmpl$469();
25918
+ var _el$11 = _tmpl$470();
25643
25919
  insert(_el$11, () => group.label);
25644
25920
  return _el$11;
25645
25921
  })(), createComponent(For, {
@@ -25872,7 +26148,7 @@ function AdminTabError(props) {
25872
26148
  console.error("[AdminDashboard] tab failed to render:", props.error);
25873
26149
  const message = () => props.error instanceof Error ? props.error.message : String(props.error);
25874
26150
  return (() => {
25875
- var _el$12 = _tmpl$559(), _el$13 = _el$12.firstChild, _el$14 = _el$13.nextSibling, _el$15 = _el$14.nextSibling;
26151
+ var _el$12 = _tmpl$560(), _el$13 = _el$12.firstChild, _el$14 = _el$13.nextSibling, _el$15 = _el$14.nextSibling;
25876
26152
  insert(_el$14, message);
25877
26153
  _el$15.$$click = () => props.reset();
25878
26154
  return _el$12;
@@ -25880,7 +26156,7 @@ function AdminTabError(props) {
25880
26156
  }
25881
26157
  function AdminGateSpinner(props) {
25882
26158
  return (() => {
25883
- var _el$16 = _tmpl$655(); _el$16.firstChild;
26159
+ var _el$16 = _tmpl$656(); _el$16.firstChild;
25884
26160
  effect((_p$) => {
25885
26161
  var _v$8 = props.topOffset, _v$9 = `calc(100vh - ${props.topOffset})`;
25886
26162
  _v$8 !== _p$.e && setStyleProperty(_el$16, "top", _p$.e = _v$8);
@@ -25961,19 +26237,19 @@ function affiliateSubTabFromPath(pathname, base = "/admin") {
25961
26237
  return "overview";
25962
26238
  }
25963
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`);
25964
- var _tmpl$2126 = /* @__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`);
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`);
25965
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.`);
25966
- var _tmpl$470 = /* @__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">`);
25967
- var _tmpl$560 = /* @__PURE__ */ template(`<div><h3>Subscription`);
25968
- var _tmpl$656 = /* @__PURE__ */ template(`<div style=display:flex;flex-direction:column;gap:0.5rem>`);
25969
- var _tmpl$748 = /* @__PURE__ */ template(`<div><h3>Prescription requests`);
25970
- var _tmpl$841 = /* @__PURE__ */ template(`<div><h3>Pending surveys`);
25971
- var _tmpl$938 = /* @__PURE__ */ template(`<p style=color:var(--app-admin-fg-muted);font-size:0.875rem>No active subscription.`);
25972
- var _tmpl$034 = /* @__PURE__ */ template(`<p style="font-size:0.75rem;color:var(--app-admin-fg-muted);margin:0.25rem 0 0">Next charge `);
25973
- var _tmpl$1132 = /* @__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>`);
25974
- var _tmpl$1027 = /* @__PURE__ */ template(`<p style="font-size:0.75rem;color:var(--app-admin-fg-muted);margin:0.25rem 0 0">`);
25975
- var _tmpl$1133 = /* @__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`);
25976
- var _tmpl$1223 = /* @__PURE__ */ template(`<p style=color:var(--app-admin-fg-muted);font-size:0.875rem>No prescription requests.`);
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>`);
26250
+ 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`);
26252
+ var _tmpl$1224 = /* @__PURE__ */ template(`<p style=color:var(--app-admin-fg-muted);font-size:0.875rem>No prescription requests.`);
25977
26253
  var _tmpl$1321 = /* @__PURE__ */ template(`<span style=font-size:0.75rem;color:var(--app-admin-fg-muted);margin-left:0.5rem>`);
25978
26254
  var _tmpl$1421 = /* @__PURE__ */ template(`<span> \xB7 `);
25979
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>`);
@@ -25996,7 +26272,7 @@ function PatientDashboardPreview(props) {
25996
26272
  },
25997
26273
  keyed: true,
25998
26274
  children: (msg) => (() => {
25999
- var _el$1 = _tmpl$2126(), _el$10 = _el$1.firstChild, _el$11 = _el$10.nextSibling;
26275
+ var _el$1 = _tmpl$2127(), _el$10 = _el$1.firstChild, _el$11 = _el$10.nextSibling;
26000
26276
  insert(_el$10, msg);
26001
26277
  _el$11.$$click = () => data.retry();
26002
26278
  return _el$1;
@@ -26018,22 +26294,22 @@ function PatientDashboardPreview(props) {
26018
26294
  return _tmpl$3103();
26019
26295
  },
26020
26296
  children: (profile) => [(() => {
26021
- var _el$13 = _tmpl$470(), _el$14 = _el$13.firstChild, _el$15 = _el$14.nextSibling, _el$16 = _el$15.firstChild, _el$17 = _el$16.nextSibling;
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;
26022
26298
  insert(_el$16, () => [profile().firstName, profile().lastName].filter(Boolean).join(" ") || "Member");
26023
26299
  insert(_el$17, () => profile().email);
26024
26300
  effect((_$p) => style(_el$14, panelSectionHeader, _$p));
26025
26301
  return _el$13;
26026
26302
  })(), (() => {
26027
- var _el$18 = _tmpl$560(), _el$19 = _el$18.firstChild;
26303
+ var _el$18 = _tmpl$561(), _el$19 = _el$18.firstChild;
26028
26304
  insert(_el$18, createComponent(Show, {
26029
26305
  get when() {
26030
26306
  return data.subscription();
26031
26307
  },
26032
26308
  get fallback() {
26033
- return _tmpl$938();
26309
+ return _tmpl$939();
26034
26310
  },
26035
26311
  children: (sub) => (() => {
26036
- var _el$27 = _tmpl$1132(), _el$28 = _el$27.firstChild, _el$29 = _el$28.firstChild;
26312
+ var _el$27 = _tmpl$1134(), _el$28 = _el$27.firstChild, _el$29 = _el$28.firstChild;
26037
26313
  insert(_el$29, createComponent(Show, {
26038
26314
  get when() {
26039
26315
  return sub().amount != null;
@@ -26053,7 +26329,7 @@ function PatientDashboardPreview(props) {
26053
26329
  return sub().nextBillingDate;
26054
26330
  },
26055
26331
  get children() {
26056
- var _el$30 = _tmpl$034(); _el$30.firstChild;
26332
+ var _el$30 = _tmpl$035(); _el$30.firstChild;
26057
26333
  insert(_el$30, () => fmtDate(sub().nextBillingDate), null);
26058
26334
  return _el$30;
26059
26335
  }
@@ -26068,7 +26344,7 @@ function PatientDashboardPreview(props) {
26068
26344
  return data.rxStatus();
26069
26345
  },
26070
26346
  children: (rx) => (() => {
26071
- var _el$32 = _tmpl$1133(), _el$33 = _el$32.firstChild, _el$34 = _el$33.nextSibling, _el$35 = _el$34.firstChild; _el$35.firstChild;
26347
+ var _el$32 = _tmpl$1135(), _el$33 = _el$32.firstChild, _el$34 = _el$33.nextSibling, _el$35 = _el$34.firstChild; _el$35.firstChild;
26072
26348
  insert(_el$35, createComponent(StatusBadge, {
26073
26349
  get status() {
26074
26350
  return rx().status;
@@ -26079,7 +26355,7 @@ function PatientDashboardPreview(props) {
26079
26355
  return rx().reason;
26080
26356
  },
26081
26357
  get children() {
26082
- var _el$37 = _tmpl$1027();
26358
+ var _el$37 = _tmpl$1028();
26083
26359
  insert(_el$37, () => rx().reason);
26084
26360
  return _el$37;
26085
26361
  }
@@ -26088,16 +26364,16 @@ function PatientDashboardPreview(props) {
26088
26364
  return _el$32;
26089
26365
  })()
26090
26366
  }), (() => {
26091
- var _el$20 = _tmpl$748(), _el$21 = _el$20.firstChild;
26367
+ var _el$20 = _tmpl$749(), _el$21 = _el$20.firstChild;
26092
26368
  insert(_el$20, createComponent(Show, {
26093
26369
  get when() {
26094
26370
  return (data.rxList() ?? []).length > 0;
26095
26371
  },
26096
26372
  get fallback() {
26097
- return _tmpl$1223();
26373
+ return _tmpl$1224();
26098
26374
  },
26099
26375
  get children() {
26100
- var _el$22 = _tmpl$656();
26376
+ var _el$22 = _tmpl$657();
26101
26377
  insert(_el$22, createComponent(For, {
26102
26378
  get each() {
26103
26379
  return data.rxList();
@@ -26140,7 +26416,7 @@ function PatientDashboardPreview(props) {
26140
26416
  effect((_$p) => style(_el$21, panelSectionHeader, _$p));
26141
26417
  return _el$20;
26142
26418
  })(), (() => {
26143
- var _el$23 = _tmpl$841(), _el$24 = _el$23.firstChild;
26419
+ var _el$23 = _tmpl$842(), _el$24 = _el$23.firstChild;
26144
26420
  insert(_el$23, createComponent(Show, {
26145
26421
  get when() {
26146
26422
  return (data.pendingSurveys() ?? []).length > 0;
@@ -26149,7 +26425,7 @@ function PatientDashboardPreview(props) {
26149
26425
  return _tmpl$1620();
26150
26426
  },
26151
26427
  get children() {
26152
- var _el$25 = _tmpl$656();
26428
+ var _el$25 = _tmpl$657();
26153
26429
  insert(_el$25, createComponent(For, {
26154
26430
  get each() {
26155
26431
  return data.pendingSurveys();
@@ -26175,7 +26451,7 @@ function PatientDashboardPreview(props) {
26175
26451
  }
26176
26452
  delegateEvents(["click"]);
26177
26453
  var _tmpl$408 = /* @__PURE__ */ template(`<div style=margin-bottom:1rem>`);
26178
- var _tmpl$2127 = /* @__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>`);
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>`);
26179
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.`);
26180
26456
  var LIVE = /* @__PURE__ */ new Set(["active", "paused", "past_due"]);
26181
26457
  function UpdatePaymentMethod(props) {
@@ -26237,7 +26513,7 @@ function UpdatePaymentMethod(props) {
26237
26513
  return memo(() => !!!resolving())() && !noSubscription();
26238
26514
  },
26239
26515
  get children() {
26240
- var _el$3 = _tmpl$2127(), _el$5 = _el$3.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$5.nextSibling, _el$8 = _el$7.nextSibling;
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;
26241
26517
  _el$3.addEventListener("submit", handleSubmit);
26242
26518
  insert(_el$3, createComponent(Show, {
26243
26519
  get when() {
@@ -26323,19 +26599,19 @@ function UpdatePaymentMethod(props) {
26323
26599
  })();
26324
26600
  }
26325
26601
  var _tmpl$409 = /* @__PURE__ */ template(`<a class=ship__track target=_blank rel="noopener noreferrer">Track<!> \u2197`);
26326
- var _tmpl$2128 = /* @__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>`);
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>`);
26327
26603
  var _tmpl$3105 = /* @__PURE__ */ template(`<span class=refill__cycle>Day <!> of `);
26328
- var _tmpl$471 = /* @__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>`);
26329
- var _tmpl$561 = /* @__PURE__ */ template(`<span class=refill__cycle>Preparing your next fill`);
26330
- var _tmpl$657 = /* @__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>`);
26331
- var _tmpl$749 = /* @__PURE__ */ template(`<a class=refill__action>Complete check-in \u2192`);
26332
- var _tmpl$842 = /* @__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.`);
26333
- var _tmpl$939 = /* @__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`);
26334
- var _tmpl$035 = /* @__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.`);
26335
- var _tmpl$1134 = /* @__PURE__ */ template(`<span class=thread__halo aria-hidden=true>`);
26336
- var _tmpl$1028 = /* @__PURE__ */ template(`<time class=thread__time>`);
26337
- var _tmpl$1135 = /* @__PURE__ */ template(`<h2 class=thread__hero>`);
26338
- var _tmpl$1224 = /* @__PURE__ */ template(`<p class=thread__caption>`);
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>`);
26612
+ var _tmpl$1029 = /* @__PURE__ */ template(`<time class=thread__time>`);
26613
+ var _tmpl$1137 = /* @__PURE__ */ template(`<h2 class=thread__hero>`);
26614
+ var _tmpl$1225 = /* @__PURE__ */ template(`<p class=thread__caption>`);
26339
26615
  var _tmpl$1322 = /* @__PURE__ */ template(`<button type=button class="portal-btn portal-btn--ghost thread__action">Where's my order?`);
26340
26616
  var _tmpl$1422 = /* @__PURE__ */ template(`<button type=button class="portal-btn portal-btn--primary thread__action">Message your care team`);
26341
26617
  var _tmpl$1521 = /* @__PURE__ */ template(`<button type=button class="portal-btn portal-btn--ghost thread__action">Talk to your provider`);
@@ -26360,7 +26636,7 @@ function TrackingChip(props) {
26360
26636
  }
26361
26637
  };
26362
26638
  return (() => {
26363
- var _el$ = _tmpl$2128(), _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;
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;
26364
26640
  insert(_el$2, () => props.eta);
26365
26641
  _el$4.$$click = copy;
26366
26642
  insert(_el$5, () => props.number);
@@ -26392,13 +26668,13 @@ function OrderTracker(props) {
26392
26668
  return refill();
26393
26669
  },
26394
26670
  children: (r) => (() => {
26395
- var _el$11 = _tmpl$471(), _el$12 = _el$11.firstChild; _el$12.firstChild; var _el$18 = _el$12.nextSibling;
26671
+ var _el$11 = _tmpl$475(), _el$12 = _el$11.firstChild; _el$12.firstChild; var _el$18 = _el$12.nextSibling;
26396
26672
  insert(_el$12, createComponent(Show, {
26397
26673
  get when() {
26398
26674
  return !r().pendingFill;
26399
26675
  },
26400
26676
  get fallback() {
26401
- return _tmpl$561();
26677
+ return _tmpl$564();
26402
26678
  },
26403
26679
  get children() {
26404
26680
  var _el$14 = _tmpl$3105(), _el$15 = _el$14.firstChild, _el$17 = _el$15.nextSibling; _el$17.nextSibling;
@@ -26412,7 +26688,7 @@ function OrderTracker(props) {
26412
26688
  return r().events;
26413
26689
  },
26414
26690
  children: (e) => (() => {
26415
- var _el$20 = _tmpl$657(), _el$21 = _el$20.firstChild, _el$22 = _el$21.nextSibling, _el$23 = _el$22.nextSibling, _el$24 = _el$23.nextSibling;
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;
26416
26692
  insert(_el$22, () => e.label);
26417
26693
  insert(_el$23, () => formatEventDate(e.date));
26418
26694
  insert(_el$24, (() => {
@@ -26425,7 +26701,7 @@ function OrderTracker(props) {
26425
26701
  },
26426
26702
  keyed: true,
26427
26703
  children: (rid) => (() => {
26428
- var _el$25 = _tmpl$749();
26704
+ var _el$25 = _tmpl$750();
26429
26705
  effect(() => setAttribute(_el$25, "href", props.renewHref(rid)));
26430
26706
  return _el$25;
26431
26707
  })()
@@ -26439,14 +26715,14 @@ function OrderTracker(props) {
26439
26715
  })()
26440
26716
  });
26441
26717
  const EmptyState2 = () => (() => {
26442
- var _el$26 = _tmpl$939(), _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;
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;
26443
26719
  insert(_el$26, createComponent(RefillStrip, {}), _el$28);
26444
26720
  insert(_el$28, createComponent(Show, {
26445
26721
  get when() {
26446
26722
  return props.savingsMember;
26447
26723
  },
26448
26724
  get children() {
26449
- return _tmpl$842();
26725
+ return _tmpl$843();
26450
26726
  }
26451
26727
  }), _el$32);
26452
26728
  insert(_el$28, createComponent(Show, {
@@ -26454,7 +26730,7 @@ function OrderTracker(props) {
26454
26730
  return props.offers?.[0];
26455
26731
  },
26456
26732
  children: (offer) => (() => {
26457
- var _el$34 = _tmpl$035(), _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;
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;
26458
26734
  insert(_el$35, () => offerSummaryText(offer()), _el$38);
26459
26735
  insert(_el$34, () => offer().deadlineText, _el$41);
26460
26736
  return _el$34;
@@ -26473,7 +26749,7 @@ function OrderTracker(props) {
26473
26749
  insert(_el$44, createComponent(Show, {
26474
26750
  when: isActive,
26475
26751
  get children() {
26476
- return _tmpl$1134();
26752
+ return _tmpl$1136();
26477
26753
  }
26478
26754
  }));
26479
26755
  className(_el$46, `thread__content${isActive ? " thread__content--active" : ""}`);
@@ -26483,7 +26759,7 @@ function OrderTracker(props) {
26483
26759
  return s.timestamp;
26484
26760
  },
26485
26761
  get children() {
26486
- var _el$49 = _tmpl$1028();
26762
+ var _el$49 = _tmpl$1029();
26487
26763
  insert(_el$49, () => formatStageDate(s.timestamp));
26488
26764
  return _el$49;
26489
26765
  }
@@ -26493,7 +26769,7 @@ function OrderTracker(props) {
26493
26769
  return s.heroWord;
26494
26770
  },
26495
26771
  get children() {
26496
- var _el$50 = _tmpl$1135();
26772
+ var _el$50 = _tmpl$1137();
26497
26773
  insert(_el$50, () => s.heroWord);
26498
26774
  return _el$50;
26499
26775
  }
@@ -26503,7 +26779,7 @@ function OrderTracker(props) {
26503
26779
  return s.subCaption;
26504
26780
  },
26505
26781
  get children() {
26506
- var _el$51 = _tmpl$1224();
26782
+ var _el$51 = _tmpl$1225();
26507
26783
  insert(_el$51, () => s.subCaption);
26508
26784
  return _el$51;
26509
26785
  }
@@ -26651,8 +26927,8 @@ function OrderTracker(props) {
26651
26927
  });
26652
26928
  }
26653
26929
  delegateEvents(["click"]);
26654
- var _tmpl$475 = /* @__PURE__ */ template(`<span class=rx-row__dose> \xB7 `);
26655
- var _tmpl$2129 = /* @__PURE__ */ template(`<div class=rx-row__body>`);
26930
+ var _tmpl$476 = /* @__PURE__ */ template(`<span class=rx-row__dose> \xB7 `);
26931
+ var _tmpl$2130 = /* @__PURE__ */ template(`<div class=rx-row__body>`);
26656
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>`);
26657
26933
  var STATUS_LABEL = {
26658
26934
  pending: "Under review",
@@ -26678,7 +26954,7 @@ function RxRow(props) {
26678
26954
  return props.rx.dosage;
26679
26955
  },
26680
26956
  get children() {
26681
- var _el$4 = _tmpl$475(); _el$4.firstChild;
26957
+ var _el$4 = _tmpl$476(); _el$4.firstChild;
26682
26958
  insert(_el$4, () => props.rx.dosage, null);
26683
26959
  return _el$4;
26684
26960
  }
@@ -26689,7 +26965,7 @@ function RxRow(props) {
26689
26965
  return open();
26690
26966
  },
26691
26967
  get children() {
26692
- var _el$8 = _tmpl$2129();
26968
+ var _el$8 = _tmpl$2130();
26693
26969
  insert(_el$8, createComponent(OrderTracker, {
26694
26970
  get request() {
26695
26971
  return props.request;
@@ -26732,17 +27008,17 @@ function RxRow(props) {
26732
27008
  })();
26733
27009
  }
26734
27010
  delegateEvents(["click"]);
26735
- var _tmpl$476 = /* @__PURE__ */ template(`<div class=plan data-testid=plan-billing><span class=lab-label>Plan &amp; billing`);
26736
- var _tmpl$2130 = /* @__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`);
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`);
26737
27013
  var _tmpl$3107 = /* @__PURE__ */ template(`<p class=membership__dose>`);
26738
- var _tmpl$477 = /* @__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 `);
26739
- var _tmpl$564 = /* @__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`);
26740
- var _tmpl$658 = /* @__PURE__ */ template(`<p class=plan__note>Question about billing? <button type=button class=plan__note-link>Message support`);
26741
- var _tmpl$750 = /* @__PURE__ */ template(`<p class=plan__error role=alert>`);
26742
- var _tmpl$843 = /* @__PURE__ */ template(`<button type=button class=plan__link-btn>`);
26743
- var _tmpl$940 = /* @__PURE__ */ template(`<button type=button class="plan__link-btn plan__link-btn--quiet">Cancel subscription`);
26744
- var _tmpl$036 = /* @__PURE__ */ template(`<div class=plan__actions><a class=plan__link-btn>Update payment method`);
26745
- var _tmpl$1136 = /* @__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">`);
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">`);
26746
27022
  function formatCents(cents) {
26747
27023
  if (cents == null || Number.isNaN(cents)) return "\u2014";
26748
27024
  return `$${(cents / 100).toFixed(2)}`;
@@ -26787,20 +27063,20 @@ function PlanBilling(props) {
26787
27063
  }
26788
27064
  };
26789
27065
  return (() => {
26790
- var _el$ = _tmpl$476(); _el$.firstChild;
27066
+ var _el$ = _tmpl$477(); _el$.firstChild;
26791
27067
  insert(_el$, createComponent(Show, {
26792
27068
  get when() {
26793
27069
  return primary();
26794
27070
  },
26795
27071
  get fallback() {
26796
27072
  return (() => {
26797
- var _el$3 = _tmpl$2130(), _el$4 = _el$3.firstChild, _el$5 = _el$4.nextSibling, _el$6 = _el$5.nextSibling;
27073
+ var _el$3 = _tmpl$2131(), _el$4 = _el$3.firstChild, _el$5 = _el$4.nextSibling, _el$6 = _el$5.nextSibling;
26798
27074
  effect(() => setAttribute(_el$6, "href", props.intakeHref));
26799
27075
  return _el$3;
26800
27076
  })();
26801
27077
  },
26802
27078
  children: (sub) => [(() => {
26803
- var _el$7 = _tmpl$477(), _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;
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;
26804
27080
  insert(_el$0, () => STATUS_COPY[sub().status] || sub().status);
26805
27081
  insert(_el$1, () => props.brandName);
26806
27082
  insert(_el$10, () => sub().medicationName ?? sub().medication);
@@ -26819,7 +27095,7 @@ function PlanBilling(props) {
26819
27095
  effect(() => className(_el$7, `membership membership--${sub().status}`));
26820
27096
  return _el$7;
26821
27097
  })(), (() => {
26822
- var _el$17 = _tmpl$564(), _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;
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;
26823
27099
  insert(_el$20, () => formatLongDate(sub().createdAt));
26824
27100
  insert(_el$23, () => formatLongDate(sub().currentPeriodEnd));
26825
27101
  insert(_el$26, () => formatCents(sub().amountCents), _el$27);
@@ -26829,7 +27105,7 @@ function PlanBilling(props) {
26829
27105
  return props.messagingEnabled;
26830
27106
  },
26831
27107
  get children() {
26832
- var _el$28 = _tmpl$658(), _el$29 = _el$28.firstChild, _el$31 = _el$29.nextSibling;
27108
+ var _el$28 = _tmpl$659(), _el$29 = _el$28.firstChild, _el$31 = _el$29.nextSibling;
26833
27109
  _el$31.$$click = () => props.onOpenMessages({
26834
27110
  channel: "support",
26835
27111
  category: "billing"
@@ -26841,18 +27117,18 @@ function PlanBilling(props) {
26841
27117
  return error();
26842
27118
  },
26843
27119
  get children() {
26844
- var _el$32 = _tmpl$750();
27120
+ var _el$32 = _tmpl$751();
26845
27121
  insert(_el$32, error);
26846
27122
  return _el$32;
26847
27123
  }
26848
27124
  }), (() => {
26849
- var _el$33 = _tmpl$036(), _el$36 = _el$33.firstChild;
27125
+ var _el$33 = _tmpl$037(), _el$36 = _el$33.firstChild;
26850
27126
  insert(_el$33, createComponent(Show, {
26851
27127
  get when() {
26852
27128
  return sub().status === "active";
26853
27129
  },
26854
27130
  get children() {
26855
- var _el$34 = _tmpl$843();
27131
+ var _el$34 = _tmpl$844();
26856
27132
  _el$34.$$click = () => run("pause", () => subscriptionsApi.pause(sub().id));
26857
27133
  insert(_el$34, () => action() === "pause" ? "Pausing\u2026" : "Pause subscription");
26858
27134
  effect(() => _el$34.disabled = !!action());
@@ -26864,7 +27140,7 @@ function PlanBilling(props) {
26864
27140
  return sub().status === "paused";
26865
27141
  },
26866
27142
  get children() {
26867
- var _el$35 = _tmpl$843();
27143
+ var _el$35 = _tmpl$844();
26868
27144
  _el$35.$$click = () => run("resume", () => subscriptionsApi.resume(sub().id));
26869
27145
  insert(_el$35, () => action() === "resume" ? "Resuming\u2026" : "Resume subscription");
26870
27146
  effect(() => _el$35.disabled = !!action());
@@ -26876,7 +27152,7 @@ function PlanBilling(props) {
26876
27152
  return memo(() => sub().status !== "cancelled")() && sub().status !== "expired";
26877
27153
  },
26878
27154
  get children() {
26879
- var _el$37 = _tmpl$940();
27155
+ var _el$37 = _tmpl$941();
26880
27156
  _el$37.$$click = () => setConfirmCancel(true);
26881
27157
  effect(() => _el$37.disabled = !!action());
26882
27158
  return _el$37;
@@ -26889,7 +27165,7 @@ function PlanBilling(props) {
26889
27165
  return confirmCancel();
26890
27166
  },
26891
27167
  get children() {
26892
- var _el$38 = _tmpl$1136(), _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;
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;
26893
27169
  insert(_el$39, () => formatLongDate(sub().currentPeriodEnd), _el$42);
26894
27170
  _el$44.$$click = () => setConfirmCancel(false);
26895
27171
  _el$45.$$click = () => run("cancel", () => subscriptionsApi.cancel(sub().id)).then(() => setConfirmCancel(false));
@@ -26911,12 +27187,12 @@ function PlanBilling(props) {
26911
27187
  })();
26912
27188
  }
26913
27189
  delegateEvents(["click"]);
26914
- var _tmpl$478 = /* @__PURE__ */ template(`<p class=account__empty>We don\u2019t have your details on file yet.`);
26915
- var _tmpl$2131 = /* @__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.`);
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.`);
26916
27192
  var _tmpl$3108 = /* @__PURE__ */ template(`<button type=button class="account__support-link account__support-btn">Messages`);
26917
- var _tmpl$479 = /* @__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`);
26918
- var _tmpl$565 = /* @__PURE__ */ template(`<div class=account__field><dt class=lab-label></dt><dd>`);
26919
- var _tmpl$659 = /* @__PURE__ */ template(`<a class=account__support-link>`);
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>`);
26920
27196
  function pick(member, ...keys) {
26921
27197
  if (!member) return "";
26922
27198
  for (const k of keys) {
@@ -26957,13 +27233,13 @@ function AccountPanel(props) {
26957
27233
  value: address()
26958
27234
  }].filter((f) => f.value);
26959
27235
  return (() => {
26960
- var _el$ = _tmpl$479(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling, _el$4 = _el$3.nextSibling, _el$0 = _el$4.nextSibling, _el$10 = _el$0.nextSibling;
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;
26961
27237
  insert(_el$4, createComponent(For, {
26962
27238
  get each() {
26963
27239
  return fields();
26964
27240
  },
26965
27241
  children: (f) => (() => {
26966
- var _el$11 = _tmpl$565(), _el$12 = _el$11.firstChild, _el$13 = _el$12.nextSibling;
27242
+ var _el$11 = _tmpl$566(), _el$12 = _el$11.firstChild, _el$13 = _el$12.nextSibling;
26967
27243
  insert(_el$12, () => f.label);
26968
27244
  insert(_el$13, () => f.value);
26969
27245
  return _el$11;
@@ -26974,7 +27250,7 @@ function AccountPanel(props) {
26974
27250
  return fields().length === 0;
26975
27251
  },
26976
27252
  get children() {
26977
- return _tmpl$478();
27253
+ return _tmpl$479();
26978
27254
  }
26979
27255
  }), _el$0);
26980
27256
  insert(_el$, createComponent(Show, {
@@ -26982,7 +27258,7 @@ function AccountPanel(props) {
26982
27258
  return props.messagingEnabled;
26983
27259
  },
26984
27260
  get children() {
26985
- var _el$6 = _tmpl$2131(), _el$7 = _el$6.firstChild, _el$9 = _el$7.nextSibling;
27261
+ var _el$6 = _tmpl$2132(), _el$7 = _el$6.firstChild, _el$9 = _el$7.nextSibling;
26986
27262
  _el$9.$$click = () => props.onOpenMessages({
26987
27263
  channel: "support",
26988
27264
  category: "account"
@@ -27005,7 +27281,7 @@ function AccountPanel(props) {
27005
27281
  return props.legalLinks ?? [];
27006
27282
  },
27007
27283
  children: (link) => (() => {
27008
- var _el$14 = _tmpl$659();
27284
+ var _el$14 = _tmpl$660();
27009
27285
  insert(_el$14, () => link.label);
27010
27286
  effect(() => setAttribute(_el$14, "href", link.href));
27011
27287
  return _el$14;
@@ -27016,12 +27292,12 @@ function AccountPanel(props) {
27016
27292
  })();
27017
27293
  }
27018
27294
  delegateEvents(["click"]);
27019
- var _tmpl$480 = /* @__PURE__ */ template(`<section class="leaflet__section leaflet__section--caution"><h2 class=leaflet__h2>Birth control</h2><p class=leaflet__body>`);
27020
- var _tmpl$2132 = /* @__PURE__ */ template(`<ul class=leaflet__disclaimers id=leaflet-disclaimers>`);
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>`);
27021
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>`);
27022
- var _tmpl$481 = /* @__PURE__ */ template(`<li>`);
27023
- var _tmpl$566 = /* @__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>`);
27024
- var _tmpl$660 = /* @__PURE__ */ template(`<li class=steps__item><span class=steps__num></span><div class=steps__body><h3 class=steps__title></h3><p class=steps__detail>`);
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>`);
27025
27301
  function firstNumber(s) {
27026
27302
  const m = (s || "").match(/\d+(\.\d+)?/);
27027
27303
  return m ? m[0] : null;
@@ -27051,7 +27327,7 @@ function MedicationGuide(props) {
27051
27327
  return props.guide.doNotUseIf;
27052
27328
  },
27053
27329
  children: (item) => (() => {
27054
- var _el$45 = _tmpl$481();
27330
+ var _el$45 = _tmpl$485();
27055
27331
  insert(_el$45, item);
27056
27332
  return _el$45;
27057
27333
  })()
@@ -27061,7 +27337,7 @@ function MedicationGuide(props) {
27061
27337
  return props.guide.titration;
27062
27338
  },
27063
27339
  children: (step, i) => (() => {
27064
- var _el$46 = _tmpl$566(), _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;
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;
27065
27341
  insert(_el$50, () => step.dose);
27066
27342
  insert(_el$51, () => step.phase);
27067
27343
  insert(_el$52, () => step.timeframe);
@@ -27075,7 +27351,7 @@ function MedicationGuide(props) {
27075
27351
  return props.guide.injectionSteps;
27076
27352
  },
27077
27353
  children: (step) => (() => {
27078
- var _el$54 = _tmpl$660(), _el$55 = _el$54.firstChild, _el$56 = _el$55.nextSibling, _el$57 = _el$56.firstChild, _el$58 = _el$57.nextSibling;
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;
27079
27355
  insert(_el$55, () => step.n);
27080
27356
  insert(_el$57, () => step.title);
27081
27357
  insert(_el$58, () => step.detail);
@@ -27087,7 +27363,7 @@ function MedicationGuide(props) {
27087
27363
  return props.guide.storage;
27088
27364
  },
27089
27365
  children: (item) => (() => {
27090
- var _el$59 = _tmpl$481();
27366
+ var _el$59 = _tmpl$485();
27091
27367
  insert(_el$59, item);
27092
27368
  return _el$59;
27093
27369
  })()
@@ -27098,7 +27374,7 @@ function MedicationGuide(props) {
27098
27374
  return props.guide.contraception;
27099
27375
  },
27100
27376
  get children() {
27101
- var _el$24 = _tmpl$480(), _el$25 = _el$24.firstChild, _el$26 = _el$25.nextSibling;
27377
+ var _el$24 = _tmpl$481(), _el$25 = _el$24.firstChild, _el$26 = _el$25.nextSibling;
27102
27378
  insert(_el$26, () => props.guide.contraception);
27103
27379
  return _el$24;
27104
27380
  }
@@ -27108,7 +27384,7 @@ function MedicationGuide(props) {
27108
27384
  return props.guide.sideEffectsCommon;
27109
27385
  },
27110
27386
  children: (item) => (() => {
27111
- var _el$60 = _tmpl$481();
27387
+ var _el$60 = _tmpl$485();
27112
27388
  insert(_el$60, item);
27113
27389
  return _el$60;
27114
27390
  })()
@@ -27118,7 +27394,7 @@ function MedicationGuide(props) {
27118
27394
  return props.guide.sideEffectsSerious;
27119
27395
  },
27120
27396
  children: (item) => (() => {
27121
- var _el$61 = _tmpl$481();
27397
+ var _el$61 = _tmpl$485();
27122
27398
  insert(_el$61, item);
27123
27399
  return _el$61;
27124
27400
  })()
@@ -27128,7 +27404,7 @@ function MedicationGuide(props) {
27128
27404
  return props.guide.whenToCall;
27129
27405
  },
27130
27406
  children: (item) => (() => {
27131
- var _el$62 = _tmpl$481();
27407
+ var _el$62 = _tmpl$485();
27132
27408
  insert(_el$62, item);
27133
27409
  return _el$62;
27134
27410
  })()
@@ -27138,7 +27414,7 @@ function MedicationGuide(props) {
27138
27414
  return props.guide.tips;
27139
27415
  },
27140
27416
  children: (item) => (() => {
27141
- var _el$63 = _tmpl$481();
27417
+ var _el$63 = _tmpl$485();
27142
27418
  insert(_el$63, item);
27143
27419
  return _el$63;
27144
27420
  })()
@@ -27150,13 +27426,13 @@ function MedicationGuide(props) {
27150
27426
  return showDisclaimers();
27151
27427
  },
27152
27428
  get children() {
27153
- var _el$44 = _tmpl$2132();
27429
+ var _el$44 = _tmpl$2133();
27154
27430
  insert(_el$44, createComponent(For, {
27155
27431
  get each() {
27156
27432
  return props.guide.disclaimers;
27157
27433
  },
27158
27434
  children: (item) => (() => {
27159
- var _el$64 = _tmpl$481();
27435
+ var _el$64 = _tmpl$485();
27160
27436
  insert(_el$64, item);
27161
27437
  return _el$64;
27162
27438
  })()
@@ -27177,20 +27453,20 @@ function MedicationGuide(props) {
27177
27453
  })();
27178
27454
  }
27179
27455
  delegateEvents(["click"]);
27180
- var _tmpl$485 = /* @__PURE__ */ template(`<span data-testid=channel-chip>`);
27181
- var _tmpl$2133 = /* @__PURE__ */ template(`<span class=channel-chip__category>`);
27456
+ var _tmpl$486 = /* @__PURE__ */ template(`<span data-testid=channel-chip>`);
27457
+ var _tmpl$2134 = /* @__PURE__ */ template(`<span class=channel-chip__category>`);
27182
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`);
27183
- var _tmpl$486 = /* @__PURE__ */ template(`<div class=msg-list__state><div class=request-status__spinner>`);
27184
- var _tmpl$567 = /* @__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>`);
27185
- var _tmpl$661 = /* @__PURE__ */ template(`<div class=msg-list__scroll data-scrollable>`);
27186
- var _tmpl$751 = /* @__PURE__ */ template(`<span class=msg-list__pip>`);
27187
- var _tmpl$844 = /* @__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>`);
27188
- var _tmpl$941 = /* @__PURE__ */ template(`<button type=button class=msg-attachment__image-link><img class=msg-attachment__image loading=lazy>`, true, false, false);
27189
- var _tmpl$037 = /* @__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>`);
27190
- var _tmpl$1137 = /* @__PURE__ */ template(`<span class=msg-attachment__fallback>`);
27191
- var _tmpl$1029 = /* @__PURE__ */ template(`<p class=msg-thread__sender>`);
27192
- var _tmpl$1138 = /* @__PURE__ */ template(`<div class=msg-thread__text>`);
27193
- var _tmpl$1225 = /* @__PURE__ */ template(`<div class=msg-attachment>`);
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>`);
27467
+ var _tmpl$1030 = /* @__PURE__ */ template(`<p class=msg-thread__sender>`);
27468
+ var _tmpl$1140 = /* @__PURE__ */ template(`<div class=msg-thread__text>`);
27469
+ var _tmpl$1226 = /* @__PURE__ */ template(`<div class=msg-attachment>`);
27194
27470
  var _tmpl$1323 = /* @__PURE__ */ template(`<div><div><p class=msg-thread__meta>`);
27195
27471
  var _tmpl$1423 = /* @__PURE__ */ template(`<p class=msg-thread__system data-testid=system-message>`);
27196
27472
  var _tmpl$1522 = /* @__PURE__ */ template(`<p class=msg-thread__text>`);
@@ -27199,14 +27475,14 @@ var _tmpl$1722 = /* @__PURE__ */ template(`<p class=msg-compose__error role=aler
27199
27475
  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>`);
27200
27476
  var _tmpl$1918 = /* @__PURE__ */ template(`<button type=button>`);
27201
27477
  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>`);
27202
- var _tmpl$2134 = /* @__PURE__ */ template(`<span class=msg-choice__option-badge data-testid=gate-care-badge>`);
27478
+ var _tmpl$2135 = /* @__PURE__ */ template(`<span class=msg-choice__option-badge data-testid=gate-care-badge>`);
27203
27479
  var _tmpl$2217 = /* @__PURE__ */ template(`<span class=msg-choice__option-badge data-testid=gate-support-badge>`);
27204
27480
  var _tmpl$2315 = /* @__PURE__ */ template(`<p class=msg-choice__notice-text data-testid=messages-gate-note>That conversation isn't available.`);
27205
27481
  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`);
27206
27482
  var _tmpl$2515 = /* @__PURE__ */ template(`<span class="msg-choice__option-spinner request-status__spinner"data-testid=gate-care-loading>`);
27207
27483
  var _tmpl$2615 = /* @__PURE__ */ template(`<span class="msg-choice__option-spinner request-status__spinner"data-testid=gate-support-loading>`);
27208
27484
  var _tmpl$2714 = /* @__PURE__ */ template(`<div class="msg-thread msg-choice"data-testid=care-team-notice><div class=msg-thread__header><button type=button class=msg-thread__back-btn aria-label=Back><i class="ph-thin ph-arrow-left"aria-hidden=true></i></button><div><h3 class=msg-thread__name>Care team</h3><p class=msg-thread__role>Goes to your care team</p></div></div><div class=msg-choice__notice><p class=msg-choice__notice-text>Your care team will reach out after reviewing your case. If you have a question about your account or order in the meantime, send it to support.</p><button type=button class="portal-btn portal-btn--primary"data-testid=care-team-notice-switch>Message support instead`);
27209
- var _tmpl$2812 = /* @__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`);
27485
+ 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`);
27210
27486
  var _tmpl$2911 = /* @__PURE__ */ template(`<span class=msg-thread__status data-testid=thread-status-closed>Resolved`);
27211
27487
  var _tmpl$3011 = /* @__PURE__ */ template(`<span class=msg-thread__status data-testid=thread-status-transferred>Moved to care team`);
27212
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>`);
@@ -27216,7 +27492,7 @@ var _tmpl$3415 = /* @__PURE__ */ template(`<span class=msg-compose__error role=a
27216
27492
  var _tmpl$3511 = /* @__PURE__ */ template(`<div class=msg-compose__staged>`);
27217
27493
  var _tmpl$3611 = /* @__PURE__ */ template(`<label class=msg-compose__attach title="Attach a file"><i class="ph-thin ph-paperclip"aria-hidden=true></i><span class=msg-compose__attach-label>Attach a file</span><input class=msg-compose__file-input type=file data-testid=messages-attach>`);
27218
27494
  var _tmpl$3711 = /* @__PURE__ */ template(`<div class=msg-compose><textarea class=msg-compose__input rows=1 placeholder="Type a message\u2026"aria-label=Message></textarea><button type=button class=msg-compose__send data-testid=messages-send>`);
27219
- var _tmpl$3810 = /* @__PURE__ */ template(`<span class=msg-compose__staged-file data-testid=staged-file><i class="ph-thin ph-paperclip"aria-hidden=true></i><span class=msg-attachment__file-size></span><button type=button class=msg-compose__staged-remove aria-label="Remove attachment">\xD7`);
27495
+ var _tmpl$3811 = /* @__PURE__ */ template(`<span class=msg-compose__staged-file data-testid=staged-file><i class="ph-thin ph-paperclip"aria-hidden=true></i><span class=msg-attachment__file-size></span><button type=button class=msg-compose__staged-remove aria-label="Remove attachment">\xD7`);
27220
27496
  var _tmpl$3910 = /* @__PURE__ */ template(`<div class=msg-panel__layout><div></div><div>`);
27221
27497
  var _tmpl$4010 = /* @__PURE__ */ template(`<div class=msg-panel data-testid=messages-panel>`);
27222
27498
  var _tmpl$4114 = /* @__PURE__ */ template(`<div class="msg-panel__layout msg-panel__layout--gate">`);
@@ -27422,14 +27698,14 @@ function MessagesPanel(props) {
27422
27698
  }
27423
27699
  }
27424
27700
  const ChannelChip = (p) => (() => {
27425
- var _el$ = _tmpl$485();
27701
+ var _el$ = _tmpl$486();
27426
27702
  insert(_el$, () => p.source === "clinical" ? "Care team" : "Support", null);
27427
27703
  insert(_el$, createComponent(Show, {
27428
27704
  get when() {
27429
27705
  return memo(() => p.source === "support")() && categoryLabel(p.category);
27430
27706
  },
27431
27707
  children: (label3) => (() => {
27432
- var _el$2 = _tmpl$2133();
27708
+ var _el$2 = _tmpl$2134();
27433
27709
  insert(_el$2, label3);
27434
27710
  return _el$2;
27435
27711
  })()
@@ -27453,13 +27729,13 @@ function MessagesPanel(props) {
27453
27729
  _el$7.$$click = openCompose;
27454
27730
  return _el$3;
27455
27731
  })(), (() => {
27456
- var _el$8 = _tmpl$661();
27732
+ var _el$8 = _tmpl$664();
27457
27733
  insert(_el$8, createComponent(Show, {
27458
27734
  get when() {
27459
27735
  return thread().loadingConversations();
27460
27736
  },
27461
27737
  get children() {
27462
- return _tmpl$486();
27738
+ return _tmpl$487();
27463
27739
  }
27464
27740
  }), null);
27465
27741
  insert(_el$8, createComponent(Show, {
@@ -27467,7 +27743,7 @@ function MessagesPanel(props) {
27467
27743
  return memo(() => !!!thread().loadingConversations())() && channelConversations().length === 0;
27468
27744
  },
27469
27745
  get children() {
27470
- var _el$0 = _tmpl$567(), _el$1 = _el$0.firstChild, _el$10 = _el$1.nextSibling, _el$11 = _el$10.nextSibling;
27746
+ var _el$0 = _tmpl$568(), _el$1 = _el$0.firstChild, _el$10 = _el$1.nextSibling, _el$11 = _el$10.nextSibling;
27471
27747
  insert(_el$11, createComponent(Show, {
27472
27748
  get when() {
27473
27749
  return channel() === "care";
@@ -27483,7 +27759,7 @@ function MessagesPanel(props) {
27483
27759
  return channelConversations();
27484
27760
  },
27485
27761
  children: (convo) => (() => {
27486
- var _el$12 = _tmpl$844(), _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;
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;
27487
27763
  _el$12.$$click = () => thread().selectConversation(convo.id);
27488
27764
  insert(_el$15, () => convo.participantName ?? "Provider");
27489
27765
  insert(_el$14, createComponent(ChannelChip, {
@@ -27501,7 +27777,7 @@ function MessagesPanel(props) {
27501
27777
  return (convo.unreadCount ?? 0) > 0;
27502
27778
  },
27503
27779
  get children() {
27504
- var _el$19 = _tmpl$751();
27780
+ var _el$19 = _tmpl$752();
27505
27781
  insert(_el$19, () => convo.unreadCount);
27506
27782
  return _el$19;
27507
27783
  }
@@ -27543,7 +27819,7 @@ function MessagesPanel(props) {
27543
27819
  },
27544
27820
  get fallback() {
27545
27821
  return (() => {
27546
- var _el$22 = _tmpl$037(), _el$23 = _el$22.firstChild, _el$24 = _el$23.nextSibling, _el$25 = _el$24.firstChild, _el$26 = _el$25.nextSibling;
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;
27547
27823
  _el$22.$$click = openDocument;
27548
27824
  insert(_el$25, () => p.attachment.filename);
27549
27825
  insert(_el$26, () => formatFileSize(p.attachment.sizeBytes));
@@ -27558,13 +27834,13 @@ function MessagesPanel(props) {
27558
27834
  },
27559
27835
  get fallback() {
27560
27836
  return (() => {
27561
- var _el$27 = _tmpl$1137();
27837
+ var _el$27 = _tmpl$1139();
27562
27838
  insert(_el$27, () => failed() ? "Attachment unavailable" : "Loading\u2026");
27563
27839
  return _el$27;
27564
27840
  })();
27565
27841
  },
27566
27842
  get children() {
27567
- var _el$20 = _tmpl$941(), _el$21 = _el$20.firstChild;
27843
+ var _el$20 = _tmpl$942(), _el$21 = _el$20.firstChild;
27568
27844
  _el$20.$$click = openDocument;
27569
27845
  _el$21.addEventListener("error", () => {
27570
27846
  if (retried) {
@@ -27610,7 +27886,7 @@ function MessagesPanel(props) {
27610
27886
  return memo(() => !!!isOwn())() && p.msg.senderName;
27611
27887
  },
27612
27888
  get children() {
27613
- var _el$30 = _tmpl$1029();
27889
+ var _el$30 = _tmpl$1030();
27614
27890
  insert(_el$30, () => p.msg.senderName);
27615
27891
  return _el$30;
27616
27892
  }
@@ -27632,7 +27908,7 @@ function MessagesPanel(props) {
27632
27908
  })();
27633
27909
  },
27634
27910
  get children() {
27635
- var _el$31 = _tmpl$1138();
27911
+ var _el$31 = _tmpl$1140();
27636
27912
  effect(() => _el$31.innerHTML = sanitizeMessageHtml(body()));
27637
27913
  return _el$31;
27638
27914
  }
@@ -27644,7 +27920,7 @@ function MessagesPanel(props) {
27644
27920
  return p.msg.attachments?.length;
27645
27921
  },
27646
27922
  get children() {
27647
- var _el$32 = _tmpl$1225();
27923
+ var _el$32 = _tmpl$1226();
27648
27924
  insert(_el$32, createComponent(For, {
27649
27925
  get each() {
27650
27926
  return p.msg.attachments;
@@ -27791,7 +28067,7 @@ function MessagesPanel(props) {
27791
28067
  return careUnreadCount() > 0;
27792
28068
  },
27793
28069
  get children() {
27794
- var _el$77 = _tmpl$2134();
28070
+ var _el$77 = _tmpl$2135();
27795
28071
  insert(_el$77, careUnreadCount);
27796
28072
  return _el$77;
27797
28073
  }
@@ -27839,7 +28115,7 @@ function MessagesPanel(props) {
27839
28115
  return _el$86;
27840
28116
  })();
27841
28117
  const SupportEmailSent = () => (() => {
27842
- var _el$92 = _tmpl$2812(), _el$93 = _el$92.firstChild, _el$94 = _el$93.firstChild, _el$95 = _el$93.nextSibling, _el$96 = _el$95.firstChild, _el$97 = _el$96.nextSibling;
28118
+ var _el$92 = _tmpl$2813(), _el$93 = _el$92.firstChild, _el$94 = _el$93.firstChild, _el$95 = _el$93.nextSibling, _el$96 = _el$95.firstChild, _el$97 = _el$96.nextSibling;
27843
28119
  _el$94.$$click = goToGate;
27844
28120
  _el$97.$$click = () => setEmailSent(false);
27845
28121
  return _el$92;
@@ -27895,7 +28171,7 @@ function MessagesPanel(props) {
27895
28171
  return thread().loadingMessages();
27896
28172
  },
27897
28173
  get children() {
27898
- return _tmpl$486();
28174
+ return _tmpl$487();
27899
28175
  }
27900
28176
  }), _el$110);
27901
28177
  insert(_el$108, createComponent(For, {
@@ -27920,7 +28196,7 @@ function MessagesPanel(props) {
27920
28196
  return pendingFile();
27921
28197
  },
27922
28198
  children: (file) => (() => {
27923
- var _el$120 = _tmpl$3810(), _el$121 = _el$120.firstChild, _el$122 = _el$121.nextSibling, _el$123 = _el$122.nextSibling;
28199
+ var _el$120 = _tmpl$3811(), _el$121 = _el$120.firstChild, _el$122 = _el$121.nextSibling, _el$123 = _el$122.nextSibling;
27924
28200
  insert(_el$120, () => file().name, _el$122);
27925
28201
  insert(_el$122, () => formatFileSize(file().size));
27926
28202
  _el$123.$$click = () => setPendingFile(null);
@@ -28079,18 +28355,18 @@ function MessagesPanel(props) {
28079
28355
  })();
28080
28356
  }
28081
28357
  delegateEvents(["click", "input", "keydown"]);
28082
- var _tmpl$487 = /* @__PURE__ */ template(`<ul class=history-list data-testid=history-list>`);
28083
- var _tmpl$2135 = /* @__PURE__ */ template(`<div class=portal-state data-testid=history-error><p>We couldn't load your submitted surveys. Please try again in a moment.`);
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.`);
28084
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.`);
28085
- var _tmpl$488 = /* @__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>`);
28086
- var _tmpl$568 = /* @__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`);
28087
- var _tmpl$664 = /* @__PURE__ */ template(`<div class=portal-state><div class=request-status__spinner></div><p>Loading your answers\u2026`);
28088
- var _tmpl$752 = /* @__PURE__ */ template(`<div class=portal-state data-testid=history-detail-error><p>We couldn't load this questionnaire. Please try again in a moment.`);
28089
- var _tmpl$845 = /* @__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.`);
28090
- var _tmpl$942 = /* @__PURE__ */ template(`<section class=history-section><h3 class=lab-label>`);
28091
- var _tmpl$038 = /* @__PURE__ */ template(`<div class=history-qa><p class=history-qa__q></p><p class=history-qa__a>`);
28092
- var _tmpl$1139 = /* @__PURE__ */ template(`<div class=survey-history data-testid=survey-history>`);
28093
- var _tmpl$1030 = /* @__PURE__ */ template(`<div class=portal-state><div class=request-status__spinner></div><p>Loading your submitted surveys\u2026`);
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>`);
28369
+ var _tmpl$1031 = /* @__PURE__ */ template(`<div class=portal-state><div class=request-status__spinner></div><p>Loading your submitted surveys\u2026`);
28094
28370
  var MODE_LABELS = {
28095
28371
  initial: "Intake questionnaire",
28096
28372
  refill: "Refill check-in"
@@ -28118,7 +28394,7 @@ function SurveyHistory() {
28118
28394
  return !list.error;
28119
28395
  },
28120
28396
  get fallback() {
28121
- return _tmpl$2135();
28397
+ return _tmpl$2136();
28122
28398
  },
28123
28399
  get children() {
28124
28400
  return createComponent(Show, {
@@ -28129,13 +28405,13 @@ function SurveyHistory() {
28129
28405
  return _tmpl$3118();
28130
28406
  },
28131
28407
  get children() {
28132
- var _el$ = _tmpl$487();
28408
+ var _el$ = _tmpl$488();
28133
28409
  insert(_el$, createComponent(For, {
28134
28410
  get each() {
28135
28411
  return list();
28136
28412
  },
28137
28413
  children: (item) => (() => {
28138
- var _el$4 = _tmpl$488(), _el$5 = _el$4.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling;
28414
+ var _el$4 = _tmpl$489(), _el$5 = _el$4.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling;
28139
28415
  _el$5.$$click = () => setSelectedId(item.id);
28140
28416
  insert(_el$6, () => MODE_LABELS[item.mode] ?? "Questionnaire");
28141
28417
  insert(_el$7, () => formatDate3(item.submittedAt) ?? "Date unavailable");
@@ -28148,14 +28424,14 @@ function SurveyHistory() {
28148
28424
  }
28149
28425
  });
28150
28426
  const DetailView = () => (() => {
28151
- var _el$8 = _tmpl$568(), _el$9 = _el$8.firstChild;
28427
+ var _el$8 = _tmpl$569(), _el$9 = _el$8.firstChild;
28152
28428
  _el$9.$$click = () => setSelectedId(null);
28153
28429
  insert(_el$8, createComponent(Show, {
28154
28430
  get when() {
28155
28431
  return !detail.loading;
28156
28432
  },
28157
28433
  get fallback() {
28158
- return _tmpl$664();
28434
+ return _tmpl$665();
28159
28435
  },
28160
28436
  get children() {
28161
28437
  return createComponent(Show, {
@@ -28163,10 +28439,10 @@ function SurveyHistory() {
28163
28439
  return memo(() => !!!detail.error)() && detail();
28164
28440
  },
28165
28441
  get fallback() {
28166
- return _tmpl$752();
28442
+ return _tmpl$753();
28167
28443
  },
28168
28444
  children: (t) => (() => {
28169
- var _el$10 = _tmpl$845(), _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;
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;
28170
28446
  insert(_el$12, () => MODE_LABELS[t().mode] ?? "Questionnaire");
28171
28447
  insert(_el$13, () => formatDate3(t().completedAt ?? t().createdAt) ?? "\u2014", _el$16);
28172
28448
  insert(_el$10, createComponent(For, {
@@ -28174,14 +28450,14 @@ function SurveyHistory() {
28174
28450
  return t().sections;
28175
28451
  },
28176
28452
  children: (section) => (() => {
28177
- var _el$17 = _tmpl$942(), _el$18 = _el$17.firstChild;
28453
+ var _el$17 = _tmpl$943(), _el$18 = _el$17.firstChild;
28178
28454
  insert(_el$18, () => section.title);
28179
28455
  insert(_el$17, createComponent(For, {
28180
28456
  get each() {
28181
28457
  return section.items;
28182
28458
  },
28183
28459
  children: (item) => (() => {
28184
- var _el$19 = _tmpl$038(), _el$20 = _el$19.firstChild, _el$21 = _el$20.nextSibling;
28460
+ var _el$19 = _tmpl$039(), _el$20 = _el$19.firstChild, _el$21 = _el$20.nextSibling;
28185
28461
  insert(_el$20, () => item.question);
28186
28462
  insert(_el$21, () => item.answer);
28187
28463
  return _el$19;
@@ -28198,13 +28474,13 @@ function SurveyHistory() {
28198
28474
  return _el$8;
28199
28475
  })();
28200
28476
  return (() => {
28201
- var _el$22 = _tmpl$1139();
28477
+ var _el$22 = _tmpl$1141();
28202
28478
  insert(_el$22, createComponent(Show, {
28203
28479
  get when() {
28204
28480
  return !list.loading || selectedId();
28205
28481
  },
28206
28482
  get fallback() {
28207
- return _tmpl$1030();
28483
+ return _tmpl$1031();
28208
28484
  },
28209
28485
  get children() {
28210
28486
  return createComponent(Show, {
@@ -28226,19 +28502,19 @@ function SurveyHistory() {
28226
28502
  delegateEvents(["click"]);
28227
28503
 
28228
28504
  // src/pages/MemberPortal.tsx
28229
- var _tmpl$489 = /* @__PURE__ */ template(`<span class=portal-item__live aria-label="In progress">`);
28230
- var _tmpl$2136 = /* @__PURE__ */ template(`<span>`);
28505
+ var _tmpl$490 = /* @__PURE__ */ template(`<span class=portal-item__live aria-label="In progress">`);
28506
+ var _tmpl$2137 = /* @__PURE__ */ template(`<span>`);
28231
28507
  var _tmpl$3119 = /* @__PURE__ */ template(`<button type=button><i aria-hidden=true></i><span class=portal-item__label>`);
28232
- var _tmpl$490 = /* @__PURE__ */ template(`<div class=rx-others data-testid=rx-others><span class=lab-label>Other orders`);
28233
- var _tmpl$569 = /* @__PURE__ */ template(`<div class=rx-stack>`);
28234
- var _tmpl$665 = /* @__PURE__ */ template(`<div class=portal-state><div class=request-status__spinner></div><p>Loading your portal\u2026`);
28235
- var _tmpl$753 = /* @__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`);
28236
- var _tmpl$846 = /* @__PURE__ */ template(`<p class=portal-rail__hi>Hi, `);
28237
- var _tmpl$943 = /* @__PURE__ */ template(`<a class=portal-rail__back data-testid=rail-back>\u2190 Back to shop`);
28238
- var _tmpl$039 = /* @__PURE__ */ template(`<a class=portal-topbar-back data-testid=mobile-back><span aria-hidden=true>\u2190</span> Back to shop`);
28239
- var _tmpl$1140 = /* @__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">`);
28240
- var _tmpl$1031 = /* @__PURE__ */ template(`<span class=portal-rail__wordmark>`);
28241
- var _tmpl$1141 = /* @__PURE__ */ template(`<img>`);
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">`);
28516
+ var _tmpl$1032 = /* @__PURE__ */ template(`<span class=portal-rail__wordmark>`);
28517
+ var _tmpl$1143 = /* @__PURE__ */ template(`<img>`);
28242
28518
  var ICONS = {
28243
28519
  tracker: "ph-thin ph-path",
28244
28520
  instructions: "ph-thin ph-first-aid-kit",
@@ -28373,7 +28649,7 @@ function MemberPortal(props) {
28373
28649
  return memo(() => item.key === "tracker")() && inMotion();
28374
28650
  },
28375
28651
  get children() {
28376
- return _tmpl$489();
28652
+ return _tmpl$490();
28377
28653
  }
28378
28654
  }), null);
28379
28655
  insert(_el$, createComponent(Show, {
@@ -28381,7 +28657,7 @@ function MemberPortal(props) {
28381
28657
  return memo(() => item.key === "messages")() && unreadTotal() > 0;
28382
28658
  },
28383
28659
  get children() {
28384
- var _el$5 = _tmpl$2136();
28660
+ var _el$5 = _tmpl$2137();
28385
28661
  insert(_el$5, (() => {
28386
28662
  var _c$ = memo(() => unreadTotal() > 99);
28387
28663
  return () => _c$() ? "99+" : unreadTotal();
@@ -28439,7 +28715,7 @@ function MemberPortal(props) {
28439
28715
  });
28440
28716
  },
28441
28717
  children: (primary) => (() => {
28442
- var _el$6 = _tmpl$569();
28718
+ var _el$6 = _tmpl$570();
28443
28719
  insert(_el$6, createComponent(OrderTracker, {
28444
28720
  get request() {
28445
28721
  return data.toTrackerRequest(primary());
@@ -28469,7 +28745,7 @@ function MemberPortal(props) {
28469
28745
  return data.otherRx().length > 0;
28470
28746
  },
28471
28747
  get children() {
28472
- var _el$7 = _tmpl$490(); _el$7.firstChild;
28748
+ var _el$7 = _tmpl$491(); _el$7.firstChild;
28473
28749
  insert(_el$7, createComponent(For, {
28474
28750
  get each() {
28475
28751
  return data.otherRx();
@@ -28505,7 +28781,7 @@ function MemberPortal(props) {
28505
28781
  return !data.loading();
28506
28782
  },
28507
28783
  get fallback() {
28508
- return _tmpl$665();
28784
+ return _tmpl$666();
28509
28785
  },
28510
28786
  get children() {
28511
28787
  return createComponent(Show, {
@@ -28514,7 +28790,7 @@ function MemberPortal(props) {
28514
28790
  },
28515
28791
  get fallback() {
28516
28792
  return (() => {
28517
- var _el$0 = _tmpl$753(), _el$1 = _el$0.firstChild, _el$10 = _el$1.nextSibling;
28793
+ var _el$0 = _tmpl$754(), _el$1 = _el$0.firstChild, _el$10 = _el$1.nextSibling;
28518
28794
  insert(_el$1, () => data.error());
28519
28795
  _el$10.$$click = () => data.refetch();
28520
28796
  return _el$0;
@@ -28611,20 +28887,20 @@ function MemberPortal(props) {
28611
28887
  }
28612
28888
  });
28613
28889
  return (() => {
28614
- var _el$11 = _tmpl$1140(), _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;
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;
28615
28891
  insert(_el$14, createComponent(Show, {
28616
28892
  get when() {
28617
28893
  return props.brand.logoSrc;
28618
28894
  },
28619
28895
  get fallback() {
28620
28896
  return (() => {
28621
- var _el$25 = _tmpl$1031();
28897
+ var _el$25 = _tmpl$1032();
28622
28898
  insert(_el$25, () => props.brand.name);
28623
28899
  return _el$25;
28624
28900
  })();
28625
28901
  },
28626
28902
  children: (src) => (() => {
28627
- var _el$26 = _tmpl$1141();
28903
+ var _el$26 = _tmpl$1143();
28628
28904
  effect((_p$) => {
28629
28905
  var _v$8 = src(), _v$9 = props.brand.name;
28630
28906
  _v$8 !== _p$.e && setAttribute(_el$26, "src", _p$.e = _v$8);
@@ -28642,7 +28918,7 @@ function MemberPortal(props) {
28642
28918
  return data.firstName() !== "Member";
28643
28919
  },
28644
28920
  get children() {
28645
- var _el$15 = _tmpl$846(); _el$15.firstChild;
28921
+ var _el$15 = _tmpl$847(); _el$15.firstChild;
28646
28922
  insert(_el$15, () => data.firstName(), null);
28647
28923
  return _el$15;
28648
28924
  }
@@ -28655,7 +28931,7 @@ function MemberPortal(props) {
28655
28931
  return showBackLink();
28656
28932
  },
28657
28933
  get children() {
28658
- var _el$19 = _tmpl$943();
28934
+ var _el$19 = _tmpl$944();
28659
28935
  effect(() => setAttribute(_el$19, "href", catalogHref()));
28660
28936
  return _el$19;
28661
28937
  }
@@ -28666,7 +28942,7 @@ function MemberPortal(props) {
28666
28942
  return showBackLink();
28667
28943
  },
28668
28944
  get children() {
28669
- var _el$21 = _tmpl$039();
28945
+ var _el$21 = _tmpl$040();
28670
28946
  effect(() => setAttribute(_el$21, "href", catalogHref()));
28671
28947
  return _el$21;
28672
28948
  }
@@ -28692,11 +28968,11 @@ function MemberPortal(props) {
28692
28968
  })();
28693
28969
  }
28694
28970
  delegateEvents(["click"]);
28695
- var _tmpl$491 = /* @__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.`);
28696
- var _tmpl$2137 = /* @__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`);
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`);
28697
28973
  var _tmpl$3120 = /* @__PURE__ */ template(`<div style=color:var(--app-affiliate-fg-muted)>Loading stats\u2026`);
28698
- var _tmpl$495 = /* @__PURE__ */ template(`<div style="display:grid;grid-template-columns:repeat(auto-fit, minmax(180px, 1fr));gap:1rem">`);
28699
- var _tmpl$570 = /* @__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)>`);
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)>`);
28700
28976
  function formatMoney(cents) {
28701
28977
  return `$${(cents / 100).toFixed(2)}`;
28702
28978
  }
@@ -28729,13 +29005,13 @@ function AffiliateOverview() {
28729
29005
  value: `${(s.conversionRate * 100).toFixed(1)}%`
28730
29006
  }];
28731
29007
  return (() => {
28732
- var _el$ = _tmpl$2137(); _el$.firstChild;
29008
+ var _el$ = _tmpl$2138(); _el$.firstChild;
28733
29009
  insert(_el$, createComponent(Show, {
28734
29010
  get when() {
28735
29011
  return isPending();
28736
29012
  },
28737
29013
  get children() {
28738
- return _tmpl$491();
29014
+ return _tmpl$495();
28739
29015
  }
28740
29016
  }), null);
28741
29017
  insert(_el$, createComponent(Show, {
@@ -28746,13 +29022,13 @@ function AffiliateOverview() {
28746
29022
  return _tmpl$3120();
28747
29023
  },
28748
29024
  children: (s) => (() => {
28749
- var _el$5 = _tmpl$495();
29025
+ var _el$5 = _tmpl$496();
28750
29026
  insert(_el$5, createComponent(For, {
28751
29027
  get each() {
28752
29028
  return cards(s());
28753
29029
  },
28754
29030
  children: (card) => (() => {
28755
- var _el$6 = _tmpl$570(), _el$7 = _el$6.firstChild, _el$8 = _el$7.nextSibling;
29031
+ var _el$6 = _tmpl$571(), _el$7 = _el$6.firstChild, _el$8 = _el$7.nextSibling;
28756
29032
  insert(_el$7, () => card.label);
28757
29033
  insert(_el$8, () => card.value);
28758
29034
  return _el$6;
@@ -28764,11 +29040,11 @@ function AffiliateOverview() {
28764
29040
  return _el$;
28765
29041
  })();
28766
29042
  }
28767
- var _tmpl$496 = /* @__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>`);
28768
- 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)>Conversions`);
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`);
28769
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.`);
28770
- var _tmpl$497 = /* @__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`);
28771
- var _tmpl$571 = /* @__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">`);
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">`);
28772
29048
  function formatMoney2(cents) {
28773
29049
  return `$${(cents / 100).toFixed(2)}`;
28774
29050
  }
@@ -28806,7 +29082,7 @@ function AffiliateConversions() {
28806
29082
  limit: 100
28807
29083
  });
28808
29084
  return (() => {
28809
- var _el$ = _tmpl$2138(); _el$.firstChild;
29085
+ var _el$ = _tmpl$2139(); _el$.firstChild;
28810
29086
  insert(_el$, createComponent(Show, {
28811
29087
  get when() {
28812
29088
  return (conversions() ?? []).length > 0;
@@ -28815,13 +29091,13 @@ function AffiliateConversions() {
28815
29091
  return _tmpl$3121();
28816
29092
  },
28817
29093
  get children() {
28818
- var _el$3 = _tmpl$496(), _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;
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;
28819
29095
  insert(_el$10, createComponent(For, {
28820
29096
  get each() {
28821
29097
  return conversions();
28822
29098
  },
28823
29099
  children: (c) => (() => {
28824
- var _el$12 = _tmpl$571(), _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;
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;
28825
29101
  insert(_el$13, () => formatDate4(c.createdAt));
28826
29102
  insert(_el$14, () => c.paymentType, null);
28827
29103
  insert(_el$14, createComponent(Show, {
@@ -28829,7 +29105,7 @@ function AffiliateConversions() {
28829
29105
  return c.tier === 2;
28830
29106
  },
28831
29107
  get children() {
28832
- return _tmpl$497();
29108
+ return _tmpl$498();
28833
29109
  }
28834
29110
  }), null);
28835
29111
  insert(_el$16, () => formatMoney2(c.orderTotalCents));
@@ -28900,10 +29176,10 @@ function td() {
28900
29176
  color: "var(--app-affiliate-fg)"
28901
29177
  };
28902
29178
  }
28903
- var _tmpl$498 = /* @__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>`);
28904
- 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)>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.`);
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.`);
28905
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.`);
28906
- var _tmpl$499 = /* @__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>`);
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>`);
28907
29183
  function formatDate5(iso) {
28908
29184
  const d = new Date(iso);
28909
29185
  if (Number.isNaN(d.getTime())) return iso;
@@ -28936,7 +29212,7 @@ function AffiliateDownline() {
28936
29212
  downline
28937
29213
  } = useAffiliateDownline();
28938
29214
  return (() => {
28939
- var _el$ = _tmpl$2139(), _el$2 = _el$.firstChild; _el$2.nextSibling;
29215
+ var _el$ = _tmpl$2140(), _el$2 = _el$.firstChild; _el$2.nextSibling;
28940
29216
  insert(_el$, createComponent(Show, {
28941
29217
  get when() {
28942
29218
  return (downline() ?? []).length > 0;
@@ -28945,13 +29221,13 @@ function AffiliateDownline() {
28945
29221
  return _tmpl$3122();
28946
29222
  },
28947
29223
  get children() {
28948
- var _el$4 = _tmpl$498(), _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;
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;
28949
29225
  insert(_el$10, createComponent(For, {
28950
29226
  get each() {
28951
29227
  return downline();
28952
29228
  },
28953
29229
  children: (d) => (() => {
28954
- var _el$12 = _tmpl$499(), _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;
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;
28955
29231
  insert(_el$13, () => d.affiliateCode);
28956
29232
  insert(_el$14, () => [d.firstName, d.lastName].filter(Boolean).join(" ") || "\u2014");
28957
29233
  insert(_el$16, () => d.status);
@@ -29015,7 +29291,7 @@ function td2() {
29015
29291
  };
29016
29292
  }
29017
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.`);
29018
- 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)>Referral link`);
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`);
29019
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.`);
29020
29296
  function AffiliateReferralLink() {
29021
29297
  const {
@@ -29041,7 +29317,7 @@ function AffiliateReferralLink() {
29041
29317
  }
29042
29318
  }
29043
29319
  return (() => {
29044
- var _el$ = _tmpl$2140(); _el$.firstChild;
29320
+ var _el$ = _tmpl$2141(); _el$.firstChild;
29045
29321
  insert(_el$, createComponent(Show, {
29046
29322
  get when() {
29047
29323
  return homepageLink();
@@ -29062,9 +29338,9 @@ function AffiliateReferralLink() {
29062
29338
  }
29063
29339
  delegateEvents(["click"]);
29064
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.`);
29065
- var _tmpl$2141 = /* @__PURE__ */ template(`<div style=color:var(--app-affiliate-fg-muted)>Loading\u2026`);
29341
+ var _tmpl$2142 = /* @__PURE__ */ template(`<div style=color:var(--app-affiliate-fg-muted)>Loading\u2026`);
29066
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">`);
29067
- var _tmpl$4100 = /* @__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)>`);
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)>`);
29068
29344
  var STATUS_LABEL2 = {
29069
29345
  pending: "Pending approval",
29070
29346
  active: "Active",
@@ -29105,7 +29381,7 @@ function AffiliateSettings() {
29105
29381
  return affiliate();
29106
29382
  },
29107
29383
  get fallback() {
29108
- return _tmpl$2141();
29384
+ return _tmpl$2142();
29109
29385
  },
29110
29386
  children: (a) => (() => {
29111
29387
  var _el$7 = _tmpl$3124();
@@ -29114,7 +29390,7 @@ function AffiliateSettings() {
29114
29390
  return rows(a());
29115
29391
  },
29116
29392
  children: (row) => (() => {
29117
- var _el$8 = _tmpl$4100(), _el$9 = _el$8.firstChild, _el$0 = _el$9.nextSibling;
29393
+ var _el$8 = _tmpl$4101(), _el$9 = _el$8.firstChild, _el$0 = _el$9.nextSibling;
29118
29394
  insert(_el$9, () => row.label);
29119
29395
  insert(_el$0, () => row.value);
29120
29396
  return _el$8;
@@ -29131,9 +29407,9 @@ delegateEvents(["click"]);
29131
29407
 
29132
29408
  // src/pages/AffiliatePortal.tsx
29133
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>`);
29134
- var _tmpl$2142 = /* @__PURE__ */ template(`<span style=font-size:1rem;opacity:0.7;flex-shrink:0>`);
29410
+ var _tmpl$2143 = /* @__PURE__ */ template(`<span style=font-size:1rem;opacity:0.7;flex-shrink:0>`);
29135
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">`);
29136
- var _tmpl$4101 = /* @__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); } }`);
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); } }`);
29137
29413
  var TAB_LABELS2 = {
29138
29414
  overview: "Overview",
29139
29415
  conversions: "Conversions",
@@ -29194,7 +29470,7 @@ function AffiliatePortal(props) {
29194
29470
  return props.tabIcons?.[tab];
29195
29471
  },
29196
29472
  get children() {
29197
- var _el$10 = _tmpl$2142();
29473
+ var _el$10 = _tmpl$2143();
29198
29474
  effect(() => className(_el$10, props.tabIcons[tab]));
29199
29475
  return _el$10;
29200
29476
  }
@@ -29276,7 +29552,7 @@ function AffiliatePortal(props) {
29276
29552
  }
29277
29553
  function AffiliateGateSpinner(props) {
29278
29554
  return (() => {
29279
- var _el$11 = _tmpl$4101(); _el$11.firstChild;
29555
+ var _el$11 = _tmpl$4102(); _el$11.firstChild;
29280
29556
  effect((_p$) => {
29281
29557
  var _v$8 = props.topOffset, _v$9 = `calc(100vh - ${props.topOffset})`;
29282
29558
  _v$8 !== _p$.e && setStyleProperty(_el$11, "top", _p$.e = _v$8);
@@ -29336,16 +29612,16 @@ delegateEvents(["input", "click"]);
29336
29612
 
29337
29613
  // src/pages/AffiliateRegister.tsx
29338
29614
  var _tmpl$507 = /* @__PURE__ */ template(`<input type=text required autocomplete=given-name>`);
29339
- var _tmpl$2143 = /* @__PURE__ */ template(`<input type=text required autocomplete=family-name>`);
29615
+ var _tmpl$2144 = /* @__PURE__ */ template(`<input type=text required autocomplete=family-name>`);
29340
29616
  var _tmpl$3126 = /* @__PURE__ */ template(`<input type=email required autocomplete=email>`);
29341
- var _tmpl$4102 = /* @__PURE__ */ template(`<input type=text required minlength=4>`);
29342
- var _tmpl$574 = /* @__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">`);
29343
- var _tmpl$666 = /* @__PURE__ */ template(`<button type=button>Already have an account? Log in`);
29344
- var _tmpl$754 = /* @__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">`);
29345
- var _tmpl$847 = /* @__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.`);
29346
- var _tmpl$944 = /* @__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.`);
29347
- var _tmpl$040 = /* @__PURE__ */ template(`<span style=font-size:0.75rem;color:var(--app-affiliate-fg-subtle)>`);
29348
- var _tmpl$1142 = /* @__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)>`);
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)>`);
29349
29625
  function AffiliateRegister(props) {
29350
29626
  const [firstName, setFirstName] = createSignal("");
29351
29627
  const [lastName, setLastName] = createSignal("");
@@ -29376,16 +29652,16 @@ function AffiliateRegister(props) {
29376
29652
  }
29377
29653
  }
29378
29654
  return (() => {
29379
- var _el$ = _tmpl$847(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild; _el$4.nextSibling;
29655
+ var _el$ = _tmpl$848(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild; _el$4.nextSibling;
29380
29656
  insert(_el$2, createComponent(Show, {
29381
29657
  get when() {
29382
29658
  return !submitted();
29383
29659
  },
29384
29660
  get fallback() {
29385
- return _tmpl$944();
29661
+ return _tmpl$945();
29386
29662
  },
29387
29663
  get children() {
29388
- var _el$6 = _tmpl$754(), _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;
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;
29389
29665
  _el$6.addEventListener("submit", handleSubmit);
29390
29666
  insert(_el$6, createComponent(Row2, {
29391
29667
  label: "First name",
@@ -29400,7 +29676,7 @@ function AffiliateRegister(props) {
29400
29676
  insert(_el$6, createComponent(Row2, {
29401
29677
  label: "Last name",
29402
29678
  get children() {
29403
- var _el$8 = _tmpl$2143();
29679
+ var _el$8 = _tmpl$2144();
29404
29680
  _el$8.$$input = (e) => setLastName(e.currentTarget.value);
29405
29681
  effect((_$p) => style(_el$8, inputStyle2(), _$p));
29406
29682
  effect(() => _el$8.value = lastName());
@@ -29436,7 +29712,7 @@ function AffiliateRegister(props) {
29436
29712
  label: "Affiliate code",
29437
29713
  hint: "The handle in your referral URL (4+ characters)",
29438
29714
  get children() {
29439
- var _el$0 = _tmpl$4102();
29715
+ var _el$0 = _tmpl$4103();
29440
29716
  _el$0.$$input = (e) => setAffiliateCode(e.currentTarget.value);
29441
29717
  effect((_$p) => style(_el$0, inputStyle2(), _$p));
29442
29718
  effect(() => _el$0.value = affiliateCode());
@@ -29451,7 +29727,7 @@ function AffiliateRegister(props) {
29451
29727
  return error();
29452
29728
  },
29453
29729
  get children() {
29454
- var _el$17 = _tmpl$574();
29730
+ var _el$17 = _tmpl$575();
29455
29731
  insert(_el$17, error);
29456
29732
  return _el$17;
29457
29733
  }
@@ -29462,7 +29738,7 @@ function AffiliateRegister(props) {
29462
29738
  return props.onNavigateLogin;
29463
29739
  },
29464
29740
  get children() {
29465
- var _el$19 = _tmpl$666();
29741
+ var _el$19 = _tmpl$667();
29466
29742
  _el$19.$$click = () => props.onNavigateLogin?.();
29467
29743
  effect((_$p) => style(_el$19, linkStyle(), _$p));
29468
29744
  return _el$19;
@@ -29487,7 +29763,7 @@ function AffiliateRegister(props) {
29487
29763
  }
29488
29764
  function Row2(props) {
29489
29765
  return (() => {
29490
- var _el$21 = _tmpl$1142(), _el$22 = _el$21.firstChild;
29766
+ var _el$21 = _tmpl$1144(), _el$22 = _el$21.firstChild;
29491
29767
  insert(_el$22, () => props.label);
29492
29768
  insert(_el$21, () => props.children, null);
29493
29769
  insert(_el$21, createComponent(Show, {
@@ -29495,7 +29771,7 @@ function Row2(props) {
29495
29771
  return props.hint;
29496
29772
  },
29497
29773
  get children() {
29498
- var _el$23 = _tmpl$040();
29774
+ var _el$23 = _tmpl$041();
29499
29775
  insert(_el$23, () => props.hint);
29500
29776
  return _el$23;
29501
29777
  }
@@ -29530,9 +29806,9 @@ function linkStyle() {
29530
29806
  }
29531
29807
  delegateEvents(["input", "click"]);
29532
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">`);
29533
- var _tmpl$2144 = /* @__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?`);
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?`);
29534
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`);
29535
- var _tmpl$4103 = /* @__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">`);
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">`);
29536
29812
  function AffiliateLogin(props) {
29537
29813
  const [email, setEmail] = createSignal("");
29538
29814
  const [password, setPassword] = createSignal("");
@@ -29552,7 +29828,7 @@ function AffiliateLogin(props) {
29552
29828
  }
29553
29829
  }
29554
29830
  return (() => {
29555
- var _el$ = _tmpl$4103(), _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;
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;
29556
29832
  _el$4.addEventListener("submit", handleSubmit);
29557
29833
  _el$7.$$input = (e) => setEmail(e.currentTarget.value);
29558
29834
  insert(_el$8, createComponent(AffiliatePasswordInput, {
@@ -29579,7 +29855,7 @@ function AffiliateLogin(props) {
29579
29855
  return props.onNavigateForgotPassword;
29580
29856
  },
29581
29857
  get children() {
29582
- var _el$10 = _tmpl$2144();
29858
+ var _el$10 = _tmpl$2145();
29583
29859
  _el$10.$$click = () => props.onNavigateForgotPassword?.();
29584
29860
  return _el$10;
29585
29861
  }
@@ -29638,11 +29914,11 @@ function inputStyle3() {
29638
29914
  }
29639
29915
  delegateEvents(["input", "click"]);
29640
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">`);
29641
- var _tmpl$2145 = /* @__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">`);
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">`);
29642
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`);
29643
- var _tmpl$4104 = /* @__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">`);
29644
- var _tmpl$575 = /* @__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.`);
29645
- var _tmpl$667 = /* @__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`);
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`);
29646
29922
  function ForgotPasswordPage(props) {
29647
29923
  const [email, setEmail] = createSignal("");
29648
29924
  const [submitting, setSubmitting] = createSignal(false);
@@ -29672,22 +29948,22 @@ function ForgotPasswordPage(props) {
29672
29948
  },
29673
29949
  get fallback() {
29674
29950
  return [(() => {
29675
- var _el$0 = _tmpl$4104();
29951
+ var _el$0 = _tmpl$4105();
29676
29952
  insert(_el$0, message);
29677
29953
  return _el$0;
29678
- })(), _tmpl$575(), createComponent(Show, {
29954
+ })(), _tmpl$576(), createComponent(Show, {
29679
29955
  get when() {
29680
29956
  return props.onDone;
29681
29957
  },
29682
29958
  get children() {
29683
- var _el$10 = _tmpl$667();
29959
+ var _el$10 = _tmpl$668();
29684
29960
  _el$10.$$click = () => props.onDone?.();
29685
29961
  return _el$10;
29686
29962
  }
29687
29963
  })];
29688
29964
  },
29689
29965
  get children() {
29690
- var _el$4 = _tmpl$2145(), _el$5 = _el$4.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling, _el$9 = _el$5.nextSibling;
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;
29691
29967
  _el$4.addEventListener("submit", handleSubmit);
29692
29968
  _el$7.$$input = (e) => setEmail(e.currentTarget.value);
29693
29969
  insert(_el$4, createComponent(Show, {
@@ -29745,10 +30021,10 @@ function inputStyle4() {
29745
30021
  };
29746
30022
  }
29747
30023
  delegateEvents(["input", "click"]);
29748
- 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">`);
29749
- 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>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">`);
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">`);
29750
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`);
29751
- 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">`);
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">`);
29752
30028
  function queryParam(name) {
29753
30029
  if (typeof window === "undefined") return "";
29754
30030
  return new URLSearchParams(window.location.search).get(name) ?? "";
@@ -29795,13 +30071,13 @@ function ResetPasswordPage(props) {
29795
30071
  },
29796
30072
  get fallback() {
29797
30073
  return (() => {
29798
- var _el$11 = _tmpl$4105();
30074
+ var _el$11 = _tmpl$4106();
29799
30075
  insert(_el$11, message);
29800
30076
  return _el$11;
29801
30077
  })();
29802
30078
  },
29803
30079
  get children() {
29804
- var _el$4 = _tmpl$2146(), _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;
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;
29805
30081
  _el$4.addEventListener("submit", handleSubmit);
29806
30082
  _el$7.$$input = (e) => setPassword(e.currentTarget.value);
29807
30083
  _el$0.$$input = (e) => setConfirm(e.currentTarget.value);
@@ -29810,7 +30086,7 @@ function ResetPasswordPage(props) {
29810
30086
  return error();
29811
30087
  },
29812
30088
  get children() {
29813
- var _el$1 = _tmpl$576();
30089
+ var _el$1 = _tmpl$577();
29814
30090
  insert(_el$1, error);
29815
30091
  return _el$1;
29816
30092
  }
@@ -29865,11 +30141,11 @@ function inputStyle5() {
29865
30141
  };
29866
30142
  }
29867
30143
  delegateEvents(["input"]);
29868
- var _tmpl$577 = /* @__PURE__ */ template(`<div>`);
29869
- 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>Email</span><input type=email required autocomplete=email></label><button type=submit>`);
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>`);
29870
30146
  var _tmpl$3130 = /* @__PURE__ */ template(`<button type=button>Back to login`);
29871
- var _tmpl$4106 = /* @__PURE__ */ template(`<div class=app-affiliate-root><div><h1>Reset your password`);
29872
- var _tmpl$578 = /* @__PURE__ */ template(`<p style=margin:0;font-size:0.9rem>`);
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>`);
29873
30149
  function AffiliateForgotPassword(props) {
29874
30150
  const [email, setEmail] = createSignal("");
29875
30151
  const [submitting, setSubmitting] = createSignal(false);
@@ -29892,20 +30168,20 @@ function AffiliateForgotPassword(props) {
29892
30168
  }
29893
30169
  }
29894
30170
  return (() => {
29895
- var _el$ = _tmpl$4106(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild;
30171
+ var _el$ = _tmpl$4107(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild;
29896
30172
  insert(_el$2, createComponent(Show, {
29897
30173
  get when() {
29898
30174
  return !message();
29899
30175
  },
29900
30176
  get fallback() {
29901
30177
  return (() => {
29902
- var _el$1 = _tmpl$578();
30178
+ var _el$1 = _tmpl$579();
29903
30179
  insert(_el$1, message);
29904
30180
  return _el$1;
29905
30181
  })();
29906
30182
  },
29907
30183
  get children() {
29908
- var _el$4 = _tmpl$2147(), _el$5 = _el$4.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling, _el$9 = _el$5.nextSibling;
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;
29909
30185
  _el$4.addEventListener("submit", handleSubmit);
29910
30186
  _el$7.$$input = (e) => setEmail(e.currentTarget.value);
29911
30187
  insert(_el$4, createComponent(Show, {
@@ -29913,7 +30189,7 @@ function AffiliateForgotPassword(props) {
29913
30189
  return error();
29914
30190
  },
29915
30191
  get children() {
29916
- var _el$8 = _tmpl$577();
30192
+ var _el$8 = _tmpl$578();
29917
30193
  insert(_el$8, error);
29918
30194
  effect((_$p) => style(_el$8, errorStyle(), _$p));
29919
30195
  return _el$8;
@@ -30048,10 +30324,10 @@ function linkStyle2() {
30048
30324
  };
30049
30325
  }
30050
30326
  delegateEvents(["input", "click"]);
30051
- var _tmpl$579 = /* @__PURE__ */ template(`<div>`);
30052
- 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>New password</span></label><label style=display:flex;flex-direction:column;gap:0.35rem><span>Confirm new password</span></label><button type=submit>`);
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>`);
30053
30329
  var _tmpl$3131 = /* @__PURE__ */ template(`<div class=app-affiliate-root><div><h1>Choose a new password`);
30054
- var _tmpl$4107 = /* @__PURE__ */ template(`<p style=margin:0;font-size:0.9rem>Your password has been reset. You can now log in with your 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.`);
30055
30331
  function queryParam2(name) {
30056
30332
  if (typeof window === "undefined") return "";
30057
30333
  return new URLSearchParams(window.location.search).get(name) ?? "";
@@ -30101,10 +30377,10 @@ function AffiliateResetPassword(props) {
30101
30377
  return !done();
30102
30378
  },
30103
30379
  get fallback() {
30104
- return _tmpl$4107();
30380
+ return _tmpl$4108();
30105
30381
  },
30106
30382
  get children() {
30107
- var _el$4 = _tmpl$2148(), _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;
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;
30108
30384
  _el$4.addEventListener("submit", handleSubmit);
30109
30385
  insert(_el$5, createComponent(AffiliatePasswordInput, {
30110
30386
  required: true,
@@ -30129,7 +30405,7 @@ function AffiliateResetPassword(props) {
30129
30405
  return error();
30130
30406
  },
30131
30407
  get children() {
30132
- var _el$9 = _tmpl$579();
30408
+ var _el$9 = _tmpl$580();
30133
30409
  insert(_el$9, error);
30134
30410
  effect((_$p) => style(_el$9, errorStyle2(), _$p));
30135
30411
  return _el$9;
@@ -30228,5 +30504,5 @@ function primaryButtonStyle2(submitting) {
30228
30504
  }
30229
30505
 
30230
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 };
30231
- //# sourceMappingURL=L4DFQMYM.js.map
30232
- //# sourceMappingURL=L4DFQMYM.js.map
30507
+ //# sourceMappingURL=O7H7DAWO.js.map
30508
+ //# sourceMappingURL=O7H7DAWO.js.map