@planningcenter/topbar 12.4.1 → 12.5.0-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/topbar.js CHANGED
@@ -7,16 +7,18 @@ var general = require('@planningcenter/icons/paths/general');
7
7
  var Jolt = require('@planningcenter/jolt-client');
8
8
  var shim = require('use-sync-external-store/shim');
9
9
  require('react/jsx-runtime');
10
+ var toolbar = require('@planningcenter/icons/paths/toolbar');
11
+ var datetimeFmt = require('@planningcenter/datetime-fmt');
12
+ var pluralize = require('pluralize');
13
+ var logomarks = require('@planningcenter/icons/paths/logomark');
10
14
  var tapestryReact = require('@planningcenter/tapestry-react');
11
15
  var addOns = require('@planningcenter/add-ons');
12
16
  var churchCenter = require('@planningcenter/icons/paths/church-center');
13
17
  var people = require('@planningcenter/icons/paths/people');
14
- var toolbar = require('@planningcenter/icons/paths/toolbar');
15
18
  var reactCalendly = require('react-calendly');
16
19
  var algoliasearch = require('algoliasearch');
17
20
  var reactInstantsearchCore = require('react-instantsearch-core');
18
21
  var reactTransitionGroup = require('react-transition-group');
19
- var datetimeFmt = require('@planningcenter/datetime-fmt');
20
22
 
21
23
  function _interopNamespaceDefault(e) {
22
24
  var n = Object.create(null);
@@ -37,11 +39,12 @@ function _interopNamespaceDefault(e) {
37
39
 
38
40
  var React__namespace = /*#__PURE__*/_interopNamespaceDefault(React);
39
41
  var general__namespace = /*#__PURE__*/_interopNamespaceDefault(general);
42
+ var toolbar__namespace = /*#__PURE__*/_interopNamespaceDefault(toolbar);
43
+ var logomarks__namespace = /*#__PURE__*/_interopNamespaceDefault(logomarks);
40
44
  var churchCenter__namespace = /*#__PURE__*/_interopNamespaceDefault(churchCenter);
41
45
  var people__namespace = /*#__PURE__*/_interopNamespaceDefault(people);
42
- var toolbar__namespace = /*#__PURE__*/_interopNamespaceDefault(toolbar);
43
46
 
44
- var styles$m = {"accessibility-toolbar":"accessibility-toolbar-jgjUG"};
47
+ var styles$u = {"accessibility-toolbar":"accessibility-toolbar-jgjUG"};
45
48
 
46
49
  const AccessibilityToolbar = ({
47
50
  children
@@ -53,7 +56,7 @@ const AccessibilityToolbar = ({
53
56
  (_a = document.getElementById("main-content")) === null || _a === void 0 ? void 0 : _a.focus();
54
57
  };
55
58
  return /*#__PURE__*/React.createElement("div", {
56
- className: styles$m["accessibility-toolbar"]
59
+ className: styles$u["accessibility-toolbar"]
57
60
  }, /*#__PURE__*/React.createElement(tapestry.Link, {
58
61
  href: "#main-content",
59
62
  kind: "primary",
@@ -372,11 +375,11 @@ const X = ({
372
375
  fill: fill
373
376
  })));
374
377
 
375
- var styles$l = {"announcement":"announcement-pI5tM","announcement--platform":"announcement--platform-EcUn2","announcement--promo":"announcement--promo-FarUk","announcement-icon":"announcement-icon-Ov39-","announcement-content":"announcement-content-q2ad6","dismiss":"dismiss-wUAoU","dismiss--promo":"dismiss--promo-7zvO4"};
378
+ var styles$t = {"announcement":"announcement-pI5tM","announcement--platform":"announcement--platform-EcUn2","announcement--promo":"announcement--promo-FarUk","announcement-icon":"announcement-icon-Ov39-","announcement-content":"announcement-content-q2ad6","dismiss":"dismiss-wUAoU","dismiss--promo":"dismiss--promo-7zvO4"};
376
379
 
377
380
  function AnnouncementIcon() {
378
381
  return /*#__PURE__*/React.createElement("svg", {
379
- className: styles$l["announcement-icon"],
382
+ className: styles$t["announcement-icon"],
380
383
  width: "16",
381
384
  height: "16",
382
385
  viewBox: "0 0 16 16",
@@ -501,7 +504,7 @@ let StyledAnnouncement$1 = class StyledAnnouncement extends React.Component {
501
504
  } = this.props;
502
505
  const isPromo = variant === "promo";
503
506
  return /*#__PURE__*/React.createElement("div", {
504
- className: classnames(styles$l["announcement"], styles$l[`announcement--${variant !== null && variant !== void 0 ? variant : "platform"}`]),
507
+ className: classnames(styles$t["announcement"], styles$t[`announcement--${variant !== null && variant !== void 0 ? variant : "platform"}`]),
505
508
  "data-announcement-variant": variant !== null && variant !== void 0 ? variant : "platform",
506
509
  style: isPromo ? {
507
510
  backgroundImage: promoBackgroundUrl,
@@ -510,7 +513,7 @@ let StyledAnnouncement$1 = class StyledAnnouncement extends React.Component {
510
513
  backgroundSize: "cover"
511
514
  } : undefined
512
515
  }, !isPromo && /*#__PURE__*/React.createElement(AnnouncementIcon, null), /*#__PURE__*/React.createElement("div", {
513
- className: styles$l["announcement-content"],
516
+ className: styles$t["announcement-content"],
514
517
  style: style,
515
518
  ...platformProps
516
519
  }));
@@ -559,7 +562,7 @@ function StyledDismissButton$1({
559
562
  const isPromo = variant === "promo";
560
563
  return /*#__PURE__*/React.createElement("button", {
561
564
  type: "button",
562
- className: classnames(styles$l.dismiss, isPromo && styles$l["dismiss--promo"]),
565
+ className: classnames(styles$t.dismiss, isPromo && styles$t["dismiss--promo"]),
563
566
  ...props
564
567
  }, /*#__PURE__*/React.createElement(X, {
565
568
  fill: isPromo ? "currentColor" : "white",
@@ -639,9 +642,9 @@ class StyledAnnouncement extends React.Component {
639
642
  ...platformProps
640
643
  } = this.props;
641
644
  return /*#__PURE__*/React.createElement("div", {
642
- className: styles$l["announcement"]
645
+ className: styles$t["announcement"]
643
646
  }, /*#__PURE__*/React.createElement(AnnouncementIcon, null), /*#__PURE__*/React.createElement("div", {
644
- className: styles$l["announcement-content"],
647
+ className: styles$t["announcement-content"],
645
648
  style: style,
646
649
  ...platformProps
647
650
  }));
@@ -652,7 +655,7 @@ function StyledDismissButton({
652
655
  }) {
653
656
  return /*#__PURE__*/React.createElement("button", {
654
657
  type: "button",
655
- className: styles$l.dismiss,
658
+ className: styles$t.dismiss,
656
659
  ...props
657
660
  }, /*#__PURE__*/React.createElement(X, {
658
661
  fill: "white",
@@ -1774,7 +1777,7 @@ function MonoAppIcon({
1774
1777
  })) : (/*#__PURE__*/React.createElement("div", null, "appName not supported")));
1775
1778
  }
1776
1779
 
1777
- var styles$k = {"icon-slot":"icon-slot-m3ZIk","name":"name-UNqbW"};
1780
+ var styles$s = {"name":"name-UNqbW"};
1778
1781
 
1779
1782
  const AppRow = ({
1780
1783
  appName,
@@ -1782,25 +1785,23 @@ const AppRow = ({
1782
1785
  iconSize = 24
1783
1786
  }) => {
1784
1787
  if (appName === "Accounts") {
1785
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("span", {
1786
- className: styles$k["icon-slot"]
1787
- }, /*#__PURE__*/React.createElement(MonoAppIcon, {
1788
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(MonoAppIcon, {
1788
1789
  appName: "Accounts",
1789
1790
  colors: colors,
1790
1791
  size: iconSize
1791
- })), /*#__PURE__*/React.createElement("span", {
1792
- className: styles$k.name
1792
+ }), /*#__PURE__*/React.createElement("span", {
1793
+ className: styles$s.name
1793
1794
  }, "Account settings"));
1794
1795
  }
1795
1796
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(ColorAppIcon, {
1796
1797
  appName: appName.replace(/[\s-]/, ""),
1797
1798
  size: iconSize
1798
1799
  }), /*#__PURE__*/React.createElement("span", {
1799
- className: styles$k.name
1800
+ className: styles$s.name
1800
1801
  }, appName));
1801
1802
  };
1802
1803
 
1803
- var styles$j = {"button":"button-XMbeQ","label":"label-884of","chevron":"chevron-RRg9k"};
1804
+ var styles$r = {"button":"button-XMbeQ","label":"label-884of","chevron":"chevron-RRg9k"};
1804
1805
 
1805
1806
  const AppsButton = /*#__PURE__*/React.forwardRef(({
1806
1807
  appName,
@@ -1812,27 +1813,27 @@ const AppsButton = /*#__PURE__*/React.forwardRef(({
1812
1813
  ...restProps,
1813
1814
  ref: ref,
1814
1815
  "aria-label": `App switcher: ${appName}`,
1815
- className: styles$j.button,
1816
+ className: styles$r.button,
1816
1817
  kind: "neutral-inline",
1817
1818
  label: /*#__PURE__*/React.createElement("span", {
1818
- className: styles$j.label
1819
+ className: styles$r.label
1819
1820
  }, isAccounts ? "Account settings" : appName),
1820
1821
  prefix: isAccounts ? (/*#__PURE__*/React.createElement(MonoAppIcon, {
1821
1822
  appName: "Accounts",
1822
1823
  colors: colors,
1823
- size: 22
1824
+ size: 24
1824
1825
  })) : (/*#__PURE__*/React.createElement(ColorAppIcon, {
1825
1826
  appName: appName.replace(/[\s-]/, ""),
1826
- size: 22
1827
+ size: 24
1827
1828
  })),
1828
1829
  suffix: /*#__PURE__*/React.createElement(DisclosureChevronIcon, {
1829
- className: `${styles$j.chevron} symbol`
1830
+ className: `${styles$r.chevron} symbol`
1830
1831
  })
1831
1832
  });
1832
1833
  });
1833
1834
  AppsButton.displayName = "AppsButton";
1834
1835
 
1835
- var styles$i = {"nav":"nav-y-6ML","popover-content":"popover-content-jOAAY","list":"list-jUxvp","link":"link-LMp2h","current":"current-4U4VL","accounts-item":"accounts-item-erJW0","accounts-link":"accounts-link-4jwPW"};
1836
+ var styles$q = {"nav":"nav-y-6ML","popover-content":"popover-content-jOAAY","list":"list-jUxvp","link":"link-LMp2h","current":"current-4U4VL","accounts-item":"accounts-item-erJW0","accounts-link":"accounts-link-4jwPW"};
1836
1837
 
1837
1838
  const AppsMenu = ({
1838
1839
  appName,
@@ -1853,8 +1854,8 @@ const AppsMenu = ({
1853
1854
  }, /*#__PURE__*/React.createElement("a", {
1854
1855
  "aria-current": isCurrent ? "page" : undefined,
1855
1856
  "aria-label": name,
1856
- className: classnames(styles$i.link, {
1857
- [styles$i.current]: isCurrent
1857
+ className: classnames(styles$q.link, {
1858
+ [styles$q.current]: isCurrent
1858
1859
  }),
1859
1860
  "data-pendo": `app-switcher--change-app--${name}`,
1860
1861
  "data-turbolinks": false,
@@ -1870,22 +1871,22 @@ const AppsMenu = ({
1870
1871
  colors: colors
1871
1872
  })), /*#__PURE__*/React.createElement(tapestry.PopoverContent, {
1872
1873
  "aria-label": "Switch app",
1873
- className: styles$i["popover-content"],
1874
+ className: styles$q["popover-content"],
1874
1875
  placement: "bottom start"
1875
1876
  }, /*#__PURE__*/React.createElement("nav", {
1876
- className: styles$i.nav,
1877
+ className: styles$q.nav,
1877
1878
  "data-pendo": "app-switcher"
1878
1879
  }, /*#__PURE__*/React.createElement("ul", {
1879
- className: styles$i.list,
1880
+ className: styles$q.list,
1880
1881
  role: "list"
1881
1882
  }, homeProduct && renderProductLink(homeProduct.name), restProducts.map(({
1882
1883
  name
1883
1884
  }) => renderProductLink(name)), accountsProduct && (/*#__PURE__*/React.createElement("li", {
1884
- className: styles$i["accounts-item"]
1885
+ className: styles$q["accounts-item"]
1885
1886
  }, /*#__PURE__*/React.createElement("a", {
1886
1887
  "aria-current": appName === accountsProduct.name ? "page" : undefined,
1887
1888
  "aria-label": "Account settings",
1888
- className: classnames(styles$i.link, styles$i["accounts-link"]),
1889
+ className: classnames(styles$q.link, styles$q["accounts-link"]),
1889
1890
  "data-pendo": "app-switcher--change-app--Accounts",
1890
1891
  "data-turbolinks": false,
1891
1892
  href: pcoUrl$1(env)("accounts") + getAppsSwitchProductPath(accountsProduct.name)
@@ -2093,7 +2094,7 @@ function MonoAppName({
2093
2094
  })) : (/*#__PURE__*/React.createElement("div", null, "appName not supported"));
2094
2095
  }
2095
2096
 
2096
- var styles$h = {"unbutton":"unbutton-lEbTR"};
2097
+ var styles$p = {"unbutton":"unbutton-lEbTR"};
2097
2098
 
2098
2099
  function Unbutton({
2099
2100
  className,
@@ -2102,7 +2103,7 @@ function Unbutton({
2102
2103
  ...nativeProps
2103
2104
  }) {
2104
2105
  return /*#__PURE__*/React.createElement("button", {
2105
- className: classnames(styles$h.unbutton, className),
2106
+ className: classnames(styles$p.unbutton, className),
2106
2107
  style: {
2107
2108
  ...style
2108
2109
  },
@@ -2111,7 +2112,7 @@ function Unbutton({
2111
2112
  });
2112
2113
  }
2113
2114
 
2114
- var styles$g = {"button":"button-wsipc","button-accounts":"button-accounts-zQmBM","chevron":"chevron-obyBF","is-expanded":"is-expanded-PoCQ9"};
2115
+ var styles$o = {"button":"button-wsipc","button-accounts":"button-accounts-zQmBM","chevron":"chevron-obyBF","is-expanded":"is-expanded-PoCQ9"};
2115
2116
 
2116
2117
  const LegacyAppsButton = ({
2117
2118
  appName,
@@ -2126,8 +2127,8 @@ const LegacyAppsButton = ({
2126
2127
  "aria-haspopup": "true",
2127
2128
  "aria-label": `App switcher: ${appName}`,
2128
2129
  onClick: onClick,
2129
- className: classnames(styles$g.button, {
2130
- [styles$g["is-expanded"]]: expanded
2130
+ className: classnames(styles$o.button, {
2131
+ [styles$o["is-expanded"]]: expanded
2131
2132
  }),
2132
2133
  type: "button",
2133
2134
  style: style,
@@ -2136,7 +2137,7 @@ const LegacyAppsButton = ({
2136
2137
  appName: "Accounts",
2137
2138
  colors: colors
2138
2139
  }), /*#__PURE__*/React.createElement("div", {
2139
- className: styles$g["button-accounts"]
2140
+ className: styles$o["button-accounts"]
2140
2141
  }, "Account settings"))) : (/*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(ColorAppIcon, {
2141
2142
  appName: appName.replace(/[\s-]/, "")
2142
2143
  }), /*#__PURE__*/React.createElement(MonoAppName, {
@@ -2144,7 +2145,7 @@ const LegacyAppsButton = ({
2144
2145
  key: "mono-app-name",
2145
2146
  size: 24
2146
2147
  }))), /*#__PURE__*/React.createElement(DisclosureChevronIcon, {
2147
- className: styles$g.chevron,
2148
+ className: styles$o.chevron,
2148
2149
  key: "disclosure-chevron-icon"
2149
2150
  }));
2150
2151
  };
@@ -2277,7 +2278,7 @@ class Outsider extends React.Component {
2277
2278
  }
2278
2279
  }
2279
2280
 
2280
- var styles$f = {"popup-root":"popup-root-SeL5u","popup":"popup-nQXYW","is-visible":"is-visible-3DAUP"};
2281
+ var styles$n = {"popup-root":"popup-root-SeL5u","popup":"popup-nQXYW","is-visible":"is-visible-3DAUP"};
2281
2282
 
2282
2283
  const Popup = ({
2283
2284
  className,
@@ -2285,8 +2286,8 @@ const Popup = ({
2285
2286
  isVisible,
2286
2287
  ...nativeProps
2287
2288
  }) => (/*#__PURE__*/React.createElement(C, {
2288
- className: classnames(styles$f.popup, {
2289
- [styles$f["is-visible"]]: isVisible
2289
+ className: classnames(styles$n.popup, {
2290
+ [styles$n["is-visible"]]: isVisible
2290
2291
  }, className),
2291
2292
  ...nativeProps
2292
2293
  }));
@@ -2294,11 +2295,11 @@ const Popup = ({
2294
2295
  const PopupRoot = ({
2295
2296
  ...nativeProps
2296
2297
  }) => (/*#__PURE__*/React.createElement("div", {
2297
- className: styles$f["popup-root"],
2298
+ className: styles$n["popup-root"],
2298
2299
  ...nativeProps
2299
2300
  }));
2300
2301
 
2301
- var styles$e = {"popup":"popup-bVhSa"};
2302
+ var styles$m = {"popup":"popup-bVhSa"};
2302
2303
 
2303
2304
  const LegacyAppsMenu = ({
2304
2305
  appName,
@@ -2336,7 +2337,7 @@ const LegacyAppsMenu = ({
2336
2337
  cleanup: !visible,
2337
2338
  component: Outsider,
2338
2339
  onOutsideClick: toggle,
2339
- className: styles$e.popup,
2340
+ className: styles$m.popup,
2340
2341
  isVisible: visible
2341
2342
  }, /*#__PURE__*/React.createElement("menu", {
2342
2343
  ref: menuRef,
@@ -3246,34 +3247,117 @@ const useUpdateStore = () => React.useCallback(updates => {
3246
3247
  });
3247
3248
  }, []);
3248
3249
 
3250
+ const collections = {
3251
+ general: general__namespace,
3252
+ toolbar: toolbar__namespace
3253
+ };
3254
+ const paths = collections;
3255
+ function Icon({
3256
+ name,
3257
+ size = 16,
3258
+ style,
3259
+ theme,
3260
+ title,
3261
+ ...props
3262
+ }) {
3263
+ const [collection, symbol] = name.split(".");
3264
+ return /*#__PURE__*/React.createElement("svg", {
3265
+ "aria-hidden": title ? undefined : true,
3266
+ fill: "currentColor",
3267
+ height: size,
3268
+ role: title ? "img" : undefined,
3269
+ style: {
3270
+ color: theme && `var(${theme})`,
3271
+ flexShrink: 0,
3272
+ ...style
3273
+ },
3274
+ viewBox: "0 0 16 16",
3275
+ width: size,
3276
+ ...props
3277
+ }, title && /*#__PURE__*/React.createElement("title", null, title), /*#__PURE__*/React.createElement("path", {
3278
+ d: paths[collection][symbol]
3279
+ }));
3280
+ }
3281
+
3282
+ const SEARCHABLE_PRODUCTS = [{
3283
+ appName: "Calendar",
3284
+ slug: "calendar"
3285
+ }, {
3286
+ appName: "Check-Ins",
3287
+ slug: "check-ins"
3288
+ }, {
3289
+ appName: "Giving",
3290
+ slug: "giving"
3291
+ }, {
3292
+ appName: "Groups",
3293
+ slug: "groups"
3294
+ }, {
3295
+ appName: "People",
3296
+ slug: "people"
3297
+ }, {
3298
+ appName: "Publishing",
3299
+ slug: "publishing"
3300
+ }, {
3301
+ appName: "Registrations",
3302
+ slug: "registrations"
3303
+ }, {
3304
+ appName: "Services",
3305
+ slug: "services"
3306
+ }];
3307
+ const KEYBOARD_SHORTCUTS = {
3308
+ copyLink: {
3309
+ key: "c",
3310
+ label: "Copy link",
3311
+ modifierKey: true
3312
+ },
3313
+ openInNewTab: {
3314
+ label: "Open in new tab"},
3315
+ openSearch: {
3316
+ key: "k",
3317
+ label: "Open search",
3318
+ modifierKey: true
3319
+ },
3320
+ select: {
3321
+ label: "Select",
3322
+ modifierKey: false,
3323
+ next: "ArrowDown",
3324
+ previous: "ArrowUp"
3325
+ }
3326
+ };
3327
+
3249
3328
  const isMac = () => /Mac|iPhone|iPad|iPod/.test(navigator.platform);
3250
3329
  const hasCommandKey = event => isMac() ? event.metaKey : event.ctrlKey;
3251
- const commandKeyLabel = () => isMac() ? "⌘" : "Ctrl+";
3252
- const isSearchShortcut = event => event.key.toLowerCase() === "k" && !event.altKey && !event.shiftKey && hasCommandKey(event);
3330
+ const matchesShortcut = (shortcut, event) => event.key.toLowerCase() === shortcut.key && !event.altKey && !event.shiftKey && hasCommandKey(event) === shortcut.modifierKey;
3331
+ const isSearchShortcut = event => matchesShortcut(KEYBOARD_SHORTCUTS.openSearch, event);
3253
3332
  // Products opened their own search with `/` before this one replaced it.
3254
3333
  const isLegacySearchShortcut = event => event.key === "/" && !event.altKey && !event.ctrlKey && !event.metaKey && !isTypingIn(event.target);
3255
- const isCopyShortcut = event => event.key.toLowerCase() === "c" && !event.altKey && !event.shiftKey && hasCommandKey(event);
3334
+ const isCopyShortcut = event => matchesShortcut(KEYBOARD_SHORTCUTS.copyLink, event);
3256
3335
  const isTypingIn = target => target instanceof Element && target.closest('input, select, textarea, [contenteditable]:not([contenteditable="false"])') !== null;
3257
3336
  const isTypingKey = event => event.key.length === 1 && event.key !== " " && !event.altKey && !event.ctrlKey && !event.metaKey;
3258
3337
  const verticalStep = key => ({
3259
- ArrowDown: 1,
3260
- ArrowUp: -1
3338
+ [KEYBOARD_SHORTCUTS.select.next]: 1,
3339
+ [KEYBOARD_SHORTCUTS.select.previous]: -1
3261
3340
  })[key];
3262
3341
  const horizontalStep = key => ({
3263
3342
  ArrowLeft: -1,
3264
3343
  ArrowRight: 1
3265
3344
  })[key];
3266
3345
 
3346
+ var styles$l = {"searchButton":"searchButton-fYa5-"};
3347
+
3267
3348
  function SearchButton({
3349
+ mobile = false,
3268
3350
  onClick
3269
3351
  }) {
3270
3352
  return /*#__PURE__*/React.createElement("button", {
3271
- "aria-keyshortcuts": `${isMac() ? "Meta+K" : "Control+K"} /`,
3353
+ "aria-keyshortcuts": mobile ? undefined : `${isMac() ? "Meta" : "Control"}+${KEYBOARD_SHORTCUTS.openSearch.key.toUpperCase()} /`,
3272
3354
  "aria-label": "Search",
3355
+ className: styles$l.searchButton,
3273
3356
  onClick: onClick,
3274
3357
  type: "button"
3275
- }, /*#__PURE__*/React.createElement(Spyglass, {
3276
- fill: "currentColor"
3358
+ }, /*#__PURE__*/React.createElement(Icon, {
3359
+ name: "general.search",
3360
+ size: mobile ? 18 : 14
3277
3361
  }));
3278
3362
  }
3279
3363
 
@@ -3588,16 +3672,16 @@ function useRecentlyVisitableMetadata() {
3588
3672
  const ENTRY_VERSION = 3;
3589
3673
  const MAX_ENTRIES = 50;
3590
3674
  const MAX_TEXT_LENGTH = 200;
3591
- const PRODUCTS = ["accounts", "calendar", "check-ins", "giving", "groups", "home", "login", "people", "publishing", "registrations", "services"];
3675
+ const PRODUCTS$1 = ["accounts", "calendar", "check-ins", "giving", "groups", "home", "login", "people", "publishing", "registrations", "services"];
3592
3676
  // Login has no pages worth returning to.
3593
- const APPS = PRODUCTS.filter(product => product !== "login");
3677
+ const APPS = PRODUCTS$1.filter(product => product !== "login");
3594
3678
  function isId(value) {
3595
3679
  return value !== "" && Array.from(value).every(character => character >= "0" && character <= "9");
3596
3680
  }
3597
3681
  // A PCRL looks like `<product>/v2/<resource_type>/<id>`.
3598
3682
  function isPcrl(value) {
3599
3683
  const segments = value.split("/");
3600
- return segments.length === 4 && PRODUCTS.some(product => product === segments[0]) && isId(segments[3]);
3684
+ return segments.length === 4 && PRODUCTS$1.some(product => product === segments[0]) && isId(segments[3]);
3601
3685
  }
3602
3686
  function isApp(value) {
3603
3687
  return APPS.some(app => app === value);
@@ -3996,7 +4080,13 @@ function hasSelectedText(element) {
3996
4080
  return selectedInField || ((_b = (_a = window.getSelection()) === null || _a === void 0 ? void 0 : _a.toString()) !== null && _b !== void 0 ? _b : "") !== "";
3997
4081
  }
3998
4082
 
3999
- const COPIED_FEEDBACK_MS = 1500;
4083
+ // eslint-disable-next-line sort-keys-fix/sort-keys-fix
4084
+ const COPIED_TIMING = {
4085
+ enter: 240,
4086
+ active: 1000,
4087
+ exit: 240
4088
+ };
4089
+ const COPIED_FEEDBACK_MS = COPIED_TIMING.enter + COPIED_TIMING.active + COPIED_TIMING.exit;
4000
4090
  // `copiedUrl` stays set briefly after a copy so the UI can confirm it.
4001
4091
  function useCopyLink() {
4002
4092
  const [copiedUrl, setCopiedUrl] = React.useState(null);
@@ -4020,22 +4110,27 @@ function useCopyLink() {
4020
4110
  // Remembering which list the index belongs to puts the highlight back on the
4021
4111
  // first item whenever a new list replaces it, without an effect to reset it.
4022
4112
  // A list that grows or fills in under the same `list` keeps its highlight.
4023
- function useResultNavigation(items, list) {
4113
+ // Disabled, nothing is highlighted and the keys and pointer leave it alone.
4114
+ function useResultNavigation(items, list, enabled = true) {
4024
4115
  const [highlight, setHighlight] = React.useState({
4025
4116
  index: 0,
4026
4117
  list
4027
4118
  });
4028
4119
  const highlightedIndex = highlight.list === list ? highlight.index : 0;
4029
- const highlighted = items[highlightedIndex];
4120
+ const highlighted = enabled ? items[highlightedIndex] : undefined;
4030
4121
  const {
4031
4122
  copiedUrl,
4032
4123
  copy
4033
4124
  } = useCopyLink();
4034
- const highlightIndex = React.useCallback(index => setHighlight(current => current.list === list && current.index === index ? current : {
4035
- index,
4036
- list
4037
- }), [list]);
4125
+ const highlightIndex = React.useCallback(index => {
4126
+ if (!enabled) return;
4127
+ setHighlight(current => current.list === list && current.index === index ? current : {
4128
+ index,
4129
+ list
4130
+ });
4131
+ }, [enabled, list]);
4038
4132
  const handleKeyDown = event => {
4133
+ if (!enabled) return;
4039
4134
  const step = verticalStep(event.key);
4040
4135
  if (step && items.length > 0) {
4041
4136
  event.preventDefault();
@@ -4059,41 +4154,89 @@ function useResultNavigation(items, list) {
4059
4154
  };
4060
4155
  }
4061
4156
 
4062
- function groupSections(groups = []) {
4157
+ var styles$k = {"modal":"modal-NR3TO","visuallyHidden":"visuallyHidden-C28ju","panel":"panel-HlF7S"};
4158
+
4159
+ const FALLBACK_SLUGS = ["people", "services"];
4160
+ function defaultProduct(products, appName) {
4161
+ var _a;
4162
+ const current = products.find(product => product.appName === appName);
4163
+ const fallback = FALLBACK_SLUGS.map(slug => products.find(product => product.slug === slug)).find(Boolean);
4164
+ return (_a = current !== null && current !== void 0 ? current : fallback) !== null && _a !== void 0 ? _a : products[0];
4165
+ }
4166
+
4167
+ function groupSections(groups = [], timeZone) {
4063
4168
  return groups.map(({
4064
4169
  results,
4065
4170
  type
4066
4171
  }) => ({
4067
4172
  heading: type,
4068
- items: results.map(resultItem),
4173
+ items: results.map(result => resultItem(result, timeZone)),
4069
4174
  key: type
4070
4175
  }));
4071
4176
  }
4072
4177
  function resultItem({
4073
4178
  attributes,
4074
4179
  id
4075
- }) {
4180
+ }, timeZone) {
4076
4181
  return {
4182
+ category: attributes.category,
4183
+ imageUrl: attributes.image_url,
4077
4184
  key: id,
4078
- subtitle: summarize(attributes.metadata),
4185
+ product: attributes.product,
4186
+ subtitle: summarize(attributes, timeZone),
4079
4187
  title: attributes.title,
4080
4188
  url: attributes.url
4081
4189
  };
4082
4190
  }
4083
- function visitItem(visit) {
4191
+ function visitItem(visit, timeZone) {
4084
4192
  return {
4085
4193
  key: entryKey(visit.entry),
4086
- ...describeVisit(visit)
4194
+ ...describeVisit(visit, timeZone)
4195
+ };
4196
+ }
4197
+ const joinParts = (...parts) => parts.filter(Boolean).join(" · ");
4198
+ // Matches home-mobile's search subtitles, so a result reads the same in both.
4199
+ function summarize({
4200
+ category,
4201
+ metadata
4202
+ }, timeZone) {
4203
+ const text = key => {
4204
+ const value = metadata === null || metadata === void 0 ? void 0 : metadata[key];
4205
+ return typeof value === "string" ? value : "";
4087
4206
  };
4207
+ if (category === "profile") {
4208
+ return joinParts(text("phone"), text("email"));
4209
+ } else if (category === "event") {
4210
+ return eventTime(text("starts_at"), text("ends_at"), {
4211
+ recurring: (metadata === null || metadata === void 0 ? void 0 : metadata.recurring) === true,
4212
+ timeZone
4213
+ });
4214
+ } else {
4215
+ return text("details");
4216
+ }
4088
4217
  }
4089
- function summarize(metadata) {
4090
- return Object.values(metadata !== null && metadata !== void 0 ? metadata : {}).filter(value => typeof value === "string" && value !== "").join(" · ");
4218
+ // "Oct 25, 9–10:30am", in the organization's time zone like the rest
4219
+ // of Planning Center.
4220
+ function eventTime(startsAt, endsAt, {
4221
+ recurring,
4222
+ timeZone
4223
+ }) {
4224
+ if (startsAt === "") {
4225
+ return "";
4226
+ } else {
4227
+ const time = datetimeFmt.datetime(startsAt, endsAt || null, {
4228
+ style: "abbreviated",
4229
+ ...(timeZone && {
4230
+ timeZone
4231
+ })
4232
+ });
4233
+ return recurring ? joinParts(time, "Repeating") : time;
4234
+ }
4091
4235
  }
4092
4236
  // Unlike search results, recents come from every product, so each one names
4093
- // its product and type.
4094
- function describeVisit(visit) {
4237
+ // its type. The row's product icon says which product it came from.
4238
+ function describeVisit(visit, timeZone) {
4095
4239
  var _a, _b;
4096
- const subtitle = (...parts) => parts.filter(Boolean).join(" · ");
4097
4240
  if (visit.status === "page") {
4098
4241
  const {
4099
4242
  app,
@@ -4101,65 +4244,312 @@ function describeVisit(visit) {
4101
4244
  title
4102
4245
  } = visit.entry;
4103
4246
  return {
4104
- subtitle: subtitle(productName(app), (_a = metadata === null || metadata === void 0 ? void 0 : metadata.type) !== null && _a !== void 0 ? _a : "", (_b = metadata === null || metadata === void 0 ? void 0 : metadata.details) !== null && _b !== void 0 ? _b : ""),
4247
+ category: "generic",
4248
+ imageUrl: null,
4249
+ product: app,
4250
+ subtitle: joinParts(capitalize((_a = metadata === null || metadata === void 0 ? void 0 : metadata.type) !== null && _a !== void 0 ? _a : ""), (_b = metadata === null || metadata === void 0 ? void 0 : metadata.details) !== null && _b !== void 0 ? _b : ""),
4105
4251
  title,
4106
4252
  url: visit.url
4107
4253
  };
4108
4254
  } else {
4109
4255
  const {
4110
- metadata,
4256
+ attributes
4257
+ } = visit.result;
4258
+ const {
4259
+ category,
4260
+ image_url,
4111
4261
  product,
4112
4262
  title,
4113
4263
  type
4114
- } = visit.result.attributes;
4264
+ } = attributes;
4265
+ // Profiles and events say what they are with a phone number or a date.
4266
+ const kind = category === "generic" ? capitalize(pluralize.singular(type)) : "";
4115
4267
  return {
4116
- subtitle: subtitle(productName(product), type, summarize(metadata)),
4268
+ category,
4269
+ imageUrl: image_url,
4270
+ product,
4271
+ subtitle: joinParts(kind, summarize(attributes, timeZone)),
4117
4272
  title,
4118
4273
  url: visit.url
4119
4274
  };
4120
4275
  }
4121
4276
  }
4122
- // check-ins → Check-Ins
4123
- function productName(slug) {
4124
- return slug.split("-").map(capitalize).join("-");
4125
- }
4126
4277
  function capitalize(word) {
4127
4278
  return word.charAt(0).toUpperCase() + word.slice(1);
4128
4279
  }
4129
4280
 
4130
- const STORAGE_KEY = "topbar.product_search.last_product";
4131
- function readLastProduct() {
4132
- try {
4133
- return localStorage.getItem(STORAGE_KEY);
4134
- } catch {
4135
- return null;
4136
- }
4137
- }
4138
- function saveLastProduct(slug) {
4139
- try {
4140
- localStorage.setItem(STORAGE_KEY, slug);
4141
- } catch {
4142
- // Storage can be full or blocked; search still works without it.
4281
+ var styles$j = {"container":"container-YDdM1","hint":"hint-017Rd","keycap":"keycap-ENJM2","labels":"labels-GHPqL","copied":"copied-DUFa1"};
4282
+
4283
+ const SYMBOLS = {
4284
+ command: {
4285
+ label: "⌘",
4286
+ paths: ["M7 9a2 2 0 1 1 2 -2v10a2 2 0 1 1 -2 -2h10a2 2 0 1 1 -2 2v-10a2 2 0 1 1 2 2h-10"]
4287
+ },
4288
+ down: {
4289
+ label: "↓",
4290
+ paths: ["M12 6l0 12", "M16 14l-4 4", "M8 14l4 4"]
4291
+ },
4292
+ return: {
4293
+ label: "↵",
4294
+ paths: ["M18 6v6a3 3 0 0 1 -3 3h-10l4 -4m0 8l-4 -4"]
4295
+ },
4296
+ up: {
4297
+ label: "↑",
4298
+ paths: ["M12 6l0 12", "M16 10l-4 -4", "M8 10l4 -4"]
4143
4299
  }
4300
+ };
4301
+ function Keycap(props) {
4302
+ return /*#__PURE__*/React.createElement("kbd", {
4303
+ className: styles$j.keycap
4304
+ }, "symbol" in props ? (/*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("svg", {
4305
+ "aria-hidden": true,
4306
+ fill: "none",
4307
+ stroke: "currentColor",
4308
+ strokeLinecap: "round",
4309
+ strokeLinejoin: "round",
4310
+ viewBox: "0 0 24 24"
4311
+ }, SYMBOLS[props.symbol].paths.map(d => (/*#__PURE__*/React.createElement("path", {
4312
+ d: d,
4313
+ key: d
4314
+ })))), /*#__PURE__*/React.createElement("span", {
4315
+ className: styles$k.visuallyHidden
4316
+ }, SYMBOLS[props.symbol].label))) : props.label);
4317
+ }
4318
+ function CommandKey() {
4319
+ return isMac() ? /*#__PURE__*/React.createElement(Keycap, {
4320
+ symbol: "command"
4321
+ }) : /*#__PURE__*/React.createElement(Keycap, {
4322
+ label: "Ctrl"
4323
+ });
4144
4324
  }
4145
- function initialProduct(products) {
4146
- var _a, _b, _c;
4147
- const lastProduct = readLastProduct();
4148
- const bySlug = slug => products.find(product => product.slug === slug);
4149
- return (_c = (_b = (_a = bySlug(lastProduct)) !== null && _a !== void 0 ? _a : bySlug("people")) !== null && _b !== void 0 ? _b : bySlug("services")) !== null && _c !== void 0 ? _c : products[0];
4325
+ function EnterKey() {
4326
+ return isMac() ? /*#__PURE__*/React.createElement(Keycap, {
4327
+ symbol: "return"
4328
+ }) : /*#__PURE__*/React.createElement(Keycap, {
4329
+ label: "Enter"
4330
+ });
4150
4331
  }
4151
-
4332
+ const {
4333
+ copyLink,
4334
+ openInNewTab,
4335
+ openSearch,
4336
+ select
4337
+ } = KEYBOARD_SHORTCUTS;
4152
4338
  function KeyboardHints({
4153
4339
  copied
4154
4340
  }) {
4155
- const command = commandKeyLabel();
4156
- return /*#__PURE__*/React.createElement("p", null, "\u2191\u2193 Select \u00B7 \u21B5 Open \u00B7 ", command, "\u21B5 Open in new tab \u00B7 ", command, "C", " ", /*#__PURE__*/React.createElement("span", {
4341
+ return /*#__PURE__*/React.createElement("ul", {
4342
+ "aria-label": "Keyboard shortcuts",
4343
+ className: styles$j.container
4344
+ }, /*#__PURE__*/React.createElement("li", {
4345
+ className: styles$j.hint
4346
+ }, /*#__PURE__*/React.createElement(tapestry.Flex, {
4347
+ gap: 0.5
4348
+ }, select.modifierKey, /*#__PURE__*/React.createElement(Keycap, {
4349
+ symbol: "up"
4350
+ }), /*#__PURE__*/React.createElement(Keycap, {
4351
+ symbol: "down"
4352
+ })), select.label), /*#__PURE__*/React.createElement("li", {
4353
+ className: styles$j.hint
4354
+ }, /*#__PURE__*/React.createElement(tapestry.Flex, {
4355
+ gap: 0.5
4356
+ }, /*#__PURE__*/React.createElement(CommandKey, null), /*#__PURE__*/React.createElement(EnterKey, null)), openInNewTab.label), /*#__PURE__*/React.createElement("li", {
4357
+ className: classnames(styles$j.hint, copied && styles$j.copied),
4358
+ style: {
4359
+ "--copied-active": `${COPIED_TIMING.active}ms`,
4360
+ "--copied-enter": `${COPIED_TIMING.enter}ms`,
4361
+ "--copied-exit": `${COPIED_TIMING.exit}ms`
4362
+ }
4363
+ }, /*#__PURE__*/React.createElement(tapestry.Flex, {
4364
+ gap: 0.5
4365
+ }, /*#__PURE__*/React.createElement(CommandKey, null), /*#__PURE__*/React.createElement(Keycap, {
4366
+ label: copyLink.key.toUpperCase()
4367
+ })), /*#__PURE__*/React.createElement("span", {
4368
+ className: styles$j.labels
4369
+ }, /*#__PURE__*/React.createElement("span", {
4370
+ "aria-hidden": copied
4371
+ }, copyLink.label), /*#__PURE__*/React.createElement("span", {
4157
4372
  role: "status"
4158
- }, copied ? "Copied!" : "Copy link"), " \u00B7 ", command, "K Open search");
4373
+ }, copied && "Copied!"))), /*#__PURE__*/React.createElement("li", {
4374
+ className: styles$j.hint
4375
+ }, /*#__PURE__*/React.createElement(tapestry.Flex, {
4376
+ gap: 0.5
4377
+ }, /*#__PURE__*/React.createElement(CommandKey, null), /*#__PURE__*/React.createElement(Keycap, {
4378
+ label: openSearch.key.toUpperCase()
4379
+ })), openSearch.label));
4380
+ }
4381
+
4382
+ var styles$i = {"icon":"icon-XKLvN","squircle":"squircle-JCHr6"};
4383
+
4384
+ const PRODUCTS = {
4385
+ accounts: {
4386
+ gradient: "--t-fill-color-product-accounts-gradient-brand",
4387
+ path: logomarks__namespace.accounts
4388
+ },
4389
+ api: {
4390
+ gradient: "--t-fill-color-product-api-gradient-brand",
4391
+ path: logomarks__namespace.api
4392
+ },
4393
+ calendar: {
4394
+ gradient: "--t-fill-color-product-calendar-gradient-brand",
4395
+ path: logomarks__namespace.calendar
4396
+ },
4397
+ "check-ins": {
4398
+ gradient: "--t-fill-color-product-checkins-gradient-brand",
4399
+ path: logomarks__namespace.checkIns
4400
+ },
4401
+ "church-center": {
4402
+ gradient: "--t-fill-color-product-cc-gradient-brand",
4403
+ path: logomarks__namespace.churchCenter
4404
+ },
4405
+ giving: {
4406
+ gradient: "--t-fill-color-product-giving-gradient-brand",
4407
+ path: logomarks__namespace.giving
4408
+ },
4409
+ groups: {
4410
+ gradient: "--t-fill-color-product-groups-gradient-brand",
4411
+ path: logomarks__namespace.groups
4412
+ },
4413
+ home: {
4414
+ gradient: "--t-fill-color-product-home-gradient-brand",
4415
+ path: logomarks__namespace.home
4416
+ },
4417
+ "music-stand": {
4418
+ gradient: "--t-fill-color-product-musicstand-gradient-brand",
4419
+ path: logomarks__namespace.musicStand
4420
+ },
4421
+ people: {
4422
+ gradient: "--t-fill-color-product-people-gradient-brand",
4423
+ path: logomarks__namespace.people
4424
+ },
4425
+ publishing: {
4426
+ gradient: "--t-fill-color-product-publishing-gradient-brand",
4427
+ path: logomarks__namespace.publishing
4428
+ },
4429
+ registrations: {
4430
+ gradient: "--t-fill-color-product-registrations-gradient-brand",
4431
+ path: logomarks__namespace.registrations
4432
+ },
4433
+ services: {
4434
+ gradient: "--t-fill-color-product-services-gradient-brand",
4435
+ path: logomarks__namespace.services
4436
+ }
4437
+ };
4438
+ const isProductIconSlug = slug => Object.prototype.hasOwnProperty.call(PRODUCTS, slug);
4439
+ const maskFor = path => `url("data:image/svg+xml,${encodeURIComponent(`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="${path}"/></svg>`)}")`;
4440
+ function ProductIcon({
4441
+ size = 16,
4442
+ slug
4443
+ }) {
4444
+ const {
4445
+ gradient,
4446
+ path
4447
+ } = PRODUCTS[slug];
4448
+ const mask = maskFor(path);
4449
+ return /*#__PURE__*/React.createElement("span", {
4450
+ "aria-hidden": true,
4451
+ className: styles$i.icon,
4452
+ style: {
4453
+ height: size,
4454
+ width: size
4455
+ }
4456
+ }, /*#__PURE__*/React.createElement("span", {
4457
+ className: styles$i.squircle,
4458
+ style: {
4459
+ WebkitMaskImage: mask,
4460
+ background: `var(${gradient})`,
4461
+ maskImage: mask
4462
+ }
4463
+ }));
4464
+ }
4465
+
4466
+ var styles$h = {"picker":"picker-iuzzj","option":"option--7LXg"};
4467
+
4468
+ // Phones have no room for a tab per product, so they pick from a dropdown.
4469
+ // Complex mode renders each option's logomark, in the list and the trigger.
4470
+ function ProductSelect({
4471
+ children,
4472
+ onSelect,
4473
+ products,
4474
+ selected
4475
+ }) {
4476
+ const options = products.map(({
4477
+ appName,
4478
+ slug
4479
+ }) => ({
4480
+ label: (/*#__PURE__*/React.createElement("span", {
4481
+ className: styles$h.option
4482
+ }, /*#__PURE__*/React.createElement(ProductIcon, {
4483
+ slug: slug
4484
+ }), appName)),
4485
+ textValue: appName,
4486
+ value: slug
4487
+ }));
4488
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
4489
+ className: styles$h.picker
4490
+ }, /*#__PURE__*/React.createElement(tapestry.Select, {
4491
+ "aria-label": "Product",
4492
+ complex: true,
4493
+ onChange: event => onSelect(event.target.value),
4494
+ options: options,
4495
+ value: selected.slug
4496
+ })), /*#__PURE__*/React.createElement("div", {
4497
+ className: styles$k.panel
4498
+ }, children));
4499
+ }
4500
+
4501
+ // Browsers match :focus-visible on every focused text field, keyboard or not,
4502
+ // since typing follows either way. So this remembers what last moved focus,
4503
+ // shared by every field and listened for once, in the capture phase so it's
4504
+ // known before focus moves.
4505
+ let lastInteraction = "pointer";
4506
+ let listening = false;
4507
+ function listen() {
4508
+ if (listening) return;
4509
+ listening = true;
4510
+ document.addEventListener("keydown", event => {
4511
+ // Shortcuts like ⌘C don't move focus.
4512
+ if (!event.metaKey && !event.ctrlKey && !event.altKey) {
4513
+ lastInteraction = "keyboard";
4514
+ }
4515
+ }, true);
4516
+ document.addEventListener("pointerdown", () => {
4517
+ lastInteraction = "pointer";
4518
+ }, true);
4519
+ }
4520
+ /**
4521
+ * Whether a field was focused from the keyboard, as by Tab, rather than by a
4522
+ * click or tap. Spread `focusProps` onto the field, and style it by
4523
+ * `data-focus-visible`.
4524
+ */
4525
+ function useKeyboardFocus({
4526
+ onBlur,
4527
+ onFocus
4528
+ } = {}) {
4529
+ const [focusVisible, setFocusVisible] = React.useState(false);
4530
+ React.useEffect(listen, []);
4531
+ return {
4532
+ focusProps: {
4533
+ "data-focus-visible": focusVisible || undefined,
4534
+ onBlur: event => {
4535
+ setFocusVisible(false);
4536
+ onBlur === null || onBlur === void 0 ? void 0 : onBlur(event);
4537
+ },
4538
+ onFocus: event => {
4539
+ const keyboard = lastInteraction === "keyboard";
4540
+ setFocusVisible(keyboard);
4541
+ onFocus === null || onFocus === void 0 ? void 0 : onFocus(event, keyboard);
4542
+ }
4543
+ },
4544
+ focusVisible
4545
+ };
4159
4546
  }
4160
4547
 
4161
- var styles$d = {"tab":"tab-dz8ki"};
4548
+ var styles$g = {"tablist":"tablist-7ASvc","tab":"tab-dz8ki"};
4162
4549
 
4550
+ // With this many tabs or more, only the selected tab shows its name, so they
4551
+ // all fit. Fewer always fit with their names.
4552
+ const ICON_ONLY_TAB_COUNT = 5;
4163
4553
  function ProductTabs({
4164
4554
  children,
4165
4555
  onKeyDown,
@@ -4170,6 +4560,7 @@ function ProductTabs({
4170
4560
  const id = useInstanceId("product-tabs");
4171
4561
  const tabId = slug => `${id}-tab-${slug}`;
4172
4562
  const tabRefs = React.useRef(new Map());
4563
+ const showAllNames = products.length < ICON_ONLY_TAB_COUNT;
4173
4564
  const handleKeyDown = event => {
4174
4565
  var _a;
4175
4566
  const offset = horizontalStep(event.key);
@@ -4184,13 +4575,14 @@ function ProductTabs({
4184
4575
  }
4185
4576
  };
4186
4577
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
4187
- "aria-label": "Product",
4578
+ "aria-label": "Search in",
4579
+ className: styles$g.tablist,
4188
4580
  onKeyDown: handleKeyDown,
4189
4581
  role: "tablist"
4190
- }, products.map(product => (/*#__PURE__*/React.createElement("button", {
4582
+ }, products.map(product => (/*#__PURE__*/React.createElement(Tab, {
4191
4583
  "aria-controls": `${id}-panel`,
4584
+ "aria-describedby": `${tabId(product.slug)}-description`,
4192
4585
  "aria-selected": product === selected,
4193
- className: styles$d.tab,
4194
4586
  id: tabId(product.slug),
4195
4587
  key: product.slug,
4196
4588
  onClick: () => onSelect(product.slug),
@@ -4201,15 +4593,397 @@ function ProductTabs({
4201
4593
  tabRefs.current.delete(product.slug);
4202
4594
  }
4203
4595
  },
4204
- role: "tab",
4205
- tabIndex: product === selected ? 0 : -1,
4206
- type: "button"
4207
- }, product.appName)))), /*#__PURE__*/React.createElement("div", {
4596
+ tabIndex: product === selected ? 0 : -1
4597
+ }, /*#__PURE__*/React.createElement(ProductIcon, {
4598
+ slug: product.slug
4599
+ }), showAllNames || product === selected ? product.appName : (/*#__PURE__*/React.createElement("span", {
4600
+ className: styles$k.visuallyHidden
4601
+ }, product.appName)))))), /*#__PURE__*/React.createElement("div", {
4602
+ className: styles$k.visuallyHidden
4603
+ }, products.map(product => (/*#__PURE__*/React.createElement("span", {
4604
+ id: `${tabId(product.slug)}-description`,
4605
+ key: product.slug
4606
+ }, "Planning Center ", product.appName)))), /*#__PURE__*/React.createElement("div", {
4208
4607
  "aria-labelledby": tabId(selected.slug),
4608
+ className: styles$k.panel,
4209
4609
  id: `${id}-panel`,
4210
4610
  role: "tabpanel"
4211
4611
  }, children));
4212
4612
  }
4613
+ // The modal's focus scope moves focus here by script when Tab is pressed, and
4614
+ // Safari doesn't match :focus-visible on focus moved by script. So the tab
4615
+ // remembers whether the keyboard brought focus, and the ring keys off that.
4616
+ const Tab = /*#__PURE__*/React.forwardRef(function Tab(props, ref) {
4617
+ const {
4618
+ focusProps
4619
+ } = useKeyboardFocus();
4620
+ return /*#__PURE__*/React.createElement("button", {
4621
+ className: styles$g.tab,
4622
+ ref: ref,
4623
+ role: "tab",
4624
+ type: "button",
4625
+ ...props,
4626
+ ...focusProps
4627
+ });
4628
+ });
4629
+
4630
+ function BlankStateRecentlyVisited(props) {
4631
+ const id = useInstanceId("blank-state-initial");
4632
+ return /*#__PURE__*/React.createElement("svg", {
4633
+ viewBox: "0 0 197 174",
4634
+ fill: "none",
4635
+ "aria-hidden": "true",
4636
+ focusable: "false",
4637
+ ...props
4638
+ }, /*#__PURE__*/React.createElement("path", {
4639
+ d: "M139.863 32.119c10.938 10.028 21.777 20.154 32.912 30.084 8.376 7.373 21.975 15.828 23.157 28.02.592 6.095-2.167 11.993-5.321 17.204-24.635 40.8-81.098 67.148-127.412 48.862-30.646-12.093-76.172-47.387-59.716-85.041 15.865-36.377 64.84-55.056 83.957-57.71 21.876-4.621 34.883 2.457 52.423 18.58Z",
4640
+ fill: "currentColor"
4641
+ }), /*#__PURE__*/React.createElement("g", {
4642
+ clipPath: `url(#${id}-a)`
4643
+ }, /*#__PURE__*/React.createElement("path", {
4644
+ d: "M115.885 109.31c-.478-.686-.01-1.845 1.046-2.589s2.3-.791 2.778-.105c.478.686.009 1.845-1.047 2.589-1.056.744-2.299.791-2.777.105Z",
4645
+ fill: "#333"
4646
+ }), /*#__PURE__*/React.createElement("path", {
4647
+ d: "M123.403 113.599c-3.456 0-6.259-2.817-6.259-6.293 0-3.475 2.803-6.293 6.259-6.293 3.457 0 6.259 2.818 6.259 6.293 0 3.476-2.802 6.293-6.259 6.293Z",
4648
+ fill: "#333"
4649
+ }), /*#__PURE__*/React.createElement("path", {
4650
+ d: "M118.853 100.968a2.85 2.85 0 0 0 2.832-2.484 2.89 2.89 0 0 0-.071-1.115c-2.638-9.955-9.668-9.687-9.964-9.665l.311 5.716h-.104c.119 0 2.853.134 4.254 5.421a2.874 2.874 0 0 0 1.013 1.53 2.846 2.846 0 0 0 1.729.597Z",
4651
+ fill: "#4D4D4D"
4652
+ }), /*#__PURE__*/React.createElement("path", {
4653
+ d: "M114.96 100.503c-.462-5.894 2.796-10.96 7.279-11.315 4.482-.356 8.491 4.134 8.953 10.027.462 5.894-2.796 10.96-7.279 11.315-4.482.356-8.491-4.134-8.953-10.027Z",
4654
+ fill: "#F2F2F2"
4655
+ }), /*#__PURE__*/React.createElement("path", {
4656
+ d: "M125.964 107.738c-4.48.354-8.489-4.135-8.953-10.026a12.893 12.893 0 0 1 1.223-6.707c-2.249 2.046-3.591 5.59-3.283 9.505.463 5.895 4.469 10.384 8.953 10.027 2.594-.205 4.765-1.986 6.055-4.591a6.682 6.682 0 0 1-3.995 1.792Z",
4657
+ fill: "#E6E6E6"
4658
+ }), /*#__PURE__*/React.createElement("path", {
4659
+ d: "M115.885 109.31c-.478-.686-.01-1.845 1.046-2.589s2.3-.791 2.778-.105c.478.686.009 1.845-1.047 2.589-1.056.744-2.299.791-2.777.105Z",
4660
+ fill: "#333"
4661
+ }), /*#__PURE__*/React.createElement("path", {
4662
+ d: "M123.403 113.599c-3.456 0-6.259-2.817-6.259-6.293 0-3.475 2.803-6.293 6.259-6.293 3.457 0 6.259 2.818 6.259 6.293 0 3.476-2.802 6.293-6.259 6.293Z",
4663
+ fill: "#333"
4664
+ }), /*#__PURE__*/React.createElement("path", {
4665
+ d: "M118.853 100.968a2.85 2.85 0 0 0 2.832-2.484 2.89 2.89 0 0 0-.071-1.115c-2.638-9.955-9.668-9.687-9.964-9.665l.311 5.716h-.104c.119 0 2.853.134 4.254 5.421a2.874 2.874 0 0 0 1.013 1.53 2.846 2.846 0 0 0 1.729.597Z",
4666
+ fill: "#4D4D4D"
4667
+ }), /*#__PURE__*/React.createElement("path", {
4668
+ d: "M114.96 100.503c-.462-5.894 2.796-10.96 7.279-11.315 4.482-.356 8.491 4.134 8.953 10.027.462 5.894-2.796 10.96-7.279 11.315-4.482.356-8.491-4.134-8.953-10.027Z",
4669
+ fill: "#F2F2F2"
4670
+ }), /*#__PURE__*/React.createElement("path", {
4671
+ d: "M125.964 107.738c-4.48.354-8.489-4.135-8.953-10.026a12.893 12.893 0 0 1 1.223-6.707c-2.249 2.046-3.591 5.59-3.283 9.505.463 5.895 4.469 10.384 8.953 10.027 2.594-.205 4.765-1.986 6.055-4.591a6.682 6.682 0 0 1-3.995 1.792Z",
4672
+ fill: "#E6E6E6"
4673
+ }), /*#__PURE__*/React.createElement("path", {
4674
+ d: "M89.317 121.331a2.836 2.836 0 0 1-1.92-.752 2.869 2.869 0 0 1-.911-1.857c-.534-5.726 3.527-13.808 3.99-14.713a2.849 2.849 0 0 1 1.666-1.413 2.835 2.835 0 0 1 2.172.185 2.86 2.86 0 0 1 1.405 1.675 2.876 2.876 0 0 1-.184 2.183c-1.46 2.843-3.669 8.492-3.383 11.551a2.868 2.868 0 0 1-1.504 2.797 2.84 2.84 0 0 1-1.064.318 1.378 1.378 0 0 1-.267.026Z",
4675
+ fill: "#4D4D4D"
4676
+ }), /*#__PURE__*/React.createElement("path", {
4677
+ d: "M92.155 112.314c3.308 0 5.989-2.696 5.989-6.021 0-3.326-2.681-6.021-5.989-6.021-3.307 0-5.988 2.695-5.988 6.021 0 3.325 2.681 6.021 5.988 6.021Z",
4678
+ fill: "gray"
4679
+ }), /*#__PURE__*/React.createElement("path", {
4680
+ d: "M80.597 128.771h11.769v3.726a1.118 1.118 0 0 1-1.112 1.118H78.57a1.118 1.118 0 0 1-1.112-1.118v-.566c0-.841.332-1.648.924-2.242a3.144 3.144 0 0 1 2.23-.929l-.015.011Z",
4681
+ fill: "#333"
4682
+ }), /*#__PURE__*/React.createElement("path", {
4683
+ d: "M89.572 132.084s8.075.119 6.3-8.268c-1.775-8.387-12.188-15.351-15.234-6.066-3.046 9.285-1.386 15.232 8.934 14.334Z",
4684
+ fill: "#F2F2F2"
4685
+ }), /*#__PURE__*/React.createElement("path", {
4686
+ d: "M106.67 121.334h-.27a2.84 2.84 0 0 1-1.925-1.025 2.872 2.872 0 0 1-.639-2.093c.285-3.059-1.92-8.708-3.38-11.551a2.873 2.873 0 0 1 1.296-3.721 2.832 2.832 0 0 1 2.102-.199 2.848 2.848 0 0 1 1.66 1.312c.463.906 4.521 8.991 3.988 14.714a2.874 2.874 0 0 1-.926 1.828 2.832 2.832 0 0 1-1.906.735Z",
4687
+ fill: "#4D4D4D"
4688
+ }), /*#__PURE__*/React.createElement("path", {
4689
+ d: "M103.835 112.314c3.307 0 5.988-2.696 5.988-6.021 0-3.326-2.681-6.021-5.988-6.021-3.307 0-5.988 2.695-5.988 6.021 0 3.325 2.681 6.021 5.988 6.021Z",
4690
+ fill: "gray"
4691
+ }), /*#__PURE__*/React.createElement("path", {
4692
+ d: "m117.408 133.652-12.674-.002c-.295 0-.577-.118-.786-.328a1.121 1.121 0 0 1-.325-.79v-3.726l11.773.002c.837 0 1.639.334 2.23.929s.923 1.401.923 2.242v.567a1.116 1.116 0 0 1-1.141 1.106Z",
4693
+ fill: "#333"
4694
+ }), /*#__PURE__*/React.createElement("path", {
4695
+ d: "M106.414 132.084s-8.075.119-6.318-8.268c1.756-8.387 12.195-15.343 15.237-6.062 3.043 9.281 1.405 15.235-8.919 14.33Z",
4696
+ fill: "#F2F2F2"
4697
+ }), /*#__PURE__*/React.createElement("path", {
4698
+ d: "M109.107 94.58a2.305 2.305 0 0 0 2.191 2.412 2.302 2.302 0 0 0 2.399-2.202l.333-7.33a2.306 2.306 0 0 0-2.191-2.412 2.303 2.303 0 0 0-2.4 2.203l-.332 7.328Z",
4699
+ fill: "gray"
4700
+ }), /*#__PURE__*/React.createElement("path", {
4701
+ d: "M80.968 109.31c.478-.686.01-1.845-1.047-2.589-1.056-.744-2.3-.791-2.777-.105-.478.686-.01 1.845 1.046 2.589s2.3.791 2.778.105Z",
4702
+ fill: "#333"
4703
+ }), /*#__PURE__*/React.createElement("path", {
4704
+ d: "M73.448 113.599c3.457 0 6.26-2.817 6.26-6.293 0-3.475-2.803-6.293-6.26-6.293-3.456 0-6.258 2.818-6.258 6.293 0 3.476 2.802 6.293 6.258 6.293Z",
4705
+ fill: "#333"
4706
+ }), /*#__PURE__*/React.createElement("path", {
4707
+ d: "M78 100.968a2.853 2.853 0 0 1-2.832-2.484 2.876 2.876 0 0 1 .07-1.115c2.639-9.955 9.669-9.687 9.965-9.665l-.311 5.716h.104c-.12 0-2.854.134-4.255 5.421a2.87 2.87 0 0 1-1.013 1.53 2.845 2.845 0 0 1-1.729.597Z",
4708
+ fill: "#4D4D4D"
4709
+ }), /*#__PURE__*/React.createElement("path", {
4710
+ d: "M87.37 88.17a2.305 2.305 0 0 0-2.19-2.413 2.302 2.302 0 0 0-2.4 2.202l-.332 7.329a2.305 2.305 0 0 0 2.19 2.413 2.302 2.302 0 0 0 2.4-2.203l.332-7.328Z",
4711
+ fill: "gray"
4712
+ }), /*#__PURE__*/React.createElement("path", {
4713
+ d: "M81.893 100.503c.462-5.894-2.797-10.96-7.28-11.315-4.482-.356-8.49 4.134-8.953 10.027-.462 5.894 2.797 10.96 7.28 11.315 4.482.356 8.49-4.134 8.953-10.027Z",
4714
+ fill: "#F2F2F2"
4715
+ }), /*#__PURE__*/React.createElement("path", {
4716
+ d: "M70.888 107.738c4.48.354 8.49-4.135 8.953-10.026a12.89 12.89 0 0 0-1.223-6.707c2.25 2.046 3.591 5.59 3.284 9.505-.464 5.895-4.47 10.384-8.953 10.027-2.594-.205-4.766-1.986-6.055-4.591a6.682 6.682 0 0 0 3.994 1.792Z",
4717
+ fill: "#E6E6E6"
4718
+ }), /*#__PURE__*/React.createElement("path", {
4719
+ d: "M112.717 94.105c-.511-9.095-7.459-11.703-15.82-11.226-8.36.477-14.97 3.856-14.451 12.951.518 9.095 7.707 16.081 16.067 15.605 8.36-.477 14.719-8.231 14.204-17.33Z",
4720
+ fill: "#F2F2F2"
4721
+ }), /*#__PURE__*/React.createElement("path", {
4722
+ d: "M112.565 92.656c-1.056 7.496-6.799 13.413-14.059 13.812-7.852.451-14.67-5.686-15.897-13.965a14.571 14.571 0 0 0-.17 3.327c.51 9.095 7.704 16.081 16.067 15.605 8.364-.477 14.723-8.235 14.211-17.33a16.83 16.83 0 0 0-.152-1.45Z",
4723
+ fill: "#E6E6E6"
4724
+ }), /*#__PURE__*/React.createElement("path", {
4725
+ d: "M103.546 90.353H91.61a.62.62 0 0 0-.619.623v1.762a.62.62 0 0 0 .62.622h11.935a.62.62 0 0 0 .619-.622v-1.762a.62.62 0 0 0-.619-.623Zm0 5.187H91.61a.62.62 0 0 0-.619.622v1.762a.62.62 0 0 0 .62.623h11.935a.62.62 0 0 0 .619-.623v-1.762a.62.62 0 0 0-.619-.622Zm-.004 5.19H91.606a.62.62 0 0 0-.619.622v1.763a.62.62 0 0 0 .62.622h11.935a.62.62 0 0 0 .619-.622v-1.763a.62.62 0 0 0-.619-.622Z",
4726
+ fill: "#3690EA"
4727
+ }), /*#__PURE__*/React.createElement("path", {
4728
+ d: "M89.317 121.331a2.836 2.836 0 0 1-1.92-.752 2.869 2.869 0 0 1-.911-1.857c-.534-5.726 3.527-13.808 3.99-14.713a2.849 2.849 0 0 1 1.666-1.413 2.835 2.835 0 0 1 2.172.185 2.86 2.86 0 0 1 1.405 1.675 2.876 2.876 0 0 1-.184 2.183c-1.46 2.843-3.669 8.492-3.383 11.551a2.868 2.868 0 0 1-1.504 2.797 2.84 2.84 0 0 1-1.064.318 1.378 1.378 0 0 1-.267.026Z",
4729
+ fill: "#4D4D4D"
4730
+ }), /*#__PURE__*/React.createElement("path", {
4731
+ d: "M92.155 112.314c3.308 0 5.989-2.696 5.989-6.021 0-3.326-2.681-6.021-5.989-6.021-3.307 0-5.988 2.695-5.988 6.021 0 3.325 2.681 6.021 5.988 6.021Z",
4732
+ fill: "gray"
4733
+ }), /*#__PURE__*/React.createElement("path", {
4734
+ d: "M80.597 128.771h11.769v3.726a1.118 1.118 0 0 1-1.112 1.118H78.57a1.118 1.118 0 0 1-1.112-1.118v-.566c0-.841.332-1.648.924-2.242a3.144 3.144 0 0 1 2.23-.929l-.015.011Z",
4735
+ fill: "#333"
4736
+ }), /*#__PURE__*/React.createElement("path", {
4737
+ d: "M89.572 132.084s8.075.119 6.3-8.268c-1.775-8.387-12.188-15.351-15.234-6.066-3.046 9.285-1.386 15.232 8.934 14.334Z",
4738
+ fill: "#F2F2F2"
4739
+ }), /*#__PURE__*/React.createElement("path", {
4740
+ d: "M106.67 121.334h-.27a2.84 2.84 0 0 1-1.925-1.025 2.872 2.872 0 0 1-.639-2.093c.285-3.059-1.92-8.708-3.38-11.551a2.873 2.873 0 0 1 1.296-3.721 2.832 2.832 0 0 1 2.102-.199 2.848 2.848 0 0 1 1.66 1.312c.463.906 4.521 8.991 3.988 14.714a2.874 2.874 0 0 1-.926 1.828 2.832 2.832 0 0 1-1.906.735Z",
4741
+ fill: "#4D4D4D"
4742
+ }), /*#__PURE__*/React.createElement("path", {
4743
+ d: "M103.835 112.314c3.307 0 5.988-2.696 5.988-6.021 0-3.326-2.681-6.021-5.988-6.021-3.307 0-5.988 2.695-5.988 6.021 0 3.325 2.681 6.021 5.988 6.021Z",
4744
+ fill: "gray"
4745
+ }), /*#__PURE__*/React.createElement("path", {
4746
+ d: "m117.408 133.652-12.674-.002c-.295 0-.577-.118-.786-.328a1.121 1.121 0 0 1-.325-.79v-3.726l11.773.002c.837 0 1.639.334 2.23.929s.923 1.401.923 2.242v.567a1.116 1.116 0 0 1-1.141 1.106Z",
4747
+ fill: "#333"
4748
+ }), /*#__PURE__*/React.createElement("path", {
4749
+ d: "M106.414 132.084s-8.075.119-6.318-8.268c1.756-8.387 12.195-15.343 15.237-6.062 3.043 9.281 1.405 15.235-8.919 14.33Z",
4750
+ fill: "#F2F2F2"
4751
+ }), /*#__PURE__*/React.createElement("path", {
4752
+ d: "M109.107 94.58a2.305 2.305 0 0 0 2.191 2.412 2.302 2.302 0 0 0 2.399-2.202l.333-7.33a2.306 2.306 0 0 0-2.191-2.412 2.303 2.303 0 0 0-2.4 2.203l-.332 7.328Z",
4753
+ fill: "gray"
4754
+ }), /*#__PURE__*/React.createElement("path", {
4755
+ d: "M80.968 109.31c.478-.686.01-1.845-1.047-2.589-1.056-.744-2.3-.791-2.777-.105-.478.686-.01 1.845 1.046 2.589s2.3.791 2.778.105Z",
4756
+ fill: "#333"
4757
+ }), /*#__PURE__*/React.createElement("path", {
4758
+ d: "M73.448 113.599c3.457 0 6.26-2.817 6.26-6.293 0-3.475-2.803-6.293-6.26-6.293-3.456 0-6.258 2.818-6.258 6.293 0 3.476 2.802 6.293 6.258 6.293Z",
4759
+ fill: "#333"
4760
+ }), /*#__PURE__*/React.createElement("path", {
4761
+ d: "M78 100.968a2.853 2.853 0 0 1-2.832-2.484 2.876 2.876 0 0 1 .07-1.115c2.639-9.955 9.669-9.687 9.965-9.665l-.311 5.716h.104c-.12 0-2.854.134-4.255 5.421a2.87 2.87 0 0 1-1.013 1.53 2.845 2.845 0 0 1-1.729.597Z",
4762
+ fill: "#4D4D4D"
4763
+ }), /*#__PURE__*/React.createElement("path", {
4764
+ d: "M87.37 88.17a2.305 2.305 0 0 0-2.19-2.413 2.302 2.302 0 0 0-2.4 2.202l-.332 7.329a2.305 2.305 0 0 0 2.19 2.413 2.302 2.302 0 0 0 2.4-2.203l.332-7.328Z",
4765
+ fill: "gray"
4766
+ }), /*#__PURE__*/React.createElement("path", {
4767
+ d: "M81.893 100.503c.462-5.894-2.797-10.96-7.28-11.315-4.482-.356-8.49 4.134-8.953 10.027-.462 5.894 2.797 10.96 7.28 11.315 4.482.356 8.49-4.134 8.953-10.027Z",
4768
+ fill: "#F2F2F2"
4769
+ }), /*#__PURE__*/React.createElement("path", {
4770
+ d: "M70.888 107.738c4.48.354 8.49-4.135 8.953-10.026a12.89 12.89 0 0 0-1.223-6.707c2.25 2.046 3.591 5.59 3.284 9.505-.464 5.895-4.47 10.384-8.953 10.027-2.594-.205-4.766-1.986-6.055-4.591a6.682 6.682 0 0 0 3.994 1.792Z",
4771
+ fill: "#E6E6E6"
4772
+ }), /*#__PURE__*/React.createElement("path", {
4773
+ d: "M112.717 94.105c-.511-9.095-7.459-11.703-15.82-11.226-8.36.477-14.97 3.856-14.451 12.951.518 9.095 7.707 16.081 16.067 15.605 8.36-.477 14.719-8.231 14.204-17.33Z",
4774
+ fill: "#F2F2F2"
4775
+ }), /*#__PURE__*/React.createElement("path", {
4776
+ d: "M112.565 92.656c-1.056 7.496-6.799 13.413-14.059 13.812-7.852.451-14.67-5.686-15.897-13.965a14.571 14.571 0 0 0-.17 3.327c.51 9.095 7.704 16.081 16.067 15.605 8.364-.477 14.723-8.235 14.211-17.33a16.83 16.83 0 0 0-.152-1.45Z",
4777
+ fill: "#E6E6E6"
4778
+ }), /*#__PURE__*/React.createElement("path", {
4779
+ d: "M94.626 78.445c-.114-.488 6.548-.927 5.815.246v.775c0 .746.033 1.49.033 2.258s.037 1.595.044 2.392c.278.593-6.473.935-5.817-.115v-.67c-.015-1.63-.06-3.257-.075-4.886Z",
4780
+ fill: "#999"
4781
+ }), /*#__PURE__*/React.createElement("path", {
4782
+ d: "M103.546 90.353H91.61a.62.62 0 0 0-.619.623v1.762a.62.62 0 0 0 .62.622h11.935a.62.62 0 0 0 .619-.622v-1.762a.62.62 0 0 0-.619-.623Zm0 5.187H91.61a.62.62 0 0 0-.619.622v1.762a.62.62 0 0 0 .62.623h11.935a.62.62 0 0 0 .619-.623v-1.762a.62.62 0 0 0-.619-.622Zm-.004 5.19H91.606a.62.62 0 0 0-.619.622v1.763a.62.62 0 0 0 .62.622h11.935a.62.62 0 0 0 .619-.622v-1.763a.62.62 0 0 0-.619-.622ZM55.773 64.004c4.349 0 7.874-5.285 7.874-11.804s-3.525-11.804-7.874-11.804-7.875 5.285-7.875 11.804c0 6.52 3.526 11.804 7.875 11.804Zm84.17.015c4.349 0 7.874-5.285 7.874-11.804 0-6.52-3.525-11.804-7.874-11.804s-7.875 5.285-7.875 11.804 3.526 11.804 7.875 11.804Z",
4783
+ fill: "#3690EA"
4784
+ }), /*#__PURE__*/React.createElement("path", {
4785
+ d: "M97.962 29.036c7.273 0 13.17-2.224 13.17-4.967 0-2.743-5.897-4.966-13.17-4.966-7.274 0-13.17 2.223-13.17 4.966 0 2.743 5.896 4.967 13.17 4.967Z",
4786
+ fill: "#B3B3B3"
4787
+ }), /*#__PURE__*/React.createElement("path", {
4788
+ d: "M97.962 16.55c4.545 0 8.23-3.705 8.23-8.275S102.507 0 97.962 0c-4.546 0-8.23 3.705-8.23 8.275s3.684 8.275 8.23 8.275Z",
4789
+ fill: "#3690EA"
4790
+ }), /*#__PURE__*/React.createElement("path", {
4791
+ d: "M141.607 59.283V45.147a19.038 19.038 0 0 0-3.687-11.301 18.872 18.872 0 0 0-9.653-6.874c-8.838-2.69-19.203-4.24-30.29-4.244-11.088-.004-21.452 1.546-30.29 4.233a18.871 18.871 0 0 0-9.668 6.866 19.041 19.041 0 0 0-3.699 11.305v14.132a19.03 19.03 0 0 0 3.685 11.303 18.86 18.86 0 0 0 9.656 6.872c8.841 2.694 19.206 4.244 30.29 4.244 11.083 0 21.452-1.542 30.294-4.233a18.858 18.858 0 0 0 9.666-6.863 19.028 19.028 0 0 0 3.696-11.304Z",
4792
+ fill: "#F2F2F2"
4793
+ }), /*#__PURE__*/React.createElement("path", {
4794
+ d: "M97.954 75.051c-10.068 0-19.88-1.371-28.381-3.957a12.353 12.353 0 0 1-6.262-4.485 12.463 12.463 0 0 1-2.41-7.34V45.131c.006-2.642.85-5.214 2.411-7.34a12.345 12.345 0 0 1 6.264-4.482c8.501-2.586 18.317-3.95 28.382-3.95 10.065 0 19.877 1.371 28.382 3.96a12.35 12.35 0 0 1 6.262 4.486 12.46 12.46 0 0 1 2.409 7.34V59.28a12.453 12.453 0 0 1-2.41 7.341 12.343 12.343 0 0 1-6.265 4.482c-8.486 2.585-18.317 3.949-28.382 3.949Z",
4795
+ fill: "#E6E6E6"
4796
+ }), /*#__PURE__*/React.createElement("path", {
4797
+ d: "M100.863 15.992h-5.81v1.293h5.81v-1.293Z",
4798
+ fill: "#F2F2F2"
4799
+ }), /*#__PURE__*/React.createElement("path", {
4800
+ d: "M76.472 66.05c4.327 0 7.834-6.2 7.834-13.846 0-7.647-3.507-13.846-7.834-13.846-4.326 0-7.833 6.2-7.833 13.846s3.507 13.845 7.833 13.845Z",
4801
+ fill: "#1A1A1A"
4802
+ }), /*#__PURE__*/React.createElement("path", {
4803
+ d: "M77.844 52.766c1.743 0 3.157-2.088 3.157-4.664 0-2.577-1.414-4.665-3.157-4.665-1.744 0-3.157 2.088-3.157 4.665 0 2.576 1.413 4.664 3.157 4.664Z",
4804
+ fill: "#fff"
4805
+ }), /*#__PURE__*/React.createElement("path", {
4806
+ d: "M118.662 66.057c4.326 0 7.834-6.2 7.834-13.846s-3.508-13.845-7.834-13.845c-4.327 0-7.834 6.199-7.834 13.845 0 7.647 3.507 13.846 7.834 13.846Z",
4807
+ fill: "#1A1A1A"
4808
+ }), /*#__PURE__*/React.createElement("path", {
4809
+ d: "M120.032 52.774c1.744 0 3.157-2.089 3.157-4.665s-1.413-4.665-3.157-4.665c-1.743 0-3.157 2.089-3.157 4.665s1.414 4.665 3.157 4.665Z",
4810
+ fill: "#fff"
4811
+ }), /*#__PURE__*/React.createElement("path", {
4812
+ d: "M92.674 63.11a10.286 10.286 0 0 0 7.949 1.095 13.2 13.2 0 0 0 2.623-1.118.738.738 0 0 1 1.035.639.748.748 0 0 1-.119.453c-2.224 2.82-6.474 3.625-9.672 2.12a7.284 7.284 0 0 1-2.75-2.12.748.748 0 0 1 .465-1.139.738.738 0 0 1 .469.054v.015Z",
4813
+ fill: "#999"
4814
+ }), /*#__PURE__*/React.createElement("path", {
4815
+ d: "M55.773 64.004c4.349 0 7.874-5.285 7.874-11.804s-3.525-11.804-7.874-11.804-7.875 5.285-7.875 11.804c0 6.52 3.526 11.804 7.875 11.804Zm84.17.015c4.349 0 7.874-5.285 7.874-11.804 0-6.52-3.525-11.804-7.874-11.804s-7.875 5.285-7.875 11.804 3.526 11.804 7.875 11.804Z",
4816
+ fill: "#3690EA"
4817
+ }), /*#__PURE__*/React.createElement("path", {
4818
+ d: "M95.008 14.315c-.115-.488 6.548-.932 5.815.246v.771c0 .745.033 1.51.037 2.262.003.752.033 1.594.04 2.392.282.592-6.474.935-5.818-.116v-.67c-.014-1.629-.055-3.257-.074-4.885Z",
4819
+ fill: "#F2F2F2"
4820
+ }), /*#__PURE__*/React.createElement("path", {
4821
+ d: "M97.962 29.036c7.273 0 13.17-2.224 13.17-4.967 0-2.743-5.897-4.966-13.17-4.966-7.274 0-13.17 2.223-13.17 4.966 0 2.743 5.896 4.967 13.17 4.967Z",
4822
+ fill: "#B3B3B3"
4823
+ }), /*#__PURE__*/React.createElement("path", {
4824
+ d: "M97.962 16.55c4.545 0 8.23-3.705 8.23-8.275S102.507 0 97.962 0c-4.546 0-8.23 3.705-8.23 8.275s3.684 8.275 8.23 8.275Z",
4825
+ fill: "#3690EA"
4826
+ }), /*#__PURE__*/React.createElement("path", {
4827
+ d: "M141.607 59.283V45.147a19.038 19.038 0 0 0-3.687-11.301 18.872 18.872 0 0 0-9.653-6.874c-8.838-2.69-19.203-4.24-30.29-4.244-11.088-.004-21.452 1.546-30.29 4.233a18.871 18.871 0 0 0-9.668 6.866 19.041 19.041 0 0 0-3.699 11.305v14.132a19.03 19.03 0 0 0 3.685 11.303 18.86 18.86 0 0 0 9.656 6.872c8.841 2.694 19.206 4.244 30.29 4.244 11.083 0 21.452-1.542 30.294-4.233a18.858 18.858 0 0 0 9.666-6.863 19.028 19.028 0 0 0 3.696-11.304Z",
4828
+ fill: "#F2F2F2"
4829
+ }), /*#__PURE__*/React.createElement("path", {
4830
+ d: "M97.954 75.051c-10.068 0-19.88-1.371-28.381-3.957a12.353 12.353 0 0 1-6.262-4.485 12.463 12.463 0 0 1-2.41-7.34V45.131c.006-2.642.85-5.214 2.411-7.34a12.345 12.345 0 0 1 6.264-4.482c8.501-2.586 18.317-3.95 28.382-3.95 10.065 0 19.877 1.371 28.382 3.96a12.35 12.35 0 0 1 6.262 4.486 12.46 12.46 0 0 1 2.409 7.34V59.28a12.453 12.453 0 0 1-2.41 7.341 12.343 12.343 0 0 1-6.265 4.482c-8.486 2.585-18.317 3.949-28.382 3.949Zm2.909-59.059h-5.81v1.293h5.81v-1.293Z",
4831
+ fill: "#E6E6E6"
4832
+ }), /*#__PURE__*/React.createElement("path", {
4833
+ d: "M76.472 66.05c4.327 0 7.834-6.2 7.834-13.846 0-7.647-3.507-13.846-7.834-13.846-4.326 0-7.833 6.2-7.833 13.846s3.507 13.845 7.833 13.845Z",
4834
+ fill: "#1A1A1A"
4835
+ }), /*#__PURE__*/React.createElement("path", {
4836
+ d: "M77.844 52.766c1.743 0 3.157-2.088 3.157-4.664 0-2.577-1.414-4.665-3.157-4.665-1.744 0-3.157 2.088-3.157 4.665 0 2.576 1.413 4.664 3.157 4.664Z",
4837
+ fill: "#fff"
4838
+ }), /*#__PURE__*/React.createElement("path", {
4839
+ d: "M118.662 66.057c4.326 0 7.834-6.2 7.834-13.846s-3.508-13.845-7.834-13.845c-4.327 0-7.834 6.199-7.834 13.845 0 7.647 3.507 13.846 7.834 13.846Z",
4840
+ fill: "#1A1A1A"
4841
+ }), /*#__PURE__*/React.createElement("path", {
4842
+ d: "M120.032 52.774c1.744 0 3.157-2.089 3.157-4.665s-1.413-4.665-3.157-4.665c-1.743 0-3.157 2.089-3.157 4.665s1.414 4.665 3.157 4.665Z",
4843
+ fill: "#fff"
4844
+ }), /*#__PURE__*/React.createElement("path", {
4845
+ d: "M92.674 63.11a10.286 10.286 0 0 0 7.949 1.095 13.2 13.2 0 0 0 2.623-1.118.738.738 0 0 1 1.035.639.748.748 0 0 1-.119.453c-2.224 2.82-6.474 3.625-9.672 2.12a7.284 7.284 0 0 1-2.75-2.12.748.748 0 0 1 .465-1.139.738.738 0 0 1 .469.054v.015Z",
4846
+ fill: "#999"
4847
+ }), /*#__PURE__*/React.createElement("path", {
4848
+ d: "M101.117 9.562a3.035 3.035 0 0 0 3.027-3.043 3.035 3.035 0 0 0-3.027-3.043A3.035 3.035 0 0 0 98.09 6.52a3.035 3.035 0 0 0 3.027 3.043ZM51.578 54.84c.801 0 1.45-1.64 1.45-3.66 0-2.023-.649-3.662-1.45-3.662-.802 0-1.451 1.64-1.451 3.661 0 2.022.65 3.66 1.45 3.66Zm93.429 0c.802 0 1.451-1.64 1.451-3.66 0-2.023-.649-3.662-1.451-3.662-.801 0-1.45 1.64-1.45 3.661 0 2.022.649 3.66 1.45 3.66Z",
4849
+ fill: "#4BAAF7"
4850
+ }), /*#__PURE__*/React.createElement("g", {
4851
+ clipPath: `url(#${id}-b)`
4852
+ }, /*#__PURE__*/React.createElement("path", {
4853
+ d: "M52.39 160.841h-2.919a1.774 1.774 0 0 1-1.766-1.782v-7.334h9.035l-2.677 7.911a1.766 1.766 0 0 1-1.671 1.206l-.001-.001Zm91.774 0h2.919c.977 0 1.767-.799 1.767-1.782v-7.334h-9.036l2.677 7.911a1.767 1.767 0 0 0 1.672 1.206l.001-.001Z",
4854
+ fill: "#6D4932"
4855
+ }), /*#__PURE__*/React.createElement("path", {
4856
+ d: "M163.181 108.015H33.375c-2.37 0-4.291 1.479-4.291 3.305v2.216c0 1.825 1.921 3.305 4.29 3.305h129.807c2.369 0 4.29-1.48 4.29-3.305v-2.216c0-1.826-1.921-3.305-4.29-3.305Z",
4857
+ fill: "#A87B5D"
4858
+ }), /*#__PURE__*/React.createElement("path", {
4859
+ d: "M38.282 116.841h119.992v33.16c0 1.648-1.554 2.985-3.469 2.985H41.752c-1.915 0-3.468-1.337-3.468-2.985v-33.16h-.002Z",
4860
+ fill: "#916A50"
4861
+ }), /*#__PURE__*/React.createElement("path", {
4862
+ opacity: ".3",
4863
+ d: "M131.002 109.794h-97.18a.996.996 0 0 0-.992 1.001c0 .552.444 1 .992 1h97.18a.996.996 0 0 0 .991-1 .996.996 0 0 0-.991-1.001Zm30.849 0h-24.24a.996.996 0 0 0-.992 1.001c0 .552.444 1 .992 1h24.24a.996.996 0 0 0 .992-1 .996.996 0 0 0-.992-1.001Z",
4864
+ fill: "#D4B097"
4865
+ })), /*#__PURE__*/React.createElement("g", {
4866
+ clipPath: `url(#${id}-c)`
4867
+ }, /*#__PURE__*/React.createElement("path", {
4868
+ d: "M151.367 97.536h2.894c1.6 0 2.895 1.307 2.895 2.913a2.906 2.906 0 0 1-2.895 2.914h-2.894v-5.827Z",
4869
+ strokeWidth: "6",
4870
+ strokeMiterlimit: "10",
4871
+ stroke: `url(#${id}-d)`
4872
+ }), /*#__PURE__*/React.createElement("path", {
4873
+ d: "M135.876 93.304h17.017a.6.6 0 0 1 .597.602v10.166c0 1.942-1.566 3.522-3.499 3.522h-11.214c-1.933 0-3.499-1.58-3.499-3.522V93.906a.6.6 0 0 1 .598-.602Z",
4874
+ fill: `url(#${id}-e)`
4875
+ })), /*#__PURE__*/React.createElement("path", {
4876
+ d: "m37.492 78.174 38.863-6.725a3.453 3.453 0 0 1 3.455 3.45v30.087H34.04V81.623a3.452 3.452 0 0 1 3.452-3.45Z",
4877
+ fill: `url(#${id}-f)`
4878
+ }), /*#__PURE__*/React.createElement("path", {
4879
+ d: "M34.1 108.015v-3.363h57.697v3.363H34.1Z",
4880
+ fill: `url(#${id}-g)`
4881
+ }), /*#__PURE__*/React.createElement("path", {
4882
+ d: "M79.673 108.015v-3.363h12.124v3.363H79.673Z",
4883
+ fill: `url(#${id}-h)`
4884
+ })), /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("linearGradient", {
4885
+ id: `${id}-d`,
4886
+ x1: "150.254",
4887
+ y1: "100.449",
4888
+ x2: "158.273",
4889
+ y2: "100.449",
4890
+ gradientUnits: "userSpaceOnUse"
4891
+ }, /*#__PURE__*/React.createElement("stop", {
4892
+ stopColor: "#FEFEFE"
4893
+ }), /*#__PURE__*/React.createElement("stop", {
4894
+ offset: "1",
4895
+ stopColor: "#fff"
4896
+ })), /*#__PURE__*/React.createElement("linearGradient", {
4897
+ id: `${id}-e`,
4898
+ x1: "132.629",
4899
+ y1: "100.449",
4900
+ x2: "155.32",
4901
+ y2: "100.449",
4902
+ gradientUnits: "userSpaceOnUse"
4903
+ }, /*#__PURE__*/React.createElement("stop", {
4904
+ stopColor: "#FEFEFE"
4905
+ }), /*#__PURE__*/React.createElement("stop", {
4906
+ offset: "1",
4907
+ stopColor: "#F3F3F3"
4908
+ })), /*#__PURE__*/React.createElement("linearGradient", {
4909
+ id: `${id}-f`,
4910
+ x1: "56.925",
4911
+ y1: "45.291",
4912
+ x2: "56.925",
4913
+ y2: "93.076",
4914
+ gradientUnits: "userSpaceOnUse"
4915
+ }, /*#__PURE__*/React.createElement("stop", {
4916
+ stopColor: "#FEFEFE"
4917
+ }), /*#__PURE__*/React.createElement("stop", {
4918
+ offset: "1",
4919
+ stopColor: "#D1D6E7"
4920
+ })), /*#__PURE__*/React.createElement("linearGradient", {
4921
+ id: `${id}-g`,
4922
+ x1: "62.684",
4923
+ y1: "108.015",
4924
+ x2: "62.684",
4925
+ y2: "104.85",
4926
+ gradientUnits: "userSpaceOnUse"
4927
+ }, /*#__PURE__*/React.createElement("stop", {
4928
+ stopColor: "#D2D6E8"
4929
+ }), /*#__PURE__*/React.createElement("stop", {
4930
+ offset: ".726",
4931
+ stopColor: "#D1D6E7"
4932
+ })), /*#__PURE__*/React.createElement("linearGradient", {
4933
+ id: `${id}-h`,
4934
+ x1: "85.68",
4935
+ y1: "108.015",
4936
+ x2: "85.68",
4937
+ y2: "104.85",
4938
+ gradientUnits: "userSpaceOnUse"
4939
+ }, /*#__PURE__*/React.createElement("stop", {
4940
+ stopColor: "#D8DDF1"
4941
+ }), /*#__PURE__*/React.createElement("stop", {
4942
+ offset: ".726",
4943
+ stopColor: "#E2E6F6"
4944
+ })), /*#__PURE__*/React.createElement("clipPath", {
4945
+ id: `${id}-a`
4946
+ }, /*#__PURE__*/React.createElement("path", {
4947
+ fill: "#fff",
4948
+ transform: "translate(12.006)",
4949
+ d: "M0 0h172v174H0z"
4950
+ })), /*#__PURE__*/React.createElement("clipPath", {
4951
+ id: `${id}-b`
4952
+ }, /*#__PURE__*/React.createElement("path", {
4953
+ fill: "#fff",
4954
+ transform: "translate(29.084 105.073)",
4955
+ d: "M0 0h138.387v68.927H0z"
4956
+ })), /*#__PURE__*/React.createElement("clipPath", {
4957
+ id: `${id}-c`
4958
+ }, /*#__PURE__*/React.createElement("path", {
4959
+ fill: "#fff",
4960
+ transform: "translate(135.278 93.304)",
4961
+ d: "M0 0h22.995v14.29H0z"
4962
+ }))));
4963
+ }
4964
+
4965
+ var styles$f = {"blank_state":"blank_state-wMOWN","image":"image-uy0Fd"};
4966
+
4967
+ function BlankState$1({
4968
+ image,
4969
+ role,
4970
+ subtitle,
4971
+ title
4972
+ }) {
4973
+ return /*#__PURE__*/React.createElement(tapestry.Flex, {
4974
+ role: role,
4975
+ className: styles$f.blank_state,
4976
+ direction: "column",
4977
+ align: "center",
4978
+ gap: 3
4979
+ }, /*#__PURE__*/React.createElement(tapestry.Flex, {
4980
+ className: styles$f.image
4981
+ }, image), /*#__PURE__*/React.createElement(tapestry.Flex, {
4982
+ direction: "column",
4983
+ align: "center",
4984
+ gap: 1
4985
+ }, /*#__PURE__*/React.createElement("h2", null, title), /*#__PURE__*/React.createElement("p", null, subtitle)));
4986
+ }
4213
4987
 
4214
4988
  function EndOfResultsObserver({
4215
4989
  onVisible
@@ -4229,39 +5003,98 @@ function EndOfResultsObserver({
4229
5003
 
4230
5004
  const resultId = (listboxId, index) => `${listboxId}-result-${index}`;
4231
5005
 
4232
- var styles$c = {"result":"result-Thq2C"};
5006
+ var styles$e = {"result":"result-Thq2C","title":"title-KYUEn","subtitle":"subtitle-R2haq","image":"image-KVDor","avatar":"avatar-6Gh62","photo":"photo-FZR3Q","badge":"badge-trUKt"};
4233
5007
 
4234
5008
  function SearchResult({
5009
+ category,
5010
+ describedBy,
4235
5011
  highlighted,
4236
5012
  id,
5013
+ imageUrl,
4237
5014
  onHighlight,
5015
+ product,
4238
5016
  subtitle,
4239
5017
  title,
4240
5018
  url
4241
5019
  }) {
4242
5020
  const ref = React.useRef(null);
5021
+ // A hovered result is already under the pointer, and scrolling it clear of
5022
+ // the panel's scroll padding would slide the list out from under the mouse.
5023
+ const highlightedByPointer = React.useRef(false);
4243
5024
  React.useEffect(() => {
4244
5025
  var _a;
4245
- if (highlighted) (_a = ref.current) === null || _a === void 0 ? void 0 : _a.scrollIntoView({
4246
- block: "nearest"
4247
- });
5026
+ if (!highlighted) return;
5027
+ if (highlightedByPointer.current) {
5028
+ highlightedByPointer.current = false;
5029
+ } else {
5030
+ (_a = ref.current) === null || _a === void 0 ? void 0 : _a.scrollIntoView({
5031
+ block: "nearest"
5032
+ });
5033
+ }
4248
5034
  }, [highlighted]);
5035
+ const highlightFromPointer = () => {
5036
+ if (highlighted) return;
5037
+ highlightedByPointer.current = true;
5038
+ onHighlight();
5039
+ };
4249
5040
  // Focus stays in the search input, which points at the highlighted result
4250
5041
  // with aria-activedescendant, so results are kept out of the tab order.
4251
5042
  // Mouse move rather than enter: arrowing scrolls results under a resting
4252
5043
  // pointer, and that shouldn't steal the highlight.
4253
- return /*#__PURE__*/React.createElement("a", {
4254
- "aria-selected": highlighted,
4255
- className: styles$c.result,
4256
- href: url,
4257
- id: id,
4258
- onMouseMove: onHighlight,
4259
- ref: ref,
4260
- role: "option",
4261
- tabIndex: -1
4262
- }, /*#__PURE__*/React.createElement("div", null, title), /*#__PURE__*/React.createElement("div", null, subtitle));
5044
+ return (
5045
+ /*#__PURE__*/
5046
+ // Named by the title alone, so screen readers say "Ada Lovelace" rather
5047
+ // than the whole row. The section and subtitle are read after a pause.
5048
+ React.createElement("a", {
5049
+ "aria-describedby": [describedBy, subtitle && `${id}-subtitle`].filter(Boolean).join(" ") || undefined,
5050
+ "aria-labelledby": title ? `${id}-title` : undefined,
5051
+ "aria-selected": highlighted,
5052
+ className: styles$e.result,
5053
+ href: url,
5054
+ id: id,
5055
+ onMouseMove: highlightFromPointer,
5056
+ ref: ref,
5057
+ role: "option",
5058
+ tabIndex: -1
5059
+ }, /*#__PURE__*/React.createElement(ResultImage, {
5060
+ category: category,
5061
+ imageUrl: imageUrl,
5062
+ product: product
5063
+ }), /*#__PURE__*/React.createElement("span", {
5064
+ className: styles$e.title,
5065
+ id: `${id}-title`
5066
+ }, title), /*#__PURE__*/React.createElement("span", {
5067
+ className: styles$e.subtitle,
5068
+ id: `${id}-subtitle`
5069
+ }, subtitle))
5070
+ );
5071
+ }
5072
+ // A person's photo or the result's own image, badged with its product, or
5073
+ // just the product's logomark when there's no image.
5074
+ function ResultImage({
5075
+ category,
5076
+ imageUrl,
5077
+ product
5078
+ }) {
5079
+ const icon = size => isProductIconSlug(product) ? (/*#__PURE__*/React.createElement(ProductIcon, {
5080
+ size: size,
5081
+ slug: product
5082
+ })) : null;
5083
+ return /*#__PURE__*/React.createElement("span", {
5084
+ "aria-hidden": true,
5085
+ className: styles$e.image
5086
+ }, imageUrl ? (/*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("img", {
5087
+ alt: "",
5088
+ className: category === "profile" ? styles$e.avatar : styles$e.photo,
5089
+ loading: "lazy",
5090
+ src: imageUrl
5091
+ }), /*#__PURE__*/React.createElement("span", {
5092
+ className: styles$e.badge
5093
+ }, icon(16)))) : icon("100%"));
4263
5094
  }
4264
5095
 
5096
+ var styles$d = {"heading":"heading-LioUF","group":"group-cKChg"};
5097
+
4265
5098
  // Sections with a heading render as labelled groups; ones without render
4266
5099
  // their items straight into the listbox. Indexes run across every section.
4267
5100
  function ResultListbox({
@@ -4274,13 +5107,19 @@ function ResultListbox({
4274
5107
  sections
4275
5108
  }) {
4276
5109
  let index = 0;
4277
- const renderItem = item => {
5110
+ // With aria-activedescendant, screen readers don't reliably announce the
5111
+ // group a highlighted option is in, so each option names its heading too.
5112
+ const renderItem = (item, headingId) => {
4278
5113
  const itemIndex = index++;
4279
5114
  return /*#__PURE__*/React.createElement(SearchResult, {
5115
+ category: item.category,
5116
+ describedBy: headingId,
4280
5117
  highlighted: itemIndex === highlightedIndex,
4281
5118
  id: resultId(id, itemIndex),
5119
+ imageUrl: item.imageUrl,
4282
5120
  key: item.key,
4283
5121
  onHighlight: () => onHighlight(itemIndex),
5122
+ product: item.product,
4284
5123
  subtitle: item.subtitle,
4285
5124
  title: item.title,
4286
5125
  url: item.url
@@ -4296,16 +5135,18 @@ function ResultListbox({
4296
5135
  if (section.heading === undefined) {
4297
5136
  return /*#__PURE__*/React.createElement(React.Fragment, {
4298
5137
  key: section.key
4299
- }, section.items.map(renderItem));
5138
+ }, section.items.map(item => renderItem(item)));
4300
5139
  }
4301
5140
  const headingId = `${id}-group-${sectionIndex}`;
4302
5141
  return /*#__PURE__*/React.createElement("div", {
4303
5142
  "aria-labelledby": headingId,
5143
+ className: styles$d.group,
4304
5144
  key: section.key,
4305
5145
  role: "group"
4306
5146
  }, /*#__PURE__*/React.createElement("div", {
5147
+ className: styles$d.heading,
4307
5148
  id: headingId
4308
- }, section.heading), section.items.map(renderItem));
5149
+ }, section.heading), section.items.map(item => renderItem(item, headingId)));
4309
5150
  }));
4310
5151
  }
4311
5152
 
@@ -4319,9 +5160,14 @@ function RecentlyVisited({
4319
5160
  }) {
4320
5161
  const headingId = `${navigation.id}-heading`;
4321
5162
  if (items.length === 0 && !hasMore && !loading) {
4322
- return /*#__PURE__*/React.createElement("p", null, "Pages you visit will show up here.");
5163
+ return /*#__PURE__*/React.createElement(BlankState$1, {
5164
+ image: /*#__PURE__*/React.createElement(BlankStateRecentlyVisited, null),
5165
+ subtitle: "Pages you visit will show up here.",
5166
+ title: "Recently visited"
5167
+ });
4323
5168
  } else {
4324
5169
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
5170
+ className: styles$d.heading,
4325
5171
  id: headingId
4326
5172
  }, "Recently visited"), /*#__PURE__*/React.createElement(ResultListbox, {
4327
5173
  labelledBy: headingId,
@@ -4337,6 +5183,8 @@ function RecentlyVisited({
4337
5183
  }
4338
5184
  }
4339
5185
 
5186
+ var styles$c = {"row":"row-5P7UQ","header":"header-sXEyG","closeButton":"closeButton-rPJJV","input":"input-YQkTC","clearButton":"clearButton-9Yh9w"};
5187
+
4340
5188
  // A combobox: focus stays here while aria-activedescendant points screen
4341
5189
  // readers at the highlighted result in the listbox it controls.
4342
5190
  function SearchInput({
@@ -4345,29 +5193,433 @@ function SearchInput({
4345
5193
  inputRef,
4346
5194
  listboxId,
4347
5195
  onChange,
5196
+ onClose,
4348
5197
  onFocus,
4349
5198
  onKeyDown,
4350
5199
  value
4351
5200
  }) {
4352
- return /*#__PURE__*/React.createElement("input", {
5201
+ const {
5202
+ focusProps
5203
+ } = useKeyboardFocus({
5204
+ onFocus: (event, keyboard) => {
5205
+ // Tabbing in selects the whole term, which the next keystroke would
5206
+ // replace. Put the cursor after it instead, to keep typing. The
5207
+ // browser selects after the focus event, so this waits a frame and
5208
+ // only undoes that select-all: typing on the tabs moves focus here by
5209
+ // script, which keeps the cursor, and the keystroke may already be in.
5210
+ if (keyboard) {
5211
+ const input = event.currentTarget;
5212
+ requestAnimationFrame(() => {
5213
+ const length = input.value.length;
5214
+ const selectedAll = length > 0 && input.selectionStart === 0 && input.selectionEnd === length;
5215
+ if (document.activeElement !== input || !selectedAll) return;
5216
+ input.setSelectionRange(length, length);
5217
+ });
5218
+ }
5219
+ onFocus();
5220
+ }
5221
+ });
5222
+ return /*#__PURE__*/React.createElement("div", {
5223
+ className: styles$c.row
5224
+ }, /*#__PURE__*/React.createElement("label", {
5225
+ className: styles$c.header
5226
+ }, /*#__PURE__*/React.createElement(Icon, {
5227
+ name: "general.search",
5228
+ size: 20,
5229
+ theme: "--t-icon-color-dim"
5230
+ }), /*#__PURE__*/React.createElement("input", {
4353
5231
  "aria-activedescendant": highlightedIndex === null ? undefined : resultId(listboxId, highlightedIndex),
4354
5232
  "aria-autocomplete": "list",
4355
5233
  "aria-controls": expanded ? listboxId : undefined,
4356
5234
  "aria-expanded": expanded,
4357
5235
  "aria-label": "Search",
4358
5236
  autoFocus: true,
5237
+ className: styles$c.input,
5238
+ id: "product_search",
4359
5239
  onChange: event => onChange(event.target.value),
4360
- onFocus: onFocus,
4361
5240
  onKeyDown: onKeyDown,
4362
5241
  placeholder: "Search",
4363
5242
  ref: inputRef,
4364
5243
  role: "combobox",
4365
5244
  type: "search",
4366
- value: value
4367
- });
5245
+ value: value,
5246
+ ...focusProps
5247
+ }), !onClose && value !== "" && (/*#__PURE__*/React.createElement("button", {
5248
+ "aria-label": "Clear search",
5249
+ className: styles$c.clearButton,
5250
+ onClick: () => {
5251
+ var _a;
5252
+ onChange("");
5253
+ (_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.focus();
5254
+ },
5255
+ tabIndex: -1,
5256
+ type: "button"
5257
+ }, /*#__PURE__*/React.createElement(Icon, {
5258
+ name: "general.smallX"
5259
+ })))), onClose && (/*#__PURE__*/React.createElement(tapestry.IconButton, {
5260
+ "aria-label": "Close search",
5261
+ className: styles$c.closeButton,
5262
+ icon: /*#__PURE__*/React.createElement(Icon, {
5263
+ name: "general.x",
5264
+ theme: "--t-icon-color-dim"
5265
+ }),
5266
+ kind: "ghost",
5267
+ onClick: onClose,
5268
+ size: "md"
5269
+ })));
5270
+ }
5271
+
5272
+ function BlankStateError(props) {
5273
+ const id = useInstanceId("blank-state-error");
5274
+ return /*#__PURE__*/React.createElement("svg", {
5275
+ viewBox: "0 0 197 158",
5276
+ fill: "none",
5277
+ "aria-hidden": "true",
5278
+ focusable: "false",
5279
+ ...props
5280
+ }, /*#__PURE__*/React.createElement("path", {
5281
+ d: "M139.863 26.119c10.938 10.028 21.777 20.154 32.912 30.084 8.376 7.373 21.975 15.828 23.157 28.02.592 6.095-2.167 11.993-5.321 17.204-24.635 40.8-81.098 67.148-127.412 48.862-30.646-12.093-76.172-47.387-59.716-85.041C19.348 28.87 68.323 10.192 87.44 7.538c21.876-4.621 34.883 2.457 52.423 18.58Z",
5282
+ fill: "currentColor"
5283
+ }), /*#__PURE__*/React.createElement("g", {
5284
+ clipPath: `url(#${id}-a)`
5285
+ }, /*#__PURE__*/React.createElement("path", {
5286
+ d: "M76.296 111.268c-2.63 0-5.95-.883-9.822-3.622a3.39 3.39 0 0 1-1.375-2.212 3.375 3.375 0 0 1 .603-2.529 3.44 3.44 0 0 1 4.777-.767c5.305 3.786 7.949 1.838 8.056 1.767a1.23 1.23 0 0 0-.094.08l4.62 5.004a10.434 10.434 0 0 1-6.765 2.279Z",
5287
+ fill: "#4D4D4D"
5288
+ }), /*#__PURE__*/React.createElement("path", {
5289
+ d: "M83.313 102.999a2.751 2.751 0 0 0-2.882-2.611 2.747 2.747 0 0 0-2.63 2.86l.399 8.688a2.751 2.751 0 0 0 2.882 2.611 2.746 2.746 0 0 0 2.63-2.86l-.399-8.688Z",
5290
+ fill: "gray"
5291
+ }), /*#__PURE__*/React.createElement("path", {
5292
+ d: "M119.428 111.268a10.438 10.438 0 0 1-6.751-2.292l4.619-5.005a1.387 1.387 0 0 0-.093-.079c.106.084 2.75 2.032 8.055-1.767a3.439 3.439 0 0 1 4.777.766 3.378 3.378 0 0 1-.772 4.742c-3.885 2.774-7.205 3.635-9.835 3.635Z",
5293
+ fill: "#4D4D4D"
5294
+ }), /*#__PURE__*/React.createElement("path", {
5295
+ d: "M101.658 18.962H94.68v1.533h6.978v-1.533Z",
5296
+ fill: "#F2F2F2"
5297
+ }), /*#__PURE__*/React.createElement("path", {
5298
+ d: "M91.823 74.82a12.502 12.502 0 0 0 9.546 1.299 16.005 16.005 0 0 0 3.151-1.326.894.894 0 0 1 1.035.24.882.882 0 0 1 .064 1.053c-2.67 3.345-7.775 4.294-11.62 2.514a8.803 8.803 0 0 1-3.302-2.513.879.879 0 0 1 .561-1.353.887.887 0 0 1 .565.068v.017Z",
5299
+ fill: "#999"
5300
+ }), /*#__PURE__*/React.createElement("path", {
5301
+ d: "M88.236 143.397a3.433 3.433 0 0 1-2.304-.891 3.383 3.383 0 0 1-1.096-2.201c-.636-6.788 4.237-16.369 4.798-17.442a3.41 3.41 0 0 1 2-1.643 3.442 3.442 0 0 1 2.586.227 3.398 3.398 0 0 1 1.68 1.965 3.368 3.368 0 0 1-.196 2.569c-1.75 3.37-4.402 10.066-4.059 13.693a3.38 3.38 0 0 1-.773 2.479 3.43 3.43 0 0 1-2.31 1.213l-.326.031Z",
5302
+ fill: "#4D4D4D"
5303
+ }), /*#__PURE__*/React.createElement("path", {
5304
+ d: "M91.645 132.708c3.972 0 7.192-3.195 7.192-7.138 0-3.942-3.22-7.137-7.192-7.137s-7.191 3.195-7.191 7.137c0 3.943 3.22 7.138 7.191 7.138Z",
5305
+ fill: "gray"
5306
+ }), /*#__PURE__*/React.createElement("path", {
5307
+ d: "M77.765 152.218h14.134v4.417c0 .351-.141.689-.391.937-.25.249-.59.388-.944.388H75.33a1.34 1.34 0 0 1-.945-.388 1.32 1.32 0 0 1-.39-.937v-.671c0-.997.398-1.953 1.109-2.658a3.801 3.801 0 0 1 2.678-1.101l-.018.013Z",
5308
+ fill: "#333"
5309
+ }), /*#__PURE__*/React.createElement("path", {
5310
+ d: "M88.548 156.141s9.697.141 7.592-9.797c-2.105-9.939-14.641-18.198-18.295-7.191-3.654 11.007-1.695 18.056 10.703 16.988Z",
5311
+ fill: "#F2F2F2"
5312
+ }), /*#__PURE__*/React.createElement("path", {
5313
+ d: "M109.077 143.402h-.325a3.427 3.427 0 0 1-2.313-1.216 3.38 3.38 0 0 1-.771-2.481c.342-3.627-2.305-10.323-4.054-13.693a3.371 3.371 0 0 1-.11-2.514c.29-.821.887-1.5 1.666-1.897a3.44 3.44 0 0 1 2.525-.236 3.413 3.413 0 0 1 1.993 1.555c.556 1.069 5.429 10.654 4.789 17.443a3.383 3.383 0 0 1-1.113 2.167 3.426 3.426 0 0 1-2.287.872Z",
5314
+ fill: "#4D4D4D"
5315
+ }), /*#__PURE__*/React.createElement("path", {
5316
+ d: "M105.672 132.708c3.972 0 7.192-3.195 7.192-7.138 0-3.942-3.22-7.137-7.192-7.137s-7.191 3.195-7.191 7.137c0 3.943 3.219 7.138 7.191 7.138Z",
5317
+ fill: "gray"
5318
+ }), /*#__PURE__*/React.createElement("path", {
5319
+ d: "m121.972 158.007-15.22-.003c-.354 0-.693-.139-.943-.388a1.317 1.317 0 0 1-.391-.937v-4.417l14.139.003c1.004 0 1.967.396 2.678 1.101a3.745 3.745 0 0 1 1.108 2.658v.671c0 .352-.141.689-.391.937-.25.249-.59.388-.944.388l-.036-.013Z",
5320
+ fill: "#333"
5321
+ }), /*#__PURE__*/React.createElement("path", {
5322
+ d: "M108.769 156.145s-9.701.137-7.587-9.801c2.114-9.939 14.645-18.19 18.295-7.187 3.649 11.003 1.682 18.061-10.708 16.988Z",
5323
+ fill: "#F2F2F2"
5324
+ }), /*#__PURE__*/React.createElement("path", {
5325
+ d: "M112.002 111.683c-.07 1.51 1.108 2.791 2.63 2.86a2.75 2.75 0 0 0 2.882-2.611l.399-8.688a2.746 2.746 0 0 0-2.63-2.86 2.75 2.75 0 0 0-2.882 2.611l-.399 8.688Z",
5326
+ fill: "gray"
5327
+ }), /*#__PURE__*/React.createElement("path", {
5328
+ d: "M47.508 75.88c5.223 0 9.457-6.265 9.457-13.994 0-7.728-4.234-13.993-9.457-13.993-5.223 0-9.457 6.265-9.457 13.993 0 7.729 4.234 13.993 9.457 13.993Zm101.082.017c5.223 0 9.457-6.265 9.457-13.993 0-7.728-4.234-13.993-9.457-13.993-5.223 0-9.457 6.265-9.457 13.993 0 7.728 4.234 13.993 9.457 13.993Z",
5329
+ fill: "#3690EA"
5330
+ }), /*#__PURE__*/React.createElement("path", {
5331
+ d: "M94.622 16.97c-.133-.574 7.868-1.1 6.987.296 0 .305 0 .61.022.914 0 .884.04 1.767.04 2.681 0 .915.041 1.886.054 2.832.334.706-7.78 1.113-6.991-.133v-.795c-.036-1.935-.09-3.86-.112-5.795Z",
5332
+ fill: "#F2F2F2"
5333
+ }), /*#__PURE__*/React.createElement("path", {
5334
+ d: "M98.174 34.426c8.734 0 15.816-2.636 15.816-5.888s-7.082-5.888-15.816-5.888c-8.736 0-15.817 2.637-15.817 5.888 0 3.252 7.082 5.888 15.817 5.888Z",
5335
+ fill: "#B3B3B3"
5336
+ }), /*#__PURE__*/React.createElement("path", {
5337
+ d: "M98.174 19.625c5.458 0 9.883-4.393 9.883-9.81 0-5.418-4.425-9.81-9.883-9.81-5.46 0-9.884 4.392-9.884 9.81s4.425 9.81 9.883 9.81Z",
5338
+ fill: "#3690EA"
5339
+ }), /*#__PURE__*/React.createElement("path", {
5340
+ d: "M116.339 111.123c-.614-10.782-8.958-13.874-19.002-13.309-10.044.566-17.979 4.567-17.356 15.354.623 10.786 9.252 19.063 19.296 18.498 10.044-.565 17.676-9.761 17.062-20.543Z",
5341
+ fill: "#F2F2F2"
5342
+ }), /*#__PURE__*/React.createElement("path", {
5343
+ d: "M116.139 109.4c-1.268 8.891-8.171 15.901-16.884 16.378-9.43.53-17.623-6.74-19.096-16.559a17.615 17.615 0 0 0-.205 3.949c.619 10.781 9.257 19.063 19.297 18.498 10.039-.566 17.685-9.762 17.07-20.544a11.69 11.69 0 0 0-.182-1.722Z",
5344
+ fill: "#E6E6E6"
5345
+ }), /*#__PURE__*/React.createElement("path", {
5346
+ d: "M94.609 92.558c-.134-.579 7.868-1.1 6.987.291v.915c0 .883.035 1.789.04 2.68.004.893.04 1.891.053 2.837.334.702-7.779 1.108-6.991-.137v-.796c-.013-1.93-.067-3.86-.089-5.79Z",
5347
+ fill: "#999"
5348
+ }), /*#__PURE__*/React.createElement("path", {
5349
+ d: "M150.588 70.279V53.525a22.366 22.366 0 0 0-4.425-13.4 22.645 22.645 0 0 0-11.596-8.146c-10.613-3.19-23.061-5.027-36.376-5.031-13.315-.004-25.762 1.833-36.38 5.018a22.654 22.654 0 0 0-11.609 8.14 22.374 22.374 0 0 0-4.438 13.401v16.754a22.375 22.375 0 0 0 4.435 13.403 22.654 22.654 0 0 0 11.607 8.143c10.614 3.19 23.061 5.026 36.376 5.031 13.315.004 25.763-1.833 36.376-5.018a22.658 22.658 0 0 0 11.598-8.144 22.377 22.377 0 0 0 4.432-13.397Z",
5350
+ fill: "#F2F2F2"
5351
+ }), /*#__PURE__*/React.createElement("path", {
5352
+ d: "M98.16 88.976c-12.087 0-23.87-1.626-34.08-4.695a14.817 14.817 0 0 1-7.522-5.316 14.635 14.635 0 0 1-2.891-8.704V53.507a14.64 14.64 0 0 1 2.89-8.698 14.82 14.82 0 0 1 7.514-5.317c10.21-3.065 21.993-4.682 34.085-4.682 12.091 0 23.871 1.626 34.079 4.696a14.817 14.817 0 0 1 7.523 5.315 14.635 14.635 0 0 1 2.891 8.704V70.28a14.635 14.635 0 0 1-2.897 8.703 14.824 14.824 0 0 1-7.525 5.312c-10.191 3.047-21.976 4.682-34.067 4.682Zm3.498-70.014H94.68v1.533h6.978v-1.533Z",
5353
+ fill: "#E6E6E6"
5354
+ }), /*#__PURE__*/React.createElement("path", {
5355
+ d: "M72.367 78.304c5.195 0 9.407-7.348 9.407-16.413 0-9.065-4.212-16.414-9.407-16.414-5.196 0-9.408 7.349-9.408 16.414 0 9.065 4.212 16.413 9.408 16.413Z",
5356
+ fill: "#1A1A1A"
5357
+ }), /*#__PURE__*/React.createElement("path", {
5358
+ d: "M74.013 62.558c2.094 0 3.792-2.476 3.792-5.53 0-3.054-1.698-5.53-3.792-5.53s-3.791 2.476-3.791 5.53c0 3.054 1.697 5.53 3.791 5.53Z",
5359
+ fill: "#fff"
5360
+ }), /*#__PURE__*/React.createElement("path", {
5361
+ d: "M123.032 78.313c5.196 0 9.408-7.349 9.408-16.413 0-9.065-4.212-16.414-9.408-16.414-5.195 0-9.407 7.349-9.407 16.414 0 9.065 4.212 16.413 9.407 16.413Z",
5362
+ fill: "#1A1A1A"
5363
+ }), /*#__PURE__*/React.createElement("path", {
5364
+ d: "M124.679 62.567c2.094 0 3.792-2.476 3.792-5.53 0-3.054-1.698-5.53-3.792-5.53s-3.792 2.476-3.792 5.53c0 3.054 1.698 5.53 3.792 5.53Z",
5365
+ fill: "#fff"
5366
+ }), /*#__PURE__*/React.createElement("path", {
5367
+ d: "M105.325 106.675H90.991a.74.74 0 0 0-.743.737v2.089a.74.74 0 0 0 .743.738h14.334a.74.74 0 0 0 .743-.738v-2.089a.74.74 0 0 0-.743-.737Zm0 6.148H90.991a.74.74 0 0 0-.743.738v2.089a.74.74 0 0 0 .743.738h14.334c.41 0 .743-.331.743-.738v-2.089a.74.74 0 0 0-.743-.738Zm-.004 6.153H90.987a.74.74 0 0 0-.744.737v2.09a.74.74 0 0 0 .744.737h14.334a.74.74 0 0 0 .743-.737v-2.09a.74.74 0 0 0-.743-.737Z",
5368
+ fill: "#3690EA"
5369
+ }), /*#__PURE__*/React.createElement("path", {
5370
+ d: "M140.653 109.023c5.67-4.178 7.656-11.053 4.438-15.356-3.219-4.303-10.424-4.405-16.094-.227-5.67 4.177-7.656 11.052-4.438 15.356 3.219 4.303 10.424 4.405 16.094.227Z",
5371
+ fill: "#F2F2F2"
5372
+ }), /*#__PURE__*/React.createElement("path", {
5373
+ d: "M144.211 97.717c-3.217-4.302-10.422-4.417-16.092-.23a15.277 15.277 0 0 0-5.087 6.339c.067-3.613 2.194-7.58 5.964-10.358 5.669-4.174 12.874-4.073 16.092.23 1.86 2.486 1.976 5.83.649 9.019a7.943 7.943 0 0 0-1.526-5Z",
5374
+ fill: "#E6E6E6"
5375
+ }), /*#__PURE__*/React.createElement("path", {
5376
+ d: "M141.051 91.524c.966-1.66.874-3.508-.205-4.126-1.08-.618-2.737.226-3.703 1.887-.966 1.66-.874 3.508.205 4.126 1.079.619 2.737-.226 3.703-1.887Z",
5377
+ fill: "#333"
5378
+ }), /*#__PURE__*/React.createElement("path", {
5379
+ d: "M142.711 103.49c4.151 0 7.517-3.34 7.517-7.46s-3.366-7.46-7.517-7.46-7.516 3.34-7.516 7.46 3.365 7.46 7.516 7.46Z",
5380
+ fill: "#333"
5381
+ }), /*#__PURE__*/React.createElement("path", {
5382
+ d: "M70.234 108.894c3.219-4.303 1.232-11.178-4.437-15.356-5.67-4.178-12.875-4.076-16.094.227-3.219 4.303-1.232 11.179 4.438 15.356 5.67 4.178 12.875 4.076 16.093-.227Z",
5383
+ fill: "#F2F2F2"
5384
+ }), /*#__PURE__*/React.createElement("path", {
5385
+ d: "M50.574 97.717c3.218-4.302 10.422-4.417 16.092-.23a15.273 15.273 0 0 1 5.087 6.339c-.067-3.613-2.194-7.58-5.964-10.358-5.67-4.174-12.874-4.073-16.092.23-1.86 2.486-1.971 5.83-.65 9.019a7.945 7.945 0 0 1 1.527-5Z",
5386
+ fill: "#E6E6E6"
5387
+ }), /*#__PURE__*/React.createElement("path", {
5388
+ d: "M57.434 93.41c1.08-.618 1.171-2.466.206-4.126-.966-1.66-2.624-2.506-3.703-1.887-1.08.618-1.171 2.466-.205 4.126.965 1.66 2.623 2.506 3.702 1.887Z",
5389
+ fill: "#333"
5390
+ }), /*#__PURE__*/React.createElement("path", {
5391
+ d: "M52.074 103.49c4.151 0 7.516-3.34 7.516-7.46s-3.365-7.46-7.516-7.46-7.517 3.34-7.517 7.46 3.366 7.46 7.517 7.46Z",
5392
+ fill: "#333"
5393
+ }), /*#__PURE__*/React.createElement("path", {
5394
+ d: "M98.485 83.08c1.523-.183 2.609-1.544 2.426-3.041-.183-1.497-1.565-2.561-3.088-2.378-1.522.183-2.608 1.544-2.425 3.041.182 1.497 1.565 2.561 3.087 2.378Z",
5395
+ fill: "#1A1A1A"
5396
+ }), /*#__PURE__*/React.createElement("path", {
5397
+ d: "M101.729 11.17c1.733 0 3.138-1.394 3.138-3.113 0-1.72-1.405-3.114-3.138-3.114-1.733 0-3.137 1.394-3.137 3.114s1.404 3.114 3.137 3.114Zm52.37 52.753c.829 0 1.5-1.677 1.5-3.746s-.671-3.746-1.5-3.746c-.828 0-1.499 1.677-1.499 3.746s.671 3.746 1.499 3.746Zm-111.549 0c.829 0 1.5-1.677 1.5-3.746s-.671-3.746-1.5-3.746c-.828 0-1.5 1.677-1.5 3.746s.672 3.746 1.5 3.746Z",
5398
+ fill: "#4BAAF7"
5399
+ })), /*#__PURE__*/React.createElement("mask", {
5400
+ id: `${id}-b`,
5401
+ style: {
5402
+ maskType: "alpha"
5403
+ },
5404
+ maskUnits: "userSpaceOnUse",
5405
+ x: "0",
5406
+ y: "6",
5407
+ width: "197",
5408
+ height: "151"
5409
+ }, /*#__PURE__*/React.createElement("path", {
5410
+ d: "M139.863 26.12c10.938 10.028 21.777 20.154 32.912 30.084 8.376 7.373 21.975 15.828 23.157 28.02.592 6.095-2.167 11.993-5.321 17.204-24.635 40.8-81.098 67.148-127.412 48.862-30.646-12.093-76.172-47.387-59.716-85.041 15.865-36.377 64.84-55.056 83.957-57.71 21.876-4.621 34.883 2.457 52.423 18.58Z",
5411
+ fill: "#CEE1FF",
5412
+ fillOpacity: ".8"
5413
+ })), /*#__PURE__*/React.createElement("g", {
5414
+ mask: `url(#${id}-b)`
5415
+ }, /*#__PURE__*/React.createElement("path", {
5416
+ d: "m59.006 101 8 4m-4 1-4-5h6",
5417
+ stroke: "#FFD463"
5418
+ }), /*#__PURE__*/React.createElement("path", {
5419
+ d: "M60.006 100.999c-14.02-9.35-30.69-13.01-50-11S-26.916 103.01-38.276 115",
5420
+ strokeWidth: "2",
5421
+ stroke: "#fff"
5422
+ }), /*#__PURE__*/React.createElement("path", {
5423
+ d: "m125.304 89-8.08 3.84m1.68-3.77 6.4-.07-3.7 4.72",
5424
+ stroke: "#FFD463"
5425
+ }), /*#__PURE__*/React.createElement("path", {
5426
+ d: "M123.724 89.5c26.45-8.66 23 40.5 47 42.5 22.399 1.867 36.5-31.001 63 12",
5427
+ strokeWidth: "2",
5428
+ stroke: "#fff"
5429
+ })), /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("clipPath", {
5430
+ id: `${id}-a`
5431
+ }, /*#__PURE__*/React.createElement("path", {
5432
+ fill: "#fff",
5433
+ transform: "translate(38.051)",
5434
+ d: "M0 0h120v158H0z"
5435
+ }))));
5436
+ }
5437
+
5438
+ function BlankStateNoResults(props) {
5439
+ const id = useInstanceId("blank-state-no-results");
5440
+ return /*#__PURE__*/React.createElement("svg", {
5441
+ viewBox: "0 0 197 152",
5442
+ fill: "none",
5443
+ "aria-hidden": "true",
5444
+ focusable: "false",
5445
+ ...props
5446
+ }, /*#__PURE__*/React.createElement("path", {
5447
+ d: "M139.863 19.971C150.801 30 161.64 40.126 172.775 50.055c8.376 7.374 21.975 15.829 23.157 28.02.592 6.095-2.167 11.994-5.321 17.205-24.635 40.8-81.098 67.148-127.412 48.862C32.553 132.049-12.973 96.754 3.483 59.1 19.348 22.724 68.323 4.044 87.44 1.39c21.876-4.62 34.883 2.458 52.423 18.581Z",
5448
+ fill: "currentColor"
5449
+ }), /*#__PURE__*/React.createElement("path", {
5450
+ d: "M94.382 27.326c4.859 0 8.797-3.932 8.797-8.783 0-4.85-3.938-8.783-8.797-8.783-4.858 0-8.796 3.933-8.796 8.783 0 4.851 3.938 8.783 8.796 8.783Z",
5451
+ fill: "#3690EA"
5452
+ }), /*#__PURE__*/React.createElement("path", {
5453
+ d: "M97.481 19.861a3.22 3.22 0 0 0 3.222-3.217 3.22 3.22 0 0 0-3.222-3.217 3.22 3.22 0 0 0-3.222 3.217 3.22 3.22 0 0 0 3.222 3.217Z",
5454
+ fill: "#4BAAF7"
5455
+ }), /*#__PURE__*/React.createElement("path", {
5456
+ d: "M97.564 26.688h-6.248v3.565h6.248v-3.565Z",
5457
+ fill: "#F2F2F2"
5458
+ }), /*#__PURE__*/React.createElement("path", {
5459
+ d: "M49.297 77.706c4.649 0 8.417-5.61 8.417-12.53 0-6.921-3.768-12.531-8.417-12.531s-8.417 5.61-8.417 12.53c0 6.92 3.768 12.531 8.417 12.531Zm89.958 0c4.649 0 8.417-5.61 8.417-12.53 0-6.921-3.768-12.531-8.417-12.531s-8.417 5.61-8.417 12.53c0 6.92 3.768 12.531 8.417 12.531Z",
5460
+ fill: "#3690EA"
5461
+ }), /*#__PURE__*/React.createElement("path", {
5462
+ d: "M94.379 40.574c7.774 0 14.076-2.36 14.076-5.271 0-2.912-6.302-5.272-14.076-5.272-7.774 0-14.076 2.36-14.076 5.272 0 2.911 6.302 5.271 14.076 5.271Z",
5463
+ fill: "#B3B3B3"
5464
+ }), /*#__PURE__*/React.createElement("path", {
5465
+ d: "M141.036 72.671V57.672a20.118 20.118 0 0 0-3.949-12 20.166 20.166 0 0 0-10.333-7.29c-9.448-2.852-20.529-4.497-32.379-4.497-11.849 0-22.926 1.645-32.374 4.497a20.167 20.167 0 0 0-10.331 7.29 20.117 20.117 0 0 0-3.95 12v15a20.112 20.112 0 0 0 3.949 12A20.163 20.163 0 0 0 62 91.962c9.448 2.856 20.53 4.496 32.375 4.496 11.844 0 22.93-1.64 32.378-4.496a20.153 20.153 0 0 0 10.333-7.289 20.107 20.107 0 0 0 3.949-12.002Z",
5466
+ fill: "#F2F2F2"
5467
+ }), /*#__PURE__*/React.createElement("path", {
5468
+ d: "M94.387 89.422c-10.76 0-21.248-1.448-30.348-4.193a13.19 13.19 0 0 1-6.698-4.759 13.159 13.159 0 0 1-2.576-7.794v-15a13.163 13.163 0 0 1 2.577-7.793 13.196 13.196 0 0 1 6.697-4.76c9.082-2.744 19.574-4.193 30.348-4.193 10.773 0 21.248 1.449 30.348 4.194a13.2 13.2 0 0 1 6.701 4.757 13.17 13.17 0 0 1 2.582 7.795v15a13.164 13.164 0 0 1-2.577 7.794 13.195 13.195 0 0 1-6.697 4.759c-9.109 2.727-19.597 4.193-30.357 4.193Z",
5469
+ fill: "#E6E6E6"
5470
+ }), /*#__PURE__*/React.createElement("path", {
5471
+ d: "M71.426 79.868c4.624 0 8.373-6.58 8.373-14.696s-3.749-14.696-8.373-14.696c-4.624 0-8.372 6.58-8.372 14.696 0 8.117 3.748 14.697 8.372 14.697Z",
5472
+ fill: "#1A1A1A"
5473
+ }), /*#__PURE__*/React.createElement("path", {
5474
+ d: "M72.894 65.765c1.863 0 3.373-2.217 3.373-4.95 0-2.735-1.51-4.952-3.373-4.952-1.864 0-3.375 2.217-3.375 4.951 0 2.734 1.511 4.95 3.374 4.95Z",
5475
+ fill: "#fff"
5476
+ }), /*#__PURE__*/React.createElement("path", {
5477
+ d: "M116.517 79.868c4.624 0 8.373-6.58 8.373-14.696s-3.749-14.696-8.373-14.696c-4.624 0-8.372 6.58-8.372 14.696 0 8.117 3.748 14.697 8.372 14.697Z",
5478
+ fill: "#1A1A1A"
5479
+ }), /*#__PURE__*/React.createElement("path", {
5480
+ d: "M117.981 65.765c1.864 0 3.374-2.217 3.374-4.95 0-2.735-1.51-4.952-3.374-4.952-1.863 0-3.374 2.217-3.374 4.951 0 2.734 1.511 4.95 3.374 4.95Z",
5481
+ fill: "#fff"
5482
+ }), /*#__PURE__*/React.createElement("path", {
5483
+ d: "M100.012 80.196a14.156 14.156 0 0 0-2.785-1.159 10.598 10.598 0 0 0-5.713 0 14.09 14.09 0 0 0-2.78 1.159h-.027a.773.773 0 0 1-.973-1.159 8.74 8.74 0 0 1 6.639-3.049 8.754 8.754 0 0 1 6.638 3.05.773.773 0 0 1-.977 1.158h-.022Z",
5484
+ fill: "#999"
5485
+ }), /*#__PURE__*/React.createElement("path", {
5486
+ d: "M44.788 67.69c.853 0 1.545-1.731 1.545-3.867 0-2.137-.692-3.868-1.545-3.868-.852 0-1.544 1.731-1.544 3.867 0 2.137.691 3.868 1.544 3.868Zm99.38 0c.853 0 1.544-1.731 1.544-3.867 0-2.137-.691-3.868-1.544-3.868-.853 0-1.544 1.731-1.544 3.867 0 2.137.691 3.868 1.544 3.868Z",
5487
+ fill: "#4BAAF7"
5488
+ }), /*#__PURE__*/React.createElement("path", {
5489
+ d: "M79.596 106.857s-13.835 0-13.835-18.752",
5490
+ strokeWidth: "13.63",
5491
+ strokeMiterlimit: "10",
5492
+ strokeLinecap: "round",
5493
+ stroke: "#4D4D4D"
5494
+ }), /*#__PURE__*/React.createElement("path", {
5495
+ d: "M79.295 99.708h-.004a2.453 2.453 0 0 0-2.34 2.56l.353 7.781a2.453 2.453 0 0 0 2.564 2.337h.004a2.452 2.452 0 0 0 2.34-2.559l-.353-7.782a2.453 2.453 0 0 0-2.564-2.337Z",
5496
+ fill: "gray"
5497
+ }), /*#__PURE__*/React.createElement("path", {
5498
+ d: "M109.137 104.385s3.851 3.681 10.947-1.181",
5499
+ strokeWidth: "13.63",
5500
+ strokeMiterlimit: "10",
5501
+ strokeLinecap: "round",
5502
+ stroke: "#4D4D4D"
5503
+ }), /*#__PURE__*/React.createElement("path", {
5504
+ d: "m107.907 112.125.004.001a2.455 2.455 0 0 0 2.859-1.966l1.414-7.661a2.451 2.451 0 0 0-1.97-2.854h-.004a2.455 2.455 0 0 0-2.859 1.965l-1.413 7.661a2.45 2.45 0 0 0 1.969 2.854Z",
5505
+ fill: "gray"
5506
+ }), /*#__PURE__*/React.createElement("path", {
5507
+ d: "M89.494 121.176s-4.44 8.569-3.936 13.934",
5508
+ strokeWidth: "13.63",
5509
+ strokeMiterlimit: "10",
5510
+ strokeLinecap: "round",
5511
+ stroke: "#4D4D4D"
5512
+ }), /*#__PURE__*/React.createElement("path", {
5513
+ d: "M88.59 128.571c3.535 0 6.4-2.861 6.4-6.39a6.395 6.395 0 0 0-6.4-6.39 6.395 6.395 0 0 0-6.4 6.39 6.395 6.395 0 0 0 6.4 6.39Z",
5514
+ fill: "gray"
5515
+ }), /*#__PURE__*/React.createElement("path", {
5516
+ d: "M76.233 146.043h12.585v3.966a1.205 1.205 0 0 1-1.205 1.204H74.068a1.205 1.205 0 0 1-1.205-1.204v-.601a3.367 3.367 0 0 1 .989-2.378 3.38 3.38 0 0 1 2.38-.987Z",
5517
+ fill: "#333"
5518
+ }), /*#__PURE__*/React.createElement("path", {
5519
+ d: "M85.808 149.557s8.631.125 6.752-8.774c-1.878-8.899-13-16.291-16.263-6.434-3.262 9.857-1.499 16.166 9.511 15.208Z",
5520
+ fill: "#F2F2F2"
5521
+ }), /*#__PURE__*/React.createElement("path", {
5522
+ d: "M100.159 121.176s4.463 8.569 3.937 13.934",
5523
+ strokeWidth: "13.63",
5524
+ strokeMiterlimit: "10",
5525
+ strokeLinecap: "round",
5526
+ stroke: "#4D4D4D"
5527
+ }), /*#__PURE__*/React.createElement("path", {
5528
+ d: "M101.064 128.571c3.534 0 6.4-2.861 6.4-6.39 0-3.529-2.866-6.39-6.4-6.39a6.395 6.395 0 0 0-6.4 6.39 6.395 6.395 0 0 0 6.4 6.39Z",
5529
+ fill: "gray"
5530
+ }), /*#__PURE__*/React.createElement("path", {
5531
+ d: "M115.584 151.216h-13.545a1.206 1.206 0 0 1-1.205-1.203v-3.98h12.586a3.37 3.37 0 0 1 3.374 3.369v.602a1.21 1.21 0 0 1-.745 1.121 1.23 1.23 0 0 1-.465.091Z",
5532
+ fill: "#333"
5533
+ }), /*#__PURE__*/React.createElement("path", {
5534
+ d: "M103.838 149.557s-8.632.125-6.757-8.774c1.874-8.899 13.036-16.291 16.285-6.434 3.249 9.857 1.5 16.166-9.528 15.208Zm6.725-40.315c-.549-9.652-7.975-12.415-16.91-11.907-8.935.508-16.004 4.091-15.455 13.748.549 9.656 8.243 17.067 17.178 16.559 8.935-.508 15.736-8.743 15.187-18.4Z",
5535
+ fill: "#F2F2F2"
5536
+ }), /*#__PURE__*/React.createElement("path", {
5537
+ d: "M110.402 107.707c-1.129 7.958-7.271 14.228-15.027 14.665-8.39.477-15.683-6.034-16.995-14.821a15.77 15.77 0 0 0-.183 3.533c.549 9.652 8.239 17.067 17.178 16.559 8.939-.508 15.736-8.742 15.174-18.399a14.03 14.03 0 0 0-.147-1.537Z",
5538
+ fill: "#E6E6E6"
5539
+ }), /*#__PURE__*/React.createElement("path", {
5540
+ d: "M100.76 105.262H88a.66.66 0 0 0-.66.66v1.871c0 .365.296.66.66.66h12.76a.66.66 0 0 0 .66-.66v-1.871a.66.66 0 0 0-.66-.66Zm0 5.512H88a.66.66 0 0 0-.66.66v1.871c0 .364.296.66.66.66h12.76a.66.66 0 0 0 .66-.66v-1.871a.66.66 0 0 0-.66-.66Zm0 5.505H88a.66.66 0 0 0-.66.66v1.871c0 .364.296.66.66.66h12.76a.66.66 0 0 0 .66-.66v-1.871a.66.66 0 0 0-.66-.66Z",
5541
+ fill: "#3690EA"
5542
+ }), /*#__PURE__*/React.createElement("path", {
5543
+ d: "M133.43 107.146c5.688-4.463 7.529-11.6 4.111-15.943-3.417-4.343-10.799-4.245-16.487.218-5.688 4.463-7.529 11.601-4.111 15.943 3.417 4.343 10.799 4.245 16.487-.218Z",
5544
+ fill: "#F2F2F2"
5545
+ }), /*#__PURE__*/React.createElement("path", {
5546
+ d: "M136.74 95.34c-3.418-4.344-10.8-4.246-16.486.22a15.744 15.744 0 0 0-5.034 6.683c-.031-3.725 2.035-7.87 5.802-10.837 5.69-4.456 13.072-4.559 16.491-.218 1.972 2.508 2.182 5.953.919 9.273a8.246 8.246 0 0 0-1.692-5.12Z",
5547
+ fill: "#E6E6E6"
5548
+ }), /*#__PURE__*/React.createElement("path", {
5549
+ d: "M127.405 89.78c1.87.546 3.824.751 5.766.605v0a16.153 16.153 0 0 0 9.056-3.631",
5550
+ strokeWidth: "13.63",
5551
+ strokeMiterlimit: "10",
5552
+ strokeLinecap: "round",
5553
+ stroke: "#333"
5554
+ }), /*#__PURE__*/React.createElement("path", {
5555
+ d: "M79.875 85.766c2.25-7.476-.567-14.93-6.293-16.649-5.727-1.718-12.194 2.949-14.444 10.425-2.251 7.476.567 14.93 6.293 16.648 5.727 1.719 12.194-2.948 14.444-10.424Z",
5556
+ fill: "#F2F2F2"
5557
+ }), /*#__PURE__*/React.createElement("path", {
5558
+ d: "M69.713 71.558c5.726 1.72 8.542 9.175 6.293 16.652a16.978 16.978 0 0 1-4.74 7.687c3.767-1.435 7.141-5.151 8.627-10.12 2.232-7.477-.567-14.932-6.293-16.648-3.311-.993-6.863.152-9.706 2.736 1.85-.75 3.9-.858 5.82-.307Z",
5559
+ fill: "#E6E6E6"
5560
+ }), /*#__PURE__*/React.createElement("path", {
5561
+ d: "M77.006 68.04a6.195 6.195 0 0 1-4.269-1.866 6.176 6.176 0 0 1 0-8.623 6.195 6.195 0 0 1 4.27-1.867",
5562
+ strokeWidth: "13.63",
5563
+ strokeMiterlimit: "10",
5564
+ strokeLinecap: "round",
5565
+ stroke: "#333"
5566
+ }), /*#__PURE__*/React.createElement("path", {
5567
+ d: "M81.567 54.262c-.103.03-.205.07-.303.106l-.304.112-.303.111-.3.112-.303.111c-.103.031-.2.071-.303.111-.103.04-.201.072-.304.108l-.299.11-.303.112-.304.112c-.102.03-.2.071-.303.111l-.3.107-.303.111-.303.112-.304.111c-.098.031-.2.072-.299.112-.098.04-.205.07-.303.111-.099.04-.201.071-.304.107l-.299.111-.303.112a5.63 5.63 0 0 0-3.824 4.578 5.62 5.62 0 0 0 1.101 4.178 5.578 5.578 0 0 0 2.754 1.956l.303.112.304.111.308.112.303.11.304.112.303.112.304.111.303.112.308.111.304.111.303.112.304.111c.102.036.2.076.303.107l.308.116c.098.036.2.076.303.107.103.031.201.08.304.111.103.031.2.08.303.112.103.03.201.08.304.111.103.031.2.08.303.111.103.032.206.08.308.112a8.12 8.12 0 0 0 10.027-3.863 8.087 8.087 0 0 0-2.619-10.407 8.117 8.117 0 0 0-7.479-.88v.004Z",
5568
+ fill: "#2278D6"
5569
+ }), /*#__PURE__*/React.createElement("path", {
5570
+ d: "M97.105 47.237c-.192.062-.389.138-.58.21-.193.07-.393.142-.585.213-.192.072-.389.138-.585.214-.196.076-.388.138-.58.214-.192.076-.393.138-.585.214-.192.076-.388.138-.584.214-.197.076-.389.138-.585.214-.197.075-.388.138-.58.214-.192.075-.389.138-.585.213-.196.076-.388.139-.585.21-.196.071-.388.143-.58.214-.192.071-.392.138-.584.214-.192.075-.389.138-.585.214-.196.075-.388.138-.585.213-.196.076-.388.139-.58.214-.192.076-.393.139-.585.214-.191.076-.388.138-.584.214-.197.076-.389.138-.585.214-.196.076-.388.134-.58.21-.192.075-.388.138-.585.213a10.762 10.762 0 0 0-3.146 1.65 10.844 10.844 0 0 0-1.674 15.763 10.879 10.879 0 0 0 4.883 3.233c.196.075.388.151.589.213.2.063.388.152.585.214.196.063.392.152.589.219.196.067.388.147.584.214l.59.213c.196.076.388.152.589.214.2.063.388.152.584.214.197.063.388.152.59.214.2.063.388.152.584.219.196.066.388.147.59.213.2.067.387.148.584.214.196.067.388.147.589.214.2.067.388.152.584.214.197.063.393.152.59.214.196.062.388.151.584.218l.59.214c.196.072.388.147.584.214.196.067.393.147.59.214.196.067.387.151.588.214.201.062.388.151.585.214a15.669 15.669 0 0 0 14.439-1.806 15.624 15.624 0 0 0 6.706-12.895 15.597 15.597 0 0 0-1.829-7.256 15.659 15.659 0 0 0-19.454-7.244Z",
5571
+ fill: "#3690EA"
5572
+ }), /*#__PURE__*/React.createElement("path", {
5573
+ d: "M119.065 37.388a25.93 25.93 0 0 0-.978.356c-.326.125-.651.232-.977.357-.326.125-.652.232-.978.356-.325.125-.651.232-.977.361-.326.13-.652.232-.977.357-.326.125-.652.232-.978.356-.326.125-.656.232-.977.357-.322.125-.656.232-.978.36-.321.13-.651.228-.977.357-.326.13-.656.232-.977.357-.322.124-.656.231-.978.356-.321.125-.656.232-.977.357-.321.125-.656.231-.977.36-.322.13-.657.228-.978.357-.321.13-.656.232-.977.357-.322.124-.656.231-.978.356-.321.125-.656.232-.982.361-.325.13-.651.227-.977.357-.326.129-.651.227-.973.356-.321.13-.656.232-.982.357a18.217 18.217 0 0 0-7.281 4.523A18.158 18.158 0 0 0 90.716 72.8a18.097 18.097 0 0 0 8.926 6.314c.326.13.651.254.986.361.335.107.652.254.982.361.33.107.652.25.986.36.335.112.647.25.982.357.335.107.652.254.982.361.33.107.652.25.986.361.335.112.652.25.982.357.33.107.652.254.986.36.335.108.648.25.982.362.335.111.652.25.982.356.33.107.652.254.986.361.335.107.652.25.982.361.331.111.652.25.982.357.33.106.656.253.986.36.331.107.652.254.982.361.331.107.652.25.987.361.334.112.651.25.981.357.331.107.652.254.987.36.334.108.647.25.982.362.334.111.651.25.981.356a26.26 26.26 0 0 0 24.2-3.02 26.2 26.2 0 0 0 8.29-9.42 26.147 26.147 0 0 0-.114-24.35 26.194 26.194 0 0 0-8.377-9.343 26.244 26.244 0 0 0-24.226-2.795l-.022.009Z",
5574
+ fill: "#50B0FF"
5575
+ }), /*#__PURE__*/React.createElement("path", {
5576
+ d: "M128.994 80.692a18.926 18.926 0 0 1-11.736-4.091 18.853 18.853 0 0 1-5.352-22.825 18.889 18.889 0 0 1 8.696-8.867 18.93 18.93 0 0 1 22.967 4.864 18.856 18.856 0 0 1 .514 23.437 18.738 18.738 0 0 1-6.655 5.529 18.772 18.772 0 0 1-8.434 1.953Z",
5577
+ fill: "#D6DEE5"
5578
+ }), /*#__PURE__*/React.createElement("path", {
5579
+ d: "M129.021 45.14a16.719 16.719 0 0 1 10.373 3.604 16.67 16.67 0 0 1 5.887 9.258 16.65 16.65 0 0 1-1.144 10.906 16.687 16.687 0 0 1-7.681 7.838 16.724 16.724 0 0 1-10.896 1.38 16.704 16.704 0 0 1-9.398-5.675 16.657 16.657 0 0 1-.449-20.708 16.64 16.64 0 0 1 13.322-6.604h-.014Zm.014-4.417a21.143 21.143 0 0 0-13.684 5.01 21.066 21.066 0 0 0-4.43 26.958 21.12 21.12 0 0 0 11.363 9.113 21.153 21.153 0 0 0 14.569-.404 21.113 21.113 0 0 0 10.84-9.728 21.063 21.063 0 0 0 1.948-14.422 21.086 21.086 0 0 0-7.869-12.249 20.973 20.973 0 0 0-12.737-4.278Z",
5580
+ fill: "#1B64CE"
5581
+ }), /*#__PURE__*/React.createElement("path", {
5582
+ d: "M131.495 67.397c4.287 0 7.762-3.47 7.762-7.749 0-4.28-3.475-7.75-7.762-7.75-4.286 0-7.761 3.47-7.761 7.75 0 4.28 3.475 7.75 7.761 7.75Z",
5583
+ fill: "#fff"
5584
+ }), /*#__PURE__*/React.createElement("path", {
5585
+ d: "M137.039 56.638a3.996 3.996 0 0 0 3.999-3.993 3.996 3.996 0 0 0-3.999-3.992 3.996 3.996 0 0 0-3.999 3.992 3.996 3.996 0 0 0 3.999 3.993Z",
5586
+ fill: "#fff"
5587
+ }), /*#__PURE__*/React.createElement("mask", {
5588
+ id: `${id}-a`,
5589
+ style: {
5590
+ maskType: "alpha"
5591
+ },
5592
+ maskUnits: "userSpaceOnUse",
5593
+ x: "90",
5594
+ y: "96",
5595
+ width: "9",
5596
+ height: "4"
5597
+ }, /*#__PURE__*/React.createElement("path", {
5598
+ d: "M94.651 96.461c-1.785 0-3.26-.038-3.78-.038v2.897h7.14v-2.897c-.371 0-1.574.038-3.36.038Z",
5599
+ fill: "#000"
5600
+ })), /*#__PURE__*/React.createElement("g", {
5601
+ mask: `url(#${id}-a)`
5602
+ }, /*#__PURE__*/React.createElement("path", {
5603
+ d: "M94.51 95.545c-1.732.049-3.124.25-3.124.494v2.617c0 .245 1.392.446 3.124.495 1.731.049 3.124-.138 3.124-.384v-2.839c0-.245-1.393-.432-3.124-.383Z",
5604
+ fill: "#999"
5605
+ })));
4368
5606
  }
4369
5607
 
4370
- var styles$b = {"visuallyHidden":"visuallyHidden-S9VG5"};
5608
+ var styles$b = {"spinner":"spinner-b5tlz"};
5609
+
5610
+ function LoadingSpinner({
5611
+ size = 48,
5612
+ trackWidth = 6
5613
+ }) {
5614
+ return /*#__PURE__*/React.createElement("span", {
5615
+ "aria-hidden": "true",
5616
+ className: styles$b.spinner,
5617
+ style: {
5618
+ "--spinner-size": `${size}px`,
5619
+ "--spinner-track-width": `${trackWidth}px`
5620
+ }
5621
+ });
5622
+ }
4371
5623
 
4372
5624
  function SearchResults({
4373
5625
  label,
@@ -4388,18 +5640,36 @@ function SearchResults({
4388
5640
  ...navigation
4389
5641
  });
4390
5642
  }
4391
- return /*#__PURE__*/React.createElement("p", {
4392
- role: "status"
4393
- }, "Searching\u2026");
5643
+ return /*#__PURE__*/React.createElement(tapestry.Flex, {
5644
+ role: "status",
5645
+ justify: "center",
5646
+ align: "center",
5647
+ gap: 2,
5648
+ direction: "column",
5649
+ style: {
5650
+ color: "var(--t-text-color-placeholder)",
5651
+ fontSize: "var(--t-font-size-md)",
5652
+ marginTop: 48
5653
+ }
5654
+ }, /*#__PURE__*/React.createElement(LoadingSpinner, {
5655
+ size: 40,
5656
+ trackWidth: 5
5657
+ }), "Searching\u2026");
4394
5658
  case "error":
4395
- return /*#__PURE__*/React.createElement("p", {
4396
- role: "alert"
4397
- }, "Search isn\u2019t working right now. Try again.");
5659
+ return /*#__PURE__*/React.createElement(BlankState$1, {
5660
+ image: /*#__PURE__*/React.createElement(BlankStateError, null),
5661
+ role: "alert",
5662
+ subtitle: "Try again in a moment.",
5663
+ title: "Search isn\u2019t working right now"
5664
+ });
4398
5665
  case "done":
4399
5666
  if (sections.length === 0) {
4400
- return /*#__PURE__*/React.createElement("p", {
4401
- role: "status"
4402
- }, "No results for \u201C", term.trim(), "\u201D");
5667
+ return /*#__PURE__*/React.createElement(BlankState$1, {
5668
+ image: /*#__PURE__*/React.createElement(BlankStateNoResults, null),
5669
+ role: "status",
5670
+ subtitle: "Clear search and try again.",
5671
+ title: `No results for “${term.trim()}”`
5672
+ });
4403
5673
  }
4404
5674
  return /*#__PURE__*/React.createElement(ResultListbox, {
4405
5675
  busy: false,
@@ -4414,27 +5684,37 @@ function SearchResults({
4414
5684
  // stays put as more recents load and as their lookups answer.
4415
5685
  const RECENTS = "recents";
4416
5686
  function SearchPanel({
5687
+ appName,
5688
+ mobile = false,
4417
5689
  env,
5690
+ onClose,
4418
5691
  products
4419
5692
  }) {
4420
5693
  var _a, _b;
4421
5694
  const listboxId = useInstanceId("product-search-results");
4422
5695
  const [term, setTerm] = React.useState("");
4423
- const [selectedSlug, setSelectedSlug] = React.useState(() => initialProduct(products).slug);
5696
+ const [selectedSlug, setSelectedSlug] = React.useState(() => defaultProduct(products, appName).slug);
4424
5697
  const product = (_a = products.find(({
4425
5698
  slug
4426
5699
  }) => slug === selectedSlug)) !== null && _a !== void 0 ? _a : products[0];
4427
5700
  const hasTerm = term.trim() !== "";
4428
5701
  const search = useProductSearch(product.slug, term);
4429
5702
  const groups = "groups" in search ? search.groups : undefined;
4430
- const sections = React.useMemo(() => groupSections(groups), [groups]);
5703
+ const {
5704
+ organizationTimeZone
5705
+ } = useStore();
5706
+ const sections = React.useMemo(() => groupSections(groups, organizationTimeZone), [groups, organizationTimeZone]);
4431
5707
  const {
4432
5708
  visits,
4433
5709
  ...recents
4434
5710
  } = useRecentVisits(env);
4435
- const recentItems = visits.map(visitItem);
5711
+ const recentItems = visits.map(visit => visitItem(visit, organizationTimeZone));
4436
5712
  const items = hasTerm ? sections.flatMap(section => section.items) : recentItems;
4437
- const navigation = useResultNavigation(items, hasTerm ? sections : RECENTS);
5713
+ // Phones open results by tapping them, with no highlight to arrow through.
5714
+ // A narrow window with a keyboard and mouse keeps both, as does the desktop
5715
+ // layout on a touch device, whose keyboard hints still advertise them.
5716
+ const touchOnly = useMediaQuery("(hover: none) and (pointer: coarse)");
5717
+ const navigation = useResultNavigation(items, hasTerm ? sections : RECENTS, !(mobile && touchOnly));
4438
5718
  const {
4439
5719
  highlightedIndex
4440
5720
  } = navigation;
@@ -4454,41 +5734,48 @@ function SearchPanel({
4454
5734
  navigation.handleKeyDown(event);
4455
5735
  }
4456
5736
  };
4457
- React.useEffect(() => {
4458
- if (hasTerm) saveLastProduct(product.slug);
4459
- }, [hasTerm, product.slug]);
5737
+ const results = hasTerm ? (/*#__PURE__*/React.createElement(SearchResults, {
5738
+ highlightedIndex: highlightedIndex,
5739
+ id: listboxId,
5740
+ label: `Results from Planning Center ${product.appName}`,
5741
+ onHighlight: navigation.highlightIndex,
5742
+ sections: sections,
5743
+ status: search.status,
5744
+ term: term
5745
+ })) : (/*#__PURE__*/React.createElement(RecentlyVisited, {
5746
+ highlightedIndex: highlightedIndex,
5747
+ id: listboxId,
5748
+ items: recentItems,
5749
+ onHighlight: navigation.highlightIndex,
5750
+ ...recents
5751
+ }));
4460
5752
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(SearchInput, {
4461
5753
  expanded: items.length > 0,
4462
5754
  highlightedIndex: highlightedIndex,
4463
5755
  inputRef: inputRef,
4464
5756
  listboxId: listboxId,
4465
5757
  onChange: setTerm,
5758
+ onClose: onClose,
4466
5759
  onFocus: () => setAnnounceHighlight(false),
4467
5760
  onKeyDown: navigation.handleKeyDown,
4468
5761
  value: term
4469
- }), /*#__PURE__*/React.createElement(ProductTabs, {
5762
+ }), mobile ? (/*#__PURE__*/React.createElement(ProductSelect, {
5763
+ onSelect: setSelectedSlug,
5764
+ products: products,
5765
+ selected: product
5766
+ }, results)) : (/*#__PURE__*/React.createElement(ProductTabs, {
4470
5767
  onKeyDown: handleTabsKeyDown,
4471
5768
  onSelect: setSelectedSlug,
4472
5769
  products: products,
4473
5770
  selected: product
4474
- }, hasTerm ? (/*#__PURE__*/React.createElement(SearchResults, {
4475
- highlightedIndex: highlightedIndex,
4476
- id: listboxId,
4477
- label: `${product.appName} results`,
4478
- onHighlight: navigation.highlightIndex,
4479
- sections: sections,
4480
- status: search.status,
4481
- term: term
4482
- })) : (/*#__PURE__*/React.createElement(RecentlyVisited, {
4483
- highlightedIndex: highlightedIndex,
4484
- id: listboxId,
4485
- items: recentItems,
4486
- onHighlight: navigation.highlightIndex,
4487
- ...recents
4488
- }))), /*#__PURE__*/React.createElement("div", {
5771
+ }, results)), /*#__PURE__*/React.createElement("div", {
4489
5772
  "aria-live": "polite",
4490
- className: styles$b.visuallyHidden
4491
- }, announceHighlight ? (_b = navigation.highlighted) === null || _b === void 0 ? void 0 : _b.title : null), /*#__PURE__*/React.createElement(KeyboardHints, {
5773
+ className: styles$k.visuallyHidden
5774
+ }, announceHighlight ? (_b = navigation.highlighted) === null || _b === void 0 ? void 0 : _b.title : null), /*#__PURE__*/React.createElement("div", {
5775
+ "aria-live": "polite",
5776
+ className: styles$k.visuallyHidden,
5777
+ "data-testid": "result-count"
5778
+ }, hasTerm && search.status === "done" && items.length > 0 ? `${items.length} ${items.length === 1 ? "result" : "results"} for “${term.trim()}” in ${product.appName}` : null), mobile ? null : /*#__PURE__*/React.createElement(KeyboardHints, {
4492
5779
  copied: navigation.copied
4493
5780
  }));
4494
5781
  }
@@ -4559,32 +5846,6 @@ function useSearchShortcut(enabled, open, setOpen) {
4559
5846
  }, [enabled, open, setOpen]);
4560
5847
  }
4561
5848
 
4562
- const SEARCHABLE_PRODUCTS = [{
4563
- appName: "Calendar",
4564
- slug: "calendar"
4565
- }, {
4566
- appName: "Check-Ins",
4567
- slug: "check-ins"
4568
- }, {
4569
- appName: "Giving",
4570
- slug: "giving"
4571
- }, {
4572
- appName: "Groups",
4573
- slug: "groups"
4574
- }, {
4575
- appName: "People",
4576
- slug: "people"
4577
- }, {
4578
- appName: "Publishing",
4579
- slug: "publishing"
4580
- }, {
4581
- appName: "Registrations",
4582
- slug: "registrations"
4583
- }, {
4584
- appName: "Services",
4585
- slug: "services"
4586
- }];
4587
-
4588
5849
  const PERMISSION_CHECKS = {
4589
5850
  "check-ins": () => fetchMe("check-ins", "permission").then(({
4590
5851
  permission
@@ -4689,24 +5950,59 @@ function inSwitcherOrder(apps) {
4689
5950
  return groupApps(apps).restProducts.flatMap(app => SEARCHABLE_PRODUCTS.filter(product => product.appName === app.name));
4690
5951
  }
4691
5952
 
5953
+ /**
5954
+ * Writes the height of the visible part of the page to the parent of `ref`'s
5955
+ * element as `--visual-viewport-height`. It shrinks when an on-screen keyboard
5956
+ * opens; `100dvh` doesn't, since mobile Safari draws the keyboard over it.
5957
+ */
5958
+ function useVisualViewportHeight(ref, enabled) {
5959
+ React.useEffect(() => {
5960
+ var _a;
5961
+ const viewport = window.visualViewport;
5962
+ const parent = (_a = ref.current) === null || _a === void 0 ? void 0 : _a.parentElement;
5963
+ if (!enabled || !viewport || !parent) return undefined;
5964
+ const update = () => parent.style.setProperty("--visual-viewport-height", `${viewport.height}px`);
5965
+ update();
5966
+ viewport.addEventListener("resize", update);
5967
+ return () => {
5968
+ viewport.removeEventListener("resize", update);
5969
+ parent.style.removeProperty("--visual-viewport-height");
5970
+ };
5971
+ }, [enabled, ref]);
5972
+ }
5973
+
4692
5974
  function ProductSearch({
5975
+ appName,
4693
5976
  apps,
5977
+ mobile = false,
4694
5978
  env
4695
5979
  }) {
4696
5980
  const searchable = useSearchableProducts(apps);
4697
5981
  const [open, setOpen] = React.useState(false);
5982
+ const modalRef = React.useRef(null);
5983
+ // Sizes Tapestry's modal frame, the dialog's parent, to fit above the keyboard.
5984
+ useVisualViewportHeight(modalRef, mobile && open);
4698
5985
  const available = searchable.status === "done" && searchable.products.length > 0;
4699
5986
  useSearchShortcut(available, open, setOpen);
4700
5987
  if (!available) return null;
4701
5988
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(SearchButton, {
5989
+ mobile: mobile,
4702
5990
  onClick: () => setOpen(true)
4703
5991
  }), /*#__PURE__*/React.createElement(tapestry.Modal, {
4704
5992
  "aria-label": "Search",
5993
+ className: styles$k.modal,
4705
5994
  dismissible: true,
5995
+ id: "product_search_modal",
4706
5996
  onClose: () => setOpen(false),
4707
- open: open
5997
+ open: open,
5998
+ ref: modalRef,
5999
+ size: "lg"
4708
6000
  }, /*#__PURE__*/React.createElement(SearchPanel, {
6001
+ appName: appName,
6002
+ mobile: mobile,
4709
6003
  env: env,
6004
+ // Phones have no Esc, so mobile search gets a close button.
6005
+ onClose: mobile ? () => setOpen(false) : undefined,
4710
6006
  products: searchable.products
4711
6007
  })));
4712
6008
  }
@@ -5000,6 +6296,7 @@ const NotSmallTopbar = ({
5000
6296
  margin: "auto"
5001
6297
  }
5002
6298
  }), !notificationsEnabled && notifications(), productSearchEnabled ? (/*#__PURE__*/React.createElement(ProductSearch, {
6299
+ appName: props.appName,
5003
6300
  apps: props.apps,
5004
6301
  env: props.env
5005
6302
  })) : search({
@@ -32914,7 +34211,7 @@ ClientStorage.defaultProps = {
32914
34211
  method: "localStorage"
32915
34212
  };
32916
34213
 
32917
- var styles$6 = {"appmenu-button":"appmenu-button-b0UvT","appmenu-layer":"appmenu-layer-0IQpN","appmenu-container":"appmenu-container-gackd","appmenu-scroll":"appmenu-scroll-mPSx0","appmenu-list":"appmenu-list-h7clX","appmenu-list-a":"appmenu-list-a-rGIQN","appmenu-list-a--top":"appmenu-list-a--top-RT-2F","appmenu-list-a--bottom":"appmenu-list-a--bottom-YDeBC","appmenu-close-button":"appmenu-close-button-vv9bV","current-route":"current-route-wpJgz","is-active":"is-active-wy8Bg","routes":"routes-Nmt1S","route":"route-kkknQ","profile-button":"profile-button-a2WO2"};
34214
+ var styles$6 = {"appmenu-button":"appmenu-button-b0UvT","appmenu-layer":"appmenu-layer-0IQpN","appmenu-container":"appmenu-container-gackd","appmenu-scroll":"appmenu-scroll-mPSx0","appmenu-list":"appmenu-list-h7clX","appmenu-list-a":"appmenu-list-a-rGIQN","appmenu-list-a--top":"appmenu-list-a--top-RT-2F","appmenu-list-a--bottom":"appmenu-list-a--bottom-YDeBC","appmenu-close-button":"appmenu-close-button-vv9bV","current-route":"current-route-wpJgz","is-active":"is-active-wy8Bg","routes":"routes-Nmt1S","route":"route-kkknQ","actions":"actions-INQ7-","profile-button":"profile-button-a2WO2"};
32918
34215
 
32919
34216
  function AccountSettingsLink({
32920
34217
  env
@@ -33134,7 +34431,14 @@ const SmallTopbar = ({
33134
34431
  setProductSwitcherVisible(false);
33135
34432
  setRoutesMenuVisible(visible => !visible);
33136
34433
  } : null
33137
- }, /*#__PURE__*/React.createElement(CurrentRouteComponent, null, capitalize$1(currentRouteText)), props.routes.length > 0 && /*#__PURE__*/React.createElement(DisclosureChevronIcon, null)), /*#__PURE__*/React.createElement("button", {
34434
+ }, /*#__PURE__*/React.createElement(CurrentRouteComponent, null, capitalize$1(currentRouteText)), props.routes.length > 0 && /*#__PURE__*/React.createElement(DisclosureChevronIcon, null)), /*#__PURE__*/React.createElement("div", {
34435
+ className: styles$6["actions"]
34436
+ }, productSearchEnabled && (/*#__PURE__*/React.createElement(ProductSearch, {
34437
+ appName: props.appName,
34438
+ apps: props.apps,
34439
+ mobile: true,
34440
+ env: props.env
34441
+ })), /*#__PURE__*/React.createElement("button", {
33138
34442
  type: "button",
33139
34443
  className: styles$6["profile-button"],
33140
34444
  onClick: () => {
@@ -33145,7 +34449,7 @@ const SmallTopbar = ({
33145
34449
  }, /*#__PURE__*/React.createElement(Avatar, {
33146
34450
  env: props.env,
33147
34451
  url: props.userAvatarPath
33148
- })));
34452
+ }))));
33149
34453
  };
33150
34454
  const SmallRoute = ({
33151
34455
  active,
@@ -33635,38 +34939,6 @@ const SwitchView = ({
33635
34939
  }));
33636
34940
  };
33637
34941
 
33638
- const collections = {
33639
- general: general__namespace,
33640
- toolbar: toolbar__namespace
33641
- };
33642
- const paths = collections;
33643
- function Icon({
33644
- name,
33645
- size = 16,
33646
- style,
33647
- theme,
33648
- title,
33649
- ...props
33650
- }) {
33651
- const [collection, symbol] = name.split(".");
33652
- return /*#__PURE__*/React.createElement("svg", {
33653
- "aria-hidden": title ? undefined : true,
33654
- fill: "currentColor",
33655
- height: size,
33656
- role: title ? "img" : undefined,
33657
- style: {
33658
- color: theme && `var(${theme})`,
33659
- flexShrink: 0,
33660
- ...style
33661
- },
33662
- viewBox: "0 0 16 16",
33663
- width: size,
33664
- ...props
33665
- }, title && /*#__PURE__*/React.createElement("title", null, title), /*#__PURE__*/React.createElement("path", {
33666
- d: paths[collection][symbol]
33667
- }));
33668
- }
33669
-
33670
34942
  var styles$3 = {"color-mode-switcher":"color-mode-switcher-JpczO","color-mode-switcher-label":"color-mode-switcher-label-3jPM2","color-mode-switcher-modes":"color-mode-switcher-modes-u-bic"};
33671
34943
 
33672
34944
  const COLOR_MODES = [{