@apextelemed/partner-core 0.17.0-dev.53 → 0.17.0-dev.54
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +28 -1
- package/dist/api/index.d.ts +1 -1
- package/dist/api/index.js +3 -3
- package/dist/api/index.jsx +5 -3
- package/dist/chunk/{PDK3JMIW.jsx → BI7NBPCA.jsx} +30 -1
- package/dist/chunk/{XZJASVNG.jsx → CAG35QKZ.jsx} +5 -5
- package/dist/chunk/{2PME7R6L.jsx → DC24EAWT.jsx} +4 -4
- package/dist/chunk/{JDCV4T6O.js → F5PDIE2J.js} +6 -6
- package/dist/chunk/{JDCV4T6O.js.map → F5PDIE2J.js.map} +1 -1
- package/dist/chunk/{PW7F2JMV.jsx → HXBRBHFR.jsx} +2 -2
- package/dist/chunk/{DETBZTGQ.js → MQRPGAH7.js} +5 -5
- package/dist/chunk/{DETBZTGQ.js.map → MQRPGAH7.js.map} +1 -1
- package/dist/chunk/{NQLBWDE3.js → MUNFWRXF.js} +31 -3
- package/dist/chunk/MUNFWRXF.js.map +1 -0
- package/dist/chunk/{XGCOWLXF.jsx → P3TJ6ALH.jsx} +2 -2
- package/dist/chunk/{OOCYQ4I6.jsx → Q2L3CZPR.jsx} +2 -2
- package/dist/chunk/{Z745N7NE.jsx → VUDLDIMS.jsx} +1284 -832
- package/dist/chunk/{COIUOQOE.js → WTQ63KR4.js} +3 -3
- package/dist/chunk/{COIUOQOE.js.map → WTQ63KR4.js.map} +1 -1
- package/dist/chunk/{3VUCQNOR.js → XDRP4X2N.js} +3 -3
- package/dist/chunk/{3VUCQNOR.js.map → XDRP4X2N.js.map} +1 -1
- package/dist/chunk/{3VBKKYOR.js → XI4OZ4SZ.js} +3 -3
- package/dist/chunk/{3VBKKYOR.js.map → XI4OZ4SZ.js.map} +1 -1
- package/dist/chunk/{FDCDDUB6.js → Z5QDFCLZ.js} +966 -535
- package/dist/chunk/Z5QDFCLZ.js.map +1 -0
- package/dist/{client-JZfa9Gbp.d.ts → client-BH1wq2Pp.d.ts} +65 -1
- package/dist/flows/index.d.ts +1 -1
- package/dist/flows/index.js +6 -6
- package/dist/flows/index.jsx +6 -6
- package/dist/index/index.d.ts +2 -2
- package/dist/index/index.js +7 -7
- package/dist/index/index.jsx +11 -7
- package/dist/pages/index.d.ts +29 -3
- package/dist/pages/index.js +5 -5
- package/dist/pages/index.jsx +7 -5
- package/dist/stores/index.d.ts +1 -1
- package/dist/stores/index.js +2 -2
- package/dist/stores/index.jsx +2 -2
- package/package.json +1 -1
- package/dist/chunk/FDCDDUB6.js.map +0 -1
- package/dist/chunk/NQLBWDE3.js.map +0 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { disqualificationReasonText, qualifiedDrugIds } from './LZWA44KD.js';
|
|
2
|
-
import { SUPPORT_CATEGORIES, useSurveyFlow, reconcileCartAgainstCatalog, resolveSurveyV2DrugIntent, emailGateAnswered, redeemResumeLink, useSurveyV2Flow, US_STATE_OPTIONS, availableStateOptions, useCheckoutFlow, catalogUnavailableMessage, useCartCheckoutFlow, useSignupFlow, useRegisterFlow, useSubscribeFlow, useDashboardData, useUpdatePaymentMethodFlow, useMemberPortalData, useMessagesThread, captureFunnelEmail, markEmailGateAnswered, isCatalogItemId, subscribeToSupportTopic, useAffiliateStats, useAffiliateConversions, useAffiliateDownline, useAffiliateLinks, stateAvailabilityNote, hasStateRestrictions, uploadPrescriptionPhoto, deriveAttention, deriveJourney, buildTimeline, lifecycleReason, accountSource, intakeEvidence, LIFECYCLE_BUCKETS, LIFECYCLE_LABEL, classifyCatalogError, groupDrugsByPharmacy, useProductCatalogEditor, useStrengthMatches, skuBindingModeFor, isCssColorValue, categoryLabel, formatConversationTime, buildTrackerView, ACCOUNT_SOURCE_LABEL, fmtDay, createCatalogProduct, addCatalogItemAsProduct, applyPriceDrafts, resolveStrengthPrices, invalidDraftKeys, orphanKey, ORPHAN_REASON, useAddPharmacy, READINESS_LABEL, useCatalogConversion, formatCalendarDate, formatMessageTime, formatEventDate, formatStageDate, offerSummaryText, LIFECYCLE_TONE, buildTrackingUrl, buildStrengthRows, isLeftForReview, doseIdOf, pharmacyLabel, isImageAttachment, buildRefillView, toTrackerRequest, needsReview, visibleWarnings, compareStrengths, MATCH_DEPENDENT_WARNINGS, SOURCE_FIELD_NOTE, MATCH_HOW_LABEL, explainFinding, matchKey } from './
|
|
3
|
-
import { fetchFunnelConfig } from './
|
|
2
|
+
import { SUPPORT_CATEGORIES, useSurveyFlow, reconcileCartAgainstCatalog, resolveSurveyV2DrugIntent, emailGateAnswered, redeemResumeLink, useSurveyV2Flow, US_STATE_OPTIONS, availableStateOptions, useCheckoutFlow, catalogUnavailableMessage, useCartCheckoutFlow, useSignupFlow, useRegisterFlow, useSubscribeFlow, useDashboardData, useUpdatePaymentMethodFlow, useMemberPortalData, useMessagesThread, captureFunnelEmail, markEmailGateAnswered, isCatalogItemId, subscribeToSupportTopic, useAffiliateStats, useAffiliateConversions, useAffiliateDownline, useAffiliateLinks, stateAvailabilityNote, hasStateRestrictions, uploadPrescriptionPhoto, deriveAttention, deriveJourney, buildTimeline, lifecycleReason, accountSource, intakeEvidence, LIFECYCLE_BUCKETS, LIFECYCLE_LABEL, classifyCatalogError, groupDrugsByPharmacy, useProductCatalogEditor, useStrengthMatches, skuBindingModeFor, isCssColorValue, categoryLabel, formatConversationTime, buildTrackerView, ACCOUNT_SOURCE_LABEL, fmtDay, createCatalogProduct, addCatalogItemAsProduct, applyPriceDrafts, resolveStrengthPrices, invalidDraftKeys, orphanKey, ORPHAN_REASON, useAddPharmacy, READINESS_LABEL, useCatalogConversion, formatCalendarDate, formatMessageTime, formatEventDate, formatStageDate, offerSummaryText, LIFECYCLE_TONE, buildTrackingUrl, buildStrengthRows, isLeftForReview, doseIdOf, pharmacyLabel, isImageAttachment, buildRefillView, toTrackerRequest, needsReview, visibleWarnings, compareStrengths, MATCH_DEPENDENT_WARNINGS, SOURCE_FIELD_NOTE, MATCH_HOW_LABEL, explainFinding, matchKey } from './MQRPGAH7.js';
|
|
3
|
+
import { fetchFunnelConfig } from './WTQ63KR4.js';
|
|
4
4
|
import { usePrimitives } from './67KHO66G.js';
|
|
5
|
-
import { cart_default, auth_default, affiliateAuth_default } from './
|
|
6
|
-
import { usersApi, adminApi, membersApi, offersApi,
|
|
5
|
+
import { cart_default, auth_default, affiliateAuth_default } from './XI4OZ4SZ.js';
|
|
6
|
+
import { usersApi, adminApi, membersApi, offersApi, authApi, affiliatePortalApi, adminAffiliatesApi, apiFetch, apexApi, adminCatalogApi, SUPPORT_ATTACHMENT_MIME_TYPES, SUPPORT_ATTACHMENT_MAX_BYTES, ADMIN_ROLES, ApiError, subscriptionsApi } from './MUNFWRXF.js';
|
|
7
7
|
import { delegateEvents, createComponent, insert, memo, effect, setStyleProperty, mergeProps, use, setAttribute, addEventListener, style, className, Dynamic, Portal, template } from 'solid-js/web';
|
|
8
8
|
import { createContext, createSignal, createEffect, on, Show, For, createResource, createMemo, untrack, ErrorBoundary, Switch, Match, onMount, onCleanup, useContext, Index } from 'solid-js';
|
|
9
9
|
import { isQuestionVisible } from '@apextelemed/survey-core';
|
|
@@ -12178,6 +12178,11 @@ function SupportSummary(props) {
|
|
|
12178
12178
|
});
|
|
12179
12179
|
}
|
|
12180
12180
|
delegateEvents(["click"]);
|
|
12181
|
+
var [adminMe, setAdminMe] = createSignal(void 0);
|
|
12182
|
+
function adminCan(permission) {
|
|
12183
|
+
const me = adminMe();
|
|
12184
|
+
return me ? me.permissions.includes(permission) : true;
|
|
12185
|
+
}
|
|
12181
12186
|
|
|
12182
12187
|
// src/pages/admin/customers/CustomerDetail.tsx
|
|
12183
12188
|
var _tmpl$191 = /* @__PURE__ */ template(`<div class=app-admin-detail>`);
|
|
@@ -12197,7 +12202,7 @@ var _tmpl$1212 = /* @__PURE__ */ template(`<p class=app-admin-text-muted style=m
|
|
|
12197
12202
|
var _tmpl$1310 = /* @__PURE__ */ template(`<div class=app-admin-table-wrap><table class=app-admin-table><thead><tr><th>Date</th><th>Items</th><th>Total</th><th>Status</th></tr></thead><tbody>`);
|
|
12198
12203
|
var _tmpl$1410 = /* @__PURE__ */ template(`<p class=app-admin-text-muted style=margin:0;font-size:0.875rem>No subscriptions.`);
|
|
12199
12204
|
var _tmpl$1510 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-ghost app-admin-btn-sm"title="Cancel any prescription request still awaiting prescriber review. Approved and completed prescriptions are untouched.">`);
|
|
12200
|
-
var _tmpl$1610 = /* @__PURE__ */ template(`<p class=app-admin-text-muted style=margin:0;font-size:0.875rem
|
|
12205
|
+
var _tmpl$1610 = /* @__PURE__ */ template(`<p class=app-admin-text-muted style=margin:0;font-size:0.875rem>`);
|
|
12201
12206
|
var _tmpl$1710 = /* @__PURE__ */ template(`<tr><td data-label=Date class=app-admin-text-muted></td><td data-label=Items></td><td data-label=Total></td><td data-label=Status>`);
|
|
12202
12207
|
var _tmpl$1810 = /* @__PURE__ */ template(`<button type=button class=app-admin-link-btn>`);
|
|
12203
12208
|
var _tmpl$199 = /* @__PURE__ */ template(`<p class=app-admin-text-muted style=margin:0;font-size:0.875rem>Nothing recorded yet.`);
|
|
@@ -12704,16 +12709,21 @@ function CustomerDetail(props) {
|
|
|
12704
12709
|
return ov().requests.items.length;
|
|
12705
12710
|
},
|
|
12706
12711
|
get action() {
|
|
12707
|
-
return (
|
|
12708
|
-
|
|
12709
|
-
|
|
12710
|
-
|
|
12711
|
-
|
|
12712
|
-
|
|
12713
|
-
|
|
12714
|
-
|
|
12715
|
-
|
|
12716
|
-
|
|
12712
|
+
return createComponent(Show, {
|
|
12713
|
+
get when() {
|
|
12714
|
+
return adminCan("patient.support");
|
|
12715
|
+
},
|
|
12716
|
+
get children() {
|
|
12717
|
+
var _el$31 = _tmpl$1510();
|
|
12718
|
+
_el$31.$$click = handleCancelUnapprovedRequests;
|
|
12719
|
+
insert(_el$31, (() => {
|
|
12720
|
+
var _c$ = memo(() => busy() === "cancel-requests");
|
|
12721
|
+
return () => _c$() ? "Canceling\u2026" : memo(() => pendingRequests().length > 0)() ? `Cancel unapproved requests (${pendingRequests().length})` : "Cancel unapproved requests";
|
|
12722
|
+
})());
|
|
12723
|
+
effect(() => _el$31.disabled = busy() === "cancel-requests");
|
|
12724
|
+
return _el$31;
|
|
12725
|
+
}
|
|
12726
|
+
});
|
|
12717
12727
|
},
|
|
12718
12728
|
get children() {
|
|
12719
12729
|
return createComponent(Show, {
|
|
@@ -12721,7 +12731,11 @@ function CustomerDetail(props) {
|
|
|
12721
12731
|
return ov().requests.items.length > 0;
|
|
12722
12732
|
},
|
|
12723
12733
|
get fallback() {
|
|
12724
|
-
return
|
|
12734
|
+
return (() => {
|
|
12735
|
+
var _el$32 = _tmpl$1610();
|
|
12736
|
+
insert(_el$32, () => ov().rxRedacted ? "Prescription details aren't shown for your admin role." : "No prescription requests.");
|
|
12737
|
+
return _el$32;
|
|
12738
|
+
})();
|
|
12725
12739
|
},
|
|
12726
12740
|
get children() {
|
|
12727
12741
|
var _el$24 = _tmpl$1115();
|
|
@@ -25766,14 +25780,369 @@ function Features() {
|
|
|
25766
25780
|
})();
|
|
25767
25781
|
}
|
|
25768
25782
|
delegateEvents(["click", "input"]);
|
|
25783
|
+
var _tmpl$401 = /* @__PURE__ */ template(`<div style="padding:0.625rem 0.875rem;background:var(--app-affiliate-danger-bg);color:var(--app-affiliate-danger-fg);border-radius:var(--app-affiliate-radius-sm);font-size:0.875rem">`);
|
|
25784
|
+
var _tmpl$2126 = /* @__PURE__ */ template(`<form style=display:flex;flex-direction:column;gap:0.875rem><label style=display:flex;flex-direction:column;gap:0.35rem><span>Choose a password</span><input type=password required autocomplete=new-password></label><label style=display:flex;flex-direction:column;gap:0.35rem><span>Confirm password</span><input type=password required autocomplete=new-password></label><button type=submit style="padding:0.75rem 1rem;background:var(--app-affiliate-primary);color:var(--app-affiliate-primary-fg);border:none;border-radius:var(--app-affiliate-radius-sm);font-weight:600">`);
|
|
25785
|
+
var _tmpl$3102 = /* @__PURE__ */ template(`<div class=app-affiliate-root style="background:var(--app-affiliate-bg);color:var(--app-affiliate-fg);min-height:100vh;display:flex;align-items:center;justify-content:center;padding:2rem 1rem"><div style="width:100%;max-width:24rem;background:var(--app-affiliate-surface);border:1px solid var(--app-affiliate-border);border-radius:var(--app-affiliate-radius);padding:2rem;display:flex;flex-direction:column;gap:1.25rem"><h1 style=font-family:var(--app-affiliate-font-display);margin:0;font-size:1.5rem>Accept your admin invite`);
|
|
25786
|
+
var _tmpl$470 = /* @__PURE__ */ template(`<div style="padding:0.625rem 0.875rem;background:var(--app-affiliate-surface-light);border-radius:var(--app-affiliate-radius-sm);font-size:0.875rem">`);
|
|
25787
|
+
function queryParam(name) {
|
|
25788
|
+
if (typeof window === "undefined") return "";
|
|
25789
|
+
return new URLSearchParams(window.location.search).get(name) ?? "";
|
|
25790
|
+
}
|
|
25791
|
+
var MIN_PASSWORD_LENGTH = 8;
|
|
25792
|
+
var ADMIN_INVITE_PARAM = "adminInvite";
|
|
25793
|
+
function isAdminInviteLink() {
|
|
25794
|
+
return typeof window !== "undefined" && new URLSearchParams(window.location.search).has(ADMIN_INVITE_PARAM);
|
|
25795
|
+
}
|
|
25796
|
+
function AcceptAdminInvitePage(props) {
|
|
25797
|
+
const token = () => props.token ?? queryParam("token");
|
|
25798
|
+
const email = () => props.email ?? queryParam("email");
|
|
25799
|
+
const [password, setPassword] = createSignal("");
|
|
25800
|
+
const [confirm2, setConfirm] = createSignal("");
|
|
25801
|
+
const [submitting, setSubmitting] = createSignal(false);
|
|
25802
|
+
const [error, setError] = createSignal(null);
|
|
25803
|
+
const [message, setMessage] = createSignal(null);
|
|
25804
|
+
async function handleSubmit(e) {
|
|
25805
|
+
e.preventDefault();
|
|
25806
|
+
setError(null);
|
|
25807
|
+
if (!token() || !email()) {
|
|
25808
|
+
setError("This invite link is incomplete. Ask the person who invited you to send a new one.");
|
|
25809
|
+
return;
|
|
25810
|
+
}
|
|
25811
|
+
if (password().length < MIN_PASSWORD_LENGTH) {
|
|
25812
|
+
setError(`Use at least ${MIN_PASSWORD_LENGTH} characters.`);
|
|
25813
|
+
return;
|
|
25814
|
+
}
|
|
25815
|
+
if (password() !== confirm2()) {
|
|
25816
|
+
setError("Passwords do not match.");
|
|
25817
|
+
return;
|
|
25818
|
+
}
|
|
25819
|
+
setSubmitting(true);
|
|
25820
|
+
try {
|
|
25821
|
+
await authApi.acceptAdminInvite({
|
|
25822
|
+
email: email().trim().toLowerCase(),
|
|
25823
|
+
token: token(),
|
|
25824
|
+
password: password()
|
|
25825
|
+
});
|
|
25826
|
+
setMessage("You\u2019re all set. Sign in with this email and your new password.");
|
|
25827
|
+
props.onSuccess?.();
|
|
25828
|
+
} catch (err) {
|
|
25829
|
+
setError(err instanceof Error ? err.message : "Something went wrong");
|
|
25830
|
+
} finally {
|
|
25831
|
+
setSubmitting(false);
|
|
25832
|
+
}
|
|
25833
|
+
}
|
|
25834
|
+
return (() => {
|
|
25835
|
+
var _el$ = _tmpl$3102(), _el$2 = _el$.firstChild; _el$2.firstChild;
|
|
25836
|
+
insert(_el$2, createComponent(Show, {
|
|
25837
|
+
get when() {
|
|
25838
|
+
return !message();
|
|
25839
|
+
},
|
|
25840
|
+
get fallback() {
|
|
25841
|
+
return (() => {
|
|
25842
|
+
var _el$11 = _tmpl$470();
|
|
25843
|
+
insert(_el$11, message);
|
|
25844
|
+
return _el$11;
|
|
25845
|
+
})();
|
|
25846
|
+
},
|
|
25847
|
+
get children() {
|
|
25848
|
+
var _el$4 = _tmpl$2126(), _el$5 = _el$4.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling, _el$8 = _el$5.nextSibling, _el$9 = _el$8.firstChild, _el$0 = _el$9.nextSibling, _el$10 = _el$8.nextSibling;
|
|
25849
|
+
_el$4.addEventListener("submit", handleSubmit);
|
|
25850
|
+
_el$7.$$input = (e) => setPassword(e.currentTarget.value);
|
|
25851
|
+
_el$0.$$input = (e) => setConfirm(e.currentTarget.value);
|
|
25852
|
+
insert(_el$4, createComponent(Show, {
|
|
25853
|
+
get when() {
|
|
25854
|
+
return error();
|
|
25855
|
+
},
|
|
25856
|
+
get children() {
|
|
25857
|
+
var _el$1 = _tmpl$401();
|
|
25858
|
+
insert(_el$1, error);
|
|
25859
|
+
return _el$1;
|
|
25860
|
+
}
|
|
25861
|
+
}), _el$10);
|
|
25862
|
+
insert(_el$10, () => submitting() ? "Saving\u2026" : "Accept invite");
|
|
25863
|
+
effect((_p$) => {
|
|
25864
|
+
var _v$ = labelStyle(), _v$2 = inputStyle(), _v$3 = labelStyle(), _v$4 = inputStyle(), _v$5 = submitting(), _v$6 = submitting() ? "not-allowed" : "pointer", _v$7 = submitting() ? 0.7 : 1;
|
|
25865
|
+
_p$.e = style(_el$6, _v$, _p$.e);
|
|
25866
|
+
_p$.t = style(_el$7, _v$2, _p$.t);
|
|
25867
|
+
_p$.a = style(_el$9, _v$3, _p$.a);
|
|
25868
|
+
_p$.o = style(_el$0, _v$4, _p$.o);
|
|
25869
|
+
_v$5 !== _p$.i && (_el$10.disabled = _p$.i = _v$5);
|
|
25870
|
+
_v$6 !== _p$.n && setStyleProperty(_el$10, "cursor", _p$.n = _v$6);
|
|
25871
|
+
_v$7 !== _p$.s && setStyleProperty(_el$10, "opacity", _p$.s = _v$7);
|
|
25872
|
+
return _p$;
|
|
25873
|
+
}, {
|
|
25874
|
+
e: void 0,
|
|
25875
|
+
t: void 0,
|
|
25876
|
+
a: void 0,
|
|
25877
|
+
o: void 0,
|
|
25878
|
+
i: void 0,
|
|
25879
|
+
n: void 0,
|
|
25880
|
+
s: void 0
|
|
25881
|
+
});
|
|
25882
|
+
effect(() => _el$7.value = password());
|
|
25883
|
+
effect(() => _el$0.value = confirm2());
|
|
25884
|
+
return _el$4;
|
|
25885
|
+
}
|
|
25886
|
+
}), null);
|
|
25887
|
+
return _el$;
|
|
25888
|
+
})();
|
|
25889
|
+
}
|
|
25890
|
+
function labelStyle() {
|
|
25891
|
+
return {
|
|
25892
|
+
"font-size": "0.75rem",
|
|
25893
|
+
"text-transform": "uppercase",
|
|
25894
|
+
"letter-spacing": "0.05em",
|
|
25895
|
+
color: "var(--app-affiliate-fg-muted)"
|
|
25896
|
+
};
|
|
25897
|
+
}
|
|
25898
|
+
function inputStyle() {
|
|
25899
|
+
return {
|
|
25900
|
+
width: "100%",
|
|
25901
|
+
padding: "0.625rem 0.75rem",
|
|
25902
|
+
background: "var(--app-affiliate-surface-light)",
|
|
25903
|
+
color: "var(--app-affiliate-fg)",
|
|
25904
|
+
border: "1px solid var(--app-affiliate-border)",
|
|
25905
|
+
"border-radius": "var(--app-affiliate-radius-sm)",
|
|
25906
|
+
"font-size": "0.9rem",
|
|
25907
|
+
"font-family": "inherit",
|
|
25908
|
+
"box-sizing": "border-box"
|
|
25909
|
+
};
|
|
25910
|
+
}
|
|
25911
|
+
delegateEvents(["input"]);
|
|
25912
|
+
|
|
25913
|
+
// src/pages/admin/Admins.tsx
|
|
25914
|
+
var _tmpl$407 = /* @__PURE__ */ template(`<option value disabled>Unknown role`);
|
|
25915
|
+
var _tmpl$2127 = /* @__PURE__ */ template(`<select class=app-admin-input>`);
|
|
25916
|
+
var _tmpl$3103 = /* @__PURE__ */ template(`<option>`);
|
|
25917
|
+
var _tmpl$471 = /* @__PURE__ */ template(`<div class=app-admin-card-soft style="padding:0.625rem 0.875rem;margin-top:0.75rem;font-size:0.875rem">`);
|
|
25918
|
+
var _tmpl$560 = /* @__PURE__ */ template(`<table class=app-admin-table><thead><tr><th>Admin</th><th>Role</th><th style=text-align:right></th></tr></thead><tbody>`);
|
|
25919
|
+
var _tmpl$656 = /* @__PURE__ */ template(`<div class=app-admin-heading style="font-size:1rem;margin:1.5rem 0 0.5rem">Pending invites`);
|
|
25920
|
+
var _tmpl$749 = /* @__PURE__ */ template(`<table class=app-admin-table><thead><tr><th>Email</th><th>Role when they join</th><th>Expires</th><th style=text-align:right></th></tr></thead><tbody>`);
|
|
25921
|
+
var _tmpl$842 = /* @__PURE__ */ template(`<div><form class=app-admin-card style=padding:1rem;margin-bottom:1.5rem><div class=app-admin-heading style=font-size:1rem;margin-bottom:0.75rem>Invite an admin</div><div style=display:flex;gap:0.75rem;flex-wrap:wrap;align-items:flex-end><label style="display:flex;flex-direction:column;gap:0.25rem;flex:1 1 16rem"><span class=app-admin-label>Email</span><input class=app-admin-input type=email required placeholder=name@example.com></label><label style=display:flex;flex-direction:column;gap:0.25rem><span class=app-admin-label>Role</span></label><button type=submit class="app-admin-btn app-admin-btn-primary"></button></div><div class=app-admin-text-muted style=font-size:0.8125rem;margin-top:0.5rem>: `);
|
|
25922
|
+
var _tmpl$939 = /* @__PURE__ */ template(`<span class=app-admin-text-muted> (you)`);
|
|
25923
|
+
var _tmpl$035 = /* @__PURE__ */ template(`<tr><td></td><td></td><td style=text-align:right><button type=button class="app-admin-btn app-admin-btn-ghost">Remove`);
|
|
25924
|
+
var _tmpl$1134 = /* @__PURE__ */ template(`<tr><td></td><td></td><td class=app-admin-text-muted></td><td style=text-align:right><button type=button class="app-admin-btn app-admin-btn-ghost">Withdraw`);
|
|
25925
|
+
var ADMIN_ROLE_SUMMARY = {
|
|
25926
|
+
owner: "Everything, including managing admins",
|
|
25927
|
+
support: "Customers, patient records, support, subscriptions and refunds",
|
|
25928
|
+
accounting: "Payments, refunds and subscriptions \u2014 no patient prescription data",
|
|
25929
|
+
marketing: "Funnel, promotions, catalog and email copy \u2014 no patient data"
|
|
25930
|
+
};
|
|
25931
|
+
var ROLE_LABEL = {
|
|
25932
|
+
owner: "Owner",
|
|
25933
|
+
support: "Support agent",
|
|
25934
|
+
accounting: "Accounting",
|
|
25935
|
+
marketing: "Marketing"
|
|
25936
|
+
};
|
|
25937
|
+
function defaultAcceptUrl() {
|
|
25938
|
+
if (typeof window === "undefined") return "";
|
|
25939
|
+
return `${window.location.origin}${window.location.pathname}?${ADMIN_INVITE_PARAM}=1`;
|
|
25940
|
+
}
|
|
25941
|
+
function RoleSelect(props) {
|
|
25942
|
+
return (() => {
|
|
25943
|
+
var _el$ = _tmpl$2127();
|
|
25944
|
+
_el$.addEventListener("change", (e) => props.onChange(e.currentTarget.value));
|
|
25945
|
+
insert(_el$, createComponent(Show, {
|
|
25946
|
+
get when() {
|
|
25947
|
+
return props.value === null;
|
|
25948
|
+
},
|
|
25949
|
+
get children() {
|
|
25950
|
+
return _tmpl$407();
|
|
25951
|
+
}
|
|
25952
|
+
}), null);
|
|
25953
|
+
insert(_el$, createComponent(For, {
|
|
25954
|
+
each: ADMIN_ROLES,
|
|
25955
|
+
children: (r) => (() => {
|
|
25956
|
+
var _el$3 = _tmpl$3103();
|
|
25957
|
+
_el$3.value = r;
|
|
25958
|
+
insert(_el$3, () => ROLE_LABEL[r]);
|
|
25959
|
+
return _el$3;
|
|
25960
|
+
})()
|
|
25961
|
+
}), null);
|
|
25962
|
+
effect(() => _el$.disabled = props.disabled);
|
|
25963
|
+
effect(() => _el$.value = props.value ?? "");
|
|
25964
|
+
return _el$;
|
|
25965
|
+
})();
|
|
25966
|
+
}
|
|
25967
|
+
function Admins(props) {
|
|
25968
|
+
const [team, {
|
|
25969
|
+
refetch
|
|
25970
|
+
}] = createResource(() => adminApi.listAdminTeam());
|
|
25971
|
+
const [email, setEmail] = createSignal("");
|
|
25972
|
+
const [role, setRole] = createSignal("marketing");
|
|
25973
|
+
const [inviting, setInviting] = createSignal(false);
|
|
25974
|
+
const [apexNote, setApexNote] = createSignal(null);
|
|
25975
|
+
async function run(action, success) {
|
|
25976
|
+
try {
|
|
25977
|
+
await action();
|
|
25978
|
+
toastSuccess(success);
|
|
25979
|
+
} catch (err) {
|
|
25980
|
+
toastError(err instanceof Error ? err.message : "Something went wrong");
|
|
25981
|
+
}
|
|
25982
|
+
await refetch();
|
|
25983
|
+
}
|
|
25984
|
+
async function invite(e) {
|
|
25985
|
+
e.preventDefault();
|
|
25986
|
+
const address = email().trim().toLowerCase();
|
|
25987
|
+
if (!address) return;
|
|
25988
|
+
setInviting(true);
|
|
25989
|
+
setApexNote(null);
|
|
25990
|
+
try {
|
|
25991
|
+
const result = await adminApi.inviteAdmin({
|
|
25992
|
+
email: address,
|
|
25993
|
+
adminRole: role(),
|
|
25994
|
+
acceptUrl: props.acceptInviteUrl ?? defaultAcceptUrl()
|
|
25995
|
+
});
|
|
25996
|
+
if (result.apexInviteRequired) {
|
|
25997
|
+
setApexNote(`${address} will be a ${ROLE_LABEL[role()]} once they sign in. This site's admins sign in with their Apex partner portal account, so also invite them as a user there.`);
|
|
25998
|
+
toastSuccess("Role saved for their first sign-in");
|
|
25999
|
+
} else {
|
|
26000
|
+
toastSuccess(`Invite sent to ${address}`);
|
|
26001
|
+
}
|
|
26002
|
+
setEmail("");
|
|
26003
|
+
setRole("marketing");
|
|
26004
|
+
} catch (err) {
|
|
26005
|
+
toastError(err instanceof Error ? err.message : "Failed to send invite");
|
|
26006
|
+
} finally {
|
|
26007
|
+
setInviting(false);
|
|
26008
|
+
await refetch();
|
|
26009
|
+
}
|
|
26010
|
+
}
|
|
26011
|
+
const changeRole = (a, next) => run(() => adminApi.setAdminRole(a.id, next), `${a.email} is now ${ROLE_LABEL[next]}`);
|
|
26012
|
+
const remove = (a) => {
|
|
26013
|
+
if (!window.confirm(`Remove admin access for ${a.email}? Their account stays; they just can't use the admin.`)) return;
|
|
26014
|
+
void run(() => adminApi.removeAdmin(a.id), `Removed ${a.email}`);
|
|
26015
|
+
};
|
|
26016
|
+
const changeInviteRole = (i, next) => run(() => adminApi.updateAdminInvite(i.id, next), `${i.email} will join as ${ROLE_LABEL[next]}`);
|
|
26017
|
+
const cancelInvite = (i) => {
|
|
26018
|
+
if (!window.confirm(`Withdraw the invite for ${i.email}?`)) return;
|
|
26019
|
+
void run(() => adminApi.cancelAdminInvite(i.id), `Invite for ${i.email} withdrawn`);
|
|
26020
|
+
};
|
|
26021
|
+
const isMe = (a) => adminMe()?.uid === a.id;
|
|
26022
|
+
return (() => {
|
|
26023
|
+
var _el$4 = _tmpl$842(), _el$5 = _el$4.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling, _el$8 = _el$7.firstChild, _el$9 = _el$8.firstChild, _el$0 = _el$9.nextSibling, _el$1 = _el$8.nextSibling; _el$1.firstChild; var _el$11 = _el$1.nextSibling, _el$12 = _el$7.nextSibling, _el$13 = _el$12.firstChild;
|
|
26024
|
+
insert(_el$4, createComponent(PageTitle, {
|
|
26025
|
+
subtitle: "Who can use this admin, and what each person can see and do.",
|
|
26026
|
+
children: "Admins"
|
|
26027
|
+
}), _el$5);
|
|
26028
|
+
_el$5.addEventListener("submit", invite);
|
|
26029
|
+
_el$0.$$input = (e) => setEmail(e.currentTarget.value);
|
|
26030
|
+
insert(_el$1, createComponent(RoleSelect, {
|
|
26031
|
+
get value() {
|
|
26032
|
+
return role();
|
|
26033
|
+
},
|
|
26034
|
+
onChange: setRole
|
|
26035
|
+
}), null);
|
|
26036
|
+
insert(_el$11, () => inviting() ? "Sending\u2026" : "Send invite");
|
|
26037
|
+
insert(_el$12, () => ROLE_LABEL[role()], _el$13);
|
|
26038
|
+
insert(_el$12, () => ADMIN_ROLE_SUMMARY[role()], null);
|
|
26039
|
+
insert(_el$5, createComponent(Show, {
|
|
26040
|
+
get when() {
|
|
26041
|
+
return apexNote();
|
|
26042
|
+
},
|
|
26043
|
+
get children() {
|
|
26044
|
+
var _el$14 = _tmpl$471();
|
|
26045
|
+
insert(_el$14, apexNote);
|
|
26046
|
+
return _el$14;
|
|
26047
|
+
}
|
|
26048
|
+
}), null);
|
|
26049
|
+
insert(_el$4, createComponent(Show, {
|
|
26050
|
+
get when() {
|
|
26051
|
+
return !team.loading;
|
|
26052
|
+
},
|
|
26053
|
+
get fallback() {
|
|
26054
|
+
return createComponent(LoadingSpinner, {});
|
|
26055
|
+
},
|
|
26056
|
+
get children() {
|
|
26057
|
+
return createComponent(Show, {
|
|
26058
|
+
get when() {
|
|
26059
|
+
return !team.error;
|
|
26060
|
+
},
|
|
26061
|
+
get fallback() {
|
|
26062
|
+
return createComponent(EmptyState, {
|
|
26063
|
+
message: "Couldn't load the admin team."
|
|
26064
|
+
});
|
|
26065
|
+
},
|
|
26066
|
+
get children() {
|
|
26067
|
+
return [(() => {
|
|
26068
|
+
var _el$15 = _tmpl$560(), _el$16 = _el$15.firstChild, _el$17 = _el$16.firstChild, _el$18 = _el$17.firstChild, _el$19 = _el$18.nextSibling; _el$19.nextSibling; var _el$21 = _el$16.nextSibling;
|
|
26069
|
+
insert(_el$21, createComponent(For, {
|
|
26070
|
+
get each() {
|
|
26071
|
+
return team()?.admins ?? [];
|
|
26072
|
+
},
|
|
26073
|
+
children: (a) => (() => {
|
|
26074
|
+
var _el$31 = _tmpl$035(), _el$32 = _el$31.firstChild, _el$34 = _el$32.nextSibling, _el$35 = _el$34.nextSibling, _el$36 = _el$35.firstChild;
|
|
26075
|
+
insert(_el$32, () => a.email, null);
|
|
26076
|
+
insert(_el$32, createComponent(Show, {
|
|
26077
|
+
get when() {
|
|
26078
|
+
return isMe(a);
|
|
26079
|
+
},
|
|
26080
|
+
get children() {
|
|
26081
|
+
return _tmpl$939();
|
|
26082
|
+
}
|
|
26083
|
+
}), null);
|
|
26084
|
+
insert(_el$34, createComponent(RoleSelect, {
|
|
26085
|
+
get value() {
|
|
26086
|
+
return a.adminRole;
|
|
26087
|
+
},
|
|
26088
|
+
onChange: (r) => void changeRole(a, r)
|
|
26089
|
+
}));
|
|
26090
|
+
_el$36.$$click = () => remove(a);
|
|
26091
|
+
return _el$31;
|
|
26092
|
+
})()
|
|
26093
|
+
}));
|
|
26094
|
+
return _el$15;
|
|
26095
|
+
})(), createComponent(Show, {
|
|
26096
|
+
get when() {
|
|
26097
|
+
return (team()?.invites ?? []).length > 0;
|
|
26098
|
+
},
|
|
26099
|
+
get children() {
|
|
26100
|
+
return [_tmpl$656(), (() => {
|
|
26101
|
+
var _el$23 = _tmpl$749(), _el$24 = _el$23.firstChild, _el$25 = _el$24.firstChild, _el$26 = _el$25.firstChild, _el$27 = _el$26.nextSibling, _el$28 = _el$27.nextSibling; _el$28.nextSibling; var _el$30 = _el$24.nextSibling;
|
|
26102
|
+
insert(_el$30, createComponent(For, {
|
|
26103
|
+
get each() {
|
|
26104
|
+
return team()?.invites ?? [];
|
|
26105
|
+
},
|
|
26106
|
+
children: (i) => (() => {
|
|
26107
|
+
var _el$37 = _tmpl$1134(), _el$38 = _el$37.firstChild, _el$39 = _el$38.nextSibling, _el$40 = _el$39.nextSibling, _el$41 = _el$40.nextSibling, _el$42 = _el$41.firstChild;
|
|
26108
|
+
insert(_el$38, () => i.email);
|
|
26109
|
+
insert(_el$39, createComponent(RoleSelect, {
|
|
26110
|
+
get value() {
|
|
26111
|
+
return i.adminRole;
|
|
26112
|
+
},
|
|
26113
|
+
onChange: (r) => void changeInviteRole(i, r)
|
|
26114
|
+
}));
|
|
26115
|
+
insert(_el$40, (() => {
|
|
26116
|
+
var _c$ = memo(() => !!i.expiresAt);
|
|
26117
|
+
return () => _c$() ? new Date(i.expiresAt).toLocaleDateString() : "At first sign-in";
|
|
26118
|
+
})());
|
|
26119
|
+
_el$42.$$click = () => cancelInvite(i);
|
|
26120
|
+
return _el$37;
|
|
26121
|
+
})()
|
|
26122
|
+
}));
|
|
26123
|
+
return _el$23;
|
|
26124
|
+
})()];
|
|
26125
|
+
}
|
|
26126
|
+
})];
|
|
26127
|
+
}
|
|
26128
|
+
});
|
|
26129
|
+
}
|
|
26130
|
+
}), null);
|
|
26131
|
+
effect(() => _el$11.disabled = inviting());
|
|
26132
|
+
effect(() => _el$0.value = email());
|
|
26133
|
+
return _el$4;
|
|
26134
|
+
})();
|
|
26135
|
+
}
|
|
26136
|
+
delegateEvents(["input", "click"]);
|
|
25769
26137
|
|
|
25770
26138
|
// src/pages/AdminDashboard.tsx
|
|
25771
|
-
var _tmpl$
|
|
25772
|
-
var _tmpl$
|
|
25773
|
-
var _tmpl$
|
|
25774
|
-
var _tmpl$
|
|
25775
|
-
var _tmpl$
|
|
25776
|
-
var _tmpl$
|
|
26139
|
+
var _tmpl$408 = /* @__PURE__ */ template(`<span style=font-size:1rem;opacity:0.7;flex-shrink:0>`);
|
|
26140
|
+
var _tmpl$2128 = /* @__PURE__ */ template(`<button type=button style="display:flex;align-items:center;gap:0.75rem;padding:0.625rem 0.75rem;border-radius:var(--app-admin-radius-sm);font-size:0.875rem;font-weight:500;text-align:left;border:none;cursor:pointer">`);
|
|
26141
|
+
var _tmpl$3104 = /* @__PURE__ */ template(`<div class="app-admin-root app-admin-shell"data-scrollable style=position:sticky><div class=app-admin-shell-header><button type=button class=app-admin-shell-menu-trigger aria-label="Open admin menu"><svg width=22 height=22 viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round aria-hidden=true><line x1=3 y1=6 x2=21 y2=6></line><line x1=3 y1=12 x2=21 y2=12></line><line x1=3 y1=18 x2=21 y2=18></line></svg></button><span class=app-admin-shell-header-title></span></div><div class=app-admin-backdrop aria-hidden=true></div><aside class=app-admin-sidebar><div style=padding:1.25rem><h2 style="font-size:0.7rem;font-weight:500;color:var(--app-admin-fg-muted);text-transform:uppercase;letter-spacing:0.08em;margin:0 0 1rem">Admin Panel</h2><nav style=display:flex;flex-direction:column;gap:0.25rem></nav></div></aside><div class=app-admin-content>`);
|
|
26142
|
+
var _tmpl$475 = /* @__PURE__ */ template(`<h3 style="font-size:0.625rem;font-weight:600;color:var(--app-admin-fg-muted);text-transform:uppercase;letter-spacing:0.08em;margin:1rem 0 0.375rem;padding:0 0.75rem">`);
|
|
26143
|
+
var _tmpl$561 = /* @__PURE__ */ template(`<div role=alert style="margin:1rem 0;padding:1.25rem 1.5rem;border:1px solid var(--app-admin-border);border-radius:var(--app-admin-radius-sm);background:var(--app-admin-surface);color:var(--app-admin-fg)"><div style=font-weight:600;margin-bottom:0.375rem>Not available for your role</div><div style=color:var(--app-admin-fg-muted);font-size:0.875rem>Ask an owner of this site if you need access to this section.`);
|
|
26144
|
+
var _tmpl$657 = /* @__PURE__ */ template(`<div role=alert style="margin:1rem 0;padding:1.25rem 1.5rem;border:1px solid var(--app-admin-border);border-radius:var(--app-admin-radius-sm);background:var(--app-admin-surface);color:var(--app-admin-fg)"><div style=font-weight:600;margin-bottom:0.375rem>This section failed to load</div><div style=font-size:0.875rem;color:var(--app-admin-fg-muted);margin-bottom:1rem;word-break:break-word></div><button type=button style="padding:0.5rem 0.875rem;border-radius:var(--app-admin-radius-sm);border:1px solid var(--app-admin-border);background:var(--app-admin-primary-soft);color:var(--app-admin-primary-soft-fg);font-size:0.875rem;font-weight:500;cursor:pointer">Try again`);
|
|
26145
|
+
var _tmpl$750 = /* @__PURE__ */ template(`<div class=app-admin-root style=display:flex;align-items:center;justify-content:center;position:sticky;background:var(--app-admin-bg)><div role=status aria-label="Loading admin"style="width:1.75rem;height:1.75rem;border-radius:9999px;border:2px solid var(--app-admin-border);border-top-color:var(--app-admin-primary);animation:app-admin-gate-spin 0.8s linear infinite"></div><style>@keyframes app-admin-gate-spin { to { transform: rotate(360deg); } }`);
|
|
25777
26146
|
var TAB_LABELS = {
|
|
25778
26147
|
dashboard: "Dashboard",
|
|
25779
26148
|
customers: "Customers",
|
|
@@ -25792,7 +26161,34 @@ var TAB_LABELS = {
|
|
|
25792
26161
|
funnel: "Funnel",
|
|
25793
26162
|
sequences: "Sequences",
|
|
25794
26163
|
"sequence-results": "Results",
|
|
25795
|
-
features: "Features"
|
|
26164
|
+
features: "Features",
|
|
26165
|
+
admins: "Admins"
|
|
26166
|
+
};
|
|
26167
|
+
var TAB_PERMISSION = {
|
|
26168
|
+
dashboard: null,
|
|
26169
|
+
customers: "customers.read",
|
|
26170
|
+
payments: "billing.read",
|
|
26171
|
+
subscriptions: "customers.read",
|
|
26172
|
+
products: "catalog.read",
|
|
26173
|
+
categories: "catalog.read",
|
|
26174
|
+
sales: "promotions.read",
|
|
26175
|
+
"promo-codes": "promotions.read",
|
|
26176
|
+
offers: "promotions.read",
|
|
26177
|
+
affiliates: "affiliates.read",
|
|
26178
|
+
support: "patient.support",
|
|
26179
|
+
webhooks: "patient.support",
|
|
26180
|
+
"email-templates": "emailTemplates.write",
|
|
26181
|
+
funnel: "funnel.read",
|
|
26182
|
+
sequences: "funnel.read",
|
|
26183
|
+
"sequence-results": "funnel.read",
|
|
26184
|
+
"email-notifications": "settings.write",
|
|
26185
|
+
features: "settings.write",
|
|
26186
|
+
admins: "admins.manage"
|
|
26187
|
+
};
|
|
26188
|
+
var roleAllows = (tab) => {
|
|
26189
|
+
const permission = TAB_PERMISSION[tab];
|
|
26190
|
+
if (permission === null) return true;
|
|
26191
|
+
return adminMe() !== void 0 && adminCan(permission);
|
|
25796
26192
|
};
|
|
25797
26193
|
var DEFAULT_TOP_TABS = ["dashboard"];
|
|
25798
26194
|
var DEFAULT_TAB_GROUPS = [
|
|
@@ -25823,12 +26219,12 @@ var DEFAULT_TAB_GROUPS = [
|
|
|
25823
26219
|
// What this site has switched on, and what it can ask for.
|
|
25824
26220
|
{
|
|
25825
26221
|
label: "Settings",
|
|
25826
|
-
tabs: ["features"]
|
|
26222
|
+
tabs: ["features", "admins"]
|
|
25827
26223
|
}
|
|
25828
26224
|
];
|
|
25829
26225
|
var filterEnabled = (tabs, enabled) => enabled ? tabs.filter((t) => enabled.includes(t)) : tabs;
|
|
25830
26226
|
function AdminDashboard(props) {
|
|
25831
|
-
const withoutHidden = (tabs) => supportChannelMode() === "email" ? tabs.filter((t) => t !== "support") : tabs;
|
|
26227
|
+
const withoutHidden = (tabs) => (supportChannelMode() === "email" ? tabs.filter((t) => t !== "support") : tabs).filter(roleAllows);
|
|
25832
26228
|
const visibleTopTabs = () => withoutHidden(filterEnabled(props.topTabs ?? DEFAULT_TOP_TABS, props.enabledTabs));
|
|
25833
26229
|
const visibleGroups = () => (props.tabGroups ?? DEFAULT_TAB_GROUPS).map((g) => ({
|
|
25834
26230
|
label: g.label,
|
|
@@ -25844,9 +26240,10 @@ function AdminDashboard(props) {
|
|
|
25844
26240
|
createEffect(() => {
|
|
25845
26241
|
setAdminToast(props.toast);
|
|
25846
26242
|
});
|
|
26243
|
+
const inviteLink = isAdminInviteLink();
|
|
25847
26244
|
createEffect(() => {
|
|
25848
26245
|
const auth = props.auth;
|
|
25849
|
-
if (!auth) return;
|
|
26246
|
+
if (!auth || inviteLink) return;
|
|
25850
26247
|
if (!auth.isAuthenticated()) {
|
|
25851
26248
|
auth.onUnauthenticated?.();
|
|
25852
26249
|
return;
|
|
@@ -25856,10 +26253,15 @@ function AdminDashboard(props) {
|
|
|
25856
26253
|
}
|
|
25857
26254
|
});
|
|
25858
26255
|
const adminAllowed = () => {
|
|
26256
|
+
if (inviteLink) return false;
|
|
25859
26257
|
const auth = props.auth;
|
|
25860
26258
|
if (!auth) return true;
|
|
25861
26259
|
return auth.isAuthenticated() && auth.isHydrated() && auth.isAdmin();
|
|
25862
26260
|
};
|
|
26261
|
+
createEffect(() => {
|
|
26262
|
+
if (!adminAllowed()) return;
|
|
26263
|
+
void Promise.resolve().then(() => adminApi.getMe()).then(setAdminMe).catch(() => setAdminMe(null));
|
|
26264
|
+
});
|
|
25863
26265
|
createEffect(() => {
|
|
25864
26266
|
if (!adminAllowed()) return;
|
|
25865
26267
|
void adminApi.getSupportChannel().then((s) => setSupportChannelMode(s.mode)).catch(() => {
|
|
@@ -25905,14 +26307,14 @@ function AdminDashboard(props) {
|
|
|
25905
26307
|
};
|
|
25906
26308
|
const topOffset = () => props.topOffset ?? "0px";
|
|
25907
26309
|
const TabButton = (btnProps) => (() => {
|
|
25908
|
-
var _el$ = _tmpl$
|
|
26310
|
+
var _el$ = _tmpl$2128();
|
|
25909
26311
|
_el$.$$click = () => handleTabClick(btnProps.tab);
|
|
25910
26312
|
insert(_el$, createComponent(Show, {
|
|
25911
26313
|
get when() {
|
|
25912
26314
|
return props.tabIcons?.[btnProps.tab];
|
|
25913
26315
|
},
|
|
25914
26316
|
get children() {
|
|
25915
|
-
var _el$2 = _tmpl$
|
|
26317
|
+
var _el$2 = _tmpl$408();
|
|
25916
26318
|
effect(() => className(_el$2, props.tabIcons[btnProps.tab]));
|
|
25917
26319
|
return _el$2;
|
|
25918
26320
|
}
|
|
@@ -25929,6 +26331,7 @@ function AdminDashboard(props) {
|
|
|
25929
26331
|
});
|
|
25930
26332
|
return _el$;
|
|
25931
26333
|
})();
|
|
26334
|
+
if (inviteLink) return createComponent(AcceptAdminInvitePage, {});
|
|
25932
26335
|
return createComponent(Show, {
|
|
25933
26336
|
get when() {
|
|
25934
26337
|
return adminAllowed();
|
|
@@ -25944,7 +26347,7 @@ function AdminDashboard(props) {
|
|
|
25944
26347
|
return createComponent(AdminNavContext.Provider, {
|
|
25945
26348
|
value: adminNav,
|
|
25946
26349
|
get children() {
|
|
25947
|
-
var _el$3 = _tmpl$
|
|
26350
|
+
var _el$3 = _tmpl$3104(), _el$4 = _el$3.firstChild, _el$5 = _el$4.firstChild, _el$6 = _el$5.nextSibling, _el$7 = _el$4.nextSibling, _el$8 = _el$7.nextSibling, _el$9 = _el$8.firstChild, _el$0 = _el$9.firstChild, _el$1 = _el$0.nextSibling, _el$10 = _el$8.nextSibling;
|
|
25948
26351
|
_el$5.$$click = () => setDrawerOpen(true);
|
|
25949
26352
|
insert(_el$6, () => TAB_LABELS[currentTab()]);
|
|
25950
26353
|
_el$7.$$click = () => setDrawerOpen(false);
|
|
@@ -25961,7 +26364,7 @@ function AdminDashboard(props) {
|
|
|
25961
26364
|
return visibleGroups();
|
|
25962
26365
|
},
|
|
25963
26366
|
children: (group) => [(() => {
|
|
25964
|
-
var _el$11 = _tmpl$
|
|
26367
|
+
var _el$11 = _tmpl$475();
|
|
25965
26368
|
insert(_el$11, () => group.label);
|
|
25966
26369
|
return _el$11;
|
|
25967
26370
|
})(), createComponent(For, {
|
|
@@ -25985,184 +26388,205 @@ function AdminDashboard(props) {
|
|
|
25985
26388
|
reset
|
|
25986
26389
|
}),
|
|
25987
26390
|
get children() {
|
|
25988
|
-
return createComponent(
|
|
26391
|
+
return createComponent(Show, {
|
|
26392
|
+
get when() {
|
|
26393
|
+
return adminMe() === void 0 || roleAllows(currentTab());
|
|
26394
|
+
},
|
|
25989
26395
|
get fallback() {
|
|
25990
|
-
return createComponent(
|
|
25991
|
-
onSelectTab: handleTabClick,
|
|
25992
|
-
isTabEnabled
|
|
25993
|
-
});
|
|
26396
|
+
return createComponent(RoleForbidden, {});
|
|
25994
26397
|
},
|
|
25995
26398
|
get children() {
|
|
25996
|
-
return
|
|
25997
|
-
get
|
|
25998
|
-
return currentTab() === "dashboard";
|
|
25999
|
-
},
|
|
26000
|
-
get children() {
|
|
26399
|
+
return createComponent(Switch, {
|
|
26400
|
+
get fallback() {
|
|
26001
26401
|
return createComponent(Dashboard, {
|
|
26002
26402
|
onSelectTab: handleTabClick,
|
|
26003
26403
|
isTabEnabled
|
|
26004
26404
|
});
|
|
26005
|
-
}
|
|
26006
|
-
}), createComponent(Match, {
|
|
26007
|
-
get when() {
|
|
26008
|
-
return currentTab() === "customers";
|
|
26009
26405
|
},
|
|
26010
26406
|
get children() {
|
|
26011
|
-
return createComponent(
|
|
26012
|
-
get
|
|
26013
|
-
return
|
|
26407
|
+
return [createComponent(Match, {
|
|
26408
|
+
get when() {
|
|
26409
|
+
return currentTab() === "dashboard";
|
|
26014
26410
|
},
|
|
26015
|
-
get
|
|
26016
|
-
return
|
|
26411
|
+
get children() {
|
|
26412
|
+
return createComponent(Dashboard, {
|
|
26413
|
+
onSelectTab: handleTabClick,
|
|
26414
|
+
isTabEnabled
|
|
26415
|
+
});
|
|
26416
|
+
}
|
|
26417
|
+
}), createComponent(Match, {
|
|
26418
|
+
get when() {
|
|
26419
|
+
return currentTab() === "customers";
|
|
26017
26420
|
},
|
|
26018
|
-
get
|
|
26019
|
-
return
|
|
26421
|
+
get children() {
|
|
26422
|
+
return createComponent(Customers, {
|
|
26423
|
+
get passwordResetRedirectUrl() {
|
|
26424
|
+
return props.passwordResetRedirectUrl;
|
|
26425
|
+
},
|
|
26426
|
+
get activeUid() {
|
|
26427
|
+
return props.customers?.activeUid;
|
|
26428
|
+
},
|
|
26429
|
+
get onSelectCustomer() {
|
|
26430
|
+
return props.customers?.onSelectCustomer;
|
|
26431
|
+
},
|
|
26432
|
+
get initialUid() {
|
|
26433
|
+
return pendingCustomerUid();
|
|
26434
|
+
}
|
|
26435
|
+
});
|
|
26436
|
+
}
|
|
26437
|
+
}), createComponent(Match, {
|
|
26438
|
+
get when() {
|
|
26439
|
+
return currentTab() === "payments";
|
|
26020
26440
|
},
|
|
26021
|
-
get
|
|
26022
|
-
return
|
|
26441
|
+
get children() {
|
|
26442
|
+
return createComponent(Payments, {});
|
|
26023
26443
|
}
|
|
26024
|
-
})
|
|
26025
|
-
|
|
26026
|
-
|
|
26027
|
-
get when() {
|
|
26028
|
-
return currentTab() === "payments";
|
|
26029
|
-
},
|
|
26030
|
-
get children() {
|
|
26031
|
-
return createComponent(Payments, {});
|
|
26032
|
-
}
|
|
26033
|
-
}), createComponent(Match, {
|
|
26034
|
-
get when() {
|
|
26035
|
-
return currentTab() === "subscriptions";
|
|
26036
|
-
},
|
|
26037
|
-
get children() {
|
|
26038
|
-
return createComponent(Customers, {
|
|
26039
|
-
get passwordResetRedirectUrl() {
|
|
26040
|
-
return props.passwordResetRedirectUrl;
|
|
26444
|
+
}), createComponent(Match, {
|
|
26445
|
+
get when() {
|
|
26446
|
+
return currentTab() === "subscriptions";
|
|
26041
26447
|
},
|
|
26042
|
-
|
|
26043
|
-
|
|
26044
|
-
|
|
26448
|
+
get children() {
|
|
26449
|
+
return createComponent(Customers, {
|
|
26450
|
+
get passwordResetRedirectUrl() {
|
|
26451
|
+
return props.passwordResetRedirectUrl;
|
|
26452
|
+
},
|
|
26453
|
+
initialFilter: "active",
|
|
26454
|
+
get activeUid() {
|
|
26455
|
+
return props.customers?.activeUid;
|
|
26456
|
+
},
|
|
26457
|
+
get onSelectCustomer() {
|
|
26458
|
+
return props.customers?.onSelectCustomer;
|
|
26459
|
+
}
|
|
26460
|
+
});
|
|
26461
|
+
}
|
|
26462
|
+
}), createComponent(Match, {
|
|
26463
|
+
get when() {
|
|
26464
|
+
return currentTab() === "products";
|
|
26045
26465
|
},
|
|
26046
|
-
get
|
|
26047
|
-
return
|
|
26466
|
+
get children() {
|
|
26467
|
+
return createComponent(Products, {
|
|
26468
|
+
get productDefaultsLookup() {
|
|
26469
|
+
return props.productDefaultsLookup;
|
|
26470
|
+
}
|
|
26471
|
+
});
|
|
26048
26472
|
}
|
|
26049
|
-
})
|
|
26050
|
-
|
|
26051
|
-
|
|
26052
|
-
|
|
26053
|
-
|
|
26054
|
-
|
|
26055
|
-
get children() {
|
|
26056
|
-
return createComponent(Products, {
|
|
26057
|
-
get productDefaultsLookup() {
|
|
26058
|
-
return props.productDefaultsLookup;
|
|
26473
|
+
}), createComponent(Match, {
|
|
26474
|
+
get when() {
|
|
26475
|
+
return currentTab() === "categories";
|
|
26476
|
+
},
|
|
26477
|
+
get children() {
|
|
26478
|
+
return createComponent(Categories, {});
|
|
26059
26479
|
}
|
|
26060
|
-
})
|
|
26061
|
-
|
|
26062
|
-
|
|
26063
|
-
|
|
26064
|
-
|
|
26065
|
-
|
|
26066
|
-
get children() {
|
|
26067
|
-
return createComponent(Categories, {});
|
|
26068
|
-
}
|
|
26069
|
-
}), createComponent(Match, {
|
|
26070
|
-
get when() {
|
|
26071
|
-
return currentTab() === "sales";
|
|
26072
|
-
},
|
|
26073
|
-
get children() {
|
|
26074
|
-
return createComponent(Sales, {});
|
|
26075
|
-
}
|
|
26076
|
-
}), createComponent(Match, {
|
|
26077
|
-
get when() {
|
|
26078
|
-
return currentTab() === "promo-codes";
|
|
26079
|
-
},
|
|
26080
|
-
get children() {
|
|
26081
|
-
return createComponent(PromoCodes, {
|
|
26082
|
-
get affiliatesEnabled() {
|
|
26083
|
-
return affiliatesEnabled();
|
|
26480
|
+
}), createComponent(Match, {
|
|
26481
|
+
get when() {
|
|
26482
|
+
return currentTab() === "sales";
|
|
26483
|
+
},
|
|
26484
|
+
get children() {
|
|
26485
|
+
return createComponent(Sales, {});
|
|
26084
26486
|
}
|
|
26085
|
-
})
|
|
26086
|
-
|
|
26087
|
-
|
|
26088
|
-
|
|
26089
|
-
|
|
26090
|
-
|
|
26091
|
-
|
|
26092
|
-
|
|
26093
|
-
|
|
26094
|
-
|
|
26095
|
-
get when() {
|
|
26096
|
-
return currentTab() === "affiliates";
|
|
26097
|
-
},
|
|
26098
|
-
get children() {
|
|
26099
|
-
return createComponent(Affiliates, mergeProps(() => props.affiliates ?? {}));
|
|
26100
|
-
}
|
|
26101
|
-
}), createComponent(Match, {
|
|
26102
|
-
get when() {
|
|
26103
|
-
return currentTab() === "support";
|
|
26104
|
-
},
|
|
26105
|
-
get children() {
|
|
26106
|
-
return createComponent(Support, {
|
|
26107
|
-
get initialThreadId() {
|
|
26108
|
-
return pendingThreadId();
|
|
26487
|
+
}), createComponent(Match, {
|
|
26488
|
+
get when() {
|
|
26489
|
+
return currentTab() === "promo-codes";
|
|
26490
|
+
},
|
|
26491
|
+
get children() {
|
|
26492
|
+
return createComponent(PromoCodes, {
|
|
26493
|
+
get affiliatesEnabled() {
|
|
26494
|
+
return affiliatesEnabled();
|
|
26495
|
+
}
|
|
26496
|
+
});
|
|
26109
26497
|
}
|
|
26110
|
-
})
|
|
26111
|
-
|
|
26112
|
-
|
|
26113
|
-
|
|
26114
|
-
|
|
26115
|
-
|
|
26116
|
-
get children() {
|
|
26117
|
-
return createComponent(Webhooks, {});
|
|
26118
|
-
}
|
|
26119
|
-
}), createComponent(Match, {
|
|
26120
|
-
get when() {
|
|
26121
|
-
return currentTab() === "email-templates";
|
|
26122
|
-
},
|
|
26123
|
-
get children() {
|
|
26124
|
-
return createComponent(EmailTemplates, {
|
|
26125
|
-
get initialCustomTemplateId() {
|
|
26126
|
-
return pendingTemplateId();
|
|
26498
|
+
}), createComponent(Match, {
|
|
26499
|
+
get when() {
|
|
26500
|
+
return currentTab() === "offers";
|
|
26501
|
+
},
|
|
26502
|
+
get children() {
|
|
26503
|
+
return createComponent(Offers, {});
|
|
26127
26504
|
}
|
|
26128
|
-
})
|
|
26129
|
-
|
|
26130
|
-
|
|
26131
|
-
|
|
26132
|
-
|
|
26133
|
-
|
|
26134
|
-
|
|
26135
|
-
|
|
26136
|
-
|
|
26137
|
-
|
|
26138
|
-
|
|
26139
|
-
|
|
26140
|
-
|
|
26141
|
-
|
|
26142
|
-
|
|
26143
|
-
|
|
26144
|
-
|
|
26145
|
-
|
|
26146
|
-
|
|
26147
|
-
|
|
26148
|
-
|
|
26149
|
-
|
|
26150
|
-
|
|
26151
|
-
|
|
26152
|
-
|
|
26153
|
-
|
|
26154
|
-
|
|
26155
|
-
|
|
26156
|
-
|
|
26157
|
-
|
|
26158
|
-
|
|
26159
|
-
|
|
26160
|
-
|
|
26161
|
-
|
|
26162
|
-
|
|
26163
|
-
|
|
26505
|
+
}), createComponent(Match, {
|
|
26506
|
+
get when() {
|
|
26507
|
+
return currentTab() === "affiliates";
|
|
26508
|
+
},
|
|
26509
|
+
get children() {
|
|
26510
|
+
return createComponent(Affiliates, mergeProps(() => props.affiliates ?? {}));
|
|
26511
|
+
}
|
|
26512
|
+
}), createComponent(Match, {
|
|
26513
|
+
get when() {
|
|
26514
|
+
return currentTab() === "support";
|
|
26515
|
+
},
|
|
26516
|
+
get children() {
|
|
26517
|
+
return createComponent(Support, {
|
|
26518
|
+
get initialThreadId() {
|
|
26519
|
+
return pendingThreadId();
|
|
26520
|
+
}
|
|
26521
|
+
});
|
|
26522
|
+
}
|
|
26523
|
+
}), createComponent(Match, {
|
|
26524
|
+
get when() {
|
|
26525
|
+
return currentTab() === "webhooks";
|
|
26526
|
+
},
|
|
26527
|
+
get children() {
|
|
26528
|
+
return createComponent(Webhooks, {});
|
|
26529
|
+
}
|
|
26530
|
+
}), createComponent(Match, {
|
|
26531
|
+
get when() {
|
|
26532
|
+
return currentTab() === "email-templates";
|
|
26533
|
+
},
|
|
26534
|
+
get children() {
|
|
26535
|
+
return createComponent(EmailTemplates, {
|
|
26536
|
+
get initialCustomTemplateId() {
|
|
26537
|
+
return pendingTemplateId();
|
|
26538
|
+
}
|
|
26539
|
+
});
|
|
26540
|
+
}
|
|
26541
|
+
}), createComponent(Match, {
|
|
26542
|
+
get when() {
|
|
26543
|
+
return currentTab() === "funnel";
|
|
26544
|
+
},
|
|
26545
|
+
get children() {
|
|
26546
|
+
return createComponent(Funnel, {});
|
|
26547
|
+
}
|
|
26548
|
+
}), createComponent(Match, {
|
|
26549
|
+
get when() {
|
|
26550
|
+
return currentTab() === "sequences";
|
|
26551
|
+
},
|
|
26552
|
+
get children() {
|
|
26553
|
+
return createComponent(Sequences, {});
|
|
26554
|
+
}
|
|
26555
|
+
}), createComponent(Match, {
|
|
26556
|
+
get when() {
|
|
26557
|
+
return currentTab() === "sequence-results";
|
|
26558
|
+
},
|
|
26559
|
+
get children() {
|
|
26560
|
+
return createComponent(SequenceResults, {});
|
|
26561
|
+
}
|
|
26562
|
+
}), createComponent(Match, {
|
|
26563
|
+
get when() {
|
|
26564
|
+
return currentTab() === "email-notifications";
|
|
26565
|
+
},
|
|
26566
|
+
get children() {
|
|
26567
|
+
return createComponent(EmailNotifications, {});
|
|
26568
|
+
}
|
|
26569
|
+
}), createComponent(Match, {
|
|
26570
|
+
get when() {
|
|
26571
|
+
return currentTab() === "features";
|
|
26572
|
+
},
|
|
26573
|
+
get children() {
|
|
26574
|
+
return createComponent(Features, {});
|
|
26575
|
+
}
|
|
26576
|
+
}), createComponent(Match, {
|
|
26577
|
+
get when() {
|
|
26578
|
+
return currentTab() === "admins";
|
|
26579
|
+
},
|
|
26580
|
+
get children() {
|
|
26581
|
+
return createComponent(Admins, {
|
|
26582
|
+
get acceptInviteUrl() {
|
|
26583
|
+
return props.adminInviteAcceptUrl;
|
|
26584
|
+
}
|
|
26585
|
+
});
|
|
26586
|
+
}
|
|
26587
|
+
})];
|
|
26164
26588
|
}
|
|
26165
|
-
})
|
|
26589
|
+
});
|
|
26166
26590
|
}
|
|
26167
26591
|
});
|
|
26168
26592
|
}
|
|
@@ -26190,29 +26614,35 @@ function AdminDashboard(props) {
|
|
|
26190
26614
|
}
|
|
26191
26615
|
});
|
|
26192
26616
|
}
|
|
26617
|
+
function RoleForbidden() {
|
|
26618
|
+
return (() => {
|
|
26619
|
+
var _el$12 = _tmpl$561(), _el$13 = _el$12.firstChild; _el$13.nextSibling;
|
|
26620
|
+
return _el$12;
|
|
26621
|
+
})();
|
|
26622
|
+
}
|
|
26193
26623
|
function AdminTabError(props) {
|
|
26194
26624
|
console.error("[AdminDashboard] tab failed to render:", props.error);
|
|
26195
26625
|
const message = () => props.error instanceof Error ? props.error.message : String(props.error);
|
|
26196
26626
|
return (() => {
|
|
26197
|
-
var _el$
|
|
26198
|
-
insert(_el$
|
|
26199
|
-
_el$
|
|
26200
|
-
return _el$
|
|
26627
|
+
var _el$15 = _tmpl$657(), _el$16 = _el$15.firstChild, _el$17 = _el$16.nextSibling, _el$18 = _el$17.nextSibling;
|
|
26628
|
+
insert(_el$17, message);
|
|
26629
|
+
_el$18.$$click = () => props.reset();
|
|
26630
|
+
return _el$15;
|
|
26201
26631
|
})();
|
|
26202
26632
|
}
|
|
26203
26633
|
function AdminGateSpinner(props) {
|
|
26204
26634
|
return (() => {
|
|
26205
|
-
var _el$
|
|
26635
|
+
var _el$19 = _tmpl$750(); _el$19.firstChild;
|
|
26206
26636
|
effect((_p$) => {
|
|
26207
26637
|
var _v$8 = props.topOffset, _v$9 = `calc(100vh - ${props.topOffset})`;
|
|
26208
|
-
_v$8 !== _p$.e && setStyleProperty(_el$
|
|
26209
|
-
_v$9 !== _p$.t && setStyleProperty(_el$
|
|
26638
|
+
_v$8 !== _p$.e && setStyleProperty(_el$19, "top", _p$.e = _v$8);
|
|
26639
|
+
_v$9 !== _p$.t && setStyleProperty(_el$19, "height", _p$.t = _v$9);
|
|
26210
26640
|
return _p$;
|
|
26211
26641
|
}, {
|
|
26212
26642
|
e: void 0,
|
|
26213
26643
|
t: void 0
|
|
26214
26644
|
});
|
|
26215
|
-
return _el$
|
|
26645
|
+
return _el$19;
|
|
26216
26646
|
})();
|
|
26217
26647
|
}
|
|
26218
26648
|
delegateEvents(["click"]);
|
|
@@ -26236,7 +26666,8 @@ var ADMIN_TAB_SEGMENTS = {
|
|
|
26236
26666
|
sequences: "sequences",
|
|
26237
26667
|
"sequence-results": "sequence-results",
|
|
26238
26668
|
"email-notifications": "email-notifications",
|
|
26239
|
-
features: "features"
|
|
26669
|
+
features: "features",
|
|
26670
|
+
admins: "admins"
|
|
26240
26671
|
};
|
|
26241
26672
|
var AFFILIATE_SUB_TAB_SEGMENTS = {
|
|
26242
26673
|
overview: "",
|
|
@@ -26282,19 +26713,19 @@ function affiliateSubTabFromPath(pathname, base = "/admin") {
|
|
|
26282
26713
|
}
|
|
26283
26714
|
return "overview";
|
|
26284
26715
|
}
|
|
26285
|
-
var _tmpl$
|
|
26286
|
-
var _tmpl$
|
|
26287
|
-
var _tmpl$
|
|
26288
|
-
var _tmpl$
|
|
26289
|
-
var _tmpl$
|
|
26290
|
-
var _tmpl$
|
|
26291
|
-
var _tmpl$
|
|
26292
|
-
var _tmpl$
|
|
26293
|
-
var _tmpl$
|
|
26294
|
-
var _tmpl$
|
|
26295
|
-
var _tmpl$
|
|
26716
|
+
var _tmpl$409 = /* @__PURE__ */ template(`<div class=app-admin-modal-backdrop><div class="app-admin-card app-admin-modal"style=max-width:32rem><div class=app-admin-modal-header><h3 class=app-admin-heading style=font-size:1rem;margin:0>Customer dashboard preview</h3><button type=button class="app-admin-btn app-admin-btn-ghost"style="border:none;padding:0.25rem 0.5rem;font-size:1.25rem">\xD7</button></div><div class=app-admin-modal-body><div style="padding:0.5rem 0.75rem;border-radius:var(--app-admin-radius-sm);background:var(--app-admin-warning-bg);color:var(--app-admin-warning-fg);font-size:0.75rem;font-weight:500">Viewing as <!> \u2014 read-only`);
|
|
26717
|
+
var _tmpl$2129 = /* @__PURE__ */ template(`<div style="display:flex;align-items:center;justify-content:space-between;gap:0.75rem;padding:0.5rem 0.75rem;border-radius:var(--app-admin-radius-sm);background:var(--app-admin-danger-bg);color:var(--app-admin-danger-fg);font-size:0.75rem;font-weight:500"><span></span><button type=button class="app-admin-btn app-admin-btn-ghost"style="padding:0.25rem 0.75rem">Retry`);
|
|
26718
|
+
var _tmpl$3105 = /* @__PURE__ */ template(`<p style=color:var(--app-admin-fg-muted);font-size:0.875rem>Could not load this customer's dashboard.`);
|
|
26719
|
+
var _tmpl$476 = /* @__PURE__ */ template(`<div><h3>Profile</h3><div class=app-admin-card-soft style=padding:0.75rem><p style=font-weight:600;font-size:0.9375rem;margin:0></p><p style="font-size:0.8125rem;color:var(--app-admin-fg-muted);margin:0.25rem 0 0">`);
|
|
26720
|
+
var _tmpl$564 = /* @__PURE__ */ template(`<div><h3>Subscription`);
|
|
26721
|
+
var _tmpl$658 = /* @__PURE__ */ template(`<div style=display:flex;flex-direction:column;gap:0.5rem>`);
|
|
26722
|
+
var _tmpl$751 = /* @__PURE__ */ template(`<div><h3>Prescription requests`);
|
|
26723
|
+
var _tmpl$843 = /* @__PURE__ */ template(`<div><h3>Pending surveys`);
|
|
26724
|
+
var _tmpl$940 = /* @__PURE__ */ template(`<p style=color:var(--app-admin-fg-muted);font-size:0.875rem>No active subscription.`);
|
|
26725
|
+
var _tmpl$036 = /* @__PURE__ */ template(`<p style="font-size:0.75rem;color:var(--app-admin-fg-muted);margin:0.25rem 0 0">Next charge `);
|
|
26726
|
+
var _tmpl$1135 = /* @__PURE__ */ template(`<div class=app-admin-card-soft style=padding:0.75rem><div style=display:flex;align-items:center;justify-content:space-between><span style=font-size:0.875rem;font-weight:500>`);
|
|
26296
26727
|
var _tmpl$1028 = /* @__PURE__ */ template(`<p style="font-size:0.75rem;color:var(--app-admin-fg-muted);margin:0.25rem 0 0">`);
|
|
26297
|
-
var _tmpl$
|
|
26728
|
+
var _tmpl$1136 = /* @__PURE__ */ template(`<div><h3>Prescription status</h3><div class=app-admin-card-soft style=padding:0.75rem><div style=display:flex;align-items:center;justify-content:space-between><span style=font-size:0.875rem;font-weight:500>Current request`);
|
|
26298
26729
|
var _tmpl$1224 = /* @__PURE__ */ template(`<p style=color:var(--app-admin-fg-muted);font-size:0.875rem>No prescription requests.`);
|
|
26299
26730
|
var _tmpl$1322 = /* @__PURE__ */ template(`<span style=font-size:0.75rem;color:var(--app-admin-fg-muted);margin-left:0.5rem>`);
|
|
26300
26731
|
var _tmpl$1422 = /* @__PURE__ */ template(`<span> \xB7 `);
|
|
@@ -26306,7 +26737,7 @@ function PatientDashboardPreview(props) {
|
|
|
26306
26737
|
authToken: () => props.token
|
|
26307
26738
|
});
|
|
26308
26739
|
return (() => {
|
|
26309
|
-
var _el$ = _tmpl$
|
|
26740
|
+
var _el$ = _tmpl$409(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$5 = _el$4.nextSibling, _el$6 = _el$3.nextSibling, _el$7 = _el$6.firstChild, _el$8 = _el$7.firstChild, _el$0 = _el$8.nextSibling; _el$0.nextSibling;
|
|
26310
26741
|
_el$.$$click = (e) => {
|
|
26311
26742
|
if (e.target === e.currentTarget) props.onClose();
|
|
26312
26743
|
};
|
|
@@ -26318,7 +26749,7 @@ function PatientDashboardPreview(props) {
|
|
|
26318
26749
|
},
|
|
26319
26750
|
keyed: true,
|
|
26320
26751
|
children: (msg) => (() => {
|
|
26321
|
-
var _el$1 = _tmpl$
|
|
26752
|
+
var _el$1 = _tmpl$2129(), _el$10 = _el$1.firstChild, _el$11 = _el$10.nextSibling;
|
|
26322
26753
|
insert(_el$10, msg);
|
|
26323
26754
|
_el$11.$$click = () => data.retry();
|
|
26324
26755
|
return _el$1;
|
|
@@ -26337,25 +26768,25 @@ function PatientDashboardPreview(props) {
|
|
|
26337
26768
|
return data.profile();
|
|
26338
26769
|
},
|
|
26339
26770
|
get fallback() {
|
|
26340
|
-
return _tmpl$
|
|
26771
|
+
return _tmpl$3105();
|
|
26341
26772
|
},
|
|
26342
26773
|
children: (profile) => [(() => {
|
|
26343
|
-
var _el$13 = _tmpl$
|
|
26774
|
+
var _el$13 = _tmpl$476(), _el$14 = _el$13.firstChild, _el$15 = _el$14.nextSibling, _el$16 = _el$15.firstChild, _el$17 = _el$16.nextSibling;
|
|
26344
26775
|
insert(_el$16, () => [profile().firstName, profile().lastName].filter(Boolean).join(" ") || "Member");
|
|
26345
26776
|
insert(_el$17, () => profile().email);
|
|
26346
26777
|
effect((_$p) => style(_el$14, panelSectionHeader, _$p));
|
|
26347
26778
|
return _el$13;
|
|
26348
26779
|
})(), (() => {
|
|
26349
|
-
var _el$18 = _tmpl$
|
|
26780
|
+
var _el$18 = _tmpl$564(), _el$19 = _el$18.firstChild;
|
|
26350
26781
|
insert(_el$18, createComponent(Show, {
|
|
26351
26782
|
get when() {
|
|
26352
26783
|
return data.subscription();
|
|
26353
26784
|
},
|
|
26354
26785
|
get fallback() {
|
|
26355
|
-
return _tmpl$
|
|
26786
|
+
return _tmpl$940();
|
|
26356
26787
|
},
|
|
26357
26788
|
children: (sub) => (() => {
|
|
26358
|
-
var _el$27 = _tmpl$
|
|
26789
|
+
var _el$27 = _tmpl$1135(), _el$28 = _el$27.firstChild, _el$29 = _el$28.firstChild;
|
|
26359
26790
|
insert(_el$29, createComponent(Show, {
|
|
26360
26791
|
get when() {
|
|
26361
26792
|
return sub().amount != null;
|
|
@@ -26375,7 +26806,7 @@ function PatientDashboardPreview(props) {
|
|
|
26375
26806
|
return sub().nextBillingDate;
|
|
26376
26807
|
},
|
|
26377
26808
|
get children() {
|
|
26378
|
-
var _el$30 = _tmpl$
|
|
26809
|
+
var _el$30 = _tmpl$036(); _el$30.firstChild;
|
|
26379
26810
|
insert(_el$30, () => fmtDate(sub().nextBillingDate), null);
|
|
26380
26811
|
return _el$30;
|
|
26381
26812
|
}
|
|
@@ -26390,7 +26821,7 @@ function PatientDashboardPreview(props) {
|
|
|
26390
26821
|
return data.rxStatus();
|
|
26391
26822
|
},
|
|
26392
26823
|
children: (rx) => (() => {
|
|
26393
|
-
var _el$32 = _tmpl$
|
|
26824
|
+
var _el$32 = _tmpl$1136(), _el$33 = _el$32.firstChild, _el$34 = _el$33.nextSibling, _el$35 = _el$34.firstChild; _el$35.firstChild;
|
|
26394
26825
|
insert(_el$35, createComponent(StatusBadge, {
|
|
26395
26826
|
get status() {
|
|
26396
26827
|
return rx().status;
|
|
@@ -26410,7 +26841,7 @@ function PatientDashboardPreview(props) {
|
|
|
26410
26841
|
return _el$32;
|
|
26411
26842
|
})()
|
|
26412
26843
|
}), (() => {
|
|
26413
|
-
var _el$20 = _tmpl$
|
|
26844
|
+
var _el$20 = _tmpl$751(), _el$21 = _el$20.firstChild;
|
|
26414
26845
|
insert(_el$20, createComponent(Show, {
|
|
26415
26846
|
get when() {
|
|
26416
26847
|
return (data.rxList() ?? []).length > 0;
|
|
@@ -26419,7 +26850,7 @@ function PatientDashboardPreview(props) {
|
|
|
26419
26850
|
return _tmpl$1224();
|
|
26420
26851
|
},
|
|
26421
26852
|
get children() {
|
|
26422
|
-
var _el$22 = _tmpl$
|
|
26853
|
+
var _el$22 = _tmpl$658();
|
|
26423
26854
|
insert(_el$22, createComponent(For, {
|
|
26424
26855
|
get each() {
|
|
26425
26856
|
return data.rxList();
|
|
@@ -26462,7 +26893,7 @@ function PatientDashboardPreview(props) {
|
|
|
26462
26893
|
effect((_$p) => style(_el$21, panelSectionHeader, _$p));
|
|
26463
26894
|
return _el$20;
|
|
26464
26895
|
})(), (() => {
|
|
26465
|
-
var _el$23 = _tmpl$
|
|
26896
|
+
var _el$23 = _tmpl$843(), _el$24 = _el$23.firstChild;
|
|
26466
26897
|
insert(_el$23, createComponent(Show, {
|
|
26467
26898
|
get when() {
|
|
26468
26899
|
return (data.pendingSurveys() ?? []).length > 0;
|
|
@@ -26471,7 +26902,7 @@ function PatientDashboardPreview(props) {
|
|
|
26471
26902
|
return _tmpl$1620();
|
|
26472
26903
|
},
|
|
26473
26904
|
get children() {
|
|
26474
|
-
var _el$25 = _tmpl$
|
|
26905
|
+
var _el$25 = _tmpl$658();
|
|
26475
26906
|
insert(_el$25, createComponent(For, {
|
|
26476
26907
|
get each() {
|
|
26477
26908
|
return data.pendingSurveys();
|
|
@@ -26496,9 +26927,9 @@ function PatientDashboardPreview(props) {
|
|
|
26496
26927
|
})();
|
|
26497
26928
|
}
|
|
26498
26929
|
delegateEvents(["click"]);
|
|
26499
|
-
var _tmpl$
|
|
26500
|
-
var _tmpl$
|
|
26501
|
-
var _tmpl$
|
|
26930
|
+
var _tmpl$477 = /* @__PURE__ */ template(`<div style=margin-bottom:1rem>`);
|
|
26931
|
+
var _tmpl$2130 = /* @__PURE__ */ template(`<form><div style=display:grid;gap:1rem;margin-bottom:1.5rem><div style="display:grid;grid-template-columns:repeat(2, 1fr);gap:1rem"></div></div><div style=margin-bottom:1.5rem></div><div style=display:flex;gap:0.75rem>`);
|
|
26932
|
+
var _tmpl$3106 = /* @__PURE__ */ template(`<div class=pay-method style="max-width:480px;margin:0 auto;padding:2rem 1.25rem"><p style="color:var(--app-portal-fg-muted, #6e6a66);margin-bottom:1.5rem">Enter a new card for your subscription. Your current card stays active until this succeeds.`);
|
|
26502
26933
|
var LIVE = /* @__PURE__ */ new Set(["active", "paused", "past_due"]);
|
|
26503
26934
|
function UpdatePaymentMethod(props) {
|
|
26504
26935
|
const {
|
|
@@ -26528,7 +26959,7 @@ function UpdatePaymentMethod(props) {
|
|
|
26528
26959
|
if (ok) props.onDone();
|
|
26529
26960
|
}
|
|
26530
26961
|
return (() => {
|
|
26531
|
-
var _el$ = _tmpl$
|
|
26962
|
+
var _el$ = _tmpl$3106(), _el$2 = _el$.firstChild;
|
|
26532
26963
|
insert(_el$, createComponent(Heading, {
|
|
26533
26964
|
level: 1,
|
|
26534
26965
|
get children() {
|
|
@@ -26559,14 +26990,14 @@ function UpdatePaymentMethod(props) {
|
|
|
26559
26990
|
return memo(() => !!!resolving())() && !noSubscription();
|
|
26560
26991
|
},
|
|
26561
26992
|
get children() {
|
|
26562
|
-
var _el$3 = _tmpl$
|
|
26993
|
+
var _el$3 = _tmpl$2130(), _el$5 = _el$3.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$5.nextSibling, _el$8 = _el$7.nextSibling;
|
|
26563
26994
|
_el$3.addEventListener("submit", handleSubmit);
|
|
26564
26995
|
insert(_el$3, createComponent(Show, {
|
|
26565
26996
|
get when() {
|
|
26566
26997
|
return flow.error();
|
|
26567
26998
|
},
|
|
26568
26999
|
get children() {
|
|
26569
|
-
var _el$4 = _tmpl$
|
|
27000
|
+
var _el$4 = _tmpl$477();
|
|
26570
27001
|
insert(_el$4, createComponent(Banner, {
|
|
26571
27002
|
variant: "error",
|
|
26572
27003
|
get children() {
|
|
@@ -26644,19 +27075,19 @@ function UpdatePaymentMethod(props) {
|
|
|
26644
27075
|
return _el$;
|
|
26645
27076
|
})();
|
|
26646
27077
|
}
|
|
26647
|
-
var _tmpl$
|
|
26648
|
-
var _tmpl$
|
|
26649
|
-
var _tmpl$
|
|
26650
|
-
var _tmpl$
|
|
26651
|
-
var _tmpl$
|
|
26652
|
-
var _tmpl$
|
|
26653
|
-
var _tmpl$
|
|
26654
|
-
var _tmpl$
|
|
26655
|
-
var _tmpl$
|
|
26656
|
-
var _tmpl$
|
|
26657
|
-
var _tmpl$
|
|
27078
|
+
var _tmpl$478 = /* @__PURE__ */ template(`<a class=ship__track target=_blank rel="noopener noreferrer">Track<!> \u2197`);
|
|
27079
|
+
var _tmpl$2131 = /* @__PURE__ */ template(`<div class=ship><p class=ship__eta></p><div class=ship__chip-row><button type=button class=ship__chip><span class=ship__num></span><i class="ph ph-copy ship__copy-icon"aria-hidden=true></i><span class=ship__copied>Copied \u2713</span></button></div><span class=portal-sr-only role=status aria-live=polite>`);
|
|
27080
|
+
var _tmpl$3107 = /* @__PURE__ */ template(`<span class=refill__cycle>Day <!> of `);
|
|
27081
|
+
var _tmpl$479 = /* @__PURE__ */ template(`<div class=refill data-testid=refill-strip><div class=refill__head><span class=lab-label>Your plan</span></div><div class=refill__rail>`);
|
|
27082
|
+
var _tmpl$565 = /* @__PURE__ */ template(`<span class=refill__cycle>Preparing your next fill`);
|
|
27083
|
+
var _tmpl$659 = /* @__PURE__ */ template(`<div><span class=refill__dot aria-hidden=true></span><span class="lab-label refill__label"></span><span class=refill__date></span><span class=refill__rel>`);
|
|
27084
|
+
var _tmpl$752 = /* @__PURE__ */ template(`<a class=refill__action>Complete check-in \u2192`);
|
|
27085
|
+
var _tmpl$844 = /* @__PURE__ */ template(`<p class=tracker__empty-text data-testid=tracker-savings-note><strong>Member pricing is active on your account.</strong> It applies automatically when you check out.`);
|
|
27086
|
+
var _tmpl$941 = /* @__PURE__ */ template(`<div class=tracker><span class=lab-label>Your order</span><div class=tracker__empty data-testid=tracker-empty><div class=tracker__empty-mark aria-hidden=true><span class=tracker__empty-bead></span></div><h2 class=tracker__empty-title>Your journey starts here</h2><p class=tracker__empty-text></p><a class="portal-btn portal-btn--primary">Start your intake`);
|
|
27087
|
+
var _tmpl$037 = /* @__PURE__ */ template(`<p class=tracker__empty-text data-testid=tracker-offer-note><strong>You have <!> waiting.</strong> It applies automatically at checkout \u2014 finish your intake by <!> to keep it.`);
|
|
27088
|
+
var _tmpl$1137 = /* @__PURE__ */ template(`<span class=thread__halo aria-hidden=true>`);
|
|
26658
27089
|
var _tmpl$1029 = /* @__PURE__ */ template(`<time class=thread__time>`);
|
|
26659
|
-
var _tmpl$
|
|
27090
|
+
var _tmpl$1138 = /* @__PURE__ */ template(`<h2 class=thread__hero>`);
|
|
26660
27091
|
var _tmpl$1225 = /* @__PURE__ */ template(`<p class=thread__caption>`);
|
|
26661
27092
|
var _tmpl$1323 = /* @__PURE__ */ template(`<button type=button class="portal-btn portal-btn--ghost thread__action">Where's my order?`);
|
|
26662
27093
|
var _tmpl$1423 = /* @__PURE__ */ template(`<button type=button class="portal-btn portal-btn--primary thread__action">Message your care team`);
|
|
@@ -26682,7 +27113,7 @@ function TrackingChip(props) {
|
|
|
26682
27113
|
}
|
|
26683
27114
|
};
|
|
26684
27115
|
return (() => {
|
|
26685
|
-
var _el$ = _tmpl$
|
|
27116
|
+
var _el$ = _tmpl$2131(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling, _el$4 = _el$3.firstChild, _el$5 = _el$4.firstChild, _el$6 = _el$5.nextSibling, _el$7 = _el$6.nextSibling, _el$10 = _el$3.nextSibling;
|
|
26686
27117
|
insert(_el$2, () => props.eta);
|
|
26687
27118
|
_el$4.$$click = copy;
|
|
26688
27119
|
insert(_el$5, () => props.number);
|
|
@@ -26693,7 +27124,7 @@ function TrackingChip(props) {
|
|
|
26693
27124
|
return props.url;
|
|
26694
27125
|
},
|
|
26695
27126
|
get children() {
|
|
26696
|
-
var _el$8 = _tmpl$
|
|
27127
|
+
var _el$8 = _tmpl$478(), _el$9 = _el$8.firstChild, _el$1 = _el$9.nextSibling; _el$1.nextSibling;
|
|
26697
27128
|
insert(_el$8, (() => {
|
|
26698
27129
|
var _c$ = memo(() => !!props.carrier);
|
|
26699
27130
|
return () => _c$() ? ` with ${props.carrier}` : "";
|
|
@@ -26714,16 +27145,16 @@ function OrderTracker(props) {
|
|
|
26714
27145
|
return refill();
|
|
26715
27146
|
},
|
|
26716
27147
|
children: (r) => (() => {
|
|
26717
|
-
var _el$11 = _tmpl$
|
|
27148
|
+
var _el$11 = _tmpl$479(), _el$12 = _el$11.firstChild; _el$12.firstChild; var _el$18 = _el$12.nextSibling;
|
|
26718
27149
|
insert(_el$12, createComponent(Show, {
|
|
26719
27150
|
get when() {
|
|
26720
27151
|
return !r().pendingFill;
|
|
26721
27152
|
},
|
|
26722
27153
|
get fallback() {
|
|
26723
|
-
return _tmpl$
|
|
27154
|
+
return _tmpl$565();
|
|
26724
27155
|
},
|
|
26725
27156
|
get children() {
|
|
26726
|
-
var _el$14 = _tmpl$
|
|
27157
|
+
var _el$14 = _tmpl$3107(), _el$15 = _el$14.firstChild, _el$17 = _el$15.nextSibling; _el$17.nextSibling;
|
|
26727
27158
|
insert(_el$14, () => r().cycleDay, _el$17);
|
|
26728
27159
|
insert(_el$14, () => r().cycleLength, null);
|
|
26729
27160
|
return _el$14;
|
|
@@ -26734,7 +27165,7 @@ function OrderTracker(props) {
|
|
|
26734
27165
|
return r().events;
|
|
26735
27166
|
},
|
|
26736
27167
|
children: (e) => (() => {
|
|
26737
|
-
var _el$20 = _tmpl$
|
|
27168
|
+
var _el$20 = _tmpl$659(), _el$21 = _el$20.firstChild, _el$22 = _el$21.nextSibling, _el$23 = _el$22.nextSibling, _el$24 = _el$23.nextSibling;
|
|
26738
27169
|
insert(_el$22, () => e.label);
|
|
26739
27170
|
insert(_el$23, () => formatEventDate(e.date));
|
|
26740
27171
|
insert(_el$24, (() => {
|
|
@@ -26747,7 +27178,7 @@ function OrderTracker(props) {
|
|
|
26747
27178
|
},
|
|
26748
27179
|
keyed: true,
|
|
26749
27180
|
children: (rid) => (() => {
|
|
26750
|
-
var _el$25 = _tmpl$
|
|
27181
|
+
var _el$25 = _tmpl$752();
|
|
26751
27182
|
effect(() => setAttribute(_el$25, "href", props.renewHref(rid)));
|
|
26752
27183
|
return _el$25;
|
|
26753
27184
|
})()
|
|
@@ -26761,14 +27192,14 @@ function OrderTracker(props) {
|
|
|
26761
27192
|
})()
|
|
26762
27193
|
});
|
|
26763
27194
|
const EmptyState2 = () => (() => {
|
|
26764
|
-
var _el$26 = _tmpl$
|
|
27195
|
+
var _el$26 = _tmpl$941(), _el$27 = _el$26.firstChild, _el$28 = _el$27.nextSibling, _el$29 = _el$28.firstChild, _el$30 = _el$29.nextSibling, _el$32 = _el$30.nextSibling, _el$33 = _el$32.nextSibling;
|
|
26765
27196
|
insert(_el$26, createComponent(RefillStrip, {}), _el$28);
|
|
26766
27197
|
insert(_el$28, createComponent(Show, {
|
|
26767
27198
|
get when() {
|
|
26768
27199
|
return props.savingsMember;
|
|
26769
27200
|
},
|
|
26770
27201
|
get children() {
|
|
26771
|
-
return _tmpl$
|
|
27202
|
+
return _tmpl$844();
|
|
26772
27203
|
}
|
|
26773
27204
|
}), _el$32);
|
|
26774
27205
|
insert(_el$28, createComponent(Show, {
|
|
@@ -26776,7 +27207,7 @@ function OrderTracker(props) {
|
|
|
26776
27207
|
return props.offers?.[0];
|
|
26777
27208
|
},
|
|
26778
27209
|
children: (offer) => (() => {
|
|
26779
|
-
var _el$34 = _tmpl$
|
|
27210
|
+
var _el$34 = _tmpl$037(), _el$35 = _el$34.firstChild, _el$36 = _el$35.firstChild, _el$38 = _el$36.nextSibling; _el$38.nextSibling; var _el$39 = _el$35.nextSibling, _el$41 = _el$39.nextSibling; _el$41.nextSibling;
|
|
26780
27211
|
insert(_el$35, () => offerSummaryText(offer()), _el$38);
|
|
26781
27212
|
insert(_el$34, () => offer().deadlineText, _el$41);
|
|
26782
27213
|
return _el$34;
|
|
@@ -26795,7 +27226,7 @@ function OrderTracker(props) {
|
|
|
26795
27226
|
insert(_el$44, createComponent(Show, {
|
|
26796
27227
|
when: isActive,
|
|
26797
27228
|
get children() {
|
|
26798
|
-
return _tmpl$
|
|
27229
|
+
return _tmpl$1137();
|
|
26799
27230
|
}
|
|
26800
27231
|
}));
|
|
26801
27232
|
className(_el$46, `thread__content${isActive ? " thread__content--active" : ""}`);
|
|
@@ -26815,7 +27246,7 @@ function OrderTracker(props) {
|
|
|
26815
27246
|
return s.heroWord;
|
|
26816
27247
|
},
|
|
26817
27248
|
get children() {
|
|
26818
|
-
var _el$50 = _tmpl$
|
|
27249
|
+
var _el$50 = _tmpl$1138();
|
|
26819
27250
|
insert(_el$50, () => s.heroWord);
|
|
26820
27251
|
return _el$50;
|
|
26821
27252
|
}
|
|
@@ -26973,9 +27404,9 @@ function OrderTracker(props) {
|
|
|
26973
27404
|
});
|
|
26974
27405
|
}
|
|
26975
27406
|
delegateEvents(["click"]);
|
|
26976
|
-
var _tmpl$
|
|
26977
|
-
var _tmpl$
|
|
26978
|
-
var _tmpl$
|
|
27407
|
+
var _tmpl$480 = /* @__PURE__ */ template(`<span class=rx-row__dose> \xB7 `);
|
|
27408
|
+
var _tmpl$2132 = /* @__PURE__ */ template(`<div class=rx-row__body>`);
|
|
27409
|
+
var _tmpl$3108 = /* @__PURE__ */ template(`<div data-testid=rx-row><button type=button class=rx-row__head><span class=rx-row__med></span><span class=rx-row__status></span><i aria-hidden=true>`);
|
|
26979
27410
|
var STATUS_LABEL = {
|
|
26980
27411
|
pending: "Under review",
|
|
26981
27412
|
approved: "Approved",
|
|
@@ -26992,7 +27423,7 @@ function RxRow(props) {
|
|
|
26992
27423
|
return STATUS_LABEL[props.rx.status] ?? props.rx.status;
|
|
26993
27424
|
};
|
|
26994
27425
|
return (() => {
|
|
26995
|
-
var _el$ = _tmpl$
|
|
27426
|
+
var _el$ = _tmpl$3108(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$6 = _el$3.nextSibling, _el$7 = _el$6.nextSibling;
|
|
26996
27427
|
_el$2.$$click = () => setOpen((v) => !v);
|
|
26997
27428
|
insert(_el$3, () => props.rx.drugName ?? "Medication", null);
|
|
26998
27429
|
insert(_el$3, createComponent(Show, {
|
|
@@ -27000,7 +27431,7 @@ function RxRow(props) {
|
|
|
27000
27431
|
return props.rx.dosage;
|
|
27001
27432
|
},
|
|
27002
27433
|
get children() {
|
|
27003
|
-
var _el$4 = _tmpl$
|
|
27434
|
+
var _el$4 = _tmpl$480(); _el$4.firstChild;
|
|
27004
27435
|
insert(_el$4, () => props.rx.dosage, null);
|
|
27005
27436
|
return _el$4;
|
|
27006
27437
|
}
|
|
@@ -27011,7 +27442,7 @@ function RxRow(props) {
|
|
|
27011
27442
|
return open();
|
|
27012
27443
|
},
|
|
27013
27444
|
get children() {
|
|
27014
|
-
var _el$8 = _tmpl$
|
|
27445
|
+
var _el$8 = _tmpl$2132();
|
|
27015
27446
|
insert(_el$8, createComponent(OrderTracker, {
|
|
27016
27447
|
get request() {
|
|
27017
27448
|
return props.request;
|
|
@@ -27054,17 +27485,17 @@ function RxRow(props) {
|
|
|
27054
27485
|
})();
|
|
27055
27486
|
}
|
|
27056
27487
|
delegateEvents(["click"]);
|
|
27057
|
-
var _tmpl$
|
|
27058
|
-
var _tmpl$
|
|
27059
|
-
var _tmpl$
|
|
27060
|
-
var _tmpl$
|
|
27061
|
-
var _tmpl$
|
|
27062
|
-
var _tmpl$
|
|
27063
|
-
var _tmpl$
|
|
27064
|
-
var _tmpl$
|
|
27065
|
-
var _tmpl$
|
|
27066
|
-
var _tmpl$
|
|
27067
|
-
var _tmpl$
|
|
27488
|
+
var _tmpl$481 = /* @__PURE__ */ template(`<div class=plan data-testid=plan-billing><span class=lab-label>Plan & billing`);
|
|
27489
|
+
var _tmpl$2133 = /* @__PURE__ */ template(`<div class=plan__empty><h2 class=plan__empty-title>No active plan</h2><p class=plan__empty-text>Start your treatment to set up your monthly plan.</p><a class="portal-btn portal-btn--primary">Start your intake`);
|
|
27490
|
+
var _tmpl$3109 = /* @__PURE__ */ template(`<p class=membership__dose>`);
|
|
27491
|
+
var _tmpl$485 = /* @__PURE__ */ template(`<div data-testid=membership-card><div class=membership__sheen aria-hidden=true></div><div class=membership__top><span class="lab-label membership__status"></span><span class=membership__brand></span></div><h2 class=membership__med></h2><div class=membership__bottom><span class=membership__price><span class=membership__per>/mo</span></span><span class=membership__renew>Renews `);
|
|
27492
|
+
var _tmpl$566 = /* @__PURE__ */ template(`<dl class=ledger><div class=ledger__row><dt>Member since</dt><dd></dd></div><div class=ledger__row><dt>Next billing date</dt><dd></dd></div><div class=ledger__row><dt>Billing amount</dt><dd>/mo`);
|
|
27493
|
+
var _tmpl$660 = /* @__PURE__ */ template(`<p class=plan__note>Question about billing? <button type=button class=plan__note-link>Message support`);
|
|
27494
|
+
var _tmpl$753 = /* @__PURE__ */ template(`<p class=plan__error role=alert>`);
|
|
27495
|
+
var _tmpl$845 = /* @__PURE__ */ template(`<button type=button class=plan__link-btn>`);
|
|
27496
|
+
var _tmpl$942 = /* @__PURE__ */ template(`<button type=button class="plan__link-btn plan__link-btn--quiet">Cancel subscription`);
|
|
27497
|
+
var _tmpl$038 = /* @__PURE__ */ template(`<div class=plan__actions><a class=plan__link-btn>Update payment method`);
|
|
27498
|
+
var _tmpl$1139 = /* @__PURE__ */ template(`<div class=confirm data-testid=cancel-confirm><p class=confirm__text>Cancel your subscription? You\u2019ll keep access until the end of your current billing period on <!>.</p><div class=confirm__actions><button type=button class="portal-btn portal-btn--ghost">Keep my plan</button><button type=button class="portal-btn portal-btn--danger">`);
|
|
27068
27499
|
function formatCents(cents) {
|
|
27069
27500
|
if (cents == null || Number.isNaN(cents)) return "\u2014";
|
|
27070
27501
|
return `$${(cents / 100).toFixed(2)}`;
|
|
@@ -27109,20 +27540,20 @@ function PlanBilling(props) {
|
|
|
27109
27540
|
}
|
|
27110
27541
|
};
|
|
27111
27542
|
return (() => {
|
|
27112
|
-
var _el$ = _tmpl$
|
|
27543
|
+
var _el$ = _tmpl$481(); _el$.firstChild;
|
|
27113
27544
|
insert(_el$, createComponent(Show, {
|
|
27114
27545
|
get when() {
|
|
27115
27546
|
return primary();
|
|
27116
27547
|
},
|
|
27117
27548
|
get fallback() {
|
|
27118
27549
|
return (() => {
|
|
27119
|
-
var _el$3 = _tmpl$
|
|
27550
|
+
var _el$3 = _tmpl$2133(), _el$4 = _el$3.firstChild, _el$5 = _el$4.nextSibling, _el$6 = _el$5.nextSibling;
|
|
27120
27551
|
effect(() => setAttribute(_el$6, "href", props.intakeHref));
|
|
27121
27552
|
return _el$3;
|
|
27122
27553
|
})();
|
|
27123
27554
|
},
|
|
27124
27555
|
children: (sub) => [(() => {
|
|
27125
|
-
var _el$7 = _tmpl$
|
|
27556
|
+
var _el$7 = _tmpl$485(), _el$8 = _el$7.firstChild, _el$9 = _el$8.nextSibling, _el$0 = _el$9.firstChild, _el$1 = _el$0.nextSibling, _el$10 = _el$9.nextSibling, _el$12 = _el$10.nextSibling, _el$13 = _el$12.firstChild, _el$14 = _el$13.firstChild, _el$15 = _el$13.nextSibling; _el$15.firstChild;
|
|
27126
27557
|
insert(_el$0, () => STATUS_COPY[sub().status] || sub().status);
|
|
27127
27558
|
insert(_el$1, () => props.brandName);
|
|
27128
27559
|
insert(_el$10, () => sub().medicationName ?? sub().medication);
|
|
@@ -27131,7 +27562,7 @@ function PlanBilling(props) {
|
|
|
27131
27562
|
return sub().dosage;
|
|
27132
27563
|
},
|
|
27133
27564
|
get children() {
|
|
27134
|
-
var _el$11 = _tmpl$
|
|
27565
|
+
var _el$11 = _tmpl$3109();
|
|
27135
27566
|
insert(_el$11, () => sub().dosage);
|
|
27136
27567
|
return _el$11;
|
|
27137
27568
|
}
|
|
@@ -27141,7 +27572,7 @@ function PlanBilling(props) {
|
|
|
27141
27572
|
effect(() => className(_el$7, `membership membership--${sub().status}`));
|
|
27142
27573
|
return _el$7;
|
|
27143
27574
|
})(), (() => {
|
|
27144
|
-
var _el$17 = _tmpl$
|
|
27575
|
+
var _el$17 = _tmpl$566(), _el$18 = _el$17.firstChild, _el$19 = _el$18.firstChild, _el$20 = _el$19.nextSibling, _el$21 = _el$18.nextSibling, _el$22 = _el$21.firstChild, _el$23 = _el$22.nextSibling, _el$24 = _el$21.nextSibling, _el$25 = _el$24.firstChild, _el$26 = _el$25.nextSibling, _el$27 = _el$26.firstChild;
|
|
27145
27576
|
insert(_el$20, () => formatLongDate(sub().createdAt));
|
|
27146
27577
|
insert(_el$23, () => formatLongDate(sub().currentPeriodEnd));
|
|
27147
27578
|
insert(_el$26, () => formatCents(sub().amountCents), _el$27);
|
|
@@ -27151,7 +27582,7 @@ function PlanBilling(props) {
|
|
|
27151
27582
|
return props.messagingEnabled;
|
|
27152
27583
|
},
|
|
27153
27584
|
get children() {
|
|
27154
|
-
var _el$28 = _tmpl$
|
|
27585
|
+
var _el$28 = _tmpl$660(), _el$29 = _el$28.firstChild, _el$31 = _el$29.nextSibling;
|
|
27155
27586
|
_el$31.$$click = () => props.onOpenMessages({
|
|
27156
27587
|
channel: "support",
|
|
27157
27588
|
category: "billing"
|
|
@@ -27163,18 +27594,18 @@ function PlanBilling(props) {
|
|
|
27163
27594
|
return error();
|
|
27164
27595
|
},
|
|
27165
27596
|
get children() {
|
|
27166
|
-
var _el$32 = _tmpl$
|
|
27597
|
+
var _el$32 = _tmpl$753();
|
|
27167
27598
|
insert(_el$32, error);
|
|
27168
27599
|
return _el$32;
|
|
27169
27600
|
}
|
|
27170
27601
|
}), (() => {
|
|
27171
|
-
var _el$33 = _tmpl$
|
|
27602
|
+
var _el$33 = _tmpl$038(), _el$36 = _el$33.firstChild;
|
|
27172
27603
|
insert(_el$33, createComponent(Show, {
|
|
27173
27604
|
get when() {
|
|
27174
27605
|
return sub().status === "active";
|
|
27175
27606
|
},
|
|
27176
27607
|
get children() {
|
|
27177
|
-
var _el$34 = _tmpl$
|
|
27608
|
+
var _el$34 = _tmpl$845();
|
|
27178
27609
|
_el$34.$$click = () => run("pause", () => subscriptionsApi.pause(sub().id));
|
|
27179
27610
|
insert(_el$34, () => action() === "pause" ? "Pausing\u2026" : "Pause subscription");
|
|
27180
27611
|
effect(() => _el$34.disabled = !!action());
|
|
@@ -27186,7 +27617,7 @@ function PlanBilling(props) {
|
|
|
27186
27617
|
return sub().status === "paused";
|
|
27187
27618
|
},
|
|
27188
27619
|
get children() {
|
|
27189
|
-
var _el$35 = _tmpl$
|
|
27620
|
+
var _el$35 = _tmpl$845();
|
|
27190
27621
|
_el$35.$$click = () => run("resume", () => subscriptionsApi.resume(sub().id));
|
|
27191
27622
|
insert(_el$35, () => action() === "resume" ? "Resuming\u2026" : "Resume subscription");
|
|
27192
27623
|
effect(() => _el$35.disabled = !!action());
|
|
@@ -27198,7 +27629,7 @@ function PlanBilling(props) {
|
|
|
27198
27629
|
return memo(() => sub().status !== "cancelled")() && sub().status !== "expired";
|
|
27199
27630
|
},
|
|
27200
27631
|
get children() {
|
|
27201
|
-
var _el$37 = _tmpl$
|
|
27632
|
+
var _el$37 = _tmpl$942();
|
|
27202
27633
|
_el$37.$$click = () => setConfirmCancel(true);
|
|
27203
27634
|
effect(() => _el$37.disabled = !!action());
|
|
27204
27635
|
return _el$37;
|
|
@@ -27211,7 +27642,7 @@ function PlanBilling(props) {
|
|
|
27211
27642
|
return confirmCancel();
|
|
27212
27643
|
},
|
|
27213
27644
|
get children() {
|
|
27214
|
-
var _el$38 = _tmpl$
|
|
27645
|
+
var _el$38 = _tmpl$1139(), _el$39 = _el$38.firstChild, _el$40 = _el$39.firstChild, _el$42 = _el$40.nextSibling; _el$42.nextSibling; var _el$43 = _el$39.nextSibling, _el$44 = _el$43.firstChild, _el$45 = _el$44.nextSibling;
|
|
27215
27646
|
insert(_el$39, () => formatLongDate(sub().currentPeriodEnd), _el$42);
|
|
27216
27647
|
_el$44.$$click = () => setConfirmCancel(false);
|
|
27217
27648
|
_el$45.$$click = () => run("cancel", () => subscriptionsApi.cancel(sub().id)).then(() => setConfirmCancel(false));
|
|
@@ -27233,12 +27664,12 @@ function PlanBilling(props) {
|
|
|
27233
27664
|
})();
|
|
27234
27665
|
}
|
|
27235
27666
|
delegateEvents(["click"]);
|
|
27236
|
-
var _tmpl$
|
|
27237
|
-
var _tmpl$
|
|
27238
|
-
var _tmpl$
|
|
27239
|
-
var _tmpl$
|
|
27240
|
-
var _tmpl$
|
|
27241
|
-
var _tmpl$
|
|
27667
|
+
var _tmpl$486 = /* @__PURE__ */ template(`<p class=account__empty>We don\u2019t have your details on file yet.`);
|
|
27668
|
+
var _tmpl$2134 = /* @__PURE__ */ template(`<p class=account__note>Need to update something? <button type=button class=account__note-link>Message support</button> and we\u2019ll take care of it.`);
|
|
27669
|
+
var _tmpl$3116 = /* @__PURE__ */ template(`<button type=button class="account__support-link account__support-btn">Messages`);
|
|
27670
|
+
var _tmpl$487 = /* @__PURE__ */ template(`<div class=account data-testid=account-panel><span class=lab-label>Account</span><h1 class=account__title>Your details</h1><dl class=account__fields></dl><div class=account__support></div><button type=button class="portal-btn portal-btn--ghost account__signout">Sign out`);
|
|
27671
|
+
var _tmpl$567 = /* @__PURE__ */ template(`<div class=account__field><dt class=lab-label></dt><dd>`);
|
|
27672
|
+
var _tmpl$661 = /* @__PURE__ */ template(`<a class=account__support-link>`);
|
|
27242
27673
|
function pick(member, ...keys) {
|
|
27243
27674
|
if (!member) return "";
|
|
27244
27675
|
for (const k of keys) {
|
|
@@ -27279,13 +27710,13 @@ function AccountPanel(props) {
|
|
|
27279
27710
|
value: address()
|
|
27280
27711
|
}].filter((f) => f.value);
|
|
27281
27712
|
return (() => {
|
|
27282
|
-
var _el$ = _tmpl$
|
|
27713
|
+
var _el$ = _tmpl$487(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling, _el$4 = _el$3.nextSibling, _el$0 = _el$4.nextSibling, _el$10 = _el$0.nextSibling;
|
|
27283
27714
|
insert(_el$4, createComponent(For, {
|
|
27284
27715
|
get each() {
|
|
27285
27716
|
return fields();
|
|
27286
27717
|
},
|
|
27287
27718
|
children: (f) => (() => {
|
|
27288
|
-
var _el$11 = _tmpl$
|
|
27719
|
+
var _el$11 = _tmpl$567(), _el$12 = _el$11.firstChild, _el$13 = _el$12.nextSibling;
|
|
27289
27720
|
insert(_el$12, () => f.label);
|
|
27290
27721
|
insert(_el$13, () => f.value);
|
|
27291
27722
|
return _el$11;
|
|
@@ -27296,7 +27727,7 @@ function AccountPanel(props) {
|
|
|
27296
27727
|
return fields().length === 0;
|
|
27297
27728
|
},
|
|
27298
27729
|
get children() {
|
|
27299
|
-
return _tmpl$
|
|
27730
|
+
return _tmpl$486();
|
|
27300
27731
|
}
|
|
27301
27732
|
}), _el$0);
|
|
27302
27733
|
insert(_el$, createComponent(Show, {
|
|
@@ -27304,7 +27735,7 @@ function AccountPanel(props) {
|
|
|
27304
27735
|
return props.messagingEnabled;
|
|
27305
27736
|
},
|
|
27306
27737
|
get children() {
|
|
27307
|
-
var _el$6 = _tmpl$
|
|
27738
|
+
var _el$6 = _tmpl$2134(), _el$7 = _el$6.firstChild, _el$9 = _el$7.nextSibling;
|
|
27308
27739
|
_el$9.$$click = () => props.onOpenMessages({
|
|
27309
27740
|
channel: "support",
|
|
27310
27741
|
category: "account"
|
|
@@ -27317,7 +27748,7 @@ function AccountPanel(props) {
|
|
|
27317
27748
|
return props.messagingEnabled;
|
|
27318
27749
|
},
|
|
27319
27750
|
get children() {
|
|
27320
|
-
var _el$1 = _tmpl$
|
|
27751
|
+
var _el$1 = _tmpl$3116();
|
|
27321
27752
|
_el$1.$$click = () => props.onOpenMessages();
|
|
27322
27753
|
return _el$1;
|
|
27323
27754
|
}
|
|
@@ -27327,7 +27758,7 @@ function AccountPanel(props) {
|
|
|
27327
27758
|
return props.legalLinks ?? [];
|
|
27328
27759
|
},
|
|
27329
27760
|
children: (link) => (() => {
|
|
27330
|
-
var _el$14 = _tmpl$
|
|
27761
|
+
var _el$14 = _tmpl$661();
|
|
27331
27762
|
insert(_el$14, () => link.label);
|
|
27332
27763
|
effect(() => setAttribute(_el$14, "href", link.href));
|
|
27333
27764
|
return _el$14;
|
|
@@ -27338,12 +27769,12 @@ function AccountPanel(props) {
|
|
|
27338
27769
|
})();
|
|
27339
27770
|
}
|
|
27340
27771
|
delegateEvents(["click"]);
|
|
27341
|
-
var _tmpl$
|
|
27342
|
-
var _tmpl$
|
|
27343
|
-
var _tmpl$
|
|
27344
|
-
var _tmpl$
|
|
27345
|
-
var _tmpl$
|
|
27346
|
-
var _tmpl$
|
|
27772
|
+
var _tmpl$488 = /* @__PURE__ */ template(`<section class="leaflet__section leaflet__section--caution"><h2 class=leaflet__h2>Birth control</h2><p class=leaflet__body>`);
|
|
27773
|
+
var _tmpl$2135 = /* @__PURE__ */ template(`<ul class=leaflet__disclaimers id=leaflet-disclaimers>`);
|
|
27774
|
+
var _tmpl$3117 = /* @__PURE__ */ template(`<div class=leaflet data-testid=medication-guide><header class=leaflet__header><span class=lab-label>How to take it</span><h1 class=leaflet__title></h1><p class=leaflet__summary></p></header><section class=leaflet__boxed aria-label="Boxed warning"><div class=leaflet__boxed-head><i class="ph-fill ph-warning"aria-hidden=true></i><span>Important warning</span></div><p></p></section><section class="leaflet__section leaflet__section--caution"><h2 class=leaflet__h2>Do not use this medicine if\u2026</h2><ul class="leaflet__list leaflet__list--caution"></ul></section><section class=leaflet__section><h2 class=leaflet__h2>Your dose over time</h2><p class=leaflet__note>A typical step-up. Your prescriber sets your exact doses and timing.</p><ol class=titration></ol></section><section class=leaflet__section><h2 class=leaflet__h2>Giving your injection</h2><ol class=steps></ol></section><div class=leaflet__grid><section class=leaflet__section><h2 class=leaflet__h2>Storing your medicine</h2><ul class=leaflet__list></ul></section><section class=leaflet__section><h2 class=leaflet__h2>If you miss a dose</h2><p class=leaflet__body></p></section></div><div class=leaflet__grid><section class=leaflet__section><h2 class=leaflet__h2>Common side effects</h2><ul class="leaflet__list leaflet__list--check"></ul></section><section class="leaflet__section leaflet__section--alert"><h2 class=leaflet__h2>Call right away if you notice\u2026</h2><ul class="leaflet__list leaflet__list--alert"></ul></section></div><section class=leaflet__section><h2 class=leaflet__h2>When to contact your care team</h2><ul class=leaflet__list></ul></section><section class=leaflet__section><h2 class=leaflet__h2>Tips for feeling your best</h2><ul class="leaflet__list leaflet__list--check"></ul></section><section class=leaflet__footnote><button type=button class=leaflet__disclose aria-controls=leaflet-disclaimers> the important details<i aria-hidden=true>`);
|
|
27775
|
+
var _tmpl$489 = /* @__PURE__ */ template(`<li>`);
|
|
27776
|
+
var _tmpl$568 = /* @__PURE__ */ template(`<li><span class=titration__bead aria-hidden=true></span><div class=titration__body><div class=titration__row><span class=titration__dose></span><span class="lab-label titration__phase"></span></div><span class=titration__time></span><p class=titration__note>`);
|
|
27777
|
+
var _tmpl$664 = /* @__PURE__ */ template(`<li class=steps__item><span class=steps__num></span><div class=steps__body><h3 class=steps__title></h3><p class=steps__detail>`);
|
|
27347
27778
|
function firstNumber(s) {
|
|
27348
27779
|
const m = (s || "").match(/\d+(\.\d+)?/);
|
|
27349
27780
|
return m ? m[0] : null;
|
|
@@ -27364,7 +27795,7 @@ function MedicationGuide(props) {
|
|
|
27364
27795
|
return "upcoming";
|
|
27365
27796
|
};
|
|
27366
27797
|
return (() => {
|
|
27367
|
-
var _el$ = _tmpl$
|
|
27798
|
+
var _el$ = _tmpl$3117(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling, _el$5 = _el$4.nextSibling, _el$6 = _el$2.nextSibling, _el$7 = _el$6.firstChild, _el$8 = _el$7.nextSibling, _el$9 = _el$6.nextSibling, _el$0 = _el$9.firstChild, _el$1 = _el$0.nextSibling, _el$10 = _el$9.nextSibling, _el$11 = _el$10.firstChild, _el$12 = _el$11.nextSibling, _el$13 = _el$12.nextSibling, _el$14 = _el$10.nextSibling, _el$15 = _el$14.firstChild, _el$16 = _el$15.nextSibling, _el$17 = _el$14.nextSibling, _el$18 = _el$17.firstChild, _el$19 = _el$18.firstChild, _el$20 = _el$19.nextSibling, _el$21 = _el$18.nextSibling, _el$22 = _el$21.firstChild, _el$23 = _el$22.nextSibling, _el$27 = _el$17.nextSibling, _el$28 = _el$27.firstChild, _el$29 = _el$28.firstChild, _el$30 = _el$29.nextSibling, _el$31 = _el$28.nextSibling, _el$32 = _el$31.firstChild, _el$33 = _el$32.nextSibling, _el$34 = _el$27.nextSibling, _el$35 = _el$34.firstChild, _el$36 = _el$35.nextSibling, _el$37 = _el$34.nextSibling, _el$38 = _el$37.firstChild, _el$39 = _el$38.nextSibling, _el$40 = _el$37.nextSibling, _el$41 = _el$40.firstChild, _el$42 = _el$41.firstChild, _el$43 = _el$42.nextSibling;
|
|
27368
27799
|
insert(_el$4, () => props.guide.title);
|
|
27369
27800
|
insert(_el$5, () => props.guide.summary);
|
|
27370
27801
|
insert(_el$8, () => props.guide.boxedWarning);
|
|
@@ -27373,7 +27804,7 @@ function MedicationGuide(props) {
|
|
|
27373
27804
|
return props.guide.doNotUseIf;
|
|
27374
27805
|
},
|
|
27375
27806
|
children: (item) => (() => {
|
|
27376
|
-
var _el$45 = _tmpl$
|
|
27807
|
+
var _el$45 = _tmpl$489();
|
|
27377
27808
|
insert(_el$45, item);
|
|
27378
27809
|
return _el$45;
|
|
27379
27810
|
})()
|
|
@@ -27383,7 +27814,7 @@ function MedicationGuide(props) {
|
|
|
27383
27814
|
return props.guide.titration;
|
|
27384
27815
|
},
|
|
27385
27816
|
children: (step, i) => (() => {
|
|
27386
|
-
var _el$46 = _tmpl$
|
|
27817
|
+
var _el$46 = _tmpl$568(), _el$47 = _el$46.firstChild, _el$48 = _el$47.nextSibling, _el$49 = _el$48.firstChild, _el$50 = _el$49.firstChild, _el$51 = _el$50.nextSibling, _el$52 = _el$49.nextSibling, _el$53 = _el$52.nextSibling;
|
|
27387
27818
|
insert(_el$50, () => step.dose);
|
|
27388
27819
|
insert(_el$51, () => step.phase);
|
|
27389
27820
|
insert(_el$52, () => step.timeframe);
|
|
@@ -27397,7 +27828,7 @@ function MedicationGuide(props) {
|
|
|
27397
27828
|
return props.guide.injectionSteps;
|
|
27398
27829
|
},
|
|
27399
27830
|
children: (step) => (() => {
|
|
27400
|
-
var _el$54 = _tmpl$
|
|
27831
|
+
var _el$54 = _tmpl$664(), _el$55 = _el$54.firstChild, _el$56 = _el$55.nextSibling, _el$57 = _el$56.firstChild, _el$58 = _el$57.nextSibling;
|
|
27401
27832
|
insert(_el$55, () => step.n);
|
|
27402
27833
|
insert(_el$57, () => step.title);
|
|
27403
27834
|
insert(_el$58, () => step.detail);
|
|
@@ -27409,7 +27840,7 @@ function MedicationGuide(props) {
|
|
|
27409
27840
|
return props.guide.storage;
|
|
27410
27841
|
},
|
|
27411
27842
|
children: (item) => (() => {
|
|
27412
|
-
var _el$59 = _tmpl$
|
|
27843
|
+
var _el$59 = _tmpl$489();
|
|
27413
27844
|
insert(_el$59, item);
|
|
27414
27845
|
return _el$59;
|
|
27415
27846
|
})()
|
|
@@ -27420,7 +27851,7 @@ function MedicationGuide(props) {
|
|
|
27420
27851
|
return props.guide.contraception;
|
|
27421
27852
|
},
|
|
27422
27853
|
get children() {
|
|
27423
|
-
var _el$24 = _tmpl$
|
|
27854
|
+
var _el$24 = _tmpl$488(), _el$25 = _el$24.firstChild, _el$26 = _el$25.nextSibling;
|
|
27424
27855
|
insert(_el$26, () => props.guide.contraception);
|
|
27425
27856
|
return _el$24;
|
|
27426
27857
|
}
|
|
@@ -27430,7 +27861,7 @@ function MedicationGuide(props) {
|
|
|
27430
27861
|
return props.guide.sideEffectsCommon;
|
|
27431
27862
|
},
|
|
27432
27863
|
children: (item) => (() => {
|
|
27433
|
-
var _el$60 = _tmpl$
|
|
27864
|
+
var _el$60 = _tmpl$489();
|
|
27434
27865
|
insert(_el$60, item);
|
|
27435
27866
|
return _el$60;
|
|
27436
27867
|
})()
|
|
@@ -27440,7 +27871,7 @@ function MedicationGuide(props) {
|
|
|
27440
27871
|
return props.guide.sideEffectsSerious;
|
|
27441
27872
|
},
|
|
27442
27873
|
children: (item) => (() => {
|
|
27443
|
-
var _el$61 = _tmpl$
|
|
27874
|
+
var _el$61 = _tmpl$489();
|
|
27444
27875
|
insert(_el$61, item);
|
|
27445
27876
|
return _el$61;
|
|
27446
27877
|
})()
|
|
@@ -27450,7 +27881,7 @@ function MedicationGuide(props) {
|
|
|
27450
27881
|
return props.guide.whenToCall;
|
|
27451
27882
|
},
|
|
27452
27883
|
children: (item) => (() => {
|
|
27453
|
-
var _el$62 = _tmpl$
|
|
27884
|
+
var _el$62 = _tmpl$489();
|
|
27454
27885
|
insert(_el$62, item);
|
|
27455
27886
|
return _el$62;
|
|
27456
27887
|
})()
|
|
@@ -27460,7 +27891,7 @@ function MedicationGuide(props) {
|
|
|
27460
27891
|
return props.guide.tips;
|
|
27461
27892
|
},
|
|
27462
27893
|
children: (item) => (() => {
|
|
27463
|
-
var _el$63 = _tmpl$
|
|
27894
|
+
var _el$63 = _tmpl$489();
|
|
27464
27895
|
insert(_el$63, item);
|
|
27465
27896
|
return _el$63;
|
|
27466
27897
|
})()
|
|
@@ -27472,13 +27903,13 @@ function MedicationGuide(props) {
|
|
|
27472
27903
|
return showDisclaimers();
|
|
27473
27904
|
},
|
|
27474
27905
|
get children() {
|
|
27475
|
-
var _el$44 = _tmpl$
|
|
27906
|
+
var _el$44 = _tmpl$2135();
|
|
27476
27907
|
insert(_el$44, createComponent(For, {
|
|
27477
27908
|
get each() {
|
|
27478
27909
|
return props.guide.disclaimers;
|
|
27479
27910
|
},
|
|
27480
27911
|
children: (item) => (() => {
|
|
27481
|
-
var _el$64 = _tmpl$
|
|
27912
|
+
var _el$64 = _tmpl$489();
|
|
27482
27913
|
insert(_el$64, item);
|
|
27483
27914
|
return _el$64;
|
|
27484
27915
|
})()
|
|
@@ -27499,19 +27930,19 @@ function MedicationGuide(props) {
|
|
|
27499
27930
|
})();
|
|
27500
27931
|
}
|
|
27501
27932
|
delegateEvents(["click"]);
|
|
27502
|
-
var _tmpl$
|
|
27503
|
-
var _tmpl$
|
|
27504
|
-
var _tmpl$
|
|
27505
|
-
var _tmpl$
|
|
27506
|
-
var _tmpl$
|
|
27507
|
-
var _tmpl$
|
|
27508
|
-
var _tmpl$
|
|
27509
|
-
var _tmpl$
|
|
27510
|
-
var _tmpl$
|
|
27511
|
-
var _tmpl$
|
|
27512
|
-
var _tmpl$
|
|
27933
|
+
var _tmpl$490 = /* @__PURE__ */ template(`<span data-testid=channel-chip>`);
|
|
27934
|
+
var _tmpl$2136 = /* @__PURE__ */ template(`<span class=channel-chip__category>`);
|
|
27935
|
+
var _tmpl$3118 = /* @__PURE__ */ template(`<div class=msg-list__header><div class=msg-list__header-title><button type=button class=msg-list__back aria-label="Choose a different team"data-testid=messages-choose-different><i class="ph-thin ph-arrow-left"aria-hidden=true></i></button><h2 class=msg-list__title></h2></div><button type=button class=msg-list__new data-testid=messages-new-support><i class="ph-thin ph-plus"aria-hidden=true></i>New message`);
|
|
27936
|
+
var _tmpl$491 = /* @__PURE__ */ template(`<div class=msg-list__state><div class=request-status__spinner>`);
|
|
27937
|
+
var _tmpl$569 = /* @__PURE__ */ template(`<div class="msg-list__state msg-list__state--empty"data-testid=messages-empty><i class="ph-thin ph-chat-circle msg-list__empty-icon"aria-hidden=true></i><p class=msg-list__empty-title>No conversations yet.</p><p class=msg-list__empty-hint>`);
|
|
27938
|
+
var _tmpl$665 = /* @__PURE__ */ template(`<div class=msg-list__scroll data-scrollable>`);
|
|
27939
|
+
var _tmpl$754 = /* @__PURE__ */ template(`<span class=msg-list__pip>`);
|
|
27940
|
+
var _tmpl$846 = /* @__PURE__ */ template(`<button type=button><div class=msg-list__row><span class=msg-list__name-group><span class=msg-list__name></span></span><span class=msg-list__time></span></div><div class=msg-list__row><span class=msg-list__preview>`);
|
|
27941
|
+
var _tmpl$943 = /* @__PURE__ */ template(`<button type=button class=msg-attachment__image-link><img class=msg-attachment__image loading=lazy>`, true, false, false);
|
|
27942
|
+
var _tmpl$039 = /* @__PURE__ */ template(`<button type=button class=msg-attachment__file><span class=msg-attachment__file-icon aria-hidden=true><i class="ph-thin ph-paperclip"></i></span><span class=msg-attachment__file-info><span class=msg-attachment__file-name></span><span class=msg-attachment__file-size>`);
|
|
27943
|
+
var _tmpl$1140 = /* @__PURE__ */ template(`<span class=msg-attachment__fallback>`);
|
|
27513
27944
|
var _tmpl$1030 = /* @__PURE__ */ template(`<p class=msg-thread__sender>`);
|
|
27514
|
-
var _tmpl$
|
|
27945
|
+
var _tmpl$1141 = /* @__PURE__ */ template(`<div class=msg-thread__text>`);
|
|
27515
27946
|
var _tmpl$1226 = /* @__PURE__ */ template(`<div class=msg-attachment>`);
|
|
27516
27947
|
var _tmpl$1324 = /* @__PURE__ */ template(`<div><div><p class=msg-thread__meta>`);
|
|
27517
27948
|
var _tmpl$1424 = /* @__PURE__ */ template(`<p class=msg-thread__system data-testid=system-message>`);
|
|
@@ -27521,7 +27952,7 @@ var _tmpl$1722 = /* @__PURE__ */ template(`<p class=msg-compose__error role=aler
|
|
|
27521
27952
|
var _tmpl$1820 = /* @__PURE__ */ template(`<form class="msg-thread msg-thread--compose"data-testid=support-compose><div class=msg-thread__header><button type=button class=msg-thread__back-btn aria-label=Back data-testid=support-compose-back><i class="ph-thin ph-arrow-left"aria-hidden=true></i></button><div><h3 class=msg-thread__name>Message support</h3><p class=msg-thread__role data-testid=support-compose-reply-note></p></div></div><div class=msg-compose__new><label class=msg-compose__label id=support-category-label>What's this about? <span class=msg-compose__label-optional>(optional)</span></label><div class=msg-compose__categories role=group aria-labelledby=support-category-label></div><label class=msg-compose__label for=support-subject>Subject</label><input id=support-subject class=msg-compose__subject type=text maxlength=500 required placeholder="e.g. Question about my order"><label class=msg-compose__label for=support-body>How can we help?</label><textarea id=support-body class=msg-compose__body rows=6 maxlength=5000 required placeholder="Tell us what's going on\u2026"></textarea><label class="msg-compose__attach msg-compose__attach--block"title="Attach a file"><i class="ph-thin ph-paperclip"aria-hidden=true></i><span class=msg-compose__attach-label></span><input class=msg-compose__file-input type=file data-testid=support-compose-attach></label><button type=submit class=msg-compose__send data-testid=support-compose-send>`);
|
|
27522
27953
|
var _tmpl$1918 = /* @__PURE__ */ template(`<button type=button>`);
|
|
27523
27954
|
var _tmpl$2018 = /* @__PURE__ */ template(`<form class="msg-thread msg-thread--compose"data-testid=care-compose><div class=msg-thread__header><button type=button class=msg-thread__back-btn aria-label=Back data-testid=care-compose-back><i class="ph-thin ph-arrow-left"aria-hidden=true></i></button><div><h3 class=msg-thread__name>Message your care team</h3><p class=msg-thread__role>Your prescriber or their team will reply</p></div></div><div class=msg-compose__new><label class=msg-compose__label for=care-body>Message</label><textarea id=care-body class=msg-compose__body rows=6 maxlength=5000 required placeholder="Tell your care team what's going on\u2026"></textarea><label class="msg-compose__attach msg-compose__attach--block"title="Attach a file"><i class="ph-thin ph-paperclip"aria-hidden=true></i><span class=msg-compose__attach-label></span><input class=msg-compose__file-input type=file data-testid=care-compose-attach></label><button type=submit class=msg-compose__send data-testid=care-compose-send>`);
|
|
27524
|
-
var _tmpl$
|
|
27955
|
+
var _tmpl$2137 = /* @__PURE__ */ template(`<span class=msg-choice__option-badge data-testid=gate-care-badge>`);
|
|
27525
27956
|
var _tmpl$2217 = /* @__PURE__ */ template(`<span class=msg-choice__option-badge data-testid=gate-support-badge>`);
|
|
27526
27957
|
var _tmpl$2315 = /* @__PURE__ */ template(`<p class=msg-choice__notice-text data-testid=messages-gate-note>That conversation isn't available.`);
|
|
27527
27958
|
var _tmpl$2415 = /* @__PURE__ */ template(`<div class="msg-thread msg-choice"data-testid=messages-gate><div class=msg-thread__header><div><h3 class=msg-thread__name>Messages</h3><p class=msg-thread__role>Who do you want to talk to?</p></div></div><div class=msg-choice__options><button type=button class=msg-choice__option data-testid=gate-care-team><i class="ph-thin ph-heartbeat msg-choice__option-icon"aria-hidden=true></i><span class=msg-choice__option-title>My care team</span><span class=msg-choice__option-sub>Treatment, medication or side effects</span></button><button type=button class=msg-choice__option data-testid=gate-support><i class="ph-thin ph-lifebuoy msg-choice__option-icon"aria-hidden=true></i><span class=msg-choice__option-title>Support</span><span class=msg-choice__option-sub>Account, orders, billing or the website`);
|
|
@@ -27531,7 +27962,7 @@ var _tmpl$2714 = /* @__PURE__ */ template(`<div class="msg-thread msg-choice"dat
|
|
|
27531
27962
|
var _tmpl$2813 = /* @__PURE__ */ template(`<div class="msg-thread msg-choice"data-testid=support-email-sent><div class=msg-thread__header><button type=button class=msg-thread__back-btn aria-label=Back><i class="ph-thin ph-arrow-left"aria-hidden=true></i></button><div><h3 class=msg-thread__name>Message sent</h3><p class=msg-thread__role>Support</p></div></div><div class=msg-choice__notice><p class=msg-choice__notice-text>Thanks, your message is on its way to our support team. We'll reply by email, usually within one business day.</p><button type=button class="portal-btn portal-btn--primary"data-testid=support-email-another>Send another message`);
|
|
27532
27963
|
var _tmpl$2911 = /* @__PURE__ */ template(`<span class=msg-thread__status data-testid=thread-status-closed>Resolved`);
|
|
27533
27964
|
var _tmpl$3011 = /* @__PURE__ */ template(`<span class=msg-thread__status data-testid=thread-status-transferred>Moved to care team`);
|
|
27534
|
-
var _tmpl$
|
|
27965
|
+
var _tmpl$3119 = /* @__PURE__ */ template(`<div class=msg-thread__header><button type=button class=msg-thread__back-btn aria-label="Back to conversations"data-testid=messages-back><i class="ph-thin ph-arrow-left"aria-hidden=true></i></button><div><div class=msg-thread__title-row><h3 class=msg-thread__name></h3></div><p class=msg-thread__role>`);
|
|
27535
27966
|
var _tmpl$3215 = /* @__PURE__ */ template(`<div class=msg-thread__banner><button type=button class=msg-thread__banner-link data-testid=continue-with-care-team>Continue with your care team`);
|
|
27536
27967
|
var _tmpl$3315 = /* @__PURE__ */ template(`<div class=msg-thread__messages data-scrollable><div>`);
|
|
27537
27968
|
var _tmpl$3415 = /* @__PURE__ */ template(`<span class=msg-compose__error role=alert>`);
|
|
@@ -27744,14 +28175,14 @@ function MessagesPanel(props) {
|
|
|
27744
28175
|
}
|
|
27745
28176
|
}
|
|
27746
28177
|
const ChannelChip = (p) => (() => {
|
|
27747
|
-
var _el$ = _tmpl$
|
|
28178
|
+
var _el$ = _tmpl$490();
|
|
27748
28179
|
insert(_el$, () => p.source === "clinical" ? "Care team" : "Support", null);
|
|
27749
28180
|
insert(_el$, createComponent(Show, {
|
|
27750
28181
|
get when() {
|
|
27751
28182
|
return memo(() => p.source === "support")() && categoryLabel(p.category);
|
|
27752
28183
|
},
|
|
27753
28184
|
children: (label3) => (() => {
|
|
27754
|
-
var _el$2 = _tmpl$
|
|
28185
|
+
var _el$2 = _tmpl$2136();
|
|
27755
28186
|
insert(_el$2, label3);
|
|
27756
28187
|
return _el$2;
|
|
27757
28188
|
})()
|
|
@@ -27769,19 +28200,19 @@ function MessagesPanel(props) {
|
|
|
27769
28200
|
})();
|
|
27770
28201
|
const channelConversations = () => thread().conversations().filter((c) => c.source === (channel() === "care" ? "clinical" : "support"));
|
|
27771
28202
|
const ConversationList = () => [(() => {
|
|
27772
|
-
var _el$3 = _tmpl$
|
|
28203
|
+
var _el$3 = _tmpl$3118(), _el$4 = _el$3.firstChild, _el$5 = _el$4.firstChild, _el$6 = _el$5.nextSibling, _el$7 = _el$4.nextSibling;
|
|
27773
28204
|
_el$5.$$click = goToGate;
|
|
27774
28205
|
insert(_el$6, () => channel() === "care" ? "My care team" : "Support");
|
|
27775
28206
|
_el$7.$$click = openCompose;
|
|
27776
28207
|
return _el$3;
|
|
27777
28208
|
})(), (() => {
|
|
27778
|
-
var _el$8 = _tmpl$
|
|
28209
|
+
var _el$8 = _tmpl$665();
|
|
27779
28210
|
insert(_el$8, createComponent(Show, {
|
|
27780
28211
|
get when() {
|
|
27781
28212
|
return thread().loadingConversations();
|
|
27782
28213
|
},
|
|
27783
28214
|
get children() {
|
|
27784
|
-
return _tmpl$
|
|
28215
|
+
return _tmpl$491();
|
|
27785
28216
|
}
|
|
27786
28217
|
}), null);
|
|
27787
28218
|
insert(_el$8, createComponent(Show, {
|
|
@@ -27789,7 +28220,7 @@ function MessagesPanel(props) {
|
|
|
27789
28220
|
return memo(() => !!!thread().loadingConversations())() && channelConversations().length === 0;
|
|
27790
28221
|
},
|
|
27791
28222
|
get children() {
|
|
27792
|
-
var _el$0 = _tmpl$
|
|
28223
|
+
var _el$0 = _tmpl$569(), _el$1 = _el$0.firstChild, _el$10 = _el$1.nextSibling, _el$11 = _el$10.nextSibling;
|
|
27793
28224
|
insert(_el$11, createComponent(Show, {
|
|
27794
28225
|
get when() {
|
|
27795
28226
|
return channel() === "care";
|
|
@@ -27805,7 +28236,7 @@ function MessagesPanel(props) {
|
|
|
27805
28236
|
return channelConversations();
|
|
27806
28237
|
},
|
|
27807
28238
|
children: (convo) => (() => {
|
|
27808
|
-
var _el$12 = _tmpl$
|
|
28239
|
+
var _el$12 = _tmpl$846(), _el$13 = _el$12.firstChild, _el$14 = _el$13.firstChild, _el$15 = _el$14.firstChild, _el$16 = _el$14.nextSibling, _el$17 = _el$13.nextSibling, _el$18 = _el$17.firstChild;
|
|
27809
28240
|
_el$12.$$click = () => thread().selectConversation(convo.id);
|
|
27810
28241
|
insert(_el$15, () => convo.participantName ?? "Provider");
|
|
27811
28242
|
insert(_el$14, createComponent(ChannelChip, {
|
|
@@ -27823,7 +28254,7 @@ function MessagesPanel(props) {
|
|
|
27823
28254
|
return (convo.unreadCount ?? 0) > 0;
|
|
27824
28255
|
},
|
|
27825
28256
|
get children() {
|
|
27826
|
-
var _el$19 = _tmpl$
|
|
28257
|
+
var _el$19 = _tmpl$754();
|
|
27827
28258
|
insert(_el$19, () => convo.unreadCount);
|
|
27828
28259
|
return _el$19;
|
|
27829
28260
|
}
|
|
@@ -27865,7 +28296,7 @@ function MessagesPanel(props) {
|
|
|
27865
28296
|
},
|
|
27866
28297
|
get fallback() {
|
|
27867
28298
|
return (() => {
|
|
27868
|
-
var _el$22 = _tmpl$
|
|
28299
|
+
var _el$22 = _tmpl$039(), _el$23 = _el$22.firstChild, _el$24 = _el$23.nextSibling, _el$25 = _el$24.firstChild, _el$26 = _el$25.nextSibling;
|
|
27869
28300
|
_el$22.$$click = openDocument;
|
|
27870
28301
|
insert(_el$25, () => p.attachment.filename);
|
|
27871
28302
|
insert(_el$26, () => formatFileSize(p.attachment.sizeBytes));
|
|
@@ -27880,13 +28311,13 @@ function MessagesPanel(props) {
|
|
|
27880
28311
|
},
|
|
27881
28312
|
get fallback() {
|
|
27882
28313
|
return (() => {
|
|
27883
|
-
var _el$27 = _tmpl$
|
|
28314
|
+
var _el$27 = _tmpl$1140();
|
|
27884
28315
|
insert(_el$27, () => failed() ? "Attachment unavailable" : "Loading\u2026");
|
|
27885
28316
|
return _el$27;
|
|
27886
28317
|
})();
|
|
27887
28318
|
},
|
|
27888
28319
|
get children() {
|
|
27889
|
-
var _el$20 = _tmpl$
|
|
28320
|
+
var _el$20 = _tmpl$943(), _el$21 = _el$20.firstChild;
|
|
27890
28321
|
_el$20.$$click = openDocument;
|
|
27891
28322
|
_el$21.addEventListener("error", () => {
|
|
27892
28323
|
if (retried) {
|
|
@@ -27954,7 +28385,7 @@ function MessagesPanel(props) {
|
|
|
27954
28385
|
})();
|
|
27955
28386
|
},
|
|
27956
28387
|
get children() {
|
|
27957
|
-
var _el$31 = _tmpl$
|
|
28388
|
+
var _el$31 = _tmpl$1141();
|
|
27958
28389
|
effect(() => _el$31.innerHTML = sanitizeMessageHtml(body()));
|
|
27959
28390
|
return _el$31;
|
|
27960
28391
|
}
|
|
@@ -28113,7 +28544,7 @@ function MessagesPanel(props) {
|
|
|
28113
28544
|
return careUnreadCount() > 0;
|
|
28114
28545
|
},
|
|
28115
28546
|
get children() {
|
|
28116
|
-
var _el$77 = _tmpl$
|
|
28547
|
+
var _el$77 = _tmpl$2137();
|
|
28117
28548
|
insert(_el$77, careUnreadCount);
|
|
28118
28549
|
return _el$77;
|
|
28119
28550
|
}
|
|
@@ -28167,7 +28598,7 @@ function MessagesPanel(props) {
|
|
|
28167
28598
|
return _el$92;
|
|
28168
28599
|
})();
|
|
28169
28600
|
const Thread = () => [(() => {
|
|
28170
|
-
var _el$98 = _tmpl$
|
|
28601
|
+
var _el$98 = _tmpl$3119(), _el$99 = _el$98.firstChild, _el$100 = _el$99.nextSibling, _el$101 = _el$100.firstChild, _el$102 = _el$101.firstChild, _el$103 = _el$101.nextSibling;
|
|
28171
28602
|
_el$99.$$click = () => thread().clearSelection();
|
|
28172
28603
|
insert(_el$102, () => selectedConvo()?.participantName ?? "Provider");
|
|
28173
28604
|
insert(_el$101, createComponent(Show, {
|
|
@@ -28217,7 +28648,7 @@ function MessagesPanel(props) {
|
|
|
28217
28648
|
return thread().loadingMessages();
|
|
28218
28649
|
},
|
|
28219
28650
|
get children() {
|
|
28220
|
-
return _tmpl$
|
|
28651
|
+
return _tmpl$491();
|
|
28221
28652
|
}
|
|
28222
28653
|
}), _el$110);
|
|
28223
28654
|
insert(_el$108, createComponent(For, {
|
|
@@ -28401,17 +28832,17 @@ function MessagesPanel(props) {
|
|
|
28401
28832
|
})();
|
|
28402
28833
|
}
|
|
28403
28834
|
delegateEvents(["click", "input", "keydown"]);
|
|
28404
|
-
var _tmpl$
|
|
28405
|
-
var _tmpl$
|
|
28406
|
-
var _tmpl$
|
|
28407
|
-
var _tmpl$
|
|
28408
|
-
var _tmpl$
|
|
28409
|
-
var _tmpl$
|
|
28410
|
-
var _tmpl$
|
|
28411
|
-
var _tmpl$
|
|
28412
|
-
var _tmpl$
|
|
28413
|
-
var _tmpl$
|
|
28414
|
-
var _tmpl$
|
|
28835
|
+
var _tmpl$495 = /* @__PURE__ */ template(`<ul class=history-list data-testid=history-list>`);
|
|
28836
|
+
var _tmpl$2138 = /* @__PURE__ */ template(`<div class=portal-state data-testid=history-error><p>We couldn't load your submitted surveys. Please try again in a moment.`);
|
|
28837
|
+
var _tmpl$3120 = /* @__PURE__ */ template(`<div class=portal-state data-testid=history-empty><p>No submitted questionnaires yet.</p><p class=history-hint>Your intake and refill check-in answers will appear here once you've submitted them.`);
|
|
28838
|
+
var _tmpl$496 = /* @__PURE__ */ template(`<li><button type=button class=history-row><span class=history-row__mode></span><span class=history-row__date></span><i class="ph-thin ph-caret-right portal-icon"aria-hidden=true>`);
|
|
28839
|
+
var _tmpl$570 = /* @__PURE__ */ template(`<div data-testid=history-detail><button type=button class="portal-btn portal-btn--ghost history-back"><i class="ph-thin ph-caret-left portal-icon"aria-hidden=true></i> All questionnaires`);
|
|
28840
|
+
var _tmpl$666 = /* @__PURE__ */ template(`<div class=portal-state><div class=request-status__spinner></div><p>Loading your answers\u2026`);
|
|
28841
|
+
var _tmpl$755 = /* @__PURE__ */ template(`<div class=portal-state data-testid=history-detail-error><p>We couldn't load this questionnaire. Please try again in a moment.`);
|
|
28842
|
+
var _tmpl$847 = /* @__PURE__ */ template(`<article class=history-transcript><header class=history-transcript__head><h2></h2><p class=history-transcript__meta>Submitted <!>. Your answers are shown exactly as they were at the time \u2014 they aren't updated afterwards.`);
|
|
28843
|
+
var _tmpl$944 = /* @__PURE__ */ template(`<section class=history-section><h3 class=lab-label>`);
|
|
28844
|
+
var _tmpl$040 = /* @__PURE__ */ template(`<div class=history-qa><p class=history-qa__q></p><p class=history-qa__a>`);
|
|
28845
|
+
var _tmpl$1142 = /* @__PURE__ */ template(`<div class=survey-history data-testid=survey-history>`);
|
|
28415
28846
|
var _tmpl$1031 = /* @__PURE__ */ template(`<div class=portal-state><div class=request-status__spinner></div><p>Loading your submitted surveys\u2026`);
|
|
28416
28847
|
var MODE_LABELS = {
|
|
28417
28848
|
initial: "Intake questionnaire",
|
|
@@ -28440,7 +28871,7 @@ function SurveyHistory() {
|
|
|
28440
28871
|
return !list.error;
|
|
28441
28872
|
},
|
|
28442
28873
|
get fallback() {
|
|
28443
|
-
return _tmpl$
|
|
28874
|
+
return _tmpl$2138();
|
|
28444
28875
|
},
|
|
28445
28876
|
get children() {
|
|
28446
28877
|
return createComponent(Show, {
|
|
@@ -28448,16 +28879,16 @@ function SurveyHistory() {
|
|
|
28448
28879
|
return (list() ?? []).length > 0;
|
|
28449
28880
|
},
|
|
28450
28881
|
get fallback() {
|
|
28451
|
-
return _tmpl$
|
|
28882
|
+
return _tmpl$3120();
|
|
28452
28883
|
},
|
|
28453
28884
|
get children() {
|
|
28454
|
-
var _el$ = _tmpl$
|
|
28885
|
+
var _el$ = _tmpl$495();
|
|
28455
28886
|
insert(_el$, createComponent(For, {
|
|
28456
28887
|
get each() {
|
|
28457
28888
|
return list();
|
|
28458
28889
|
},
|
|
28459
28890
|
children: (item) => (() => {
|
|
28460
|
-
var _el$4 = _tmpl$
|
|
28891
|
+
var _el$4 = _tmpl$496(), _el$5 = _el$4.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling;
|
|
28461
28892
|
_el$5.$$click = () => setSelectedId(item.id);
|
|
28462
28893
|
insert(_el$6, () => MODE_LABELS[item.mode] ?? "Questionnaire");
|
|
28463
28894
|
insert(_el$7, () => formatDate3(item.submittedAt) ?? "Date unavailable");
|
|
@@ -28470,14 +28901,14 @@ function SurveyHistory() {
|
|
|
28470
28901
|
}
|
|
28471
28902
|
});
|
|
28472
28903
|
const DetailView = () => (() => {
|
|
28473
|
-
var _el$8 = _tmpl$
|
|
28904
|
+
var _el$8 = _tmpl$570(), _el$9 = _el$8.firstChild;
|
|
28474
28905
|
_el$9.$$click = () => setSelectedId(null);
|
|
28475
28906
|
insert(_el$8, createComponent(Show, {
|
|
28476
28907
|
get when() {
|
|
28477
28908
|
return !detail.loading;
|
|
28478
28909
|
},
|
|
28479
28910
|
get fallback() {
|
|
28480
|
-
return _tmpl$
|
|
28911
|
+
return _tmpl$666();
|
|
28481
28912
|
},
|
|
28482
28913
|
get children() {
|
|
28483
28914
|
return createComponent(Show, {
|
|
@@ -28485,10 +28916,10 @@ function SurveyHistory() {
|
|
|
28485
28916
|
return memo(() => !!!detail.error)() && detail();
|
|
28486
28917
|
},
|
|
28487
28918
|
get fallback() {
|
|
28488
|
-
return _tmpl$
|
|
28919
|
+
return _tmpl$755();
|
|
28489
28920
|
},
|
|
28490
28921
|
children: (t) => (() => {
|
|
28491
|
-
var _el$10 = _tmpl$
|
|
28922
|
+
var _el$10 = _tmpl$847(), _el$11 = _el$10.firstChild, _el$12 = _el$11.firstChild, _el$13 = _el$12.nextSibling, _el$14 = _el$13.firstChild, _el$16 = _el$14.nextSibling; _el$16.nextSibling;
|
|
28492
28923
|
insert(_el$12, () => MODE_LABELS[t().mode] ?? "Questionnaire");
|
|
28493
28924
|
insert(_el$13, () => formatDate3(t().completedAt ?? t().createdAt) ?? "\u2014", _el$16);
|
|
28494
28925
|
insert(_el$10, createComponent(For, {
|
|
@@ -28496,14 +28927,14 @@ function SurveyHistory() {
|
|
|
28496
28927
|
return t().sections;
|
|
28497
28928
|
},
|
|
28498
28929
|
children: (section) => (() => {
|
|
28499
|
-
var _el$17 = _tmpl$
|
|
28930
|
+
var _el$17 = _tmpl$944(), _el$18 = _el$17.firstChild;
|
|
28500
28931
|
insert(_el$18, () => section.title);
|
|
28501
28932
|
insert(_el$17, createComponent(For, {
|
|
28502
28933
|
get each() {
|
|
28503
28934
|
return section.items;
|
|
28504
28935
|
},
|
|
28505
28936
|
children: (item) => (() => {
|
|
28506
|
-
var _el$19 = _tmpl$
|
|
28937
|
+
var _el$19 = _tmpl$040(), _el$20 = _el$19.firstChild, _el$21 = _el$20.nextSibling;
|
|
28507
28938
|
insert(_el$20, () => item.question);
|
|
28508
28939
|
insert(_el$21, () => item.answer);
|
|
28509
28940
|
return _el$19;
|
|
@@ -28520,7 +28951,7 @@ function SurveyHistory() {
|
|
|
28520
28951
|
return _el$8;
|
|
28521
28952
|
})();
|
|
28522
28953
|
return (() => {
|
|
28523
|
-
var _el$22 = _tmpl$
|
|
28954
|
+
var _el$22 = _tmpl$1142();
|
|
28524
28955
|
insert(_el$22, createComponent(Show, {
|
|
28525
28956
|
get when() {
|
|
28526
28957
|
return !list.loading || selectedId();
|
|
@@ -28548,19 +28979,19 @@ function SurveyHistory() {
|
|
|
28548
28979
|
delegateEvents(["click"]);
|
|
28549
28980
|
|
|
28550
28981
|
// src/pages/MemberPortal.tsx
|
|
28551
|
-
var _tmpl$
|
|
28552
|
-
var _tmpl$
|
|
28553
|
-
var _tmpl$
|
|
28554
|
-
var _tmpl$
|
|
28555
|
-
var _tmpl$
|
|
28556
|
-
var _tmpl$
|
|
28557
|
-
var _tmpl$
|
|
28558
|
-
var _tmpl$
|
|
28559
|
-
var _tmpl$
|
|
28560
|
-
var _tmpl$
|
|
28561
|
-
var _tmpl$
|
|
28982
|
+
var _tmpl$497 = /* @__PURE__ */ template(`<span class=portal-item__live aria-label="In progress">`);
|
|
28983
|
+
var _tmpl$2139 = /* @__PURE__ */ template(`<span>`);
|
|
28984
|
+
var _tmpl$3121 = /* @__PURE__ */ template(`<button type=button><i aria-hidden=true></i><span class=portal-item__label>`);
|
|
28985
|
+
var _tmpl$498 = /* @__PURE__ */ template(`<div class=rx-others data-testid=rx-others><span class=lab-label>Other orders`);
|
|
28986
|
+
var _tmpl$571 = /* @__PURE__ */ template(`<div class=rx-stack>`);
|
|
28987
|
+
var _tmpl$667 = /* @__PURE__ */ template(`<div class=portal-state><div class=request-status__spinner></div><p>Loading your portal\u2026`);
|
|
28988
|
+
var _tmpl$756 = /* @__PURE__ */ template(`<div class="request-status__error portal-state"><p class=request-status__error-text></p><button type=button class="portal-btn portal-btn--ghost">Try again`);
|
|
28989
|
+
var _tmpl$848 = /* @__PURE__ */ template(`<p class=portal-rail__hi>Hi, `);
|
|
28990
|
+
var _tmpl$945 = /* @__PURE__ */ template(`<a class=portal-rail__back data-testid=rail-back>\u2190 Back to shop`);
|
|
28991
|
+
var _tmpl$041 = /* @__PURE__ */ template(`<a class=portal-topbar-back data-testid=mobile-back><span aria-hidden=true>\u2190</span> Back to shop`);
|
|
28992
|
+
var _tmpl$1143 = /* @__PURE__ */ template(`<main class=portal data-testid=member-portal><aside class=portal-rail><div class=portal-rail__brand><a class=portal-rail__logo></a><span class=portal-rail__dot aria-hidden=true></span></div><nav class=portal-rail__nav aria-label="Portal sections"></nav><div class=portal-rail__foot><button type=button class=portal-rail__signout>\u2014 Sign out</button></div></aside><section class=portal-content><div></div></section><nav class=portal-tabs aria-label="Portal sections">`);
|
|
28562
28993
|
var _tmpl$1032 = /* @__PURE__ */ template(`<span class=portal-rail__wordmark>`);
|
|
28563
|
-
var _tmpl$
|
|
28994
|
+
var _tmpl$1144 = /* @__PURE__ */ template(`<img>`);
|
|
28564
28995
|
var ICONS = {
|
|
28565
28996
|
tracker: "ph-thin ph-path",
|
|
28566
28997
|
instructions: "ph-thin ph-first-aid-kit",
|
|
@@ -28687,7 +29118,7 @@ function MemberPortal(props) {
|
|
|
28687
29118
|
return tabs();
|
|
28688
29119
|
},
|
|
28689
29120
|
children: (item) => (() => {
|
|
28690
|
-
var _el$ = _tmpl$
|
|
29121
|
+
var _el$ = _tmpl$3121(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling;
|
|
28691
29122
|
_el$.$$click = () => selectTab(item.key);
|
|
28692
29123
|
insert(_el$3, () => item.label);
|
|
28693
29124
|
insert(_el$, createComponent(Show, {
|
|
@@ -28695,7 +29126,7 @@ function MemberPortal(props) {
|
|
|
28695
29126
|
return memo(() => item.key === "tracker")() && inMotion();
|
|
28696
29127
|
},
|
|
28697
29128
|
get children() {
|
|
28698
|
-
return _tmpl$
|
|
29129
|
+
return _tmpl$497();
|
|
28699
29130
|
}
|
|
28700
29131
|
}), null);
|
|
28701
29132
|
insert(_el$, createComponent(Show, {
|
|
@@ -28703,7 +29134,7 @@ function MemberPortal(props) {
|
|
|
28703
29134
|
return memo(() => item.key === "messages")() && unreadTotal() > 0;
|
|
28704
29135
|
},
|
|
28705
29136
|
get children() {
|
|
28706
|
-
var _el$5 = _tmpl$
|
|
29137
|
+
var _el$5 = _tmpl$2139();
|
|
28707
29138
|
insert(_el$5, (() => {
|
|
28708
29139
|
var _c$ = memo(() => unreadTotal() > 99);
|
|
28709
29140
|
return () => _c$() ? "99+" : unreadTotal();
|
|
@@ -28761,7 +29192,7 @@ function MemberPortal(props) {
|
|
|
28761
29192
|
});
|
|
28762
29193
|
},
|
|
28763
29194
|
children: (primary) => (() => {
|
|
28764
|
-
var _el$6 = _tmpl$
|
|
29195
|
+
var _el$6 = _tmpl$571();
|
|
28765
29196
|
insert(_el$6, createComponent(OrderTracker, {
|
|
28766
29197
|
get request() {
|
|
28767
29198
|
return data.toTrackerRequest(primary());
|
|
@@ -28791,7 +29222,7 @@ function MemberPortal(props) {
|
|
|
28791
29222
|
return data.otherRx().length > 0;
|
|
28792
29223
|
},
|
|
28793
29224
|
get children() {
|
|
28794
|
-
var _el$7 = _tmpl$
|
|
29225
|
+
var _el$7 = _tmpl$498(); _el$7.firstChild;
|
|
28795
29226
|
insert(_el$7, createComponent(For, {
|
|
28796
29227
|
get each() {
|
|
28797
29228
|
return data.otherRx();
|
|
@@ -28827,7 +29258,7 @@ function MemberPortal(props) {
|
|
|
28827
29258
|
return !data.loading();
|
|
28828
29259
|
},
|
|
28829
29260
|
get fallback() {
|
|
28830
|
-
return _tmpl$
|
|
29261
|
+
return _tmpl$667();
|
|
28831
29262
|
},
|
|
28832
29263
|
get children() {
|
|
28833
29264
|
return createComponent(Show, {
|
|
@@ -28836,7 +29267,7 @@ function MemberPortal(props) {
|
|
|
28836
29267
|
},
|
|
28837
29268
|
get fallback() {
|
|
28838
29269
|
return (() => {
|
|
28839
|
-
var _el$0 = _tmpl$
|
|
29270
|
+
var _el$0 = _tmpl$756(), _el$1 = _el$0.firstChild, _el$10 = _el$1.nextSibling;
|
|
28840
29271
|
insert(_el$1, () => data.error());
|
|
28841
29272
|
_el$10.$$click = () => data.refetch();
|
|
28842
29273
|
return _el$0;
|
|
@@ -28933,7 +29364,7 @@ function MemberPortal(props) {
|
|
|
28933
29364
|
}
|
|
28934
29365
|
});
|
|
28935
29366
|
return (() => {
|
|
28936
|
-
var _el$11 = _tmpl$
|
|
29367
|
+
var _el$11 = _tmpl$1143(), _el$12 = _el$11.firstChild, _el$13 = _el$12.firstChild, _el$14 = _el$13.firstChild, _el$17 = _el$13.nextSibling, _el$18 = _el$17.nextSibling, _el$20 = _el$18.firstChild, _el$22 = _el$12.nextSibling, _el$23 = _el$22.firstChild, _el$24 = _el$22.nextSibling;
|
|
28937
29368
|
insert(_el$14, createComponent(Show, {
|
|
28938
29369
|
get when() {
|
|
28939
29370
|
return props.brand.logoSrc;
|
|
@@ -28946,7 +29377,7 @@ function MemberPortal(props) {
|
|
|
28946
29377
|
})();
|
|
28947
29378
|
},
|
|
28948
29379
|
children: (src) => (() => {
|
|
28949
|
-
var _el$26 = _tmpl$
|
|
29380
|
+
var _el$26 = _tmpl$1144();
|
|
28950
29381
|
effect((_p$) => {
|
|
28951
29382
|
var _v$8 = src(), _v$9 = props.brand.name;
|
|
28952
29383
|
_v$8 !== _p$.e && setAttribute(_el$26, "src", _p$.e = _v$8);
|
|
@@ -28964,7 +29395,7 @@ function MemberPortal(props) {
|
|
|
28964
29395
|
return data.firstName() !== "Member";
|
|
28965
29396
|
},
|
|
28966
29397
|
get children() {
|
|
28967
|
-
var _el$15 = _tmpl$
|
|
29398
|
+
var _el$15 = _tmpl$848(); _el$15.firstChild;
|
|
28968
29399
|
insert(_el$15, () => data.firstName(), null);
|
|
28969
29400
|
return _el$15;
|
|
28970
29401
|
}
|
|
@@ -28977,7 +29408,7 @@ function MemberPortal(props) {
|
|
|
28977
29408
|
return showBackLink();
|
|
28978
29409
|
},
|
|
28979
29410
|
get children() {
|
|
28980
|
-
var _el$19 = _tmpl$
|
|
29411
|
+
var _el$19 = _tmpl$945();
|
|
28981
29412
|
effect(() => setAttribute(_el$19, "href", catalogHref()));
|
|
28982
29413
|
return _el$19;
|
|
28983
29414
|
}
|
|
@@ -28988,7 +29419,7 @@ function MemberPortal(props) {
|
|
|
28988
29419
|
return showBackLink();
|
|
28989
29420
|
},
|
|
28990
29421
|
get children() {
|
|
28991
|
-
var _el$21 = _tmpl$
|
|
29422
|
+
var _el$21 = _tmpl$041();
|
|
28992
29423
|
effect(() => setAttribute(_el$21, "href", catalogHref()));
|
|
28993
29424
|
return _el$21;
|
|
28994
29425
|
}
|
|
@@ -29014,11 +29445,11 @@ function MemberPortal(props) {
|
|
|
29014
29445
|
})();
|
|
29015
29446
|
}
|
|
29016
29447
|
delegateEvents(["click"]);
|
|
29017
|
-
var _tmpl$
|
|
29018
|
-
var _tmpl$
|
|
29019
|
-
var _tmpl$
|
|
29020
|
-
var _tmpl$
|
|
29021
|
-
var _tmpl$
|
|
29448
|
+
var _tmpl$499 = /* @__PURE__ */ template(`<div style="padding:1rem 1.25rem;border-radius:var(--app-affiliate-radius);background:var(--app-affiliate-warning-bg);color:var(--app-affiliate-warning-fg);border:1px solid var(--app-affiliate-border)">Your affiliate account is awaiting approval. Once an admin activates it, your referral link will start earning commissions.`);
|
|
29449
|
+
var _tmpl$2140 = /* @__PURE__ */ template(`<div style=display:flex;flex-direction:column;gap:1.5rem><h1 style=font-family:var(--app-affiliate-font-display);font-size:1.5rem;margin:0;color:var(--app-affiliate-fg)>Overview`);
|
|
29450
|
+
var _tmpl$3122 = /* @__PURE__ */ template(`<div style=color:var(--app-affiliate-fg-muted)>Loading stats\u2026`);
|
|
29451
|
+
var _tmpl$4100 = /* @__PURE__ */ template(`<div style="display:grid;grid-template-columns:repeat(auto-fit, minmax(180px, 1fr));gap:1rem">`);
|
|
29452
|
+
var _tmpl$574 = /* @__PURE__ */ template(`<div style="padding:1.25rem;background:var(--app-affiliate-surface);border:1px solid var(--app-affiliate-border);border-radius:var(--app-affiliate-radius)"><div style=font-size:0.75rem;text-transform:uppercase;letter-spacing:0.05em;color:var(--app-affiliate-fg-muted);margin-bottom:0.5rem></div><div style=font-family:var(--app-affiliate-font-display);font-size:1.75rem;color:var(--app-affiliate-fg)>`);
|
|
29022
29453
|
function formatMoney(cents) {
|
|
29023
29454
|
return `$${(cents / 100).toFixed(2)}`;
|
|
29024
29455
|
}
|
|
@@ -29051,13 +29482,13 @@ function AffiliateOverview() {
|
|
|
29051
29482
|
value: `${(s.conversionRate * 100).toFixed(1)}%`
|
|
29052
29483
|
}];
|
|
29053
29484
|
return (() => {
|
|
29054
|
-
var _el$ = _tmpl$
|
|
29485
|
+
var _el$ = _tmpl$2140(); _el$.firstChild;
|
|
29055
29486
|
insert(_el$, createComponent(Show, {
|
|
29056
29487
|
get when() {
|
|
29057
29488
|
return isPending();
|
|
29058
29489
|
},
|
|
29059
29490
|
get children() {
|
|
29060
|
-
return _tmpl$
|
|
29491
|
+
return _tmpl$499();
|
|
29061
29492
|
}
|
|
29062
29493
|
}), null);
|
|
29063
29494
|
insert(_el$, createComponent(Show, {
|
|
@@ -29065,16 +29496,16 @@ function AffiliateOverview() {
|
|
|
29065
29496
|
return stats();
|
|
29066
29497
|
},
|
|
29067
29498
|
get fallback() {
|
|
29068
|
-
return _tmpl$
|
|
29499
|
+
return _tmpl$3122();
|
|
29069
29500
|
},
|
|
29070
29501
|
children: (s) => (() => {
|
|
29071
|
-
var _el$5 = _tmpl$
|
|
29502
|
+
var _el$5 = _tmpl$4100();
|
|
29072
29503
|
insert(_el$5, createComponent(For, {
|
|
29073
29504
|
get each() {
|
|
29074
29505
|
return cards(s());
|
|
29075
29506
|
},
|
|
29076
29507
|
children: (card) => (() => {
|
|
29077
|
-
var _el$6 = _tmpl$
|
|
29508
|
+
var _el$6 = _tmpl$574(), _el$7 = _el$6.firstChild, _el$8 = _el$7.nextSibling;
|
|
29078
29509
|
insert(_el$7, () => card.label);
|
|
29079
29510
|
insert(_el$8, () => card.value);
|
|
29080
29511
|
return _el$6;
|
|
@@ -29086,11 +29517,11 @@ function AffiliateOverview() {
|
|
|
29086
29517
|
return _el$;
|
|
29087
29518
|
})();
|
|
29088
29519
|
}
|
|
29089
|
-
var _tmpl$
|
|
29090
|
-
var _tmpl$
|
|
29091
|
-
var _tmpl$
|
|
29092
|
-
var _tmpl$
|
|
29093
|
-
var _tmpl$
|
|
29520
|
+
var _tmpl$500 = /* @__PURE__ */ template(`<div style="background:var(--app-affiliate-surface);border:1px solid var(--app-affiliate-border);border-radius:var(--app-affiliate-radius);overflow:hidden"><table class=app-affiliate-table style=width:100%;border-collapse:collapse;font-size:0.875rem><thead><tr style=background:var(--app-affiliate-surface-light)><th>Date</th><th>Type</th><th>Order total</th><th>Commission</th><th>Status</th></tr></thead><tbody>`);
|
|
29521
|
+
var _tmpl$2141 = /* @__PURE__ */ template(`<div style=display:flex;flex-direction:column;gap:1.5rem><h1 style=font-family:var(--app-affiliate-font-display);font-size:1.5rem;margin:0;color:var(--app-affiliate-fg)>Conversions`);
|
|
29522
|
+
var _tmpl$3123 = /* @__PURE__ */ template(`<div style="padding:2rem;background:var(--app-affiliate-surface);border:1px solid var(--app-affiliate-border);border-radius:var(--app-affiliate-radius);color:var(--app-affiliate-fg-muted);text-align:center">No conversions yet. Share your referral link to start earning.`);
|
|
29523
|
+
var _tmpl$4101 = /* @__PURE__ */ template(`<span title="Override commission earned on a sub-affiliate's sale"style="margin-left:0.4rem;padding:0.1rem 0.45rem;border-radius:999px;font-size:0.65rem;font-weight:600;background:var(--app-affiliate-primary-soft);color:var(--app-affiliate-primary-soft-fg)">Override`);
|
|
29524
|
+
var _tmpl$575 = /* @__PURE__ */ template(`<tr style="border-top:1px solid var(--app-affiliate-border)"><td data-label=Date></td><td data-label=Type></td><td data-label="Order total"></td><td data-label=Commission style=color:var(--app-affiliate-fg);font-weight:600></td><td data-label=Status><span style="padding:0.2rem 0.6rem;border-radius:999px;font-size:0.75rem;font-weight:600">`);
|
|
29094
29525
|
function formatMoney2(cents) {
|
|
29095
29526
|
return `$${(cents / 100).toFixed(2)}`;
|
|
29096
29527
|
}
|
|
@@ -29128,22 +29559,22 @@ function AffiliateConversions() {
|
|
|
29128
29559
|
limit: 100
|
|
29129
29560
|
});
|
|
29130
29561
|
return (() => {
|
|
29131
|
-
var _el$ = _tmpl$
|
|
29562
|
+
var _el$ = _tmpl$2141(); _el$.firstChild;
|
|
29132
29563
|
insert(_el$, createComponent(Show, {
|
|
29133
29564
|
get when() {
|
|
29134
29565
|
return (conversions() ?? []).length > 0;
|
|
29135
29566
|
},
|
|
29136
29567
|
get fallback() {
|
|
29137
|
-
return _tmpl$
|
|
29568
|
+
return _tmpl$3123();
|
|
29138
29569
|
},
|
|
29139
29570
|
get children() {
|
|
29140
|
-
var _el$3 = _tmpl$
|
|
29571
|
+
var _el$3 = _tmpl$500(), _el$4 = _el$3.firstChild, _el$5 = _el$4.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$6.firstChild, _el$8 = _el$7.nextSibling, _el$9 = _el$8.nextSibling, _el$0 = _el$9.nextSibling, _el$1 = _el$0.nextSibling, _el$10 = _el$5.nextSibling;
|
|
29141
29572
|
insert(_el$10, createComponent(For, {
|
|
29142
29573
|
get each() {
|
|
29143
29574
|
return conversions();
|
|
29144
29575
|
},
|
|
29145
29576
|
children: (c) => (() => {
|
|
29146
|
-
var _el$12 = _tmpl$
|
|
29577
|
+
var _el$12 = _tmpl$575(), _el$13 = _el$12.firstChild, _el$14 = _el$13.nextSibling, _el$16 = _el$14.nextSibling, _el$17 = _el$16.nextSibling, _el$18 = _el$17.nextSibling, _el$19 = _el$18.firstChild;
|
|
29147
29578
|
insert(_el$13, () => formatDate4(c.createdAt));
|
|
29148
29579
|
insert(_el$14, () => c.paymentType, null);
|
|
29149
29580
|
insert(_el$14, createComponent(Show, {
|
|
@@ -29151,7 +29582,7 @@ function AffiliateConversions() {
|
|
|
29151
29582
|
return c.tier === 2;
|
|
29152
29583
|
},
|
|
29153
29584
|
get children() {
|
|
29154
|
-
return _tmpl$
|
|
29585
|
+
return _tmpl$4101();
|
|
29155
29586
|
}
|
|
29156
29587
|
}), null);
|
|
29157
29588
|
insert(_el$16, () => formatMoney2(c.orderTotalCents));
|
|
@@ -29222,10 +29653,10 @@ function td() {
|
|
|
29222
29653
|
color: "var(--app-affiliate-fg)"
|
|
29223
29654
|
};
|
|
29224
29655
|
}
|
|
29225
|
-
var _tmpl$
|
|
29226
|
-
var _tmpl$
|
|
29227
|
-
var _tmpl$
|
|
29228
|
-
var _tmpl$
|
|
29656
|
+
var _tmpl$501 = /* @__PURE__ */ template(`<div style="background:var(--app-affiliate-surface);border:1px solid var(--app-affiliate-border);border-radius:var(--app-affiliate-radius);overflow:hidden"><table class=app-affiliate-table style=width:100%;border-collapse:collapse;font-size:0.875rem><thead><tr style=background:var(--app-affiliate-surface-light)><th>Code</th><th>Name</th><th>Status</th><th>Joined</th></tr></thead><tbody>`);
|
|
29657
|
+
var _tmpl$2142 = /* @__PURE__ */ template(`<div style=display:flex;flex-direction:column;gap:1.5rem><h1 style=font-family:var(--app-affiliate-font-display);font-size:1.5rem;margin:0;color:var(--app-affiliate-fg)>Downline</h1><p style=margin:0;color:var(--app-affiliate-fg-muted);font-size:0.875rem>Affiliates you've referred. You earn an override commission on every qualifying sale they make \u2014 those show up as \u201COverride\u201D rows on your Conversions.`);
|
|
29658
|
+
var _tmpl$3124 = /* @__PURE__ */ template(`<div style="padding:2rem;background:var(--app-affiliate-surface);border:1px solid var(--app-affiliate-border);border-radius:var(--app-affiliate-radius);color:var(--app-affiliate-fg-muted);text-align:center">No sub-affiliates yet.`);
|
|
29659
|
+
var _tmpl$4102 = /* @__PURE__ */ template(`<tr style="border-top:1px solid var(--app-affiliate-border)"><td data-label=Code style=font-family:var(--app-affiliate-font-mono)></td><td data-label=Name></td><td data-label=Status><span style="padding:0.2rem 0.6rem;border-radius:999px;font-size:0.75rem;font-weight:600"></span></td><td data-label=Joined>`);
|
|
29229
29660
|
function formatDate5(iso) {
|
|
29230
29661
|
const d = new Date(iso);
|
|
29231
29662
|
if (Number.isNaN(d.getTime())) return iso;
|
|
@@ -29258,22 +29689,22 @@ function AffiliateDownline() {
|
|
|
29258
29689
|
downline
|
|
29259
29690
|
} = useAffiliateDownline();
|
|
29260
29691
|
return (() => {
|
|
29261
|
-
var _el$ = _tmpl$
|
|
29692
|
+
var _el$ = _tmpl$2142(), _el$2 = _el$.firstChild; _el$2.nextSibling;
|
|
29262
29693
|
insert(_el$, createComponent(Show, {
|
|
29263
29694
|
get when() {
|
|
29264
29695
|
return (downline() ?? []).length > 0;
|
|
29265
29696
|
},
|
|
29266
29697
|
get fallback() {
|
|
29267
|
-
return _tmpl$
|
|
29698
|
+
return _tmpl$3124();
|
|
29268
29699
|
},
|
|
29269
29700
|
get children() {
|
|
29270
|
-
var _el$4 = _tmpl$
|
|
29701
|
+
var _el$4 = _tmpl$501(), _el$5 = _el$4.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$6.firstChild, _el$8 = _el$7.firstChild, _el$9 = _el$8.nextSibling, _el$0 = _el$9.nextSibling, _el$1 = _el$0.nextSibling, _el$10 = _el$6.nextSibling;
|
|
29271
29702
|
insert(_el$10, createComponent(For, {
|
|
29272
29703
|
get each() {
|
|
29273
29704
|
return downline();
|
|
29274
29705
|
},
|
|
29275
29706
|
children: (d) => (() => {
|
|
29276
|
-
var _el$12 = _tmpl$
|
|
29707
|
+
var _el$12 = _tmpl$4102(), _el$13 = _el$12.firstChild, _el$14 = _el$13.nextSibling, _el$15 = _el$14.nextSibling, _el$16 = _el$15.firstChild, _el$17 = _el$15.nextSibling;
|
|
29277
29708
|
insert(_el$13, () => d.affiliateCode);
|
|
29278
29709
|
insert(_el$14, () => [d.firstName, d.lastName].filter(Boolean).join(" ") || "\u2014");
|
|
29279
29710
|
insert(_el$16, () => d.status);
|
|
@@ -29336,9 +29767,9 @@ function td2() {
|
|
|
29336
29767
|
color: "var(--app-affiliate-fg)"
|
|
29337
29768
|
};
|
|
29338
29769
|
}
|
|
29339
|
-
var _tmpl$
|
|
29340
|
-
var _tmpl$
|
|
29341
|
-
var _tmpl$
|
|
29770
|
+
var _tmpl$505 = /* @__PURE__ */ template(`<div style="padding:1.5rem;background:var(--app-affiliate-surface);border:1px solid var(--app-affiliate-border);border-radius:var(--app-affiliate-radius);display:flex;flex-direction:column;gap:0.75rem"><div style=font-size:0.75rem;text-transform:uppercase;letter-spacing:0.05em;color:var(--app-affiliate-fg-muted)>Share this link</div><div style=display:flex;gap:0.5rem;align-items:stretch;flex-wrap:wrap><code style="flex:1;min-width:16rem;padding:0.75rem 1rem;background:var(--app-affiliate-surface-light);border-radius:var(--app-affiliate-radius-sm);font-family:var(--app-affiliate-font-mono);color:var(--app-affiliate-fg);word-break:break-all"></code><button type=button style="padding:0.75rem 1.25rem;background:var(--app-affiliate-primary);color:var(--app-affiliate-primary-fg);border:none;border-radius:var(--app-affiliate-radius-sm);font-weight:600;cursor:pointer"></button></div><div style=font-size:0.875rem;color:var(--app-affiliate-fg-muted)>Anyone who visits this URL has a tracking cookie set for the duration of your program. If they sign up and subscribe within the cookie window, you earn commission on the conversion.`);
|
|
29771
|
+
var _tmpl$2143 = /* @__PURE__ */ template(`<div style=display:flex;flex-direction:column;gap:1.5rem><h1 style=font-family:var(--app-affiliate-font-display);font-size:1.5rem;margin:0;color:var(--app-affiliate-fg)>Referral link`);
|
|
29772
|
+
var _tmpl$3125 = /* @__PURE__ */ template(`<div style=color:var(--app-affiliate-fg-muted)>Your referral link will appear here once your account is approved.`);
|
|
29342
29773
|
function AffiliateReferralLink() {
|
|
29343
29774
|
const {
|
|
29344
29775
|
links
|
|
@@ -29363,16 +29794,16 @@ function AffiliateReferralLink() {
|
|
|
29363
29794
|
}
|
|
29364
29795
|
}
|
|
29365
29796
|
return (() => {
|
|
29366
|
-
var _el$ = _tmpl$
|
|
29797
|
+
var _el$ = _tmpl$2143(); _el$.firstChild;
|
|
29367
29798
|
insert(_el$, createComponent(Show, {
|
|
29368
29799
|
get when() {
|
|
29369
29800
|
return homepageLink();
|
|
29370
29801
|
},
|
|
29371
29802
|
get fallback() {
|
|
29372
|
-
return _tmpl$
|
|
29803
|
+
return _tmpl$3125();
|
|
29373
29804
|
},
|
|
29374
29805
|
get children() {
|
|
29375
|
-
var _el$3 = _tmpl$
|
|
29806
|
+
var _el$3 = _tmpl$505(), _el$4 = _el$3.firstChild, _el$5 = _el$4.nextSibling, _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling; _el$5.nextSibling;
|
|
29376
29807
|
insert(_el$6, homepageLink);
|
|
29377
29808
|
_el$7.$$click = copy;
|
|
29378
29809
|
insert(_el$7, () => copied() ? "Copied" : "Copy");
|
|
@@ -29383,10 +29814,10 @@ function AffiliateReferralLink() {
|
|
|
29383
29814
|
})();
|
|
29384
29815
|
}
|
|
29385
29816
|
delegateEvents(["click"]);
|
|
29386
|
-
var _tmpl$
|
|
29387
|
-
var _tmpl$
|
|
29388
|
-
var _tmpl$
|
|
29389
|
-
var _tmpl$
|
|
29817
|
+
var _tmpl$506 = /* @__PURE__ */ template(`<div style=display:flex;flex-direction:column;gap:1.5rem><h1 style=font-family:var(--app-affiliate-font-display);font-size:1.5rem;margin:0;color:var(--app-affiliate-fg)>Account</h1><div><button type=button style="padding:0.75rem 1.25rem;background:transparent;color:var(--app-affiliate-fg);border:1px solid var(--app-affiliate-border-strong);border-radius:var(--app-affiliate-radius-sm);cursor:pointer;font-weight:500">Log out</button></div><div style=font-size:0.875rem;color:var(--app-affiliate-fg-muted)>To update your profile or payment details, contact your program administrator.`);
|
|
29818
|
+
var _tmpl$2144 = /* @__PURE__ */ template(`<div style=color:var(--app-affiliate-fg-muted)>Loading\u2026`);
|
|
29819
|
+
var _tmpl$3126 = /* @__PURE__ */ template(`<div style="background:var(--app-affiliate-surface);border:1px solid var(--app-affiliate-border);border-radius:var(--app-affiliate-radius);overflow:hidden">`);
|
|
29820
|
+
var _tmpl$4103 = /* @__PURE__ */ template(`<div style="display:flex;justify-content:space-between;align-items:center;padding:0.875rem 1.25rem;border-bottom:1px solid var(--app-affiliate-border)"><div style=font-size:0.75rem;text-transform:uppercase;letter-spacing:0.05em;color:var(--app-affiliate-fg-muted)></div><div style=color:var(--app-affiliate-fg)>`);
|
|
29390
29821
|
var STATUS_LABEL2 = {
|
|
29391
29822
|
pending: "Pending approval",
|
|
29392
29823
|
active: "Active",
|
|
@@ -29421,22 +29852,22 @@ function AffiliateSettings() {
|
|
|
29421
29852
|
value: a.paymentEmail ?? "\u2014"
|
|
29422
29853
|
}];
|
|
29423
29854
|
return (() => {
|
|
29424
|
-
var _el$ = _tmpl$
|
|
29855
|
+
var _el$ = _tmpl$506(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling, _el$4 = _el$3.firstChild; _el$3.nextSibling;
|
|
29425
29856
|
insert(_el$, createComponent(Show, {
|
|
29426
29857
|
get when() {
|
|
29427
29858
|
return affiliate();
|
|
29428
29859
|
},
|
|
29429
29860
|
get fallback() {
|
|
29430
|
-
return _tmpl$
|
|
29861
|
+
return _tmpl$2144();
|
|
29431
29862
|
},
|
|
29432
29863
|
children: (a) => (() => {
|
|
29433
|
-
var _el$7 = _tmpl$
|
|
29864
|
+
var _el$7 = _tmpl$3126();
|
|
29434
29865
|
insert(_el$7, createComponent(For, {
|
|
29435
29866
|
get each() {
|
|
29436
29867
|
return rows(a());
|
|
29437
29868
|
},
|
|
29438
29869
|
children: (row) => (() => {
|
|
29439
|
-
var _el$8 = _tmpl$
|
|
29870
|
+
var _el$8 = _tmpl$4103(), _el$9 = _el$8.firstChild, _el$0 = _el$9.nextSibling;
|
|
29440
29871
|
insert(_el$9, () => row.label);
|
|
29441
29872
|
insert(_el$0, () => row.value);
|
|
29442
29873
|
return _el$8;
|
|
@@ -29452,10 +29883,10 @@ function AffiliateSettings() {
|
|
|
29452
29883
|
delegateEvents(["click"]);
|
|
29453
29884
|
|
|
29454
29885
|
// src/pages/AffiliatePortal.tsx
|
|
29455
|
-
var _tmpl$
|
|
29456
|
-
var _tmpl$
|
|
29457
|
-
var _tmpl$
|
|
29458
|
-
var _tmpl$
|
|
29886
|
+
var _tmpl$507 = /* @__PURE__ */ template(`<div class="app-affiliate-root app-affiliate-shell"style=position:sticky;background:var(--app-affiliate-bg);color:var(--app-affiliate-fg)><div class=app-affiliate-shell-header><button type=button class=app-affiliate-shell-menu-trigger aria-label="Open portal menu"><svg width=22 height=22 viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round aria-hidden=true><line x1=3 y1=6 x2=21 y2=6></line><line x1=3 y1=12 x2=21 y2=12></line><line x1=3 y1=18 x2=21 y2=18></line></svg></button><span class=app-affiliate-shell-header-title></span></div><div class=app-affiliate-backdrop aria-hidden=true></div><aside class=app-affiliate-sidebar><div style=padding:1.25rem><h2 style="font-size:0.7rem;font-weight:500;color:var(--app-affiliate-fg-muted);text-transform:uppercase;letter-spacing:0.08em;margin:0 0 1rem">Affiliate Portal</h2><nav style=display:flex;flex-direction:column;gap:0.25rem></nav></div></aside><div class=app-affiliate-content>`);
|
|
29887
|
+
var _tmpl$2145 = /* @__PURE__ */ template(`<span style=font-size:1rem;opacity:0.7;flex-shrink:0>`);
|
|
29888
|
+
var _tmpl$3127 = /* @__PURE__ */ template(`<button type=button style="display:flex;align-items:center;gap:0.75rem;padding:0.625rem 0.75rem;border-radius:var(--app-affiliate-radius-sm);font-size:0.875rem;font-weight:500;text-align:left;border:none;cursor:pointer">`);
|
|
29889
|
+
var _tmpl$4104 = /* @__PURE__ */ template(`<div class=app-affiliate-root style=display:flex;align-items:center;justify-content:center;position:sticky;background:var(--app-affiliate-bg)><div role=status aria-label="Loading affiliate portal"style="width:1.75rem;height:1.75rem;border-radius:9999px;border:2px solid var(--app-affiliate-border);border-top-color:var(--app-affiliate-primary);animation:app-affiliate-gate-spin 0.8s linear infinite"></div><style>@keyframes app-affiliate-gate-spin { to { transform: rotate(360deg); } }`);
|
|
29459
29890
|
var TAB_LABELS2 = {
|
|
29460
29891
|
overview: "Overview",
|
|
29461
29892
|
conversions: "Conversions",
|
|
@@ -29500,7 +29931,7 @@ function AffiliatePortal(props) {
|
|
|
29500
29931
|
});
|
|
29501
29932
|
},
|
|
29502
29933
|
get children() {
|
|
29503
|
-
var _el$ = _tmpl$
|
|
29934
|
+
var _el$ = _tmpl$507(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling, _el$5 = _el$2.nextSibling, _el$6 = _el$5.nextSibling, _el$7 = _el$6.firstChild, _el$8 = _el$7.firstChild, _el$9 = _el$8.nextSibling, _el$0 = _el$6.nextSibling;
|
|
29504
29935
|
_el$3.$$click = () => setDrawerOpen(true);
|
|
29505
29936
|
insert(_el$4, () => TAB_LABELS2[currentTab()]);
|
|
29506
29937
|
_el$5.$$click = () => setDrawerOpen(false);
|
|
@@ -29509,14 +29940,14 @@ function AffiliatePortal(props) {
|
|
|
29509
29940
|
return orderedTabs();
|
|
29510
29941
|
},
|
|
29511
29942
|
children: (tab) => (() => {
|
|
29512
|
-
var _el$1 = _tmpl$
|
|
29943
|
+
var _el$1 = _tmpl$3127();
|
|
29513
29944
|
_el$1.$$click = () => handleTabClick(tab);
|
|
29514
29945
|
insert(_el$1, createComponent(Show, {
|
|
29515
29946
|
get when() {
|
|
29516
29947
|
return props.tabIcons?.[tab];
|
|
29517
29948
|
},
|
|
29518
29949
|
get children() {
|
|
29519
|
-
var _el$10 = _tmpl$
|
|
29950
|
+
var _el$10 = _tmpl$2145();
|
|
29520
29951
|
effect(() => className(_el$10, props.tabIcons[tab]));
|
|
29521
29952
|
return _el$10;
|
|
29522
29953
|
}
|
|
@@ -29598,7 +30029,7 @@ function AffiliatePortal(props) {
|
|
|
29598
30029
|
}
|
|
29599
30030
|
function AffiliateGateSpinner(props) {
|
|
29600
30031
|
return (() => {
|
|
29601
|
-
var _el$11 = _tmpl$
|
|
30032
|
+
var _el$11 = _tmpl$4104(); _el$11.firstChild;
|
|
29602
30033
|
effect((_p$) => {
|
|
29603
30034
|
var _v$8 = props.topOffset, _v$9 = `calc(100vh - ${props.topOffset})`;
|
|
29604
30035
|
_v$8 !== _p$.e && setStyleProperty(_el$11, "top", _p$.e = _v$8);
|
|
@@ -29612,16 +30043,16 @@ function AffiliateGateSpinner(props) {
|
|
|
29612
30043
|
})();
|
|
29613
30044
|
}
|
|
29614
30045
|
delegateEvents(["click"]);
|
|
29615
|
-
var _tmpl$
|
|
30046
|
+
var _tmpl$508 = /* @__PURE__ */ template(`<div style=position:relative><input><button type=button style="position:absolute;top:0;right:0;height:100%;display:flex;align-items:center;padding:0 0.75rem;background:transparent;border:none;color:var(--app-affiliate-fg-muted);cursor:pointer;font-size:0.75rem;font-weight:600;text-transform:uppercase;letter-spacing:0.05em">`);
|
|
29616
30047
|
function AffiliatePasswordInput(props) {
|
|
29617
30048
|
const [visible, setVisible] = createSignal(false);
|
|
29618
30049
|
return (() => {
|
|
29619
|
-
var _el$ = _tmpl$
|
|
30050
|
+
var _el$ = _tmpl$508(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling;
|
|
29620
30051
|
_el$2.$$input = (e) => props.onInput(e.currentTarget.value);
|
|
29621
30052
|
_el$3.$$click = () => setVisible((v) => !v);
|
|
29622
30053
|
insert(_el$3, () => visible() ? "Hide" : "Show");
|
|
29623
30054
|
effect((_p$) => {
|
|
29624
|
-
var _v$ = visible() ? "text" : "password", _v$2 = props.required, _v$3 = props.minLength, _v$4 = props.autocomplete, _v$5 =
|
|
30055
|
+
var _v$ = visible() ? "text" : "password", _v$2 = props.required, _v$3 = props.minLength, _v$4 = props.autocomplete, _v$5 = inputStyle2(), _v$6 = visible() ? "Hide password" : "Show password";
|
|
29625
30056
|
_v$ !== _p$.e && setAttribute(_el$2, "type", _p$.e = _v$);
|
|
29626
30057
|
_v$2 !== _p$.t && (_el$2.required = _p$.t = _v$2);
|
|
29627
30058
|
_v$3 !== _p$.a && setAttribute(_el$2, "minlength", _p$.a = _v$3);
|
|
@@ -29641,7 +30072,7 @@ function AffiliatePasswordInput(props) {
|
|
|
29641
30072
|
return _el$;
|
|
29642
30073
|
})();
|
|
29643
30074
|
}
|
|
29644
|
-
function
|
|
30075
|
+
function inputStyle2() {
|
|
29645
30076
|
return {
|
|
29646
30077
|
width: "100%",
|
|
29647
30078
|
padding: "0.625rem 2.9rem 0.625rem 0.75rem",
|
|
@@ -29657,17 +30088,17 @@ function inputStyle() {
|
|
|
29657
30088
|
delegateEvents(["input", "click"]);
|
|
29658
30089
|
|
|
29659
30090
|
// src/pages/AffiliateRegister.tsx
|
|
29660
|
-
var _tmpl$
|
|
29661
|
-
var _tmpl$
|
|
29662
|
-
var _tmpl$
|
|
29663
|
-
var _tmpl$
|
|
29664
|
-
var _tmpl$
|
|
29665
|
-
var _tmpl$
|
|
29666
|
-
var _tmpl$
|
|
29667
|
-
var _tmpl$
|
|
29668
|
-
var _tmpl$
|
|
29669
|
-
var _tmpl$
|
|
29670
|
-
var _tmpl$
|
|
30091
|
+
var _tmpl$509 = /* @__PURE__ */ template(`<input type=text required autocomplete=given-name>`);
|
|
30092
|
+
var _tmpl$2146 = /* @__PURE__ */ template(`<input type=text required autocomplete=family-name>`);
|
|
30093
|
+
var _tmpl$3128 = /* @__PURE__ */ template(`<input type=email required autocomplete=email>`);
|
|
30094
|
+
var _tmpl$4105 = /* @__PURE__ */ template(`<input type=text required minlength=4>`);
|
|
30095
|
+
var _tmpl$576 = /* @__PURE__ */ template(`<div style="padding:0.625rem 0.875rem;background:var(--app-affiliate-danger-bg);color:var(--app-affiliate-danger-fg);border-radius:var(--app-affiliate-radius-sm);font-size:0.875rem">`);
|
|
30096
|
+
var _tmpl$668 = /* @__PURE__ */ template(`<button type=button>Already have an account? Log in`);
|
|
30097
|
+
var _tmpl$757 = /* @__PURE__ */ template(`<form style=display:flex;flex-direction:column;gap:0.875rem><div style="padding:0.625rem 0.875rem;background:var(--app-affiliate-surface-light);border:1px solid var(--app-affiliate-border);border-radius:var(--app-affiliate-radius-sm);font-size:0.8125rem;line-height:1.5;color:var(--app-affiliate-fg-muted)">A customer's purchase earns you commission only if they reached the site through your referral link \u2014 the site address with <code>?ref=</code> appended:<div style=font-weight:600;word-break:break-all;margin-top:0.25rem;color:var(--app-affiliate-fg)>/?ref=</div>Make sure any marketing materials use that full link for tracking, not just the website address itself.</div><button type=submit style="padding:0.75rem 1rem;background:var(--app-affiliate-primary);color:var(--app-affiliate-primary-fg);border:none;border-radius:var(--app-affiliate-radius-sm);font-weight:600">`);
|
|
30098
|
+
var _tmpl$849 = /* @__PURE__ */ template(`<div class=app-affiliate-root style="background:var(--app-affiliate-bg);color:var(--app-affiliate-fg);min-height:100vh;display:flex;align-items:center;justify-content:center;padding:2rem 1rem"><div style="width:100%;max-width:28rem;background:var(--app-affiliate-surface);border:1px solid var(--app-affiliate-border);border-radius:var(--app-affiliate-radius);padding:2rem;display:flex;flex-direction:column;gap:1.25rem"><div><h1 style="font-family:var(--app-affiliate-font-display);margin:0 0 0.5rem;font-size:1.5rem">Become an affiliate</h1><p style=margin:0;color:var(--app-affiliate-fg-muted);font-size:0.875rem>New applications are reviewed by an admin before activation.`);
|
|
30099
|
+
var _tmpl$946 = /* @__PURE__ */ template(`<div style=padding:1rem;background:var(--app-affiliate-success-bg);color:var(--app-affiliate-success-fg);border-radius:var(--app-affiliate-radius-sm);font-size:0.875rem>Thanks \u2014 we received your application. You'll be able to log in once it's approved.`);
|
|
30100
|
+
var _tmpl$042 = /* @__PURE__ */ template(`<span style=font-size:0.75rem;color:var(--app-affiliate-fg-subtle)>`);
|
|
30101
|
+
var _tmpl$1145 = /* @__PURE__ */ template(`<label style=display:flex;flex-direction:column;gap:0.35rem><span style=font-size:0.75rem;text-transform:uppercase;letter-spacing:0.05em;color:var(--app-affiliate-fg-muted)>`);
|
|
29671
30102
|
function AffiliateRegister(props) {
|
|
29672
30103
|
const [firstName, setFirstName] = createSignal("");
|
|
29673
30104
|
const [lastName, setLastName] = createSignal("");
|
|
@@ -29698,23 +30129,23 @@ function AffiliateRegister(props) {
|
|
|
29698
30129
|
}
|
|
29699
30130
|
}
|
|
29700
30131
|
return (() => {
|
|
29701
|
-
var _el$ = _tmpl$
|
|
30132
|
+
var _el$ = _tmpl$849(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild; _el$4.nextSibling;
|
|
29702
30133
|
insert(_el$2, createComponent(Show, {
|
|
29703
30134
|
get when() {
|
|
29704
30135
|
return !submitted();
|
|
29705
30136
|
},
|
|
29706
30137
|
get fallback() {
|
|
29707
|
-
return _tmpl$
|
|
30138
|
+
return _tmpl$946();
|
|
29708
30139
|
},
|
|
29709
30140
|
get children() {
|
|
29710
|
-
var _el$6 = _tmpl$
|
|
30141
|
+
var _el$6 = _tmpl$757(), _el$1 = _el$6.firstChild, _el$10 = _el$1.firstChild, _el$12 = _el$10.nextSibling; _el$12.firstChild; var _el$14 = _el$12.nextSibling, _el$15 = _el$14.nextSibling, _el$16 = _el$15.firstChild, _el$18 = _el$1.nextSibling;
|
|
29711
30142
|
_el$6.addEventListener("submit", handleSubmit);
|
|
29712
30143
|
insert(_el$6, createComponent(Row2, {
|
|
29713
30144
|
label: "First name",
|
|
29714
30145
|
get children() {
|
|
29715
|
-
var _el$7 = _tmpl$
|
|
30146
|
+
var _el$7 = _tmpl$509();
|
|
29716
30147
|
_el$7.$$input = (e) => setFirstName(e.currentTarget.value);
|
|
29717
|
-
effect((_$p) => style(_el$7,
|
|
30148
|
+
effect((_$p) => style(_el$7, inputStyle3(), _$p));
|
|
29718
30149
|
effect(() => _el$7.value = firstName());
|
|
29719
30150
|
return _el$7;
|
|
29720
30151
|
}
|
|
@@ -29722,9 +30153,9 @@ function AffiliateRegister(props) {
|
|
|
29722
30153
|
insert(_el$6, createComponent(Row2, {
|
|
29723
30154
|
label: "Last name",
|
|
29724
30155
|
get children() {
|
|
29725
|
-
var _el$8 = _tmpl$
|
|
30156
|
+
var _el$8 = _tmpl$2146();
|
|
29726
30157
|
_el$8.$$input = (e) => setLastName(e.currentTarget.value);
|
|
29727
|
-
effect((_$p) => style(_el$8,
|
|
30158
|
+
effect((_$p) => style(_el$8, inputStyle3(), _$p));
|
|
29728
30159
|
effect(() => _el$8.value = lastName());
|
|
29729
30160
|
return _el$8;
|
|
29730
30161
|
}
|
|
@@ -29732,9 +30163,9 @@ function AffiliateRegister(props) {
|
|
|
29732
30163
|
insert(_el$6, createComponent(Row2, {
|
|
29733
30164
|
label: "Email",
|
|
29734
30165
|
get children() {
|
|
29735
|
-
var _el$9 = _tmpl$
|
|
30166
|
+
var _el$9 = _tmpl$3128();
|
|
29736
30167
|
_el$9.$$input = (e) => setEmail(e.currentTarget.value);
|
|
29737
|
-
effect((_$p) => style(_el$9,
|
|
30168
|
+
effect((_$p) => style(_el$9, inputStyle3(), _$p));
|
|
29738
30169
|
effect(() => _el$9.value = email());
|
|
29739
30170
|
return _el$9;
|
|
29740
30171
|
}
|
|
@@ -29758,9 +30189,9 @@ function AffiliateRegister(props) {
|
|
|
29758
30189
|
label: "Affiliate code",
|
|
29759
30190
|
hint: "The handle in your referral URL (4+ characters)",
|
|
29760
30191
|
get children() {
|
|
29761
|
-
var _el$0 = _tmpl$
|
|
30192
|
+
var _el$0 = _tmpl$4105();
|
|
29762
30193
|
_el$0.$$input = (e) => setAffiliateCode(e.currentTarget.value);
|
|
29763
|
-
effect((_$p) => style(_el$0,
|
|
30194
|
+
effect((_$p) => style(_el$0, inputStyle3(), _$p));
|
|
29764
30195
|
effect(() => _el$0.value = affiliateCode());
|
|
29765
30196
|
return _el$0;
|
|
29766
30197
|
}
|
|
@@ -29773,7 +30204,7 @@ function AffiliateRegister(props) {
|
|
|
29773
30204
|
return error();
|
|
29774
30205
|
},
|
|
29775
30206
|
get children() {
|
|
29776
|
-
var _el$17 = _tmpl$
|
|
30207
|
+
var _el$17 = _tmpl$576();
|
|
29777
30208
|
insert(_el$17, error);
|
|
29778
30209
|
return _el$17;
|
|
29779
30210
|
}
|
|
@@ -29784,7 +30215,7 @@ function AffiliateRegister(props) {
|
|
|
29784
30215
|
return props.onNavigateLogin;
|
|
29785
30216
|
},
|
|
29786
30217
|
get children() {
|
|
29787
|
-
var _el$19 = _tmpl$
|
|
30218
|
+
var _el$19 = _tmpl$668();
|
|
29788
30219
|
_el$19.$$click = () => props.onNavigateLogin?.();
|
|
29789
30220
|
effect((_$p) => style(_el$19, linkStyle(), _$p));
|
|
29790
30221
|
return _el$19;
|
|
@@ -29809,7 +30240,7 @@ function AffiliateRegister(props) {
|
|
|
29809
30240
|
}
|
|
29810
30241
|
function Row2(props) {
|
|
29811
30242
|
return (() => {
|
|
29812
|
-
var _el$21 = _tmpl$
|
|
30243
|
+
var _el$21 = _tmpl$1145(), _el$22 = _el$21.firstChild;
|
|
29813
30244
|
insert(_el$22, () => props.label);
|
|
29814
30245
|
insert(_el$21, () => props.children, null);
|
|
29815
30246
|
insert(_el$21, createComponent(Show, {
|
|
@@ -29817,7 +30248,7 @@ function Row2(props) {
|
|
|
29817
30248
|
return props.hint;
|
|
29818
30249
|
},
|
|
29819
30250
|
get children() {
|
|
29820
|
-
var _el$23 = _tmpl$
|
|
30251
|
+
var _el$23 = _tmpl$042();
|
|
29821
30252
|
insert(_el$23, () => props.hint);
|
|
29822
30253
|
return _el$23;
|
|
29823
30254
|
}
|
|
@@ -29825,7 +30256,7 @@ function Row2(props) {
|
|
|
29825
30256
|
return _el$21;
|
|
29826
30257
|
})();
|
|
29827
30258
|
}
|
|
29828
|
-
function
|
|
30259
|
+
function inputStyle3() {
|
|
29829
30260
|
return {
|
|
29830
30261
|
width: "100%",
|
|
29831
30262
|
padding: "0.625rem 0.75rem",
|
|
@@ -29851,10 +30282,10 @@ function linkStyle() {
|
|
|
29851
30282
|
};
|
|
29852
30283
|
}
|
|
29853
30284
|
delegateEvents(["input", "click"]);
|
|
29854
|
-
var _tmpl$
|
|
29855
|
-
var _tmpl$
|
|
29856
|
-
var _tmpl$
|
|
29857
|
-
var _tmpl$
|
|
30285
|
+
var _tmpl$577 = /* @__PURE__ */ template(`<div style="padding:0.625rem 0.875rem;background:var(--app-affiliate-danger-bg);color:var(--app-affiliate-danger-fg);border-radius:var(--app-affiliate-radius-sm);font-size:0.875rem">`);
|
|
30286
|
+
var _tmpl$2147 = /* @__PURE__ */ template(`<button type=button style=background:transparent;border:none;color:var(--app-affiliate-fg-muted);cursor:pointer;text-decoration:underline;font-size:0.875rem;padding:0;text-align:center>Forgot your password?`);
|
|
30287
|
+
var _tmpl$3129 = /* @__PURE__ */ template(`<button type=button style=background:transparent;border:none;color:var(--app-affiliate-primary-soft-fg);cursor:pointer;text-decoration:underline;font-size:0.875rem;padding:0;text-align:center>New affiliate? Apply`);
|
|
30288
|
+
var _tmpl$4106 = /* @__PURE__ */ template(`<div class=app-affiliate-root style="background:var(--app-affiliate-bg);color:var(--app-affiliate-fg);min-height:100vh;display:flex;align-items:center;justify-content:center;padding:2rem 1rem"><div style="width:100%;max-width:24rem;background:var(--app-affiliate-surface);border:1px solid var(--app-affiliate-border);border-radius:var(--app-affiliate-radius);padding:2rem;display:flex;flex-direction:column;gap:1.25rem"><h1 style=font-family:var(--app-affiliate-font-display);margin:0;font-size:1.5rem>Affiliate login</h1><form style=display:flex;flex-direction:column;gap:0.875rem><label style=display:flex;flex-direction:column;gap:0.35rem><span>Email</span><input type=email required autocomplete=email></label><label style=display:flex;flex-direction:column;gap:0.35rem><span>Password</span></label><button type=submit style="padding:0.75rem 1rem;background:var(--app-affiliate-primary);color:var(--app-affiliate-primary-fg);border:none;border-radius:var(--app-affiliate-radius-sm);font-weight:600">`);
|
|
29858
30289
|
function AffiliateLogin(props) {
|
|
29859
30290
|
const [email, setEmail] = createSignal("");
|
|
29860
30291
|
const [password, setPassword] = createSignal("");
|
|
@@ -29874,7 +30305,7 @@ function AffiliateLogin(props) {
|
|
|
29874
30305
|
}
|
|
29875
30306
|
}
|
|
29876
30307
|
return (() => {
|
|
29877
|
-
var _el$ = _tmpl$
|
|
30308
|
+
var _el$ = _tmpl$4106(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling, _el$5 = _el$4.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling, _el$8 = _el$5.nextSibling, _el$9 = _el$8.firstChild, _el$1 = _el$8.nextSibling;
|
|
29878
30309
|
_el$4.addEventListener("submit", handleSubmit);
|
|
29879
30310
|
_el$7.$$input = (e) => setEmail(e.currentTarget.value);
|
|
29880
30311
|
insert(_el$8, createComponent(AffiliatePasswordInput, {
|
|
@@ -29890,7 +30321,7 @@ function AffiliateLogin(props) {
|
|
|
29890
30321
|
return error();
|
|
29891
30322
|
},
|
|
29892
30323
|
get children() {
|
|
29893
|
-
var _el$0 = _tmpl$
|
|
30324
|
+
var _el$0 = _tmpl$577();
|
|
29894
30325
|
insert(_el$0, error);
|
|
29895
30326
|
return _el$0;
|
|
29896
30327
|
}
|
|
@@ -29901,7 +30332,7 @@ function AffiliateLogin(props) {
|
|
|
29901
30332
|
return props.onNavigateForgotPassword;
|
|
29902
30333
|
},
|
|
29903
30334
|
get children() {
|
|
29904
|
-
var _el$10 = _tmpl$
|
|
30335
|
+
var _el$10 = _tmpl$2147();
|
|
29905
30336
|
_el$10.$$click = () => props.onNavigateForgotPassword?.();
|
|
29906
30337
|
return _el$10;
|
|
29907
30338
|
}
|
|
@@ -29911,13 +30342,13 @@ function AffiliateLogin(props) {
|
|
|
29911
30342
|
return props.onNavigateRegister;
|
|
29912
30343
|
},
|
|
29913
30344
|
get children() {
|
|
29914
|
-
var _el$11 = _tmpl$
|
|
30345
|
+
var _el$11 = _tmpl$3129();
|
|
29915
30346
|
_el$11.$$click = () => props.onNavigateRegister?.();
|
|
29916
30347
|
return _el$11;
|
|
29917
30348
|
}
|
|
29918
30349
|
}), null);
|
|
29919
30350
|
effect((_p$) => {
|
|
29920
|
-
var _v$ =
|
|
30351
|
+
var _v$ = labelStyle2(), _v$2 = inputStyle4(), _v$3 = labelStyle2(), _v$4 = submitting(), _v$5 = submitting() ? "not-allowed" : "pointer", _v$6 = submitting() ? 0.7 : 1;
|
|
29921
30352
|
_p$.e = style(_el$6, _v$, _p$.e);
|
|
29922
30353
|
_p$.t = style(_el$7, _v$2, _p$.t);
|
|
29923
30354
|
_p$.a = style(_el$9, _v$3, _p$.a);
|
|
@@ -29937,7 +30368,7 @@ function AffiliateLogin(props) {
|
|
|
29937
30368
|
return _el$;
|
|
29938
30369
|
})();
|
|
29939
30370
|
}
|
|
29940
|
-
function
|
|
30371
|
+
function labelStyle2() {
|
|
29941
30372
|
return {
|
|
29942
30373
|
"font-size": "0.75rem",
|
|
29943
30374
|
"text-transform": "uppercase",
|
|
@@ -29945,7 +30376,7 @@ function labelStyle() {
|
|
|
29945
30376
|
color: "var(--app-affiliate-fg-muted)"
|
|
29946
30377
|
};
|
|
29947
30378
|
}
|
|
29948
|
-
function
|
|
30379
|
+
function inputStyle4() {
|
|
29949
30380
|
return {
|
|
29950
30381
|
width: "100%",
|
|
29951
30382
|
padding: "0.625rem 0.75rem",
|
|
@@ -29959,12 +30390,12 @@ function inputStyle3() {
|
|
|
29959
30390
|
};
|
|
29960
30391
|
}
|
|
29961
30392
|
delegateEvents(["input", "click"]);
|
|
29962
|
-
var _tmpl$
|
|
29963
|
-
var _tmpl$
|
|
29964
|
-
var _tmpl$
|
|
29965
|
-
var _tmpl$
|
|
29966
|
-
var _tmpl$
|
|
29967
|
-
var _tmpl$
|
|
30393
|
+
var _tmpl$578 = /* @__PURE__ */ template(`<div style="padding:0.625rem 0.875rem;background:var(--app-affiliate-danger-bg);color:var(--app-affiliate-danger-fg);border-radius:var(--app-affiliate-radius-sm);font-size:0.875rem">`);
|
|
30394
|
+
var _tmpl$2148 = /* @__PURE__ */ template(`<form style=display:flex;flex-direction:column;gap:0.875rem><label style=display:flex;flex-direction:column;gap:0.35rem><span>Email</span><input type=email required></label><button type=submit style="padding:0.75rem 1rem;background:var(--app-affiliate-primary);color:var(--app-affiliate-primary-fg);border:none;border-radius:var(--app-affiliate-radius-sm);font-weight:600">`);
|
|
30395
|
+
var _tmpl$3130 = /* @__PURE__ */ template(`<div class=app-affiliate-root style="background:var(--app-affiliate-bg);color:var(--app-affiliate-fg);min-height:100vh;display:flex;align-items:center;justify-content:center;padding:2rem 1rem"><div style="width:100%;max-width:24rem;background:var(--app-affiliate-surface);border:1px solid var(--app-affiliate-border);border-radius:var(--app-affiliate-radius);padding:2rem;display:flex;flex-direction:column;gap:1.25rem"><h1 style=font-family:var(--app-affiliate-font-display);margin:0;font-size:1.5rem>Reset your password`);
|
|
30396
|
+
var _tmpl$4107 = /* @__PURE__ */ template(`<div style="padding:0.625rem 0.875rem;background:var(--app-affiliate-surface-light);border-radius:var(--app-affiliate-radius-sm);font-size:0.875rem">`);
|
|
30397
|
+
var _tmpl$579 = /* @__PURE__ */ template(`<p style=margin:0;font-size:0.8125rem;opacity:0.8>The link is good for one hour. If nothing arrives, check your spam folder \u2014 and make sure this is the address you signed up with.`);
|
|
30398
|
+
var _tmpl$669 = /* @__PURE__ */ template(`<button type=button style="padding:0.75rem 1rem;background:var(--app-affiliate-primary);color:var(--app-affiliate-primary-fg);border:none;border-radius:var(--app-affiliate-radius-sm);font-weight:600;cursor:pointer">Back to sign in`);
|
|
29968
30399
|
function ForgotPasswordPage(props) {
|
|
29969
30400
|
const [email, setEmail] = createSignal("");
|
|
29970
30401
|
const [submitting, setSubmitting] = createSignal(false);
|
|
@@ -29987,29 +30418,29 @@ function ForgotPasswordPage(props) {
|
|
|
29987
30418
|
}
|
|
29988
30419
|
}
|
|
29989
30420
|
return (() => {
|
|
29990
|
-
var _el$ = _tmpl$
|
|
30421
|
+
var _el$ = _tmpl$3130(), _el$2 = _el$.firstChild; _el$2.firstChild;
|
|
29991
30422
|
insert(_el$2, createComponent(Show, {
|
|
29992
30423
|
get when() {
|
|
29993
30424
|
return !message();
|
|
29994
30425
|
},
|
|
29995
30426
|
get fallback() {
|
|
29996
30427
|
return [(() => {
|
|
29997
|
-
var _el$0 = _tmpl$
|
|
30428
|
+
var _el$0 = _tmpl$4107();
|
|
29998
30429
|
insert(_el$0, message);
|
|
29999
30430
|
return _el$0;
|
|
30000
|
-
})(), _tmpl$
|
|
30431
|
+
})(), _tmpl$579(), createComponent(Show, {
|
|
30001
30432
|
get when() {
|
|
30002
30433
|
return props.onDone;
|
|
30003
30434
|
},
|
|
30004
30435
|
get children() {
|
|
30005
|
-
var _el$10 = _tmpl$
|
|
30436
|
+
var _el$10 = _tmpl$669();
|
|
30006
30437
|
_el$10.$$click = () => props.onDone?.();
|
|
30007
30438
|
return _el$10;
|
|
30008
30439
|
}
|
|
30009
30440
|
})];
|
|
30010
30441
|
},
|
|
30011
30442
|
get children() {
|
|
30012
|
-
var _el$4 = _tmpl$
|
|
30443
|
+
var _el$4 = _tmpl$2148(), _el$5 = _el$4.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling, _el$9 = _el$5.nextSibling;
|
|
30013
30444
|
_el$4.addEventListener("submit", handleSubmit);
|
|
30014
30445
|
_el$7.$$input = (e) => setEmail(e.currentTarget.value);
|
|
30015
30446
|
insert(_el$4, createComponent(Show, {
|
|
@@ -30017,14 +30448,14 @@ function ForgotPasswordPage(props) {
|
|
|
30017
30448
|
return error();
|
|
30018
30449
|
},
|
|
30019
30450
|
get children() {
|
|
30020
|
-
var _el$8 = _tmpl$
|
|
30451
|
+
var _el$8 = _tmpl$578();
|
|
30021
30452
|
insert(_el$8, error);
|
|
30022
30453
|
return _el$8;
|
|
30023
30454
|
}
|
|
30024
30455
|
}), _el$9);
|
|
30025
30456
|
insert(_el$9, () => submitting() ? "Sending\u2026" : "Send reset link");
|
|
30026
30457
|
effect((_p$) => {
|
|
30027
|
-
var _v$ =
|
|
30458
|
+
var _v$ = labelStyle3(), _v$2 = inputStyle5(), _v$3 = submitting(), _v$4 = submitting() ? "not-allowed" : "pointer", _v$5 = submitting() ? 0.7 : 1;
|
|
30028
30459
|
_p$.e = style(_el$6, _v$, _p$.e);
|
|
30029
30460
|
_p$.t = style(_el$7, _v$2, _p$.t);
|
|
30030
30461
|
_v$3 !== _p$.a && (_el$9.disabled = _p$.a = _v$3);
|
|
@@ -30045,7 +30476,7 @@ function ForgotPasswordPage(props) {
|
|
|
30045
30476
|
return _el$;
|
|
30046
30477
|
})();
|
|
30047
30478
|
}
|
|
30048
|
-
function
|
|
30479
|
+
function labelStyle3() {
|
|
30049
30480
|
return {
|
|
30050
30481
|
"font-size": "0.75rem",
|
|
30051
30482
|
"text-transform": "uppercase",
|
|
@@ -30053,7 +30484,7 @@ function labelStyle2() {
|
|
|
30053
30484
|
color: "var(--app-affiliate-fg-muted)"
|
|
30054
30485
|
};
|
|
30055
30486
|
}
|
|
30056
|
-
function
|
|
30487
|
+
function inputStyle5() {
|
|
30057
30488
|
return {
|
|
30058
30489
|
width: "100%",
|
|
30059
30490
|
padding: "0.625rem 0.75rem",
|
|
@@ -30067,17 +30498,17 @@ function inputStyle4() {
|
|
|
30067
30498
|
};
|
|
30068
30499
|
}
|
|
30069
30500
|
delegateEvents(["input", "click"]);
|
|
30070
|
-
var _tmpl$
|
|
30071
|
-
var _tmpl$
|
|
30072
|
-
var _tmpl$
|
|
30073
|
-
var _tmpl$
|
|
30074
|
-
function
|
|
30501
|
+
var _tmpl$580 = /* @__PURE__ */ template(`<div style="padding:0.625rem 0.875rem;background:var(--app-affiliate-danger-bg);color:var(--app-affiliate-danger-fg);border-radius:var(--app-affiliate-radius-sm);font-size:0.875rem">`);
|
|
30502
|
+
var _tmpl$2149 = /* @__PURE__ */ template(`<form style=display:flex;flex-direction:column;gap:0.875rem><label style=display:flex;flex-direction:column;gap:0.35rem><span>New password</span><input type=password required autocomplete=new-password></label><label style=display:flex;flex-direction:column;gap:0.35rem><span>Confirm password</span><input type=password required autocomplete=new-password></label><button type=submit style="padding:0.75rem 1rem;background:var(--app-affiliate-primary);color:var(--app-affiliate-primary-fg);border:none;border-radius:var(--app-affiliate-radius-sm);font-weight:600">`);
|
|
30503
|
+
var _tmpl$3131 = /* @__PURE__ */ template(`<div class=app-affiliate-root style="background:var(--app-affiliate-bg);color:var(--app-affiliate-fg);min-height:100vh;display:flex;align-items:center;justify-content:center;padding:2rem 1rem"><div style="width:100%;max-width:24rem;background:var(--app-affiliate-surface);border:1px solid var(--app-affiliate-border);border-radius:var(--app-affiliate-radius);padding:2rem;display:flex;flex-direction:column;gap:1.25rem"><h1 style=font-family:var(--app-affiliate-font-display);margin:0;font-size:1.5rem>Choose a new password`);
|
|
30504
|
+
var _tmpl$4108 = /* @__PURE__ */ template(`<div style="padding:0.625rem 0.875rem;background:var(--app-affiliate-surface-light);border-radius:var(--app-affiliate-radius-sm);font-size:0.875rem">`);
|
|
30505
|
+
function queryParam2(name) {
|
|
30075
30506
|
if (typeof window === "undefined") return "";
|
|
30076
30507
|
return new URLSearchParams(window.location.search).get(name) ?? "";
|
|
30077
30508
|
}
|
|
30078
30509
|
function ResetPasswordPage(props) {
|
|
30079
|
-
const token = () => props.token ??
|
|
30080
|
-
const email = () => props.email ??
|
|
30510
|
+
const token = () => props.token ?? queryParam2("token");
|
|
30511
|
+
const email = () => props.email ?? queryParam2("email");
|
|
30081
30512
|
const [password, setPassword] = createSignal("");
|
|
30082
30513
|
const [confirm2, setConfirm] = createSignal("");
|
|
30083
30514
|
const [submitting, setSubmitting] = createSignal(false);
|
|
@@ -30110,20 +30541,20 @@ function ResetPasswordPage(props) {
|
|
|
30110
30541
|
}
|
|
30111
30542
|
}
|
|
30112
30543
|
return (() => {
|
|
30113
|
-
var _el$ = _tmpl$
|
|
30544
|
+
var _el$ = _tmpl$3131(), _el$2 = _el$.firstChild; _el$2.firstChild;
|
|
30114
30545
|
insert(_el$2, createComponent(Show, {
|
|
30115
30546
|
get when() {
|
|
30116
30547
|
return !message();
|
|
30117
30548
|
},
|
|
30118
30549
|
get fallback() {
|
|
30119
30550
|
return (() => {
|
|
30120
|
-
var _el$11 = _tmpl$
|
|
30551
|
+
var _el$11 = _tmpl$4108();
|
|
30121
30552
|
insert(_el$11, message);
|
|
30122
30553
|
return _el$11;
|
|
30123
30554
|
})();
|
|
30124
30555
|
},
|
|
30125
30556
|
get children() {
|
|
30126
|
-
var _el$4 = _tmpl$
|
|
30557
|
+
var _el$4 = _tmpl$2149(), _el$5 = _el$4.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling, _el$8 = _el$5.nextSibling, _el$9 = _el$8.firstChild, _el$0 = _el$9.nextSibling, _el$10 = _el$8.nextSibling;
|
|
30127
30558
|
_el$4.addEventListener("submit", handleSubmit);
|
|
30128
30559
|
_el$7.$$input = (e) => setPassword(e.currentTarget.value);
|
|
30129
30560
|
_el$0.$$input = (e) => setConfirm(e.currentTarget.value);
|
|
@@ -30132,14 +30563,14 @@ function ResetPasswordPage(props) {
|
|
|
30132
30563
|
return error();
|
|
30133
30564
|
},
|
|
30134
30565
|
get children() {
|
|
30135
|
-
var _el$1 = _tmpl$
|
|
30566
|
+
var _el$1 = _tmpl$580();
|
|
30136
30567
|
insert(_el$1, error);
|
|
30137
30568
|
return _el$1;
|
|
30138
30569
|
}
|
|
30139
30570
|
}), _el$10);
|
|
30140
30571
|
insert(_el$10, () => submitting() ? "Resetting\u2026" : "Reset password");
|
|
30141
30572
|
effect((_p$) => {
|
|
30142
|
-
var _v$ =
|
|
30573
|
+
var _v$ = labelStyle4(), _v$2 = inputStyle6(), _v$3 = labelStyle4(), _v$4 = inputStyle6(), _v$5 = submitting(), _v$6 = submitting() ? "not-allowed" : "pointer", _v$7 = submitting() ? 0.7 : 1;
|
|
30143
30574
|
_p$.e = style(_el$6, _v$, _p$.e);
|
|
30144
30575
|
_p$.t = style(_el$7, _v$2, _p$.t);
|
|
30145
30576
|
_p$.a = style(_el$9, _v$3, _p$.a);
|
|
@@ -30165,7 +30596,7 @@ function ResetPasswordPage(props) {
|
|
|
30165
30596
|
return _el$;
|
|
30166
30597
|
})();
|
|
30167
30598
|
}
|
|
30168
|
-
function
|
|
30599
|
+
function labelStyle4() {
|
|
30169
30600
|
return {
|
|
30170
30601
|
"font-size": "0.75rem",
|
|
30171
30602
|
"text-transform": "uppercase",
|
|
@@ -30173,7 +30604,7 @@ function labelStyle3() {
|
|
|
30173
30604
|
color: "var(--app-affiliate-fg-muted)"
|
|
30174
30605
|
};
|
|
30175
30606
|
}
|
|
30176
|
-
function
|
|
30607
|
+
function inputStyle6() {
|
|
30177
30608
|
return {
|
|
30178
30609
|
width: "100%",
|
|
30179
30610
|
padding: "0.625rem 0.75rem",
|
|
@@ -30187,11 +30618,11 @@ function inputStyle5() {
|
|
|
30187
30618
|
};
|
|
30188
30619
|
}
|
|
30189
30620
|
delegateEvents(["input"]);
|
|
30190
|
-
var _tmpl$
|
|
30191
|
-
var _tmpl$
|
|
30192
|
-
var _tmpl$
|
|
30193
|
-
var _tmpl$
|
|
30194
|
-
var _tmpl$
|
|
30621
|
+
var _tmpl$581 = /* @__PURE__ */ template(`<div>`);
|
|
30622
|
+
var _tmpl$2150 = /* @__PURE__ */ template(`<form style=display:flex;flex-direction:column;gap:0.875rem><label style=display:flex;flex-direction:column;gap:0.35rem><span>Email</span><input type=email required autocomplete=email></label><button type=submit>`);
|
|
30623
|
+
var _tmpl$3132 = /* @__PURE__ */ template(`<button type=button>Back to login`);
|
|
30624
|
+
var _tmpl$4109 = /* @__PURE__ */ template(`<div class=app-affiliate-root><div><h1>Reset your password`);
|
|
30625
|
+
var _tmpl$584 = /* @__PURE__ */ template(`<p style=margin:0;font-size:0.9rem>`);
|
|
30195
30626
|
function AffiliateForgotPassword(props) {
|
|
30196
30627
|
const [email, setEmail] = createSignal("");
|
|
30197
30628
|
const [submitting, setSubmitting] = createSignal(false);
|
|
@@ -30214,20 +30645,20 @@ function AffiliateForgotPassword(props) {
|
|
|
30214
30645
|
}
|
|
30215
30646
|
}
|
|
30216
30647
|
return (() => {
|
|
30217
|
-
var _el$ = _tmpl$
|
|
30648
|
+
var _el$ = _tmpl$4109(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild;
|
|
30218
30649
|
insert(_el$2, createComponent(Show, {
|
|
30219
30650
|
get when() {
|
|
30220
30651
|
return !message();
|
|
30221
30652
|
},
|
|
30222
30653
|
get fallback() {
|
|
30223
30654
|
return (() => {
|
|
30224
|
-
var _el$1 = _tmpl$
|
|
30655
|
+
var _el$1 = _tmpl$584();
|
|
30225
30656
|
insert(_el$1, message);
|
|
30226
30657
|
return _el$1;
|
|
30227
30658
|
})();
|
|
30228
30659
|
},
|
|
30229
30660
|
get children() {
|
|
30230
|
-
var _el$4 = _tmpl$
|
|
30661
|
+
var _el$4 = _tmpl$2150(), _el$5 = _el$4.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling, _el$9 = _el$5.nextSibling;
|
|
30231
30662
|
_el$4.addEventListener("submit", handleSubmit);
|
|
30232
30663
|
_el$7.$$input = (e) => setEmail(e.currentTarget.value);
|
|
30233
30664
|
insert(_el$4, createComponent(Show, {
|
|
@@ -30235,7 +30666,7 @@ function AffiliateForgotPassword(props) {
|
|
|
30235
30666
|
return error();
|
|
30236
30667
|
},
|
|
30237
30668
|
get children() {
|
|
30238
|
-
var _el$8 = _tmpl$
|
|
30669
|
+
var _el$8 = _tmpl$581();
|
|
30239
30670
|
insert(_el$8, error);
|
|
30240
30671
|
effect((_$p) => style(_el$8, errorStyle(), _$p));
|
|
30241
30672
|
return _el$8;
|
|
@@ -30243,7 +30674,7 @@ function AffiliateForgotPassword(props) {
|
|
|
30243
30674
|
}), _el$9);
|
|
30244
30675
|
insert(_el$9, () => submitting() ? "Sending\u2026" : "Send reset link");
|
|
30245
30676
|
effect((_p$) => {
|
|
30246
|
-
var _v$ =
|
|
30677
|
+
var _v$ = labelStyle5(), _v$2 = inputStyle7(), _v$3 = submitting(), _v$4 = primaryButtonStyle(submitting());
|
|
30247
30678
|
_p$.e = style(_el$6, _v$, _p$.e);
|
|
30248
30679
|
_p$.t = style(_el$7, _v$2, _p$.t);
|
|
30249
30680
|
_v$3 !== _p$.a && (_el$9.disabled = _p$.a = _v$3);
|
|
@@ -30264,7 +30695,7 @@ function AffiliateForgotPassword(props) {
|
|
|
30264
30695
|
return props.onNavigateLogin;
|
|
30265
30696
|
},
|
|
30266
30697
|
get children() {
|
|
30267
|
-
var _el$0 = _tmpl$
|
|
30698
|
+
var _el$0 = _tmpl$3132();
|
|
30268
30699
|
_el$0.$$click = () => props.onNavigateLogin?.();
|
|
30269
30700
|
effect((_$p) => style(_el$0, linkStyle2(), _$p));
|
|
30270
30701
|
return _el$0;
|
|
@@ -30315,7 +30746,7 @@ function headingStyle() {
|
|
|
30315
30746
|
"font-size": "1.5rem"
|
|
30316
30747
|
};
|
|
30317
30748
|
}
|
|
30318
|
-
function
|
|
30749
|
+
function labelStyle5() {
|
|
30319
30750
|
return {
|
|
30320
30751
|
"font-size": "0.75rem",
|
|
30321
30752
|
"text-transform": "uppercase",
|
|
@@ -30323,7 +30754,7 @@ function labelStyle4() {
|
|
|
30323
30754
|
color: "var(--app-affiliate-fg-muted)"
|
|
30324
30755
|
};
|
|
30325
30756
|
}
|
|
30326
|
-
function
|
|
30757
|
+
function inputStyle7() {
|
|
30327
30758
|
return {
|
|
30328
30759
|
width: "100%",
|
|
30329
30760
|
padding: "0.625rem 0.75rem",
|
|
@@ -30370,17 +30801,17 @@ function linkStyle2() {
|
|
|
30370
30801
|
};
|
|
30371
30802
|
}
|
|
30372
30803
|
delegateEvents(["input", "click"]);
|
|
30373
|
-
var _tmpl$
|
|
30374
|
-
var _tmpl$
|
|
30375
|
-
var _tmpl$
|
|
30376
|
-
var _tmpl$
|
|
30377
|
-
function
|
|
30804
|
+
var _tmpl$585 = /* @__PURE__ */ template(`<div>`);
|
|
30805
|
+
var _tmpl$2151 = /* @__PURE__ */ template(`<form style=display:flex;flex-direction:column;gap:0.875rem><label style=display:flex;flex-direction:column;gap:0.35rem><span>New password</span></label><label style=display:flex;flex-direction:column;gap:0.35rem><span>Confirm new password</span></label><button type=submit>`);
|
|
30806
|
+
var _tmpl$3133 = /* @__PURE__ */ template(`<div class=app-affiliate-root><div><h1>Choose a new password`);
|
|
30807
|
+
var _tmpl$4115 = /* @__PURE__ */ template(`<p style=margin:0;font-size:0.9rem>Your password has been reset. You can now log in with your new password.`);
|
|
30808
|
+
function queryParam3(name) {
|
|
30378
30809
|
if (typeof window === "undefined") return "";
|
|
30379
30810
|
return new URLSearchParams(window.location.search).get(name) ?? "";
|
|
30380
30811
|
}
|
|
30381
30812
|
function AffiliateResetPassword(props) {
|
|
30382
|
-
const token = () => props.token ??
|
|
30383
|
-
const email = () => props.email ??
|
|
30813
|
+
const token = () => props.token ?? queryParam3("token");
|
|
30814
|
+
const email = () => props.email ?? queryParam3("email");
|
|
30384
30815
|
const [password, setPassword] = createSignal("");
|
|
30385
30816
|
const [confirm2, setConfirm] = createSignal("");
|
|
30386
30817
|
const [submitting, setSubmitting] = createSignal(false);
|
|
@@ -30417,16 +30848,16 @@ function AffiliateResetPassword(props) {
|
|
|
30417
30848
|
}
|
|
30418
30849
|
}
|
|
30419
30850
|
return (() => {
|
|
30420
|
-
var _el$ = _tmpl$
|
|
30851
|
+
var _el$ = _tmpl$3133(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild;
|
|
30421
30852
|
insert(_el$2, createComponent(Show, {
|
|
30422
30853
|
get when() {
|
|
30423
30854
|
return !done();
|
|
30424
30855
|
},
|
|
30425
30856
|
get fallback() {
|
|
30426
|
-
return _tmpl$
|
|
30857
|
+
return _tmpl$4115();
|
|
30427
30858
|
},
|
|
30428
30859
|
get children() {
|
|
30429
|
-
var _el$4 = _tmpl$
|
|
30860
|
+
var _el$4 = _tmpl$2151(), _el$5 = _el$4.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$5.nextSibling, _el$8 = _el$7.firstChild, _el$0 = _el$7.nextSibling;
|
|
30430
30861
|
_el$4.addEventListener("submit", handleSubmit);
|
|
30431
30862
|
insert(_el$5, createComponent(AffiliatePasswordInput, {
|
|
30432
30863
|
required: true,
|
|
@@ -30451,7 +30882,7 @@ function AffiliateResetPassword(props) {
|
|
|
30451
30882
|
return error();
|
|
30452
30883
|
},
|
|
30453
30884
|
get children() {
|
|
30454
|
-
var _el$9 = _tmpl$
|
|
30885
|
+
var _el$9 = _tmpl$585();
|
|
30455
30886
|
insert(_el$9, error);
|
|
30456
30887
|
effect((_$p) => style(_el$9, errorStyle2(), _$p));
|
|
30457
30888
|
return _el$9;
|
|
@@ -30459,7 +30890,7 @@ function AffiliateResetPassword(props) {
|
|
|
30459
30890
|
}), _el$0);
|
|
30460
30891
|
insert(_el$0, () => submitting() ? "Saving\u2026" : "Set new password");
|
|
30461
30892
|
effect((_p$) => {
|
|
30462
|
-
var _v$ =
|
|
30893
|
+
var _v$ = labelStyle6(), _v$2 = labelStyle6(), _v$3 = submitting(), _v$4 = primaryButtonStyle2(submitting());
|
|
30463
30894
|
_p$.e = style(_el$6, _v$, _p$.e);
|
|
30464
30895
|
_p$.t = style(_el$8, _v$2, _p$.t);
|
|
30465
30896
|
_v$3 !== _p$.a && (_el$0.disabled = _p$.a = _v$3);
|
|
@@ -30519,7 +30950,7 @@ function headingStyle2() {
|
|
|
30519
30950
|
"font-size": "1.5rem"
|
|
30520
30951
|
};
|
|
30521
30952
|
}
|
|
30522
|
-
function
|
|
30953
|
+
function labelStyle6() {
|
|
30523
30954
|
return {
|
|
30524
30955
|
"font-size": "0.75rem",
|
|
30525
30956
|
"text-transform": "uppercase",
|
|
@@ -30549,6 +30980,6 @@ function primaryButtonStyle2(submitting) {
|
|
|
30549
30980
|
};
|
|
30550
30981
|
}
|
|
30551
30982
|
|
|
30552
|
-
export { ADMIN_TAB_SEGMENTS, AFFILIATE_SUB_TAB_SEGMENTS, AddressFields, AdminDashboard, AffiliateForgotPassword, AffiliateLogin, AffiliatePortal, AffiliateRegister, AffiliateResetPassword, CartCheckoutPage, CheckoutPage, EmailTemplates, ForgotPasswordPage, MemberPortal, PatientDashboardPreview, RegisterPage, ResetPasswordPage, SignupPage, SubscribePage, SurveyPage, SurveyV2Page, UpdatePaymentMethod, adminTabFromPath, adminTabPath, affiliateSubTabFromPath, affiliateSubTabPath };
|
|
30553
|
-
//# sourceMappingURL=
|
|
30554
|
-
//# sourceMappingURL=
|
|
30983
|
+
export { ADMIN_TAB_SEGMENTS, AFFILIATE_SUB_TAB_SEGMENTS, AcceptAdminInvitePage, AddressFields, AdminDashboard, AffiliateForgotPassword, AffiliateLogin, AffiliatePortal, AffiliateRegister, AffiliateResetPassword, CartCheckoutPage, CheckoutPage, EmailTemplates, ForgotPasswordPage, MemberPortal, PatientDashboardPreview, RegisterPage, ResetPasswordPage, SignupPage, SubscribePage, SurveyPage, SurveyV2Page, UpdatePaymentMethod, adminTabFromPath, adminTabPath, affiliateSubTabFromPath, affiliateSubTabPath };
|
|
30984
|
+
//# sourceMappingURL=Z5QDFCLZ.js.map
|
|
30985
|
+
//# sourceMappingURL=Z5QDFCLZ.js.map
|