@adminide-stack/clock-tik-browser 12.0.29 → 12.0.31
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/lib/components/navbar/ProductMegaMenu.d.ts.map +1 -1
- package/lib/components/navbar/ProductMegaMenu.js +1 -0
- package/lib/components/navbar/ProductMegaMenu.js.map +1 -1
- package/lib/components/navbar/index.d.ts.map +1 -1
- package/lib/components/navbar/index.js +2 -0
- package/lib/components/navbar/index.js.map +1 -1
- package/lib/pages/Contact-us/index.d.ts.map +1 -1
- package/lib/pages/Contact-us/index.js +4 -1
- package/lib/pages/Contact-us/index.js.map +1 -1
- package/lib/pages/Demo/index.d.ts.map +1 -1
- package/lib/pages/Demo/index.js +13 -1
- package/lib/pages/Demo/index.js.map +1 -1
- package/lib/pages/Home/HomePage.d.ts.map +1 -1
- package/lib/pages/Home/HomePage.js +1203 -250
- package/lib/pages/Home/HomePage.js.map +1 -1
- package/lib/pages/Home/__tests__/device.test.d.ts +2 -0
- package/lib/pages/Home/__tests__/device.test.d.ts.map +1 -0
- package/lib/pages/Home/__tests__/qr.test.d.ts +2 -0
- package/lib/pages/Home/__tests__/qr.test.d.ts.map +1 -0
- package/lib/pages/Home/__tests__/textLink.test.d.ts +2 -0
- package/lib/pages/Home/__tests__/textLink.test.d.ts.map +1 -0
- package/lib/pages/Home/assets.js +0 -2
- package/lib/pages/Home/assets.js.map +1 -1
- package/lib/pages/Home/chat/ChoresChat.d.ts +3 -1
- package/lib/pages/Home/chat/ChoresChat.d.ts.map +1 -1
- package/lib/pages/Home/chat/ChoresChat.js +100 -12
- package/lib/pages/Home/chat/ChoresChat.js.map +1 -1
- package/lib/pages/Home/chat/chatTheme.d.ts +2 -1
- package/lib/pages/Home/chat/chatTheme.d.ts.map +1 -1
- package/lib/pages/Home/chat/chatTheme.js +202 -15
- package/lib/pages/Home/chat/chatTheme.js.map +1 -1
- package/lib/pages/Home/chat/thread.d.ts +5 -0
- package/lib/pages/Home/chat/thread.d.ts.map +1 -1
- package/lib/pages/Home/chat/thread.js +24 -1
- package/lib/pages/Home/chat/thread.js.map +1 -1
- package/lib/pages/Home/content.d.ts +29 -0
- package/lib/pages/Home/content.d.ts.map +1 -1
- package/lib/pages/Home/content.js +72 -2
- package/lib/pages/Home/content.js.map +1 -1
- package/lib/pages/Home/homeStyles.d.ts +2 -0
- package/lib/pages/Home/homeStyles.d.ts.map +1 -1
- package/lib/pages/Home/homeStyles.js +2181 -512
- package/lib/pages/Home/homeStyles.js.map +1 -1
- package/lib/pages/Home/imessage/ImessageDialog.d.ts +14 -0
- package/lib/pages/Home/imessage/ImessageDialog.d.ts.map +1 -0
- package/lib/pages/Home/imessage/ImessageDialog.js +277 -0
- package/lib/pages/Home/imessage/ImessageDialog.js.map +1 -0
- package/lib/pages/Home/imessage/ImessageIcon.d.ts +5 -0
- package/lib/pages/Home/imessage/ImessageIcon.d.ts.map +1 -0
- package/lib/pages/Home/imessage/ImessageIcon.js +42 -0
- package/lib/pages/Home/imessage/ImessageIcon.js.map +1 -0
- package/lib/pages/Home/imessage/QrCode.d.ts +6 -0
- package/lib/pages/Home/imessage/QrCode.d.ts.map +1 -0
- package/lib/pages/Home/imessage/QrCode.js +86 -0
- package/lib/pages/Home/imessage/QrCode.js.map +1 -0
- package/lib/pages/Home/imessage/device.d.ts +31 -0
- package/lib/pages/Home/imessage/device.d.ts.map +1 -0
- package/lib/pages/Home/imessage/device.js +31 -0
- package/lib/pages/Home/imessage/device.js.map +1 -0
- package/lib/pages/Home/imessage/qr.d.ts +42 -0
- package/lib/pages/Home/imessage/qr.d.ts.map +1 -0
- package/lib/pages/Home/imessage/qr.js +469 -0
- package/lib/pages/Home/imessage/qr.js.map +1 -0
- package/lib/pages/Home/imessage/textLink.d.ts +70 -0
- package/lib/pages/Home/imessage/textLink.d.ts.map +1 -0
- package/lib/pages/Home/imessage/textLink.js +224 -0
- package/lib/pages/Home/imessage/textLink.js.map +1 -0
- package/lib/pages/Home/index.d.ts +15 -0
- package/lib/pages/Home/index.d.ts.map +1 -1
- package/lib/pages/Home/index.js +23 -28
- package/lib/pages/Home/index.js.map +1 -1
- package/lib/pages/Home/platform.d.ts +5 -0
- package/lib/pages/Home/platform.d.ts.map +1 -1
- package/lib/pages/Home/platform.js +8 -1
- package/lib/pages/Home/platform.js.map +1 -1
- package/lib/pages/LandingPage/components/Section.d.ts +3 -1
- package/lib/pages/LandingPage/components/Section.d.ts.map +1 -1
- package/lib/pages/LandingPage/components/Section.js +2 -0
- package/lib/pages/LandingPage/components/Section.js.map +1 -1
- package/lib/pages/LandingPage/index.js +3 -0
- package/lib/pages/LandingPage/index.js.map +1 -1
- package/lib/pages/Pricing/index.js +9 -0
- package/lib/pages/Pricing/index.js.map +1 -1
- package/lib/pages/ProductLandingPage/ProductBlocks.d.ts.map +1 -1
- package/lib/pages/ProductLandingPage/ProductBlocks.js +9 -2
- package/lib/pages/ProductLandingPage/ProductBlocks.js.map +1 -1
- package/lib/pages/ProductLandingPage/index.d.ts.map +1 -1
- package/lib/pages/ProductLandingPage/index.js +12 -4
- package/lib/pages/ProductLandingPage/index.js.map +1 -1
- package/lib/utils/analytics.d.ts +32 -0
- package/lib/utils/analytics.d.ts.map +1 -0
- package/lib/utils/analytics.js +36 -0
- package/lib/utils/analytics.js.map +1 -0
- package/package.json +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {jsxs,jsx}from'react/jsx-runtime';import {useState,
|
|
1
|
+
import {jsxs,jsx,Fragment}from'react/jsx-runtime';import {useRef,useState,useCallback,useEffect,Suspense,lazy}from'react';import {createPortal}from'react-dom';import {Briefcase,ShieldCheck,PhoneCall,Plane,Wrench,Users,ShoppingCart,RefreshCcw,Receipt,ArrowRight,Plus,ArrowUp,PackageOpen,Landmark,Smile,UtensilsCrossed,CalendarClock,Check,Play,Workflow,BookOpen,Timer,X,UserPlus,KeyRound,Sparkles,Square}from'lucide-react';import {canLogin,beginLogin,captureLoginCallback,reconcileStoredToken,clearCdecliToken,getCdecliToken,hasCdecliToken,tokenExpiringSoon}from'@yantra/surface-kit/auth';import {businessHref}from'./business.js';import {ensurePlatformAnchor,appChatLink,appTextingLink}from'./platform.js';import {HOME_ASSETS}from'./assets.js';import {HomeStyles}from'./homeStyles.js';import {savePendingImessage,savePendingChore,takePendingChore,takePendingImessage,accountKeyFromToken}from'./chat/thread.js';import {MINUTES,TYPED_CHORES,HERO_CHORES,STRIP_CHORES,VIDEO_NOTE,TEXT_STEPS,AREAS,HOUSEWORK_MIN,STEPS,BUSINESS_PRODUCTS,FAQS,FOOTNOTE,CALL_STEPS,TEXT_THREAD,BUSINESS_LINKS}from'./content.js';import {ImessageIcon}from'./imessage/ImessageIcon.js';import {clearTextLinkCodes}from'./imessage/textLink.js';import {Mark,AnimatedMark}from'./Logo.js';import {emitAnalyticsEvent}from'../../utils/analytics.js';const AREA_ICONS = {
|
|
2
2
|
bills: Receipt,
|
|
3
3
|
subscriptions: RefreshCcw,
|
|
4
4
|
groceries: ShoppingCart,
|
|
@@ -35,11 +35,48 @@ const REELS = [{
|
|
|
35
35
|
result: 'Cancelled by phone, $600 a year back',
|
|
36
36
|
label: 'Lucy calls the gym, declines three offers and cancels'
|
|
37
37
|
}];
|
|
38
|
+
const STATS = [{
|
|
39
|
+
to: 38,
|
|
40
|
+
unit: 'min',
|
|
41
|
+
label: 'back, every day'
|
|
42
|
+
}, {
|
|
43
|
+
to: 4.4,
|
|
44
|
+
decimals: 1,
|
|
45
|
+
unit: 'hrs',
|
|
46
|
+
label: 'every week'
|
|
47
|
+
}, {
|
|
48
|
+
to: 229,
|
|
49
|
+
unit: 'hrs',
|
|
50
|
+
label: 'every year'
|
|
51
|
+
}];
|
|
52
|
+
/**
|
|
53
|
+
* Specks that drift up through the hero's glow. Fixed rather than random, so the server and the
|
|
54
|
+
* browser draw the same markup; a negative delay starts each one part-way through its rise. The
|
|
55
|
+
* first six, all a phone shows, still spread across the width.
|
|
56
|
+
*/
|
|
57
|
+
const MOTES = [['7%', '58%', 3, '#ff8a3d', 15, -3, 14], ['49%', '38%', 2, '#ffb36b', 17, -14, -16], ['89%', '58%', 3, '#ff5a00', 23, -15, 12], ['23%', '74%', 4, '#ffc45c', 21, -1, 18], ['65%', '50%', 2, '#ff8fa3', 20, -10, -12], ['40%', '66%', 3, '#ffb36b', 22, -6, 12], ['15%', '32%', 2, '#ff5a00', 18, -9, -10], ['57%', '72%', 3, '#ff8fa3', 19, -4, 10], ['81%', '36%', 2, '#ffc45c', 16, -8, -6], ['31%', '46%', 2, '#ff8a3d', 16, -12, -8], ['73%', '64%', 4, '#ffb36b', 18, -2, 16], ['94%', '80%', 2, '#ff8fa3', 20, -5, -14]];
|
|
38
58
|
/** The longest chore the composer takes. */
|
|
39
59
|
const PROMPT_MAX = 2000;
|
|
60
|
+
const PLACEHOLDER = 'What should Lucy take off your plate?';
|
|
61
|
+
const NO_PHRASES = [];
|
|
62
|
+
/** The composer's typewriter: a chore typed out, held, taken back, and the next one. */
|
|
63
|
+
const TYPE_START_MS = 700;
|
|
64
|
+
const TYPE_MS = 34;
|
|
65
|
+
const TYPE_JITTER_MS = 36;
|
|
66
|
+
const TYPE_HOLD_MS = 1800;
|
|
67
|
+
const TYPE_DELETE_MS = 16;
|
|
68
|
+
const TYPE_GAP_MS = 420;
|
|
69
|
+
/** How long a revealed element rises (with its stagger) before its own transitions take over. */
|
|
70
|
+
const RISE_MS = 1400;
|
|
71
|
+
const COUNT_MS = 1400;
|
|
72
|
+
const CALL_STEP_MS = 1500;
|
|
73
|
+
const CALL_HOLD_MS = 3400;
|
|
40
74
|
/** The page's chat, fetched the first time it is needed (or when the composer is focused). */
|
|
41
75
|
const loadChat = () => import('./chat/ChoresChat.js');
|
|
42
76
|
const ChoresChat = lazy(loadChat);
|
|
77
|
+
/** The iMessage dialog and its QR encoder, fetched when someone reaches for it. */
|
|
78
|
+
const loadImessage = () => import('./imessage/ImessageDialog.js');
|
|
79
|
+
const ImessageDialog = lazy(loadImessage);
|
|
43
80
|
/** Signed in, with a token that is not about to lapse. */
|
|
44
81
|
function hasLiveToken() {
|
|
45
82
|
return hasCdecliToken() && !tokenExpiringSoon(30);
|
|
@@ -58,6 +95,137 @@ function usePrefersReducedMotion() {
|
|
|
58
95
|
}, []);
|
|
59
96
|
return reduced;
|
|
60
97
|
}
|
|
98
|
+
/** Motion is on: after hydration (the server draws the still page), unless reduced motion was asked for. */
|
|
99
|
+
function useMotion() {
|
|
100
|
+
const [on, setOn] = useState(false);
|
|
101
|
+
useEffect(() => {
|
|
102
|
+
const query = window.matchMedia?.('(prefers-reduced-motion: reduce)');
|
|
103
|
+
setOn(!query?.matches);
|
|
104
|
+
if (!query) return;
|
|
105
|
+
const onChange = e => setOn(!e.matches);
|
|
106
|
+
query.addEventListener('change', onChange);
|
|
107
|
+
return () => query.removeEventListener('change', onChange);
|
|
108
|
+
}, []);
|
|
109
|
+
return on;
|
|
110
|
+
}
|
|
111
|
+
function useInView(ref) {
|
|
112
|
+
const [inView, setInView] = useState(false);
|
|
113
|
+
useEffect(() => {
|
|
114
|
+
const el = ref.current;
|
|
115
|
+
if (!el) return undefined;
|
|
116
|
+
if (typeof IntersectionObserver === 'undefined') {
|
|
117
|
+
setInView(true);
|
|
118
|
+
return undefined;
|
|
119
|
+
}
|
|
120
|
+
const io = new IntersectionObserver(([entry]) => setInView(Boolean(entry?.isIntersecting)));
|
|
121
|
+
io.observe(el);
|
|
122
|
+
return () => io.disconnect();
|
|
123
|
+
}, [ref]);
|
|
124
|
+
return inView;
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* `.cbh-reveal` elements still below the fold wait ([data-wait]) and rise into view ([data-in]).
|
|
128
|
+
* What is already on screen is left as the server drew it, so nothing on screen ever flashes.
|
|
129
|
+
*/
|
|
130
|
+
function useReveal(rootRef, motion) {
|
|
131
|
+
useEffect(() => {
|
|
132
|
+
const root = rootRef.current;
|
|
133
|
+
if (!root || !motion || typeof IntersectionObserver === 'undefined') return undefined;
|
|
134
|
+
const timers = [];
|
|
135
|
+
const io = new IntersectionObserver(entries => {
|
|
136
|
+
for (const entry of entries) {
|
|
137
|
+
if (!entry.isIntersecting) continue;
|
|
138
|
+
const el = entry.target;
|
|
139
|
+
io.unobserve(el);
|
|
140
|
+
el.setAttribute('data-in', '');
|
|
141
|
+
// Once it has risen, the element's own transitions (a card's hover) take over.
|
|
142
|
+
timers.push(window.setTimeout(() => el.removeAttribute('data-wait'), RISE_MS));
|
|
143
|
+
}
|
|
144
|
+
}, {
|
|
145
|
+
rootMargin: '0px 0px -8% 0px',
|
|
146
|
+
threshold: 0.06
|
|
147
|
+
});
|
|
148
|
+
for (const el of Array.from(root.querySelectorAll('.cbh-reveal'))) {
|
|
149
|
+
if (el.hasAttribute('data-in') || el.getBoundingClientRect().top < window.innerHeight * 0.92) continue;
|
|
150
|
+
el.setAttribute('data-wait', '');
|
|
151
|
+
io.observe(el);
|
|
152
|
+
}
|
|
153
|
+
return () => {
|
|
154
|
+
io.disconnect();
|
|
155
|
+
timers.forEach(t => window.clearTimeout(t));
|
|
156
|
+
// Whatever stopped the effect, nothing is left hidden behind it.
|
|
157
|
+
root.querySelectorAll('.cbh-reveal[data-wait]').forEach(el => {
|
|
158
|
+
el.setAttribute('data-in', '');
|
|
159
|
+
el.removeAttribute('data-wait');
|
|
160
|
+
});
|
|
161
|
+
};
|
|
162
|
+
}, [rootRef, motion]);
|
|
163
|
+
}
|
|
164
|
+
/** A chore typed out in the empty composer, held, taken back, then the next. Null when idle. */
|
|
165
|
+
function useTypewriter(phrases, active) {
|
|
166
|
+
const [text, setText] = useState(null);
|
|
167
|
+
const phraseRef = useRef(0);
|
|
168
|
+
useEffect(() => {
|
|
169
|
+
if (!active || !phrases.length) {
|
|
170
|
+
setText(null);
|
|
171
|
+
return undefined;
|
|
172
|
+
}
|
|
173
|
+
let shown = 0;
|
|
174
|
+
let deleting = false;
|
|
175
|
+
let timer = 0;
|
|
176
|
+
const step = () => {
|
|
177
|
+
const full = phrases[phraseRef.current % phrases.length];
|
|
178
|
+
if (!deleting) {
|
|
179
|
+
shown += 1;
|
|
180
|
+
setText(full.slice(0, shown));
|
|
181
|
+
if (shown >= full.length) {
|
|
182
|
+
deleting = true;
|
|
183
|
+
timer = window.setTimeout(step, TYPE_HOLD_MS);
|
|
184
|
+
} else {
|
|
185
|
+
timer = window.setTimeout(step, TYPE_MS + Math.random() * TYPE_JITTER_MS);
|
|
186
|
+
}
|
|
187
|
+
return;
|
|
188
|
+
}
|
|
189
|
+
shown = Math.max(0, shown - 2);
|
|
190
|
+
setText(full.slice(0, shown));
|
|
191
|
+
if (shown > 0) {
|
|
192
|
+
timer = window.setTimeout(step, TYPE_DELETE_MS);
|
|
193
|
+
return;
|
|
194
|
+
}
|
|
195
|
+
deleting = false;
|
|
196
|
+
phraseRef.current += 1;
|
|
197
|
+
timer = window.setTimeout(step, TYPE_GAP_MS);
|
|
198
|
+
};
|
|
199
|
+
setText('');
|
|
200
|
+
timer = window.setTimeout(step, TYPE_START_MS);
|
|
201
|
+
return () => window.clearTimeout(timer);
|
|
202
|
+
}, [phrases, active]);
|
|
203
|
+
return text;
|
|
204
|
+
}
|
|
205
|
+
/**
|
|
206
|
+
* How many of `length` steps are done, looping while `active`: one every `stepMs`, a pause of
|
|
207
|
+
* `holdMs` on the finished state, then again. All done on the server and under reduced motion.
|
|
208
|
+
*/
|
|
209
|
+
function useSequence(length, motion, active, stepMs, holdMs) {
|
|
210
|
+
const [done, setDone] = useState(length);
|
|
211
|
+
useEffect(() => {
|
|
212
|
+
setDone(motion ? 0 : length);
|
|
213
|
+
}, [motion, length]);
|
|
214
|
+
useEffect(() => {
|
|
215
|
+
if (!motion || !active) return undefined;
|
|
216
|
+
let n = 0;
|
|
217
|
+
let timer = 0;
|
|
218
|
+
const next = () => {
|
|
219
|
+
n = n >= length ? 0 : n + 1;
|
|
220
|
+
setDone(n);
|
|
221
|
+
timer = window.setTimeout(next, n >= length ? holdMs : stepMs);
|
|
222
|
+
};
|
|
223
|
+
setDone(0);
|
|
224
|
+
timer = window.setTimeout(next, stepMs);
|
|
225
|
+
return () => window.clearTimeout(timer);
|
|
226
|
+
}, [motion, active, length, stepMs, holdMs]);
|
|
227
|
+
return done;
|
|
228
|
+
}
|
|
61
229
|
/** A silent animation that loops; a still poster when the visitor prefers reduced motion. */
|
|
62
230
|
function Loop({
|
|
63
231
|
src,
|
|
@@ -105,7 +273,14 @@ function Reel({
|
|
|
105
273
|
}) : jsxs("button", {
|
|
106
274
|
type: "button",
|
|
107
275
|
className: "cbh-reel-poster",
|
|
108
|
-
|
|
276
|
+
"data-track": "reel_play",
|
|
277
|
+
"data-track-item": title,
|
|
278
|
+
onClick: () => {
|
|
279
|
+
setPlaying(true);
|
|
280
|
+
emitAnalyticsEvent('video_start', {
|
|
281
|
+
video_title: title
|
|
282
|
+
});
|
|
283
|
+
},
|
|
109
284
|
"aria-label": `Play: ${label}`,
|
|
110
285
|
children: [jsx("img", {
|
|
111
286
|
src: poster,
|
|
@@ -114,7 +289,7 @@ function Reel({
|
|
|
114
289
|
className: "cbh-reel-play",
|
|
115
290
|
"aria-hidden": true,
|
|
116
291
|
children: jsx(Play, {
|
|
117
|
-
size:
|
|
292
|
+
size: 24,
|
|
118
293
|
fill: "currentColor"
|
|
119
294
|
})
|
|
120
295
|
})]
|
|
@@ -131,37 +306,78 @@ function Reel({
|
|
|
131
306
|
/** One chore: a button that hands it over. Hero chores wear their icon in front. */
|
|
132
307
|
function ChoreChip({
|
|
133
308
|
chore,
|
|
134
|
-
onChore
|
|
309
|
+
onChore,
|
|
310
|
+
tabIndex
|
|
135
311
|
}) {
|
|
136
312
|
const Icon = chore.icon ? CHORE_ICONS[chore.icon] : null;
|
|
137
313
|
return jsxs("button", {
|
|
138
314
|
type: "button",
|
|
139
315
|
className: "cbh-chip",
|
|
140
|
-
|
|
316
|
+
"data-track": "chore_chip",
|
|
317
|
+
"data-track-item": chore.label,
|
|
318
|
+
onClick: () => onChore(chore),
|
|
319
|
+
tabIndex: tabIndex,
|
|
141
320
|
children: [Icon ? jsx(Icon, {
|
|
142
321
|
size: 16,
|
|
143
322
|
"aria-hidden": true
|
|
144
323
|
}) : null, chore.label, Icon ? null : jsx(ArrowRight, {
|
|
145
|
-
size:
|
|
324
|
+
size: 14,
|
|
325
|
+
className: "cbh-chip-go",
|
|
146
326
|
"aria-hidden": true
|
|
147
327
|
})]
|
|
148
328
|
});
|
|
149
329
|
}
|
|
330
|
+
/** A row of chores that drifts by; it pauses under the pointer and for the keyboard. */
|
|
331
|
+
function Marquee({
|
|
332
|
+
chores,
|
|
333
|
+
onChore,
|
|
334
|
+
reverse
|
|
335
|
+
}) {
|
|
336
|
+
return jsx("div", {
|
|
337
|
+
className: "cbh-marquee",
|
|
338
|
+
"data-reverse": reverse || undefined,
|
|
339
|
+
children: jsxs("div", {
|
|
340
|
+
className: "cbh-marquee-track",
|
|
341
|
+
children: [jsx("div", {
|
|
342
|
+
className: "cbh-marquee-group",
|
|
343
|
+
children: chores.map(c => jsx(ChoreChip, {
|
|
344
|
+
chore: c,
|
|
345
|
+
onChore: onChore
|
|
346
|
+
}, c.label))
|
|
347
|
+
}), jsx("div", {
|
|
348
|
+
className: "cbh-marquee-group cbh-marquee-dup",
|
|
349
|
+
"aria-hidden": true,
|
|
350
|
+
children: chores.map(c => jsx(ChoreChip, {
|
|
351
|
+
chore: c,
|
|
352
|
+
onChore: onChore,
|
|
353
|
+
tabIndex: -1
|
|
354
|
+
}, c.label))
|
|
355
|
+
})]
|
|
356
|
+
})
|
|
357
|
+
});
|
|
358
|
+
}
|
|
150
359
|
/**
|
|
151
360
|
* The chore composer, shaped like the Yantra app's home box: a few lines to say it the way you
|
|
152
|
-
* would text it, Enter to hand it over (Shift+Enter for a new line).
|
|
361
|
+
* would text it, Enter to hand it over (Shift+Enter for a new line). Empty and on screen, it types
|
|
362
|
+
* out chores people hand over, so it is plain what to write.
|
|
153
363
|
*/
|
|
154
364
|
function Composer({
|
|
155
365
|
id,
|
|
156
366
|
large,
|
|
367
|
+
typed,
|
|
157
368
|
onSubmit,
|
|
158
369
|
onWarm,
|
|
159
370
|
inputRef
|
|
160
371
|
}) {
|
|
161
372
|
const [text, setText] = useState('');
|
|
373
|
+
const [focused, setFocused] = useState(false);
|
|
162
374
|
const fieldRef = useRef(null);
|
|
375
|
+
const formRef = useRef(null);
|
|
376
|
+
const motion = useMotion();
|
|
377
|
+
const inView = useInView(formRef);
|
|
378
|
+
const ghost = useTypewriter(typed ?? NO_PHRASES, Boolean(typed) && motion && inView && !focused && !text);
|
|
163
379
|
const ready = text.trim().length > 0;
|
|
164
|
-
// Grow with the chore, up to the cap in
|
|
380
|
+
// Grow with the chore, up to the cap in the stylesheet, then scroll.
|
|
165
381
|
useEffect(() => {
|
|
166
382
|
const el = fieldRef.current;
|
|
167
383
|
if (!el) return;
|
|
@@ -181,51 +397,536 @@ function Composer({
|
|
|
181
397
|
fieldRef.current = el;
|
|
182
398
|
if (typeof inputRef === 'function') inputRef(el);else if (inputRef) inputRef.current = el;
|
|
183
399
|
};
|
|
184
|
-
return
|
|
185
|
-
className: `cbh-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
400
|
+
return jsx("div", {
|
|
401
|
+
className: `cbh-cwrap${large ? ' cbh-cwrap-large' : ''}`,
|
|
402
|
+
children: jsxs("form", {
|
|
403
|
+
ref: formRef,
|
|
404
|
+
className: "cbh-composer",
|
|
405
|
+
onSubmit: submit,
|
|
406
|
+
onClick: () => fieldRef.current?.focus(),
|
|
407
|
+
children: [jsx("label", {
|
|
408
|
+
htmlFor: id,
|
|
409
|
+
className: "cbh-visually-hidden",
|
|
410
|
+
children: "A chore to hand over"
|
|
411
|
+
}), jsxs("div", {
|
|
412
|
+
className: "cbh-field",
|
|
413
|
+
children: [ghost !== null ? jsxs("span", {
|
|
414
|
+
className: "cbh-ghost",
|
|
415
|
+
"aria-hidden": true,
|
|
416
|
+
children: [ghost, jsx("i", {
|
|
417
|
+
className: "cbh-caret"
|
|
418
|
+
})]
|
|
419
|
+
}) : null, jsx("textarea", {
|
|
420
|
+
id: id,
|
|
421
|
+
ref: setRefs,
|
|
422
|
+
rows: 2,
|
|
423
|
+
value: text,
|
|
424
|
+
maxLength: PROMPT_MAX,
|
|
425
|
+
onChange: e => setText(e.target.value),
|
|
426
|
+
onKeyDown: onKeyDown,
|
|
427
|
+
onFocus: () => {
|
|
428
|
+
setFocused(true);
|
|
429
|
+
onWarm?.();
|
|
430
|
+
},
|
|
431
|
+
onBlur: () => setFocused(false),
|
|
432
|
+
placeholder: ghost !== null ? '' : PLACEHOLDER,
|
|
433
|
+
autoComplete: "off"
|
|
434
|
+
})]
|
|
435
|
+
}), jsxs("div", {
|
|
436
|
+
className: "cbh-composer-row",
|
|
437
|
+
children: [jsxs("span", {
|
|
438
|
+
className: "cbh-composer-hint",
|
|
439
|
+
children: [jsx(PhoneCall, {
|
|
440
|
+
size: 15,
|
|
441
|
+
"aria-hidden": true
|
|
442
|
+
}), "Lucy calls, books and keeps track"]
|
|
443
|
+
}), jsx("button", {
|
|
444
|
+
type: "submit",
|
|
445
|
+
className: "cbh-send",
|
|
446
|
+
"data-track": "chore_send",
|
|
447
|
+
"data-ready": ready || undefined,
|
|
448
|
+
disabled: !ready,
|
|
449
|
+
"aria-label": "Hand it over",
|
|
450
|
+
children: jsx(ArrowUp, {
|
|
451
|
+
size: 20,
|
|
452
|
+
strokeWidth: 2.4,
|
|
453
|
+
"aria-hidden": true
|
|
454
|
+
})
|
|
455
|
+
})]
|
|
456
|
+
})]
|
|
457
|
+
})
|
|
458
|
+
});
|
|
459
|
+
}
|
|
460
|
+
/**
|
|
461
|
+
* The hero's moving backdrop: a slow aurora in the mark's warm tones, a faint dot grid, a few
|
|
462
|
+
* drifting specks and, under a mouse, a soft light that follows the pointer while the aurora leans
|
|
463
|
+
* the other way. Decorative only: hidden from assistive tech, never takes a click.
|
|
464
|
+
*/
|
|
465
|
+
function Ambient() {
|
|
466
|
+
const rootRef = useRef(null);
|
|
467
|
+
const driftRef = useRef(null);
|
|
468
|
+
const lightRef = useRef(null);
|
|
469
|
+
useEffect(() => {
|
|
470
|
+
const root = rootRef.current;
|
|
471
|
+
const host = root?.parentElement;
|
|
472
|
+
if (!root || !host) return undefined;
|
|
473
|
+
// A mouse only: on touch the light would jump to every tap and stay there.
|
|
474
|
+
if (!window.matchMedia?.('(hover: hover) and (pointer: fine)').matches) return undefined;
|
|
475
|
+
if (window.matchMedia('(prefers-reduced-motion: reduce)').matches) return undefined;
|
|
476
|
+
let frame = 0;
|
|
477
|
+
let clientX = 0;
|
|
478
|
+
let clientY = 0;
|
|
479
|
+
// One write per frame however fast the pointer reports; the CSS transitions smooth the rest.
|
|
480
|
+
const paint = () => {
|
|
481
|
+
frame = 0;
|
|
482
|
+
const box = root.getBoundingClientRect();
|
|
483
|
+
const x = clientX - box.left;
|
|
484
|
+
const y = clientY - box.top;
|
|
485
|
+
lightRef.current?.style.setProperty('transform', `translate3d(${x}px, ${y}px, 0)`);
|
|
486
|
+
const dx = (x / Math.max(box.width, 1) - 0.5) * -28;
|
|
487
|
+
const dy = (y / Math.max(box.height, 1) - 0.5) * -18;
|
|
488
|
+
driftRef.current?.style.setProperty('transform', `translate3d(${dx.toFixed(1)}px, ${dy.toFixed(1)}px, 0)`);
|
|
489
|
+
};
|
|
490
|
+
const onMove = event => {
|
|
491
|
+
if (event.pointerType !== 'mouse') return;
|
|
492
|
+
clientX = event.clientX;
|
|
493
|
+
clientY = event.clientY;
|
|
494
|
+
if (!root.hasAttribute('data-pointer')) root.setAttribute('data-pointer', '');
|
|
495
|
+
if (!frame) frame = window.requestAnimationFrame(paint);
|
|
496
|
+
};
|
|
497
|
+
const onLeave = () => root.removeAttribute('data-pointer');
|
|
498
|
+
host.addEventListener('pointermove', onMove, {
|
|
499
|
+
passive: true
|
|
500
|
+
});
|
|
501
|
+
host.addEventListener('pointerleave', onLeave);
|
|
502
|
+
return () => {
|
|
503
|
+
host.removeEventListener('pointermove', onMove);
|
|
504
|
+
host.removeEventListener('pointerleave', onLeave);
|
|
505
|
+
if (frame) window.cancelAnimationFrame(frame);
|
|
506
|
+
};
|
|
507
|
+
}, []);
|
|
508
|
+
return jsxs("div", {
|
|
509
|
+
ref: rootRef,
|
|
510
|
+
className: "cbh-amb",
|
|
511
|
+
"aria-hidden": true,
|
|
512
|
+
children: [jsxs("div", {
|
|
513
|
+
ref: driftRef,
|
|
514
|
+
className: "cbh-amb-drift",
|
|
515
|
+
children: [jsx("span", {
|
|
516
|
+
className: "cbh-amb-blob cbh-amb-b1"
|
|
517
|
+
}), jsx("span", {
|
|
518
|
+
className: "cbh-amb-blob cbh-amb-b2"
|
|
519
|
+
}), jsx("span", {
|
|
520
|
+
className: "cbh-amb-blob cbh-amb-b3"
|
|
521
|
+
}), jsx("span", {
|
|
522
|
+
className: "cbh-amb-blob cbh-amb-b4"
|
|
523
|
+
})]
|
|
524
|
+
}), jsx("div", {
|
|
525
|
+
className: "cbh-amb-grid"
|
|
526
|
+
}), jsx("div", {
|
|
527
|
+
children: MOTES.map(([left, top, size, color, seconds, delay, wander]) => jsx("span", {
|
|
528
|
+
className: "cbh-amb-mote",
|
|
529
|
+
style: {
|
|
530
|
+
left,
|
|
531
|
+
top,
|
|
532
|
+
'--mz': `${size}px`,
|
|
533
|
+
'--mc': color,
|
|
534
|
+
'--md': `${seconds}s`,
|
|
535
|
+
'--mdl': `${delay}s`,
|
|
536
|
+
'--mdx': `${wander}px`
|
|
537
|
+
}
|
|
538
|
+
}, `${left}-${top}`))
|
|
539
|
+
}), jsx("div", {
|
|
540
|
+
ref: lightRef,
|
|
541
|
+
className: "cbh-amb-light"
|
|
542
|
+
})]
|
|
543
|
+
});
|
|
544
|
+
}
|
|
545
|
+
/**
|
|
546
|
+
* A number that counts up as it comes into view. The server draws the real number; it only starts
|
|
547
|
+
* from zero when it was still below the fold, and screen readers hear the real number throughout.
|
|
548
|
+
*/
|
|
549
|
+
function CountUp({
|
|
550
|
+
to,
|
|
551
|
+
decimals = 0
|
|
552
|
+
}) {
|
|
553
|
+
const ref = useRef(null);
|
|
554
|
+
const [value, setValue] = useState(to);
|
|
555
|
+
useEffect(() => {
|
|
556
|
+
const el = ref.current;
|
|
557
|
+
if (!el || typeof IntersectionObserver === 'undefined') return undefined;
|
|
558
|
+
if (window.matchMedia?.('(prefers-reduced-motion: reduce)').matches) return undefined;
|
|
559
|
+
if (el.getBoundingClientRect().top < window.innerHeight) return undefined;
|
|
560
|
+
setValue(0);
|
|
561
|
+
let frame = 0;
|
|
562
|
+
const io = new IntersectionObserver(([entry]) => {
|
|
563
|
+
if (!entry?.isIntersecting) return;
|
|
564
|
+
io.disconnect();
|
|
565
|
+
const start = performance.now();
|
|
566
|
+
const tick = now => {
|
|
567
|
+
const p = Math.min(1, (now - start) / COUNT_MS);
|
|
568
|
+
setValue(to * (1 - (1 - p) ** 3));
|
|
569
|
+
if (p < 1) frame = window.requestAnimationFrame(tick);
|
|
570
|
+
};
|
|
571
|
+
frame = window.requestAnimationFrame(tick);
|
|
572
|
+
}, {
|
|
573
|
+
threshold: 0.6
|
|
574
|
+
});
|
|
575
|
+
io.observe(el);
|
|
576
|
+
return () => {
|
|
577
|
+
io.disconnect();
|
|
578
|
+
if (frame) window.cancelAnimationFrame(frame);
|
|
579
|
+
};
|
|
580
|
+
}, [to]);
|
|
581
|
+
return jsxs(Fragment, {
|
|
582
|
+
children: [jsx("span", {
|
|
583
|
+
ref: ref,
|
|
584
|
+
"aria-hidden": true,
|
|
585
|
+
children: value.toFixed(decimals)
|
|
586
|
+
}), jsx("span", {
|
|
190
587
|
className: "cbh-visually-hidden",
|
|
191
|
-
children:
|
|
192
|
-
})
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
588
|
+
children: to.toFixed(decimals)
|
|
589
|
+
})]
|
|
590
|
+
});
|
|
591
|
+
}
|
|
592
|
+
/** Lucy on the phone, step by step - the reels' own internet-bill call, as it happens. */
|
|
593
|
+
function CallCard() {
|
|
594
|
+
const ref = useRef(null);
|
|
595
|
+
const motion = useMotion();
|
|
596
|
+
const inView = useInView(ref);
|
|
597
|
+
const done = useSequence(CALL_STEPS.length, motion, inView, CALL_STEP_MS, CALL_HOLD_MS);
|
|
598
|
+
const finished = done >= CALL_STEPS.length;
|
|
599
|
+
return jsxs("div", {
|
|
600
|
+
ref: ref,
|
|
601
|
+
className: "cbh-call",
|
|
602
|
+
role: "img",
|
|
603
|
+
"aria-label": "Illustration: Lucy calls an internet provider, gets through the phone menu, waits on hold, and comes back with a lower rate.",
|
|
604
|
+
children: [jsxs("p", {
|
|
605
|
+
className: "cbh-call-head",
|
|
606
|
+
"aria-hidden": true,
|
|
607
|
+
children: [jsx("span", {
|
|
608
|
+
className: "cbh-live"
|
|
609
|
+
}), finished ? 'Call finished' : 'Live call', jsx("em", {
|
|
610
|
+
children: "Lucy"
|
|
611
|
+
})]
|
|
612
|
+
}), jsx("ol", {
|
|
613
|
+
className: "cbh-call-steps",
|
|
614
|
+
"aria-hidden": true,
|
|
615
|
+
children: CALL_STEPS.map((s, i) => jsxs("li", {
|
|
616
|
+
className: "cbh-call-step",
|
|
617
|
+
"data-state": i < done ? 'done' : i === done ? 'now' : 'next',
|
|
618
|
+
children: [jsx("span", {
|
|
619
|
+
className: "cbh-call-dot",
|
|
620
|
+
children: i < done ? jsx(Check, {
|
|
621
|
+
size: 12,
|
|
622
|
+
strokeWidth: 3.2
|
|
623
|
+
}) : null
|
|
624
|
+
}), jsxs("span", {
|
|
625
|
+
children: [jsx("b", {
|
|
626
|
+
children: s.label
|
|
627
|
+
}), jsx("small", {
|
|
628
|
+
children: s.detail
|
|
629
|
+
})]
|
|
630
|
+
})]
|
|
631
|
+
}, s.label))
|
|
632
|
+
})]
|
|
633
|
+
});
|
|
634
|
+
}
|
|
635
|
+
/** An iMessage thread with Lucy that plays while it is on screen: drawn, not a transcript. */
|
|
636
|
+
function PhoneThread() {
|
|
637
|
+
const ref = useRef(null);
|
|
638
|
+
const motion = useMotion();
|
|
639
|
+
const inView = useInView(ref);
|
|
640
|
+
const [shown, setShown] = useState(TEXT_THREAD.length);
|
|
641
|
+
const [typing, setTyping] = useState(false);
|
|
642
|
+
const [round, setRound] = useState(0);
|
|
643
|
+
useEffect(() => {
|
|
644
|
+
setShown(motion ? 0 : TEXT_THREAD.length);
|
|
645
|
+
setTyping(false);
|
|
646
|
+
}, [motion]);
|
|
647
|
+
useEffect(() => {
|
|
648
|
+
if (!motion || !inView) return undefined;
|
|
649
|
+
const timers = [];
|
|
650
|
+
const at = (ms, run) => {
|
|
651
|
+
timers.push(window.setTimeout(run, ms));
|
|
652
|
+
};
|
|
653
|
+
let t = 0;
|
|
654
|
+
setShown(0);
|
|
655
|
+
setTyping(false);
|
|
656
|
+
TEXT_THREAD.forEach((line, i) => {
|
|
657
|
+
if (line.from === 'lucy') {
|
|
658
|
+
t += 600;
|
|
659
|
+
at(t, () => setTyping(true));
|
|
660
|
+
t += 1500;
|
|
661
|
+
at(t, () => {
|
|
662
|
+
setTyping(false);
|
|
663
|
+
setShown(i + 1);
|
|
664
|
+
});
|
|
665
|
+
} else {
|
|
666
|
+
t += i === 0 ? 400 : 1400;
|
|
667
|
+
at(t, () => setShown(i + 1));
|
|
668
|
+
}
|
|
669
|
+
});
|
|
670
|
+
at(t + 5000, () => setRound(r => r + 1));
|
|
671
|
+
return () => timers.forEach(id => window.clearTimeout(id));
|
|
672
|
+
}, [motion, inView, round]);
|
|
673
|
+
return jsx("div", {
|
|
674
|
+
ref: ref,
|
|
675
|
+
className: "cbh-phone",
|
|
676
|
+
role: "img",
|
|
677
|
+
"aria-label": `An illustrative iMessage thread with Lucy. ${TEXT_THREAD.map(m => m.text).join(' ')}`,
|
|
678
|
+
children: jsxs("div", {
|
|
679
|
+
className: "cbh-phone-screen",
|
|
680
|
+
"aria-hidden": true,
|
|
681
|
+
children: [jsx("span", {
|
|
682
|
+
className: "cbh-phone-island"
|
|
683
|
+
}), jsxs("div", {
|
|
684
|
+
className: "cbh-phone-head",
|
|
685
|
+
children: [jsx("span", {
|
|
686
|
+
className: "cbh-phone-avatar",
|
|
687
|
+
children: jsx(Mark, {
|
|
688
|
+
size: 26
|
|
689
|
+
})
|
|
690
|
+
}), jsx("span", {
|
|
691
|
+
className: "cbh-phone-name",
|
|
692
|
+
children: "Lucy"
|
|
693
|
+
})]
|
|
694
|
+
}), jsxs("div", {
|
|
695
|
+
className: "cbh-thread",
|
|
696
|
+
children: [jsx("span", {
|
|
697
|
+
className: "cbh-thread-day",
|
|
698
|
+
children: "iMessage \u00B7 Today"
|
|
699
|
+
}), TEXT_THREAD.slice(0, shown).map(m => jsx("p", {
|
|
700
|
+
className: "cbh-bubble",
|
|
701
|
+
"data-from": m.from,
|
|
702
|
+
children: m.text
|
|
703
|
+
}, m.text)), typing ? jsxs("span", {
|
|
704
|
+
className: "cbh-typing",
|
|
705
|
+
children: [jsx("i", {}), jsx("i", {}), jsx("i", {})]
|
|
706
|
+
}) : null]
|
|
707
|
+
}), jsxs("div", {
|
|
708
|
+
className: "cbh-phone-input",
|
|
709
|
+
children: ["iMessage", jsx("span", {
|
|
710
|
+
children: jsx(ArrowUp, {
|
|
711
|
+
size: 16,
|
|
712
|
+
strokeWidth: 2.6
|
|
713
|
+
})
|
|
714
|
+
})]
|
|
715
|
+
})]
|
|
716
|
+
})
|
|
717
|
+
});
|
|
718
|
+
}
|
|
719
|
+
/** A timer that has been running a while: it counts on while the card is on screen. */
|
|
720
|
+
const TIMER_START_S = 2 * 3600 + 14 * 60 + 36;
|
|
721
|
+
/** This week's hours, Monday to Friday; Thursday is today, still running. */
|
|
722
|
+
const WEEK_HOURS = [['Mon', 7.5], ['Tue', 8.2], ['Wed', 6.4], ['Thu', 4.6], ['Fri', 0]];
|
|
723
|
+
const WEEK_TODAY = 3;
|
|
724
|
+
function TimePreview() {
|
|
725
|
+
const ref = useRef(null);
|
|
726
|
+
const motion = useMotion();
|
|
727
|
+
const inView = useInView(ref);
|
|
728
|
+
const [seconds, setSeconds] = useState(TIMER_START_S);
|
|
729
|
+
useEffect(() => {
|
|
730
|
+
if (!motion || !inView) return undefined;
|
|
731
|
+
const timer = window.setInterval(() => setSeconds(s => s + 1), 1000);
|
|
732
|
+
return () => window.clearInterval(timer);
|
|
733
|
+
}, [motion, inView]);
|
|
734
|
+
const pad = n => String(n).padStart(2, '0');
|
|
735
|
+
const clock = `${pad(Math.floor(seconds / 3600))}:${pad(Math.floor(seconds / 60) % 60)}:${pad(seconds % 60)}`;
|
|
736
|
+
return jsxs("div", {
|
|
737
|
+
ref: ref,
|
|
738
|
+
className: "cbh-biz-ui",
|
|
739
|
+
"aria-hidden": true,
|
|
740
|
+
children: [jsxs("div", {
|
|
741
|
+
className: "cbh-biz-timer",
|
|
742
|
+
children: [jsx("span", {
|
|
743
|
+
className: "cbh-biz-rec"
|
|
744
|
+
}), jsx("span", {
|
|
745
|
+
className: "cbh-biz-timer-name",
|
|
746
|
+
children: "Website redesign"
|
|
747
|
+
}), jsx("b", {
|
|
748
|
+
children: clock
|
|
749
|
+
}), jsx("span", {
|
|
750
|
+
className: "cbh-biz-stop",
|
|
751
|
+
children: jsx(Square, {
|
|
752
|
+
size: 8,
|
|
753
|
+
fill: "currentColor",
|
|
754
|
+
strokeWidth: 0
|
|
755
|
+
})
|
|
756
|
+
})]
|
|
757
|
+
}), jsx("div", {
|
|
758
|
+
className: "cbh-biz-week",
|
|
759
|
+
children: WEEK_HOURS.map(([day, hours], i) => jsxs("span", {
|
|
760
|
+
"data-today": i === WEEK_TODAY || undefined,
|
|
761
|
+
children: [jsx("b", {
|
|
762
|
+
children: jsx("i", {
|
|
763
|
+
style: {
|
|
764
|
+
'--h': hours / 9,
|
|
765
|
+
'--cbh-i': i
|
|
766
|
+
}
|
|
767
|
+
})
|
|
768
|
+
}), day]
|
|
769
|
+
}, day))
|
|
770
|
+
})]
|
|
771
|
+
});
|
|
772
|
+
}
|
|
773
|
+
function PeoplePreview() {
|
|
774
|
+
return jsxs("div", {
|
|
775
|
+
className: "cbh-biz-ui",
|
|
776
|
+
"aria-hidden": true,
|
|
777
|
+
children: [jsxs("div", {
|
|
778
|
+
className: "cbh-biz-person",
|
|
779
|
+
children: [jsx("span", {
|
|
780
|
+
className: "cbh-biz-avatar",
|
|
781
|
+
children: "PS"
|
|
782
|
+
}), jsxs("span", {
|
|
783
|
+
children: [jsx("b", {
|
|
784
|
+
children: "Priya S. \u00B7 Time off"
|
|
785
|
+
}), jsx("small", {
|
|
786
|
+
children: "Apr 14 \u2013 16 \u00B7 3 days"
|
|
787
|
+
})]
|
|
788
|
+
})]
|
|
203
789
|
}), jsxs("div", {
|
|
204
|
-
className: "cbh-
|
|
790
|
+
className: "cbh-biz-actions",
|
|
791
|
+
children: [jsx("span", {
|
|
792
|
+
className: "cbh-biz-btn",
|
|
793
|
+
children: "Decline"
|
|
794
|
+
}), jsxs("span", {
|
|
795
|
+
className: "cbh-biz-btn cbh-biz-btn-ink",
|
|
796
|
+
children: [jsx(Check, {
|
|
797
|
+
size: 12,
|
|
798
|
+
strokeWidth: 3
|
|
799
|
+
}), "Approve"]
|
|
800
|
+
})]
|
|
801
|
+
}), jsxs("p", {
|
|
802
|
+
className: "cbh-biz-hint",
|
|
803
|
+
children: [jsx(Sparkles, {
|
|
804
|
+
size: 12
|
|
805
|
+
}), "You usually approve these"]
|
|
806
|
+
})]
|
|
807
|
+
});
|
|
808
|
+
}
|
|
809
|
+
const LEDGER = [['Harbor Studio', 'INV-1042', '$2,480', 'Paid', 'ok'], ['Fernwood Co.', 'INV-1043', '$960', 'Due Friday', 'due'], ['Payroll', 'October', '$18,240', 'Scheduled', 'info']];
|
|
810
|
+
function BooksPreview() {
|
|
811
|
+
return jsx("div", {
|
|
812
|
+
className: "cbh-biz-ui cbh-biz-ledger",
|
|
813
|
+
"aria-hidden": true,
|
|
814
|
+
children: LEDGER.map(([who, ref, amount, status, tone]) => jsxs("div", {
|
|
815
|
+
className: "cbh-biz-line",
|
|
205
816
|
children: [jsxs("span", {
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
})
|
|
211
|
-
}),
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
817
|
+
children: [jsx("b", {
|
|
818
|
+
children: who
|
|
819
|
+
}), jsx("small", {
|
|
820
|
+
children: ref
|
|
821
|
+
})]
|
|
822
|
+
}), jsxs("span", {
|
|
823
|
+
children: [jsx("b", {
|
|
824
|
+
children: amount
|
|
825
|
+
}), jsx("em", {
|
|
826
|
+
className: "cbh-biz-pill",
|
|
827
|
+
"data-tone": tone,
|
|
828
|
+
children: status
|
|
829
|
+
})]
|
|
830
|
+
})]
|
|
831
|
+
}, ref))
|
|
832
|
+
});
|
|
833
|
+
}
|
|
834
|
+
const FLOW = [['New hire', UserPlus], ['Create accounts', KeyRound], ['Sign-off', ShieldCheck, 'Needs you']];
|
|
835
|
+
function WorkflowPreview() {
|
|
836
|
+
return jsx("div", {
|
|
837
|
+
className: "cbh-biz-ui cbh-biz-flow",
|
|
838
|
+
"aria-hidden": true,
|
|
839
|
+
children: FLOW.map(([label, Icon, flag], i) => jsxs("div", {
|
|
840
|
+
className: "cbh-biz-node",
|
|
841
|
+
style: {
|
|
842
|
+
'--cbh-i': i
|
|
843
|
+
},
|
|
844
|
+
children: [jsx("span", {
|
|
845
|
+
className: "cbh-biz-node-icon",
|
|
846
|
+
children: jsx(Icon, {
|
|
847
|
+
size: 13
|
|
220
848
|
})
|
|
849
|
+
}), jsx("span", {
|
|
850
|
+
children: label
|
|
851
|
+
}), flag ? jsx("em", {
|
|
852
|
+
children: flag
|
|
853
|
+
}) : null]
|
|
854
|
+
}, label))
|
|
855
|
+
});
|
|
856
|
+
}
|
|
857
|
+
const BUSINESS_PREVIEWS = {
|
|
858
|
+
time: TimePreview,
|
|
859
|
+
hr: PeoplePreview,
|
|
860
|
+
books: BooksPreview,
|
|
861
|
+
workflows: WorkflowPreview
|
|
862
|
+
};
|
|
863
|
+
/**
|
|
864
|
+
* A product of Clockbook for business, the way runable.com shows its stories: a warm card, a tag,
|
|
865
|
+
* one line in the serif, and a small working picture of the product in a white panel. The
|
|
866
|
+
* picture is illustration only; the words carry the card for assistive tech.
|
|
867
|
+
*/
|
|
868
|
+
function BusinessCard({
|
|
869
|
+
product,
|
|
870
|
+
index
|
|
871
|
+
}) {
|
|
872
|
+
const Icon = BUSINESS_ICONS[product.key];
|
|
873
|
+
const Preview = BUSINESS_PREVIEWS[product.key];
|
|
874
|
+
return jsxs("a", {
|
|
875
|
+
className: "cbh-biz-card cbh-reveal",
|
|
876
|
+
href: businessHref(product.path),
|
|
877
|
+
"data-track": "business_product",
|
|
878
|
+
"data-track-item": product.key,
|
|
879
|
+
style: {
|
|
880
|
+
'--cbh-i': index
|
|
881
|
+
},
|
|
882
|
+
children: [jsxs("span", {
|
|
883
|
+
className: "cbh-biz-tag",
|
|
884
|
+
children: [jsx(Icon, {
|
|
885
|
+
size: 14,
|
|
886
|
+
"aria-hidden": true
|
|
887
|
+
}), product.title]
|
|
888
|
+
}), jsx("h3", {
|
|
889
|
+
className: "cbh-biz-title",
|
|
890
|
+
children: product.headline
|
|
891
|
+
}), jsx("p", {
|
|
892
|
+
className: "cbh-biz-blurb",
|
|
893
|
+
children: product.blurb
|
|
894
|
+
}), jsx(Preview, {}), jsxs("span", {
|
|
895
|
+
className: "cbh-business-more",
|
|
896
|
+
children: ["Learn more ", jsx(ArrowRight, {
|
|
897
|
+
size: 16,
|
|
898
|
+
"aria-hidden": true
|
|
221
899
|
})]
|
|
222
900
|
})]
|
|
223
901
|
});
|
|
224
902
|
}
|
|
225
|
-
/**
|
|
903
|
+
/** "Text Lucy on iMessage", where the composer is: the other way to hand a chore over. */
|
|
904
|
+
function ImessagePill({
|
|
905
|
+
onText,
|
|
906
|
+
onWarm
|
|
907
|
+
}) {
|
|
908
|
+
return jsxs("button", {
|
|
909
|
+
type: "button",
|
|
910
|
+
className: "cbh-imsg-pill",
|
|
911
|
+
"data-track": "text_on_imessage",
|
|
912
|
+
onClick: onText,
|
|
913
|
+
onPointerEnter: onWarm,
|
|
914
|
+
onFocus: onWarm,
|
|
915
|
+
"aria-haspopup": "dialog",
|
|
916
|
+
children: [jsx(ImessageIcon, {
|
|
917
|
+
size: 24
|
|
918
|
+
}), "Text Lucy on iMessage", jsx(ArrowRight, {
|
|
919
|
+
size: 15,
|
|
920
|
+
className: "cbh-arrow",
|
|
921
|
+
"aria-hidden": true
|
|
922
|
+
})]
|
|
923
|
+
});
|
|
924
|
+
}
|
|
925
|
+
/** Sign in before the chore runs (or the text goes). It waits in this tab and goes out when they are back. */
|
|
226
926
|
function SignInDialog({
|
|
227
927
|
chore,
|
|
228
928
|
expired,
|
|
929
|
+
purpose = 'chore',
|
|
229
930
|
onContinue,
|
|
230
931
|
onCancel
|
|
231
932
|
}) {
|
|
@@ -238,7 +939,9 @@ function SignInDialog({
|
|
|
238
939
|
document.addEventListener('keydown', onKey);
|
|
239
940
|
return () => document.removeEventListener('keydown', onKey);
|
|
240
941
|
}, [onCancel]);
|
|
241
|
-
const
|
|
942
|
+
const texting = purpose === 'imessage';
|
|
943
|
+
const title = expired ? 'Sign in again to carry on' : texting ? 'Sign in to text Lucy' : chore ? 'Sign in to hand it over' : 'Sign in to Clockbook';
|
|
944
|
+
const body = expired ? texting ? 'Your sign-in ran out. Sign in again, and Messages opens with your text to Lucy.' : 'Your sign-in ran out. Sign in and Lucy picks this up again.' : texting ? 'Sign in or create an account, and Messages opens with a text to Lucy ready to send.' : chore ? 'Sign in or create an account, and Lucy starts on this as soon as you are back.' : 'Sign in or create an account to hand your chores to Lucy.';
|
|
242
945
|
return jsx("div", {
|
|
243
946
|
className: "cbh-dialog-backdrop",
|
|
244
947
|
onClick: e => e.target === e.currentTarget && onCancel(),
|
|
@@ -247,11 +950,23 @@ function SignInDialog({
|
|
|
247
950
|
role: "dialog",
|
|
248
951
|
"aria-modal": "true",
|
|
249
952
|
"aria-labelledby": "cbh-dialog-title",
|
|
250
|
-
children: [jsx("
|
|
953
|
+
children: [jsx("button", {
|
|
954
|
+
type: "button",
|
|
955
|
+
className: "cbh-dialog-x",
|
|
956
|
+
"data-track": "sign_in_cancel",
|
|
957
|
+
onClick: onCancel,
|
|
958
|
+
"aria-label": "Close",
|
|
959
|
+
children: jsx(X, {
|
|
960
|
+
size: 18,
|
|
961
|
+
"aria-hidden": true
|
|
962
|
+
})
|
|
963
|
+
}), jsx("span", {
|
|
251
964
|
className: "cbh-dialog-mark",
|
|
252
965
|
"aria-hidden": true,
|
|
253
|
-
children: jsx(
|
|
254
|
-
size:
|
|
966
|
+
children: texting ? jsx(ImessageIcon, {
|
|
967
|
+
size: 48
|
|
968
|
+
}) : jsx(Mark, {
|
|
969
|
+
size: 46
|
|
255
970
|
})
|
|
256
971
|
}), jsx("h2", {
|
|
257
972
|
id: "cbh-dialog-title",
|
|
@@ -262,11 +977,12 @@ function SignInDialog({
|
|
|
262
977
|
children: ["\u201C", chore, "\u201D"]
|
|
263
978
|
}) : null, jsx("p", {
|
|
264
979
|
className: "cbh-dialog-body",
|
|
265
|
-
children:
|
|
980
|
+
children: body
|
|
266
981
|
}), jsxs("button", {
|
|
267
982
|
ref: continueRef,
|
|
268
983
|
type: "button",
|
|
269
984
|
className: "cbh-btn",
|
|
985
|
+
"data-track": "sign_in_continue",
|
|
270
986
|
onClick: onContinue,
|
|
271
987
|
children: ["Continue to sign in", jsx(ArrowRight, {
|
|
272
988
|
size: 18,
|
|
@@ -275,6 +991,7 @@ function SignInDialog({
|
|
|
275
991
|
}), jsx("button", {
|
|
276
992
|
type: "button",
|
|
277
993
|
className: "cbh-dialog-cancel",
|
|
994
|
+
"data-track": "sign_in_cancel",
|
|
278
995
|
onClick: onCancel,
|
|
279
996
|
children: "Not now"
|
|
280
997
|
}), jsx("p", {
|
|
@@ -291,13 +1008,21 @@ const CHAT_CLOSED = {
|
|
|
291
1008
|
};
|
|
292
1009
|
function HomePage() {
|
|
293
1010
|
const totalMin = MINUTES.reduce((sum, m) => sum + m.min, 0);
|
|
1011
|
+
const rootRef = useRef(null);
|
|
1012
|
+
const motion = useMotion();
|
|
1013
|
+
useReveal(rootRef, motion);
|
|
294
1014
|
const [signedIn, setSignedIn] = useState(false);
|
|
1015
|
+
const [scrolled, setScrolled] = useState(false);
|
|
295
1016
|
const [chat, setChat] = useState(CHAT_CLOSED);
|
|
296
1017
|
const [signIn, setSignIn] = useState(null);
|
|
1018
|
+
const [texting, setTexting] = useState(null);
|
|
297
1019
|
const heroFieldRef = useRef(null);
|
|
298
1020
|
const warmChat = useCallback(() => {
|
|
299
1021
|
void loadChat();
|
|
300
1022
|
}, []);
|
|
1023
|
+
const warmImessage = useCallback(() => {
|
|
1024
|
+
void loadImessage();
|
|
1025
|
+
}, []);
|
|
301
1026
|
const openChat = useCallback(chore => {
|
|
302
1027
|
const text = chore.trim();
|
|
303
1028
|
setChat(c => ({
|
|
@@ -326,25 +1051,63 @@ function HomePage() {
|
|
|
326
1051
|
}
|
|
327
1052
|
}, []);
|
|
328
1053
|
/** Every chore on the page lands here: the page's chat, sign-in first, or the app as a last resort. */
|
|
329
|
-
const handOver = useCallback(chore => {
|
|
1054
|
+
const handOver = useCallback((chore, from) => {
|
|
330
1055
|
ensurePlatformAnchor();
|
|
331
|
-
|
|
1056
|
+
const live = hasLiveToken();
|
|
1057
|
+
const login = !live && canLogin();
|
|
1058
|
+
emitAnalyticsEvent('chore_handover', {
|
|
1059
|
+
method: from.method,
|
|
1060
|
+
placement: from.placement,
|
|
1061
|
+
chore: from.chip,
|
|
1062
|
+
next: live ? 'chat' : login ? 'sign_in' : 'app'
|
|
1063
|
+
});
|
|
1064
|
+
if (live) openChat(chore);else if (login) setSignIn({
|
|
332
1065
|
chore: chore.trim()
|
|
333
1066
|
});else window.location.assign(appChatLink(chore));
|
|
334
1067
|
}, [openChat]);
|
|
1068
|
+
const handOverChip = placement => chore => handOver(chore.prompt, {
|
|
1069
|
+
method: 'chip',
|
|
1070
|
+
placement,
|
|
1071
|
+
chip: chore.label
|
|
1072
|
+
});
|
|
1073
|
+
const handOverTyped = placement => text => handOver(text, {
|
|
1074
|
+
method: 'typed',
|
|
1075
|
+
placement
|
|
1076
|
+
});
|
|
1077
|
+
/** Every "Text Lucy on iMessage" lands here: the dialog, sign-in first, or the app's own onboarding. */
|
|
1078
|
+
const textLucy = useCallback(message => {
|
|
1079
|
+
ensurePlatformAnchor();
|
|
1080
|
+
void loadImessage();
|
|
1081
|
+
if (hasLiveToken()) setTexting({
|
|
1082
|
+
message
|
|
1083
|
+
});else if (canLogin()) setSignIn({
|
|
1084
|
+
chore: '',
|
|
1085
|
+
purpose: 'imessage'
|
|
1086
|
+
});else window.location.assign(appTextingLink());
|
|
1087
|
+
}, []);
|
|
1088
|
+
const textFromChat = useCallback(() => textLucy(), [textLucy]);
|
|
335
1089
|
const continueSignIn = useCallback(() => {
|
|
336
1090
|
ensurePlatformAnchor();
|
|
337
|
-
|
|
1091
|
+
emitAnalyticsEvent('sign_in_start', {
|
|
1092
|
+
with_chore: !!signIn?.chore,
|
|
1093
|
+
expired: !!signIn?.expired,
|
|
1094
|
+
for_imessage: signIn?.purpose === 'imessage'
|
|
1095
|
+
});
|
|
1096
|
+
if (signIn?.purpose === 'imessage') savePendingImessage();else savePendingChore(signIn?.chore ?? '');
|
|
338
1097
|
beginLogin('clockbook-home');
|
|
339
1098
|
}, [signIn]);
|
|
340
|
-
// Back from sign-in: keep the token it brought, and send
|
|
1099
|
+
// Back from sign-in: keep the token it brought, and send what waited for it.
|
|
341
1100
|
useEffect(() => {
|
|
342
1101
|
ensurePlatformAnchor();
|
|
343
|
-
captureLoginCallback()
|
|
1102
|
+
if (captureLoginCallback()) emitAnalyticsEvent('login', {
|
|
1103
|
+
method: 'yantra'
|
|
1104
|
+
});
|
|
344
1105
|
const live = hasLiveToken();
|
|
345
1106
|
setSignedIn(live);
|
|
346
1107
|
const pending = takePendingChore();
|
|
1108
|
+
const pendingText = takePendingImessage();
|
|
347
1109
|
if (live && pending) openChat(pending);else if (live && window.location.hash === CHAT_HASH) openChat('');else if (window.location.hash === CHAT_HASH) window.history.replaceState(null, '', window.location.pathname + window.location.search);
|
|
1110
|
+
if (live && pendingText) setTexting({});
|
|
348
1111
|
// Where the page shares the app's session cookie (a cdebase.dev host next to the dev app),
|
|
349
1112
|
// a token left by another account is dropped here. On clockbook.com there is no session to
|
|
350
1113
|
// compare with, and the token stays until it is refused or the visitor signs out.
|
|
@@ -352,6 +1115,7 @@ function HomePage() {
|
|
|
352
1115
|
void reconcileStoredToken().then(verdict => {
|
|
353
1116
|
if (!live2 || verdict !== 'dropped') return;
|
|
354
1117
|
setSignedIn(false);
|
|
1118
|
+
setTexting(null);
|
|
355
1119
|
endChat();
|
|
356
1120
|
});
|
|
357
1121
|
return () => {
|
|
@@ -371,6 +1135,15 @@ function HomePage() {
|
|
|
371
1135
|
window.addEventListener('popstate', onPop);
|
|
372
1136
|
return () => window.removeEventListener('popstate', onPop);
|
|
373
1137
|
}, []);
|
|
1138
|
+
// The nav turns to frosted glass once the page moves under it.
|
|
1139
|
+
useEffect(() => {
|
|
1140
|
+
const onScroll = () => setScrolled(window.scrollY > 8);
|
|
1141
|
+
onScroll();
|
|
1142
|
+
window.addEventListener('scroll', onScroll, {
|
|
1143
|
+
passive: true
|
|
1144
|
+
});
|
|
1145
|
+
return () => window.removeEventListener('scroll', onScroll);
|
|
1146
|
+
}, []);
|
|
374
1147
|
// The landing does not scroll behind the open chat.
|
|
375
1148
|
useEffect(() => {
|
|
376
1149
|
if (!chat.open) return;
|
|
@@ -382,7 +1155,9 @@ function HomePage() {
|
|
|
382
1155
|
};
|
|
383
1156
|
}, [chat.open]);
|
|
384
1157
|
const onSignedOut = useCallback(() => {
|
|
1158
|
+
clearTextLinkCodes();
|
|
385
1159
|
setSignedIn(false);
|
|
1160
|
+
setTexting(null);
|
|
386
1161
|
endChat();
|
|
387
1162
|
}, [endChat]);
|
|
388
1163
|
const onSessionExpired = useCallback(chore => {
|
|
@@ -394,6 +1169,24 @@ function HomePage() {
|
|
|
394
1169
|
expired: true
|
|
395
1170
|
});
|
|
396
1171
|
}, [endChat]);
|
|
1172
|
+
const closeTexting = useCallback(() => setTexting(null), []);
|
|
1173
|
+
const textingChatHere = useCallback(() => {
|
|
1174
|
+
setTexting(null);
|
|
1175
|
+
openChat('');
|
|
1176
|
+
}, [openChat]);
|
|
1177
|
+
// The platform refused the sign-in while the dialog asked for the link: sign in again, then back to it.
|
|
1178
|
+
const textingSignedOut = useCallback(() => {
|
|
1179
|
+
clearCdecliToken();
|
|
1180
|
+
clearTextLinkCodes();
|
|
1181
|
+
setTexting(null);
|
|
1182
|
+
setSignedIn(false);
|
|
1183
|
+
endChat();
|
|
1184
|
+
setSignIn({
|
|
1185
|
+
chore: '',
|
|
1186
|
+
expired: true,
|
|
1187
|
+
purpose: 'imessage'
|
|
1188
|
+
});
|
|
1189
|
+
}, [endChat]);
|
|
397
1190
|
const tryIt = () => {
|
|
398
1191
|
if (signedIn) {
|
|
399
1192
|
openChat('');
|
|
@@ -409,14 +1202,18 @@ function HomePage() {
|
|
|
409
1202
|
};
|
|
410
1203
|
return jsxs("div", {
|
|
411
1204
|
className: "cbh",
|
|
1205
|
+
ref: rootRef,
|
|
412
1206
|
children: [jsx(HomeStyles, {}), jsx("header", {
|
|
413
1207
|
className: "cbh-nav",
|
|
1208
|
+
"data-track-section": "nav",
|
|
1209
|
+
"data-scrolled": scrolled || undefined,
|
|
414
1210
|
children: jsxs("div", {
|
|
415
1211
|
className: "cbh-wrap cbh-nav-row",
|
|
416
1212
|
children: [jsxs("a", {
|
|
417
1213
|
className: "cbh-brand",
|
|
418
1214
|
href: "#top",
|
|
419
1215
|
"aria-label": "Clockbook home",
|
|
1216
|
+
"data-track": "logo",
|
|
420
1217
|
children: [jsx(Mark, {
|
|
421
1218
|
size: 30
|
|
422
1219
|
}), jsx("span", {
|
|
@@ -428,6 +1225,9 @@ function HomePage() {
|
|
|
428
1225
|
children: [jsx("a", {
|
|
429
1226
|
href: "#calls",
|
|
430
1227
|
children: "Lucy calls"
|
|
1228
|
+
}), jsx("a", {
|
|
1229
|
+
href: "#imessage",
|
|
1230
|
+
children: "iMessage"
|
|
431
1231
|
}), jsx("a", {
|
|
432
1232
|
href: "#areas",
|
|
433
1233
|
children: "What it handles"
|
|
@@ -447,6 +1247,7 @@ function HomePage() {
|
|
|
447
1247
|
children: [signedIn ? null : jsx("button", {
|
|
448
1248
|
type: "button",
|
|
449
1249
|
className: "cbh-signin",
|
|
1250
|
+
"data-track": "sign_in",
|
|
450
1251
|
onClick: () => setSignIn({
|
|
451
1252
|
chore: ''
|
|
452
1253
|
}),
|
|
@@ -454,82 +1255,132 @@ function HomePage() {
|
|
|
454
1255
|
}), jsx("button", {
|
|
455
1256
|
type: "button",
|
|
456
1257
|
className: "cbh-btn cbh-btn-small",
|
|
1258
|
+
"data-track": signedIn ? 'open_chat' : 'try_it',
|
|
457
1259
|
onClick: tryIt,
|
|
458
1260
|
children: signedIn ? 'Open chat' : 'Try it'
|
|
459
1261
|
})]
|
|
460
1262
|
})]
|
|
461
1263
|
})
|
|
462
1264
|
}), jsxs("main", {
|
|
463
|
-
children: [
|
|
1265
|
+
children: [jsxs("section", {
|
|
464
1266
|
className: "cbh-hero",
|
|
465
1267
|
id: "top",
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
children:
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
1268
|
+
"data-track-section": "hero",
|
|
1269
|
+
children: [jsx(Ambient, {}), jsxs("div", {
|
|
1270
|
+
className: "cbh-wrap cbh-hero-inner",
|
|
1271
|
+
children: [jsx("div", {
|
|
1272
|
+
className: "cbh-halo-mark cbh-rise",
|
|
1273
|
+
"aria-hidden": true,
|
|
1274
|
+
children: jsx("span", {
|
|
1275
|
+
className: "cbh-halo-tile",
|
|
1276
|
+
children: jsx(AnimatedMark, {})
|
|
1277
|
+
})
|
|
1278
|
+
}), jsx("p", {
|
|
1279
|
+
className: "cbh-eyebrow cbh-rise cbh-d1",
|
|
1280
|
+
children: "For busy households"
|
|
1281
|
+
}), jsxs("h1", {
|
|
1282
|
+
className: "cbh-rise cbh-d2",
|
|
1283
|
+
children: ["Get your evenings ", jsx("em", {
|
|
1284
|
+
children: "back."
|
|
1285
|
+
})]
|
|
1286
|
+
}), jsxs("p", {
|
|
1287
|
+
className: "cbh-lead cbh-rise cbh-d3",
|
|
1288
|
+
children: ["Clockbook takes the life admin off your plate: the calls, the bills, the cancellations, the groceries and the appointments. About 38 minutes back, every day.", jsx("sup", {
|
|
1289
|
+
children: "1"
|
|
1290
|
+
})]
|
|
1291
|
+
}), jsx("div", {
|
|
1292
|
+
className: "cbh-rise cbh-d4",
|
|
1293
|
+
children: jsx(Composer, {
|
|
483
1294
|
id: "cbh-chore-hero",
|
|
484
|
-
|
|
1295
|
+
typed: TYPED_CHORES,
|
|
1296
|
+
onSubmit: handOverTyped('hero'),
|
|
485
1297
|
onWarm: warmChat,
|
|
486
1298
|
inputRef: heroFieldRef
|
|
487
|
-
}), jsxs("div", {
|
|
488
|
-
className: "cbh-try",
|
|
489
|
-
children: [jsx("span", {
|
|
490
|
-
className: "cbh-try-label",
|
|
491
|
-
children: "Or try one"
|
|
492
|
-
}), jsx("div", {
|
|
493
|
-
className: "cbh-chips",
|
|
494
|
-
children: HERO_CHORES.map(c => jsx(ChoreChip, {
|
|
495
|
-
chore: c,
|
|
496
|
-
onChore: handOver
|
|
497
|
-
}, c.label))
|
|
498
|
-
})]
|
|
499
|
-
})]
|
|
500
|
-
}), jsx("div", {
|
|
501
|
-
className: "cbh-hero-media",
|
|
502
|
-
children: jsx(Loop, {
|
|
503
|
-
src: HOME_ASSETS.loopTimeBack,
|
|
504
|
-
poster: HOME_ASSETS.loopTimeBackPoster,
|
|
505
|
-
label: "The Clockbook clock rewinds: 38 minutes a day, 4.4 hours a week, 229 hours a year"
|
|
506
1299
|
})
|
|
507
|
-
})]
|
|
508
|
-
})
|
|
509
|
-
}), jsx("section", {
|
|
510
|
-
className: "cbh-band",
|
|
511
|
-
"aria-label": "Time back",
|
|
512
|
-
children: jsxs("div", {
|
|
513
|
-
className: "cbh-wrap cbh-stats",
|
|
514
|
-
children: [jsxs("div", {
|
|
515
|
-
children: [jsx("b", {
|
|
516
|
-
children: "38 min"
|
|
517
|
-
}), jsx("span", {
|
|
518
|
-
children: "back, every day"
|
|
519
|
-
})]
|
|
520
1300
|
}), jsxs("div", {
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
1301
|
+
className: "cbh-try cbh-rise cbh-d5",
|
|
1302
|
+
role: "group",
|
|
1303
|
+
"aria-label": "Try a chore",
|
|
1304
|
+
children: [jsx("span", {
|
|
1305
|
+
className: "cbh-try-label",
|
|
1306
|
+
children: "Try"
|
|
1307
|
+
}), HERO_CHORES.slice(0, 5).map(c => jsx(ChoreChip, {
|
|
1308
|
+
chore: c,
|
|
1309
|
+
onChore: handOverChip('hero')
|
|
1310
|
+
}, c.label))]
|
|
526
1311
|
}), jsxs("div", {
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
1312
|
+
className: "cbh-channels cbh-rise cbh-d6",
|
|
1313
|
+
children: [jsx(ImessagePill, {
|
|
1314
|
+
onText: () => textLucy(),
|
|
1315
|
+
onWarm: warmImessage
|
|
1316
|
+
}), jsxs("span", {
|
|
1317
|
+
className: "cbh-trust",
|
|
1318
|
+
children: [jsx(ShieldCheck, {
|
|
1319
|
+
size: 16,
|
|
1320
|
+
"aria-hidden": true
|
|
1321
|
+
}), "Nothing is paid or changed without your yes"]
|
|
531
1322
|
})]
|
|
532
1323
|
})]
|
|
1324
|
+
})]
|
|
1325
|
+
}), jsxs("section", {
|
|
1326
|
+
className: "cbh-strip",
|
|
1327
|
+
"aria-label": "More chores to hand over",
|
|
1328
|
+
"data-track-section": "strip",
|
|
1329
|
+
children: [jsx(Marquee, {
|
|
1330
|
+
chores: STRIP_CHORES.slice(0, 11),
|
|
1331
|
+
onChore: handOverChip('strip')
|
|
1332
|
+
}), jsx(Marquee, {
|
|
1333
|
+
chores: STRIP_CHORES.slice(11),
|
|
1334
|
+
onChore: handOverChip('strip'),
|
|
1335
|
+
reverse: true
|
|
1336
|
+
})]
|
|
1337
|
+
}), jsx("section", {
|
|
1338
|
+
className: "cbh-section cbh-time-section",
|
|
1339
|
+
"aria-labelledby": "cbh-time-title",
|
|
1340
|
+
children: jsx("div", {
|
|
1341
|
+
className: "cbh-wrap",
|
|
1342
|
+
children: jsxs("div", {
|
|
1343
|
+
className: "cbh-time-card cbh-reveal",
|
|
1344
|
+
children: [jsx("div", {
|
|
1345
|
+
className: "cbh-time-media",
|
|
1346
|
+
children: jsx(Loop, {
|
|
1347
|
+
src: HOME_ASSETS.loopTimeBack,
|
|
1348
|
+
poster: HOME_ASSETS.loopTimeBackPoster,
|
|
1349
|
+
label: "The Clockbook clock rewinds: 38 minutes a day, 4.4 hours a week, 229 hours a year"
|
|
1350
|
+
})
|
|
1351
|
+
}), jsxs("div", {
|
|
1352
|
+
className: "cbh-time-copy",
|
|
1353
|
+
children: [jsx("p", {
|
|
1354
|
+
className: "cbh-eyebrow",
|
|
1355
|
+
children: "Time back"
|
|
1356
|
+
}), jsxs("h2", {
|
|
1357
|
+
id: "cbh-time-title",
|
|
1358
|
+
children: ["After work, sleep and chores, the evening is ", jsx("em", {
|
|
1359
|
+
children: "short."
|
|
1360
|
+
})]
|
|
1361
|
+
}), jsx("ul", {
|
|
1362
|
+
className: "cbh-stats",
|
|
1363
|
+
children: STATS.map(s => jsxs("li", {
|
|
1364
|
+
className: "cbh-stat",
|
|
1365
|
+
children: [jsxs("b", {
|
|
1366
|
+
children: [jsx(CountUp, {
|
|
1367
|
+
to: s.to,
|
|
1368
|
+
decimals: s.decimals
|
|
1369
|
+
}), jsxs("small", {
|
|
1370
|
+
children: [" ", s.unit]
|
|
1371
|
+
})]
|
|
1372
|
+
}), jsx("span", {
|
|
1373
|
+
children: s.label
|
|
1374
|
+
})]
|
|
1375
|
+
}, s.label))
|
|
1376
|
+
}), jsxs("p", {
|
|
1377
|
+
className: "cbh-time-note",
|
|
1378
|
+
children: ["A working adult spends about 2.8 hours a day on life admin. Clockbook gives you 38 minutes of it back, every day: about 229 hours a year, or 28 workdays.", jsx("sup", {
|
|
1379
|
+
children: "1"
|
|
1380
|
+
})]
|
|
1381
|
+
})]
|
|
1382
|
+
})]
|
|
1383
|
+
})
|
|
533
1384
|
})
|
|
534
1385
|
}), jsx("section", {
|
|
535
1386
|
className: "cbh-section",
|
|
@@ -537,52 +1388,159 @@ function HomePage() {
|
|
|
537
1388
|
children: jsxs("div", {
|
|
538
1389
|
className: "cbh-wrap cbh-split",
|
|
539
1390
|
children: [jsxs("div", {
|
|
1391
|
+
className: "cbh-reveal",
|
|
540
1392
|
children: [jsxs("p", {
|
|
541
1393
|
className: "cbh-eyebrow",
|
|
542
1394
|
children: [jsx(PhoneCall, {
|
|
543
|
-
size:
|
|
1395
|
+
size: 15,
|
|
544
1396
|
"aria-hidden": true
|
|
545
1397
|
}), " Lucy makes the call"]
|
|
546
|
-
}),
|
|
547
|
-
children: "Never sit on
|
|
1398
|
+
}), jsxs("h2", {
|
|
1399
|
+
children: ["Never sit on ", jsx("em", {
|
|
1400
|
+
children: "hold"
|
|
1401
|
+
}), " again."]
|
|
548
1402
|
}), jsx("p", {
|
|
549
1403
|
className: "cbh-body",
|
|
550
1404
|
children: "Text Lucy what you need. She calls, works the phone menu, waits through the hold music and talks to a real person. When they need to hear from you, she rings you in."
|
|
551
|
-
}),
|
|
552
|
-
className: "cbh-ticks",
|
|
553
|
-
children: [jsx("li", {
|
|
554
|
-
children: "Works the phone menu"
|
|
555
|
-
}), jsx("li", {
|
|
556
|
-
children: "Waits on hold for you"
|
|
557
|
-
}), jsx("li", {
|
|
558
|
-
children: "Says no to the retention offers"
|
|
559
|
-
}), jsx("li", {
|
|
560
|
-
children: "Rings you in to confirm"
|
|
561
|
-
})]
|
|
562
|
-
}), jsx("p", {
|
|
1405
|
+
}), jsx(CallCard, {}), jsx("p", {
|
|
563
1406
|
className: "cbh-note",
|
|
564
1407
|
children: VIDEO_NOTE
|
|
565
1408
|
})]
|
|
566
1409
|
}), jsx("div", {
|
|
567
|
-
className: "cbh-reels",
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
},
|
|
1410
|
+
className: "cbh-reels-wrap cbh-reveal",
|
|
1411
|
+
style: {
|
|
1412
|
+
'--cbh-i': 1
|
|
1413
|
+
},
|
|
1414
|
+
children: jsx("div", {
|
|
1415
|
+
className: "cbh-reels",
|
|
1416
|
+
children: REELS.map(r => jsx(Reel, {
|
|
1417
|
+
...r
|
|
1418
|
+
}, r.title))
|
|
1419
|
+
})
|
|
1420
|
+
})]
|
|
1421
|
+
})
|
|
1422
|
+
}), jsx("section", {
|
|
1423
|
+
className: "cbh-section cbh-soft",
|
|
1424
|
+
id: "imessage",
|
|
1425
|
+
children: jsxs("div", {
|
|
1426
|
+
className: "cbh-wrap cbh-split cbh-split-flip",
|
|
1427
|
+
children: [jsxs("div", {
|
|
1428
|
+
className: "cbh-reveal",
|
|
1429
|
+
children: [jsxs("p", {
|
|
1430
|
+
className: "cbh-eyebrow",
|
|
1431
|
+
children: [jsx(ImessageIcon, {
|
|
1432
|
+
size: 18
|
|
1433
|
+
}), " Now on iMessage"]
|
|
1434
|
+
}), jsxs("h2", {
|
|
1435
|
+
children: ["Text Lucy like you\u2019d text a ", jsx("em", {
|
|
1436
|
+
children: "friend."
|
|
1437
|
+
})]
|
|
1438
|
+
}), jsx("p", {
|
|
1439
|
+
className: "cbh-body",
|
|
1440
|
+
children: "Lucy is in Messages too. Send her a chore from your iPhone, iPad or Mac, and she texts back as it gets done. Same Lucy, same account, nothing to install."
|
|
1441
|
+
}), jsx("ol", {
|
|
1442
|
+
className: "cbh-text-steps",
|
|
1443
|
+
children: TEXT_STEPS.map((s, i) => jsxs("li", {
|
|
1444
|
+
children: [jsx("span", {
|
|
1445
|
+
className: "cbh-text-n",
|
|
1446
|
+
"aria-hidden": true,
|
|
1447
|
+
children: i + 1
|
|
1448
|
+
}), jsxs("div", {
|
|
1449
|
+
children: [jsx("b", {
|
|
1450
|
+
children: s.title
|
|
1451
|
+
}), jsx("span", {
|
|
1452
|
+
children: s.body
|
|
1453
|
+
})]
|
|
1454
|
+
})]
|
|
1455
|
+
}, s.title))
|
|
1456
|
+
}), jsxs("div", {
|
|
1457
|
+
className: "cbh-ctas",
|
|
1458
|
+
children: [jsxs("button", {
|
|
1459
|
+
type: "button",
|
|
1460
|
+
className: "cbh-btn",
|
|
1461
|
+
"data-track": "text_on_imessage",
|
|
1462
|
+
onClick: () => textLucy(),
|
|
1463
|
+
onPointerEnter: warmImessage,
|
|
1464
|
+
onFocus: warmImessage,
|
|
1465
|
+
"aria-haspopup": "dialog",
|
|
1466
|
+
children: [jsx(ImessageIcon, {
|
|
1467
|
+
size: 22
|
|
1468
|
+
}), "Text Lucy on iMessage"]
|
|
1469
|
+
}), jsx("span", {
|
|
1470
|
+
className: "cbh-fine",
|
|
1471
|
+
children: "Message and data rates may apply."
|
|
1472
|
+
})]
|
|
1473
|
+
})]
|
|
1474
|
+
}), jsx("div", {
|
|
1475
|
+
className: "cbh-phone-wrap cbh-reveal",
|
|
1476
|
+
style: {
|
|
1477
|
+
'--cbh-i': 1
|
|
1478
|
+
},
|
|
1479
|
+
children: jsx(PhoneThread, {})
|
|
1480
|
+
})]
|
|
1481
|
+
})
|
|
1482
|
+
}), jsx("section", {
|
|
1483
|
+
className: "cbh-section",
|
|
1484
|
+
id: "areas",
|
|
1485
|
+
children: jsxs("div", {
|
|
1486
|
+
className: "cbh-wrap",
|
|
1487
|
+
children: [jsxs("div", {
|
|
1488
|
+
className: "cbh-head cbh-reveal",
|
|
1489
|
+
children: [jsx("p", {
|
|
1490
|
+
className: "cbh-eyebrow",
|
|
1491
|
+
children: "What it handles"
|
|
1492
|
+
}), jsxs("h2", {
|
|
1493
|
+
children: ["Hand over every corner of ", jsx("em", {
|
|
1494
|
+
children: "home life."
|
|
1495
|
+
})]
|
|
1496
|
+
})]
|
|
1497
|
+
}), jsx("div", {
|
|
1498
|
+
className: "cbh-areas",
|
|
1499
|
+
children: AREAS.map((a, i) => {
|
|
1500
|
+
const Icon = AREA_ICONS[a.key];
|
|
1501
|
+
return jsxs("article", {
|
|
1502
|
+
className: "cbh-area cbh-reveal",
|
|
1503
|
+
style: {
|
|
1504
|
+
'--cbh-i': i % 3
|
|
1505
|
+
},
|
|
1506
|
+
children: [jsx("span", {
|
|
1507
|
+
className: "cbh-area-icon",
|
|
1508
|
+
"aria-hidden": true,
|
|
1509
|
+
children: jsx(Icon, {
|
|
1510
|
+
size: 22
|
|
1511
|
+
})
|
|
1512
|
+
}), jsx("h3", {
|
|
1513
|
+
children: a.title
|
|
1514
|
+
}), jsx("p", {
|
|
1515
|
+
children: a.blurb
|
|
1516
|
+
}), jsx("div", {
|
|
1517
|
+
className: "cbh-chips cbh-chips-small",
|
|
1518
|
+
children: a.chores.map(c => jsx(ChoreChip, {
|
|
1519
|
+
chore: c,
|
|
1520
|
+
onChore: handOverChip('areas')
|
|
1521
|
+
}, c.label))
|
|
1522
|
+
})]
|
|
1523
|
+
}, a.key);
|
|
1524
|
+
})
|
|
571
1525
|
})]
|
|
572
1526
|
})
|
|
573
1527
|
}), jsx("section", {
|
|
574
1528
|
className: "cbh-section cbh-soft",
|
|
575
1529
|
id: "minutes",
|
|
576
1530
|
children: jsxs("div", {
|
|
577
|
-
className: "cbh-wrap cbh-split
|
|
1531
|
+
className: "cbh-wrap cbh-split",
|
|
578
1532
|
children: [jsx("div", {
|
|
579
|
-
className: "cbh-media-card",
|
|
1533
|
+
className: "cbh-media-card cbh-reveal",
|
|
580
1534
|
children: jsx(Loop, {
|
|
581
1535
|
src: HOME_ASSETS.loopWhere,
|
|
582
1536
|
poster: HOME_ASSETS.loopWherePoster,
|
|
583
1537
|
label: "The clock face fills slice by slice: shopping, meals, bills, calls and family logistics"
|
|
584
1538
|
})
|
|
585
1539
|
}), jsxs("div", {
|
|
1540
|
+
className: "cbh-reveal",
|
|
1541
|
+
style: {
|
|
1542
|
+
'--cbh-i': 1
|
|
1543
|
+
},
|
|
586
1544
|
children: [jsx("p", {
|
|
587
1545
|
className: "cbh-eyebrow",
|
|
588
1546
|
children: "Where it comes from"
|
|
@@ -590,10 +1548,12 @@ function HomePage() {
|
|
|
590
1548
|
children: [jsxs("span", {
|
|
591
1549
|
className: "cbh-nowrap",
|
|
592
1550
|
children: [totalMin, " minutes,"]
|
|
593
|
-
}), " chore by
|
|
1551
|
+
}), " chore by ", jsx("em", {
|
|
1552
|
+
children: "chore."
|
|
1553
|
+
})]
|
|
594
1554
|
}), jsxs("ul", {
|
|
595
1555
|
className: "cbh-minutes",
|
|
596
|
-
children: [MINUTES.map(m => jsxs("li", {
|
|
1556
|
+
children: [MINUTES.map((m, i) => jsxs("li", {
|
|
597
1557
|
children: [jsx("span", {
|
|
598
1558
|
className: "cbh-sw",
|
|
599
1559
|
style: {
|
|
@@ -608,7 +1568,8 @@ function HomePage() {
|
|
|
608
1568
|
"aria-hidden": true,
|
|
609
1569
|
children: jsx("i", {
|
|
610
1570
|
style: {
|
|
611
|
-
width: `${m.min / 17 * 100}
|
|
1571
|
+
width: `${m.min / 17 * 100}%`,
|
|
1572
|
+
'--cbh-i': i
|
|
612
1573
|
}
|
|
613
1574
|
})
|
|
614
1575
|
}), jsxs("b", {
|
|
@@ -639,107 +1600,55 @@ function HomePage() {
|
|
|
639
1600
|
})
|
|
640
1601
|
}), jsx("section", {
|
|
641
1602
|
className: "cbh-section",
|
|
642
|
-
id: "areas",
|
|
643
|
-
children: jsxs("div", {
|
|
644
|
-
className: "cbh-wrap",
|
|
645
|
-
children: [jsx("p", {
|
|
646
|
-
className: "cbh-eyebrow",
|
|
647
|
-
children: "What it handles"
|
|
648
|
-
}), jsx("h2", {
|
|
649
|
-
children: "Hand over every corner of home life."
|
|
650
|
-
}), jsx("div", {
|
|
651
|
-
className: "cbh-areas",
|
|
652
|
-
children: AREAS.map(a => {
|
|
653
|
-
const Icon = AREA_ICONS[a.key];
|
|
654
|
-
return jsxs("article", {
|
|
655
|
-
className: "cbh-area",
|
|
656
|
-
children: [jsx("span", {
|
|
657
|
-
className: "cbh-area-icon",
|
|
658
|
-
"aria-hidden": true,
|
|
659
|
-
children: jsx(Icon, {
|
|
660
|
-
size: 22
|
|
661
|
-
})
|
|
662
|
-
}), jsx("h3", {
|
|
663
|
-
children: a.title
|
|
664
|
-
}), jsx("p", {
|
|
665
|
-
children: a.blurb
|
|
666
|
-
}), jsx("div", {
|
|
667
|
-
className: "cbh-chips cbh-chips-small",
|
|
668
|
-
children: a.chores.map(c => jsx(ChoreChip, {
|
|
669
|
-
chore: c,
|
|
670
|
-
onChore: handOver
|
|
671
|
-
}, c.label))
|
|
672
|
-
})]
|
|
673
|
-
}, a.key);
|
|
674
|
-
})
|
|
675
|
-
})]
|
|
676
|
-
})
|
|
677
|
-
}), jsx("section", {
|
|
678
|
-
className: "cbh-section cbh-soft",
|
|
679
1603
|
id: "how",
|
|
680
1604
|
children: jsxs("div", {
|
|
681
1605
|
className: "cbh-wrap",
|
|
682
|
-
children: [
|
|
683
|
-
className: "cbh-
|
|
684
|
-
children: "
|
|
685
|
-
|
|
686
|
-
|
|
1606
|
+
children: [jsxs("div", {
|
|
1607
|
+
className: "cbh-head cbh-head-center cbh-reveal",
|
|
1608
|
+
children: [jsx("p", {
|
|
1609
|
+
className: "cbh-eyebrow",
|
|
1610
|
+
children: "How it works"
|
|
1611
|
+
}), jsxs("h2", {
|
|
1612
|
+
children: ["Text it. It gets ", jsx("em", {
|
|
1613
|
+
children: "done."
|
|
1614
|
+
})]
|
|
1615
|
+
})]
|
|
687
1616
|
}), jsx("ol", {
|
|
688
|
-
className: "cbh-steps",
|
|
1617
|
+
className: "cbh-steps cbh-reveal",
|
|
689
1618
|
children: STEPS.map((s, i) => jsxs("li", {
|
|
1619
|
+
className: "cbh-step",
|
|
690
1620
|
children: [jsx("span", {
|
|
691
1621
|
className: "cbh-step-n",
|
|
1622
|
+
"aria-hidden": true,
|
|
692
1623
|
children: i + 1
|
|
693
|
-
}),
|
|
694
|
-
children:
|
|
695
|
-
|
|
696
|
-
|
|
1624
|
+
}), jsxs("div", {
|
|
1625
|
+
children: [jsx("h3", {
|
|
1626
|
+
children: s.title
|
|
1627
|
+
}), jsx("p", {
|
|
1628
|
+
children: s.body
|
|
1629
|
+
})]
|
|
697
1630
|
})]
|
|
698
1631
|
}, s.title))
|
|
699
1632
|
})]
|
|
700
1633
|
})
|
|
701
1634
|
}), jsx("section", {
|
|
702
1635
|
className: "cbh-section",
|
|
703
|
-
id: "day",
|
|
704
|
-
children: jsxs("div", {
|
|
705
|
-
className: "cbh-wrap cbh-split",
|
|
706
|
-
children: [jsxs("div", {
|
|
707
|
-
children: [jsx("p", {
|
|
708
|
-
className: "cbh-eyebrow",
|
|
709
|
-
children: "A working day"
|
|
710
|
-
}), jsx("h2", {
|
|
711
|
-
children: "After work, sleep and chores, the evening is short."
|
|
712
|
-
}), jsxs("p", {
|
|
713
|
-
className: "cbh-body",
|
|
714
|
-
children: ["A working adult spends about 2.8 hours a day on life admin. Clockbook gives you 38 minutes of it back, every day. That is about 229 hours a year, or 28 workdays.", jsx("sup", {
|
|
715
|
-
children: "1"
|
|
716
|
-
})]
|
|
717
|
-
})]
|
|
718
|
-
}), jsx("div", {
|
|
719
|
-
className: "cbh-media-card",
|
|
720
|
-
children: jsx(Loop, {
|
|
721
|
-
src: HOME_ASSETS.loopDay,
|
|
722
|
-
poster: HOME_ASSETS.loopDayPoster,
|
|
723
|
-
label: "A working day as bars: the Clockbook clock takes 38 minutes off life admin"
|
|
724
|
-
})
|
|
725
|
-
})]
|
|
726
|
-
})
|
|
727
|
-
}), jsx("section", {
|
|
728
|
-
className: "cbh-section cbh-business",
|
|
729
1636
|
id: "business",
|
|
730
1637
|
children: jsxs("div", {
|
|
731
1638
|
className: "cbh-wrap",
|
|
732
1639
|
children: [jsxs("div", {
|
|
733
|
-
className: "cbh-business-head",
|
|
1640
|
+
className: "cbh-business-head cbh-reveal",
|
|
734
1641
|
children: [jsxs("div", {
|
|
735
1642
|
children: [jsxs("p", {
|
|
736
1643
|
className: "cbh-eyebrow",
|
|
737
1644
|
children: [jsx(Briefcase, {
|
|
738
|
-
size:
|
|
1645
|
+
size: 15,
|
|
739
1646
|
"aria-hidden": true
|
|
740
1647
|
}), " Clockbook for business"]
|
|
741
|
-
}),
|
|
742
|
-
children: "The same Clockbook runs the
|
|
1648
|
+
}), jsxs("h2", {
|
|
1649
|
+
children: ["The same Clockbook runs the ", jsx("em", {
|
|
1650
|
+
children: "back office."
|
|
1651
|
+
})]
|
|
743
1652
|
}), jsx("p", {
|
|
744
1653
|
className: "cbh-body",
|
|
745
1654
|
children: "Clockbook started as the time tracker teams run their day on. For a business it is the whole back office: time, people, money and the workflows between them, with the paperwork handled and you always in control."
|
|
@@ -768,50 +1677,81 @@ function HomePage() {
|
|
|
768
1677
|
})]
|
|
769
1678
|
})]
|
|
770
1679
|
}), jsx("div", {
|
|
771
|
-
className: "cbh-
|
|
772
|
-
children: BUSINESS_PRODUCTS.map(p => {
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
1680
|
+
className: "cbh-biz-grid",
|
|
1681
|
+
children: BUSINESS_PRODUCTS.map((p, i) => jsx(BusinessCard, {
|
|
1682
|
+
product: p,
|
|
1683
|
+
index: i
|
|
1684
|
+
}, p.key))
|
|
1685
|
+
})]
|
|
1686
|
+
})
|
|
1687
|
+
}), jsx("section", {
|
|
1688
|
+
className: "cbh-section cbh-soft",
|
|
1689
|
+
id: "faq",
|
|
1690
|
+
children: jsxs("div", {
|
|
1691
|
+
className: "cbh-wrap",
|
|
1692
|
+
children: [jsxs("div", {
|
|
1693
|
+
className: "cbh-head cbh-head-center cbh-reveal",
|
|
1694
|
+
children: [jsx("p", {
|
|
1695
|
+
className: "cbh-eyebrow",
|
|
1696
|
+
children: "Questions"
|
|
1697
|
+
}), jsxs("h2", {
|
|
1698
|
+
children: ["Good to ", jsx("em", {
|
|
1699
|
+
children: "know."
|
|
1700
|
+
})]
|
|
1701
|
+
})]
|
|
1702
|
+
}), jsx("div", {
|
|
1703
|
+
className: "cbh-faq cbh-reveal",
|
|
1704
|
+
children: FAQS.map(f => jsxs("details", {
|
|
1705
|
+
children: [jsxs("summary", {
|
|
1706
|
+
children: [f.q, jsx("span", {
|
|
1707
|
+
className: "cbh-faq-icon",
|
|
779
1708
|
"aria-hidden": true,
|
|
780
|
-
children: jsx(
|
|
781
|
-
size:
|
|
1709
|
+
children: jsx(Plus, {
|
|
1710
|
+
size: 16
|
|
782
1711
|
})
|
|
783
|
-
}), jsx("h3", {
|
|
784
|
-
children: p.title
|
|
785
|
-
}), jsx("p", {
|
|
786
|
-
children: p.blurb
|
|
787
|
-
}), jsxs("span", {
|
|
788
|
-
className: "cbh-business-more",
|
|
789
|
-
children: ["Learn more ", jsx(ArrowRight, {
|
|
790
|
-
size: 16,
|
|
791
|
-
"aria-hidden": true
|
|
792
|
-
})]
|
|
793
1712
|
})]
|
|
794
|
-
}, p
|
|
795
|
-
|
|
1713
|
+
}), jsx("p", {
|
|
1714
|
+
children: f.a
|
|
1715
|
+
})]
|
|
1716
|
+
}, f.q))
|
|
796
1717
|
})]
|
|
797
1718
|
})
|
|
798
1719
|
}), jsx("section", {
|
|
799
1720
|
className: "cbh-final",
|
|
800
|
-
|
|
1721
|
+
"data-track-section": "final",
|
|
1722
|
+
children: jsx("div", {
|
|
801
1723
|
className: "cbh-wrap",
|
|
802
|
-
children:
|
|
803
|
-
className: "cbh-final-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
1724
|
+
children: jsx("div", {
|
|
1725
|
+
className: "cbh-final-card cbh-reveal",
|
|
1726
|
+
children: jsxs("div", {
|
|
1727
|
+
className: "cbh-final-inner",
|
|
1728
|
+
children: [jsx(AnimatedMark, {
|
|
1729
|
+
className: "cbh-final-mark"
|
|
1730
|
+
}), jsxs("h2", {
|
|
1731
|
+
children: ["What\u2019s the first chore you\u2019d ", jsx("em", {
|
|
1732
|
+
children: "hand over?"
|
|
1733
|
+
})]
|
|
1734
|
+
}), jsx(Composer, {
|
|
1735
|
+
id: "cbh-chore-final",
|
|
1736
|
+
large: true,
|
|
1737
|
+
typed: TYPED_CHORES,
|
|
1738
|
+
onSubmit: handOverTyped('final'),
|
|
1739
|
+
onWarm: warmChat
|
|
1740
|
+
}), jsxs("div", {
|
|
1741
|
+
className: "cbh-channels",
|
|
1742
|
+
children: [jsx(ImessagePill, {
|
|
1743
|
+
onText: () => textLucy(),
|
|
1744
|
+
onWarm: warmImessage
|
|
1745
|
+
}), jsxs("span", {
|
|
1746
|
+
className: "cbh-trust",
|
|
1747
|
+
children: [jsx(ShieldCheck, {
|
|
1748
|
+
size: 16,
|
|
1749
|
+
"aria-hidden": true
|
|
1750
|
+
}), "Lucy asks before she pays for anything or changes an account"]
|
|
1751
|
+
})]
|
|
1752
|
+
})]
|
|
1753
|
+
})
|
|
1754
|
+
})
|
|
815
1755
|
})
|
|
816
1756
|
})]
|
|
817
1757
|
}), jsx("footer", {
|
|
@@ -856,8 +1796,20 @@ function HomePage() {
|
|
|
856
1796
|
}), signIn ? jsx(SignInDialog, {
|
|
857
1797
|
chore: signIn.chore,
|
|
858
1798
|
expired: signIn.expired,
|
|
1799
|
+
purpose: signIn.purpose,
|
|
859
1800
|
onContinue: continueSignIn,
|
|
860
1801
|
onCancel: () => setSignIn(null)
|
|
1802
|
+
}) : null, texting ? jsx(Suspense, {
|
|
1803
|
+
fallback: jsx("div", {
|
|
1804
|
+
className: "cbh-dialog-backdrop"
|
|
1805
|
+
}),
|
|
1806
|
+
children: jsx(ImessageDialog, {
|
|
1807
|
+
account: accountKeyFromToken(getCdecliToken()),
|
|
1808
|
+
message: texting.message,
|
|
1809
|
+
onClose: closeTexting,
|
|
1810
|
+
onChatHere: textingChatHere,
|
|
1811
|
+
onSignedOut: textingSignedOut
|
|
1812
|
+
})
|
|
861
1813
|
}) : null, chat.mounted ? createPortal(jsx(Suspense, {
|
|
862
1814
|
fallback: chat.open ? jsx("div", {
|
|
863
1815
|
className: "cbh-chat-loading",
|
|
@@ -869,7 +1821,8 @@ function HomePage() {
|
|
|
869
1821
|
hidden: !chat.open,
|
|
870
1822
|
onClose: closeChat,
|
|
871
1823
|
onSignedOut: onSignedOut,
|
|
872
|
-
onSessionExpired: onSessionExpired
|
|
1824
|
+
onSessionExpired: onSessionExpired,
|
|
1825
|
+
onImessage: textFromChat
|
|
873
1826
|
})
|
|
874
1827
|
}), document.body) : null]
|
|
875
1828
|
});
|