@apextelemed/partner-core 0.2.0 → 0.3.1

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 (37) hide show
  1. package/dist/api/index.d.ts +14 -1
  2. package/dist/api/index.js +2 -2
  3. package/dist/api/index.jsx +8 -2
  4. package/dist/chunk/{SNAV6DII.jsx → 2EVGOW2Z.jsx} +26 -4
  5. package/dist/chunk/{KFJXIKD4.js → 5RQ4ZIYB.js} +48 -9
  6. package/dist/chunk/5RQ4ZIYB.js.map +1 -0
  7. package/dist/chunk/{FJZHH5T4.jsx → AC7FFU4J.jsx} +312 -6
  8. package/dist/chunk/ACE7M2YA.jsx +1 -0
  9. package/dist/chunk/{EIXV4DCU.js → D6GCJFQD.js} +26 -6
  10. package/dist/chunk/D6GCJFQD.js.map +1 -0
  11. package/dist/chunk/{OEXSGX5F.js → J4G52ET6.js} +665 -337
  12. package/dist/chunk/J4G52ET6.js.map +1 -0
  13. package/dist/chunk/JSHO46VZ.js +3 -0
  14. package/dist/chunk/JSHO46VZ.js.map +1 -0
  15. package/dist/chunk/{MEWFN6IW.jsx → M6DZVPYZ.jsx} +49 -8
  16. package/dist/chunk/{6TFBQECC.jsx → NP4CMOLW.jsx} +41 -1
  17. package/dist/chunk/{J6KNY37T.js → XMYPS7PT.js} +40 -3
  18. package/dist/chunk/XMYPS7PT.js.map +1 -0
  19. package/dist/flows/index.js +3 -3
  20. package/dist/flows/index.jsx +3 -3
  21. package/dist/index/index.d.ts +1 -1
  22. package/dist/index/index.js +5 -5
  23. package/dist/index/index.jsx +11 -5
  24. package/dist/pages/index.js +2 -2
  25. package/dist/pages/index.jsx +2 -2
  26. package/dist/testing/storage.d.ts +1 -1
  27. package/dist/testing/storage.d.ts.map +1 -1
  28. package/dist/testing/storage.js +1 -0
  29. package/dist/testing/storage.js.map +1 -1
  30. package/package.json +1 -1
  31. package/dist/chunk/AN3WPMEP.js +0 -3
  32. package/dist/chunk/AN3WPMEP.js.map +0 -1
  33. package/dist/chunk/EIXV4DCU.js.map +0 -1
  34. package/dist/chunk/J6KNY37T.js.map +0 -1
  35. package/dist/chunk/KFJXIKD4.js.map +0 -1
  36. package/dist/chunk/O3QK7YZR.jsx +0 -1
  37. package/dist/chunk/OEXSGX5F.js.map +0 -1
@@ -1,5 +1,5 @@
1
1
  import { disqualificationReasonText, qualifiedDrugIds } from './LZWA44KD.js';
2
- import { useSurveyFlow, resolveSurveyV2DrugIntent, emailGateAnswered, redeemResumeLink, useSurveyV2Flow, availableStateOptions, US_STATE_OPTIONS, useCheckoutFlow, useCartCheckoutFlow, useSignupFlow, useRegisterFlow, useSubscribeFlow, useDashboardData, useUpdatePaymentMethodFlow, useMemberPortalData, useMessagesThread, captureFunnelEmail, markEmailGateAnswered, useAffiliateStats, useAffiliateConversions, useAffiliateDownline, useAffiliateLinks, stateAvailabilityNote, hasStateRestrictions, formatConversationTime, buildTrackerView, formatMessageTime, formatEventDate, formatStageDate, isImageAttachment, buildRefillView } from './KFJXIKD4.js';
2
+ import { useSurveyFlow, resolveSurveyV2DrugIntent, emailGateAnswered, redeemResumeLink, useSurveyV2Flow, availableStateOptions, US_STATE_OPTIONS, useCheckoutFlow, useCartCheckoutFlow, useSignupFlow, useRegisterFlow, useSubscribeFlow, useDashboardData, useUpdatePaymentMethodFlow, useMemberPortalData, useMessagesThread, captureFunnelEmail, markEmailGateAnswered, useAffiliateStats, useAffiliateConversions, useAffiliateDownline, useAffiliateLinks, stateAvailabilityNote, hasStateRestrictions, uploadPrescriptionPhoto, formatConversationTime, buildTrackerView, formatCalendarDate, formatMessageTime, formatEventDate, formatStageDate, isImageAttachment, buildRefillView } from './5RQ4ZIYB.js';
3
3
  import { fetchFunnelConfig } from './DS4E7FAI.js';
4
4
  import { usePrimitives } from './67KHO66G.js';
5
5
  import { auth_default, cart_default, affiliateAuth_default } from './FWUBNK42.js';
@@ -821,9 +821,18 @@ var _tmpl$24 = /* @__PURE__ */ template(`<div><div style=text-align:center;margi
821
821
  var _tmpl$25 = /* @__PURE__ */ template(`<ul style="list-style:none;padding:0;margin:0 auto;max-width:24rem">`);
822
822
  var _tmpl$26 = /* @__PURE__ */ template(`<li style="display:flex;justify-content:space-between;padding:0.5rem 1rem;border-radius:0.5rem;background:var(--app-surface, rgba(127,127,127,0.08));margin-bottom:0.5rem"><span style=font-weight:500></span><span>`);
823
823
  var _tmpl$27 = /* @__PURE__ */ template(`<div style=display:flex;flex-direction:column;gap:1rem><div><div style=font-size:0.875rem;font-weight:500></div></div><button type=button>None of these apply`);
824
- var _tmpl$28 = /* @__PURE__ */ template(`<div style=display:flex;flex-direction:column;gap:0.5rem>`);
825
- var _tmpl$29 = /* @__PURE__ */ template(`<div><div style=font-size:0.875rem;margin-bottom:0.5rem></div><div style="display:grid;grid-template-columns:repeat(3, 1fr);gap:0.75rem">`);
826
- var _tmpl$30 = /* @__PURE__ */ template(`<div><div style=font-size:0.875rem;margin-bottom:0.5rem></div><div style=display:flex;flex-direction:column;gap:0.5rem><div style="display:grid;grid-template-columns:2fr 1fr 1fr;gap:0.5rem">`);
824
+ var _tmpl$28 = /* @__PURE__ */ template(`<div style=display:flex;gap:0.5rem;align-items:center>`);
825
+ var _tmpl$29 = /* @__PURE__ */ template(`<label style=display:flex;gap:0.5rem;align-items:center;font-size:0.875rem;cursor:pointer><input type=checkbox>I&rsquo;ve added all my prescriptions`);
826
+ var _tmpl$30 = /* @__PURE__ */ template(`<div style=display:flex;flex-direction:column;gap:0.375rem><label style=display:flex;gap:0.5rem;align-items:center;font-size:0.875rem;cursor:pointer><input type=checkbox>I have no current prescriptions</label><label style=display:flex;gap:0.5rem;align-items:center;font-size:0.875rem;cursor:pointer><input type=checkbox>I can&rsquo;t upload a photo. I will enter my prescription information manually.`);
827
+ var _tmpl$31 = /* @__PURE__ */ template(`<div style=font-size:0.8125rem;opacity:0.7>`);
828
+ var _tmpl$322 = /* @__PURE__ */ template(`<div style=display:flex;flex-direction:column;gap:0.75rem><div><div style=font-size:0.875rem;font-weight:500></div></div><input type=file accept=image/* capture=environment hidden>`);
829
+ var _tmpl$33 = /* @__PURE__ */ template(`<img style=width:72px;height:72px;object-fit:cover;border-radius:0.375rem;flex-shrink:0>`);
830
+ var _tmpl$34 = /* @__PURE__ */ template(`<div style="border:1px solid rgba(128,128,128,0.25);border-radius:0.5rem;padding:0.75rem;display:flex;flex-direction:column;gap:0.5rem"><div style=display:flex;gap:0.75rem;align-items:flex-start><div style=flex:1><div style=font-size:0.8125rem;font-weight:500;margin-bottom:0.25rem>Prescription <!> \u2014 confirm these are visible:</div><div style="display:grid;grid-template-columns:repeat(auto-fill, minmax(10rem, 1fr));gap:0.25rem 0.75rem"></div></div></div><div>`);
831
+ var _tmpl$35 = /* @__PURE__ */ template(`<div style=width:72px;height:72px;border-radius:0.375rem;background:rgba(128,128,128,0.12);display:flex;align-items:center;justify-content:center;font-size:0.6875rem;opacity:0.7;text-align:center;flex-shrink:0>Photo uploaded`);
832
+ var _tmpl$36 = /* @__PURE__ */ template(`<label style=display:flex;gap:0.375rem;align-items:center;font-size:0.8125rem;cursor:pointer><input type=checkbox>`);
833
+ var _tmpl$37 = /* @__PURE__ */ template(`<div style=display:flex;flex-direction:column;gap:0.5rem>`);
834
+ var _tmpl$38 = /* @__PURE__ */ template(`<div><div style=font-size:0.875rem;margin-bottom:0.5rem></div><div style="display:grid;grid-template-columns:repeat(3, 1fr);gap:0.75rem">`);
835
+ var _tmpl$39 = /* @__PURE__ */ template(`<div><div style=font-size:0.875rem;margin-bottom:0.5rem></div><div style=display:flex;flex-direction:column;gap:0.5rem><div style="display:grid;grid-template-columns:2fr 1fr 1fr;gap:0.5rem">`);
827
836
  var STATE_OPTIONS2 = (excluded) => availableStateOptions(excluded);
828
837
  function composedExcludedStates(flow) {
829
838
  const composed = flow.state.composed;
@@ -2058,6 +2067,313 @@ function MultiSelectQuestion(props) {
2058
2067
  }
2059
2068
  });
2060
2069
  }
2070
+ var PHOTO_CHECKLIST_ITEMS = [{
2071
+ key: "drugName",
2072
+ label: "Drug name"
2073
+ }, {
2074
+ key: "dosageSchedule",
2075
+ label: "Dosage & schedule"
2076
+ }, {
2077
+ key: "expiration",
2078
+ label: "Expiration date"
2079
+ }, {
2080
+ key: "prescriber",
2081
+ label: "Prescriber"
2082
+ }, {
2083
+ key: "refillsLeft",
2084
+ label: "Refills left"
2085
+ }, {
2086
+ key: "rxNumber",
2087
+ label: "Prescription number"
2088
+ }, {
2089
+ key: "pharmacy",
2090
+ label: "Pharmacy"
2091
+ }, {
2092
+ key: "phone",
2093
+ label: "Pharmacy phone"
2094
+ }];
2095
+ function emptyChecklist() {
2096
+ return {
2097
+ drugName: false,
2098
+ dosageSchedule: false,
2099
+ expiration: false,
2100
+ prescriber: false,
2101
+ refillsLeft: false,
2102
+ rxNumber: false,
2103
+ pharmacy: false,
2104
+ phone: false
2105
+ };
2106
+ }
2107
+ function PrescriptionPhotosQuestion(props) {
2108
+ const {
2109
+ Button,
2110
+ Banner,
2111
+ Spinner,
2112
+ Textarea
2113
+ } = usePrimitives();
2114
+ const initial = props.value;
2115
+ const restoredPhotos = initial && "photos" in initial && Array.isArray(initial.photos) ? initial.photos.map((p) => ({
2116
+ photoId: p.photoId,
2117
+ checklist: {
2118
+ ...emptyChecklist(),
2119
+ ...p.checklist
2120
+ }
2121
+ })) : [];
2122
+ const [entries, setEntries] = createSignal(restoredPhotos);
2123
+ const [done, setDone] = createSignal(restoredPhotos.length > 0);
2124
+ const [none, setNone] = createSignal(!!initial && "none" in initial && initial.none === true);
2125
+ const [manual, setManual] = createSignal(!!initial && "manual" in initial && typeof initial.manual === "string");
2126
+ const [manualText, setManualText] = createSignal(initial && "manual" in initial && typeof initial.manual === "string" ? initial.manual : "");
2127
+ const [uploading, setUploading] = createSignal(false);
2128
+ const [error, setError] = createSignal(null);
2129
+ let fileInput;
2130
+ const allChecked = (e) => PHOTO_CHECKLIST_ITEMS.every((i) => e.checklist[i.key]);
2131
+ function emit() {
2132
+ if (none()) return props.onChange({
2133
+ version: 1,
2134
+ none: true
2135
+ });
2136
+ if (manual()) {
2137
+ const text = manualText().trim();
2138
+ return props.onChange(text ? {
2139
+ version: 1,
2140
+ manual: manualText()
2141
+ } : void 0);
2142
+ }
2143
+ const list = entries();
2144
+ if (list.length > 0 && done() && list.every(allChecked)) {
2145
+ return props.onChange({
2146
+ version: 1,
2147
+ photos: list.map((e) => ({
2148
+ photoId: e.photoId,
2149
+ checklist: e.checklist
2150
+ }))
2151
+ });
2152
+ }
2153
+ props.onChange(void 0);
2154
+ }
2155
+ async function handleFile(file) {
2156
+ if (!file) return;
2157
+ setError(null);
2158
+ setUploading(true);
2159
+ try {
2160
+ const {
2161
+ photoId
2162
+ } = await uploadPrescriptionPhoto(file);
2163
+ setEntries((prev) => [...prev, {
2164
+ photoId,
2165
+ checklist: emptyChecklist(),
2166
+ objectUrl: URL.createObjectURL(file)
2167
+ }]);
2168
+ setDone(false);
2169
+ emit();
2170
+ } catch (err) {
2171
+ setError(err instanceof Error ? err.message : "Photo upload failed. Please try again.");
2172
+ } finally {
2173
+ setUploading(false);
2174
+ if (fileInput) fileInput.value = "";
2175
+ }
2176
+ }
2177
+ function removeEntry(photoId) {
2178
+ const entry = entries().find((e) => e.photoId === photoId);
2179
+ if (entry?.objectUrl) URL.revokeObjectURL(entry.objectUrl);
2180
+ setEntries((prev) => prev.filter((e) => e.photoId !== photoId));
2181
+ emit();
2182
+ }
2183
+ function toggleCheck(photoId, key, checked) {
2184
+ setEntries((prev) => prev.map((e) => e.photoId === photoId ? {
2185
+ ...e,
2186
+ checklist: {
2187
+ ...e.checklist,
2188
+ [key]: checked
2189
+ }
2190
+ } : e));
2191
+ emit();
2192
+ }
2193
+ const blockedHint = () => {
2194
+ if (none() || manual() && manualText().trim()) return null;
2195
+ const list = entries();
2196
+ if (list.length === 0 && !manual()) {
2197
+ return "Add at least one prescription photo \u2014 or choose an option below if you have none or can\u2019t upload.";
2198
+ }
2199
+ if (manual()) return "Enter your prescription information to continue.";
2200
+ if (!list.every(allChecked)) {
2201
+ return "Confirm each item is visible in every photo (retake the photo if something isn\u2019t).";
2202
+ }
2203
+ if (!done()) return 'Check "I\u2019ve added all my prescriptions" when you\u2019re finished.';
2204
+ return null;
2205
+ };
2206
+ return (() => {
2207
+ var _el$68 = _tmpl$322(), _el$69 = _el$68.firstChild, _el$70 = _el$69.firstChild, _el$72 = _el$69.nextSibling;
2208
+ insert(_el$70, () => props.label);
2209
+ insert(_el$69, createComponent(Show, {
2210
+ get when() {
2211
+ return props.helpText;
2212
+ },
2213
+ get children() {
2214
+ var _el$71 = _tmpl$172();
2215
+ insert(_el$71, () => props.helpText);
2216
+ return _el$71;
2217
+ }
2218
+ }), null);
2219
+ insert(_el$68, createComponent(Show, {
2220
+ get when() {
2221
+ return error();
2222
+ },
2223
+ get children() {
2224
+ return createComponent(Banner, {
2225
+ variant: "error",
2226
+ get children() {
2227
+ return error();
2228
+ }
2229
+ });
2230
+ }
2231
+ }), _el$72);
2232
+ insert(_el$68, createComponent(For, {
2233
+ get each() {
2234
+ return entries();
2235
+ },
2236
+ children: (entry, i) => (() => {
2237
+ var _el$82 = _tmpl$34(), _el$83 = _el$82.firstChild, _el$85 = _el$83.firstChild, _el$86 = _el$85.firstChild, _el$87 = _el$86.firstChild, _el$89 = _el$87.nextSibling; _el$89.nextSibling; var _el$90 = _el$86.nextSibling, _el$91 = _el$83.nextSibling;
2238
+ insert(_el$83, createComponent(Show, {
2239
+ get when() {
2240
+ return entry.objectUrl;
2241
+ },
2242
+ get fallback() {
2243
+ return _tmpl$35();
2244
+ },
2245
+ get children() {
2246
+ var _el$84 = _tmpl$33();
2247
+ effect((_p$) => {
2248
+ var _v$ = entry.objectUrl, _v$2 = `Prescription photo ${i() + 1}`;
2249
+ _v$ !== _p$.e && setAttribute(_el$84, "src", _p$.e = _v$);
2250
+ _v$2 !== _p$.t && setAttribute(_el$84, "alt", _p$.t = _v$2);
2251
+ return _p$;
2252
+ }, {
2253
+ e: void 0,
2254
+ t: void 0
2255
+ });
2256
+ return _el$84;
2257
+ }
2258
+ }), _el$85);
2259
+ insert(_el$86, () => i() + 1, _el$89);
2260
+ insert(_el$90, createComponent(For, {
2261
+ each: PHOTO_CHECKLIST_ITEMS,
2262
+ children: (item) => (() => {
2263
+ var _el$93 = _tmpl$36(), _el$94 = _el$93.firstChild;
2264
+ _el$94.addEventListener("change", (e) => toggleCheck(entry.photoId, item.key, e.currentTarget.checked));
2265
+ insert(_el$93, () => item.label, null);
2266
+ effect(() => _el$94.checked = entry.checklist[item.key]);
2267
+ return _el$93;
2268
+ })()
2269
+ }));
2270
+ insert(_el$91, createComponent(Button, {
2271
+ variant: "ghost",
2272
+ size: "sm",
2273
+ onClick: () => removeEntry(entry.photoId),
2274
+ children: "Remove photo"
2275
+ }));
2276
+ return _el$82;
2277
+ })()
2278
+ }), _el$72);
2279
+ _el$72.addEventListener("change", (e) => void handleFile(e.currentTarget.files?.[0] ?? void 0));
2280
+ var _ref$2 = fileInput;
2281
+ typeof _ref$2 === "function" ? use(_ref$2, _el$72) : fileInput = _el$72;
2282
+ insert(_el$68, createComponent(Show, {
2283
+ get when() {
2284
+ return memo(() => !!!none())() && !manual();
2285
+ },
2286
+ get children() {
2287
+ var _el$73 = _tmpl$28();
2288
+ insert(_el$73, createComponent(Button, {
2289
+ variant: "secondary",
2290
+ get disabled() {
2291
+ return uploading();
2292
+ },
2293
+ onClick: () => fileInput?.click(),
2294
+ get children() {
2295
+ return entries().length === 0 ? "Take or upload a photo" : "Add another prescription";
2296
+ }
2297
+ }), null);
2298
+ insert(_el$73, createComponent(Show, {
2299
+ get when() {
2300
+ return uploading();
2301
+ },
2302
+ get children() {
2303
+ return createComponent(Spinner, {
2304
+ size: "sm"
2305
+ });
2306
+ }
2307
+ }), null);
2308
+ return _el$73;
2309
+ }
2310
+ }), null);
2311
+ insert(_el$68, createComponent(Show, {
2312
+ get when() {
2313
+ return entries().length > 0;
2314
+ },
2315
+ get children() {
2316
+ var _el$74 = _tmpl$29(), _el$75 = _el$74.firstChild;
2317
+ _el$75.addEventListener("change", (e) => {
2318
+ setDone(e.currentTarget.checked);
2319
+ emit();
2320
+ });
2321
+ effect(() => _el$75.checked = done());
2322
+ return _el$74;
2323
+ }
2324
+ }), null);
2325
+ insert(_el$68, createComponent(Show, {
2326
+ get when() {
2327
+ return entries().length === 0;
2328
+ },
2329
+ get children() {
2330
+ var _el$76 = _tmpl$30(), _el$77 = _el$76.firstChild, _el$78 = _el$77.firstChild, _el$79 = _el$77.nextSibling, _el$80 = _el$79.firstChild;
2331
+ _el$78.addEventListener("change", (e) => {
2332
+ setNone(e.currentTarget.checked);
2333
+ if (e.currentTarget.checked) setManual(false);
2334
+ emit();
2335
+ });
2336
+ _el$80.addEventListener("change", (e) => {
2337
+ setManual(e.currentTarget.checked);
2338
+ if (e.currentTarget.checked) setNone(false);
2339
+ emit();
2340
+ });
2341
+ effect(() => _el$78.checked = none());
2342
+ effect(() => _el$80.checked = manual());
2343
+ return _el$76;
2344
+ }
2345
+ }), null);
2346
+ insert(_el$68, createComponent(Show, {
2347
+ get when() {
2348
+ return memo(() => !!manual())() && entries().length === 0;
2349
+ },
2350
+ get children() {
2351
+ return createComponent(Textarea, {
2352
+ get value() {
2353
+ return manualText();
2354
+ },
2355
+ onInput: (v) => {
2356
+ setManualText(v);
2357
+ emit();
2358
+ },
2359
+ rows: 4,
2360
+ placeholder: "For each prescription: drug name, dosage & schedule, prescriber, refills left, prescription number, pharmacy and phone"
2361
+ });
2362
+ }
2363
+ }), null);
2364
+ insert(_el$68, createComponent(Show, {
2365
+ get when() {
2366
+ return blockedHint();
2367
+ },
2368
+ get children() {
2369
+ var _el$81 = _tmpl$31();
2370
+ insert(_el$81, blockedHint);
2371
+ return _el$81;
2372
+ }
2373
+ }), null);
2374
+ return _el$68;
2375
+ })();
2376
+ }
2061
2377
  function QuestionField2(props) {
2062
2378
  const {
2063
2379
  TextField,
@@ -2070,8 +2386,8 @@ function QuestionField2(props) {
2070
2386
  const val = () => props.value;
2071
2387
  const lbl = () => q().text + (q().required ? " *" : "");
2072
2388
  return (() => {
2073
- var _el$68 = _tmpl$28();
2074
- insert(_el$68, createComponent(Show, {
2389
+ var _el$95 = _tmpl$37();
2390
+ insert(_el$95, createComponent(Show, {
2075
2391
  get when() {
2076
2392
  return q().type === "text";
2077
2393
  },
@@ -2087,7 +2403,7 @@ function QuestionField2(props) {
2087
2403
  });
2088
2404
  }
2089
2405
  }), null);
2090
- insert(_el$68, createComponent(Show, {
2406
+ insert(_el$95, createComponent(Show, {
2091
2407
  get when() {
2092
2408
  return q().type === "email";
2093
2409
  },
@@ -2105,7 +2421,7 @@ function QuestionField2(props) {
2105
2421
  });
2106
2422
  }
2107
2423
  }), null);
2108
- insert(_el$68, createComponent(Show, {
2424
+ insert(_el$95, createComponent(Show, {
2109
2425
  get when() {
2110
2426
  return q().type === "phone";
2111
2427
  },
@@ -2123,7 +2439,7 @@ function QuestionField2(props) {
2123
2439
  });
2124
2440
  }
2125
2441
  }), null);
2126
- insert(_el$68, createComponent(Show, {
2442
+ insert(_el$95, createComponent(Show, {
2127
2443
  get when() {
2128
2444
  return q().type === "number";
2129
2445
  },
@@ -2140,7 +2456,7 @@ function QuestionField2(props) {
2140
2456
  });
2141
2457
  }
2142
2458
  }), null);
2143
- insert(_el$68, createComponent(Show, {
2459
+ insert(_el$95, createComponent(Show, {
2144
2460
  get when() {
2145
2461
  return q().type === "date";
2146
2462
  },
@@ -2157,7 +2473,7 @@ function QuestionField2(props) {
2157
2473
  });
2158
2474
  }
2159
2475
  }), null);
2160
- insert(_el$68, createComponent(Show, {
2476
+ insert(_el$95, createComponent(Show, {
2161
2477
  get when() {
2162
2478
  return q().type === "textarea";
2163
2479
  },
@@ -2174,7 +2490,7 @@ function QuestionField2(props) {
2174
2490
  });
2175
2491
  }
2176
2492
  }), null);
2177
- insert(_el$68, createComponent(Show, {
2493
+ insert(_el$95, createComponent(Show, {
2178
2494
  get when() {
2179
2495
  return q().type === "consent";
2180
2496
  },
@@ -2196,7 +2512,7 @@ function QuestionField2(props) {
2196
2512
  });
2197
2513
  }
2198
2514
  }), null);
2199
- insert(_el$68, createComponent(Show, {
2515
+ insert(_el$95, createComponent(Show, {
2200
2516
  get when() {
2201
2517
  return q().type === "boolean";
2202
2518
  },
@@ -2219,7 +2535,7 @@ function QuestionField2(props) {
2219
2535
  });
2220
2536
  }
2221
2537
  }), null);
2222
- insert(_el$68, createComponent(Show, {
2538
+ insert(_el$95, createComponent(Show, {
2223
2539
  get when() {
2224
2540
  return memo(() => q().type === "multiple_choice")() && q().options;
2225
2541
  },
@@ -2241,7 +2557,7 @@ function QuestionField2(props) {
2241
2557
  });
2242
2558
  }
2243
2559
  }), null);
2244
- insert(_el$68, createComponent(Show, {
2560
+ insert(_el$95, createComponent(Show, {
2245
2561
  get when() {
2246
2562
  return memo(() => q().type === "select")() && q().options;
2247
2563
  },
@@ -2264,7 +2580,7 @@ function QuestionField2(props) {
2264
2580
  });
2265
2581
  }
2266
2582
  }), null);
2267
- insert(_el$68, createComponent(Show, {
2583
+ insert(_el$95, createComponent(Show, {
2268
2584
  get when() {
2269
2585
  return memo(() => q().type === "multi_select")() && q().options;
2270
2586
  },
@@ -2290,7 +2606,7 @@ function QuestionField2(props) {
2290
2606
  });
2291
2607
  }
2292
2608
  }), null);
2293
- insert(_el$68, createComponent(Show, {
2609
+ insert(_el$95, createComponent(Show, {
2294
2610
  get when() {
2295
2611
  return q().type === "state";
2296
2612
  },
@@ -2314,7 +2630,7 @@ function QuestionField2(props) {
2314
2630
  })];
2315
2631
  }
2316
2632
  }), null);
2317
- insert(_el$68, createComponent(Show, {
2633
+ insert(_el$95, createComponent(Show, {
2318
2634
  get when() {
2319
2635
  return q().type === "height_weight";
2320
2636
  },
@@ -2326,9 +2642,9 @@ function QuestionField2(props) {
2326
2642
  ...patch
2327
2643
  });
2328
2644
  return (() => {
2329
- var _el$69 = _tmpl$29(), _el$70 = _el$69.firstChild, _el$71 = _el$70.nextSibling;
2330
- insert(_el$70, lbl);
2331
- insert(_el$71, createComponent(TextField, {
2645
+ var _el$96 = _tmpl$38(), _el$97 = _el$96.firstChild, _el$98 = _el$97.nextSibling;
2646
+ insert(_el$97, lbl);
2647
+ insert(_el$98, createComponent(TextField, {
2332
2648
  label: "Height (ft)",
2333
2649
  type: "number",
2334
2650
  get value() {
@@ -2338,7 +2654,7 @@ function QuestionField2(props) {
2338
2654
  heightFt: Number(v) || 0
2339
2655
  })
2340
2656
  }), null);
2341
- insert(_el$71, createComponent(TextField, {
2657
+ insert(_el$98, createComponent(TextField, {
2342
2658
  label: "Height (in)",
2343
2659
  type: "number",
2344
2660
  get value() {
@@ -2348,7 +2664,7 @@ function QuestionField2(props) {
2348
2664
  heightIn: Number(v) || 0
2349
2665
  })
2350
2666
  }), null);
2351
- insert(_el$71, createComponent(TextField, {
2667
+ insert(_el$98, createComponent(TextField, {
2352
2668
  label: "Weight (lb)",
2353
2669
  type: "number",
2354
2670
  get value() {
@@ -2358,12 +2674,31 @@ function QuestionField2(props) {
2358
2674
  weightLb: Number(v) || 0
2359
2675
  })
2360
2676
  }), null);
2361
- return _el$69;
2677
+ return _el$96;
2362
2678
  })();
2363
2679
  })();
2364
2680
  }
2365
2681
  }), null);
2366
- insert(_el$68, createComponent(Show, {
2682
+ insert(_el$95, createComponent(Show, {
2683
+ get when() {
2684
+ return q().type === "prescription_photos";
2685
+ },
2686
+ get children() {
2687
+ return createComponent(PrescriptionPhotosQuestion, {
2688
+ get label() {
2689
+ return lbl();
2690
+ },
2691
+ get helpText() {
2692
+ return q().helpText;
2693
+ },
2694
+ get value() {
2695
+ return val();
2696
+ },
2697
+ onChange: (v) => props.onChange(v)
2698
+ });
2699
+ }
2700
+ }), null);
2701
+ insert(_el$95, createComponent(Show, {
2367
2702
  get when() {
2368
2703
  return q().type === "address";
2369
2704
  },
@@ -2375,25 +2710,25 @@ function QuestionField2(props) {
2375
2710
  [field]: v
2376
2711
  });
2377
2712
  return (() => {
2378
- var _el$72 = _tmpl$30(), _el$73 = _el$72.firstChild, _el$74 = _el$73.nextSibling, _el$75 = _el$74.firstChild;
2379
- insert(_el$73, lbl);
2380
- insert(_el$74, createComponent(TextField, {
2713
+ var _el$99 = _tmpl$39(), _el$100 = _el$99.firstChild, _el$101 = _el$100.nextSibling, _el$102 = _el$101.firstChild;
2714
+ insert(_el$100, lbl);
2715
+ insert(_el$101, createComponent(TextField, {
2381
2716
  get value() {
2382
2717
  return addr().street1 ?? "";
2383
2718
  },
2384
2719
  onInput: (v) => update("street1", v),
2385
2720
  placeholder: "Street address",
2386
2721
  autocomplete: "address-line1"
2387
- }), _el$75);
2388
- insert(_el$74, createComponent(TextField, {
2722
+ }), _el$102);
2723
+ insert(_el$101, createComponent(TextField, {
2389
2724
  get value() {
2390
2725
  return addr().street2 ?? "";
2391
2726
  },
2392
2727
  onInput: (v) => update("street2", v),
2393
2728
  placeholder: "Apt, suite (optional)",
2394
2729
  autocomplete: "address-line2"
2395
- }), _el$75);
2396
- insert(_el$75, createComponent(TextField, {
2730
+ }), _el$102);
2731
+ insert(_el$102, createComponent(TextField, {
2397
2732
  get value() {
2398
2733
  return addr().city ?? "";
2399
2734
  },
@@ -2401,7 +2736,7 @@ function QuestionField2(props) {
2401
2736
  placeholder: "City",
2402
2737
  autocomplete: "address-level2"
2403
2738
  }), null);
2404
- insert(_el$75, createComponent(Select, {
2739
+ insert(_el$102, createComponent(Select, {
2405
2740
  get value() {
2406
2741
  return addr().state ?? "";
2407
2742
  },
@@ -2411,7 +2746,7 @@ function QuestionField2(props) {
2411
2746
  },
2412
2747
  placeholder: "State"
2413
2748
  }), null);
2414
- insert(_el$75, createComponent(TextField, {
2749
+ insert(_el$102, createComponent(TextField, {
2415
2750
  get value() {
2416
2751
  return addr().zipCode ?? "";
2417
2752
  },
@@ -2420,23 +2755,23 @@ function QuestionField2(props) {
2420
2755
  autocomplete: "postal-code",
2421
2756
  inputmode: "numeric"
2422
2757
  }), null);
2423
- insert(_el$74, createComponent(StateAvailabilityNote, {
2758
+ insert(_el$101, createComponent(StateAvailabilityNote, {
2424
2759
  get excludedStates() {
2425
2760
  return props.excludedStates;
2426
2761
  }
2427
2762
  }), null);
2428
- return _el$72;
2763
+ return _el$99;
2429
2764
  })();
2430
2765
  })();
2431
2766
  }
2432
2767
  }), null);
2433
- return _el$68;
2768
+ return _el$95;
2434
2769
  })();
2435
2770
  }
2436
2771
  delegateEvents(["click"]);
2437
- var _tmpl$31 = /* @__PURE__ */ template(`<div><div><div style=flex:1></div><div style=flex:1>`);
2772
+ var _tmpl$40 = /* @__PURE__ */ template(`<div><div><div style=flex:1></div><div style=flex:1>`);
2438
2773
  var _tmpl$210 = /* @__PURE__ */ template(`<p style=font-size:0.875rem;opacity:0.7;margin:0>Checking address\u2026`);
2439
- var _tmpl$33 = /* @__PURE__ */ template(`<div style=display:flex;flex-direction:column;gap:0.5rem><span>Did you mean <strong></strong>?`);
2774
+ var _tmpl$310 = /* @__PURE__ */ template(`<div style=display:flex;flex-direction:column;gap:0.5rem><span>Did you mean <strong></strong>?`);
2440
2775
  var _tmpl$43 = /* @__PURE__ */ template(`<div><div style=flex:1></div><div style=flex:1>`);
2441
2776
  var _tmpl$53 = /* @__PURE__ */ template(`<div>`);
2442
2777
  function formatAddress(a) {
@@ -2482,7 +2817,7 @@ function AddressFields(props) {
2482
2817
  return props.shippingHeading ?? "Shipping address";
2483
2818
  }
2484
2819
  }), (() => {
2485
- var _el$2 = _tmpl$31(), _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$5 = _el$4.nextSibling;
2820
+ var _el$2 = _tmpl$40(), _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$5 = _el$4.nextSibling;
2486
2821
  addEventListener(_el$2, "focusout", props.billingOnly ? void 0 : onShippingBlur, true);
2487
2822
  insert(_el$2, createComponent(TextField, {
2488
2823
  label: "Street address",
@@ -2602,7 +2937,7 @@ function AddressFields(props) {
2602
2937
  return createComponent(Banner, {
2603
2938
  variant: "info",
2604
2939
  get children() {
2605
- var _el$7 = _tmpl$33(), _el$8 = _el$7.firstChild, _el$9 = _el$8.firstChild, _el$0 = _el$9.nextSibling;
2940
+ var _el$7 = _tmpl$310(), _el$8 = _el$7.firstChild, _el$9 = _el$8.firstChild, _el$0 = _el$9.nextSibling;
2606
2941
  insert(_el$0, () => formatAddress(a().deliverability().normalized));
2607
2942
  insert(_el$7, createComponent(Button, {
2608
2943
  type: "button",
@@ -2719,9 +3054,9 @@ function AddressFields(props) {
2719
3054
  delegateEvents(["focusout"]);
2720
3055
 
2721
3056
  // src/pages/Checkout.tsx
2722
- var _tmpl$34 = /* @__PURE__ */ template(`<div style="text-align:center;padding:5rem 0"><p style=margin-top:1rem;opacity:0.7>Checking prescription status\u2026`);
3057
+ var _tmpl$41 = /* @__PURE__ */ template(`<div style="text-align:center;padding:5rem 0"><p style=margin-top:1rem;opacity:0.7>Checking prescription status\u2026`);
2723
3058
  var _tmpl$211 = /* @__PURE__ */ template(`<div style="text-align:center;padding:5rem 0"><p style="margin:0.75rem 0 1.5rem;opacity:0.7">`);
2724
- var _tmpl$35 = /* @__PURE__ */ template(`<div style="text-align:center;padding:4rem 0"><p style="margin:0.75rem auto 2rem;max-width:24rem;opacity:0.7">`);
3059
+ var _tmpl$311 = /* @__PURE__ */ template(`<div style="text-align:center;padding:4rem 0"><p style="margin:0.75rem auto 2rem;max-width:24rem;opacity:0.7">`);
2725
3060
  var _tmpl$44 = /* @__PURE__ */ template(`<div style="text-align:center;padding:4rem 0"><p style="margin:0.75rem auto 1rem;max-width:24rem;opacity:0.7">Your prescription request is currently under review by a licensed prescriber. This typically takes 24\u201348 hours.</p><div style=margin-bottom:2rem>`);
2726
3061
  var _tmpl$54 = /* @__PURE__ */ template(`<div style="max-width:24rem;margin:0 auto 1.5rem">`);
2727
3062
  var _tmpl$63 = /* @__PURE__ */ template(`<div style="text-align:center;padding:4rem 0"><p style="margin:0.75rem auto 1rem;max-width:24rem;opacity:0.7">Unfortunately, your prescription request was not approved.`);
@@ -2766,7 +3101,7 @@ function CheckoutContent(props) {
2766
3101
  return flow.outcome().kind === "loading";
2767
3102
  },
2768
3103
  get children() {
2769
- var _el$ = _tmpl$34(), _el$2 = _el$.firstChild;
3104
+ var _el$ = _tmpl$41(), _el$2 = _el$.firstChild;
2770
3105
  insert(_el$, createComponent(Spinner, {
2771
3106
  size: "lg"
2772
3107
  }), _el$2);
@@ -2864,7 +3199,7 @@ function NoPrescriptionScreen(props) {
2864
3199
  Button
2865
3200
  } = usePrimitives();
2866
3201
  return (() => {
2867
- var _el$5 = _tmpl$35(), _el$6 = _el$5.firstChild;
3202
+ var _el$5 = _tmpl$311(), _el$6 = _el$5.firstChild;
2868
3203
  insert(_el$5, createComponent(Heading, {
2869
3204
  level: 2,
2870
3205
  children: "No Approved Prescription"
@@ -3248,10 +3583,10 @@ function SummaryRow(props) {
3248
3583
  return _el$50;
3249
3584
  })();
3250
3585
  }
3251
- var _tmpl$36 = /* @__PURE__ */ template(`<div style="text-align:center;padding:5rem 0"><p style=margin-top:1rem;opacity:0.7>Loading your order\u2026`);
3586
+ var _tmpl$45 = /* @__PURE__ */ template(`<div style="text-align:center;padding:5rem 0"><p style=margin-top:1rem;opacity:0.7>Loading your order\u2026`);
3252
3587
  var _tmpl$213 = /* @__PURE__ */ template(`<div style="text-align:center;padding:5rem 0"><p style=margin-top:1rem;opacity:0.7>Confirming your payment\u2026`);
3253
- var _tmpl$37 = /* @__PURE__ */ template(`<p style="margin:0 0 1.5rem;font-size:0.875rem;opacity:0.5">Order #`);
3254
- var _tmpl$45 = /* @__PURE__ */ template(`<div style="text-align:center;padding:4rem 0"><p style="margin:0.75rem 0 0.25rem;opacity:0.7">Thank you \u2014 your payment<!> went through. A receipt is on its way to your email.`);
3588
+ var _tmpl$312 = /* @__PURE__ */ template(`<p style="margin:0 0 1.5rem;font-size:0.875rem;opacity:0.5">Order #`);
3589
+ var _tmpl$46 = /* @__PURE__ */ template(`<div style="text-align:center;padding:4rem 0"><p style="margin:0.75rem 0 0.25rem;opacity:0.7">Thank you \u2014 your payment<!> went through. A receipt is on its way to your email.`);
3255
3590
  var _tmpl$55 = /* @__PURE__ */ template(`<div style="display:flex;justify-content:space-between;padding:0.5rem 0;font-size:0.875rem;border-bottom:1px solid var(--app-border-soft, rgba(127,127,127,0.15))"><span>Promo<!> \u2014 estimated</span><span>\u2212`);
3256
3591
  var _tmpl$64 = /* @__PURE__ */ template(`<p style=margin-top:0.75rem;font-size:0.75rem;opacity:0.6>Subscription items in your cart aren't part of this one-time purchase.`);
3257
3592
  var _tmpl$74 = /* @__PURE__ */ template(`<div style=display:flex;flex-direction:column;gap:1.5rem><div><div style=margin-top:0.75rem;display:flex;flex-direction:column><div style="display:flex;justify-content:space-between;padding:0.75rem 0 0;font-weight:700"><span>Total</span><span></span></div></div></div><div><div style=margin-top:0.75rem></div></div><div><div style=margin-top:0.75rem;display:flex;flex-direction:column;gap:1rem><div style="display:grid;grid-template-columns:repeat(2, 1fr);gap:1rem">`);
@@ -3283,7 +3618,7 @@ function CartCheckoutContent(props) {
3283
3618
  return flow.outcome().kind === "loading";
3284
3619
  },
3285
3620
  get children() {
3286
- var _el$ = _tmpl$36(), _el$2 = _el$.firstChild;
3621
+ var _el$ = _tmpl$45(), _el$2 = _el$.firstChild;
3287
3622
  insert(_el$, createComponent(Spinner, {
3288
3623
  size: "lg"
3289
3624
  }), _el$2);
@@ -3307,7 +3642,7 @@ function CartCheckoutContent(props) {
3307
3642
  },
3308
3643
  keyed: true,
3309
3644
  children: (o) => (() => {
3310
- var _el$5 = _tmpl$45(), _el$6 = _el$5.firstChild, _el$7 = _el$6.firstChild, _el$9 = _el$7.nextSibling; _el$9.nextSibling;
3645
+ var _el$5 = _tmpl$46(), _el$6 = _el$5.firstChild, _el$7 = _el$6.firstChild, _el$9 = _el$7.nextSibling; _el$9.nextSibling;
3311
3646
  insert(_el$5, createComponent(Heading, {
3312
3647
  level: 2,
3313
3648
  children: "Order Placed"
@@ -3321,7 +3656,7 @@ function CartCheckoutContent(props) {
3321
3656
  return o.orderId;
3322
3657
  },
3323
3658
  get children() {
3324
- var _el$0 = _tmpl$37(); _el$0.firstChild;
3659
+ var _el$0 = _tmpl$312(); _el$0.firstChild;
3325
3660
  insert(_el$0, () => o.orderId, null);
3326
3661
  return _el$0;
3327
3662
  }
@@ -3518,10 +3853,10 @@ function PurchaseForm2(props) {
3518
3853
  return _el$10;
3519
3854
  })();
3520
3855
  }
3521
- var _tmpl$38 = /* @__PURE__ */ template(`<div style=margin-bottom:1.5rem>`);
3856
+ var _tmpl$47 = /* @__PURE__ */ template(`<div style=margin-bottom:1.5rem>`);
3522
3857
  var _tmpl$214 = /* @__PURE__ */ template(`<div style=margin-top:2rem;display:flex;gap:0.75rem>`);
3523
- var _tmpl$39 = /* @__PURE__ */ template(`<div><div style=text-align:center;margin-bottom:1.5rem><p style=margin-top:0.5rem;opacity:0.7></p></div><div style=margin-bottom:2rem></div><div style=text-align:center;margin-top:1.5rem;font-size:0.875rem;opacity:0.7>Already have an account? <a style=text-decoration:underline>Log in`);
3524
- var _tmpl$46 = /* @__PURE__ */ template(`<div style=display:flex;flex-direction:column;gap:1rem><div style="display:grid;grid-template-columns:repeat(2, 1fr);gap:1rem">`);
3858
+ var _tmpl$313 = /* @__PURE__ */ template(`<div><div style=text-align:center;margin-bottom:1.5rem><p style=margin-top:0.5rem;opacity:0.7></p></div><div style=margin-bottom:2rem></div><div style=text-align:center;margin-top:1.5rem;font-size:0.875rem;opacity:0.7>Already have an account? <a style=text-decoration:underline>Log in`);
3859
+ var _tmpl$48 = /* @__PURE__ */ template(`<div style=display:flex;flex-direction:column;gap:1rem><div style="display:grid;grid-template-columns:repeat(2, 1fr);gap:1rem">`);
3525
3860
  var _tmpl$56 = /* @__PURE__ */ template(`<div style=display:flex;flex-direction:column;gap:1rem><div style="display:grid;grid-template-columns:repeat(2, 1fr);gap:1rem"></div><div style=width:50%>`);
3526
3861
  var _tmpl$65 = /* @__PURE__ */ template(`<div style=display:flex;align-items:center;justify-content:space-between><span style=font-size:0.875rem>Monthly Membership</span><span style=font-size:1.125rem;font-weight:700>$<!>/`);
3527
3862
  var _tmpl$75 = /* @__PURE__ */ template(`<div style=display:flex;flex-direction:column;gap:1rem><div style="display:grid;grid-template-columns:repeat(2, 1fr);gap:1rem"></div><p style=font-size:0.75rem;opacity:0.6;line-height:1.5>Your card will be charged $<!> today and on the same date each month. Cancel anytime from your dashboard.`);
@@ -3575,7 +3910,7 @@ function SignupContent(props) {
3575
3910
  const flow = props.flow;
3576
3911
  const stepLabels = ["Account", "Address", "Payment", "Confirm"];
3577
3912
  return (() => {
3578
- var _el$ = _tmpl$39(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$2.nextSibling, _el$7 = _el$4.nextSibling, _el$8 = _el$7.firstChild, _el$0 = _el$8.nextSibling;
3913
+ var _el$ = _tmpl$313(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$2.nextSibling, _el$7 = _el$4.nextSibling, _el$8 = _el$7.firstChild, _el$0 = _el$8.nextSibling;
3579
3914
  insert(_el$2, createComponent(Heading, {
3580
3915
  level: 1,
3581
3916
  get children() {
@@ -3599,7 +3934,7 @@ function SignupContent(props) {
3599
3934
  return flow.error();
3600
3935
  },
3601
3936
  get children() {
3602
- var _el$5 = _tmpl$38();
3937
+ var _el$5 = _tmpl$47();
3603
3938
  insert(_el$5, createComponent(Banner, {
3604
3939
  variant: "error",
3605
3940
  get children() {
@@ -3614,7 +3949,7 @@ function SignupContent(props) {
3614
3949
  },
3615
3950
  keyed: true,
3616
3951
  children: (msg) => (() => {
3617
- var _el$1 = _tmpl$38();
3952
+ var _el$1 = _tmpl$47();
3618
3953
  insert(_el$1, createComponent(Banner, {
3619
3954
  variant: "error",
3620
3955
  children: msg
@@ -3744,7 +4079,7 @@ function AccountStep(props) {
3744
4079
  } = usePrimitives();
3745
4080
  const flow = props.flow;
3746
4081
  return (() => {
3747
- var _el$10 = _tmpl$46(), _el$11 = _el$10.firstChild;
4082
+ var _el$10 = _tmpl$48(), _el$11 = _el$10.firstChild;
3748
4083
  insert(_el$10, createComponent(Heading, {
3749
4084
  level: 2,
3750
4085
  children: "Account Information"
@@ -4063,10 +4398,10 @@ var US_STATE_OPTIONS2 = US_STATES2.map((s) => ({
4063
4398
  value: s,
4064
4399
  label: s
4065
4400
  }));
4066
- var _tmpl$40 = /* @__PURE__ */ template(`<p style=margin-top:0.5rem;opacity:0.7>`);
4401
+ var _tmpl$49 = /* @__PURE__ */ template(`<p style=margin-top:0.5rem;opacity:0.7>`);
4067
4402
  var _tmpl$215 = /* @__PURE__ */ template(`<div style=margin-bottom:1.5rem>`);
4068
- var _tmpl$310 = /* @__PURE__ */ template(`<div style=margin-top:2rem;display:flex;gap:0.75rem>`);
4069
- var _tmpl$47 = /* @__PURE__ */ template(`<div><div style=text-align:center;margin-bottom:1.5rem></div><div style=margin-bottom:2rem></div><div style=text-align:center;margin-top:1.5rem;font-size:0.875rem;opacity:0.7>Already have an account? <a style=text-decoration:underline>Log in`);
4403
+ var _tmpl$314 = /* @__PURE__ */ template(`<div style=margin-top:2rem;display:flex;gap:0.75rem>`);
4404
+ var _tmpl$410 = /* @__PURE__ */ template(`<div><div style=text-align:center;margin-bottom:1.5rem></div><div style=margin-bottom:2rem></div><div style=text-align:center;margin-top:1.5rem;font-size:0.875rem;opacity:0.7>Already have an account? <a style=text-decoration:underline>Log in`);
4070
4405
  var _tmpl$57 = /* @__PURE__ */ template(`<div style=display:flex;flex-direction:column;gap:1rem><div style="display:grid;grid-template-columns:repeat(2, 1fr);gap:1rem">`);
4071
4406
  var _tmpl$66 = /* @__PURE__ */ template(`<div style=display:flex;flex-direction:column;gap:1rem><div style="display:grid;grid-template-columns:repeat(2, 1fr);gap:1rem"></div><div style=width:50%>`);
4072
4407
  var _tmpl$76 = /* @__PURE__ */ template(`<div style=display:flex;flex-direction:column;gap:1.25rem><div style=display:flex;flex-direction:column;font-size:0.875rem>`);
@@ -4108,7 +4443,7 @@ function RegisterContent(props) {
4108
4443
  const flow = props.flow;
4109
4444
  const stepLabels = ["Account", "Address", "Confirm"];
4110
4445
  return (() => {
4111
- var _el$ = _tmpl$47(), _el$2 = _el$.firstChild, _el$4 = _el$2.nextSibling, _el$7 = _el$4.nextSibling, _el$8 = _el$7.firstChild, _el$0 = _el$8.nextSibling;
4446
+ var _el$ = _tmpl$410(), _el$2 = _el$.firstChild, _el$4 = _el$2.nextSibling, _el$7 = _el$4.nextSibling, _el$8 = _el$7.firstChild, _el$0 = _el$8.nextSibling;
4112
4447
  insert(_el$2, createComponent(Heading, {
4113
4448
  level: 1,
4114
4449
  get children() {
@@ -4120,7 +4455,7 @@ function RegisterContent(props) {
4120
4455
  return props.subtitle;
4121
4456
  },
4122
4457
  get children() {
4123
- var _el$3 = _tmpl$40();
4458
+ var _el$3 = _tmpl$49();
4124
4459
  insert(_el$3, () => props.subtitle);
4125
4460
  return _el$3;
4126
4461
  }
@@ -4178,7 +4513,7 @@ function RegisterContent(props) {
4178
4513
  });
4179
4514
  }
4180
4515
  }), (() => {
4181
- var _el$6 = _tmpl$310();
4516
+ var _el$6 = _tmpl$314();
4182
4517
  insert(_el$6, createComponent(Show, {
4183
4518
  get when() {
4184
4519
  return flow.step() > 0;
@@ -4450,10 +4785,10 @@ function ConfirmRow2(props) {
4450
4785
  return _el$16;
4451
4786
  })();
4452
4787
  }
4453
- var _tmpl$41 = /* @__PURE__ */ template(`<div style="text-align:center;padding:5rem 0"><p style=margin-top:1rem;opacity:0.7>Checking your account\u2026`);
4788
+ var _tmpl$50 = /* @__PURE__ */ template(`<div style="text-align:center;padding:5rem 0"><p style=margin-top:1rem;opacity:0.7>Checking your account\u2026`);
4454
4789
  var _tmpl$216 = /* @__PURE__ */ template(`<div style=font-size:0.7rem;text-transform:uppercase;letter-spacing:0.08em;opacity:0.6;margin-bottom:0.5rem>Your Cart`);
4455
- var _tmpl$311 = /* @__PURE__ */ template(`<ul style=display:flex;flex-direction:column;gap:0.375rem;font-size:0.875rem;margin:0;padding:0;list-style:none>`);
4456
- var _tmpl$48 = /* @__PURE__ */ template(`<div style="display:flex;align-items:center;justify-content:space-between;border-top:1px solid var(--app-border, rgba(127,127,127,0.15));margin-top:0.75rem;padding-top:0.75rem;font-size:0.875rem"><span style=opacity:0.7>Due today (membership)</span><span style=font-weight:600>`);
4790
+ var _tmpl$315 = /* @__PURE__ */ template(`<ul style=display:flex;flex-direction:column;gap:0.375rem;font-size:0.875rem;margin:0;padding:0;list-style:none>`);
4791
+ var _tmpl$411 = /* @__PURE__ */ template(`<div style="display:flex;align-items:center;justify-content:space-between;border-top:1px solid var(--app-border, rgba(127,127,127,0.15));margin-top:0.75rem;padding-top:0.75rem;font-size:0.875rem"><span style=opacity:0.7>Due today (membership)</span><span style=font-weight:600>`);
4457
4792
  var _tmpl$58 = /* @__PURE__ */ template(`<div style=margin-bottom:1.5rem>`);
4458
4793
  var _tmpl$67 = /* @__PURE__ */ template(`<div style=display:flex;flex-direction:column;gap:1rem><div style="display:grid;grid-template-columns:2fr 1fr;gap:0.75rem">`);
4459
4794
  var _tmpl$77 = /* @__PURE__ */ template(`<div style="border-top:1px solid var(--app-border, rgba(127,127,127,0.15));margin:1.5rem 0">`);
@@ -4518,7 +4853,7 @@ function SubscribeContent(props) {
4518
4853
  return flow.outcome().kind === "loading";
4519
4854
  },
4520
4855
  get children() {
4521
- var _el$ = _tmpl$41(), _el$2 = _el$.firstChild;
4856
+ var _el$ = _tmpl$50(), _el$2 = _el$.firstChild;
4522
4857
  insert(_el$, createComponent(Spinner, {
4523
4858
  size: "lg"
4524
4859
  }), _el$2);
@@ -4542,7 +4877,7 @@ function SubscribeContent(props) {
4542
4877
  padding: "md",
4543
4878
  get children() {
4544
4879
  return [_tmpl$216(), (() => {
4545
- var _el$8 = _tmpl$311();
4880
+ var _el$8 = _tmpl$315();
4546
4881
  insert(_el$8, createComponent(For, {
4547
4882
  get each() {
4548
4883
  return cart_default.items();
@@ -4556,7 +4891,7 @@ function SubscribeContent(props) {
4556
4891
  }));
4557
4892
  return _el$8;
4558
4893
  })(), (() => {
4559
- var _el$9 = _tmpl$48(), _el$0 = _el$9.firstChild, _el$1 = _el$0.nextSibling;
4894
+ var _el$9 = _tmpl$411(), _el$0 = _el$9.firstChild, _el$1 = _el$0.nextSibling;
4560
4895
  insert(_el$1, () => fmt(parseInt(props.membershipDollars) * 100));
4561
4896
  return _el$9;
4562
4897
  })()];
@@ -4711,10 +5046,10 @@ var US_STATE_OPTIONS3 = US_STATES3.map((s) => ({
4711
5046
  value: s,
4712
5047
  label: s
4713
5048
  }));
4714
- var _tmpl$49 = /* @__PURE__ */ template(`<span>`);
5049
+ var _tmpl$51 = /* @__PURE__ */ template(`<span>`);
4715
5050
  var _tmpl$217 = /* @__PURE__ */ template(`<div style="display:flex;justify-content:center;padding:4rem 0"><div class=app-admin-spinner>`);
4716
- var _tmpl$312 = /* @__PURE__ */ template(`<div class=app-admin-empty>`);
4717
- var _tmpl$410 = /* @__PURE__ */ template(`<p style="font-size:0.875rem;color:var(--app-admin-fg-muted);margin:0.25rem 0 0">`);
5051
+ var _tmpl$316 = /* @__PURE__ */ template(`<div class=app-admin-empty>`);
5052
+ var _tmpl$412 = /* @__PURE__ */ template(`<p style="font-size:0.875rem;color:var(--app-admin-fg-muted);margin:0.25rem 0 0">`);
4718
5053
  var _tmpl$59 = /* @__PURE__ */ template(`<div style=margin-bottom:2rem><h1 class=app-admin-heading style=font-size:1.5rem;margin:0>`);
4719
5054
  function StatusBadge(props) {
4720
5055
  const variant = () => {
@@ -4740,7 +5075,7 @@ function StatusBadge(props) {
4740
5075
  }
4741
5076
  };
4742
5077
  return (() => {
4743
- var _el$ = _tmpl$49();
5078
+ var _el$ = _tmpl$51();
4744
5079
  insert(_el$, () => props.status);
4745
5080
  effect(() => className(_el$, `app-admin-badge app-admin-badge--${variant()}`));
4746
5081
  return _el$;
@@ -4751,7 +5086,7 @@ function LoadingSpinner() {
4751
5086
  }
4752
5087
  function EmptyState(props) {
4753
5088
  return (() => {
4754
- var _el$3 = _tmpl$312();
5089
+ var _el$3 = _tmpl$316();
4755
5090
  insert(_el$3, () => props.message);
4756
5091
  return _el$3;
4757
5092
  })();
@@ -4765,7 +5100,7 @@ function PageTitle(props) {
4765
5100
  return props.subtitle;
4766
5101
  },
4767
5102
  get children() {
4768
- var _el$6 = _tmpl$410();
5103
+ var _el$6 = _tmpl$412();
4769
5104
  insert(_el$6, () => props.subtitle);
4770
5105
  return _el$6;
4771
5106
  }
@@ -4780,10 +5115,10 @@ var panelSectionHeader = {
4780
5115
  "letter-spacing": "0.05em",
4781
5116
  "margin-bottom": "0.75rem"
4782
5117
  };
4783
- var _tmpl$50 = /* @__PURE__ */ template(`<div style=font-size:0.75rem;color:var(--app-admin-fg-muted);margin-top:0.125rem>`);
5118
+ var _tmpl$60 = /* @__PURE__ */ template(`<div style=font-size:0.75rem;color:var(--app-admin-fg-muted);margin-top:0.125rem>`);
4784
5119
  var _tmpl$218 = /* @__PURE__ */ template(`<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"> of <!> selected aren't yet approved and will be skipped.`);
4785
- var _tmpl$313 = /* @__PURE__ */ template(`<span style=color:var(--app-admin-danger-fg)> \xB7 <!> failed`);
4786
- var _tmpl$411 = /* @__PURE__ */ template(`<div style=margin-top:0.5rem;font-size:0.75rem;color:var(--app-admin-fg-muted)>`);
5120
+ var _tmpl$317 = /* @__PURE__ */ template(`<span style=color:var(--app-admin-danger-fg)> \xB7 <!> failed`);
5121
+ var _tmpl$413 = /* @__PURE__ */ template(`<div style=margin-top:0.5rem;font-size:0.75rem;color:var(--app-admin-fg-muted)>`);
4787
5122
  var _tmpl$510 = /* @__PURE__ */ template(`<div><div style=height:0.5rem;width:100%;border-radius:9999px;background:var(--app-admin-surface-light);overflow:hidden><div style="height:100%;background:var(--app-admin-primary);transition:width 0.15s"></div></div><div style=font-size:0.6875rem;color:var(--app-admin-fg-muted);margin-top:0.375rem> <!> of `);
4788
5123
  var _tmpl$68 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-ghost"style=flex:1>Cancel`);
4789
5124
  var _tmpl$78 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-primary"style=flex:1>`);
@@ -4812,7 +5147,7 @@ var _tmpl$272 = /* @__PURE__ */ template(`<div class=app-admin-text-mono style=f
4812
5147
  var _tmpl$282 = /* @__PURE__ */ template(`<span class="app-admin-text-mono app-admin-text-muted">\u{1F3F7} `);
4813
5148
  var _tmpl$292 = /* @__PURE__ */ template(`<tr><td><input type=checkbox></td><td data-label=Date class=app-admin-text-muted style=font-size:0.75rem></td><td data-label=Affiliate><div class=app-admin-text-mono style=font-size:0.75rem></div></td><td data-label=Tier></td><td data-label=Type><span class="app-admin-badge app-admin-badge--neutral"></span></td><td data-label=Attribution style=font-size:0.75rem></td><td data-label=Subtotal class=app-admin-text-muted style=text-align:right></td><td data-label=Commission style=text-align:right;font-weight:500></td><td data-label=Status><span></span></td><td data-label=Eligibility>`);
4814
5149
  var _tmpl$302 = /* @__PURE__ */ template(`<span class=app-admin-text-muted style=font-size:0.75rem>Direct`);
4815
- var _tmpl$314 = /* @__PURE__ */ template(`<span class=app-admin-text-muted>link`);
5150
+ var _tmpl$318 = /* @__PURE__ */ template(`<span class=app-admin-text-muted>link`);
4816
5151
  function fmtCents(cents) {
4817
5152
  if (cents == null) return "$0.00";
4818
5153
  return `$${(cents / 100).toFixed(2)}`;
@@ -4936,7 +5271,7 @@ function MarkPaidModal(props) {
4936
5271
  return props.scope;
4937
5272
  },
4938
5273
  get children() {
4939
- var _el$6 = _tmpl$50();
5274
+ var _el$6 = _tmpl$60();
4940
5275
  insert(_el$6, () => props.scope);
4941
5276
  return _el$6;
4942
5277
  }
@@ -4980,7 +5315,7 @@ function MarkPaidModal(props) {
4980
5315
  return progress().failed > 0;
4981
5316
  },
4982
5317
  get children() {
4983
- var _el$22 = _tmpl$313(), _el$23 = _el$22.firstChild, _el$26 = _el$23.nextSibling; _el$26.nextSibling;
5318
+ var _el$22 = _tmpl$317(), _el$23 = _el$22.firstChild, _el$26 = _el$23.nextSibling; _el$26.nextSibling;
4984
5319
  insert(_el$22, () => progress().failed, _el$26);
4985
5320
  return _el$22;
4986
5321
  }
@@ -4990,7 +5325,7 @@ function MarkPaidModal(props) {
4990
5325
  return resultMsg();
4991
5326
  },
4992
5327
  get children() {
4993
- var _el$28 = _tmpl$411();
5328
+ var _el$28 = _tmpl$413();
4994
5329
  insert(_el$28, resultMsg);
4995
5330
  return _el$28;
4996
5331
  }
@@ -5465,7 +5800,7 @@ function Conversions(props) {
5465
5800
  return c.promoCode;
5466
5801
  },
5467
5802
  get fallback() {
5468
- return _tmpl$314();
5803
+ return _tmpl$318();
5469
5804
  },
5470
5805
  get children() {
5471
5806
  var _el$123 = _tmpl$282(); _el$123.firstChild;
@@ -5576,10 +5911,10 @@ var filterLabelStyle = {
5576
5911
  width: "3.5rem"
5577
5912
  };
5578
5913
  delegateEvents(["mousedown", "click", "input"]);
5579
- var _tmpl$51 = /* @__PURE__ */ template(`<div>`);
5914
+ var _tmpl$61 = /* @__PURE__ */ template(`<div>`);
5580
5915
  var _tmpl$220 = /* @__PURE__ */ template(`<div><p style=font-size:0.875rem;color:var(--app-admin-fg-muted);margin-bottom:1rem>A snapshot of program activity. Eligible commissions are promoted from pending to ready-to-pay automatically every hour.</p><section style="display:grid;grid-template-columns:repeat(auto-fit, minmax(220px, 1fr));gap:0.75rem;margin-bottom:1.5rem"></section><div style="display:grid;grid-template-columns:repeat(auto-fit, minmax(360px, 1fr));gap:1rem"><section class=app-admin-card style=overflow:hidden><div style="display:flex;align-items:center;justify-content:space-between;padding:0.75rem 1.25rem;border-bottom:1px solid var(--app-admin-border)"><h3 class=app-admin-heading style=font-size:0.875rem;margin:0>Recent conversions</h3><button type=button style=background:none;border:none;color:var(--app-admin-primary-soft-fg);font-size:0.6875rem;font-weight:600;text-transform:uppercase;letter-spacing:0.05em;cursor:pointer>View ledger \u2192</button></div></section><section class=app-admin-card style=overflow:hidden><div style="display:flex;align-items:center;justify-content:space-between;padding:0.75rem 1.25rem;border-bottom:1px solid var(--app-admin-border)"><h3 class=app-admin-heading style=font-size:0.875rem;margin:0>Top affiliates this month</h3><button type=button style=background:none;border:none;color:var(--app-admin-primary-soft-fg);font-size:0.6875rem;font-weight:600;text-transform:uppercase;letter-spacing:0.05em;cursor:pointer>All affiliates \u2192`);
5581
- var _tmpl$315 = /* @__PURE__ */ template(`<div style="padding:3rem 0;text-align:center;font-size:0.875rem;color:var(--app-admin-fg-subtle)">No conversions yet.`);
5582
- var _tmpl$412 = /* @__PURE__ */ template(`<div style="display:flex;align-items:center;gap:0.75rem;padding:0.625rem 1.25rem;border-bottom:1px solid var(--app-admin-border-soft);font-size:0.875rem"><div style=flex:1;min-width:0><div style=display:flex;align-items:center;gap:0.5rem><span class=app-admin-text-mono style=font-size:0.75rem></span><span style=color:var(--app-admin-fg-subtle);font-size:0.75rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis></span></div><div style=font-size:0.6875rem;color:var(--app-admin-fg-subtle);margin-top:0.125rem> \xB7 </div></div><span style=font-weight:700;font-size:0.875rem></span><span>`);
5916
+ var _tmpl$319 = /* @__PURE__ */ template(`<div style="padding:3rem 0;text-align:center;font-size:0.875rem;color:var(--app-admin-fg-subtle)">No conversions yet.`);
5917
+ var _tmpl$414 = /* @__PURE__ */ template(`<div style="display:flex;align-items:center;gap:0.75rem;padding:0.625rem 1.25rem;border-bottom:1px solid var(--app-admin-border-soft);font-size:0.875rem"><div style=flex:1;min-width:0><div style=display:flex;align-items:center;gap:0.5rem><span class=app-admin-text-mono style=font-size:0.75rem></span><span style=color:var(--app-admin-fg-subtle);font-size:0.75rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis></span></div><div style=font-size:0.6875rem;color:var(--app-admin-fg-subtle);margin-top:0.125rem> \xB7 </div></div><span style=font-weight:700;font-size:0.875rem></span><span>`);
5583
5918
  var _tmpl$511 = /* @__PURE__ */ template(`<div style="padding:3rem 0;text-align:center;font-size:0.875rem;color:var(--app-admin-fg-subtle)">No conversions this month yet.`);
5584
5919
  var _tmpl$69 = /* @__PURE__ */ template(`<div style="display:flex;align-items:center;gap:0.75rem;padding:0.625rem 1.25rem;border-bottom:1px solid var(--app-admin-border-soft);font-size:0.875rem"><div style=width:1.5rem;text-align:center;font-weight:700;color:var(--app-admin-fg-subtle)></div><div style=flex:1;min-width:0><div style=display:flex;align-items:center;gap:0.5rem><span class=app-admin-text-mono style=font-size:0.75rem></span><span style=color:var(--app-admin-fg-subtle);font-size:0.75rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis></span></div><div style=font-size:0.6875rem;color:var(--app-admin-fg-subtle);margin-top:0.125rem> conversion</div></div><span style=font-weight:700>`);
5585
5920
  var _tmpl$79 = /* @__PURE__ */ template(`<div class=app-admin-heading style=font-size:1.5rem;margin-top:0.25rem;font-variant-numeric:tabular-nums>`);
@@ -5744,10 +6079,10 @@ function Overview(props) {
5744
6079
  return recent().length > 0;
5745
6080
  },
5746
6081
  get fallback() {
5747
- return _tmpl$315();
6082
+ return _tmpl$319();
5748
6083
  },
5749
6084
  get children() {
5750
- var _el$9 = _tmpl$51();
6085
+ var _el$9 = _tmpl$61();
5751
6086
  insert(_el$9, createComponent(For, {
5752
6087
  get each() {
5753
6088
  return recent();
@@ -5755,7 +6090,7 @@ function Overview(props) {
5755
6090
  children: (c) => {
5756
6091
  const aff = () => affiliateById().get(c.affiliateId);
5757
6092
  return (() => {
5758
- var _el$14 = _tmpl$412(), _el$15 = _el$14.firstChild, _el$16 = _el$15.firstChild, _el$17 = _el$16.firstChild, _el$18 = _el$17.nextSibling, _el$19 = _el$16.nextSibling, _el$20 = _el$19.firstChild, _el$21 = _el$15.nextSibling, _el$22 = _el$21.nextSibling;
6093
+ var _el$14 = _tmpl$414(), _el$15 = _el$14.firstChild, _el$16 = _el$15.firstChild, _el$17 = _el$16.firstChild, _el$18 = _el$17.nextSibling, _el$19 = _el$16.nextSibling, _el$20 = _el$19.firstChild, _el$21 = _el$15.nextSibling, _el$22 = _el$21.nextSibling;
5759
6094
  insert(_el$17, () => c.affiliateCode);
5760
6095
  insert(_el$18, (() => {
5761
6096
  var _c$ = memo(() => !!aff());
@@ -5792,7 +6127,7 @@ function Overview(props) {
5792
6127
  return _tmpl$511();
5793
6128
  },
5794
6129
  get children() {
5795
- var _el$12 = _tmpl$51();
6130
+ var _el$12 = _tmpl$61();
5796
6131
  insert(_el$12, createComponent(For, {
5797
6132
  get each() {
5798
6133
  return topThisMonth();
@@ -5907,10 +6242,10 @@ function KpiCard(props) {
5907
6242
  })();
5908
6243
  }
5909
6244
  delegateEvents(["click", "keydown"]);
5910
- var _tmpl$60 = /* @__PURE__ */ template(`<span>`);
6245
+ var _tmpl$70 = /* @__PURE__ */ template(`<span>`);
5911
6246
  var _tmpl$221 = /* @__PURE__ */ template(`<span class=app-admin-text-muted> \xB7 <!> held`);
5912
- var _tmpl$316 = /* @__PURE__ */ template(`<div style=display:flex;flex-direction:column;gap:0.75rem>`);
5913
- var _tmpl$413 = /* @__PURE__ */ template(`<div><p style=font-size:0.875rem;color:var(--app-admin-fg-muted);margin-bottom:1rem>`);
6247
+ var _tmpl$320 = /* @__PURE__ */ template(`<div style=display:flex;flex-direction:column;gap:0.75rem>`);
6248
+ var _tmpl$415 = /* @__PURE__ */ template(`<div><p style=font-size:0.875rem;color:var(--app-admin-fg-muted);margin-bottom:1rem>`);
5914
6249
  var _tmpl$512 = /* @__PURE__ */ template(`<span class="app-admin-badge app-admin-badge--warning">Below <!> threshold`);
5915
6250
  var _tmpl$610 = /* @__PURE__ */ template(`<span style=color:var(--app-admin-fg-subtle)> \xB7 `);
5916
6251
  var _tmpl$710 = /* @__PURE__ */ template(`<div style="grid-column:span 2;font-size:0.75rem;color:var(--app-admin-fg-muted);margin-top:0.25rem"><span style=color:var(--app-admin-fg-subtle)>Payment:</span> `);
@@ -6015,7 +6350,7 @@ function Payouts(props) {
6015
6350
  const loading = () => approved.loading || pending.loading || affiliates.loading;
6016
6351
  const refresh = () => setRefreshKey((k) => k + 1);
6017
6352
  return (() => {
6018
- var _el$ = _tmpl$413(), _el$2 = _el$.firstChild;
6353
+ var _el$ = _tmpl$415(), _el$2 = _el$.firstChild;
6019
6354
  insert(_el$2, createComponent(Show, {
6020
6355
  get when() {
6021
6356
  return groups().length > 0;
@@ -6023,11 +6358,11 @@ function Payouts(props) {
6023
6358
  fallback: "Nothing to pay out right now.",
6024
6359
  get children() {
6025
6360
  return [(() => {
6026
- var _el$3 = _tmpl$60();
6361
+ var _el$3 = _tmpl$70();
6027
6362
  insert(_el$3, () => fmtCents3(grandTotalReady()));
6028
6363
  return _el$3;
6029
6364
  })(), " ready to pay across", " ", (() => {
6030
- var _el$4 = _tmpl$60();
6365
+ var _el$4 = _tmpl$70();
6031
6366
  insert(_el$4, () => groups().filter((g) => g.approvedTotal > 0).length);
6032
6367
  return _el$4;
6033
6368
  })(), " affiliate", memo(() => groups().filter((g) => g.approvedTotal > 0).length === 1 ? "" : "s"), createComponent(Show, {
@@ -6060,7 +6395,7 @@ function Payouts(props) {
6060
6395
  });
6061
6396
  },
6062
6397
  get children() {
6063
- var _el$9 = _tmpl$316();
6398
+ var _el$9 = _tmpl$320();
6064
6399
  insert(_el$9, createComponent(For, {
6065
6400
  get each() {
6066
6401
  return groups();
@@ -6186,10 +6521,10 @@ function PayoutCard(props) {
6186
6521
  })();
6187
6522
  }
6188
6523
  delegateEvents(["click"]);
6189
- var _tmpl$61 = /* @__PURE__ */ template(`<table class=app-admin-table><thead><tr><th>Code</th><th>Discount</th><th>Recurring</th><th>Scope</th><th>Validity</th><th>Affiliate</th><th>Status</th><th style=text-align:right>Updated</th></tr></thead><tbody>`);
6524
+ var _tmpl$71 = /* @__PURE__ */ template(`<table class=app-admin-table><thead><tr><th>Code</th><th>Discount</th><th>Recurring</th><th>Scope</th><th>Validity</th><th>Affiliate</th><th>Status</th><th style=text-align:right>Updated</th></tr></thead><tbody>`);
6190
6525
  var _tmpl$225 = /* @__PURE__ */ template(`<div class=app-admin-card style=overflow:hidden>`);
6191
- var _tmpl$317 = /* @__PURE__ */ template(`<div><div style=display:flex;align-items:center;justify-content:space-between;margin-bottom:1.5rem><button type=button class="app-admin-btn app-admin-btn-primary">+ New promo code</button></div><div style=display:flex;flex-wrap:wrap;align-items:center;gap:0.75rem;margin-bottom:1rem><input type=text placeholder="Search by code, product, or affiliate\u2026"class=app-admin-input style=width:20rem;max-width:100%><div style=display:flex;flex-wrap:wrap;gap:0.375rem>`);
6192
- var _tmpl$414 = /* @__PURE__ */ template(`<button type=button style="padding:0.375rem 0.75rem;border-radius:9999px;font-size:0.75rem;font-weight:600;text-transform:uppercase;letter-spacing:0.05em;border:1px solid;cursor:pointer"><span style=margin-left:0.375rem;opacity:0.7>`);
6526
+ var _tmpl$321 = /* @__PURE__ */ template(`<div><div style=display:flex;align-items:center;justify-content:space-between;margin-bottom:1.5rem><button type=button class="app-admin-btn app-admin-btn-primary">+ New promo code</button></div><div style=display:flex;flex-wrap:wrap;align-items:center;gap:0.75rem;margin-bottom:1rem><input type=text placeholder="Search by code, product, or affiliate\u2026"class=app-admin-input style=width:20rem;max-width:100%><div style=display:flex;flex-wrap:wrap;gap:0.375rem>`);
6527
+ var _tmpl$416 = /* @__PURE__ */ template(`<button type=button style="padding:0.375rem 0.75rem;border-radius:9999px;font-size:0.75rem;font-weight:600;text-transform:uppercase;letter-spacing:0.05em;border:1px solid;cursor:pointer"><span style=margin-left:0.375rem;opacity:0.7>`);
6193
6528
  var _tmpl$513 = /* @__PURE__ */ template(`<span title="Cannot be combined with other codes or sales"style=margin-left:0.5rem;font-size:0.625rem;text-transform:uppercase;letter-spacing:0.05em;color:var(--app-admin-fg-subtle)>excl`);
6194
6529
  var _tmpl$611 = /* @__PURE__ */ template(`<span class=app-admin-text-mono style=font-size:0.8125rem>`);
6195
6530
  var _tmpl$711 = /* @__PURE__ */ template(`<tr><td data-label=Code><span class=app-admin-text-mono style=font-weight:600;text-transform:uppercase></span></td><td data-label=Discount></td><td data-label=Recurring class=app-admin-text-muted style=font-size:0.8125rem></td><td data-label=Scope class=app-admin-text-muted></td><td data-label=Validity class=app-admin-text-muted></td><td data-label=Affiliate></td><td data-label=Status><span></span></td><td data-label=Updated class=app-admin-text-muted style=text-align:right;font-size:0.75rem>`);
@@ -6369,7 +6704,7 @@ function PromoCodes(props) {
6369
6704
  });
6370
6705
  const refresh = () => setRefreshKey((k) => k + 1);
6371
6706
  return (() => {
6372
- var _el$ = _tmpl$317(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$2.nextSibling, _el$5 = _el$4.firstChild, _el$6 = _el$5.nextSibling;
6707
+ var _el$ = _tmpl$321(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$2.nextSibling, _el$5 = _el$4.firstChild, _el$6 = _el$5.nextSibling;
6373
6708
  insert(_el$2, createComponent(PageTitle, {
6374
6709
  subtitle: "Discount codes that apply at checkout. Optionally attach a code to an affiliate for commission attribution.",
6375
6710
  children: "Promo Codes"
@@ -6382,7 +6717,7 @@ function PromoCodes(props) {
6382
6717
  const active = () => statusFilter() === f.value;
6383
6718
  const count = () => counts()[f.value];
6384
6719
  return (() => {
6385
- var _el$18 = _tmpl$414(), _el$19 = _el$18.firstChild;
6720
+ var _el$18 = _tmpl$416(), _el$19 = _el$18.firstChild;
6386
6721
  _el$18.$$click = () => setStatusFilter(f.value);
6387
6722
  insert(_el$18, () => f.label, _el$19);
6388
6723
  insert(_el$19, count);
@@ -6432,7 +6767,7 @@ function PromoCodes(props) {
6432
6767
  });
6433
6768
  },
6434
6769
  get children() {
6435
- var _el$8 = _tmpl$61(), _el$9 = _el$8.firstChild, _el$0 = _el$9.firstChild, _el$1 = _el$0.firstChild, _el$10 = _el$1.nextSibling, _el$11 = _el$10.nextSibling, _el$12 = _el$11.nextSibling, _el$13 = _el$12.nextSibling, _el$14 = _el$13.nextSibling, _el$15 = _el$14.nextSibling; _el$15.nextSibling; var _el$17 = _el$9.nextSibling;
6770
+ var _el$8 = _tmpl$71(), _el$9 = _el$8.firstChild, _el$0 = _el$9.firstChild, _el$1 = _el$0.firstChild, _el$10 = _el$1.nextSibling, _el$11 = _el$10.nextSibling, _el$12 = _el$11.nextSibling, _el$13 = _el$12.nextSibling, _el$14 = _el$13.nextSibling, _el$15 = _el$14.nextSibling; _el$15.nextSibling; var _el$17 = _el$9.nextSibling;
6436
6771
  insert(_el$17, createComponent(For, {
6437
6772
  get each() {
6438
6773
  return filtered();
@@ -6898,10 +7233,10 @@ function toastSuccess(message) {
6898
7233
  function toastError(message) {
6899
7234
  current.error(message);
6900
7235
  }
6901
- var _tmpl$70 = /* @__PURE__ */ template(`<span>`);
7236
+ var _tmpl$80 = /* @__PURE__ */ template(`<span>`);
6902
7237
  var _tmpl$227 = /* @__PURE__ */ template(`<span style=font-size:0.6875rem;color:var(--app-admin-fg-subtle)>`);
6903
- var _tmpl$318 = /* @__PURE__ */ template(`<label style=display:flex;flex-direction:column;gap:0.25rem><span class=app-admin-label>`);
6904
- var _tmpl$415 = /* @__PURE__ */ template(`<section style=margin-bottom:1.25rem><h4 style="font-size:0.6875rem;font-weight:700;text-transform:uppercase;letter-spacing:0.1em;color:var(--app-admin-fg-muted);padding-bottom:0.375rem;border-bottom:1px solid var(--app-admin-border);margin-bottom:0.75rem"></h4><div style=display:flex;flex-direction:column;gap:0.75rem>`);
7238
+ var _tmpl$323 = /* @__PURE__ */ template(`<label style=display:flex;flex-direction:column;gap:0.25rem><span class=app-admin-label>`);
7239
+ var _tmpl$417 = /* @__PURE__ */ template(`<section style=margin-bottom:1.25rem><h4 style="font-size:0.6875rem;font-weight:700;text-transform:uppercase;letter-spacing:0.1em;color:var(--app-admin-fg-muted);padding-bottom:0.375rem;border-bottom:1px solid var(--app-admin-border);margin-bottom:0.75rem"></h4><div style=display:flex;flex-direction:column;gap:0.75rem>`);
6905
7240
  var _tmpl$514 = /* @__PURE__ */ template(`<div style=font-size:0.6875rem;font-weight:600;text-transform:uppercase;letter-spacing:0.12em;color:var(--app-admin-fg-muted)>`);
6906
7241
  var _tmpl$612 = /* @__PURE__ */ template(`<div class=app-admin-card-soft style="padding:0.5rem 0.75rem"><div style=font-size:0.625rem;text-transform:uppercase;letter-spacing:0.08em;color:var(--app-admin-fg-subtle);font-weight:600></div><div class=app-admin-heading style=font-size:0.875rem;margin-top:0.125rem>`);
6907
7242
  function fmtCents4(cents) {
@@ -6968,7 +7303,7 @@ function affiliateStatusBadgeVariant(status) {
6968
7303
  }
6969
7304
  function AffiliateStatusPill(props) {
6970
7305
  return (() => {
6971
- var _el$ = _tmpl$70();
7306
+ var _el$ = _tmpl$80();
6972
7307
  insert(_el$, () => props.status);
6973
7308
  effect(() => className(_el$, `app-admin-badge ${affiliateStatusBadgeVariant(props.status)}`));
6974
7309
  return _el$;
@@ -6982,7 +7317,7 @@ function randomCode(len = 8) {
6982
7317
  }
6983
7318
  function FormRow(props) {
6984
7319
  return (() => {
6985
- var _el$2 = _tmpl$318(), _el$3 = _el$2.firstChild;
7320
+ var _el$2 = _tmpl$323(), _el$3 = _el$2.firstChild;
6986
7321
  insert(_el$3, () => props.label);
6987
7322
  insert(_el$2, () => props.children, null);
6988
7323
  insert(_el$2, createComponent(Show, {
@@ -7000,7 +7335,7 @@ function FormRow(props) {
7000
7335
  }
7001
7336
  function FormSection2(props) {
7002
7337
  return (() => {
7003
- var _el$5 = _tmpl$415(), _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling;
7338
+ var _el$5 = _tmpl$417(), _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling;
7004
7339
  insert(_el$6, () => props.title);
7005
7340
  insert(_el$7, () => props.children);
7006
7341
  return _el$5;
@@ -7023,10 +7358,10 @@ function Stat2(props) {
7023
7358
  }
7024
7359
 
7025
7360
  // src/pages/admin/affiliates/AffiliateDetailPanel.tsx
7026
- var _tmpl$71 = /* @__PURE__ */ template(`<div class=app-admin-card-soft style=padding:1rem;margin-bottom:1.25rem;background:var(--app-admin-warning-bg);border-color:var(--app-admin-warning-fg)><div class=app-admin-heading style=font-size:0.875rem;color:var(--app-admin-warning-fg)>Awaiting approval</div><p style="font-size:0.75rem;color:var(--app-admin-fg-muted);margin:0.25rem 0 0.75rem">Approve this affiliate to allow click tracking and commission attribution. Reject to permanently deny.</p><div style=display:flex;gap:0.5rem><button type=button class="app-admin-btn app-admin-btn-primary"></button><button type=button class="app-admin-btn app-admin-btn-danger">Reject`);
7361
+ var _tmpl$81 = /* @__PURE__ */ template(`<div class=app-admin-card-soft style=padding:1rem;margin-bottom:1.25rem;background:var(--app-admin-warning-bg);border-color:var(--app-admin-warning-fg)><div class=app-admin-heading style=font-size:0.875rem;color:var(--app-admin-warning-fg)>Awaiting approval</div><p style="font-size:0.75rem;color:var(--app-admin-fg-muted);margin:0.25rem 0 0.75rem">Approve this affiliate to allow click tracking and commission attribution. Reject to permanently deny.</p><div style=display:flex;gap:0.5rem><button type=button class="app-admin-btn app-admin-btn-primary"></button><button type=button class="app-admin-btn app-admin-btn-danger">Reject`);
7027
7362
  var _tmpl$228 = /* @__PURE__ */ template(`<section style=margin-bottom:1.25rem>`);
7028
- var _tmpl$319 = /* @__PURE__ */ template(`<div class=app-admin-card-soft style=margin-top:0.5rem;overflow:hidden;padding:0>`);
7029
- var _tmpl$416 = /* @__PURE__ */ template(`<div class=app-admin-card-soft style=overflow:hidden;padding:0>`);
7363
+ var _tmpl$324 = /* @__PURE__ */ template(`<div class=app-admin-card-soft style=margin-top:0.5rem;overflow:hidden;padding:0>`);
7364
+ var _tmpl$418 = /* @__PURE__ */ template(`<div class=app-admin-card-soft style=overflow:hidden;padding:0>`);
7030
7365
  var _tmpl$515 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-ghost"style=width:100%>Suspend`);
7031
7366
  var _tmpl$613 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-primary"style=width:100%>Reactivate`);
7032
7367
  var _tmpl$712 = /* @__PURE__ */ template(`<div class=app-admin-side-panel style=width:520px;z-index:60><div style=display:flex;flex-direction:column;height:100%><div style="display:flex;align-items:flex-start;gap:0.75rem;padding:1rem 1.25rem;border-bottom:1px solid var(--app-admin-border)"><div style=width:2.5rem;height:2.5rem;border-radius:9999px;background:var(--app-admin-primary-soft);color:var(--app-admin-primary-soft-fg);font-weight:700;display:flex;align-items:center;justify-content:center;flex-shrink:0></div><div style=flex:1;min-width:0><div class=app-admin-heading style=font-size:1rem></div><div style=font-size:0.75rem;color:var(--app-admin-fg-subtle);overflow:hidden;text-overflow:ellipsis;white-space:nowrap></div><div style=display:flex;align-items:center;gap:0.5rem;margin-top:0.375rem><span style=font-size:0.6875rem;color:var(--app-admin-fg-subtle)>Last login </span></div></div><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="flex:1;overflow-y:auto;padding:1rem 1.25rem"><section style=margin-bottom:1.25rem><div style="display:grid;grid-template-columns:repeat(4, 1fr);gap:0.5rem;margin-top:0.5rem"></div></section><section style=margin-bottom:1.25rem></section><section style=margin-bottom:1.25rem><div style=display:flex;align-items:center;justify-content:space-between;margin-bottom:0.5rem><button type=button></button></div></section><section style=margin-bottom:1.25rem><div style=display:flex;align-items:center;justify-content:space-between;margin-bottom:0.5rem><button type=button></button></div></section><section style=margin-bottom:1.25rem><div style=display:flex;align-items:center;justify-content:space-between;margin-bottom:0.5rem><button type=button></button></div></section><section style=margin-bottom:1.25rem></section><section style=margin-bottom:1.25rem><div style=display:flex;align-items:center;justify-content:space-between;margin-bottom:0.5rem><button type=button>+ Add code</button></div></section><section style=margin-bottom:1.25rem><div style=display:flex;align-items:center;justify-content:space-between;margin-bottom:0.5rem><button type=button></button></div></section><section style=margin-bottom:1.25rem><div style=display:flex;align-items:center;justify-content:space-between;margin-bottom:0.5rem><button type=button></button></div></section><section style="border-top:1px solid var(--app-admin-border);padding-top:1rem;margin-top:0.5rem;display:flex;flex-direction:column;gap:0.5rem"><button type=button class="app-admin-btn app-admin-btn-danger"style=width:100%>`);
@@ -7056,7 +7391,7 @@ var _tmpl$283 = /* @__PURE__ */ template(`<div style=margin-top:0.5rem;display:f
7056
7391
  var _tmpl$293 = /* @__PURE__ */ template(`<select class=app-admin-input><option value>\u2014 None \u2014`);
7057
7392
  var _tmpl$303 = /* @__PURE__ */ template(`<div style=display:flex;flex-direction:column;gap:0.75rem><div style=display:flex;gap: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>`);
7058
7393
  var _tmpl$3110 = /* @__PURE__ */ template(`<option>`);
7059
- var _tmpl$322 = /* @__PURE__ */ template(`<div style=font-size:0.75rem;display:flex;flex-direction:column;gap:0.375rem;margin-top:0.5rem><div style=display:flex;justify-content:space-between><span style=color:var(--app-admin-fg-subtle)>Override paid on subs' sales</span><span></span></div><p style=font-size:0.6875rem;color:var(--app-admin-fg-subtle);font-style:italic;margin:0>`);
7394
+ var _tmpl$325 = /* @__PURE__ */ template(`<div style=font-size:0.75rem;display:flex;flex-direction:column;gap:0.375rem;margin-top:0.5rem><div style=display:flex;justify-content:space-between><span style=color:var(--app-admin-fg-subtle)>Override paid on subs' sales</span><span></span></div><p style=font-size:0.6875rem;color:var(--app-admin-fg-subtle);font-style:italic;margin:0>`);
7060
7395
  var _tmpl$332 = /* @__PURE__ */ template(`<div style=display:flex;flex-direction:column;gap:0.75rem><div style="font-size:0.6875rem;color:var(--app-admin-fg-muted);background:var(--app-admin-warning-bg);border:1px solid var(--app-admin-warning-fg);padding:0.5rem 0.75rem;border-radius:var(--app-admin-radius-sm)">This is what <strong></strong> earns as a parent on each of their sub-affiliates' sales. Leave both blank to use the program default.</div><div style=display:flex;gap:0.5rem;padding-top:0.25rem><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>`);
7061
7396
  var _tmpl$342 = /* @__PURE__ */ template(`<input type=email class=app-admin-input>`);
7062
7397
  var _tmpl$352 = /* @__PURE__ */ template(`<select class=app-admin-input><option value>\u2014</option><option value=paypal>PayPal</option><option value=bank_transfer>Bank transfer</option><option value=other>Other`);
@@ -7141,7 +7476,7 @@ function AffiliateDetailPanel(props) {
7141
7476
  return props.affiliate.status === "pending";
7142
7477
  },
7143
7478
  get children() {
7144
- var _el$11 = _tmpl$71(), _el$12 = _el$11.firstChild, _el$13 = _el$12.nextSibling, _el$14 = _el$13.nextSibling, _el$15 = _el$14.firstChild, _el$16 = _el$15.nextSibling;
7479
+ var _el$11 = _tmpl$81(), _el$12 = _el$11.firstChild, _el$13 = _el$12.nextSibling, _el$14 = _el$13.nextSibling, _el$15 = _el$14.firstChild, _el$16 = _el$15.nextSibling;
7145
7480
  _el$15.$$click = () => setStatus("active");
7146
7481
  insert(_el$15, () => busy() === "status:active" ? "Approving\u2026" : "Approve");
7147
7482
  _el$16.$$click = () => setStatus("rejected");
@@ -7212,7 +7547,7 @@ function AffiliateDetailPanel(props) {
7212
7547
  return _tmpl$812();
7213
7548
  },
7214
7549
  get children() {
7215
- var _el$21 = _tmpl$319();
7550
+ var _el$21 = _tmpl$324();
7216
7551
  insert(_el$21, createComponent(For, {
7217
7552
  get each() {
7218
7553
  return (stats()?.recentConversions ?? []).slice(0, 8);
@@ -7363,7 +7698,7 @@ function AffiliateDetailPanel(props) {
7363
7698
  return _tmpl$126();
7364
7699
  },
7365
7700
  get children() {
7366
- var _el$32 = _tmpl$319();
7701
+ var _el$32 = _tmpl$324();
7367
7702
  insert(_el$32, createComponent(For, {
7368
7703
  get each() {
7369
7704
  return downline();
@@ -7395,7 +7730,7 @@ function AffiliateDetailPanel(props) {
7395
7730
  return _tmpl$146();
7396
7731
  },
7397
7732
  get children() {
7398
- var _el$36 = _tmpl$416();
7733
+ var _el$36 = _tmpl$418();
7399
7734
  insert(_el$36, createComponent(For, {
7400
7735
  get each() {
7401
7736
  return promoCodes();
@@ -7820,7 +8155,7 @@ function UplineEditor(props) {
7820
8155
  function SecondTierSummary(props) {
7821
8156
  const est = effectiveSecondTier(props.affiliate, props.program);
7822
8157
  return (() => {
7823
- var _el$120 = _tmpl$322(), _el$121 = _el$120.firstChild, _el$122 = _el$121.firstChild, _el$123 = _el$122.nextSibling, _el$125 = _el$121.nextSibling;
8158
+ var _el$120 = _tmpl$325(), _el$121 = _el$120.firstChild, _el$122 = _el$121.firstChild, _el$123 = _el$122.nextSibling, _el$125 = _el$121.nextSibling;
7824
8159
  insert(_el$123, createComponent(Show, {
7825
8160
  when: est,
7826
8161
  get fallback() {
@@ -7977,10 +8312,10 @@ function NotesEditor(props) {
7977
8312
  })();
7978
8313
  }
7979
8314
  delegateEvents(["click", "input"]);
7980
- var _tmpl$80 = /* @__PURE__ */ template(`<div style="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">`);
8315
+ var _tmpl$90 = /* @__PURE__ */ template(`<div style="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">`);
7981
8316
  var _tmpl$230 = /* @__PURE__ */ template(`<input type=text class=app-admin-input>`);
7982
- var _tmpl$320 = /* @__PURE__ */ template(`<input type=email class=app-admin-input>`);
7983
- var _tmpl$417 = /* @__PURE__ */ template(`<div style=display:flex;gap:0.5rem><input type=text class="app-admin-input app-admin-text-mono"style=text-transform:uppercase><button type=button class="app-admin-btn app-admin-btn-ghost">Random`);
8317
+ var _tmpl$326 = /* @__PURE__ */ template(`<input type=email class=app-admin-input>`);
8318
+ var _tmpl$419 = /* @__PURE__ */ template(`<div style=display:flex;gap:0.5rem><input type=text class="app-admin-input app-admin-text-mono"style=text-transform:uppercase><button type=button class="app-admin-btn app-admin-btn-ghost">Random`);
7984
8319
  var _tmpl$516 = /* @__PURE__ */ template(`<select class=app-admin-input>`);
7985
8320
  var _tmpl$614 = /* @__PURE__ */ template(`<select class=app-admin-input><option value>\u2014 None \u2014`);
7986
8321
  var _tmpl$713 = /* @__PURE__ */ template(`<select class=app-admin-input><option value=active>Active</option><option value=pending>Pending`);
@@ -8040,7 +8375,7 @@ function NewAffiliateModal(props) {
8040
8375
  return err();
8041
8376
  },
8042
8377
  get children() {
8043
- var _el$7 = _tmpl$80();
8378
+ var _el$7 = _tmpl$90();
8044
8379
  insert(_el$7, err);
8045
8380
  return _el$7;
8046
8381
  }
@@ -8066,7 +8401,7 @@ function NewAffiliateModal(props) {
8066
8401
  insert(_el$6, createComponent(FormRow, {
8067
8402
  label: "Email",
8068
8403
  get children() {
8069
- var _el$0 = _tmpl$320();
8404
+ var _el$0 = _tmpl$326();
8070
8405
  _el$0.$$input = (e) => setEmail(e.currentTarget.value);
8071
8406
  effect(() => _el$0.value = email());
8072
8407
  return _el$0;
@@ -8088,7 +8423,7 @@ function NewAffiliateModal(props) {
8088
8423
  return `Sales are credited only when the customer arrives via the referral link \u2014 ${window.location.origin}/?ref=${code().trim() || "CODE"} \u2014 so marketing materials must use that full link for tracking, not the bare site address.`;
8089
8424
  },
8090
8425
  get children() {
8091
- var _el$10 = _tmpl$417(), _el$11 = _el$10.firstChild, _el$12 = _el$11.nextSibling;
8426
+ var _el$10 = _tmpl$419(), _el$11 = _el$10.firstChild, _el$12 = _el$11.nextSibling;
8092
8427
  _el$11.$$input = (e) => setCode(e.currentTarget.value.toUpperCase());
8093
8428
  _el$12.$$click = () => setCode(randomCode());
8094
8429
  effect(() => _el$11.value = code());
@@ -8155,10 +8490,10 @@ function NewAffiliateModal(props) {
8155
8490
  delegateEvents(["mousedown", "click", "input"]);
8156
8491
 
8157
8492
  // src/pages/admin/affiliates/People.tsx
8158
- var _tmpl$81 = /* @__PURE__ */ template(`<table class=app-admin-table><thead><tr><th>Status</th><th>Name</th><th>Code</th><th>Program</th><th>Commission</th><th style=text-align:right>Total earned</th><th style=text-align:right>Pending</th><th style=text-align:right>Joined</th></tr></thead><tbody>`);
8493
+ var _tmpl$91 = /* @__PURE__ */ template(`<table class=app-admin-table><thead><tr><th>Status</th><th>Name</th><th>Code</th><th>Program</th><th>Commission</th><th style=text-align:right>Total earned</th><th style=text-align:right>Pending</th><th style=text-align:right>Joined</th></tr></thead><tbody>`);
8159
8494
  var _tmpl$231 = /* @__PURE__ */ template(`<div><div style=display:flex;align-items:center;gap:0.75rem;flex-wrap:wrap;margin-bottom:1rem><input type=text placeholder="Search by name, email, or code\u2026"class=app-admin-input style=width:18rem;max-width:100%><div style=display:flex;gap:0.375rem;flex-wrap:wrap></div><div style=flex:1></div><button type=button class="app-admin-btn app-admin-btn-primary">+ New Affiliate</button></div><div class=app-admin-card style=overflow:hidden>`);
8160
- var _tmpl$321 = /* @__PURE__ */ template(`<button type=button style="padding:0.375rem 0.75rem;border-radius:9999px;font-size:0.6875rem;font-weight:600;text-transform:uppercase;letter-spacing:0.05em;border:1px solid;cursor:pointer"><span style=margin-left:0.375rem;opacity:0.7>`);
8161
- var _tmpl$418 = /* @__PURE__ */ template(`<div title="Parent affiliate (upline)"style=font-size:0.6875rem;color:var(--app-admin-fg-subtle)>\u21B3 under `);
8495
+ var _tmpl$327 = /* @__PURE__ */ template(`<button type=button style="padding:0.375rem 0.75rem;border-radius:9999px;font-size:0.6875rem;font-weight:600;text-transform:uppercase;letter-spacing:0.05em;border:1px solid;cursor:pointer"><span style=margin-left:0.375rem;opacity:0.7>`);
8496
+ var _tmpl$420 = /* @__PURE__ */ template(`<div title="Parent affiliate (upline)"style=font-size:0.6875rem;color:var(--app-admin-fg-subtle)>\u21B3 under `);
8162
8497
  var _tmpl$517 = /* @__PURE__ */ template(`<span title="Custom rate"style=margin-left:0.25rem;color:var(--app-admin-primary-soft-fg)>*`);
8163
8498
  var _tmpl$615 = /* @__PURE__ */ template(`<tr><td data-label=Status></td><td data-label=Name><div style=font-weight:500></div><div style=font-size:0.75rem;color:var(--app-admin-fg-subtle)></div></td><td data-label=Code><span class="app-admin-text-mono app-admin-text-muted"style=font-size:0.75rem></span></td><td data-label=Program class=app-admin-text-muted></td><td data-label=Commission class=app-admin-text-muted></td><td data-label="Total earned"style=text-align:right></td><td data-label=Pending class=app-admin-text-muted style=text-align:right></td><td data-label=Joined class=app-admin-text-muted style=text-align:right;font-size:0.75rem>`);
8164
8499
  var _tmpl$714 = /* @__PURE__ */ template(`<span style=color:var(--app-admin-fg-subtle)>\u2014`);
@@ -8257,7 +8592,7 @@ function People(props) {
8257
8592
  children: (f) => {
8258
8593
  const active = () => statusFilter() === f.value;
8259
8594
  return (() => {
8260
- var _el$18 = _tmpl$321(), _el$19 = _el$18.firstChild;
8595
+ var _el$18 = _tmpl$327(), _el$19 = _el$18.firstChild;
8261
8596
  _el$18.$$click = () => setStatusFilter(f.value);
8262
8597
  insert(_el$18, () => f.label, _el$19);
8263
8598
  insert(_el$19, () => counts()[f.value]);
@@ -8311,7 +8646,7 @@ function People(props) {
8311
8646
  });
8312
8647
  },
8313
8648
  get children() {
8314
- var _el$8 = _tmpl$81(), _el$9 = _el$8.firstChild, _el$0 = _el$9.firstChild, _el$1 = _el$0.firstChild, _el$10 = _el$1.nextSibling, _el$11 = _el$10.nextSibling, _el$12 = _el$11.nextSibling, _el$13 = _el$12.nextSibling, _el$14 = _el$13.nextSibling, _el$15 = _el$14.nextSibling; _el$15.nextSibling; var _el$17 = _el$9.nextSibling;
8649
+ var _el$8 = _tmpl$91(), _el$9 = _el$8.firstChild, _el$0 = _el$9.firstChild, _el$1 = _el$0.firstChild, _el$10 = _el$1.nextSibling, _el$11 = _el$10.nextSibling, _el$12 = _el$11.nextSibling, _el$13 = _el$12.nextSibling, _el$14 = _el$13.nextSibling, _el$15 = _el$14.nextSibling; _el$15.nextSibling; var _el$17 = _el$9.nextSibling;
8315
8650
  insert(_el$17, createComponent(For, {
8316
8651
  get each() {
8317
8652
  return filtered();
@@ -8336,7 +8671,7 @@ function People(props) {
8336
8671
  return a.parentAffiliateId;
8337
8672
  },
8338
8673
  get children() {
8339
- var _el$27 = _tmpl$418(); _el$27.firstChild;
8674
+ var _el$27 = _tmpl$420(); _el$27.firstChild;
8340
8675
  insert(_el$27, () => affiliateById().get(a.parentAffiliateId)?.affiliateCode ?? "\u2014", null);
8341
8676
  return _el$27;
8342
8677
  }
@@ -8449,10 +8784,10 @@ function EmptyAffiliatesState(props) {
8449
8784
  })();
8450
8785
  }
8451
8786
  delegateEvents(["input", "click"]);
8452
- var _tmpl$90 = /* @__PURE__ */ template(`<div style="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;margin-bottom:1rem">`);
8787
+ var _tmpl$100 = /* @__PURE__ */ template(`<div style="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;margin-bottom:1rem">`);
8453
8788
  var _tmpl$236 = /* @__PURE__ */ template(`<input type=text class=app-admin-input>`);
8454
- var _tmpl$323 = /* @__PURE__ */ template(`<textarea rows=2 class=app-admin-input style=resize:vertical>`);
8455
- var _tmpl$419 = /* @__PURE__ */ template(`<label style=display:flex;align-items:center;gap:0.5rem;font-size:0.8125rem><input type=checkbox><span>Program is active`);
8789
+ var _tmpl$328 = /* @__PURE__ */ template(`<textarea rows=2 class=app-admin-input style=resize:vertical>`);
8790
+ var _tmpl$421 = /* @__PURE__ */ template(`<label style=display:flex;align-items:center;gap:0.5rem;font-size:0.8125rem><input type=checkbox><span>Program is active`);
8456
8791
  var _tmpl$518 = /* @__PURE__ */ template(`<p style=font-size:0.6875rem;color:var(--app-admin-fg-subtle);margin:0>Set fixed, percentage, or both. The affiliate earns the sum on each qualifying conversion.`);
8457
8792
  var _tmpl$616 = /* @__PURE__ */ template(`<input type=text inputmode=decimal class=app-admin-input>`);
8458
8793
  var _tmpl$715 = /* @__PURE__ */ template(`<div style="display:grid;grid-template-columns:1fr 1fr;gap:0.75rem">`);
@@ -8583,7 +8918,7 @@ function ProgramEditPanel(props) {
8583
8918
  return err();
8584
8919
  },
8585
8920
  get children() {
8586
- var _el$7 = _tmpl$90();
8921
+ var _el$7 = _tmpl$100();
8587
8922
  insert(_el$7, err);
8588
8923
  return _el$7;
8589
8924
  }
@@ -8602,13 +8937,13 @@ function ProgramEditPanel(props) {
8602
8937
  }), createComponent(FormRow, {
8603
8938
  label: "Description",
8604
8939
  get children() {
8605
- var _el$9 = _tmpl$323();
8940
+ var _el$9 = _tmpl$328();
8606
8941
  _el$9.$$input = (e) => setDescription(e.currentTarget.value);
8607
8942
  effect(() => _el$9.value = description());
8608
8943
  return _el$9;
8609
8944
  }
8610
8945
  }), (() => {
8611
- var _el$0 = _tmpl$419(), _el$1 = _el$0.firstChild;
8946
+ var _el$0 = _tmpl$421(), _el$1 = _el$0.firstChild;
8612
8947
  _el$1.addEventListener("change", (e) => setIsActive(e.currentTarget.checked));
8613
8948
  effect(() => _el$1.checked = isActive());
8614
8949
  return _el$0;
@@ -8833,10 +9168,10 @@ function ProgramEditPanel(props) {
8833
9168
  delegateEvents(["click", "input"]);
8834
9169
 
8835
9170
  // src/pages/admin/affiliates/Programs.tsx
8836
- var _tmpl$91 = /* @__PURE__ */ template(`<div style=display:flex;flex-direction:column;gap:0.75rem>`);
9171
+ var _tmpl$101 = /* @__PURE__ */ template(`<div style=display:flex;flex-direction:column;gap:0.75rem>`);
8837
9172
  var _tmpl$237 = /* @__PURE__ */ template(`<div><div style=display:flex;align-items:center;justify-content:space-between;margin-bottom:1rem><p style=font-size:0.875rem;color:var(--app-admin-fg-muted);margin:0>Programs define commission rates, customer discounts, cookie windows, and payout rules. Each affiliate belongs to exactly one program.</p><button type=button class="app-admin-btn app-admin-btn-primary"style=margin-left:1rem;flex-shrink:0>+ New program`);
8838
- var _tmpl$324 = /* @__PURE__ */ template(`<span class="app-admin-badge app-admin-badge--neutral">Inactive`);
8839
- var _tmpl$420 = /* @__PURE__ */ template(`<p style="font-size:0.75rem;color:var(--app-admin-fg-muted);margin:0 0 0.75rem">`);
9173
+ var _tmpl$329 = /* @__PURE__ */ template(`<span class="app-admin-badge app-admin-badge--neutral">Inactive`);
9174
+ var _tmpl$422 = /* @__PURE__ */ template(`<p style="font-size:0.75rem;color:var(--app-admin-fg-muted);margin:0 0 0.75rem">`);
8840
9175
  var _tmpl$519 = /* @__PURE__ */ template(`<div class=app-admin-card style=padding:1.25rem;cursor:pointer><div style=display:flex;align-items:flex-start;justify-content:space-between;gap:1rem><div style=flex:1;min-width:0><div style=display:flex;align-items:center;gap:0.5rem;margin-bottom:0.25rem><h3 class=app-admin-heading style=font-size:1rem;margin:0></h3></div><div style="display:grid;grid-template-columns:repeat(auto-fit, minmax(140px, 1fr));gap:0.75rem;font-size:0.6875rem"></div></div><span style=color:var(--app-admin-fg-subtle);font-size:1rem;flex-shrink:0>\u203A`);
8841
9176
  var _tmpl$617 = /* @__PURE__ */ template(`<div><div style=font-size:0.625rem;color:var(--app-admin-fg-subtle);text-transform:uppercase;letter-spacing:0.08em;font-weight:600></div><div style=margin-top:0.125rem>`);
8842
9177
  function Programs() {
@@ -8872,7 +9207,7 @@ function Programs() {
8872
9207
  });
8873
9208
  },
8874
9209
  get children() {
8875
- var _el$5 = _tmpl$91();
9210
+ var _el$5 = _tmpl$101();
8876
9211
  insert(_el$5, createComponent(For, {
8877
9212
  get each() {
8878
9213
  return programs();
@@ -8926,7 +9261,7 @@ function ProgramCard(props) {
8926
9261
  return !props.program.isActive;
8927
9262
  },
8928
9263
  get children() {
8929
- return _tmpl$324();
9264
+ return _tmpl$329();
8930
9265
  }
8931
9266
  }), null);
8932
9267
  insert(_el$8, createComponent(Show, {
@@ -8934,7 +9269,7 @@ function ProgramCard(props) {
8934
9269
  return props.program.description;
8935
9270
  },
8936
9271
  get children() {
8937
- var _el$10 = _tmpl$420();
9272
+ var _el$10 = _tmpl$422();
8938
9273
  insert(_el$10, () => props.program.description);
8939
9274
  return _el$10;
8940
9275
  }
@@ -9013,7 +9348,7 @@ function KeyVal(props) {
9013
9348
  delegateEvents(["click"]);
9014
9349
 
9015
9350
  // src/pages/admin/Affiliates.tsx
9016
- var _tmpl$100 = /* @__PURE__ */ template(`<div><div style="border-bottom:1px solid var(--app-admin-border);margin-bottom:1.5rem"><nav style=display:flex;gap:0.25rem;margin-bottom:-1px>`);
9351
+ var _tmpl$109 = /* @__PURE__ */ template(`<div><div style="border-bottom:1px solid var(--app-admin-border);margin-bottom:1.5rem"><nav style=display:flex;gap:0.25rem;margin-bottom:-1px>`);
9017
9352
  var _tmpl$238 = /* @__PURE__ */ template(`<button type=button style="padding:0.625rem 1rem;font-size:0.8125rem;font-weight:600;text-transform:uppercase;letter-spacing:0.05em;border-bottom:2px solid;background:transparent;cursor:pointer">`);
9018
9353
  var SUB_TABS = [{
9019
9354
  key: "overview",
@@ -9039,7 +9374,7 @@ function Affiliates(props) {
9039
9374
  props.onSubTabChange?.(sub);
9040
9375
  };
9041
9376
  return (() => {
9042
- var _el$ = _tmpl$100(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild;
9377
+ var _el$ = _tmpl$109(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild;
9043
9378
  insert(_el$, createComponent(PageTitle, {
9044
9379
  subtitle: "Manage affiliate partners, commission programs, and payouts.",
9045
9380
  children: "Affiliates"
@@ -9115,10 +9450,10 @@ function Affiliates(props) {
9115
9450
  })();
9116
9451
  }
9117
9452
  delegateEvents(["click"]);
9118
- var _tmpl$101 = /* @__PURE__ */ template(`<div class=app-admin-card style=overflow:hidden><table class=app-admin-table><thead><tr><th>ID</th><th>Name</th><th style=width:6rem>Order</th><th style=width:12rem></th></tr></thead><tbody>`);
9453
+ var _tmpl$121 = /* @__PURE__ */ template(`<div class=app-admin-card style=overflow:hidden><table class=app-admin-table><thead><tr><th>ID</th><th>Name</th><th style=width:6rem>Order</th><th style=width:12rem></th></tr></thead><tbody>`);
9119
9454
  var _tmpl$239 = /* @__PURE__ */ template(`<div><div class=app-admin-card style=padding:1rem;margin-bottom:1.5rem><div style=font-size:0.875rem;font-weight:600;margin-bottom:0.75rem>Add a category</div><div style="display:grid;grid-template-columns:repeat(auto-fit, minmax(min(100%, 12rem), 1fr));gap:0.75rem;align-items:end"><div><label class=app-admin-label>Name</label><input type=text placeholder="Sexual Wellness"class=app-admin-input></div><div><label class=app-admin-label>ID (slug)</label><input type=text placeholder=sexual-wellness class=app-admin-input></div><div><label class=app-admin-label>Order</label><input type=number placeholder=0 class=app-admin-input></div><button type=button class="app-admin-btn app-admin-btn-primary">`);
9120
- var _tmpl$325 = /* @__PURE__ */ template(`<input type=text class=app-admin-input>`);
9121
- var _tmpl$421 = /* @__PURE__ */ template(`<input type=number class=app-admin-input>`);
9455
+ var _tmpl$330 = /* @__PURE__ */ template(`<input type=text class=app-admin-input>`);
9456
+ var _tmpl$423 = /* @__PURE__ */ template(`<input type=number class=app-admin-input>`);
9122
9457
  var _tmpl$520 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-primary"style="font-size:0.75rem;padding:0.25rem 0.625rem">`);
9123
9458
  var _tmpl$618 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-ghost"style="font-size:0.75rem;padding:0.25rem 0.625rem;margin-left:0.5rem">Cancel`);
9124
9459
  var _tmpl$716 = /* @__PURE__ */ template(`<tr><td data-label=ID style=font-family:monospace;font-size:0.875rem></td><td data-label=Name></td><td data-label=Order></td><td data-label=Actions>`);
@@ -9260,7 +9595,7 @@ function Categories() {
9260
9595
  return createComponent(LoadingSpinner, {});
9261
9596
  },
9262
9597
  get children() {
9263
- var _el$13 = _tmpl$101(), _el$14 = _el$13.firstChild, _el$15 = _el$14.firstChild, _el$16 = _el$15.firstChild, _el$17 = _el$16.firstChild, _el$18 = _el$17.nextSibling, _el$19 = _el$18.nextSibling; _el$19.nextSibling; var _el$21 = _el$15.nextSibling;
9598
+ var _el$13 = _tmpl$121(), _el$14 = _el$13.firstChild, _el$15 = _el$14.firstChild, _el$16 = _el$15.firstChild, _el$17 = _el$16.firstChild, _el$18 = _el$17.nextSibling, _el$19 = _el$18.nextSibling; _el$19.nextSibling; var _el$21 = _el$15.nextSibling;
9264
9599
  insert(_el$21, createComponent(For, {
9265
9600
  get each() {
9266
9601
  return categories() ?? [];
@@ -9282,7 +9617,7 @@ function Categories() {
9282
9617
  })();
9283
9618
  },
9284
9619
  get children() {
9285
- var _el$25 = _tmpl$325();
9620
+ var _el$25 = _tmpl$330();
9286
9621
  _el$25.$$input = (e) => updateEdit(c.id, "name", e.currentTarget.value);
9287
9622
  effect(() => _el$25.value = edits()[c.id].name);
9288
9623
  return _el$25;
@@ -9300,7 +9635,7 @@ function Categories() {
9300
9635
  })();
9301
9636
  },
9302
9637
  get children() {
9303
- var _el$27 = _tmpl$421();
9638
+ var _el$27 = _tmpl$423();
9304
9639
  _el$27.$$input = (e) => updateEdit(c.id, "order", e.currentTarget.value);
9305
9640
  effect(() => _el$27.value = edits()[c.id].order);
9306
9641
  return _el$27;
@@ -9390,20 +9725,20 @@ function datetimeLocalToIso(value) {
9390
9725
  return new Date(value).toISOString();
9391
9726
  }
9392
9727
  var LIVE_SUBSCRIPTION_STATUSES = /* @__PURE__ */ new Set(["active", "paused", "past_due"]);
9393
- var _tmpl$109 = /* @__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`);
9728
+ var _tmpl$128 = /* @__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`);
9394
9729
  var _tmpl$240 = /* @__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`);
9395
- var _tmpl$326 = /* @__PURE__ */ template(`<p style=color:var(--app-admin-fg-muted);font-size:0.875rem>Could not load this customer's dashboard.`);
9396
- var _tmpl$422 = /* @__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">`);
9730
+ var _tmpl$331 = /* @__PURE__ */ template(`<p style=color:var(--app-admin-fg-muted);font-size:0.875rem>Could not load this customer's dashboard.`);
9731
+ var _tmpl$424 = /* @__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">`);
9397
9732
  var _tmpl$521 = /* @__PURE__ */ template(`<div><h3>Subscription`);
9398
9733
  var _tmpl$619 = /* @__PURE__ */ template(`<div style=display:flex;flex-direction:column;gap:0.5rem>`);
9399
9734
  var _tmpl$717 = /* @__PURE__ */ template(`<div><h3>Prescription requests`);
9400
9735
  var _tmpl$817 = /* @__PURE__ */ template(`<div><h3>Pending surveys`);
9401
9736
  var _tmpl$916 = /* @__PURE__ */ template(`<p style=color:var(--app-admin-fg-muted);font-size:0.875rem>No active subscription.`);
9402
9737
  var _tmpl$014 = /* @__PURE__ */ template(`<p style="font-size:0.75rem;color:var(--app-admin-fg-muted);margin:0.25rem 0 0">Next charge `);
9403
- var _tmpl$121 = /* @__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>`);
9738
+ var _tmpl$129 = /* @__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>`);
9404
9739
  var _tmpl$1010 = /* @__PURE__ */ template(`<p style="font-size:0.75rem;color:var(--app-admin-fg-muted);margin:0.25rem 0 0">`);
9405
9740
  var _tmpl$1112 = /* @__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`);
9406
- var _tmpl$128 = /* @__PURE__ */ template(`<p style=color:var(--app-admin-fg-muted);font-size:0.875rem>No prescription requests.`);
9741
+ var _tmpl$1210 = /* @__PURE__ */ template(`<p style=color:var(--app-admin-fg-muted);font-size:0.875rem>No prescription requests.`);
9407
9742
  var _tmpl$138 = /* @__PURE__ */ template(`<span style=font-size:0.75rem;color:var(--app-admin-fg-muted);margin-left:0.5rem>`);
9408
9743
  var _tmpl$148 = /* @__PURE__ */ template(`<span> \xB7 `);
9409
9744
  var _tmpl$158 = /* @__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>`);
@@ -9414,7 +9749,7 @@ function PatientDashboardPreview(props) {
9414
9749
  authToken: () => props.token
9415
9750
  });
9416
9751
  return (() => {
9417
- var _el$ = _tmpl$109(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$5 = _el$4.nextSibling, _el$6 = _el$3.nextSibling, _el$7 = _el$6.firstChild, _el$8 = _el$7.firstChild, _el$0 = _el$8.nextSibling; _el$0.nextSibling;
9752
+ var _el$ = _tmpl$128(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$5 = _el$4.nextSibling, _el$6 = _el$3.nextSibling, _el$7 = _el$6.firstChild, _el$8 = _el$7.firstChild, _el$0 = _el$8.nextSibling; _el$0.nextSibling;
9418
9753
  _el$.$$click = (e) => {
9419
9754
  if (e.target === e.currentTarget) props.onClose();
9420
9755
  };
@@ -9445,10 +9780,10 @@ function PatientDashboardPreview(props) {
9445
9780
  return data.profile();
9446
9781
  },
9447
9782
  get fallback() {
9448
- return _tmpl$326();
9783
+ return _tmpl$331();
9449
9784
  },
9450
9785
  children: (profile) => [(() => {
9451
- var _el$13 = _tmpl$422(), _el$14 = _el$13.firstChild, _el$15 = _el$14.nextSibling, _el$16 = _el$15.firstChild, _el$17 = _el$16.nextSibling;
9786
+ var _el$13 = _tmpl$424(), _el$14 = _el$13.firstChild, _el$15 = _el$14.nextSibling, _el$16 = _el$15.firstChild, _el$17 = _el$16.nextSibling;
9452
9787
  insert(_el$16, () => [profile().firstName, profile().lastName].filter(Boolean).join(" ") || "Member");
9453
9788
  insert(_el$17, () => profile().email);
9454
9789
  effect((_$p) => style(_el$14, panelSectionHeader, _$p));
@@ -9463,7 +9798,7 @@ function PatientDashboardPreview(props) {
9463
9798
  return _tmpl$916();
9464
9799
  },
9465
9800
  children: (sub) => (() => {
9466
- var _el$27 = _tmpl$121(), _el$28 = _el$27.firstChild, _el$29 = _el$28.firstChild;
9801
+ var _el$27 = _tmpl$129(), _el$28 = _el$27.firstChild, _el$29 = _el$28.firstChild;
9467
9802
  insert(_el$29, createComponent(Show, {
9468
9803
  get when() {
9469
9804
  return sub().amount != null;
@@ -9524,7 +9859,7 @@ function PatientDashboardPreview(props) {
9524
9859
  return (data.rxList() ?? []).length > 0;
9525
9860
  },
9526
9861
  get fallback() {
9527
- return _tmpl$128();
9862
+ return _tmpl$1210();
9528
9863
  },
9529
9864
  get children() {
9530
9865
  var _el$22 = _tmpl$619();
@@ -9606,20 +9941,20 @@ function PatientDashboardPreview(props) {
9606
9941
  delegateEvents(["click"]);
9607
9942
 
9608
9943
  // src/pages/admin/CustomerDetailPanel.tsx
9609
- var _tmpl$129 = /* @__PURE__ */ template(`<div class=app-admin-side-panel><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>Customer Details</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`);
9944
+ var _tmpl$130 = /* @__PURE__ */ template(`<div class=app-admin-side-panel><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>Customer Details</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`);
9610
9945
  var _tmpl$241 = /* @__PURE__ */ template(`<div style="display:flex;align-items:center;gap:0.5rem;margin:0.5rem 0 0"><input type=email aria-label="Customer email"class=app-admin-input style=flex:1;min-width:0><button type=button class="app-admin-btn app-admin-btn-primary"style="padding:0.25rem 0.625rem;font-size:0.75rem"></button><button type=button class="app-admin-btn app-admin-btn-ghost"style="padding:0.25rem 0.625rem;font-size:0.75rem">Cancel`);
9611
- var _tmpl$327 = /* @__PURE__ */ template(`<div style=margin-top:0.75rem><button type=button class="app-admin-btn app-admin-btn-ghost">`);
9612
- var _tmpl$423 = /* @__PURE__ */ template(`<div style="margin-bottom:1.5rem;padding-bottom:1.5rem;border-bottom:1px solid var(--app-admin-border)"><p style=font-weight:600;font-size:1rem;margin:0> </p><div style=display:flex;align-items:center;gap:0.75rem;margin-top:0.75rem><span style=font-size:0.75rem;color:var(--app-admin-fg-muted)>Joined </span></div><button type=button class="app-admin-btn app-admin-btn-ghost"style=margin-top:1rem>`);
9946
+ var _tmpl$333 = /* @__PURE__ */ template(`<div style=margin-top:0.75rem><button type=button class="app-admin-btn app-admin-btn-ghost">`);
9947
+ var _tmpl$425 = /* @__PURE__ */ template(`<div style="margin-bottom:1.5rem;padding-bottom:1.5rem;border-bottom:1px solid var(--app-admin-border)"><p style=font-weight:600;font-size:1rem;margin:0> </p><div style=display:flex;align-items:center;gap:0.75rem;margin-top:0.75rem><span style=font-size:0.75rem;color:var(--app-admin-fg-muted)>Joined </span></div><button type=button class="app-admin-btn app-admin-btn-ghost"style=margin-top:1rem>`);
9613
9948
  var _tmpl$522 = /* @__PURE__ */ template(`<div style=display:flex;flex-direction:column;gap:0.5rem>`);
9614
9949
  var _tmpl$620 = /* @__PURE__ */ template(`<div style=margin-bottom:1.5rem><h3>Subscriptions</h3><button type=button class="app-admin-btn app-admin-btn-ghost"title="Cancel any prescription request still awaiting prescriber review. Approved and completed prescriptions are untouched."style=margin-top:0.75rem>`);
9615
9950
  var _tmpl$718 = /* @__PURE__ */ template(`<div><h3>Payment History`);
9616
9951
  var _tmpl$818 = /* @__PURE__ */ template(`<div style="display:flex;align-items:center;gap:0.5rem;margin:0.25rem 0 0"><span style=font-size:0.875rem;color:var(--app-admin-fg-muted)></span><button type=button class="app-admin-btn app-admin-btn-ghost"style="padding:0.15rem 0.5rem;font-size:0.75rem">Edit`);
9617
9952
  var _tmpl$917 = /* @__PURE__ */ template(`<p style=color:var(--app-admin-fg-muted);font-size:0.875rem>No subscriptions.`);
9618
9953
  var _tmpl$015 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-danger">`);
9619
- var _tmpl$130 = /* @__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>/mo</span><span style=font-size:0.75rem;color:var(--app-admin-fg-muted);margin-left:0.5rem>ends </span></div><div style=display:flex;align-items:center;gap:0.5rem>`);
9954
+ var _tmpl$131 = /* @__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>/mo</span><span style=font-size:0.75rem;color:var(--app-admin-fg-muted);margin-left:0.5rem>ends </span></div><div style=display:flex;align-items:center;gap:0.5rem>`);
9620
9955
  var _tmpl$1011 = /* @__PURE__ */ template(`<p style=color:var(--app-admin-fg-muted);font-size:0.875rem>No payments.`);
9621
9956
  var _tmpl$1113 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-warning">`);
9622
- var _tmpl$1210 = /* @__PURE__ */ template(`<p class=app-admin-text-mono style="font-size:0.75rem;color:var(--app-admin-fg-muted);margin:0.25rem 0 0">`);
9957
+ var _tmpl$1211 = /* @__PURE__ */ template(`<p class=app-admin-text-mono style="font-size:0.75rem;color:var(--app-admin-fg-muted);margin:0.25rem 0 0">`);
9623
9958
  var _tmpl$139 = /* @__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><span style=font-size:0.75rem;color:var(--app-admin-fg-muted);margin-left:0.5rem></span></div><div style=display:flex;align-items:center;gap:0.5rem>`);
9624
9959
  function CustomerDetailPanel(props) {
9625
9960
  const [detail, {
@@ -9778,7 +10113,7 @@ Continue?`)) {
9778
10113
  }
9779
10114
  };
9780
10115
  return [(() => {
9781
- var _el$ = _tmpl$129(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$5 = _el$4.nextSibling;
10116
+ var _el$ = _tmpl$130(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$5 = _el$4.nextSibling;
9782
10117
  addEventListener(_el$5, "click", props.onClose, true);
9783
10118
  insert(_el$2, createComponent(Show, {
9784
10119
  get when() {
@@ -9796,7 +10131,7 @@ Continue?`)) {
9796
10131
  recentPayments: payments
9797
10132
  } = d;
9798
10133
  return [(() => {
9799
- var _el$6 = _tmpl$423(), _el$7 = _el$6.firstChild, _el$8 = _el$7.firstChild, _el$11 = _el$7.nextSibling, _el$12 = _el$11.firstChild; _el$12.firstChild; var _el$14 = _el$11.nextSibling;
10134
+ var _el$6 = _tmpl$425(), _el$7 = _el$6.firstChild, _el$8 = _el$7.firstChild, _el$11 = _el$7.nextSibling, _el$12 = _el$11.firstChild; _el$12.firstChild; var _el$14 = _el$11.nextSibling;
9800
10135
  insert(_el$7, () => c.firstName, _el$8);
9801
10136
  insert(_el$7, () => c.lastName, null);
9802
10137
  insert(_el$6, createComponent(Show, {
@@ -9845,7 +10180,7 @@ Continue?`)) {
9845
10180
  return props.passwordResetRedirectUrl;
9846
10181
  },
9847
10182
  get children() {
9848
- var _el$15 = _tmpl$327(), _el$16 = _el$15.firstChild;
10183
+ var _el$15 = _tmpl$333(), _el$16 = _el$15.firstChild;
9849
10184
  _el$16.$$click = handleSendReset;
9850
10185
  insert(_el$16, () => actionLoading() === "send-reset" ? "Sending\u2026" : "Send password reset");
9851
10186
  effect(() => _el$16.disabled = actionLoading() === "send-reset");
@@ -9868,7 +10203,7 @@ Continue?`)) {
9868
10203
  insert(_el$19, createComponent(For, {
9869
10204
  each: subs,
9870
10205
  children: (sub) => (() => {
9871
- var _el$28 = _tmpl$130(), _el$29 = _el$28.firstChild, _el$30 = _el$29.firstChild, _el$31 = _el$30.firstChild, _el$32 = _el$31.firstChild, _el$33 = _el$31.nextSibling; _el$33.firstChild; var _el$35 = _el$30.nextSibling;
10206
+ var _el$28 = _tmpl$131(), _el$29 = _el$28.firstChild, _el$30 = _el$29.firstChild, _el$31 = _el$30.firstChild, _el$32 = _el$31.firstChild, _el$33 = _el$31.nextSibling; _el$33.firstChild; var _el$35 = _el$30.nextSibling;
9872
10207
  insert(_el$31, () => centsToUsd(sub.amountCents), _el$32);
9873
10208
  insert(_el$33, () => fmtDate(sub.currentPeriodEnd), null);
9874
10209
  insert(_el$35, createComponent(StatusBadge, {
@@ -9945,7 +10280,7 @@ Continue?`)) {
9945
10280
  return payment.transactionId;
9946
10281
  },
9947
10282
  get children() {
9948
- var _el$45 = _tmpl$1210();
10283
+ var _el$45 = _tmpl$1211();
9949
10284
  insert(_el$45, () => payment.transactionId);
9950
10285
  return _el$45;
9951
10286
  }
@@ -9980,9 +10315,9 @@ Continue?`)) {
9980
10315
  delegateEvents(["click", "input"]);
9981
10316
 
9982
10317
  // src/pages/admin/Customers.tsx
9983
- var _tmpl$131 = /* @__PURE__ */ template(`<div class=app-admin-card style=overflow:hidden><table class=app-admin-table><thead><tr><th>Name</th><th>Email</th><th>Status</th><th>Subscription</th><th>Joined</th></tr></thead><tbody>`);
10318
+ var _tmpl$140 = /* @__PURE__ */ template(`<div class=app-admin-card style=overflow:hidden><table class=app-admin-table><thead><tr><th>Name</th><th>Email</th><th>Status</th><th>Subscription</th><th>Joined</th></tr></thead><tbody>`);
9984
10319
  var _tmpl$245 = /* @__PURE__ */ template(`<div style=display:flex;height:100%><div style="flex:1;min-width:0;transition:margin 0.2s"><div style=margin-bottom:1.25rem;max-width:24rem><input type=text placeholder="Search by email\u2026"class=app-admin-input>`);
9985
- var _tmpl$328 = /* @__PURE__ */ template(`<tr><td data-label=Name style=font-weight:500> </td><td data-label=Email class=app-admin-text-muted></td><td data-label=Status></td><td data-label=Subscription></td><td data-label=Joined class=app-admin-text-muted>`);
10320
+ var _tmpl$334 = /* @__PURE__ */ template(`<tr><td data-label=Name style=font-weight:500> </td><td data-label=Email class=app-admin-text-muted></td><td data-label=Status></td><td data-label=Subscription></td><td data-label=Joined class=app-admin-text-muted>`);
9986
10321
  function Customers(props = {}) {
9987
10322
  const [search, setSearch] = createSignal("");
9988
10323
  const [searchParam, setSearchParam] = createSignal("");
@@ -10019,13 +10354,13 @@ function Customers(props = {}) {
10019
10354
  return createComponent(LoadingSpinner, {});
10020
10355
  },
10021
10356
  get children() {
10022
- var _el$5 = _tmpl$131(), _el$6 = _el$5.firstChild, _el$7 = _el$6.firstChild, _el$8 = _el$7.nextSibling;
10357
+ var _el$5 = _tmpl$140(), _el$6 = _el$5.firstChild, _el$7 = _el$6.firstChild, _el$8 = _el$7.nextSibling;
10023
10358
  insert(_el$8, createComponent(For, {
10024
10359
  get each() {
10025
10360
  return customers() ?? [];
10026
10361
  },
10027
10362
  children: (customer) => (() => {
10028
- var _el$9 = _tmpl$328(), _el$0 = _el$9.firstChild, _el$1 = _el$0.firstChild, _el$10 = _el$0.nextSibling, _el$11 = _el$10.nextSibling, _el$12 = _el$11.nextSibling, _el$13 = _el$12.nextSibling;
10363
+ var _el$9 = _tmpl$334(), _el$0 = _el$9.firstChild, _el$1 = _el$0.firstChild, _el$10 = _el$0.nextSibling, _el$11 = _el$10.nextSibling, _el$12 = _el$11.nextSibling, _el$13 = _el$12.nextSibling;
10029
10364
  _el$9.$$click = () => setSelectedUid(customer.uid);
10030
10365
  insert(_el$0, () => customer.firstName, _el$1);
10031
10366
  insert(_el$0, () => customer.lastName, null);
@@ -10078,10 +10413,10 @@ function Customers(props = {}) {
10078
10413
  })();
10079
10414
  }
10080
10415
  delegateEvents(["input", "click"]);
10081
- var _tmpl$140 = /* @__PURE__ */ template(`<div style="display:grid;gap:1.25rem;grid-template-columns:repeat(auto-fit, minmax(220px, 1fr))">`);
10416
+ var _tmpl$141 = /* @__PURE__ */ template(`<div style="display:grid;gap:1.25rem;grid-template-columns:repeat(auto-fit, minmax(220px, 1fr))">`);
10082
10417
  var _tmpl$246 = /* @__PURE__ */ template(`<div>`);
10083
- var _tmpl$329 = /* @__PURE__ */ template(`<span style="display:block;font-size:0.875rem;color:var(--app-admin-fg-muted);margin:0 0 0.5rem">`);
10084
- var _tmpl$424 = /* @__PURE__ */ template(`<span class=app-admin-heading style=display:block;font-size:1.875rem;margin:0>`);
10418
+ var _tmpl$335 = /* @__PURE__ */ template(`<span style="display:block;font-size:0.875rem;color:var(--app-admin-fg-muted);margin:0 0 0.5rem">`);
10419
+ var _tmpl$426 = /* @__PURE__ */ template(`<span class=app-admin-heading style=display:block;font-size:1.875rem;margin:0>`);
10085
10420
  function Dashboard(props) {
10086
10421
  const [stats] = createResource(async () => {
10087
10422
  try {
@@ -10138,7 +10473,7 @@ function Dashboard(props) {
10138
10473
  });
10139
10474
  },
10140
10475
  get children() {
10141
- var _el$2 = _tmpl$140();
10476
+ var _el$2 = _tmpl$141();
10142
10477
  insert(_el$2, createComponent(For, {
10143
10478
  get each() {
10144
10479
  return cards();
@@ -10169,11 +10504,11 @@ function Dashboard(props) {
10169
10504
  },
10170
10505
  get children() {
10171
10506
  return [(() => {
10172
- var _el$3 = _tmpl$329();
10507
+ var _el$3 = _tmpl$335();
10173
10508
  insert(_el$3, () => card.label);
10174
10509
  return _el$3;
10175
10510
  })(), (() => {
10176
- var _el$4 = _tmpl$424();
10511
+ var _el$4 = _tmpl$426();
10177
10512
  insert(_el$4, () => card.value);
10178
10513
  effect((_$p) => setStyleProperty(_el$4, "color", card.tint));
10179
10514
  return _el$4;
@@ -10190,9 +10525,9 @@ function Dashboard(props) {
10190
10525
  return _el$;
10191
10526
  })();
10192
10527
  }
10193
- var _tmpl$141 = /* @__PURE__ */ template(`<div style="color:var(--admin-text-muted, #64748b);font-size:14px">Connected<!> \xB7 `);
10528
+ var _tmpl$149 = /* @__PURE__ */ template(`<div style="color:var(--admin-text-muted, #64748b);font-size:14px">Connected<!> \xB7 `);
10194
10529
  var _tmpl$247 = /* @__PURE__ */ template(`<div style="display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px 20px;border:1px solid var(--admin-border, #e2e8f0);border-radius:10px;margin-bottom:20px;background:var(--admin-surface, #fff)"><div><div style=font-weight:600>QuickBooks Payments</div></div><button class="btn btn-primary">`);
10195
- var _tmpl$330 = /* @__PURE__ */ template(`<div style="color:var(--admin-text-muted, #64748b);font-size:14px">Not connected \u2014 connect your QuickBooks account to accept payments.`);
10530
+ var _tmpl$336 = /* @__PURE__ */ template(`<div style="color:var(--admin-text-muted, #64748b);font-size:14px">Not connected \u2014 connect your QuickBooks account to accept payments.`);
10196
10531
  function QuickBooksCard() {
10197
10532
  const [status, {
10198
10533
  refetch
@@ -10236,10 +10571,10 @@ function QuickBooksCard() {
10236
10571
  return status()?.connected;
10237
10572
  },
10238
10573
  get fallback() {
10239
- return _tmpl$330();
10574
+ return _tmpl$336();
10240
10575
  },
10241
10576
  get children() {
10242
- var _el$4 = _tmpl$141(), _el$5 = _el$4.firstChild, _el$7 = _el$5.nextSibling; _el$7.nextSibling;
10577
+ var _el$4 = _tmpl$149(), _el$5 = _el$4.firstChild, _el$7 = _el$5.nextSibling; _el$7.nextSibling;
10243
10578
  insert(_el$4, (() => {
10244
10579
  var _c$ = memo(() => !!status()?.realmId);
10245
10580
  return () => _c$() ? ` \xB7 company ${status().realmId}` : "";
@@ -10261,10 +10596,10 @@ function QuickBooksCard() {
10261
10596
  delegateEvents(["click"]);
10262
10597
 
10263
10598
  // src/pages/admin/Payments.tsx
10264
- var _tmpl$149 = /* @__PURE__ */ template(`<div class=app-admin-card style=overflow:hidden><table class=app-admin-table><thead><tr><th>Date</th><th>Customer</th><th>Amount</th><th>Status</th><th>Transaction ID</th><th style=width:6rem>Actions</th></tr></thead><tbody>`);
10599
+ var _tmpl$150 = /* @__PURE__ */ template(`<div class=app-admin-card style=overflow:hidden><table class=app-admin-table><thead><tr><th>Date</th><th>Customer</th><th>Amount</th><th>Status</th><th>Transaction ID</th><th style=width:6rem>Actions</th></tr></thead><tbody>`);
10265
10600
  var _tmpl$248 = /* @__PURE__ */ template(`<div style=display:flex;height:100%><div style="flex:1;min-width:0;transition:margin 0.2s">`);
10266
- var _tmpl$331 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-warning">`);
10267
- var _tmpl$425 = /* @__PURE__ */ template(`<tr><td data-label=Date class=app-admin-text-muted></td><td data-label=Customer style=font-weight:500></td><td data-label=Amount></td><td data-label=Status></td><td data-label="Transaction ID"class="app-admin-text-mono app-admin-text-muted"style=font-size:0.75rem></td><td data-label=Actions>`);
10601
+ var _tmpl$337 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-warning">`);
10602
+ var _tmpl$427 = /* @__PURE__ */ template(`<tr><td data-label=Date class=app-admin-text-muted></td><td data-label=Customer style=font-weight:500></td><td data-label=Amount></td><td data-label=Status></td><td data-label="Transaction ID"class="app-admin-text-mono app-admin-text-muted"style=font-size:0.75rem></td><td data-label=Actions>`);
10268
10603
  function Payments() {
10269
10604
  const [refreshKey, setRefreshKey] = createSignal(0);
10270
10605
  const [selectedUid, setSelectedUid] = createSignal(null);
@@ -10346,13 +10681,13 @@ Cancel = refund only (billing continues)`);
10346
10681
  return createComponent(LoadingSpinner, {});
10347
10682
  },
10348
10683
  get children() {
10349
- var _el$3 = _tmpl$149(), _el$4 = _el$3.firstChild, _el$5 = _el$4.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$6.firstChild, _el$8 = _el$7.nextSibling, _el$9 = _el$8.nextSibling, _el$0 = _el$9.nextSibling, _el$1 = _el$0.nextSibling; _el$1.nextSibling; var _el$11 = _el$5.nextSibling;
10684
+ var _el$3 = _tmpl$150(), _el$4 = _el$3.firstChild, _el$5 = _el$4.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$6.firstChild, _el$8 = _el$7.nextSibling, _el$9 = _el$8.nextSibling, _el$0 = _el$9.nextSibling, _el$1 = _el$0.nextSibling; _el$1.nextSibling; var _el$11 = _el$5.nextSibling;
10350
10685
  insert(_el$11, createComponent(For, {
10351
10686
  get each() {
10352
10687
  return payments() ?? [];
10353
10688
  },
10354
10689
  children: (payment) => (() => {
10355
- var _el$12 = _tmpl$425(), _el$13 = _el$12.firstChild, _el$14 = _el$13.nextSibling, _el$15 = _el$14.nextSibling, _el$16 = _el$15.nextSibling, _el$17 = _el$16.nextSibling, _el$18 = _el$17.nextSibling;
10690
+ var _el$12 = _tmpl$427(), _el$13 = _el$12.firstChild, _el$14 = _el$13.nextSibling, _el$15 = _el$14.nextSibling, _el$16 = _el$15.nextSibling, _el$17 = _el$16.nextSibling, _el$18 = _el$17.nextSibling;
10356
10691
  _el$12.$$click = () => setSelectedUid(payment.customerUid);
10357
10692
  insert(_el$13, () => fmtDate(payment.date));
10358
10693
  insert(_el$14, () => payment.customerEmail);
@@ -10369,7 +10704,7 @@ Cancel = refund only (billing continues)`);
10369
10704
  return payment.status === "succeeded";
10370
10705
  },
10371
10706
  get children() {
10372
- var _el$19 = _tmpl$331();
10707
+ var _el$19 = _tmpl$337();
10373
10708
  _el$19.$$click = () => handleRefund(payment);
10374
10709
  insert(_el$19, () => actionLoading() === payment.id ? "..." : "Refund");
10375
10710
  effect(() => _el$19.disabled = actionLoading() === payment.id);
@@ -10432,23 +10767,23 @@ async function loadApexDrugs() {
10432
10767
  }
10433
10768
 
10434
10769
  // src/pages/admin/Products.tsx
10435
- var _tmpl$150 = /* @__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">`);
10770
+ var _tmpl$151 = /* @__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">`);
10436
10771
  var _tmpl$249 = /* @__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`);
10437
- var _tmpl$333 = /* @__PURE__ */ template(`<div style=margin-bottom:1.25rem><input type=file accept=image/* style=display:none>`);
10438
- var _tmpl$426 = /* @__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>`);
10772
+ var _tmpl$338 = /* @__PURE__ */ template(`<div style=margin-bottom:1.25rem><input type=file accept=image/* style=display:none>`);
10773
+ var _tmpl$428 = /* @__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>`);
10439
10774
  var _tmpl$523 = /* @__PURE__ */ template(`<option value>`);
10440
10775
  var _tmpl$621 = /* @__PURE__ */ template(`<option>`);
10441
10776
  var _tmpl$719 = /* @__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`);
10442
10777
  var _tmpl$819 = /* @__PURE__ */ template(`<div style="display:grid;grid-template-columns:repeat(2, minmax(0, 1fr));gap:0.375rem 0.75rem">`);
10443
10778
  var _tmpl$918 = /* @__PURE__ */ template(`<select class=app-admin-input><option value>None (use Apex default)`);
10444
10779
  var _tmpl$016 = /* @__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 dose (no fixed SKU sent)`);
10445
- var _tmpl$151 = /* @__PURE__ */ template(`<div style=margin-top:0.5rem><label class=app-admin-label>Bound SKU</label><select class=app-admin-input>`);
10780
+ var _tmpl$159 = /* @__PURE__ */ template(`<div style=margin-top:0.5rem><label class=app-admin-label>Bound SKU</label><select class=app-admin-input>`);
10446
10781
  var _tmpl$1012 = /* @__PURE__ */ template(`<div><label class=app-admin-label>Pharmacy SKU binding</label><p style="font-size:0.6875rem;color:var(--app-admin-fg-muted);margin:0.375rem 0 0.5rem;line-height:1.4">Bind each dose to a specific Apex SKU so the exact product is sent to the pharmacy \u2014 no fuzzy label matching. Turn on \u201CPrescriber picks\u201D for a titration product with no fixed SKU at order time.`);
10447
10782
  var _tmpl$1114 = /* @__PURE__ */ template(`<div style=display:flex;flex-direction:column;gap:0.625rem>`);
10448
- var _tmpl$1211 = /* @__PURE__ */ template(`<div><label class=app-admin-label>Available doses &amp; pricing</label><p style="font-size:0.6875rem;color:var(--app-admin-fg-muted);margin:0.375rem 0 0.5rem;line-height:1.4">Doses come from the linked Apex drug. Leave a price blank to charge the base price<!>.`);
10783
+ var _tmpl$1212 = /* @__PURE__ */ template(`<div><label class=app-admin-label>Available doses &amp; pricing</label><p style="font-size:0.6875rem;color:var(--app-admin-fg-muted);margin:0.375rem 0 0.5rem;line-height:1.4">Doses come from the linked Apex drug. Leave a price blank to charge the base price<!>.`);
10449
10784
  var _tmpl$1310 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-ghost"title="Reset this product's fields to the built-in defaults">Reset to defaults`);
10450
10785
  var _tmpl$1410 = /* @__PURE__ */ template(`<div class="app-admin-side-panel app-admin-side-panel--narrow"><div style=padding:1.5rem><div style=display:flex;align-items:center;justify-content:space-between;margin-bottom:1.5rem><h2 class=app-admin-heading style=font-size:1.125rem;margin:0>Edit Product</h2><button type=button class="app-admin-btn app-admin-btn-ghost"style="border:none;padding:0.25rem 0.5rem;font-size:1.25rem">\xD7</button></div><div class="app-admin-text-mono app-admin-text-muted"style="font-size:0.75rem;background:var(--app-admin-surface-light);padding:0.25rem 0.5rem;border-radius:var(--app-admin-radius-sm);margin-bottom:1.5rem">Drug ID: </div><div style=display:flex;flex-direction:column;gap:1rem><div><label class=app-admin-label>Name</label><input type=text class=app-admin-input></div><div><label class=app-admin-label>Description</label><textarea rows=3 class=app-admin-input style=resize:vertical></textarea></div><div><label class=app-admin-label>Price ($)</label><input type=number step=0.01 class=app-admin-input></div><div><label style=display:flex;align-items:center;gap:0.5rem;font-size:0.875rem;cursor:pointer><input type=checkbox><span>Featured product</span></label></div><div><label class=app-admin-label>Categories</label></div><div><label class=app-admin-label>Pricing Mode</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"></p></div><div><label class=app-admin-label>Default Dosage</label></div><div><label class=app-admin-label>Benefits (one per line)</label><textarea rows=4 class=app-admin-input style=resize:vertical></textarea></div><div 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>`);
10451
- var _tmpl$159 = /* @__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.`);
10786
+ var _tmpl$1510 = /* @__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.`);
10452
10787
  var _tmpl$169 = /* @__PURE__ */ template(`<label style=display:flex;align-items:center;gap:0.5rem;font-size:0.875rem;cursor:pointer><input type=checkbox><span>`);
10453
10788
  var _tmpl$179 = /* @__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>`);
10454
10789
  var _tmpl$187 = /* @__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`);
@@ -10510,7 +10845,7 @@ function ThumbnailUpload(props) {
10510
10845
  }
10511
10846
  };
10512
10847
  return (() => {
10513
- var _el$ = _tmpl$333(), _el$2 = _el$.firstChild;
10848
+ var _el$ = _tmpl$338(), _el$2 = _el$.firstChild;
10514
10849
  _el$2.addEventListener("change", (e) => {
10515
10850
  const file = e.currentTarget.files?.[0];
10516
10851
  if (file) handleFile(file);
@@ -10523,7 +10858,7 @@ function ThumbnailUpload(props) {
10523
10858
  return error();
10524
10859
  },
10525
10860
  get children() {
10526
- var _el$3 = _tmpl$150();
10861
+ var _el$3 = _tmpl$151();
10527
10862
  insert(_el$3, error);
10528
10863
  return _el$3;
10529
10864
  }
@@ -10534,7 +10869,7 @@ function ThumbnailUpload(props) {
10534
10869
  },
10535
10870
  get fallback() {
10536
10871
  return (() => {
10537
- var _el$9 = _tmpl$426(), _el$0 = _el$9.firstChild, _el$1 = _el$0.nextSibling;
10872
+ var _el$9 = _tmpl$428(), _el$0 = _el$9.firstChild, _el$1 = _el$0.nextSibling;
10538
10873
  _el$9.$$click = () => fileInput.click();
10539
10874
  insert(_el$1, () => uploading() ? "Uploading\u2026" : "Add thumbnail");
10540
10875
  effect(() => _el$9.disabled = uploading());
@@ -10755,7 +11090,7 @@ function ProductEditPanel(props) {
10755
11090
  return props.availableCategories.length > 0;
10756
11091
  },
10757
11092
  get fallback() {
10758
- return _tmpl$159();
11093
+ return _tmpl$1510();
10759
11094
  },
10760
11095
  get children() {
10761
11096
  var _el$35 = _tmpl$819();
@@ -10867,7 +11202,7 @@ function ProductEditPanel(props) {
10867
11202
  return memo(() => !!!prescriberPicks())() && pricingMode() === "flat_fee";
10868
11203
  },
10869
11204
  get children() {
10870
- var _el$49 = _tmpl$151(), _el$50 = _el$49.firstChild, _el$51 = _el$50.nextSibling;
11205
+ var _el$49 = _tmpl$159(), _el$50 = _el$49.firstChild, _el$51 = _el$50.nextSibling;
10871
11206
  _el$51.addEventListener("change", (e) => setProductSkuId(e.currentTarget.value));
10872
11207
  insert(_el$51, createComponent(SkuSelectOptions, {
10873
11208
  get skus() {
@@ -10889,7 +11224,7 @@ function ProductEditPanel(props) {
10889
11224
  return pricingMode() === "per_dose";
10890
11225
  },
10891
11226
  get children() {
10892
- var _el$52 = _tmpl$1211(), _el$53 = _el$52.firstChild, _el$54 = _el$53.nextSibling, _el$55 = _el$54.firstChild, _el$57 = _el$55.nextSibling; _el$57.nextSibling;
11227
+ var _el$52 = _tmpl$1212(), _el$53 = _el$52.firstChild, _el$54 = _el$53.nextSibling, _el$55 = _el$54.firstChild, _el$57 = _el$55.nextSibling; _el$57.nextSibling;
10893
11228
  insert(_el$54, (() => {
10894
11229
  var _c$ = memo(() => !!price());
10895
11230
  return () => _c$() ? ` ($${price()})` : "";
@@ -11231,8 +11566,8 @@ function Products(props) {
11231
11566
  delegateEvents(["click", "input"]);
11232
11567
  var _tmpl$160 = /* @__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">`);
11233
11568
  var _tmpl$250 = /* @__PURE__ */ template(`<input type=number min=1 placeholder="Number of rebills"class=app-admin-input style=margin-top:0.5rem>`);
11234
- var _tmpl$334 = /* @__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>`);
11235
- var _tmpl$427 = /* @__PURE__ */ template(`<div style=color:var(--app-admin-fg-muted);font-size:0.875rem;padding:0.5rem>No products available.`);
11569
+ var _tmpl$339 = /* @__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>`);
11570
+ var _tmpl$429 = /* @__PURE__ */ template(`<div style=color:var(--app-admin-fg-muted);font-size:0.875rem;padding:0.5rem>No products available.`);
11236
11571
  var _tmpl$524 = /* @__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>`);
11237
11572
  var _tmpl$622 = /* @__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>`);
11238
11573
  var _tmpl$720 = /* @__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`);
@@ -11297,7 +11632,7 @@ function SaleEditPanel(props) {
11297
11632
  }
11298
11633
  };
11299
11634
  return (() => {
11300
- var _el$ = _tmpl$334(), _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;
11635
+ var _el$ = _tmpl$339(), _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;
11301
11636
  insert(_el$4, () => editing() ? "Edit Sale" : "New Sale");
11302
11637
  addEventListener(_el$5, "click", props.onClose, true);
11303
11638
  insert(_el$2, createComponent(Show, {
@@ -11321,7 +11656,7 @@ function SaleEditPanel(props) {
11321
11656
  return props.products.length > 0;
11322
11657
  },
11323
11658
  get fallback() {
11324
- return _tmpl$427();
11659
+ return _tmpl$429();
11325
11660
  },
11326
11661
  get children() {
11327
11662
  return createComponent(For, {
@@ -11495,8 +11830,8 @@ function Sales() {
11495
11830
  delegateEvents(["click", "input"]);
11496
11831
  var _tmpl$161 = /* @__PURE__ */ template(`<div class=app-admin-card style=overflow:hidden><table class=app-admin-table><thead><tr><th>Customer</th><th>Amount</th><th>Status</th><th>Current Period End</th><th>Created</th><th style=width:6rem>Actions</th></tr></thead><tbody>`);
11497
11832
  var _tmpl$251 = /* @__PURE__ */ template(`<div style=display:flex;height:100%><div style="flex:1;min-width:0;transition:margin 0.2s">`);
11498
- var _tmpl$335 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-danger">`);
11499
- var _tmpl$428 = /* @__PURE__ */ template(`<tr><td data-label=Customer style=font-weight:500></td><td data-label=Amount></td><td data-label=Status></td><td data-label="Current period end"class=app-admin-text-muted></td><td data-label=Created class=app-admin-text-muted></td><td data-label=Actions>`);
11833
+ var _tmpl$340 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-danger">`);
11834
+ var _tmpl$430 = /* @__PURE__ */ template(`<tr><td data-label=Customer style=font-weight:500></td><td data-label=Amount></td><td data-label=Status></td><td data-label="Current period end"class=app-admin-text-muted></td><td data-label=Created class=app-admin-text-muted></td><td data-label=Actions>`);
11500
11835
  function Subscriptions() {
11501
11836
  const [refreshKey, setRefreshKey] = createSignal(0);
11502
11837
  const [selectedUid, setSelectedUid] = createSignal(null);
@@ -11542,7 +11877,7 @@ function Subscriptions() {
11542
11877
  return subscriptions() ?? [];
11543
11878
  },
11544
11879
  children: (sub) => (() => {
11545
- var _el$12 = _tmpl$428(), _el$13 = _el$12.firstChild, _el$14 = _el$13.nextSibling, _el$15 = _el$14.nextSibling, _el$16 = _el$15.nextSibling, _el$17 = _el$16.nextSibling, _el$18 = _el$17.nextSibling;
11880
+ var _el$12 = _tmpl$430(), _el$13 = _el$12.firstChild, _el$14 = _el$13.nextSibling, _el$15 = _el$14.nextSibling, _el$16 = _el$15.nextSibling, _el$17 = _el$16.nextSibling, _el$18 = _el$17.nextSibling;
11546
11881
  _el$12.$$click = () => setSelectedUid(sub.customerUid);
11547
11882
  insert(_el$13, () => sub.customerEmail);
11548
11883
  insert(_el$14, () => centsToUsd(sub.amountCents));
@@ -11559,7 +11894,7 @@ function Subscriptions() {
11559
11894
  return sub.status === "active" || sub.status === "paused";
11560
11895
  },
11561
11896
  get children() {
11562
- var _el$19 = _tmpl$335();
11897
+ var _el$19 = _tmpl$340();
11563
11898
  _el$19.$$click = () => handleCancel(sub.id);
11564
11899
  insert(_el$19, () => actionLoading() === sub.id ? "..." : "Cancel");
11565
11900
  effect(() => _el$19.disabled = actionLoading() === sub.id);
@@ -11601,8 +11936,8 @@ function Subscriptions() {
11601
11936
  delegateEvents(["click"]);
11602
11937
  var _tmpl$170 = /* @__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);
11603
11938
  var _tmpl$256 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-ghost"style=margin-top:0.5rem;font-size:0.75rem>\u{1F4CE} `);
11604
- var _tmpl$336 = /* @__PURE__ */ template(`<p style=margin:0;white-space:pre-wrap;line-height:1.5>`);
11605
- var _tmpl$429 = /* @__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>`);
11939
+ var _tmpl$341 = /* @__PURE__ */ template(`<p style=margin:0;white-space:pre-wrap;line-height:1.5>`);
11940
+ var _tmpl$431 = /* @__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>`);
11606
11941
  var _tmpl$525 = /* @__PURE__ */ template(`<p class=app-admin-text-muted role=alert style=color:var(--app-admin-danger-fg)>`);
11607
11942
  var _tmpl$623 = /* @__PURE__ */ template(`<div><div style=display:flex;gap:0.5rem;margin-bottom:1rem;flex-wrap:wrap></div><div style="display:grid;grid-template-columns:minmax(0, 1fr) minmax(0, 1.6fr);gap:1rem"><div class=app-admin-card style=overflow:hidden;padding:0></div><div class=app-admin-card style=padding:1.25rem>`);
11608
11943
  var _tmpl$721 = /* @__PURE__ */ template(`<button type=button>`);
@@ -11809,7 +12144,7 @@ function Support() {
11809
12144
  const Bubble = (p) => {
11810
12145
  const fromSupport = () => p.msg.sender === "support";
11811
12146
  return (() => {
11812
- var _el$5 = _tmpl$429(), _el$6 = _el$5.firstChild, _el$7 = _el$6.firstChild, _el$8 = _el$7.nextSibling;
12147
+ var _el$5 = _tmpl$431(), _el$6 = _el$5.firstChild, _el$7 = _el$6.firstChild, _el$8 = _el$7.nextSibling;
11813
12148
  insert(_el$7, () => fromSupport() ? "Support" : "Customer");
11814
12149
  insert(_el$8, () => formatWhen(p.msg.createdAt));
11815
12150
  insert(_el$5, createComponent(Show, {
@@ -11817,7 +12152,7 @@ function Support() {
11817
12152
  return p.msg.body;
11818
12153
  },
11819
12154
  get children() {
11820
- var _el$9 = _tmpl$336();
12155
+ var _el$9 = _tmpl$341();
11821
12156
  insert(_el$9, () => p.msg.body);
11822
12157
  return _el$9;
11823
12158
  }
@@ -12046,8 +12381,8 @@ function Support() {
12046
12381
  delegateEvents(["click", "input", "keydown"]);
12047
12382
  var _tmpl$180 = /* @__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>`);
12048
12383
  var _tmpl$257 = /* @__PURE__ */ template(`<div>`);
12049
- var _tmpl$337 = /* @__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`);
12050
- var _tmpl$430 = /* @__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>`);
12384
+ var _tmpl$343 = /* @__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`);
12385
+ var _tmpl$432 = /* @__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>`);
12051
12386
  function Webhooks() {
12052
12387
  const [expanded, setExpanded] = createSignal(null);
12053
12388
  const [webhooks] = createResource(async () => {
@@ -12082,7 +12417,7 @@ function Webhooks() {
12082
12417
  return webhooks() ?? [];
12083
12418
  },
12084
12419
  children: (event) => [(() => {
12085
- var _el$10 = _tmpl$337(), _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;
12420
+ var _el$10 = _tmpl$343(), _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;
12086
12421
  _el$10.$$click = () => toggleExpand(String(event.id));
12087
12422
  insert(_el$11, () => event.date);
12088
12423
  insert(_el$12, () => event.provider || "Authorize.Net");
@@ -12099,7 +12434,7 @@ function Webhooks() {
12099
12434
  return expanded() === String(event.id);
12100
12435
  },
12101
12436
  get children() {
12102
- var _el$17 = _tmpl$430(), _el$18 = _el$17.firstChild, _el$19 = _el$18.firstChild;
12437
+ var _el$17 = _tmpl$432(), _el$18 = _el$17.firstChild, _el$19 = _el$18.firstChild;
12103
12438
  insert(_el$19, (() => {
12104
12439
  var _c$ = memo(() => typeof event.payload === "string");
12105
12440
  return () => _c$() ? (() => {
@@ -12133,8 +12468,8 @@ function Webhooks() {
12133
12468
  delegateEvents(["click"]);
12134
12469
  var _tmpl$181 = /* @__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>`);
12135
12470
  var _tmpl$258 = /* @__PURE__ */ template(`<div>`);
12136
- var _tmpl$338 = /* @__PURE__ */ template(`<div class=app-admin-empty>No email templates configured.`);
12137
- var _tmpl$431 = /* @__PURE__ */ template(`<div style=margin-bottom:0.25rem><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>`);
12471
+ var _tmpl$344 = /* @__PURE__ */ template(`<div class=app-admin-empty>No email templates configured.`);
12472
+ var _tmpl$433 = /* @__PURE__ */ template(`<div style=margin-bottom:0.25rem><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>`);
12138
12473
  var _tmpl$526 = /* @__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">`);
12139
12474
  var _tmpl$624 = /* @__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>Insert placeholder<span style=font-weight:400;color:var(--app-admin-fg-muted)> &mdash; click a field, then a token</span></p><div style=display:flex;flex-wrap:wrap;gap:0.375rem>`);
12140
12475
  var _tmpl$722 = /* @__PURE__ */ template(`<button type=button style=margin-top:0.5rem;background:none;border:none;color:var(--app-admin-primary-soft-fg);cursor:pointer;font-size:0.8rem;font-weight:500>+ Add Paragraph`);
@@ -12361,7 +12696,7 @@ function EmailTemplates() {
12361
12696
  return templateKeys().length > 0;
12362
12697
  },
12363
12698
  get fallback() {
12364
- return _tmpl$338();
12699
+ return _tmpl$344();
12365
12700
  },
12366
12701
  get children() {
12367
12702
  var _el$2 = _tmpl$181(), _el$3 = _el$2.firstChild;
@@ -12370,7 +12705,7 @@ function EmailTemplates() {
12370
12705
  return categorizedKeys();
12371
12706
  },
12372
12707
  children: (group) => (() => {
12373
- var _el$5 = _tmpl$431(), _el$6 = _el$5.firstChild, _el$7 = _el$6.firstChild, _el$8 = _el$7.nextSibling;
12708
+ var _el$5 = _tmpl$433(), _el$6 = _el$5.firstChild, _el$7 = _el$6.firstChild, _el$8 = _el$7.nextSibling;
12374
12709
  _el$6.$$click = () => toggleCategory(group.label);
12375
12710
  insert(_el$7, () => group.label);
12376
12711
  insert(_el$8, () => collapsed()[group.label] ? "\u25B8" : "\u25BE");
@@ -12520,8 +12855,8 @@ function EmailTemplates() {
12520
12855
  delegateEvents(["click", "input", "mousedown"]);
12521
12856
  var _tmpl$189 = /* @__PURE__ */ template(`<div class=app-admin-card style="padding:1rem 1.25rem"><p style=font-size:0.8125rem;color:var(--app-admin-fg-muted);margin:0></p><p style="font-size:1.5rem;font-weight:600;margin:0.25rem 0 0">`);
12522
12857
  var _tmpl$259 = /* @__PURE__ */ template(`<p style="font-size:0.75rem;color:var(--app-admin-fg-muted);margin:0.25rem 0 0">`);
12523
- var _tmpl$339 = /* @__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>`);
12524
- var _tmpl$432 = /* @__PURE__ */ template(`<div class=app-admin-card style=margin-top:1.25rem>`);
12858
+ var _tmpl$345 = /* @__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>`);
12859
+ var _tmpl$434 = /* @__PURE__ */ template(`<div class=app-admin-card style=margin-top:1.25rem>`);
12525
12860
  var _tmpl$527 = /* @__PURE__ */ template(`<p style=color:var(--app-admin-danger-fg);font-size:0.8125rem;margin:0>`);
12526
12861
  var _tmpl$625 = /* @__PURE__ */ template(`<p style=color:var(--app-admin-success-fg);font-size:0.8125rem;margin:0>`);
12527
12862
  var _tmpl$723 = /* @__PURE__ */ template(`<div style="padding:1rem 1.25rem;display:grid;gap:0.875rem;max-width:34rem"><label style=display:flex;align-items:center;gap:0.625rem;cursor:pointer><input type=checkbox><span>Send recovery emails</span></label><label style=display:grid;gap:0.25rem><span style=font-size:0.8125rem;color:var(--app-admin-fg-muted)>Completed-survey reminders \u2014 hours after the survey was submitted (comma-separated)</span><input class=app-admin-input type=text placeholder="24, 72"></label><label style=display:grid;gap:0.25rem><span style=font-size:0.8125rem;color:var(--app-admin-fg-muted)>Mid-survey reminders \u2014 hours after last activity (comma-separated)</span><input class=app-admin-input type=text placeholder="4, 48"></label><div><button type=button class="app-admin-btn app-admin-btn--primary">`);
@@ -12531,10 +12866,10 @@ var _tmpl$019 = /* @__PURE__ */ template(`<div class=app-admin-card style=margin
12531
12866
  var _tmpl$190 = /* @__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>`);
12532
12867
  var _tmpl$1014 = /* @__PURE__ */ template(`<div class=app-admin-card style=margin-top:1.25rem;overflow:hidden><table class=app-admin-table><thead><tr><th>Track</th><th>Sent</th><th>Recovered</th></tr></thead><tbody><tr><td data-label=Track>Finish signup (completed surveys)</td><td data-label=Sent></td><td data-label=Recovered></td></tr><tr><td data-label=Track>Finish questionnaire (mid-survey)</td><td data-label=Sent></td><td data-label=Recovered></td></tr><tr><td data-label=Track class=app-admin-text-muted>Unsubscribes</td><td data-label=Count colspan=2>`);
12533
12868
  var _tmpl$1116 = /* @__PURE__ */ template(`<div style="display:grid;grid-template-columns:10rem 1fr 7rem;align-items:center;gap:0.75rem"><span style=font-size:0.8125rem;color:var(--app-admin-fg-muted)></span><div style=background:var(--app-admin-border-soft);border-radius:4px;height:1.125rem><div style=height:100%;background:var(--app-admin-primary);border-radius:4px></div></div><span style=font-size:0.8125rem;text-align:right><span style=color:var(--app-admin-fg-subtle);margin-left:0.375rem>`);
12534
- var _tmpl$1212 = /* @__PURE__ */ template(`<span style=font-size:0.6875rem;color:var(--app-admin-fg-muted)>`);
12869
+ var _tmpl$1213 = /* @__PURE__ */ template(`<span style=font-size:0.6875rem;color:var(--app-admin-fg-muted)>`);
12535
12870
  var _tmpl$1311 = /* @__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)>`);
12536
12871
  var _tmpl$1411 = /* @__PURE__ */ template(`<tr><td colspan=4>`);
12537
- var _tmpl$1510 = /* @__PURE__ */ template(`<tr><td data-label="Last seen"class=app-admin-text-muted></td><td data-label=Progress></td><td data-label=Email></td><td data-label=Reminders>`);
12872
+ var _tmpl$1511 = /* @__PURE__ */ template(`<tr><td data-label="Last seen"class=app-admin-text-muted></td><td data-label=Progress></td><td data-label=Email></td><td data-label=Reminders>`);
12538
12873
  var _tmpl$1610 = /* @__PURE__ */ template(`<span class=app-admin-text-muted>not captured`);
12539
12874
  var _tmpl$1710 = /* @__PURE__ */ template(`<tr><td colspan=5>`);
12540
12875
  var _tmpl$1810 = /* @__PURE__ */ template(`<tr><td data-label=Captured class=app-admin-text-muted></td><td data-label=Name></td><td data-label=Email></td><td data-label=Qualified></td><td data-label=Reminders>`);
@@ -12564,7 +12899,7 @@ function StatCard(props) {
12564
12899
  }
12565
12900
  function CardHeader(props) {
12566
12901
  return (() => {
12567
- var _el$4 = _tmpl$339(), _el$5 = _el$4.firstChild;
12902
+ var _el$4 = _tmpl$345(), _el$5 = _el$4.firstChild;
12568
12903
  insert(_el$5, () => props.title);
12569
12904
  insert(_el$4, createComponent(Show, {
12570
12905
  get when() {
@@ -12635,7 +12970,7 @@ function RecoverySettingsCard() {
12635
12970
  }
12636
12971
  };
12637
12972
  return (() => {
12638
- var _el$7 = _tmpl$432();
12973
+ var _el$7 = _tmpl$434();
12639
12974
  insert(_el$7, createComponent(CardHeader, {
12640
12975
  title: "Recovery email settings"
12641
12976
  }), null);
@@ -12821,7 +13156,7 @@ function Funnel() {
12821
13156
  return b.count > 0;
12822
13157
  },
12823
13158
  get children() {
12824
- var _el$57 = _tmpl$1212();
13159
+ var _el$57 = _tmpl$1213();
12825
13160
  insert(_el$57, () => b.count);
12826
13161
  return _el$57;
12827
13162
  }
@@ -12881,7 +13216,7 @@ function Funnel() {
12881
13216
  return abandons()?.sessions;
12882
13217
  },
12883
13218
  children: (sess) => (() => {
12884
- var _el$62 = _tmpl$1510(), _el$63 = _el$62.firstChild, _el$64 = _el$63.nextSibling, _el$65 = _el$64.nextSibling, _el$66 = _el$65.nextSibling;
13219
+ var _el$62 = _tmpl$1511(), _el$63 = _el$62.firstChild, _el$64 = _el$63.nextSibling, _el$65 = _el$64.nextSibling, _el$66 = _el$65.nextSibling;
12885
13220
  insert(_el$63, () => formatDate(sess.last_seen_at));
12886
13221
  insert(_el$64, (() => {
12887
13222
  var _c$3 = memo(() => !!(sess.last_step != null && sess.step_count));
@@ -12936,8 +13271,8 @@ delegateEvents(["input", "click"]);
12936
13271
  // src/pages/AdminDashboard.tsx
12937
13272
  var _tmpl$191 = /* @__PURE__ */ template(`<span style=font-size:1rem;opacity:0.7;flex-shrink:0>`);
12938
13273
  var _tmpl$260 = /* @__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">`);
12939
- var _tmpl$340 = /* @__PURE__ */ template(`<div class="app-admin-root app-admin-shell"style=position:sticky><div class=app-admin-shell-header><button type=button class=app-admin-shell-menu-trigger aria-label="Open admin menu"><svg width=22 height=22 viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round aria-hidden=true><line x1=3 y1=6 x2=21 y2=6></line><line x1=3 y1=12 x2=21 y2=12></line><line x1=3 y1=18 x2=21 y2=18></line></svg></button><span class=app-admin-shell-header-title></span></div><div class=app-admin-backdrop aria-hidden=true></div><aside class=app-admin-sidebar><div style=padding:1.25rem><h2 style="font-size:0.7rem;font-weight:500;color:var(--app-admin-fg-muted);text-transform:uppercase;letter-spacing:0.08em;margin:0 0 1rem">Admin Panel</h2><nav style=display:flex;flex-direction:column;gap:0.25rem></nav></div></aside><div class=app-admin-content>`);
12940
- var _tmpl$433 = /* @__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">`);
13274
+ var _tmpl$346 = /* @__PURE__ */ template(`<div class="app-admin-root app-admin-shell"style=position:sticky><div class=app-admin-shell-header><button type=button class=app-admin-shell-menu-trigger aria-label="Open admin menu"><svg width=22 height=22 viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round aria-hidden=true><line x1=3 y1=6 x2=21 y2=6></line><line x1=3 y1=12 x2=21 y2=12></line><line x1=3 y1=18 x2=21 y2=18></line></svg></button><span class=app-admin-shell-header-title></span></div><div class=app-admin-backdrop aria-hidden=true></div><aside class=app-admin-sidebar><div style=padding:1.25rem><h2 style="font-size:0.7rem;font-weight:500;color:var(--app-admin-fg-muted);text-transform:uppercase;letter-spacing:0.08em;margin:0 0 1rem">Admin Panel</h2><nav style=display:flex;flex-direction:column;gap:0.25rem></nav></div></aside><div class=app-admin-content>`);
13275
+ var _tmpl$435 = /* @__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">`);
12941
13276
  var _tmpl$528 = /* @__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`);
12942
13277
  var _tmpl$626 = /* @__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); } }`);
12943
13278
  var TAB_LABELS = {
@@ -13048,7 +13383,7 @@ function AdminDashboard(props) {
13048
13383
  });
13049
13384
  },
13050
13385
  get children() {
13051
- var _el$3 = _tmpl$340(), _el$4 = _el$3.firstChild, _el$5 = _el$4.firstChild, _el$6 = _el$5.nextSibling, _el$7 = _el$4.nextSibling, _el$8 = _el$7.nextSibling, _el$9 = _el$8.firstChild, _el$0 = _el$9.firstChild, _el$1 = _el$0.nextSibling, _el$10 = _el$8.nextSibling;
13386
+ var _el$3 = _tmpl$346(), _el$4 = _el$3.firstChild, _el$5 = _el$4.firstChild, _el$6 = _el$5.nextSibling, _el$7 = _el$4.nextSibling, _el$8 = _el$7.nextSibling, _el$9 = _el$8.firstChild, _el$0 = _el$9.firstChild, _el$1 = _el$0.nextSibling, _el$10 = _el$8.nextSibling;
13052
13387
  _el$5.$$click = () => setDrawerOpen(true);
13053
13388
  insert(_el$6, () => TAB_LABELS[currentTab()]);
13054
13389
  _el$7.$$click = () => setDrawerOpen(false);
@@ -13065,7 +13400,7 @@ function AdminDashboard(props) {
13065
13400
  return visibleGroups();
13066
13401
  },
13067
13402
  children: (group) => [(() => {
13068
- var _el$11 = _tmpl$433();
13403
+ var _el$11 = _tmpl$435();
13069
13404
  insert(_el$11, () => group.label);
13070
13405
  return _el$11;
13071
13406
  })(), createComponent(For, {
@@ -13257,7 +13592,7 @@ function AdminGateSpinner(props) {
13257
13592
  delegateEvents(["click"]);
13258
13593
  var _tmpl$198 = /* @__PURE__ */ template(`<div style=margin-bottom:1rem>`);
13259
13594
  var _tmpl$261 = /* @__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>`);
13260
- var _tmpl$341 = /* @__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.`);
13595
+ var _tmpl$347 = /* @__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.`);
13261
13596
  var LIVE = /* @__PURE__ */ new Set(["active", "paused", "past_due"]);
13262
13597
  function UpdatePaymentMethod(props) {
13263
13598
  const {
@@ -13287,7 +13622,7 @@ function UpdatePaymentMethod(props) {
13287
13622
  if (ok) props.onDone();
13288
13623
  }
13289
13624
  return (() => {
13290
- var _el$ = _tmpl$341(), _el$2 = _el$.firstChild;
13625
+ var _el$ = _tmpl$347(), _el$2 = _el$.firstChild;
13291
13626
  insert(_el$, createComponent(Heading, {
13292
13627
  level: 1,
13293
13628
  get children() {
@@ -13405,8 +13740,8 @@ function UpdatePaymentMethod(props) {
13405
13740
  }
13406
13741
  var _tmpl$199 = /* @__PURE__ */ template(`<a class=ship__track target=_blank rel="noopener noreferrer">Track<!> \u2197`);
13407
13742
  var _tmpl$266 = /* @__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>`);
13408
- var _tmpl$343 = /* @__PURE__ */ template(`<span class=refill__cycle>Day <!> of `);
13409
- var _tmpl$434 = /* @__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>`);
13743
+ var _tmpl$348 = /* @__PURE__ */ template(`<span class=refill__cycle>Day <!> of `);
13744
+ var _tmpl$436 = /* @__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>`);
13410
13745
  var _tmpl$529 = /* @__PURE__ */ template(`<span class=refill__cycle>Preparing your next fill`);
13411
13746
  var _tmpl$627 = /* @__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>`);
13412
13747
  var _tmpl$724 = /* @__PURE__ */ template(`<a class=refill__action>Complete check-in \u2192`);
@@ -13416,10 +13751,10 @@ var _tmpl$020 = /* @__PURE__ */ template(`<time class=thread__time>`);
13416
13751
  var _tmpl$1100 = /* @__PURE__ */ template(`<h2 class=thread__hero>`);
13417
13752
  var _tmpl$1015 = /* @__PURE__ */ template(`<p class=thread__caption>`);
13418
13753
  var _tmpl$1117 = /* @__PURE__ */ template(`<button type=button class="portal-btn portal-btn--primary thread__action">Message your care team`);
13419
- var _tmpl$1213 = /* @__PURE__ */ template(`<button type=button class="portal-btn portal-btn--ghost thread__action">Talk to your provider`);
13754
+ var _tmpl$1214 = /* @__PURE__ */ template(`<button type=button class="portal-btn portal-btn--ghost thread__action">Talk to your provider`);
13420
13755
  var _tmpl$1312 = /* @__PURE__ */ template(`<li><div class=thread__rail><span class=thread__bead></span></div><div><div class=thread__top><span class="lab-label thread__label">`);
13421
13756
  var _tmpl$1412 = /* @__PURE__ */ template(`<p class="thread__caption thread__await"data-testid=await-messaging>Your care team is reviewing your request. You\u2019ll be able to message them here once your consult begins.`);
13422
- var _tmpl$1511 = /* @__PURE__ */ template(`<p class="thread__caption thread__await"data-testid=await-messaging>Your provider will follow up with you about next steps.`);
13757
+ var _tmpl$1512 = /* @__PURE__ */ template(`<p class="thread__caption thread__await"data-testid=await-messaging>Your provider will follow up with you about next steps.`);
13423
13758
  var _tmpl$1611 = /* @__PURE__ */ template(`<span class=tracker__dose> \xB7 `);
13424
13759
  var _tmpl$1711 = /* @__PURE__ */ template(`<div class=tracker data-testid=order-tracker><div class=tracker__intro><span class=lab-label>Your order</span><p class=tracker__med></p></div><ol>`);
13425
13760
  function TrackingChip(props) {
@@ -13470,7 +13805,7 @@ function OrderTracker(props) {
13470
13805
  return refill();
13471
13806
  },
13472
13807
  children: (r) => (() => {
13473
- var _el$11 = _tmpl$434(), _el$12 = _el$11.firstChild; _el$12.firstChild; var _el$18 = _el$12.nextSibling;
13808
+ var _el$11 = _tmpl$436(), _el$12 = _el$11.firstChild; _el$12.firstChild; var _el$18 = _el$12.nextSibling;
13474
13809
  insert(_el$12, createComponent(Show, {
13475
13810
  get when() {
13476
13811
  return !r().pendingFill;
@@ -13479,7 +13814,7 @@ function OrderTracker(props) {
13479
13814
  return _tmpl$529();
13480
13815
  },
13481
13816
  get children() {
13482
- var _el$14 = _tmpl$343(), _el$15 = _el$14.firstChild, _el$17 = _el$15.nextSibling; _el$17.nextSibling;
13817
+ var _el$14 = _tmpl$348(), _el$15 = _el$14.firstChild, _el$17 = _el$15.nextSibling; _el$17.nextSibling;
13483
13818
  insert(_el$14, () => r().cycleDay, _el$17);
13484
13819
  insert(_el$14, () => r().cycleLength, null);
13485
13820
  return _el$14;
@@ -13617,10 +13952,10 @@ function OrderTracker(props) {
13617
13952
  return props.messagingEnabled;
13618
13953
  },
13619
13954
  get fallback() {
13620
- return _tmpl$1511();
13955
+ return _tmpl$1512();
13621
13956
  },
13622
13957
  get children() {
13623
- var _el$44 = _tmpl$1213();
13958
+ var _el$44 = _tmpl$1214();
13624
13959
  _el$44.$$click = () => props.onOpenMessages();
13625
13960
  return _el$44;
13626
13961
  }
@@ -13695,7 +14030,7 @@ function OrderTracker(props) {
13695
14030
  delegateEvents(["click"]);
13696
14031
  var _tmpl$200 = /* @__PURE__ */ template(`<span class=rx-row__dose> \xB7 `);
13697
14032
  var _tmpl$267 = /* @__PURE__ */ template(`<div class=rx-row__body>`);
13698
- var _tmpl$344 = /* @__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>`);
14033
+ var _tmpl$349 = /* @__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>`);
13699
14034
  var STATUS_LABEL = {
13700
14035
  pending: "Under review",
13701
14036
  approved: "Approved",
@@ -13712,7 +14047,7 @@ function RxRow(props) {
13712
14047
  return STATUS_LABEL[props.rx.status] ?? props.rx.status;
13713
14048
  };
13714
14049
  return (() => {
13715
- var _el$ = _tmpl$344(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$6 = _el$3.nextSibling, _el$7 = _el$6.nextSibling;
14050
+ var _el$ = _tmpl$349(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$6 = _el$3.nextSibling, _el$7 = _el$6.nextSibling;
13716
14051
  _el$2.$$click = () => setOpen((v) => !v);
13717
14052
  insert(_el$3, () => props.rx.drugName ?? "Medication", null);
13718
14053
  insert(_el$3, createComponent(Show, {
@@ -13776,8 +14111,8 @@ function RxRow(props) {
13776
14111
  delegateEvents(["click"]);
13777
14112
  var _tmpl$201 = /* @__PURE__ */ template(`<div class=plan data-testid=plan-billing><span class=lab-label>Plan &amp; billing`);
13778
14113
  var _tmpl$268 = /* @__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`);
13779
- var _tmpl$345 = /* @__PURE__ */ template(`<p class=membership__dose>`);
13780
- var _tmpl$435 = /* @__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 `);
14114
+ var _tmpl$350 = /* @__PURE__ */ template(`<p class=membership__dose>`);
14115
+ var _tmpl$437 = /* @__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 `);
13781
14116
  var _tmpl$530 = /* @__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`);
13782
14117
  var _tmpl$628 = /* @__PURE__ */ template(`<p class=plan__error role=alert>`);
13783
14118
  var _tmpl$725 = /* @__PURE__ */ template(`<button type=button class=plan__link-btn>`);
@@ -13841,7 +14176,7 @@ function PlanBilling(props) {
13841
14176
  })();
13842
14177
  },
13843
14178
  children: (sub) => [(() => {
13844
- var _el$7 = _tmpl$435(), _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;
14179
+ var _el$7 = _tmpl$437(), _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;
13845
14180
  insert(_el$0, () => STATUS_COPY[sub().status] || sub().status);
13846
14181
  insert(_el$1, () => props.brandName);
13847
14182
  insert(_el$10, () => sub().medicationName ?? sub().medication);
@@ -13850,7 +14185,7 @@ function PlanBilling(props) {
13850
14185
  return sub().dosage;
13851
14186
  },
13852
14187
  get children() {
13853
- var _el$11 = _tmpl$345();
14188
+ var _el$11 = _tmpl$350();
13854
14189
  insert(_el$11, () => sub().dosage);
13855
14190
  return _el$11;
13856
14191
  }
@@ -13942,8 +14277,8 @@ function PlanBilling(props) {
13942
14277
  delegateEvents(["click"]);
13943
14278
  var _tmpl$207 = /* @__PURE__ */ template(`<p class=account__empty>We don\u2019t have your details on file yet.`);
13944
14279
  var _tmpl$269 = /* @__PURE__ */ template(`<p class=account__note>Need to update something? <button type=button class=account__note-link>Message your care team</button> and we\u2019ll take care of it.`);
13945
- var _tmpl$346 = /* @__PURE__ */ template(`<button type=button class="account__support-link account__support-btn">Messages`);
13946
- var _tmpl$436 = /* @__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`);
14280
+ var _tmpl$351 = /* @__PURE__ */ template(`<button type=button class="account__support-link account__support-btn">Messages`);
14281
+ var _tmpl$438 = /* @__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`);
13947
14282
  var _tmpl$531 = /* @__PURE__ */ template(`<div class=account__field><dt class=lab-label></dt><dd>`);
13948
14283
  var _tmpl$629 = /* @__PURE__ */ template(`<a class=account__support-link>`);
13949
14284
  function pick(member, ...keys) {
@@ -13955,14 +14290,7 @@ function pick(member, ...keys) {
13955
14290
  return "";
13956
14291
  }
13957
14292
  function formatDob(value) {
13958
- if (!value) return "";
13959
- const d = new Date(value);
13960
- if (Number.isNaN(d.getTime())) return value;
13961
- return d.toLocaleDateString("en-US", {
13962
- year: "numeric",
13963
- month: "long",
13964
- day: "numeric"
13965
- });
14293
+ return formatCalendarDate(value);
13966
14294
  }
13967
14295
  function AccountPanel(props) {
13968
14296
  const m = () => props.member;
@@ -13993,7 +14321,7 @@ function AccountPanel(props) {
13993
14321
  value: address()
13994
14322
  }].filter((f) => f.value);
13995
14323
  return (() => {
13996
- var _el$ = _tmpl$436(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling, _el$4 = _el$3.nextSibling, _el$0 = _el$4.nextSibling, _el$10 = _el$0.nextSibling;
14324
+ var _el$ = _tmpl$438(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling, _el$4 = _el$3.nextSibling, _el$0 = _el$4.nextSibling, _el$10 = _el$0.nextSibling;
13997
14325
  insert(_el$4, createComponent(For, {
13998
14326
  get each() {
13999
14327
  return fields();
@@ -14028,7 +14356,7 @@ function AccountPanel(props) {
14028
14356
  return props.messagingEnabled;
14029
14357
  },
14030
14358
  get children() {
14031
- var _el$1 = _tmpl$346();
14359
+ var _el$1 = _tmpl$351();
14032
14360
  _el$1.$$click = () => props.onOpenMessages();
14033
14361
  return _el$1;
14034
14362
  }
@@ -14051,8 +14379,8 @@ function AccountPanel(props) {
14051
14379
  delegateEvents(["click"]);
14052
14380
  var _tmpl$208 = /* @__PURE__ */ template(`<section class="leaflet__section leaflet__section--caution"><h2 class=leaflet__h2>Birth control</h2><p class=leaflet__body>`);
14053
14381
  var _tmpl$270 = /* @__PURE__ */ template(`<ul class=leaflet__disclaimers id=leaflet-disclaimers>`);
14054
- var _tmpl$347 = /* @__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>`);
14055
- var _tmpl$437 = /* @__PURE__ */ template(`<li>`);
14382
+ var _tmpl$353 = /* @__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>`);
14383
+ var _tmpl$439 = /* @__PURE__ */ template(`<li>`);
14056
14384
  var _tmpl$532 = /* @__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>`);
14057
14385
  var _tmpl$630 = /* @__PURE__ */ template(`<li class=steps__item><span class=steps__num></span><div class=steps__body><h3 class=steps__title></h3><p class=steps__detail>`);
14058
14386
  function firstNumber(s) {
@@ -14075,7 +14403,7 @@ function MedicationGuide(props) {
14075
14403
  return "upcoming";
14076
14404
  };
14077
14405
  return (() => {
14078
- var _el$ = _tmpl$347(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling, _el$5 = _el$4.nextSibling, _el$6 = _el$2.nextSibling, _el$7 = _el$6.firstChild, _el$8 = _el$7.nextSibling, _el$9 = _el$6.nextSibling, _el$0 = _el$9.firstChild, _el$1 = _el$0.nextSibling, _el$10 = _el$9.nextSibling, _el$11 = _el$10.firstChild, _el$12 = _el$11.nextSibling, _el$13 = _el$12.nextSibling, _el$14 = _el$10.nextSibling, _el$15 = _el$14.firstChild, _el$16 = _el$15.nextSibling, _el$17 = _el$14.nextSibling, _el$18 = _el$17.firstChild, _el$19 = _el$18.firstChild, _el$20 = _el$19.nextSibling, _el$21 = _el$18.nextSibling, _el$22 = _el$21.firstChild, _el$23 = _el$22.nextSibling, _el$27 = _el$17.nextSibling, _el$28 = _el$27.firstChild, _el$29 = _el$28.firstChild, _el$30 = _el$29.nextSibling, _el$31 = _el$28.nextSibling, _el$32 = _el$31.firstChild, _el$33 = _el$32.nextSibling, _el$34 = _el$27.nextSibling, _el$35 = _el$34.firstChild, _el$36 = _el$35.nextSibling, _el$37 = _el$34.nextSibling, _el$38 = _el$37.firstChild, _el$39 = _el$38.nextSibling, _el$40 = _el$37.nextSibling, _el$41 = _el$40.firstChild, _el$42 = _el$41.firstChild, _el$43 = _el$42.nextSibling;
14406
+ var _el$ = _tmpl$353(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling, _el$5 = _el$4.nextSibling, _el$6 = _el$2.nextSibling, _el$7 = _el$6.firstChild, _el$8 = _el$7.nextSibling, _el$9 = _el$6.nextSibling, _el$0 = _el$9.firstChild, _el$1 = _el$0.nextSibling, _el$10 = _el$9.nextSibling, _el$11 = _el$10.firstChild, _el$12 = _el$11.nextSibling, _el$13 = _el$12.nextSibling, _el$14 = _el$10.nextSibling, _el$15 = _el$14.firstChild, _el$16 = _el$15.nextSibling, _el$17 = _el$14.nextSibling, _el$18 = _el$17.firstChild, _el$19 = _el$18.firstChild, _el$20 = _el$19.nextSibling, _el$21 = _el$18.nextSibling, _el$22 = _el$21.firstChild, _el$23 = _el$22.nextSibling, _el$27 = _el$17.nextSibling, _el$28 = _el$27.firstChild, _el$29 = _el$28.firstChild, _el$30 = _el$29.nextSibling, _el$31 = _el$28.nextSibling, _el$32 = _el$31.firstChild, _el$33 = _el$32.nextSibling, _el$34 = _el$27.nextSibling, _el$35 = _el$34.firstChild, _el$36 = _el$35.nextSibling, _el$37 = _el$34.nextSibling, _el$38 = _el$37.firstChild, _el$39 = _el$38.nextSibling, _el$40 = _el$37.nextSibling, _el$41 = _el$40.firstChild, _el$42 = _el$41.firstChild, _el$43 = _el$42.nextSibling;
14079
14407
  insert(_el$4, () => props.guide.title);
14080
14408
  insert(_el$5, () => props.guide.summary);
14081
14409
  insert(_el$8, () => props.guide.boxedWarning);
@@ -14084,7 +14412,7 @@ function MedicationGuide(props) {
14084
14412
  return props.guide.doNotUseIf;
14085
14413
  },
14086
14414
  children: (item) => (() => {
14087
- var _el$45 = _tmpl$437();
14415
+ var _el$45 = _tmpl$439();
14088
14416
  insert(_el$45, item);
14089
14417
  return _el$45;
14090
14418
  })()
@@ -14120,7 +14448,7 @@ function MedicationGuide(props) {
14120
14448
  return props.guide.storage;
14121
14449
  },
14122
14450
  children: (item) => (() => {
14123
- var _el$59 = _tmpl$437();
14451
+ var _el$59 = _tmpl$439();
14124
14452
  insert(_el$59, item);
14125
14453
  return _el$59;
14126
14454
  })()
@@ -14141,7 +14469,7 @@ function MedicationGuide(props) {
14141
14469
  return props.guide.sideEffectsCommon;
14142
14470
  },
14143
14471
  children: (item) => (() => {
14144
- var _el$60 = _tmpl$437();
14472
+ var _el$60 = _tmpl$439();
14145
14473
  insert(_el$60, item);
14146
14474
  return _el$60;
14147
14475
  })()
@@ -14151,7 +14479,7 @@ function MedicationGuide(props) {
14151
14479
  return props.guide.sideEffectsSerious;
14152
14480
  },
14153
14481
  children: (item) => (() => {
14154
- var _el$61 = _tmpl$437();
14482
+ var _el$61 = _tmpl$439();
14155
14483
  insert(_el$61, item);
14156
14484
  return _el$61;
14157
14485
  })()
@@ -14161,7 +14489,7 @@ function MedicationGuide(props) {
14161
14489
  return props.guide.whenToCall;
14162
14490
  },
14163
14491
  children: (item) => (() => {
14164
- var _el$62 = _tmpl$437();
14492
+ var _el$62 = _tmpl$439();
14165
14493
  insert(_el$62, item);
14166
14494
  return _el$62;
14167
14495
  })()
@@ -14171,7 +14499,7 @@ function MedicationGuide(props) {
14171
14499
  return props.guide.tips;
14172
14500
  },
14173
14501
  children: (item) => (() => {
14174
- var _el$63 = _tmpl$437();
14502
+ var _el$63 = _tmpl$439();
14175
14503
  insert(_el$63, item);
14176
14504
  return _el$63;
14177
14505
  })()
@@ -14189,7 +14517,7 @@ function MedicationGuide(props) {
14189
14517
  return props.guide.disclaimers;
14190
14518
  },
14191
14519
  children: (item) => (() => {
14192
- var _el$64 = _tmpl$437();
14520
+ var _el$64 = _tmpl$439();
14193
14521
  insert(_el$64, item);
14194
14522
  return _el$64;
14195
14523
  })()
@@ -14212,8 +14540,8 @@ function MedicationGuide(props) {
14212
14540
  delegateEvents(["click"]);
14213
14541
  var _tmpl$209 = /* @__PURE__ */ template(`<div class=msg-list__header><h2 class=msg-list__title>Messages</h2><button type=button class=msg-list__new data-testid=messages-new-support><i class="ph-thin ph-plus"aria-hidden=true></i>Message support`);
14214
14542
  var _tmpl$271 = /* @__PURE__ */ template(`<div class=msg-list__state><div class=request-status__spinner>`);
14215
- var _tmpl$348 = /* @__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>Your care team will reach out after reviewing your case \u2014 or message support with a question any time.`);
14216
- var _tmpl$438 = /* @__PURE__ */ template(`<div class=msg-list__scroll data-scrollable>`);
14543
+ var _tmpl$354 = /* @__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>Your care team will reach out after reviewing your case \u2014 or message support with a question any time.`);
14544
+ var _tmpl$440 = /* @__PURE__ */ template(`<div class=msg-list__scroll data-scrollable>`);
14217
14545
  var _tmpl$533 = /* @__PURE__ */ template(`<span class=msg-list__pip>`);
14218
14546
  var _tmpl$631 = /* @__PURE__ */ template(`<button type=button><div class=msg-list__row><span class=msg-list__name></span><span class=msg-list__time></span></div><div class=msg-list__row><span class=msg-list__preview>`);
14219
14547
  var _tmpl$726 = /* @__PURE__ */ template(`<button type=button class=msg-attachment__image-link><img class=msg-attachment__image loading=lazy>`, true, false, false);
@@ -14223,10 +14551,10 @@ var _tmpl$022 = /* @__PURE__ */ template(`<p class=msg-thread__sender>`);
14223
14551
  var _tmpl$1101 = /* @__PURE__ */ template(`<div class=msg-thread__text>`);
14224
14552
  var _tmpl$1016 = /* @__PURE__ */ template(`<div class=msg-attachment>`);
14225
14553
  var _tmpl$1118 = /* @__PURE__ */ template(`<div><div><p class=msg-thread__meta>`);
14226
- var _tmpl$1214 = /* @__PURE__ */ template(`<p class=msg-thread__system data-testid=system-message>`);
14554
+ var _tmpl$1215 = /* @__PURE__ */ template(`<p class=msg-thread__system data-testid=system-message>`);
14227
14555
  var _tmpl$1313 = /* @__PURE__ */ template(`<p class=msg-thread__text>`);
14228
14556
  var _tmpl$1413 = /* @__PURE__ */ template(`<button type=button class="msg-compose__staged-remove msg-compose__staged-remove--inline">Remove file`);
14229
- var _tmpl$1512 = /* @__PURE__ */ template(`<p class=msg-compose__error role=alert>`);
14557
+ var _tmpl$1513 = /* @__PURE__ */ template(`<p class=msg-compose__error role=alert>`);
14230
14558
  var _tmpl$1612 = /* @__PURE__ */ template(`<form class="msg-thread msg-thread--compose"data-testid=support-compose><div class=msg-thread__header><button type=button class=msg-thread__back-btn aria-label="Back to conversations"><i class="ph-thin ph-arrow-left"aria-hidden=true></i></button><div><h3 class=msg-thread__name>Message support</h3><p class=msg-thread__role>We usually reply within one business day</p></div></div><div class=msg-compose__new><label class=msg-compose__label for=support-subject>What's this about?</label><input id=support-subject class=msg-compose__subject type=text maxlength=500 required placeholder="e.g. Question about my order"><label class=msg-compose__label for=support-body>How can we help?</label><textarea id=support-body class=msg-compose__body rows=6 maxlength=5000 required placeholder="Tell us what's going on\u2026"></textarea><label class="msg-compose__attach msg-compose__attach--block"title="Attach a file"><i class="ph-thin ph-paperclip"aria-hidden=true></i><span class=msg-compose__attach-label></span><input class=msg-compose__file-input type=file data-testid=support-compose-attach></label><button type=submit class=msg-compose__send data-testid=support-compose-send>`);
14231
14559
  var _tmpl$1712 = /* @__PURE__ */ template(`<span class=msg-thread__status data-testid=thread-status-closed>Resolved`);
14232
14560
  var _tmpl$1811 = /* @__PURE__ */ template(`<div class=msg-thread__header><button type=button class=msg-thread__back-btn aria-label="Back to conversations"data-testid=messages-back><i class="ph-thin ph-arrow-left"aria-hidden=true></i></button><div><h3 class=msg-thread__name></h3><p class=msg-thread__role>`);
@@ -14338,7 +14666,7 @@ function MessagesPanel(props) {
14338
14666
  _el$3.$$click = openCompose;
14339
14667
  return _el$;
14340
14668
  })(), (() => {
14341
- var _el$4 = _tmpl$438();
14669
+ var _el$4 = _tmpl$440();
14342
14670
  insert(_el$4, createComponent(Show, {
14343
14671
  get when() {
14344
14672
  return thread().loadingConversations();
@@ -14352,7 +14680,7 @@ function MessagesPanel(props) {
14352
14680
  return memo(() => !!!thread().loadingConversations())() && thread().conversations().length === 0;
14353
14681
  },
14354
14682
  get children() {
14355
- return _tmpl$348();
14683
+ return _tmpl$354();
14356
14684
  }
14357
14685
  }), null);
14358
14686
  insert(_el$4, createComponent(For, {
@@ -14467,7 +14795,7 @@ function MessagesPanel(props) {
14467
14795
  },
14468
14796
  get fallback() {
14469
14797
  return (() => {
14470
- var _el$26 = _tmpl$1214();
14798
+ var _el$26 = _tmpl$1215();
14471
14799
  insert(_el$26, body);
14472
14800
  return _el$26;
14473
14801
  })();
@@ -14562,7 +14890,7 @@ function MessagesPanel(props) {
14562
14890
  return attachError() || composeError();
14563
14891
  },
14564
14892
  get children() {
14565
- var _el$41 = _tmpl$1512();
14893
+ var _el$41 = _tmpl$1513();
14566
14894
  insert(_el$41, () => attachError() ?? composeError());
14567
14895
  return _el$41;
14568
14896
  }
@@ -14711,8 +15039,8 @@ function MessagesPanel(props) {
14711
15039
  delegateEvents(["click", "input", "keydown"]);
14712
15040
  var _tmpl$276 = /* @__PURE__ */ template(`<ul class=history-list data-testid=history-list>`);
14713
15041
  var _tmpl$277 = /* @__PURE__ */ template(`<div class=portal-state data-testid=history-error><p>We couldn't load your submitted surveys. Please try again in a moment.`);
14714
- var _tmpl$349 = /* @__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.`);
14715
- var _tmpl$439 = /* @__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>`);
15042
+ var _tmpl$355 = /* @__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.`);
15043
+ var _tmpl$441 = /* @__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>`);
14716
15044
  var _tmpl$534 = /* @__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`);
14717
15045
  var _tmpl$632 = /* @__PURE__ */ template(`<div class=portal-state><div class=request-status__spinner></div><p>Loading your answers\u2026`);
14718
15046
  var _tmpl$727 = /* @__PURE__ */ template(`<div class=portal-state data-testid=history-detail-error><p>We couldn't load this questionnaire. Please try again in a moment.`);
@@ -14756,7 +15084,7 @@ function SurveyHistory() {
14756
15084
  return (list() ?? []).length > 0;
14757
15085
  },
14758
15086
  get fallback() {
14759
- return _tmpl$349();
15087
+ return _tmpl$355();
14760
15088
  },
14761
15089
  get children() {
14762
15090
  var _el$ = _tmpl$276();
@@ -14765,7 +15093,7 @@ function SurveyHistory() {
14765
15093
  return list();
14766
15094
  },
14767
15095
  children: (item) => (() => {
14768
- var _el$4 = _tmpl$439(), _el$5 = _el$4.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling;
15096
+ var _el$4 = _tmpl$441(), _el$5 = _el$4.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling;
14769
15097
  _el$5.$$click = () => setSelectedId(item.id);
14770
15098
  insert(_el$6, () => MODE_LABELS[item.mode] ?? "Questionnaire");
14771
15099
  insert(_el$7, () => formatDate2(item.submittedAt) ?? "Date unavailable");
@@ -14858,8 +15186,8 @@ delegateEvents(["click"]);
14858
15186
  // src/pages/MemberPortal.tsx
14859
15187
  var _tmpl$278 = /* @__PURE__ */ template(`<span class=portal-item__live aria-label="In progress">`);
14860
15188
  var _tmpl$279 = /* @__PURE__ */ template(`<span>`);
14861
- var _tmpl$350 = /* @__PURE__ */ template(`<button type=button><i aria-hidden=true></i><span class=portal-item__label>`);
14862
- var _tmpl$440 = /* @__PURE__ */ template(`<div class=rx-others data-testid=rx-others><span class=lab-label>Other orders`);
15189
+ var _tmpl$356 = /* @__PURE__ */ template(`<button type=button><i aria-hidden=true></i><span class=portal-item__label>`);
15190
+ var _tmpl$442 = /* @__PURE__ */ template(`<div class=rx-others data-testid=rx-others><span class=lab-label>Other orders`);
14863
15191
  var _tmpl$535 = /* @__PURE__ */ template(`<div class=rx-stack>`);
14864
15192
  var _tmpl$633 = /* @__PURE__ */ template(`<div class=portal-state><div class=request-status__spinner></div><p>Loading your portal\u2026`);
14865
15193
  var _tmpl$728 = /* @__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`);
@@ -14950,7 +15278,7 @@ function MemberPortal(props) {
14950
15278
  return tabs();
14951
15279
  },
14952
15280
  children: (item) => (() => {
14953
- var _el$ = _tmpl$350(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling;
15281
+ var _el$ = _tmpl$356(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling;
14954
15282
  _el$.$$click = () => selectTab(item.key);
14955
15283
  insert(_el$3, () => item.label);
14956
15284
  insert(_el$, createComponent(Show, {
@@ -15048,7 +15376,7 @@ function MemberPortal(props) {
15048
15376
  return data.otherRx().length > 0;
15049
15377
  },
15050
15378
  get children() {
15051
- var _el$7 = _tmpl$440(); _el$7.firstChild;
15379
+ var _el$7 = _tmpl$442(); _el$7.firstChild;
15052
15380
  insert(_el$7, createComponent(For, {
15053
15381
  get each() {
15054
15382
  return data.otherRx();
@@ -15266,8 +15594,8 @@ function MemberPortal(props) {
15266
15594
  delegateEvents(["click"]);
15267
15595
  var _tmpl$280 = /* @__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.`);
15268
15596
  var _tmpl$281 = /* @__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`);
15269
- var _tmpl$351 = /* @__PURE__ */ template(`<div style=color:var(--app-affiliate-fg-muted)>Loading stats\u2026`);
15270
- var _tmpl$441 = /* @__PURE__ */ template(`<div style="display:grid;grid-template-columns:repeat(auto-fit, minmax(180px, 1fr));gap:1rem">`);
15597
+ var _tmpl$357 = /* @__PURE__ */ template(`<div style=color:var(--app-affiliate-fg-muted)>Loading stats\u2026`);
15598
+ var _tmpl$443 = /* @__PURE__ */ template(`<div style="display:grid;grid-template-columns:repeat(auto-fit, minmax(180px, 1fr));gap:1rem">`);
15271
15599
  var _tmpl$536 = /* @__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)>`);
15272
15600
  function formatMoney(cents) {
15273
15601
  return `$${(cents / 100).toFixed(2)}`;
@@ -15315,10 +15643,10 @@ function AffiliateOverview() {
15315
15643
  return stats();
15316
15644
  },
15317
15645
  get fallback() {
15318
- return _tmpl$351();
15646
+ return _tmpl$357();
15319
15647
  },
15320
15648
  children: (s) => (() => {
15321
- var _el$5 = _tmpl$441();
15649
+ var _el$5 = _tmpl$443();
15322
15650
  insert(_el$5, createComponent(For, {
15323
15651
  get each() {
15324
15652
  return cards(s());
@@ -15338,8 +15666,8 @@ function AffiliateOverview() {
15338
15666
  }
15339
15667
  var _tmpl$285 = /* @__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>`);
15340
15668
  var _tmpl$286 = /* @__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`);
15341
- var _tmpl$353 = /* @__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.`);
15342
- var _tmpl$442 = /* @__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`);
15669
+ var _tmpl$358 = /* @__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.`);
15670
+ var _tmpl$444 = /* @__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`);
15343
15671
  var _tmpl$537 = /* @__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">`);
15344
15672
  function formatMoney2(cents) {
15345
15673
  return `$${(cents / 100).toFixed(2)}`;
@@ -15384,7 +15712,7 @@ function AffiliateConversions() {
15384
15712
  return (conversions() ?? []).length > 0;
15385
15713
  },
15386
15714
  get fallback() {
15387
- return _tmpl$353();
15715
+ return _tmpl$358();
15388
15716
  },
15389
15717
  get children() {
15390
15718
  var _el$3 = _tmpl$285(), _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;
@@ -15401,7 +15729,7 @@ function AffiliateConversions() {
15401
15729
  return c.tier === 2;
15402
15730
  },
15403
15731
  get children() {
15404
- return _tmpl$442();
15732
+ return _tmpl$444();
15405
15733
  }
15406
15734
  }), null);
15407
15735
  insert(_el$16, () => formatMoney2(c.orderTotalCents));
@@ -15471,8 +15799,8 @@ function td() {
15471
15799
  }
15472
15800
  var _tmpl$287 = /* @__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>`);
15473
15801
  var _tmpl$288 = /* @__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.`);
15474
- var _tmpl$354 = /* @__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.`);
15475
- var _tmpl$443 = /* @__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>`);
15802
+ var _tmpl$359 = /* @__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.`);
15803
+ var _tmpl$445 = /* @__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>`);
15476
15804
  function formatDate4(iso) {
15477
15805
  const d = new Date(iso);
15478
15806
  if (Number.isNaN(d.getTime())) return iso;
@@ -15511,7 +15839,7 @@ function AffiliateDownline() {
15511
15839
  return (downline() ?? []).length > 0;
15512
15840
  },
15513
15841
  get fallback() {
15514
- return _tmpl$354();
15842
+ return _tmpl$359();
15515
15843
  },
15516
15844
  get children() {
15517
15845
  var _el$4 = _tmpl$287(), _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;
@@ -15520,7 +15848,7 @@ function AffiliateDownline() {
15520
15848
  return downline();
15521
15849
  },
15522
15850
  children: (d) => (() => {
15523
- var _el$12 = _tmpl$443(), _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;
15851
+ var _el$12 = _tmpl$445(), _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;
15524
15852
  insert(_el$13, () => d.affiliateCode);
15525
15853
  insert(_el$14, () => [d.firstName, d.lastName].filter(Boolean).join(" ") || "\u2014");
15526
15854
  insert(_el$16, () => d.status);
@@ -15585,7 +15913,7 @@ function td2() {
15585
15913
  }
15586
15914
  var _tmpl$289 = /* @__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.`);
15587
15915
  var _tmpl$290 = /* @__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`);
15588
- var _tmpl$355 = /* @__PURE__ */ template(`<div style=color:var(--app-affiliate-fg-muted)>Your referral link will appear here once your account is approved.`);
15916
+ var _tmpl$360 = /* @__PURE__ */ template(`<div style=color:var(--app-affiliate-fg-muted)>Your referral link will appear here once your account is approved.`);
15589
15917
  function AffiliateReferralLink() {
15590
15918
  const {
15591
15919
  links
@@ -15616,7 +15944,7 @@ function AffiliateReferralLink() {
15616
15944
  return homepageLink();
15617
15945
  },
15618
15946
  get fallback() {
15619
- return _tmpl$355();
15947
+ return _tmpl$360();
15620
15948
  },
15621
15949
  get children() {
15622
15950
  var _el$3 = _tmpl$289(), _el$4 = _el$3.firstChild, _el$5 = _el$4.nextSibling, _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling; _el$5.nextSibling;
@@ -15632,8 +15960,8 @@ function AffiliateReferralLink() {
15632
15960
  delegateEvents(["click"]);
15633
15961
  var _tmpl$291 = /* @__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.`);
15634
15962
  var _tmpl$295 = /* @__PURE__ */ template(`<div style=color:var(--app-affiliate-fg-muted)>Loading\u2026`);
15635
- var _tmpl$356 = /* @__PURE__ */ template(`<div style="background:var(--app-affiliate-surface);border:1px solid var(--app-affiliate-border);border-radius:var(--app-affiliate-radius);overflow:hidden">`);
15636
- var _tmpl$444 = /* @__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)>`);
15963
+ var _tmpl$361 = /* @__PURE__ */ template(`<div style="background:var(--app-affiliate-surface);border:1px solid var(--app-affiliate-border);border-radius:var(--app-affiliate-radius);overflow:hidden">`);
15964
+ var _tmpl$446 = /* @__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)>`);
15637
15965
  var STATUS_LABEL2 = {
15638
15966
  pending: "Pending approval",
15639
15967
  active: "Active",
@@ -15677,13 +16005,13 @@ function AffiliateSettings() {
15677
16005
  return _tmpl$295();
15678
16006
  },
15679
16007
  children: (a) => (() => {
15680
- var _el$7 = _tmpl$356();
16008
+ var _el$7 = _tmpl$361();
15681
16009
  insert(_el$7, createComponent(For, {
15682
16010
  get each() {
15683
16011
  return rows(a());
15684
16012
  },
15685
16013
  children: (row) => (() => {
15686
- var _el$8 = _tmpl$444(), _el$9 = _el$8.firstChild, _el$0 = _el$9.nextSibling;
16014
+ var _el$8 = _tmpl$446(), _el$9 = _el$8.firstChild, _el$0 = _el$9.nextSibling;
15687
16015
  insert(_el$9, () => row.label);
15688
16016
  insert(_el$0, () => row.value);
15689
16017
  return _el$8;
@@ -15701,8 +16029,8 @@ delegateEvents(["click"]);
15701
16029
  // src/pages/AffiliatePortal.tsx
15702
16030
  var _tmpl$296 = /* @__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>`);
15703
16031
  var _tmpl$297 = /* @__PURE__ */ template(`<span style=font-size:1rem;opacity:0.7;flex-shrink:0>`);
15704
- var _tmpl$357 = /* @__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">`);
15705
- var _tmpl$445 = /* @__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); } }`);
16032
+ var _tmpl$363 = /* @__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">`);
16033
+ var _tmpl$447 = /* @__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); } }`);
15706
16034
  var TAB_LABELS2 = {
15707
16035
  overview: "Overview",
15708
16036
  conversions: "Conversions",
@@ -15756,7 +16084,7 @@ function AffiliatePortal(props) {
15756
16084
  return orderedTabs();
15757
16085
  },
15758
16086
  children: (tab) => (() => {
15759
- var _el$1 = _tmpl$357();
16087
+ var _el$1 = _tmpl$363();
15760
16088
  _el$1.$$click = () => handleTabClick(tab);
15761
16089
  insert(_el$1, createComponent(Show, {
15762
16090
  get when() {
@@ -15845,7 +16173,7 @@ function AffiliatePortal(props) {
15845
16173
  }
15846
16174
  function AffiliateGateSpinner(props) {
15847
16175
  return (() => {
15848
- var _el$11 = _tmpl$445(); _el$11.firstChild;
16176
+ var _el$11 = _tmpl$447(); _el$11.firstChild;
15849
16177
  effect((_p$) => {
15850
16178
  var _v$8 = props.topOffset, _v$9 = `calc(100vh - ${props.topOffset})`;
15851
16179
  _v$8 !== _p$.e && setStyleProperty(_el$11, "top", _p$.e = _v$8);
@@ -15906,8 +16234,8 @@ delegateEvents(["input", "click"]);
15906
16234
  // src/pages/AffiliateRegister.tsx
15907
16235
  var _tmpl$299 = /* @__PURE__ */ template(`<input type=text required autocomplete=given-name>`);
15908
16236
  var _tmpl$2100 = /* @__PURE__ */ template(`<input type=text required autocomplete=family-name>`);
15909
- var _tmpl$358 = /* @__PURE__ */ template(`<input type=email required autocomplete=email>`);
15910
- var _tmpl$446 = /* @__PURE__ */ template(`<input type=text required minlength=4>`);
16237
+ var _tmpl$364 = /* @__PURE__ */ template(`<input type=email required autocomplete=email>`);
16238
+ var _tmpl$448 = /* @__PURE__ */ template(`<input type=text required minlength=4>`);
15911
16239
  var _tmpl$538 = /* @__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">`);
15912
16240
  var _tmpl$634 = /* @__PURE__ */ template(`<button type=button>Already have an account? Log in`);
15913
16241
  var _tmpl$729 = /* @__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">`);
@@ -15979,7 +16307,7 @@ function AffiliateRegister(props) {
15979
16307
  insert(_el$6, createComponent(Row, {
15980
16308
  label: "Email",
15981
16309
  get children() {
15982
- var _el$9 = _tmpl$358();
16310
+ var _el$9 = _tmpl$364();
15983
16311
  _el$9.$$input = (e) => setEmail(e.currentTarget.value);
15984
16312
  effect((_$p) => style(_el$9, inputStyle2(), _$p));
15985
16313
  effect(() => _el$9.value = email());
@@ -16005,7 +16333,7 @@ function AffiliateRegister(props) {
16005
16333
  label: "Affiliate code",
16006
16334
  hint: "The handle in your referral URL (4+ characters)",
16007
16335
  get children() {
16008
- var _el$0 = _tmpl$446();
16336
+ var _el$0 = _tmpl$448();
16009
16337
  _el$0.$$input = (e) => setAffiliateCode(e.currentTarget.value);
16010
16338
  effect((_$p) => style(_el$0, inputStyle2(), _$p));
16011
16339
  effect(() => _el$0.value = affiliateCode());
@@ -16100,8 +16428,8 @@ function linkStyle() {
16100
16428
  delegateEvents(["input", "click"]);
16101
16429
  var _tmpl$300 = /* @__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">`);
16102
16430
  var _tmpl$2101 = /* @__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?`);
16103
- var _tmpl$359 = /* @__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`);
16104
- var _tmpl$447 = /* @__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">`);
16431
+ var _tmpl$365 = /* @__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`);
16432
+ var _tmpl$449 = /* @__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">`);
16105
16433
  function AffiliateLogin(props) {
16106
16434
  const [email, setEmail] = createSignal("");
16107
16435
  const [password, setPassword] = createSignal("");
@@ -16121,7 +16449,7 @@ function AffiliateLogin(props) {
16121
16449
  }
16122
16450
  }
16123
16451
  return (() => {
16124
- var _el$ = _tmpl$447(), _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;
16452
+ var _el$ = _tmpl$449(), _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;
16125
16453
  _el$4.addEventListener("submit", handleSubmit);
16126
16454
  _el$7.$$input = (e) => setEmail(e.currentTarget.value);
16127
16455
  insert(_el$8, createComponent(AffiliatePasswordInput, {
@@ -16158,7 +16486,7 @@ function AffiliateLogin(props) {
16158
16486
  return props.onNavigateRegister;
16159
16487
  },
16160
16488
  get children() {
16161
- var _el$11 = _tmpl$359();
16489
+ var _el$11 = _tmpl$365();
16162
16490
  _el$11.$$click = () => props.onNavigateRegister?.();
16163
16491
  return _el$11;
16164
16492
  }
@@ -16208,8 +16536,8 @@ function inputStyle3() {
16208
16536
  delegateEvents(["input", "click"]);
16209
16537
  var _tmpl$301 = /* @__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">`);
16210
16538
  var _tmpl$2102 = /* @__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">`);
16211
- var _tmpl$360 = /* @__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`);
16212
- var _tmpl$448 = /* @__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">`);
16539
+ var _tmpl$366 = /* @__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`);
16540
+ var _tmpl$450 = /* @__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">`);
16213
16541
  function ForgotPasswordPage(props) {
16214
16542
  const [email, setEmail] = createSignal("");
16215
16543
  const [submitting, setSubmitting] = createSignal(false);
@@ -16233,14 +16561,14 @@ function ForgotPasswordPage(props) {
16233
16561
  }
16234
16562
  }
16235
16563
  return (() => {
16236
- var _el$ = _tmpl$360(), _el$2 = _el$.firstChild; _el$2.firstChild;
16564
+ var _el$ = _tmpl$366(), _el$2 = _el$.firstChild; _el$2.firstChild;
16237
16565
  insert(_el$2, createComponent(Show, {
16238
16566
  get when() {
16239
16567
  return !message();
16240
16568
  },
16241
16569
  get fallback() {
16242
16570
  return (() => {
16243
- var _el$0 = _tmpl$448();
16571
+ var _el$0 = _tmpl$450();
16244
16572
  insert(_el$0, message);
16245
16573
  return _el$0;
16246
16574
  })();
@@ -16306,8 +16634,8 @@ function inputStyle4() {
16306
16634
  delegateEvents(["input"]);
16307
16635
  var _tmpl$305 = /* @__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">`);
16308
16636
  var _tmpl$2103 = /* @__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">`);
16309
- var _tmpl$361 = /* @__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`);
16310
- var _tmpl$449 = /* @__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">`);
16637
+ var _tmpl$367 = /* @__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`);
16638
+ var _tmpl$451 = /* @__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">`);
16311
16639
  function queryParam(name) {
16312
16640
  if (typeof window === "undefined") return "";
16313
16641
  return new URLSearchParams(window.location.search).get(name) ?? "";
@@ -16347,14 +16675,14 @@ function ResetPasswordPage(props) {
16347
16675
  }
16348
16676
  }
16349
16677
  return (() => {
16350
- var _el$ = _tmpl$361(), _el$2 = _el$.firstChild; _el$2.firstChild;
16678
+ var _el$ = _tmpl$367(), _el$2 = _el$.firstChild; _el$2.firstChild;
16351
16679
  insert(_el$2, createComponent(Show, {
16352
16680
  get when() {
16353
16681
  return !message();
16354
16682
  },
16355
16683
  get fallback() {
16356
16684
  return (() => {
16357
- var _el$11 = _tmpl$449();
16685
+ var _el$11 = _tmpl$451();
16358
16686
  insert(_el$11, message);
16359
16687
  return _el$11;
16360
16688
  })();
@@ -16426,8 +16754,8 @@ function inputStyle5() {
16426
16754
  delegateEvents(["input"]);
16427
16755
  var _tmpl$306 = /* @__PURE__ */ template(`<div>`);
16428
16756
  var _tmpl$2104 = /* @__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>`);
16429
- var _tmpl$363 = /* @__PURE__ */ template(`<button type=button>Back to login`);
16430
- var _tmpl$450 = /* @__PURE__ */ template(`<div class=app-affiliate-root><div><h1>Reset your password`);
16757
+ var _tmpl$368 = /* @__PURE__ */ template(`<button type=button>Back to login`);
16758
+ var _tmpl$452 = /* @__PURE__ */ template(`<div class=app-affiliate-root><div><h1>Reset your password`);
16431
16759
  var _tmpl$539 = /* @__PURE__ */ template(`<p style=margin:0;font-size:0.9rem>`);
16432
16760
  function AffiliateForgotPassword(props) {
16433
16761
  const [email, setEmail] = createSignal("");
@@ -16451,7 +16779,7 @@ function AffiliateForgotPassword(props) {
16451
16779
  }
16452
16780
  }
16453
16781
  return (() => {
16454
- var _el$ = _tmpl$450(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild;
16782
+ var _el$ = _tmpl$452(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild;
16455
16783
  insert(_el$2, createComponent(Show, {
16456
16784
  get when() {
16457
16785
  return !message();
@@ -16501,7 +16829,7 @@ function AffiliateForgotPassword(props) {
16501
16829
  return props.onNavigateLogin;
16502
16830
  },
16503
16831
  get children() {
16504
- var _el$0 = _tmpl$363();
16832
+ var _el$0 = _tmpl$368();
16505
16833
  _el$0.$$click = () => props.onNavigateLogin?.();
16506
16834
  effect((_$p) => style(_el$0, linkStyle2(), _$p));
16507
16835
  return _el$0;
@@ -16609,8 +16937,8 @@ function linkStyle2() {
16609
16937
  delegateEvents(["input", "click"]);
16610
16938
  var _tmpl$307 = /* @__PURE__ */ template(`<div>`);
16611
16939
  var _tmpl$2105 = /* @__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>`);
16612
- var _tmpl$364 = /* @__PURE__ */ template(`<div class=app-affiliate-root><div><h1>Choose a new password`);
16613
- var _tmpl$451 = /* @__PURE__ */ template(`<p style=margin:0;font-size:0.9rem>Your password has been reset. You can now log in with your new password.`);
16940
+ var _tmpl$369 = /* @__PURE__ */ template(`<div class=app-affiliate-root><div><h1>Choose a new password`);
16941
+ var _tmpl$453 = /* @__PURE__ */ template(`<p style=margin:0;font-size:0.9rem>Your password has been reset. You can now log in with your new password.`);
16614
16942
  function queryParam2(name) {
16615
16943
  if (typeof window === "undefined") return "";
16616
16944
  return new URLSearchParams(window.location.search).get(name) ?? "";
@@ -16654,13 +16982,13 @@ function AffiliateResetPassword(props) {
16654
16982
  }
16655
16983
  }
16656
16984
  return (() => {
16657
- var _el$ = _tmpl$364(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild;
16985
+ var _el$ = _tmpl$369(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild;
16658
16986
  insert(_el$2, createComponent(Show, {
16659
16987
  get when() {
16660
16988
  return !done();
16661
16989
  },
16662
16990
  get fallback() {
16663
- return _tmpl$451();
16991
+ return _tmpl$453();
16664
16992
  },
16665
16993
  get children() {
16666
16994
  var _el$4 = _tmpl$2105(), _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;
@@ -16787,5 +17115,5 @@ function primaryButtonStyle2(submitting) {
16787
17115
  }
16788
17116
 
16789
17117
  export { AddressFields, AdminDashboard, AffiliateForgotPassword, AffiliateLogin, AffiliatePortal, AffiliateRegister, AffiliateResetPassword, CartCheckoutPage, CheckoutPage, EmailTemplates, ForgotPasswordPage, MemberPortal, PatientDashboardPreview, RegisterPage, ResetPasswordPage, SignupPage, SubscribePage, SurveyPage, SurveyV2Page, UpdatePaymentMethod };
16790
- //# sourceMappingURL=OEXSGX5F.js.map
16791
- //# sourceMappingURL=OEXSGX5F.js.map
17118
+ //# sourceMappingURL=J4G52ET6.js.map
17119
+ //# sourceMappingURL=J4G52ET6.js.map