@atomic-ui/blocks 0.9.0 → 0.10.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/{chunk-CPOCQURG.js → chunk-LJ6AQO26.js} +8 -1
- package/dist/chunk-LJ6AQO26.js.map +1 -0
- package/dist/components/site.js +1 -1
- package/dist/index.js +1 -1
- package/dist/standalone/atomic-ui-blocks.js +66 -59
- package/dist/standalone/atomic-ui-blocks.js.map +2 -2
- package/package.json +10 -7
- package/dist/chunk-CPOCQURG.js.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/index.ts", "../../src/components/marketing.ts", "../../src/components/card-grid.ts", "../../src/components/journey.ts", "../../src/components/studio.ts", "../../src/components/organisms.ts", "../../src/components/property.ts", "../../src/components/selling.ts", "../../src/components/estimator.ts", "../../src/components/site.ts", "../../src/components/scene.ts", "../../src/components/scrubber.ts", "../../src/components/changelog.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * @atomic-ui/blocks \u2014 the section blocks Impakt sites are built from: marketing blocks,\n * property and selling tools, the site frame and the changelog blocks. Standard\n * custom elements in Lit, styled only from design tokens, built to WCAG 2.2 AA.\n *\n * Importing this module defines every block. It imports `@atomic-ui/ui` first,\n * which defines the product components the blocks draw inside themselves, such\n * as `impakt-button`, `impakt-nav` and `impakt-select`, and gives them their\n * base class, tokens and style fragments.\n */\nimport '@atomic-ui/ui';\n\nexport {\n ImpaktHero,\n ImpaktFeatureList,\n ImpaktQuote,\n ImpaktStat,\n ImpaktAnnouncement,\n ImpaktSearchBar,\n type FeatureItem,\n type SearchField,\n} from './components/marketing';\nexport { ImpaktCardGrid, type CardItem } from './components/card-grid';\nexport { ImpaktJourneyButton, JOURNEY_STAGES, type JourneyStage } from './components/journey';\nexport {\n ImpaktWorkList,\n ImpaktStatRow,\n ImpaktFaq,\n ImpaktSiteMenu,\n ImpaktOffer,\n ImpaktPostCard,\n ImpaktHighlight,\n type WorkItem,\n type StatRowItem,\n type FaqItem,\n} from './components/studio';\nexport {\n ImpaktCarousel,\n ImpaktGallery,\n ImpaktLogoCloud,\n ImpaktSteps,\n ImpaktMediaSplit,\n ImpaktCtaBanner,\n ImpaktReviews,\n ImpaktNewsletter,\n gallerySpan,\n type GalleryItem,\n type LogoItem,\n type StepItem,\n type ReviewItem,\n} from './components/organisms';\nexport {\n ImpaktSitePlan,\n ImpaktMortgageCalculator,\n ImpaktBeforeAfter,\n ImpaktStickyBar,\n ImpaktLocationCard,\n monthlyPayment,\n type SitePlot,\n type NearbyItem,\n} from './components/property';\nexport {\n ImpaktPlanComparison,\n ImpaktVideo,\n ImpaktRegulatoryNotice,\n ImpaktStampDutyCalculator,\n ImpaktAffordabilityCalculator,\n ImpaktContactBlock,\n stampDuty,\n embedOf,\n SDLT,\n type PlanItem,\n type PlanRow,\n} from './components/selling';\nexport {\n ImpaktEstimator,\n estimate,\n phaseWeeks,\n type EstimatorQuestion,\n type EstimatorChoice,\n type EstimatorBand,\n type EstimatorPhase,\n type EstimateResult,\n} from './components/estimator';\nexport { ImpaktSiteHeader, ImpaktSiteFooter, ImpaktWordmark, type FooterLogLine, type FooterColumn } from './components/site';\nexport { ImpaktScene, type SceneDrive, type SceneLayout } from './components/scene';\nexport { ImpaktScrubber, type ScrubberStop } from './components/scrubber';\nexport {\n ImpaktReleaseCard,\n ImpaktReleaseList,\n ImpaktBranchList,\n ImpaktCheckList,\n ImpaktBranchTimeline,\n type DiffLine,\n type ReleaseItem,\n type Branch,\n type CheckItem,\n type TimelineLane,\n type TimelineMark,\n} from './components/changelog';\n", "import { css, html, nothing, type TemplateResult } from 'lit';\nimport { ImpaktElement, fontSize, fontWeight, lineHeight, space, spaceAround, t, type, iconSvg } from '@atomic-ui/ui';\n\n/** A heading at a level the author chose, drawn at a size the component chose. */\nconst heading = (level: number, text: string, cls: string): TemplateResult => html`<div class=${cls} role=\"heading\" aria-level=${level}>${text}</div>`;\n\nconst headingStyles = css`\n .h { margin: 0; color: ${t.textHeading}; font-family: ${t.fontHeading}; font-weight: ${fontWeight('bold')}; line-height: ${lineHeight('tight')}; }\n .eyebrow { margin: 0; color: var(--impakt-eyebrow, var(--impakt-color-text-eyebrow, ${t.brand})); ${type('sm')} font-size: var(--impakt-font-size-eyebrow, var(--impakt-font-size-sm, 0.875rem)); font-family: ${t.fontEyebrow}; font-weight: var(--impakt-font-weight-eyebrow, ${fontWeight('semibold')}); letter-spacing: ${t.trackingWide}; text-transform: uppercase; }\n .body { margin: 0; line-height: ${lineHeight('normal')}; max-inline-size: 65ch; }\n`;\n\n/**\n * The opening of a page: a short label, a big heading, a line of text, the\n * page's main actions and, beside them, a picture.\n *\n * Put the buttons in the `actions` slot. The picture goes beside the words on\n * a wide screen and below them on a phone, so the heading is always the first\n * thing read.\n *\n * @category layout\n * @icon hero\n * @role heading\n * @slot actions - The page's main buttons and links.\n * @slot search - A search bar across the bottom of a full-picture hero.\n */\nexport class ImpaktHero extends ImpaktElement {\n static properties = {\n eyebrow: { type: String },\n heading: { type: String },\n lead: { type: String },\n level: { type: Number, reflect: true },\n imageSrc: { type: String, attribute: 'image-src' },\n imageAlt: { type: String, attribute: 'image-alt' },\n treatment: { type: String, reflect: true },\n ratingText: { type: String, attribute: 'rating-text' },\n eyebrowIcon: { type: String, attribute: 'eyebrow-icon' },\n align: { type: String, reflect: true },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n /** A short label above the heading, such as the name of the development. */\n declare eyebrow: string;\n declare heading: string;\n /** A sentence or two under the heading. */\n declare lead: string;\n /** The heading's level in the page. A page's hero is usually its only level 1. */\n declare level: 1 | 2;\n declare imageSrc: string;\n /** What the picture shows. Leave empty only when it is decoration. */\n declare imageAlt: string;\n /** The picture beside the words, or filling the whole block with the words over it. */\n declare treatment: 'split' | 'cover';\n /** A short line of proof on the picture, such as \"4.8 from 312 buyers\". */\n declare ratingText: string;\n /** A small picture before the eyebrow on a full-picture hero. */\n declare eyebrowIcon:\n | 'none'\n | 'arrow-right'\n | 'arrow-left'\n | 'chevron-right'\n | 'chevron-down'\n | 'check'\n | 'close'\n | 'menu'\n | 'plus'\n | 'minus'\n | 'search'\n | 'external'\n | 'download'\n | 'home'\n | 'phone'\n | 'mail'\n | 'map-pin'\n | 'calendar'\n | 'clock'\n | 'user'\n | 'star'\n | 'heart'\n | 'shield'\n | 'leaf'\n | 'sun'\n | 'bolt'\n | 'key'\n | 'info'\n | 'warning'\n | 'document'\n | 'pound'\n | 'chat';\n /** Where the words sit. Centred heroes have no picture beside them. */\n declare align: 'start' | 'center';\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n constructor() {\n super();\n this.eyebrow = '';\n this.heading = '';\n this.lead = '';\n this.level = 1;\n this.imageSrc = '';\n this.imageAlt = '';\n this.treatment = 'split';\n this.ratingText = '';\n this.eyebrowIcon = 'none';\n this.align = 'start';\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n spaceAround,\n headingStyles,\n css`\n :host { display: block; container-type: inline-size; }\n .hero { display: grid; grid-template-columns: minmax(0, 1fr); gap: ${space(8)}; align-items: center; }\n .hero.pictured { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }\n .words { display: flex; flex-direction: column; gap: ${space(4)}; }\n :host([align='center']) .words { align-items: center; text-align: center; margin-inline: auto; max-inline-size: 48rem; }\n .h { ${type('5xl')} letter-spacing: ${t.trackingTight}; text-wrap: balance; }\n .body { ${type('lg')} color: ${t.textMuted}; text-wrap: pretty; }\n @container (max-width: 40rem) { .h { ${type('4xl')} } }\n .actions { display: flex; flex-wrap: wrap; gap: ${space(3)} ${space(4)}; align-items: center; margin-block-start: ${space(2)}; }\n :host([align='center']) .actions { justify-content: center; }\n img { display: block; inline-size: 100%; block-size: auto; border-radius: ${t.radius2xl}; aspect-ratio: 4 / 3; object-fit: cover; box-shadow: ${t.shadowLg}; }\n @container (max-width: 48rem) { .hero.pictured { grid-template-columns: minmax(0, 1fr); } }\n /* Cover: the picture fills the block edge to edge, a scrim keeps the words readable (1.4.3). */\n .cover { position: relative; display: flex; flex-direction: column; justify-content: center; min-block-size: clamp(44rem, 61vw, 55rem); margin-inline: calc(var(--impakt-bleed, 1) * (50% - 50vw)); padding: ${space(32)} max(${space(8)}, calc(var(--impakt-bleed, 1) * (50vw - 50%))) ${space(24)}; overflow: hidden; color: #fff; --impakt-color-text-heading: #fff; }\n .cover img { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; aspect-ratio: auto; border-radius: 0; box-shadow: none; }\n .cover::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgb(18 31 26 / 0.82) 0%, rgb(18 31 26 / 0.42) 55%, rgb(18 31 26 / 0.05) 100%); }\n .cover .words { position: relative; z-index: 1; max-inline-size: 48rem; }\n .cover .eyebrow { display: inline-flex; align-items: center; gap: ${space(2)}; align-self: flex-start; padding: ${space(2)} ${space(3.5)}; color: #fff; background: rgb(255 255 255 / 0.16); border-radius: 999px; text-transform: none; letter-spacing: 0; }\n .chip-line { position: relative; z-index: 1; block-size: 0; }\n .chip { position: absolute; inset-block-start: ${space(14)}; inset-inline-end: ${space(9)}; display: inline-flex; align-items: center; gap: ${space(2.5)}; padding: ${space(3)} ${space(4.5)}; ${type('sm')} font-weight: ${fontWeight('semibold')}; white-space: nowrap; color: #fff; background: rgb(255 255 255 / 0.16); border-radius: ${t.radiusXl}; }\n .finder { position: relative; z-index: 1; margin-block-start: ${space(12)}; }\n .cover .h { font-size: clamp(3rem, 6.4vw, 5.75rem); line-height: 1; }\n .cover .body { color: rgb(255 255 255 / 0.92); max-inline-size: 40rem; }\n @container (max-width: 64rem) { .chip { display: none; } }\n @container (max-width: 30rem) { .finder { display: none; } }\n @container (max-width: 48rem) { .finder { margin-block-start: ${space(6)}; } .cover { justify-content: flex-end; min-block-size: 43.75rem; padding-block: ${space(32)} ${space(10)}; } .cover::after { background: linear-gradient(180deg, rgb(18 31 26 / 0.1) 0%, rgb(18 31 26 / 0.3) 42%, rgb(18 31 26 / 0.86) 100%); } .cover .h { font-size: 3rem; } }\n `,\n ];\n\n render(): TemplateResult {\n if (this.treatment === 'cover' && this.imageSrc) {\n return html`<div class=\"cover\" part=\"hero\">\n ${this.ratingText ? html`<div class=\"chip-line\"><div class=\"chip\">${iconSvg('star', '20px')}${this.ratingText}</div></div>` : nothing}\n <img src=${this.imageSrc} alt=${this.imageAlt} part=\"image\" />\n <div class=\"words\">\n ${this.eyebrow ? html`<p class=\"eyebrow\" part=\"eyebrow\">${this.eyebrowIcon !== 'none' ? iconSvg(this.eyebrowIcon, '16px') : nothing}${this.eyebrow}</p>` : nothing}\n ${heading(this.level, this.heading, 'h')}\n ${this.lead ? html`<p class=\"body\">${this.lead}</p>` : nothing}\n <div class=\"actions\"><slot name=\"actions\"></slot></div>\n </div>\n <div class=\"finder\"><slot name=\"search\"></slot></div>\n </div>`;\n }\n const pictured = Boolean(this.imageSrc) && this.align !== 'center';\n return html`<div class=\"hero ${pictured ? 'pictured' : ''}\" part=\"hero\">\n <div class=\"words\">\n ${this.eyebrow ? html`<p class=\"eyebrow\" part=\"eyebrow\">${this.eyebrow}</p>` : nothing}\n ${heading(this.level, this.heading, 'h')}\n ${this.lead ? html`<p class=\"body\">${this.lead}</p>` : nothing}\n <div class=\"actions\"><slot name=\"actions\"></slot></div>\n </div>\n ${pictured ? html`<img src=${this.imageSrc} alt=${this.imageAlt} part=\"image\" />` : nothing}\n </div>`;\n }\n}\n\n/** One benefit or feature in a list of them. */\nexport interface FeatureItem {\n id?: string;\n icon?: string;\n heading: string;\n text?: string;\n}\n\n/**\n * Benefits or features side by side, each with an icon, a short heading and a\n * line of text: \"Ten years of cover\", \"Lower bills from day one\".\n *\n * The icons are decoration, because each heading already says what it is.\n * The items are a list, so a screen reader says how many there are.\n *\n * @category content\n * @icon features\n */\nexport class ImpaktFeatureList extends ImpaktElement {\n static properties = {\n items: { type: Array },\n columns: { type: String, reflect: true },\n headingLevel: { type: Number, attribute: 'heading-level' },\n layout: { type: String, reflect: true },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n declare items: FeatureItem[];\n declare columns: 'two' | 'three' | 'four';\n /** The level of each item's heading. One below the heading above the list. */\n declare headingLevel: 2 | 3 | 4;\n /** Icons above the words, or beside them. */\n declare layout: 'stacked' | 'inline';\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n constructor() {\n super();\n this.items = [];\n this.columns = 'three';\n this.headingLevel = 3;\n this.layout = 'stacked';\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n spaceAround,\n headingStyles,\n css`\n :host { display: block; container-type: inline-size; }\n ul { list-style: none; margin: 0; padding: 0; display: grid; gap: ${space(8)} ${space(6)}; grid-template-columns: repeat(3, minmax(0, 1fr)); }\n :host([columns='two']) ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }\n :host([columns='four']) ul { grid-template-columns: repeat(4, minmax(0, 1fr)); }\n li { display: flex; flex-direction: column; gap: ${space(2)}; }\n :host([layout='inline']) li { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: ${space(4)}; align-items: start; }\n :host([layout='inline']) .words { display: flex; flex-direction: column; gap: ${space(1)}; }\n .icon { display: inline-flex; align-items: center; justify-content: center; inline-size: 48px; block-size: 48px; border-radius: ${t.radiusLg}; background: ${t.brandSubtle}; color: ${t.brand}; margin-block-end: ${space(2)}; }\n :host([layout='inline']) .icon { margin: 0; }\n .h { font-size: ${fontSize('lg')}; }\n .body { color: ${t.text}; }\n @container (max-width: 48rem) { ul, :host([columns='four']) ul { grid-template-columns: repeat(2, minmax(0, 1fr)); } }\n @container (max-width: 32rem) { ul, :host([columns='two']) ul, :host([columns='four']) ul { grid-template-columns: minmax(0, 1fr); } }\n `,\n ];\n\n render(): TemplateResult {\n return html`<ul part=\"list\">${(this.items ?? []).map(\n (item) => html`<li part=\"item\">\n ${item.icon ? html`<span class=\"icon\">${iconSvg(item.icon, '24px')}</span>` : nothing}\n <div class=\"words\">${heading(this.headingLevel, item.heading, 'h')}${item.text ? html`<p class=\"body\">${item.text}</p>` : nothing}</div>\n </li>`,\n )}</ul>`;\n }\n}\n\n/**\n * Something a customer said, and who said it.\n *\n * It is a `blockquote` with a `figcaption`, so the words and the person are\n * tied together for a screen reader as well as on the screen.\n *\n * @category content\n * @icon quote\n */\nexport class ImpaktQuote extends ImpaktElement {\n static properties = {\n quote: { type: String },\n person: { type: String },\n about: { type: String },\n imageSrc: { type: String, attribute: 'image-src' },\n size: { type: String, reflect: true },\n align: { type: String, reflect: true },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n /** The words they said, without quotation marks. */\n declare quote: string;\n /** Who said it. */\n declare person: string;\n /** Who they are, such as \"Bought at Larkfield Meadows, 2025\". */\n declare about: string;\n /** A photo of them. It is decoration, because their name is beside it. */\n declare imageSrc: string;\n declare size: 'md' | 'lg';\n declare align: 'start' | 'center';\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n constructor() {\n super();\n this.quote = '';\n this.person = '';\n this.about = '';\n this.imageSrc = '';\n this.size = 'md';\n this.align = 'start';\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n spaceAround,\n css`\n :host { display: block; }\n figure { margin: 0; display: flex; flex-direction: column; gap: ${space(4)}; max-inline-size: 48rem; }\n :host([align='center']) figure { margin-inline: auto; align-items: center; text-align: center; }\n blockquote { margin: 0; font-family: ${t.fontHeading}; font-size: ${fontSize('lg')}; line-height: ${lineHeight('normal')}; color: inherit; }\n :host([size='lg']) blockquote { font-size: ${fontSize('2xl')}; line-height: ${lineHeight('tight')}; }\n blockquote::before { content: '\\\\201C'; } blockquote::after { content: '\\\\201D'; }\n figcaption { display: flex; align-items: center; gap: ${space(3)}; }\n img { inline-size: 48px; block-size: 48px; border-radius: 50%; object-fit: cover; }\n .name { font-weight: ${fontWeight('semibold')}; }\n .detail { color: ${t.textMuted}; font-size: ${fontSize('sm')}; }\n `,\n ];\n\n render(): TemplateResult {\n return html`<figure part=\"figure\">\n <blockquote part=\"quote\">${this.quote}</blockquote>\n ${this.person ? html`<figcaption>${this.imageSrc ? html`<img src=${this.imageSrc} alt=\"\" />` : nothing}<span><span class=\"name\">${this.person}</span>${this.about ? html`<br /><span class=\"detail\">${this.about}</span>` : nothing}</span></figcaption>` : nothing}\n </figure>`;\n }\n}\n\n/**\n * A number that makes a point, with what it counts beneath it: \"36 years\",\n * \"Building in Kent since 1987\".\n *\n * @category content\n * @icon stat\n */\nexport class ImpaktStat extends ImpaktElement {\n static properties = {\n figure: { type: String },\n label: { type: String },\n note: { type: String },\n size: { type: String, reflect: true },\n align: { type: String, reflect: true },\n };\n /** How large the number is drawn. */\n declare size: 'md' | 'lg' | 'xl';\n /** The number, written as it should appear, such as \"36\" or \"\u00A3280k\". */\n declare figure: string;\n /** What the number counts. */\n declare label: string;\n /** A line more, if the label needs it. */\n declare note: string;\n declare align: 'start' | 'center';\n\n constructor() {\n super();\n this.figure = '';\n this.label = '';\n this.note = '';\n this.size = 'md';\n this.align = 'start';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n css`\n :host { display: block; }\n .stat { display: flex; flex-direction: column; gap: ${space(1)}; }\n :host([align='center']) .stat { align-items: center; text-align: center; }\n .value { font-family: ${t.fontHeading}; font-size: ${fontSize('3xl')}; font-weight: ${fontWeight('bold')}; line-height: 1; color: ${t.textHeading}; }\n :host([size='lg']) .value { font-size: ${fontSize('5xl')}; }\n :host([size='xl']) .value { font-size: clamp(2.75rem, 6vw, 4rem); }\n .label { font-weight: ${fontWeight('semibold')}; }\n .detail { color: ${t.textMuted}; font-size: ${fontSize('sm')}; }\n `,\n ];\n\n render(): TemplateResult {\n // Read as one phrase, \"36 years\", rather than a bare number and then a label.\n return html`<p class=\"stat\" part=\"stat\" style=\"margin:0\"><span class=\"value\">${this.figure}</span> <span class=\"label\">${this.label}</span>${this.note ? html` <span class=\"detail\">${this.note}</span>` : nothing}</p>`;\n }\n}\n\n/**\n * A thin line of news across the top of a page: a launch, a change to opening\n * hours. Keep it to one short sentence.\n *\n * @category feedback\n * @icon alert\n */\nexport class ImpaktAnnouncement extends ImpaktElement {\n static properties = {\n message: { type: String },\n linkText: { type: String, attribute: 'link-text' },\n href: { type: String },\n };\n declare message: string;\n declare linkText: string;\n declare href: string;\n\n constructor() {\n super();\n this.message = '';\n this.linkText = '';\n this.href = '';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n css`\n :host { display: block; }\n .bar { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: ${space(2)} ${space(3)}; padding: ${space(2.5)} ${space(5)}; ${type('sm')} text-align: center; color: ${t.onBrand}; background: ${t.brand}; }\n :host { margin-inline: calc(var(--impakt-bleed, 1) * (50% - 50vw)); }\n a { display: inline-flex; align-items: center; gap: ${space(1)}; min-block-size: ${t.targetMin}; color: inherit; font-weight: ${fontWeight('semibold')}; }\n `,\n ];\n\n render(): TemplateResult {\n return html`<div class=\"bar\" part=\"bar\"><span>${this.message}</span>${this.linkText && this.href ? html`<a href=${this.href}>${this.linkText}${iconSvg('arrow-right', '14px')}</a>` : nothing}</div>`;\n }\n}\n\n/** One choice in a search bar. */\nexport interface SearchField {\n id?: string;\n /** The name it sends, such as \"bedrooms\". */\n name?: string;\n label: string;\n /** What it shows before anything is chosen. */\n placeholder?: string;\n /** The other choices, separated by commas. */\n options?: string;\n}\n\n/**\n * A row of choices and one button that finds what fits: where, how many\n * bedrooms, up to what budget.\n *\n * Each choice is a native select with a real label. It sends the visitor to\n * `action` with their choices in the address, so it works as a plain link can.\n *\n * @category form\n * @icon search\n * @fires {CustomEvent<{ values: Record<string, string> }>} impakt-submit - When the search is run. The choices are in detail.values.\n */\nexport class ImpaktSearchBar extends ImpaktElement {\n static properties = {\n items: { type: Array },\n buttonText: { type: String, attribute: 'button-text' },\n action: { type: String },\n label: { type: String },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n declare items: SearchField[];\n declare buttonText: string;\n /** Where the search goes. Leave empty to handle it in the app. */\n declare action: string;\n /** What the search is called for a screen reader. */\n declare label: string;\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n constructor() {\n super();\n this.items = [];\n this.buttonText = 'Search';\n this.action = '';\n this.label = 'Search';\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n spaceAround,\n css`\n :host { display: block; container-type: inline-size; }\n form { display: flex; align-items: center; padding: ${space(3)}; background: ${t.surfaceCard}; color: ${t.text}; border-radius: ${t.radius2xl}; box-shadow: ${t.shadowXl}; }\n .field { flex: 1; min-inline-size: 0; display: flex; flex-direction: column; gap: ${space(1)}; padding: ${space(1.5)} ${space(5)}; }\n label { ${type('sm')} color: ${t.textMuted}; }\n select { inline-size: 100%; min-block-size: 28px; padding: 0; font: inherit; ${type('sm')} font-weight: ${fontWeight('semibold')}; color: ${t.text}; background: transparent; border: 0; border-radius: ${t.radiusSm}; cursor: pointer; }\n select:focus-visible, button:focus-visible { outline: 2px solid ${t.brand}; outline-offset: 2px; }\n button { flex: none; min-block-size: 48px; padding: ${space(3)} ${space(6)}; font: inherit; font-weight: ${fontWeight('semibold')}; color: ${t.onBrand}; background: ${t.brand}; border: 0; border-radius: ${t.radiusLg}; cursor: pointer; }\n button:hover { background: ${t.brandHover}; }\n @container (max-width: 56rem) { form { flex-wrap: wrap; } .field { flex: 1 1 40%; } button { inline-size: 100%; } }\n @container (max-width: 30rem) { form { flex-direction: column; align-items: stretch; gap: ${space(2)}; } .field { flex: none; } }\n `,\n ];\n\n private submit(event: SubmitEvent): void {\n const data = new FormData(event.currentTarget as HTMLFormElement);\n const values: Record<string, string> = {};\n data.forEach((value, key) => {\n if (value !== '') values[key] = String(value);\n });\n this.dispatchEvent(new CustomEvent('impakt-submit', { detail: { values }, bubbles: true, composed: true }));\n if (!this.action) event.preventDefault();\n }\n\n render(): TemplateResult {\n return html`<form role=\"search\" aria-label=${this.label} method=\"get\" action=${this.action || nothing} @submit=${this.submit} part=\"form\">\n ${(this.items ?? []).map((field, i) => {\n const id = this.id_(`field-${i}`);\n const choices = String(field.options ?? '')\n .split(',')\n .map((o) => o.trim())\n .filter(Boolean);\n return html`<div class=\"field\"><label for=${id}>${field.label}</label><select id=${id} name=${field.name || field.label.toLowerCase().replace(/[^a-z0-9]+/g, '-')}>\n <option value=\"\">${field.placeholder || 'Any'}</option>${choices.map((c) => html`<option value=${c}>${c}</option>`)}\n </select></div>`;\n })}\n <button type=\"submit\">${this.buttonText}</button>\n </form>`;\n }\n}\n\ncustomElements.define('impakt-search-bar', ImpaktSearchBar);\ncustomElements.define('impakt-announcement', ImpaktAnnouncement);\ncustomElements.define('impakt-hero', ImpaktHero);\ncustomElements.define('impakt-feature-list', ImpaktFeatureList);\ncustomElements.define('impakt-quote', ImpaktQuote);\ncustomElements.define('impakt-stat', ImpaktStat);\ndeclare global {\n interface HTMLElementTagNameMap {\n 'impakt-hero': ImpaktHero;\n 'impakt-feature-list': ImpaktFeatureList;\n 'impakt-quote': ImpaktQuote;\n 'impakt-stat': ImpaktStat;\n }\n}\n", "/**\n * A row of linked cards.\n */\nimport { css, html, nothing, type TemplateResult } from 'lit';\nimport { ImpaktElement, focusRing, fontSize, fontWeight, lineHeight, space, spaceAround, t, iconSvg } from '@atomic-ui/ui';\n\n/** One card in a row of them. */\nexport interface CardItem {\n id?: string;\n heading: string;\n text?: string;\n imageSrc?: string;\n imageAlt?: string;\n href?: string;\n badge?: string;\n}\n\n/**\n * A row of cards, each a picture, a heading, a line of text and a link: the\n * developments on a developments page, or the house types at one of them.\n *\n * **The whole card is the link's target, and the heading is its name.** The\n * link is on the heading, so a screen reader hears \"Larkfield Meadows, link\"\n * once rather than the whole card read out as one long link, and a pointer\n * can still press anywhere on the card.\n *\n * @category content\n * @icon cards\n */\nexport class ImpaktCardGrid extends ImpaktElement {\n static properties = {\n items: { type: Array },\n columns: { type: String, reflect: true },\n headingLevel: { type: Number, attribute: 'heading-level' },\n ratio: { type: String, reflect: true },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n declare items: CardItem[];\n declare columns: 'two' | 'three' | 'four';\n /** The level of each card's heading. One below the heading above the cards. */\n declare headingLevel: 2 | 3 | 4;\n /** The shape of each card's picture. */\n declare ratio: '16:9' | '4:3' | '3:2' | '1:1';\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n constructor() {\n super();\n this.items = [];\n this.columns = 'three';\n this.headingLevel = 3;\n this.ratio = '4:3';\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n spaceAround,\n css`\n :host { display: block; container-type: inline-size; --ratio: 4 / 3; }\n :host([ratio='16:9']) { --ratio: 16 / 9; }\n :host([ratio='3:2']) { --ratio: 3 / 2; }\n :host([ratio='1:1']) { --ratio: 1 / 1; }\n ul { list-style: none; margin: 0; padding: 0; display: grid; gap: ${space(6)}; grid-template-columns: repeat(3, minmax(0, 1fr)); }\n :host([columns='two']) ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }\n :host([columns='four']) ul { grid-template-columns: repeat(4, minmax(0, 1fr)); }\n li { position: relative; display: flex; flex-direction: column; background: ${t.surfaceCard}; border: ${t.borderThin} solid ${t.hairline}; border-radius: ${t.radiusXl}; box-shadow: ${t.shadowSm}; overflow: hidden; transition: box-shadow 150ms ease-in-out, transform 150ms ease-in-out; }\n li.linked:hover { box-shadow: ${t.shadowLg}; transform: translateY(-2px); }\n img { display: block; inline-size: 100%; aspect-ratio: var(--ratio); object-fit: cover; }\n .words { display: flex; flex-direction: column; gap: ${space(2)}; padding: ${space(5)}; flex: 1; }\n .h { margin: 0; color: ${t.textHeading}; font-family: ${t.fontHeading}; font-size: ${fontSize('lg')}; font-weight: ${fontWeight('bold')}; line-height: ${lineHeight('tight')}; }\n .h a { color: inherit; text-decoration: none; border-radius: ${t.radiusSm}; }\n .h a::after { content: ''; position: absolute; inset: 0; }\n li.linked:hover .h a { text-decoration: underline; text-underline-offset: 0.2em; }\n .body { margin: 0; line-height: ${lineHeight('normal')}; }\n .badge { align-self: flex-start; padding: ${space(0.5)} ${space(2)}; border-radius: ${t.radius}; font-size: ${fontSize('sm')}; font-weight: ${fontWeight('medium')}; background: ${t.brandSubtle}; color: ${t.brand}; box-shadow: inset 0 0 0 1px ${t.hairline}; }\n .more { margin-block-start: auto; display: inline-flex; align-items: center; gap: ${space(1)}; color: ${t.link}; font-weight: ${fontWeight('semibold')}; }\n @container (max-width: 48rem) { ul, :host([columns='four']) ul { grid-template-columns: repeat(2, minmax(0, 1fr)); } }\n @container (max-width: 32rem) { ul, :host([columns='two']) ul, :host([columns='four']) ul { grid-template-columns: minmax(0, 1fr); } }\n `,\n ];\n\n render(): TemplateResult {\n return html`<ul part=\"list\">${(this.items ?? []).map(\n (card) => html`<li class=${card.href ? 'linked' : ''} part=\"card\">\n ${card.imageSrc ? html`<img src=${card.imageSrc} alt=${card.imageAlt ?? ''} loading=\"lazy\" />` : nothing}\n <div class=\"words\">\n ${card.badge ? html`<span class=\"badge\">${card.badge}</span>` : nothing}\n <div class=\"h\" role=\"heading\" aria-level=${this.headingLevel}>${card.href ? html`<a href=${card.href}>${card.heading}</a>` : card.heading}</div>\n ${card.text ? html`<p class=\"body\">${card.text}</p>` : nothing}\n ${card.href ? html`<span class=\"more\" aria-hidden=\"true\">${iconSvg('arrow-right', '1em')}</span>` : nothing}\n </div>\n </li>`,\n )}</ul>`;\n }\n}\n\ncustomElements.define('impakt-card-grid', ImpaktCardGrid);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'impakt-card-grid': ImpaktCardGrid;\n }\n}\n", "/**\n * The journey button: a site's one call to action, drawn at the stage a\n * section of the page is about.\n */\nimport { css, html, nothing, type TemplateResult } from 'lit';\nimport { ImpaktElement, focusRing, fontSize, fontWeight, space, t, token } from '@atomic-ui/ui';\n\n/** The stages a button passes through on its way to being live, in order. */\nexport const JOURNEY_STAGES = ['note', 'wireframe', 'component', 'code', 'live'] as const;\nexport type JourneyStage = (typeof JOURNEY_STAGES)[number];\n\nconst isStage = (value: unknown): value is JourneyStage => (JOURNEY_STAGES as readonly string[]).includes(value as string);\n\n/** The arrow after the words. Drawn, so no font has to hold the glyph. */\nconst arrow = html`<svg class=\"arrow\" viewBox=\"0 0 20 12\" width=\"20\" height=\"12\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" aria-hidden=\"true\" focusable=\"false\">\n <path d=\"M0 6h18M13 1l5 5-5 5\" />\n</svg>`;\n\n/**\n * A call to action drawn as the thing it once was: a sticky note from a\n * workshop, a wireframe box, a designed component, the code that renders it,\n * and at last the live button. A page shows it at the stage each section is\n * about, so the same button is seen being made as the page is read.\n *\n * **It is the same link at every stage.** Whatever it is drawn as, it is one\n * `<a>` whose name is its words, so a screen reader and a keyboard meet an\n * ordinary link; the note, the wireframe cross, the measuring marks and the\n * lines of code around it are decoration and are hidden (1.3.1, 4.1.2). Its\n * target is at least 44px tall at every stage (2.5.8).\n *\n * **A page that shows it more than once sets `decorative` on the copies.** A\n * decorative one is a picture of the button, not a control: it has no link\n * and is hidden from a screen reader, so the page does not hold five links\n * that say the same thing (2.4.4).\n *\n * **One button can follow the page.** Give `track` a selector for the page's\n * sections, each carrying `data-journey-stage`, and the button takes the stage\n * of whichever section is across the middle of the screen. It watches with an\n * IntersectionObserver, so nothing runs while the page scrolls.\n *\n * **Only transforms, opacity and colour move**, so a change of stage costs no\n * layout. With reduced motion asked for, a stage cuts straight to the next\n * (2.3.3). The words on every fill are a pair the tokens already measured:\n * the accent with its own text colour, and the text colour with the card\n * colour (1.4.3). A brand whose ink is dark may colour the words in the code\n * window by setting `--impakt-journey-code-words`.\n *\n * @category action\n * @icon button\n * @fires {CustomEvent<{ stage: JourneyStage }>} impakt-journey-stage - When a tracked button changes stage as the page scrolls.\n */\nexport class ImpaktJourneyButton extends ImpaktElement {\n static properties = {\n stage: { type: String, reflect: true },\n label: { type: String },\n href: { type: String },\n decorative: { type: Boolean, reflect: true },\n track: { type: String },\n code: { type: Array },\n };\n /** What the button is drawn as. */\n declare stage: JourneyStage;\n /** The button's words, such as \"Book a 30-minute call\". */\n declare label: string;\n /** Where the button goes. */\n declare href: string;\n /** Draw it as a picture only, with no link, for a page that already has the real button. */\n declare decorative: boolean;\n /**\n * A selector for the sections of the page that each carry\n * `data-journey-stage`. The button then takes the stage of the section\n * across the middle of the screen. Leave empty to set `stage` by hand.\n */\n declare track: string;\n /**\n * Lines of code drawn around the words at the `code` stage, split where the\n * words go: the lines before, then the lines after. They are decoration and\n * are not read. Left empty, plain bars are drawn instead.\n */\n declare code: { before?: string[]; after?: string[] };\n\n constructor() {\n super();\n this.stage = 'live';\n this.label = '';\n this.href = '';\n this.decorative = false;\n this.track = '';\n this.code = {};\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n css`\n :host { display: block; inline-size: min(100%, 26rem); --impakt-journey-accent: ${token('color.accent.default', '#ffd43b')}; --impakt-journey-on-accent: ${token('color.accent.on', '#1a1a1a')}; --impakt-journey-ease: cubic-bezier(0.65, 0, 0.35, 1); --impakt-journey-time: 600ms; }\n .frame { position: relative; block-size: 15rem; }\n /* Each plate is one stage's shape. Only its opacity and transform ever change. */\n .plate { position: absolute; box-sizing: border-box; opacity: 0; pointer-events: none; transition: opacity var(--impakt-journey-time) var(--impakt-journey-ease), transform var(--impakt-journey-time) var(--impakt-journey-ease); }\n .bar { inset-inline: 0; inset-block-start: calc(50% - 3rem); block-size: 6rem; }\n .note { inset-inline-start: 12%; inset-block-start: 0.5rem; inline-size: min(14rem, 80%); block-size: 14rem; background: var(--impakt-journey-accent); box-shadow: 0 1.1rem 2.2rem rgb(0 0 0 / 0.18); transform: rotate(-4deg); }\n .wire { background: ${t.surfaceCard}; border: ${t.borderThin} dashed ${t.textMuted}; }\n .wire svg { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; color: ${t.rule}; }\n .solid { background: var(--impakt-journey-accent); }\n .shadow { box-shadow: 0 0.9rem 1.75rem rgb(0 0 0 / 0.22); }\n .window { inset: 0; padding: ${space(5)}; background: ${t.text}; border-radius: ${t.radius}; font-family: ${t.fontMono}; font-size: ${fontSize('sm')}; line-height: 1.6; color: color-mix(in srgb, ${t.surfaceCard} 78%, ${t.text}); white-space: pre; overflow: hidden; display: grid; grid-template-rows: 1fr 44px 1fr; }\n .window .before { align-self: end; display: flex; flex-direction: column; }\n .window .after { align-self: start; display: flex; flex-direction: column; }\n .window .rule { display: block; block-size: 0.5em; margin-block: 0.55em; background: currentColor; opacity: 0.35; }\n /* A measuring line above the bar, with a tick at each end. */\n .marks { inset-inline: 0; inset-block-start: calc(50% - 4.5rem); block-size: 0.75rem; border-inline: 1.5px solid ${t.text}; }\n .marks::before { content: ''; position: absolute; inset-inline: 0; inset-block-start: calc(50% - 0.75px); border-block-start: 1.5px solid ${t.text}; }\n\n /* A stage that has passed shrinks toward the next shape as it fades; one still to come starts from the last. */\n /* The note flattens without growing wider, so a shape that is not showing never reaches past the block (1.4.10). */\n :host(:not([stage='note'])) .note { transform: rotate(0deg) scale(1, 0.45); }\n :host([stage='note']) .wire { transform: rotate(-4deg) scale(0.6, 1.9); }\n :host(:not([stage='code'])) .window { transform: scale(0.94, 0.5); }\n :host([stage='note']) .note, :host([stage='wireframe']) .wire, :host(:is([stage='component'], [stage='live'])) .solid, :host([stage='code']) .window, :host([stage='component']) .marks, :host([stage='live']) .shadow { opacity: 1; }\n\n /* The words. One element at every stage: a link, or a picture of one. */\n .words { position: absolute; inset-inline: 0; inset-block-start: calc(50% - 3rem); box-sizing: border-box; min-block-size: 6rem; display: flex; align-items: center; justify-content: space-between; gap: ${space(4)}; padding-inline: ${space(8)}; font-family: ${t.fontBody}; font-size: ${fontSize('lg')}; font-weight: ${fontWeight('medium')}; line-height: 1.2; color: var(--impakt-journey-on-accent); text-decoration: none; transition: color var(--impakt-journey-time) var(--impakt-journey-ease), transform 180ms cubic-bezier(0.2, 0, 0, 1); }\n .arrow { flex: none; }\n :host([stage='note']) .words { inset-inline: 12% auto; inset-block-start: 0.5rem; inline-size: min(14rem, 80%); min-block-size: 14rem; flex-direction: column; align-items: flex-start; justify-content: space-between; padding: ${space(6)}; font-size: ${fontSize('2xl')}; font-weight: ${fontWeight('semibold')}; letter-spacing: -0.02em; transform: rotate(-4deg); }\n :host([stage='note']) .arrow { align-self: flex-end; }\n :host([stage='wireframe']) .words { justify-content: center; font-family: ${t.fontMono}; font-size: ${fontSize('sm')}; font-weight: ${fontWeight('regular')}; color: ${t.textMuted}; }\n :host([stage='code']) .words { inset-inline: ${space(5)}; justify-content: flex-start; min-block-size: 44px; inset-block-start: calc(50% - 22px); padding-inline: 3ch 0; font-family: ${t.fontMono}; font-size: ${fontSize('sm')}; font-weight: ${fontWeight('regular')}; color: var(--impakt-journey-code-words, ${t.surfaceCard}); }\n /* Live, it answers a pointer: it lifts when pointed at and sits when pressed. */\n :host([stage='live']) a.words:hover { transform: translateY(-2px); }\n :host([stage='live']) a.words:active { transform: translateY(1px); }\n a.words:focus-visible { outline: none; box-shadow: ${t.focusShadow}; }\n @media (prefers-reduced-motion: reduce) { .plate, .words { transition: none; } :host([stage='live']) a.words:hover, :host([stage='live']) a.words:active { transform: none; } }\n @media (forced-colors: active) {\n .plate { forced-color-adjust: none; }\n .note, .solid { background: Highlight; }\n .marks, .marks::before { border-color: CanvasText; }\n .window { background: Canvas; border: 1px solid CanvasText; color: CanvasText; }\n .wire { background: Canvas; border-color: CanvasText; }\n .words, :host([stage='wireframe']) .words, :host([stage='code']) .words { color: LinkText; forced-color-adjust: none; }\n :host(:is([stage='note'], [stage='component'], [stage='live'])) .words { color: HighlightText; }\n }\n `,\n ];\n\n private observer?: IntersectionObserver;\n\n connectedCallback(): void {\n super.connectedCallback();\n // The first render starts the watch; this is for a button taken off the page and put back.\n if (this.hasUpdated) this.watch();\n }\n\n disconnectedCallback(): void {\n super.disconnectedCallback();\n this.observer?.disconnect();\n this.observer = undefined;\n }\n\n protected willUpdate(changed: Map<string, unknown>): void {\n // A stage that is not one of the five would draw nothing at all, so it falls back to the finished button.\n if (changed.has('stage') && !isStage(this.stage)) this.stage = 'live';\n }\n\n protected updated(changed: Map<string, unknown>): void {\n if (changed.has('track')) this.watch();\n }\n\n /** Follow the sections named by `track`: the one across the middle of the screen sets the stage. */\n private watch(): void {\n this.observer?.disconnect();\n this.observer = undefined;\n if (!this.track || !this.isConnected || typeof IntersectionObserver !== 'function') return;\n let sections: Element[];\n try {\n sections = Array.from(this.ownerDocument.querySelectorAll(this.track)).filter((el) => isStage(el.getAttribute('data-journey-stage')));\n } catch {\n // Not a selector: nothing to follow.\n return;\n }\n if (!sections.length) return;\n // A line across the middle of the screen. A section is \"current\" while it crosses that line.\n this.observer = new IntersectionObserver((entries) => this.crossed(entries), { rootMargin: '-50% 0px -50% 0px', threshold: 0 });\n for (const section of sections) this.observer.observe(section);\n }\n\n private crossed(entries: IntersectionObserverEntry[]): void {\n const entry = entries.find((e) => e.isIntersecting);\n const stage = entry?.target.getAttribute('data-journey-stage');\n if (!isStage(stage) || stage === this.stage) return;\n this.stage = stage;\n this.dispatchEvent(new CustomEvent('impakt-journey-stage', { detail: { stage }, bubbles: true, composed: true }));\n }\n\n private lines(lines: string[] | undefined, fallback: number): TemplateResult[] {\n return lines?.length\n ? lines.map((line) => html`<span>${line}</span>`)\n : Array.from({ length: fallback }, (_, i) => html`<span class=\"rule\" style=${`inline-size:${[58, 72, 44][i % 3]}%`}></span>`);\n }\n\n render(): TemplateResult {\n const words = html`<span>${this.label}</span>${arrow}`;\n return html`<div class=\"frame\" part=\"frame\" aria-hidden=${this.decorative ? 'true' : nothing}>\n <span class=\"plate note\" aria-hidden=\"true\"></span>\n <span class=\"plate bar wire\" aria-hidden=\"true\"><svg viewBox=\"0 0 100 100\" preserveAspectRatio=\"none\" fill=\"none\" stroke=\"currentColor\" focusable=\"false\"><path d=\"M0 0 100 100M0 100 100 0\" vector-effect=\"non-scaling-stroke\" /></svg></span>\n <span class=\"plate bar shadow\" aria-hidden=\"true\"></span>\n <span class=\"plate bar solid\" aria-hidden=\"true\"></span>\n <span class=\"plate window\" aria-hidden=\"true\"><span class=\"before\">${this.lines(this.code?.before, 3)}</span><span></span><span class=\"after\">${this.lines(this.code?.after, 2)}</span></span>\n <span class=\"plate marks\" aria-hidden=\"true\"></span>\n ${this.decorative || !this.href ? html`<span class=\"words\" part=\"button\">${words}</span>` : html`<a class=\"words\" part=\"button\" href=${this.href}>${words}</a>`}\n </div>`;\n }\n}\n\ncustomElements.define('impakt-journey-button', ImpaktJourneyButton);\ndeclare global {\n interface HTMLElementTagNameMap {\n 'impakt-journey-button': ImpaktJourneyButton;\n }\n}\n", "/**\n * The blocks a studio's own site is built from: the numbered list of work, a\n * row of figures, and the questions at the foot of a page.\n */\nimport { css, html, nothing, type TemplateResult } from 'lit';\nimport {\n ImpaktElement,\n focusRing,\n fontSize,\n fontWeight,\n lineHeight,\n lockScroll,\n space,\n spaceAround,\n t,\n token,\n unlockScroll,\n type NavLink,\n} from '@atomic-ui/ui';\n\n/** One project in a list of work. */\nexport interface WorkItem {\n id?: string;\n /** The project's name, set large. */\n name: string;\n /** What it is and who it is for, such as \"Web platform \u00B7 Automotive\". */\n meta?: string;\n /** Where the row goes when it is pressed. Leave empty for a row that goes nowhere. */\n href?: string;\n}\n\n/** The arrow at the end of a row that goes somewhere. Drawn, so no font has to hold the glyph. */\nconst arrow = html`<svg viewBox=\"0 0 22 22\" width=\"22\" height=\"22\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" aria-hidden=\"true\" focusable=\"false\">\n <path d=\"M5 17 17 5M8 5h9v9\" />\n</svg>`;\n\n/**\n * A numbered list of projects, each name set large: the work on a studio's\n * home page, or the index on its work page.\n *\n * **Each row is one link.** The link sits on the project's name, which is a\n * heading, and is stretched over the row, so the whole row can be pressed\n * while a screen reader meets one link with one name (2.4.4, 2.5.8). The\n * number and the arrow are decoration and are hidden from it; the list itself\n * says how many projects there are and which one this is (1.3.1).\n *\n * **Pointing at a row and focusing it look the same.** The row turns to the\n * text colour with the card colour on it, a pair every brand's tokens already\n * hold at 4.5:1, so the state never depends on a colour of its own (1.4.3,\n * 1.4.11). The focus ring is still drawn over it (2.4.7).\n *\n * The names shrink with the block's own width, not the window's, so the list\n * reads the same in a narrow column as on a phone (1.4.10).\n *\n * @category content\n * @icon list\n */\nexport class ImpaktWorkList extends ImpaktElement {\n static properties = {\n items: { type: Array },\n headingLevel: { type: Number, attribute: 'heading-level' },\n start: { type: Number },\n label: { type: String },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n /** The projects, in order. */\n declare items: WorkItem[];\n /** The heading level of each project's name. It depends on what is above the list on the page. */\n declare headingLevel: number;\n /** The number the first project is given. */\n declare start: number;\n /** A name for the list, so a screen reader can tell it from other lists on the page. Leave empty for none. */\n declare label: string;\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n constructor() {\n super();\n this.items = [];\n this.headingLevel = 3;\n this.start = 1;\n this.label = '';\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n spaceAround,\n css`\n :host { display: block; container: impakt-work-list / inline-size; }\n ol { list-style: none; margin: 0; padding: 0; border-block-start: ${t.borderThin} solid ${t.text}; }\n li { position: relative; display: grid; grid-template-columns: 3rem minmax(0, 1fr) auto auto; align-items: center; column-gap: ${space(6)}; padding: ${space(5)} ${space(8)}; border-block-end: ${t.borderThin} solid ${t.text}; transition: background-color 140ms ease-out, color 140ms ease-out; }\n .number { font-family: ${t.fontMono}; font-size: ${fontSize('sm')}; font-variant-numeric: tabular-nums; color: ${t.textMuted}; }\n .name { font-family: ${t.fontHeading}; font-size: clamp(2rem, 7cqi, 4.5rem); font-weight: ${fontWeight('semibold')}; line-height: 1; letter-spacing: -0.05em; color: ${t.text}; overflow-wrap: anywhere; }\n .name a { color: inherit; text-decoration: none; }\n /* The link is stretched over the row, so the row is one target. */\n .name a::after { content: ''; position: absolute; inset: 0; }\n .name a:focus-visible { outline: none; }\n .name a:focus-visible::after { box-shadow: ${t.focusShadow}; }\n .meta { font-family: ${t.fontMono}; font-size: ${fontSize('sm')}; letter-spacing: ${t.trackingWide}; text-transform: uppercase; color: ${t.textMuted}; }\n .arrow { display: flex; color: ${t.text}; }\n /* Pointed at or focused, the row turns to ink. The card colour on the text colour is a pair every brand already holds at 4.5:1. */\n li:has(a):hover, li:has(a:focus-visible) { background: ${t.text}; }\n li:has(a):hover .name, li:has(a:focus-visible) .name { color: ${t.surfaceCard}; }\n li:has(a):hover :is(.number, .meta), li:has(a:focus-visible) :is(.number, .meta) { color: color-mix(in srgb, ${t.surfaceCard} 78%, ${t.text}); }\n li:has(a):hover .arrow, li:has(a:focus-visible) .arrow { color: ${token('color.accent.default', 'currentColor')}; }\n @container impakt-work-list (max-width: 40rem) {\n li { grid-template-columns: 2rem minmax(0, 1fr) auto; column-gap: ${space(3)}; padding-inline: ${space(4)}; }\n .meta { grid-column: 2; grid-row: 2; margin-block-start: ${space(2)}; }\n .arrow { grid-column: 3; grid-row: 1; }\n }\n @media (forced-colors: active) {\n li:has(a):hover, li:has(a:focus-visible) { background: Canvas; outline: 2px solid Highlight; outline-offset: -2px; }\n li:has(a):hover :is(.name, .number, .meta, .arrow), li:has(a:focus-visible) :is(.name, .number, .meta, .arrow) { color: CanvasText; }\n }\n `,\n ];\n\n render(): TemplateResult {\n // role=\"list\" is set by hand: a list with its markers removed is not announced as a list by every screen reader.\n return html`<ol role=\"list\" part=\"list\" aria-label=${this.label || nothing}>\n ${this.items.map((item, index) => {\n const number = String(this.start + index).padStart(2, '0');\n return html`<li part=\"row\">\n <span class=\"number\" aria-hidden=\"true\">${number}</span>\n <div class=\"name\" part=\"name\" role=\"heading\" aria-level=${this.headingLevel}>\n ${item.href ? html`<a href=${item.href} part=\"link\">${item.name}</a>` : item.name}\n </div>\n ${item.meta ? html`<span class=\"meta\" part=\"meta\">${item.meta}</span>` : html`<span></span>`}\n ${item.href ? html`<span class=\"arrow\">${arrow}</span>` : html`<span></span>`}\n </li>`;\n })}\n </ol>`;\n }\n}\n\n/** One figure in a row of them. */\nexport interface StatRowItem {\n /** The number, written as it should appear, such as \"161 ms\" or \"4\". */\n figure: string;\n /** What the number counts. */\n label: string;\n /** A line more, if the label needs it. */\n note?: string;\n}\n\n/**\n * A row of figures under a rule, each with what it counts: \"4 live products\",\n * \"161 ms response time\".\n *\n * The figures are a list, so a screen reader says how many there are, and each\n * is read as one phrase, \"161 ms response time\", not a bare number followed\n * some way off by its label (1.3.1). The row wraps by its own width: four\n * across, then two, then one, with nothing to scroll sideways at 320px\n * (1.4.10).\n *\n * @category content\n * @icon stat\n */\nexport class ImpaktStatRow extends ImpaktElement {\n static properties = {\n items: { type: Array },\n label: { type: String },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n /** The figures, in order. Four fit a row on a wide page. */\n declare items: StatRowItem[];\n /** A name for the row, such as \"Live products\", read before the figures. Leave empty for none. */\n declare label: string;\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n constructor() {\n super();\n this.items = [];\n this.label = '';\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n spaceAround,\n css`\n :host { display: block; container: impakt-stat-row / inline-size; }\n ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); gap: ${space(6)}; }\n li { border-block-start: ${t.borderThin} solid ${t.rule}; padding-block-start: ${space(5)}; }\n p { margin: 0; display: flex; flex-direction: column; gap: ${space(2)}; }\n .value { font-family: ${t.fontHeading}; font-size: clamp(2.25rem, 6cqi, 3.25rem); font-weight: ${fontWeight('semibold')}; line-height: 1; letter-spacing: -0.04em; color: ${t.textHeading}; }\n .label { font-size: ${fontSize('sm')}; line-height: ${lineHeight('normal')}; color: ${t.textMuted}; }\n .note { font-size: ${fontSize('sm')}; color: ${t.textMuted}; }\n `,\n ];\n\n render(): TemplateResult {\n return html`<ul role=\"list\" part=\"list\" aria-label=${this.label || nothing}>\n ${this.items.map(\n (item) =>\n html`<li part=\"stat\">\n <p><span class=\"value\" part=\"value\">${item.figure}</span> <span class=\"label\" part=\"label\">${item.label}</span>${item.note ? html` <span class=\"note\">${item.note}</span>` : nothing}</p>\n </li>`,\n )}\n </ul>`;\n }\n}\n\n/** One question and its answer. */\nexport interface FaqItem {\n id: string;\n /** The question. */\n heading: string;\n /** The answer, as plain text. An answer with links or a list is slotted as `panel-<id>` instead. */\n body: string;\n}\n\n/**\n * The questions at the foot of a page, under a heading: a title, a line of\n * introduction, and the questions as sections that open.\n *\n * It is `impakt-accordion` with the heading a page always writes above it, so\n * the levels cannot drift: the questions are always one level below the\n * block's own heading (1.3.1). With a heading, the block is a region named by\n * it, so a screen reader can jump straight to the questions (2.4.1).\n *\n * An answer that is more than words is slotted as `panel-<id>`, exactly as\n * on the accordion, and is passed through to it.\n *\n * @category content\n * @icon accordion\n */\nexport class ImpaktFaq extends ImpaktElement {\n static properties = {\n eyebrow: { type: String },\n heading: { type: String },\n lead: { type: String },\n items: { type: Array },\n headingLevel: { type: Number, attribute: 'heading-level' },\n open: { type: Array },\n multiple: { type: Boolean },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n /** The small line above the heading, such as \"Questions\". */\n declare eyebrow: string;\n /** The block's heading, such as \"Questions founders ask us first.\" */\n declare heading: string;\n /** A line under the heading. */\n declare lead: string;\n /** The questions, in order. */\n declare items: FaqItem[];\n /** The level of the block's heading. The questions are one level below it. */\n declare headingLevel: number;\n /** The ids of the questions that start open. */\n declare open: string[];\n /** Let more than one answer be open at once. */\n declare multiple: boolean;\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n constructor() {\n super();\n this.eyebrow = '';\n this.heading = '';\n this.lead = '';\n this.items = [];\n this.headingLevel = 2;\n this.open = [];\n this.multiple = true;\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n spaceAround,\n css`\n :host { display: block; container: impakt-faq / inline-size; }\n .head { display: flex; flex-direction: column; gap: ${space(4)}; margin-block-end: ${space(10)}; max-inline-size: 44rem; }\n .eyebrow { margin: 0; font-family: ${t.fontEyebrow}; font-size: ${fontSize('sm')}; color: var(--impakt-eyebrow, ${t.textMuted}); }\n .heading { font-family: ${t.fontHeading}; font-size: clamp(2rem, 6cqi, 3.25rem); font-weight: ${fontWeight('semibold')}; line-height: 1.04; letter-spacing: -0.04em; color: ${t.textHeading}; }\n .lead { margin: 0; font-size: ${fontSize('md')}; line-height: ${lineHeight('normal')}; color: ${t.textMuted}; }\n impakt-accordion { border-block-start: ${t.borderThin} solid ${t.rule}; }\n `,\n ];\n\n render(): TemplateResult {\n const headingId = this.id_('heading');\n const level = Math.min(Math.max(this.headingLevel, 1), 5);\n const head =\n this.eyebrow || this.heading || this.lead\n ? html`<div class=\"head\" part=\"head\">\n ${this.eyebrow ? html`<p class=\"eyebrow\" part=\"eyebrow\">${this.eyebrow}</p>` : nothing}\n ${this.heading ? html`<div id=${headingId} class=\"heading\" part=\"heading\" role=\"heading\" aria-level=${level}>${this.heading}</div>` : nothing}\n ${this.lead ? html`<p class=\"lead\" part=\"lead\">${this.lead}</p>` : nothing}\n </div>`\n : nothing;\n // Each answer's slot is passed through to the accordion, with the plain answer as what shows when nothing is slotted.\n const accordion = html`<impakt-accordion part=\"questions\" .items=${this.items} .headingLevel=${level + 1} .open=${this.open} .multiple=${this.multiple}>\n ${this.items.map((item) => html`<slot name=${`panel-${item.id}`} slot=${`panel-${item.id}`}>${item.body}</slot>`)}\n </impakt-accordion>`;\n return this.heading ? html`<section aria-labelledby=${headingId}>${head}${accordion}</section>` : html`<div>${head}${accordion}</div>`;\n }\n}\n\n/**\n * A site's menu as a whole screen: a few large links, for a phone or for a\n * site with only a handful of pages.\n *\n * **It is a native `<dialog>` opened with `showModal()`**, as the drawer is, so\n * the focus trap, Escape, the inert page behind it and the return of focus to\n * the button that opened it all come from the browser (2.1.2, 2.4.3). The page\n * behind does not scroll while it is open. The button that opens it is the\n * page's own; set `open` from it and listen for `impakt-close`.\n *\n * **The links are a navigation landmark with a name**, and the page the reader\n * is on carries `aria-current=\"page\"` and is marked with a square, so the mark\n * does not depend on colour (1.4.1). A brand whose ink is dark may also colour\n * it, by setting `--impakt-site-menu-current`.\n *\n * The menu is drawn in ink: the text colour as the background with the card\n * colour on it, a pair every brand already holds at 4.5:1. A component slotted\n * at its foot takes the same colours through its tokens; a plain link there\n * keeps the page's own link colour, so slot `impakt-link` instead.\n *\n * @category navigation\n * @icon menu\n * @slot footer - Under the links: a call to action, an email address.\n * @fires {CustomEvent<null>} impakt-close - When the menu is closed, by its button, by Escape or by following a link.\n */\nexport class ImpaktSiteMenu extends ImpaktElement {\n static properties = {\n open: { type: Boolean, reflect: true },\n links: { type: Array },\n current: { type: String },\n brand: { type: String },\n home: { type: String },\n label: { type: String },\n closeText: { type: String, attribute: 'close-text' },\n };\n /** Whether the menu is showing. */\n declare open: boolean;\n /** The pages, in order. */\n declare links: NavLink[];\n /** The `href` of the page the reader is on, so its link is marked. */\n declare current: string;\n /** The site's name, at the top. */\n declare brand: string;\n /** Where the site's name goes. */\n declare home: string;\n /** The menu's name, read when it opens and as the name of its links. */\n declare label: string;\n /** The words on the button that closes it. */\n declare closeText: string;\n\n constructor() {\n super();\n this.open = false;\n this.links = [];\n this.current = '';\n this.brand = '';\n this.home = '/';\n this.label = 'Menu';\n this.closeText = 'Close';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n css`\n /* The ink colours are taken on the host, because the dialog repaints the text colour for what is inside it. */\n :host { --impakt-menu: ${t.text}; --impakt-menu-on: ${t.surfaceCard}; --impakt-menu-muted: color-mix(in srgb, ${t.surfaceCard} 78%, ${t.text}); --impakt-menu-rule: color-mix(in srgb, ${t.surfaceCard} 18%, ${t.text}); }\n dialog { box-sizing: border-box; display: none; flex-direction: column; inline-size: 100vw; max-inline-size: 100vw; block-size: 100dvh; max-block-size: 100dvh; margin: 0; padding: 0; border: 0; overflow: auto; background: var(--impakt-menu); color: var(--impakt-menu-on); }\n dialog[open] { display: flex; }\n dialog::backdrop { background: var(--impakt-menu); }\n .bar { display: flex; align-items: center; justify-content: space-between; gap: ${space(4)}; padding: ${space(2)} ${space(4)}; border-block-end: ${t.borderThin} solid var(--impakt-menu-rule); }\n .brand { color: inherit; text-decoration: none; font-family: ${t.fontHeading}; font-size: ${fontSize('md')}; font-weight: ${fontWeight('semibold')}; border-radius: ${t.radiusSm}; }\n .close { display: inline-flex; align-items: center; gap: ${space(2)}; min-block-size: 44px; padding: 0 ${space(4)}; font: inherit; font-size: ${fontSize('sm')}; font-weight: ${fontWeight('medium')}; color: var(--impakt-menu); background: var(--impakt-menu-on); border: 0; border-radius: ${t.radius}; cursor: pointer; }\n nav { flex: 1; padding: ${space(6)} ${space(5)} 0; }\n ol { list-style: none; margin: 0; padding: 0; }\n li { border-block-end: ${t.borderThin} solid var(--impakt-menu-rule); }\n li a { display: flex; align-items: center; justify-content: space-between; gap: ${space(4)}; padding-block: ${space(4)}; color: inherit; text-decoration: none; font-family: ${t.fontHeading}; font-size: clamp(2.25rem, 12vw, 3.5rem); font-weight: ${fontWeight('semibold')}; line-height: 1; letter-spacing: -0.05em; }\n li a:hover .words { text-decoration: underline; text-decoration-thickness: 0.06em; text-underline-offset: 0.12em; }\n .number { font-family: ${t.fontMono}; font-size: ${fontSize('sm')}; font-weight: ${fontWeight('regular')}; letter-spacing: 0; color: var(--impakt-menu-muted); }\n /*\n * The current page is marked with a square. Its colour stays the menu's own text colour unless a brand sets\n * --impakt-site-menu-current, because an accent is only readable on ink when the brand's ink is dark (1.4.3).\n */\n a[aria-current] { color: var(--impakt-site-menu-current, var(--impakt-menu-on)); }\n a[aria-current] .words::before { content: ''; display: inline-block; inline-size: 0.28em; block-size: 0.28em; margin-inline-end: 0.22em; vertical-align: 0.18em; background: currentColor; }\n .foot { display: flex; flex-direction: column; gap: ${space(4)}; padding: ${space(8)} ${space(5)} calc(${space(8)} + env(safe-area-inset-bottom)); }\n .foot[hidden] { display: none; }\n /* What is slotted at the foot is read on ink too. */\n ::slotted(*) { --impakt-color-text-default: var(--impakt-menu-on); --impakt-color-text-heading: var(--impakt-menu-on); --impakt-color-text-muted: var(--impakt-menu-muted); --impakt-color-text-link: var(--impakt-menu-on); --impakt-color-text-link-hover: var(--impakt-menu-on); color: var(--impakt-menu-on); }\n @media (forced-colors: active) { dialog { border: 1px solid CanvasText; } .close { border: 1px solid ButtonText; } }\n `,\n ];\n\n private hasFooter = false;\n\n private get dialog(): HTMLDialogElement | null {\n return this.renderRoot.querySelector('dialog');\n }\n\n updated(changed: Map<string, unknown>): void {\n if (!changed.has('open')) return;\n const dialog = this.dialog;\n if (!dialog) return;\n if (this.open) {\n if (typeof dialog.showModal === 'function') dialog.showModal();\n else dialog.setAttribute('open', '');\n lockScroll(this);\n } else {\n if (typeof dialog.close === 'function' && dialog.open) dialog.close();\n else dialog.removeAttribute('open');\n unlockScroll(this);\n }\n }\n\n disconnectedCallback(): void {\n super.disconnectedCallback();\n unlockScroll(this);\n }\n\n private close(): void {\n if (!this.open) return;\n this.open = false;\n this.dispatchEvent(new CustomEvent('impakt-close', { bubbles: true, composed: true }));\n }\n\n private footerChanged(event: Event): void {\n this.hasFooter = (event.target as HTMLSlotElement).assignedNodes().length > 0;\n this.requestUpdate();\n }\n\n render(): TemplateResult {\n return html`<dialog part=\"dialog\" aria-label=${this.label} @cancel=${() => this.close()} @close=${() => this.close()}>\n <div class=\"bar\" part=\"bar\">\n ${this.brand ? html`<a class=\"brand\" href=${this.home || '/'} part=\"brand\">${this.brand}</a>` : html`<span></span>`}\n <button class=\"close\" type=\"button\" part=\"close\" @click=${() => this.close()}>\n <span>${this.closeText}</span>\n <svg viewBox=\"0 0 12 12\" width=\"12\" height=\"12\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" aria-hidden=\"true\" focusable=\"false\"><path d=\"M1 1l10 10M11 1 1 11\" /></svg>\n </button>\n </div>\n <nav aria-label=${this.label} part=\"nav\">\n <ol role=\"list\">\n ${(this.links ?? []).map((link, index) => {\n const current = !!this.current && link.href === this.current;\n // Following a link closes the menu, so a link to a place on the same page does not leave it open over that place.\n return html`<li>\n <a href=${link.href} aria-current=${current ? 'page' : nothing} part=\"link\" @click=${() => this.close()}>\n <span class=\"words\">${link.label}</span><span class=\"number\" aria-hidden=\"true\">${String(index + 1).padStart(2, '0')}</span>\n </a>\n </li>`;\n })}\n </ol>\n </nav>\n <div class=\"foot\" part=\"footer\" ?hidden=${!this.hasFooter}><slot name=\"footer\" @slotchange=${this.footerChanged}></slot></div>\n </dialog>`;\n }\n}\n\n/**\n * An offer, set out in two halves: what it is, with one action, and a short\n * numbered list of what you get.\n *\n * It draws no background of its own. Put it in `impakt-section` with the\n * `accent` or `ink` tone and it takes that band's colours, so the words on it\n * are always the colour the tokens measured against the band (1.4.3).\n *\n * The points are an ordered list, so a screen reader says how many there are;\n * the numbers drawn beside them are decoration (1.3.1). The halves stack by\n * the block's own width (1.4.10).\n *\n * @category content\n * @icon megaphone\n * @slot actions - The action: one button.\n */\nexport class ImpaktOffer extends ImpaktElement {\n static properties = {\n eyebrow: { type: String },\n heading: { type: String },\n lead: { type: String },\n points: { type: Array },\n headingLevel: { type: Number, attribute: 'heading-level' },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n /** The small line above the heading, such as \"Free for founders and product owners\". */\n declare eyebrow: string;\n /** What is offered, such as \"Get a 48-hour product teardown.\" */\n declare heading: string;\n /** A sentence or two more. */\n declare lead: string;\n /** What you get, one short line each. */\n declare points: string[];\n declare headingLevel: number;\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n constructor() {\n super();\n this.eyebrow = '';\n this.heading = '';\n this.lead = '';\n this.points = [];\n this.headingLevel = 2;\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n spaceAround,\n css`\n :host { display: block; container: impakt-offer / inline-size; }\n .offer { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: ${space(12)}; align-items: start; }\n .copy { display: flex; flex-direction: column; align-items: flex-start; gap: ${space(5)}; }\n .eyebrow { margin: 0; font-family: ${t.fontEyebrow}; font-size: ${fontSize('sm')}; color: var(--impakt-eyebrow, ${t.textMuted}); }\n .heading { font-family: ${t.fontHeading}; font-size: clamp(2rem, 6cqi, 3.75rem); font-weight: ${fontWeight('semibold')}; line-height: 1; letter-spacing: -0.04em; color: ${t.textHeading}; }\n .lead { margin: 0; max-inline-size: 32rem; font-size: ${fontSize('md')}; line-height: ${lineHeight('normal')}; color: ${t.text}; }\n ol { list-style: none; margin: 0; padding: 0; }\n li { display: flex; gap: ${space(5)}; padding-block: ${space(5)}; border-block-start: ${t.borderThin} solid ${t.text}; font-size: ${fontSize('lg')}; font-weight: ${fontWeight('medium')}; line-height: 1.2; color: ${t.text}; }\n .number { flex: none; font-family: ${t.fontMono}; font-size: ${fontSize('sm')}; font-weight: ${fontWeight('regular')}; line-height: 1.6; }\n @container impakt-offer (max-width: 44rem) { .offer { grid-template-columns: 1fr; gap: ${space(8)}; } }\n `,\n ];\n\n render(): TemplateResult {\n const level = Math.min(Math.max(this.headingLevel, 1), 6);\n return html`<div class=\"offer\" part=\"offer\">\n <div class=\"copy\">\n ${this.eyebrow ? html`<p class=\"eyebrow\" part=\"eyebrow\">${this.eyebrow}</p>` : nothing}\n ${this.heading ? html`<div class=\"heading\" part=\"heading\" role=\"heading\" aria-level=${level}>${this.heading}</div>` : nothing}\n ${this.lead ? html`<p class=\"lead\" part=\"lead\">${this.lead}</p>` : nothing}\n <slot name=\"actions\"></slot>\n </div>\n ${\n (this.points ?? []).length\n ? html`<ol role=\"list\" part=\"points\">\n ${this.points.map((point, index) => html`<li><span class=\"number\" aria-hidden=\"true\">${String(index + 1).padStart(2, '0')}</span><span>${point}</span></li>`)}\n </ol>`\n : nothing\n }\n </div>`;\n }\n}\n\n/**\n * A card for one article: what it is filed under, its title and a line about\n * it.\n *\n * **The card is one link.** The link sits on the title, which is a heading,\n * and is stretched over the card, so the whole card can be pressed while a\n * screen reader meets one link named by the title, not a \"Read more\" that says\n * nothing out of context (2.4.4). `link-text` adds a visible line such as\n * \"Read\"; it is decoration and is hidden from a screen reader, which already\n * has the title.\n *\n * @category content\n * @icon card\n */\nexport class ImpaktPostCard extends ImpaktElement {\n static properties = {\n heading: { type: String },\n text: { type: String },\n meta: { type: String },\n href: { type: String },\n linkText: { type: String, attribute: 'link-text' },\n headingLevel: { type: Number, attribute: 'heading-level' },\n };\n /** The article's title. */\n declare heading: string;\n /** A line about it. */\n declare text: string;\n /** What it is filed under and how long it is, such as \"Pricing \u00B7 7 min read\". */\n declare meta: string;\n /** Where the card goes. */\n declare href: string;\n /** A visible line at the foot of the card, such as \"Read\". Leave empty for none. */\n declare linkText: string;\n declare headingLevel: number;\n\n constructor() {\n super();\n this.heading = '';\n this.text = '';\n this.meta = '';\n this.href = '';\n this.linkText = '';\n this.headingLevel = 3;\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n css`\n :host { display: block; block-size: 100%; }\n article { position: relative; box-sizing: border-box; block-size: 100%; display: flex; flex-direction: column; gap: ${space(4)}; padding: ${space(6)}; background: ${t.surfaceCard}; border: ${t.borderThin} solid ${t.text}; border-radius: ${t.radius}; transition: background-color 140ms ease-out; }\n .meta { margin: 0; font-family: ${t.fontMono}; font-size: ${fontSize('sm')}; letter-spacing: ${t.trackingWide}; text-transform: uppercase; color: ${t.textMuted}; }\n .heading { font-family: ${t.fontHeading}; font-size: ${fontSize('xl')}; font-weight: ${fontWeight('semibold')}; line-height: 1.15; letter-spacing: -0.025em; color: ${t.text}; }\n .heading a { color: inherit; text-decoration: none; }\n .heading a::after { content: ''; position: absolute; inset: 0; border-radius: inherit; }\n .heading a:focus-visible { outline: none; }\n .heading a:focus-visible::after { box-shadow: ${t.focusShadow}; }\n article:has(a):hover .heading { text-decoration: underline; text-decoration-thickness: 0.08em; text-underline-offset: 0.18em; }\n .text { margin: 0; font-size: ${fontSize('sm')}; line-height: ${lineHeight('normal')}; color: ${t.textMuted}; }\n .more { margin-block-start: auto; font-family: ${t.fontMono}; font-size: ${fontSize('sm')}; letter-spacing: ${t.trackingWide}; text-transform: uppercase; color: ${t.text}; }\n @media (forced-colors: active) { article { border-color: CanvasText; } }\n `,\n ];\n\n render(): TemplateResult {\n const level = Math.min(Math.max(this.headingLevel, 1), 6);\n return html`<article part=\"card\">\n ${this.meta ? html`<p class=\"meta\" part=\"meta\">${this.meta}</p>` : nothing}\n <div class=\"heading\" part=\"heading\" role=\"heading\" aria-level=${level}>${this.href ? html`<a href=${this.href} part=\"link\">${this.heading}</a>` : this.heading}</div>\n ${this.text ? html`<p class=\"text\" part=\"text\">${this.text}</p>` : nothing}\n ${this.linkText && this.href ? html`<span class=\"more\" aria-hidden=\"true\">${this.linkText} \u2192</span>` : nothing}\n </article>`;\n }\n}\n\n/**\n * A word or two of a heading picked out as if selected in a design tool: the\n * accent colour behind it, an outline and four handles.\n *\n * It is decoration round real text. The words stay in the heading, in the\n * page, so they are read, found and translated as the rest of it is; the\n * handles and the optional label are hidden from a screen reader (1.3.1).\n * The words on the accent are the colour the tokens measured against it\n * (1.4.3). Nothing moves, so there is nothing to stop for reduced motion.\n *\n * @category content\n * @icon text\n * @slot - The words to pick out.\n */\nexport class ImpaktHighlight extends ImpaktElement {\n static properties = {\n label: { type: String },\n };\n /** A small tag under the words, such as \"Design \u00B7 H1 / 120\". It is decoration and is not read. */\n declare label: string;\n\n constructor() {\n super();\n this.label = '';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n css`\n :host { display: inline-block; position: relative; padding-inline: 0.1em; margin-inline: -0.02em; background: ${token('color.accent.default', '#ffd43b')}; color: ${token('color.accent.on', '#1a1a1a')}; outline: 1.5px solid ${token('color.accent.on', '#1a1a1a')}; outline-offset: -1px; }\n .handle { position: absolute; inline-size: 8px; block-size: 8px; box-sizing: border-box; background: ${t.surfaceCard}; border: 1.5px solid ${token('color.accent.on', '#1a1a1a')}; }\n .handle:nth-of-type(1) { inset-block-start: -4px; inset-inline-start: -4px; }\n .handle:nth-of-type(2) { inset-block-start: -4px; inset-inline-end: -4px; }\n .handle:nth-of-type(3) { inset-block-end: -4px; inset-inline-start: -4px; }\n .handle:nth-of-type(4) { inset-block-end: -4px; inset-inline-end: -4px; }\n .label { position: absolute; inset-block-start: calc(100% + 8px); inset-inline-start: 0; padding: 3px 7px; white-space: nowrap; font-family: ${t.fontMono}; font-size: 0.6875rem; font-weight: ${fontWeight('medium')}; line-height: 1.4; letter-spacing: 0.06em; text-transform: uppercase; color: ${t.surfaceCard}; background: ${t.text}; border-radius: 3px; }\n @media (forced-colors: active) { :host { forced-color-adjust: none; background: Highlight; color: HighlightText; outline-color: HighlightText; } .handle { border-color: HighlightText; background: Canvas; } .label { background: CanvasText; color: Canvas; } }\n `,\n ];\n\n render(): TemplateResult {\n return html`<slot></slot><span class=\"handle\" aria-hidden=\"true\"></span><span class=\"handle\" aria-hidden=\"true\"></span><span class=\"handle\" aria-hidden=\"true\"></span><span class=\"handle\" aria-hidden=\"true\"></span>${\n this.label ? html`<span class=\"label\" part=\"label\" aria-hidden=\"true\">${this.label}</span>` : nothing\n }`;\n }\n}\n\ncustomElements.define('impakt-work-list', ImpaktWorkList);\ncustomElements.define('impakt-stat-row', ImpaktStatRow);\ncustomElements.define('impakt-faq', ImpaktFaq);\ncustomElements.define('impakt-site-menu', ImpaktSiteMenu);\ncustomElements.define('impakt-offer', ImpaktOffer);\ncustomElements.define('impakt-post-card', ImpaktPostCard);\ncustomElements.define('impakt-highlight', ImpaktHighlight);\ndeclare global {\n interface HTMLElementTagNameMap {\n 'impakt-work-list': ImpaktWorkList;\n 'impakt-stat-row': ImpaktStatRow;\n 'impakt-faq': ImpaktFaq;\n 'impakt-site-menu': ImpaktSiteMenu;\n 'impakt-offer': ImpaktOffer;\n 'impakt-post-card': ImpaktPostCard;\n 'impakt-highlight': ImpaktHighlight;\n }\n}\n", "import { css, html, nothing, type TemplateResult } from 'lit';\nimport { say, ImpaktElement, focusRing, targetSize, visuallyHidden, fontWeight, lineHeight, space, spaceAround, t, token, type, iconSvg } from '@atomic-ui/ui';\n\nconst token_accent = token('color.accent.default', '#c8a15a');\n\nconst reducedMotion = (): boolean => typeof matchMedia === 'function' && matchMedia('(prefers-reduced-motion: reduce)').matches;\n\n/** A round control laid over or beside content: previous, next, close. */\nconst roundButton = css`\n .round { ${targetSize} display: inline-flex; align-items: center; justify-content: center; inline-size: 44px; block-size: 44px; padding: 0; color: ${t.text}; background: ${t.surfaceCard}; border: ${t.borderThin} solid ${t.rule}; border-radius: 50%; box-shadow: ${t.shadowSm}; cursor: pointer; transition: box-shadow 120ms ease-in-out, background-color 120ms ease-in-out; }\n .round:hover:not(:disabled) { box-shadow: ${t.shadowMd}; }\n .round:disabled { opacity: 0.4; cursor: not-allowed; box-shadow: none; }\n`;\n\nconst headingStyles = css`\n .eyebrow { margin: 0; color: var(--impakt-eyebrow, var(--impakt-color-text-eyebrow, ${t.brand})); ${type('sm')} font-size: var(--impakt-font-size-eyebrow, var(--impakt-font-size-sm, 0.875rem)); font-family: ${t.fontEyebrow}; font-weight: var(--impakt-font-weight-eyebrow, ${fontWeight('semibold')}); letter-spacing: ${t.trackingWide}; text-transform: uppercase; }\n .h { margin: 0; color: ${t.textHeading}; font-family: ${t.fontHeading}; font-weight: ${fontWeight('bold')}; letter-spacing: ${t.trackingTight}; text-wrap: balance; }\n .lead { margin: 0; color: ${t.textMuted}; text-wrap: pretty; }\n`;\n\n/**\n * Slides that move sideways: house types, reviews, the rooms of a show home.\n * Put anything in it, one child to a slide.\n *\n * It follows the ARIA carousel pattern. Each slide is named \"2 of 6\", a live\n * region says where you are, and it can be moved with the buttons, the dots,\n * the arrow keys, a swipe or a scroll.\n *\n * **It moves only when asked.** Autoplay is off by default. Turned on, it has a\n * Pause button, stops while pointed at or focused, and never runs for someone\n * who has asked for reduced motion (2.2.2).\n *\n * @category content\n * @icon carousel\n * @slot - The slides, one child to each.\n */\nexport class ImpaktCarousel extends ImpaktElement {\n static properties = {\n label: { type: String },\n perView: { type: String, reflect: true, attribute: 'per-view' },\n arrows: { type: String, reflect: true },\n autoplay: { type: Boolean, reflect: true },\n seconds: { type: Number },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n /** What the slides are, for a screen reader, such as \"House types\". */\n declare label: string;\n /** How many slides show at once on a wide screen. A tablet shows at most two, and a phone one. */\n declare perView: '1' | '2' | '3';\n /** Where the arrows sit: under the slides, or level with the heading above them. */\n declare arrows: 'below' | 'top';\n /** Move on by itself. People can pause it, and it never runs for those who ask for less motion. */\n declare autoplay: boolean;\n /** How long each slide stays, when it moves by itself. */\n declare seconds: number;\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n private index = 0;\n private count = 0;\n /** How many slides fit right now, which the width decides. */\n private visible: number | null = null;\n /** Where a button or dot is taking the row. Until it arrives, the scroll position is not the truth. */\n private heading: number | null = null;\n private settle: ReturnType<typeof setTimeout> | undefined;\n private observer: ResizeObserver | undefined;\n private paused = false;\n private held = false;\n private timer: ReturnType<typeof setInterval> | undefined;\n\n constructor() {\n super();\n this.label = 'Slides';\n this.perView = '1';\n this.arrows = 'below';\n this.autoplay = false;\n this.seconds = 6;\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n spaceAround,\n roundButton,\n css`\n :host { display: block; container-type: inline-size; --most: 1; --gap: ${space(6)}; }\n :host([per-view='2']) { --most: 2; }\n :host([per-view='3']) { --most: 3; }\n .track { --per: var(--most); display: flex; gap: var(--gap); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-block: ${space(1)} ${space(2)}; border-radius: ${t.radiusLg}; }\n .track::-webkit-scrollbar { display: none; }\n ::slotted(*) { flex: 0 0 calc((100% - (var(--per) - 1) * var(--gap)) / var(--per)); min-inline-size: 0; scroll-snap-align: start; box-sizing: border-box; }\n /* Whole slides only: a slice of the next one reads as content spilling out of the page. */\n @container (max-width: 60rem) { .track { --per: min(var(--most), 2); } }\n @container (max-width: 40rem) { .track { --per: 1; --gap: ${space(4)}; } }\n .controls { display: flex; align-items: center; justify-content: space-between; gap: ${space(4)}; margin-block-start: ${space(4)}; }\n .dots { display: flex; flex-wrap: wrap; gap: ${space(1)}; }\n .dot { ${targetSize} display: inline-flex; align-items: center; justify-content: center; padding: 0; background: transparent; border: 0; cursor: pointer; border-radius: ${t.radiusSm}; }\n .dot span { display: block; inline-size: 8px; block-size: 8px; border-radius: 999px; background: ${t.rule}; transition: inline-size 150ms ease-in-out, background-color 150ms ease-in-out; }\n .dot[aria-current='true'] span { inline-size: 24px; background: ${t.brand}; }\n .buttons { display: flex; gap: ${space(2)}; }\n section { position: relative; }\n @container (min-width: 40.01rem) { :host([arrows='top']) .buttons { position: absolute; inset-block-end: calc(100% + ${space(4)}); inset-inline-end: 0; } }\n .sr-only { ${visuallyHidden} }\n @media (forced-colors: active) { .dot span { background: CanvasText; } .dot[aria-current='true'] span { background: Highlight; } }\n `,\n ];\n\n private get track(): HTMLElement | null {\n return this.renderRoot.querySelector('.track');\n }\n\n private get slides(): HTMLElement[] {\n return Array.from(this.children) as HTMLElement[];\n }\n\n /** The last slide that can sit at the start of the row. */\n private get last(): number {\n return Math.max(0, this.count - (this.visible ?? Number(this.perView || 1)));\n }\n\n /** Count what actually fits, and keep the row on a real stop when that changes. */\n private measure(): void {\n const track = this.track;\n const first = this.slides[0];\n if (!track || !first) return;\n const width = first.getBoundingClientRect().width;\n if (width <= 0) return;\n const gap = Number.parseFloat(getComputedStyle(track).columnGap) || 0;\n const fits = Math.max(1, Math.round((track.clientWidth + gap) / (width + gap)));\n if (fits === this.visible) return;\n this.visible = fits;\n this.index = Math.min(this.index, this.last);\n const slide = this.slides[this.index];\n if (slide && typeof track.scrollTo === 'function') track.scrollTo({ left: slide.offsetLeft - track.offsetLeft, behavior: 'auto' });\n this.requestUpdate();\n }\n\n private onSlots(): void {\n const slides = this.slides;\n this.count = slides.length;\n slides.forEach((slide, i) => {\n slide.setAttribute('role', 'group');\n slide.setAttribute('aria-roledescription', say('slide'));\n slide.setAttribute('aria-label', say('{slide} of {slides}', { slide: i + 1, slides: slides.length }));\n });\n this.measure();\n this.requestUpdate();\n }\n\n private go(to: number): void {\n const target = Math.min(this.last, Math.max(0, to));\n this.index = target;\n this.heading = target;\n clearTimeout(this.settle);\n // If the row has not got there by now (a tab in the background, say), put it there.\n this.settle = setTimeout(() => {\n const arrived = this.heading === null;\n this.heading = null;\n const track = this.track;\n const slide = this.slides[this.index];\n if (!arrived && track && slide && typeof track.scrollTo === 'function') track.scrollTo({ left: slide.offsetLeft - track.offsetLeft, behavior: 'auto' });\n }, 900);\n this.requestUpdate();\n const track = this.track;\n const slide = this.slides[target];\n if (track && slide && typeof track.scrollTo === 'function') {\n track.scrollTo({ left: slide.offsetLeft - track.offsetLeft, behavior: reducedMotion() ? 'auto' : 'smooth' });\n }\n }\n\n private onScroll(): void {\n const track = this.track;\n const slides = this.slides;\n if (!track || !slides.length) return;\n let nearest = 0;\n let distance = Infinity;\n slides.forEach((slide, i) => {\n const d = Math.abs(slide.offsetLeft - track.offsetLeft - track.scrollLeft);\n if (d < distance) {\n distance = d;\n nearest = i;\n }\n });\n if (this.heading !== null) {\n if (nearest === this.heading && distance < 2) {\n this.heading = null;\n clearTimeout(this.settle);\n }\n return;\n }\n if (nearest !== this.index) {\n this.index = Math.min(nearest, this.last);\n this.requestUpdate();\n }\n }\n\n private onKey(event: KeyboardEvent): void {\n if (event.key === 'ArrowRight') {\n event.preventDefault();\n this.go(this.index + 1);\n }\n if (event.key === 'ArrowLeft') {\n event.preventDefault();\n this.go(this.index - 1);\n }\n }\n\n private get canPlay(): boolean {\n return this.autoplay && !reducedMotion();\n }\n\n private restart(): void {\n clearInterval(this.timer);\n this.timer = undefined;\n if (!this.canPlay || this.paused || this.held) return;\n this.timer = setInterval(() => this.go(this.index >= this.last ? 0 : this.index + 1), Math.max(2, this.seconds) * 1000);\n }\n\n private hold(held: boolean): void {\n this.held = held;\n this.restart();\n }\n\n private togglePause(): void {\n this.paused = !this.paused;\n this.restart();\n this.requestUpdate();\n }\n\n protected firstUpdated(): void {\n if (typeof ResizeObserver === 'function' && this.track) {\n this.observer = new ResizeObserver(() => this.measure());\n this.observer.observe(this.track);\n }\n }\n\n protected updated(changed: Map<string, unknown>): void {\n if (changed.has('autoplay') || changed.has('seconds')) this.restart();\n if (changed.has('perView')) this.measure();\n }\n\n connectedCallback(): void {\n super.connectedCallback();\n if (this.track) this.observer?.observe(this.track);\n this.restart();\n }\n\n disconnectedCallback(): void {\n super.disconnectedCallback();\n this.observer?.disconnect();\n clearInterval(this.timer);\n clearTimeout(this.settle);\n }\n\n render(): TemplateResult {\n const stops = Array.from({ length: this.last + 1 }, (_, i) => i);\n return html`<section aria-roledescription=${say('carousel')} aria-label=${this.label} part=\"carousel\" @keydown=${this.onKey}\n @mouseenter=${() => this.hold(true)} @mouseleave=${() => this.hold(false)} @focusin=${() => this.hold(true)} @focusout=${() => this.hold(false)}>\n <div class=\"track\" part=\"track\" tabindex=\"0\" @scroll=${this.onScroll}><slot @slotchange=${this.onSlots}></slot></div>\n <div class=\"controls\" part=\"controls\">\n <div class=\"dots\">${stops.length > 1 ? stops.map((i) => html`<button class=\"dot\" type=\"button\" aria-label=${say('Go to slide {slide}', { slide: i + 1 })} aria-current=${i === this.index ? 'true' : 'false'} @click=${() => this.go(i)}><span></span></button>`) : nothing}</div>\n <div class=\"buttons\">\n ${this.canPlay ? html`<button class=\"round\" type=\"button\" aria-label=${say(this.paused ? 'Play the slides' : 'Pause the slides')} @click=${this.togglePause}>${this.paused ? iconSvg('arrow-right', '18px') : html`<svg width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"currentColor\" aria-hidden=\"true\"><rect x=\"6\" y=\"5\" width=\"4\" height=\"14\" rx=\"1\"/><rect x=\"14\" y=\"5\" width=\"4\" height=\"14\" rx=\"1\"/></svg>`}</button>` : nothing}\n <button class=\"round\" type=\"button\" aria-label=${say('Previous slide')} ?disabled=${this.index === 0} @click=${() => this.go(this.index - 1)}>${iconSvg('arrow-left', '18px')}</button>\n <button class=\"round\" type=\"button\" aria-label=${say('Next slide')} ?disabled=${this.index >= this.last} @click=${() => this.go(this.index + 1)}>${iconSvg('arrow-right', '18px')}</button>\n </div>\n </div>\n <p class=\"sr-only\" aria-live=\"polite\">${say('Slide {slide} of {slides}', { slide: this.index + 1, slides: this.count })}</p>\n </section>`;\n }\n}\n\n/** One picture in a gallery. */\nexport interface GalleryItem {\n id?: string;\n src: string;\n alt: string;\n caption?: string;\n}\n\n/**\n * How far a gallery picture stretches so that no row ends in a gap, on a wide\n * container and on a narrow one. The large first picture keeps its own size.\n */\nexport function gallerySpan(index: number, count: number, layout: 'feature' | 'grid'): { wide: number; narrow: number; rows: number } {\n const last = index === count - 1;\n const span = { wide: 1, narrow: 1, rows: 1 };\n if (layout === 'grid') {\n if (last) {\n span.wide = count % 3 ? 4 - (count % 3) : 1;\n span.narrow = count % 2 ? 2 : 1;\n }\n return span;\n }\n if (index === 0) return span;\n if (count === 2) return { wide: 2, narrow: 2, rows: 2 };\n if (count === 3) return { ...span, wide: 2 };\n if (last) {\n const extra = (count - 5) % 4;\n span.wide = count === 4 ? 2 : count > 5 && extra ? 5 - extra : 1;\n span.narrow = count % 2 ? 1 : 2;\n }\n return span;\n}\n\n/**\n * A set of pictures, with the first shown large, that open full screen one at\n * a time: the rooms of a show home, or views of a development.\n *\n * Each picture is a button. The full-screen view is a real modal dialog, so\n * focus stays inside it, Escape closes it and focus returns to the picture that\n * opened it. The arrow keys move between pictures.\n *\n * @category media\n * @icon gallery\n */\nexport class ImpaktGallery extends ImpaktElement {\n static properties = {\n items: { type: Array },\n layout: { type: String, reflect: true },\n label: { type: String },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n declare items: GalleryItem[];\n /** One large picture with smaller ones beside it, or an even grid. */\n declare layout: 'feature' | 'grid';\n /** What the pictures are of, for a screen reader. */\n declare label: string;\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n private shown = -1;\n private opener: HTMLElement | null = null;\n\n constructor() {\n super();\n this.items = [];\n this.layout = 'feature';\n this.label = 'Gallery';\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n spaceAround,\n roundButton,\n css`\n :host { display: block; container-type: inline-size; }\n ul { list-style: none; margin: 0; padding: 0; display: grid; gap: ${space(3)}; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 180px; }\n :host([layout='grid']) ul { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 220px; }\n li { grid-column: span var(--span-wide, 1); grid-row: span var(--span-rows, 1); }\n :host([layout='feature']) li:first-child { grid-column: span 2; grid-row: span 2; }\n .open { position: relative; display: block; inline-size: 100%; block-size: 100%; padding: 0; border: 0; background: ${t.surfaceInset}; border-radius: ${t.radiusXl}; overflow: hidden; cursor: zoom-in; }\n .open img { display: block; inline-size: 100%; block-size: 100%; object-fit: cover; transition: transform 300ms ease-out; }\n .open:hover img { transform: scale(1.03); }\n @container (max-width: 40rem) { ul, :host([layout='grid']) ul { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 130px; } li { grid-column: span var(--span-narrow, 1); } }\n dialog { padding: 0; border: 0; background: transparent; max-inline-size: none; max-block-size: none; inline-size: 100vw; block-size: 100dvh; }\n dialog::backdrop { background: rgb(10 14 12 / 0.9); }\n .stage { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; block-size: 100%; box-sizing: border-box; padding: ${space(4)}; gap: ${space(3)}; color: #fff; }\n .bar { display: flex; align-items: center; justify-content: space-between; ${type('sm')} }\n .middle { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: ${space(3)}; min-block-size: 0; }\n .middle img { display: block; margin: auto; max-inline-size: 100%; max-block-size: 100%; object-fit: contain; border-radius: ${t.radiusLg}; }\n figure { margin: 0; display: flex; min-block-size: 0; block-size: 100%; }\n .caption { margin: 0; text-align: center; ${type('sm')} }\n `,\n ];\n\n private get dialog(): HTMLDialogElement | null {\n return this.renderRoot.querySelector('dialog');\n }\n\n private open(index: number, event: Event): void {\n this.opener = event.currentTarget as HTMLElement;\n this.shown = index;\n this.requestUpdate();\n void this.updateComplete.then(() => {\n const d = this.dialog;\n if (d && !d.open) {\n if (typeof d.showModal === 'function') d.showModal();\n else d.setAttribute('open', '');\n }\n });\n }\n\n private close(): void {\n const d = this.dialog;\n if (d?.open) {\n if (typeof d.close === 'function') d.close();\n else d.removeAttribute('open');\n }\n this.onClosed();\n }\n\n private onClosed(): void {\n if (this.shown === -1) return;\n this.shown = -1;\n this.requestUpdate();\n this.opener?.focus();\n }\n\n private step(by: number): void {\n const n = (this.items ?? []).length;\n if (!n || this.shown < 0) return;\n this.shown = (this.shown + by + n) % n;\n this.requestUpdate();\n }\n\n private onKey(event: KeyboardEvent): void {\n if (event.key === 'ArrowRight') {\n event.preventDefault();\n this.step(1);\n }\n if (event.key === 'ArrowLeft') {\n event.preventDefault();\n this.step(-1);\n }\n }\n\n render(): TemplateResult {\n const items = this.items ?? [];\n const current = this.shown >= 0 ? items[this.shown] : undefined;\n return html`<ul aria-label=${this.label} part=\"list\">${items.map((item, i) => {\n const span = gallerySpan(i, items.length, this.layout);\n return html`<li style=${`--span-wide:${span.wide};--span-narrow:${span.narrow};--span-rows:${span.rows}`}>\n <button class=\"open\" type=\"button\" aria-label=${say('View larger: {picture}', { picture: item.alt })} @click=${(e: Event) => this.open(i, e)}><img src=${item.src} alt=${item.alt} loading=\"lazy\" /></button>\n </li>`;\n })}</ul>\n <dialog aria-label=${this.label} @keydown=${this.onKey} @close=${this.onClosed}>\n ${\n current\n ? html`<div class=\"stage\">\n <div class=\"bar\"><span>${this.shown + 1} of ${items.length}</span><button class=\"round\" type=\"button\" aria-label=${say('Close')} @click=${this.close}>${iconSvg('close', '18px')}</button></div>\n <div class=\"middle\">\n <button class=\"round\" type=\"button\" aria-label=${say('Previous picture')} @click=${() => this.step(-1)}>${iconSvg('arrow-left', '18px')}</button>\n <figure><img src=${current.src} alt=${current.alt} /></figure>\n <button class=\"round\" type=\"button\" aria-label=${say('Next picture')} @click=${() => this.step(1)}>${iconSvg('arrow-right', '18px')}</button>\n </div>\n <p class=\"caption\">${current.caption ?? current.alt}</p>\n </div>`\n : nothing\n }\n </dialog>`;\n }\n}\n\n/** One accreditation or partner. */\nexport interface LogoItem {\n id?: string;\n src: string;\n alt: string;\n href?: string;\n}\n\n/**\n * A row of logos that lends trust: accreditations, awards, lenders, partners.\n *\n * The logos are drawn quietly so they do not fight the page, and come to full\n * colour when pointed at. Each one is named by its alt text.\n *\n * @category content\n * @icon logos\n */\nexport class ImpaktLogoCloud extends ImpaktElement {\n static properties = {\n heading: { type: String },\n items: { type: Array },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n /** A line above the logos, such as \"Accredited by\". */\n declare heading: string;\n declare items: LogoItem[];\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n constructor() {\n super();\n this.heading = '';\n this.items = [];\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n spaceAround,\n css`\n :host { display: block; }\n p { margin: 0 0 ${space(6)}; text-align: center; color: ${t.textMuted}; ${type('sm')} font-weight: ${fontWeight('medium')}; }\n ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: ${space(8)} ${space(12)}; }\n img { display: block; block-size: 40px; inline-size: auto; max-inline-size: 160px; object-fit: contain; filter: grayscale(1); opacity: 0.7; transition: filter 200ms ease-in-out, opacity 200ms ease-in-out; }\n li:hover img { filter: none; opacity: 1; }\n a { display: block; border-radius: ${t.radiusSm}; }\n `,\n ];\n\n render(): TemplateResult {\n return html`${this.heading ? html`<p part=\"heading\">${this.heading}</p>` : nothing}\n <ul part=\"list\">${(this.items ?? []).map((logo) => html`<li>${logo.href ? html`<a href=${logo.href}><img src=${logo.src} alt=${logo.alt} /></a>` : html`<img src=${logo.src} alt=${logo.alt} />`}</li>`)}</ul>`;\n }\n}\n\n/** One step in a process. */\nexport interface StepItem {\n id?: string;\n heading: string;\n text?: string;\n /** A short line above the heading, such as how long the step takes. */\n meta?: string;\n}\n\n/**\n * A process, in order, joined by a line: how buying a home works, what happens\n * after you apply.\n *\n * It is an ordered list, so a screen reader says the number and how many there\n * are. The numbers are drawn from the list, not typed in.\n *\n * @category content\n * @icon steps\n */\nexport class ImpaktSteps extends ImpaktElement {\n static properties = {\n items: { type: Array },\n orientation: { type: String, reflect: true },\n look: { type: String, reflect: true },\n headingLevel: { type: Number, attribute: 'heading-level' },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n declare items: StepItem[];\n /** Across the page, or down it. Across becomes down on a narrow screen. */\n declare orientation: 'horizontal' | 'vertical';\n /**\n * `numbered` joins numbered circles with a line. `ruled` gives each step a\n * coloured rule along its top, in the brand's chart colours, as a project\n * plan's phases are drawn. The steps are an ordered list either way.\n */\n declare look: 'numbered' | 'ruled';\n /** The level of each step's heading. One below the heading above the steps. */\n declare headingLevel: 2 | 3 | 4;\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n constructor() {\n super();\n this.items = [];\n this.orientation = 'horizontal';\n this.look = 'numbered';\n this.headingLevel = 3;\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n spaceAround,\n headingStyles,\n css`\n :host { display: block; container-type: inline-size; }\n ol { list-style: none; margin: 0; padding: 0; counter-reset: step; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: ${space(6)}; }\n li { position: relative; counter-increment: step; display: flex; flex-direction: column; gap: ${space(2)}; }\n li::before { content: counter(step); display: flex; align-items: center; justify-content: center; inline-size: 40px; block-size: 40px; border-radius: 50%; background: ${t.brand}; color: ${t.onBrand}; ${type('sm')} font-weight: ${fontWeight('bold')}; position: relative; z-index: 1; margin-block-end: ${space(2)}; }\n li:not(:last-child)::after { content: ''; position: absolute; inset-block-start: 20px; inset-inline-start: 48px; inset-inline-end: calc(-1 * ${space(6)} + 8px); block-size: 2px; background: ${t.rule}; }\n .h { ${type('lg')} letter-spacing: 0; }\n .meta { margin: 0; ${type('sm')} color: ${t.textMuted}; font-family: ${t.fontMono}; letter-spacing: 0.02em; }\n .body { margin: 0; color: ${t.textMuted}; line-height: ${lineHeight('normal')}; text-wrap: pretty; }\n :host([orientation='vertical']) ol { grid-auto-flow: row; }\n :host([orientation='vertical']) li { padding-inline-start: 56px; min-block-size: 56px; }\n :host([orientation='vertical']) li::before { position: absolute; inset-inline-start: 0; inset-block-start: 0; margin: 0; }\n :host([orientation='vertical']) li:not(:last-child)::after { inset-block-start: 48px; inset-block-end: calc(-1 * ${space(6)} + 8px); inset-inline-start: 19px; inset-inline-end: auto; inline-size: 2px; block-size: auto; }\n @container (max-width: 40rem) {\n ol { grid-auto-flow: row; }\n li { padding-inline-start: 56px; min-block-size: 56px; }\n li::before { position: absolute; inset-inline-start: 0; inset-block-start: 0; margin: 0; }\n li:not(:last-child)::after { inset-block-start: 48px; inset-block-end: calc(-1 * ${space(6)} + 8px); inset-inline-start: 19px; inset-inline-end: auto; inline-size: 2px; block-size: auto; }\n }\n :host([look='ruled']) li { padding-block-start: ${space(5)}; border-block-start: 3px solid var(--rule); }\n :host([look='ruled']) li::before, :host([look='ruled']) li::after { display: none; }\n :host([look='ruled']) ol { gap: ${space(5)}; }\n /* On a phone the ruled steps become a branch graph: one trunk down the left, and each step a coloured branch off it with a dot. */\n @container (max-width: 40rem) {\n :host([look='ruled']) ol { gap: 0; }\n :host([look='ruled']) li { padding-inline-start: 40px; padding-block: ${space(6)}; min-block-size: 0; border-block-start: 0; }\n :host([look='ruled']) li::before { display: block; content: ''; position: absolute; inset-block: 0; inset-inline-start: 0; inline-size: 2px; block-size: auto; border-radius: 0; margin: 0; background: ${t.text}; }\n :host([look='ruled']) li::after { display: block; content: ''; position: absolute; inset-block: ${space(3)}; inset-inline-start: 2px; inset-inline-end: auto; inline-size: 12px; block-size: auto; background: radial-gradient(circle at 100% 34px, var(--rule) 4px, transparent 4.5px); border: 2px solid var(--rule); border-inline-start: 0; border-radius: 0 14px 14px 0; }\n }\n @media (forced-colors: active) { li::before { border: 1px solid CanvasText; } li:not(:last-child)::after { background: CanvasText; } :host([look='ruled']) li { border-block-start-color: CanvasText; } }\n `,\n ];\n\n render(): TemplateResult {\n return html`<ol part=\"list\">${(this.items ?? []).map(\n (\n step,\n i,\n ) => html`<li part=\"step\" style=${this.look === 'ruled' ? `--rule:var(--impakt-color-chart-${(i % 5) + 1}, ${'var(--impakt-color-brand-default, #1f4ed8)'})` : nothing}>\n ${step.meta ? html`<p class=\"meta\">${step.meta}</p>` : nothing}\n <div class=\"h\" role=\"heading\" aria-level=${this.headingLevel}>${step.heading}</div>\n ${step.text ? html`<p class=\"body\">${step.text}</p>` : nothing}\n </li>`,\n )}</ol>`;\n }\n}\n\n/**\n * A picture beside words, the working section of a marketing page: a heading,\n * a line of text, a short list of points and an action.\n *\n * On a phone the words come first, whichever side the picture is on, so the\n * reading order never depends on the layout.\n *\n * @category layout\n * @icon split\n * @role heading\n * @slot actions - Buttons and links under the words.\n */\nexport class ImpaktMediaSplit extends ImpaktElement {\n static properties = {\n eyebrow: { type: String },\n heading: { type: String },\n lead: { type: String },\n points: { type: Array },\n level: { type: Number, reflect: true },\n imageSrc: { type: String, attribute: 'image-src' },\n imageAlt: { type: String, attribute: 'image-alt' },\n imageSide: { type: String, reflect: true, attribute: 'image-side' },\n insetSrc: { type: String, attribute: 'inset-src' },\n insetAlt: { type: String, attribute: 'inset-alt' },\n ratio: { type: String, reflect: true },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n declare eyebrow: string;\n declare heading: string;\n /** A sentence or two under the heading. */\n declare lead: string;\n /** Short points, each drawn with a tick. */\n declare points: string[];\n /** The heading's level in the page. */\n declare level: 2 | 3;\n declare imageSrc: string;\n /** What the picture shows. Leave empty only when it is decoration. */\n declare imageAlt: string;\n /** A smaller picture overlapping the corner of the main one. */\n declare insetSrc: string;\n declare insetAlt: string;\n /** Which side the picture sits on, on a wide screen. */\n declare imageSide: 'start' | 'end';\n /** The picture's shape. */\n declare ratio: '4:3' | '1:1' | '3:2' | '16:9';\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n constructor() {\n super();\n this.eyebrow = '';\n this.heading = '';\n this.lead = '';\n this.points = [];\n this.level = 2;\n this.imageSrc = '';\n this.imageAlt = '';\n this.imageSide = 'end';\n this.insetSrc = '';\n this.insetAlt = '';\n this.ratio = '4:3';\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n spaceAround,\n headingStyles,\n css`\n :host { display: block; container-type: inline-size; --ratio: 4 / 3; }\n :host([ratio='1:1']) { --ratio: 1 / 1; }\n :host([ratio='3:2']) { --ratio: 3 / 2; }\n :host([ratio='16:9']) { --ratio: 16 / 9; }\n .split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: ${space(16)}; align-items: center; }\n :host([image-side='start']) .picture { order: -1; }\n .words { display: flex; flex-direction: column; gap: ${space(4)}; }\n .h { ${type('4xl')} }\n .lead { ${type('lg')} }\n ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: ${space(3)}; }\n li { display: flex; gap: ${space(3)}; align-items: flex-start; line-height: ${lineHeight('normal')}; }\n .tick { flex: none; display: inline-flex; align-items: center; justify-content: center; inline-size: 24px; block-size: 24px; border-radius: 50%; background: ${t.brandSubtle}; color: ${t.brand}; }\n .actions { display: flex; flex-wrap: wrap; gap: ${space(3)} ${space(4)}; align-items: center; margin-block-start: ${space(2)}; }\n img { display: block; inline-size: 100%; aspect-ratio: var(--ratio); object-fit: cover; border-radius: ${t.radius2xl}; box-shadow: ${t.shadowXl}; }\n .picture { position: relative; }\n .picture.has-inset { padding-block-end: 8%; padding-inline-end: 4%; }\n .inset { position: absolute; inset-block-end: 0; inset-inline-end: 0; inline-size: 42%; aspect-ratio: 10 / 7; border: 6px solid ${t.surfaceCard}; border-radius: ${t.radiusXl}; box-sizing: border-box; }\n @container (max-width: 48rem) {\n .split { grid-template-columns: minmax(0, 1fr); gap: ${space(8)}; }\n :host([image-side='start']) .picture { order: 0; }\n .h { ${type('3xl')} }\n }\n `,\n ];\n\n render(): TemplateResult {\n return html`<div class=\"split\" part=\"split\">\n <div class=\"words\">\n ${this.eyebrow ? html`<p class=\"eyebrow\" part=\"eyebrow\">${this.eyebrow}</p>` : nothing}\n <div class=\"h\" role=\"heading\" aria-level=${this.level}>${this.heading}</div>\n ${this.lead ? html`<p class=\"lead\">${this.lead}</p>` : nothing}\n ${this.points?.length ? html`<ul>${this.points.map((p) => html`<li><span class=\"tick\">${iconSvg('check', '14px')}</span><span>${p}</span></li>`)}</ul>` : nothing}\n <div class=\"actions\"><slot name=\"actions\"></slot></div>\n </div>\n ${this.imageSrc ? html`<div class=\"picture ${this.insetSrc ? 'has-inset' : ''}\"><img src=${this.imageSrc} alt=${this.imageAlt} loading=\"lazy\" part=\"image\" />${this.insetSrc ? html`<img class=\"inset\" src=${this.insetSrc} alt=${this.insetAlt} loading=\"lazy\" />` : nothing}</div>` : nothing}\n </div>`;\n }\n}\n\n/**\n * The closing push of a page: a rounded panel with a heading, a line of text\n * and the page's main action, set apart from everything above it.\n *\n * @category layout\n * @icon banner\n * @slot actions - The buttons.\n */\nexport class ImpaktCtaBanner extends ImpaktElement {\n static properties = {\n heading: { type: String },\n lead: { type: String },\n tone: { type: String, reflect: true },\n align: { type: String, reflect: true },\n imageSrc: { type: String, attribute: 'image-src' },\n imageAlt: { type: String, attribute: 'image-alt' },\n headingLevel: { type: Number, attribute: 'heading-level' },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n declare heading: string;\n declare lead: string;\n /** The panel's colour. */\n declare tone: 'brand' | 'subtle' | 'card';\n /** Words beside the action, centred above it, or above it on the left. */\n declare align: 'split' | 'center' | 'stacked';\n /** A photo behind the words, with a scrim so they stay readable. */\n declare imageSrc: string;\n declare imageAlt: string;\n declare headingLevel: 2 | 3;\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n constructor() {\n super();\n this.heading = '';\n this.lead = '';\n this.tone = 'brand';\n this.align = 'split';\n this.imageSrc = '';\n this.imageAlt = '';\n this.headingLevel = 2;\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n spaceAround,\n headingStyles,\n css`\n :host { display: block; container-type: inline-size; }\n .panel { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: ${space(8)}; padding: ${space(16)}; border-radius: ${t.radius2xl}; background: ${t.surfaceCard}; box-shadow: ${t.shadowSm}, inset 0 0 0 1px ${t.hairline}; }\n :host([tone='subtle']) .panel { background: ${t.surfaceSubtle}; box-shadow: none; }\n :host([tone='brand']) .panel { background: ${t.brand}; color: ${t.onBrand}; box-shadow: ${t.shadowLg}; }\n /* Only the words take the light colours: a button in the actions keeps its own. */\n :host([tone='brand']) .words { --impakt-color-text-heading: ${t.onBrand}; --impakt-color-text-default: ${t.onBrand}; --impakt-color-text-muted: ${t.onBrand}; --impakt-color-text-link: ${t.onBrand}; }\n /* A soft glow in the corner, so a flat colour has some depth. Decoration only. */\n :host([tone='brand']) .panel::before { content: ''; position: absolute; inset-block-start: -40%; inset-inline-end: -10%; inline-size: 60%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, ${t.onBrand} 18%, transparent), transparent); pointer-events: none; }\n .photo { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; object-fit: cover; }\n .panel.pictured { min-block-size: 26rem; color: #fff; background: #12211a; --impakt-color-text-heading: #fff; }\n .panel.pictured::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgb(18 31 26 / 0.8) 0%, rgb(18 31 26 / 0.1) 75%); }\n .panel.pictured .words, .panel.pictured .actions { z-index: 1; }\n @container (max-width: 48rem) { .panel.pictured { justify-content: flex-end; } .panel.pictured::after { background: linear-gradient(180deg, rgb(18 31 26 / 0.15) 0%, rgb(18 31 26 / 0.85) 100%); } }\n .words { position: relative; display: flex; flex-direction: column; gap: ${space(3)}; max-inline-size: 40rem; }\n .h { ${type('4xl')} }\n .lead { ${type('lg')} }\n .actions { position: relative; flex: none; display: flex; flex-wrap: wrap; gap: ${space(3)}; }\n :host([align='stacked']) .panel { flex-direction: column; align-items: flex-start; justify-content: center; }\n :host([align='center']) .panel { flex-direction: column; text-align: center; }\n :host([align='center']) .words { align-items: center; }\n @container (max-width: 48rem) { .panel { flex-direction: column; align-items: flex-start; padding: ${space(8)} ${space(6)}; } .h { ${type('3xl')} } :host([align='center']) .panel { align-items: center; } }\n @media (forced-colors: active) { .panel { border: 1px solid CanvasText; } }\n `,\n ];\n\n render(): TemplateResult {\n return html`<div class=\"panel ${this.imageSrc ? 'pictured' : ''}\" part=\"panel\">\n ${this.imageSrc ? html`<img class=\"photo\" src=${this.imageSrc} alt=${this.imageAlt} />` : nothing}\n <div class=\"words\">\n <div class=\"h\" role=\"heading\" aria-level=${this.headingLevel}>${this.heading}</div>\n ${this.lead ? html`<p class=\"lead\">${this.lead}</p>` : nothing}\n </div>\n <div class=\"actions\"><slot name=\"actions\"></slot></div>\n </div>`;\n }\n}\n\n/** One review. */\nexport interface ReviewItem {\n id?: string;\n quote: string;\n person: string;\n about?: string;\n rating?: number;\n avatarSrc?: string;\n}\n\nconst stars = (rating: number): TemplateResult =>\n html`<span class=\"stars\" role=\"img\" aria-label=${say('Rated {rating} out of 5', { rating })}>${[1, 2, 3, 4, 5].map((n) => html`<svg width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" aria-hidden=\"true\" fill=${n <= rating ? 'currentColor' : 'none'} stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linejoin=\"round\"><path d=\"M12 3.5l2.6 5.4 5.9.7-4.4 4 1.2 5.8L12 16.5l-5.3 2.9 1.2-5.8-4.4-4 5.9-.7z\"/></svg>`)}</span>`;\n\nconst initials = (name: string): string =>\n name\n .split(/\\s+/)\n .filter((w) => /^[A-Za-z]/.test(w) && w.toLowerCase() !== 'and')\n .slice(0, 2)\n .map((w) => w[0]!.toUpperCase())\n .join('');\n\n/**\n * What customers say, in cards, with their rating and a face or their\n * initials, and a summary line above them.\n *\n * A rating is said in words as well as drawn in stars.\n *\n * @category content\n * @icon reviews\n */\nexport class ImpaktReviews extends ImpaktElement {\n static properties = {\n summary: { type: String },\n rating: { type: Number },\n items: { type: Array },\n columns: { type: String, reflect: true },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n /** A line above the reviews, such as \"4.8 from 312 buyers\". */\n declare summary: string;\n /** The overall rating out of 5, drawn beside the summary. */\n declare rating: number | undefined;\n declare items: ReviewItem[];\n declare columns: 'two' | 'three';\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n constructor() {\n super();\n this.summary = '';\n this.rating = undefined;\n this.items = [];\n this.columns = 'three';\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n spaceAround,\n css`\n :host { display: block; container-type: inline-size; }\n .top { display: flex; align-items: center; gap: ${space(3)}; margin-block-end: ${space(6)}; ${type('sm')} font-weight: ${fontWeight('medium')}; }\n .stars { display: inline-flex; gap: 2px; color: ${token_accent}; }\n ul { list-style: none; margin: 0; padding: 0; display: grid; gap: ${space(6)}; grid-template-columns: repeat(3, minmax(0, 1fr)); }\n :host([columns='two']) ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }\n li { display: flex; flex-direction: column; gap: ${space(4)}; padding: ${space(6)}; background: ${t.surfaceCard}; border-radius: ${t.radiusXl}; box-shadow: ${t.shadowSm}, inset 0 0 0 1px ${t.hairline}; }\n blockquote { margin: 0; flex: 1; ${type('md')} text-wrap: pretty; }\n .who { display: flex; align-items: center; gap: ${space(3)}; }\n .face { flex: none; display: inline-flex; align-items: center; justify-content: center; inline-size: 44px; block-size: 44px; border-radius: 50%; overflow: hidden; background: ${t.brandSubtle}; color: ${t.brand}; ${type('sm')} font-weight: ${fontWeight('bold')}; }\n .face img { inline-size: 100%; block-size: 100%; object-fit: cover; }\n .name { font-weight: ${fontWeight('semibold')}; ${type('sm')} }\n .about { color: ${t.textMuted}; ${type('sm')} }\n @container (max-width: 56rem) { ul, :host([columns='two']) ul { grid-template-columns: minmax(0, 1fr); } }\n `,\n ];\n\n render(): TemplateResult {\n return html`${this.summary || this.rating ? html`<p class=\"top\" part=\"summary\" style=\"margin-block-start:0\">${this.rating ? stars(Math.round(this.rating)) : nothing}<span>${this.summary}</span></p>` : nothing}\n <ul part=\"list\">${(this.items ?? []).map(\n (r) => html`<li part=\"review\">\n ${r.rating ? stars(r.rating) : nothing}\n <blockquote>${r.quote}</blockquote>\n <div class=\"who\"><span class=\"face\" aria-hidden=\"true\">${r.avatarSrc ? html`<img src=${r.avatarSrc} alt=\"\" />` : initials(r.person)}</span><span><span class=\"name\">${r.person}</span>${r.about ? html`<br /><span class=\"about\">${r.about}</span>` : nothing}</span></div>\n </li>`,\n )}</ul>`;\n }\n}\n\n/**\n * An email sign-up in one line: release dates, price lists, launch news.\n *\n * The field has a real label, the browser checks the address, and what happens\n * with the address is said beside the button. The app receives the address and\n * says when it is done.\n *\n * @category form\n * @icon mail\n * @fires {CustomEvent<{ email: string }>} impakt-submit - When a valid address is sent. The address is in detail.email.\n */\nexport class ImpaktNewsletter extends ImpaktElement {\n static properties = {\n heading: { type: String },\n lead: { type: String },\n label: { type: String },\n buttonText: { type: String, attribute: 'button-text' },\n smallPrint: { type: String, attribute: 'small-print' },\n doneText: { type: String, attribute: 'done-text' },\n headingLevel: { type: Number, attribute: 'heading-level' },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n declare heading: string;\n declare lead: string;\n /** The field's label. */\n declare label: string;\n declare buttonText: string;\n /** What happens with the address, such as how to stop the emails. */\n declare smallPrint: string;\n /** What is said once the address is sent. */\n declare doneText: string;\n declare headingLevel: 2 | 3;\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n private done = false;\n\n constructor() {\n super();\n this.heading = '';\n this.lead = '';\n this.label = 'Email address';\n this.buttonText = 'Sign up';\n this.smallPrint = '';\n this.doneText = 'Thank you. You\u2019re on the list.';\n this.headingLevel = 2;\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n spaceAround,\n headingStyles,\n css`\n :host { display: block; container-type: inline-size; }\n .wrap { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: ${space(8)}; align-items: center; }\n .words { display: flex; flex-direction: column; gap: ${space(2)}; }\n .h { ${type('2xl')} }\n form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: ${space(1)} ${space(3)}; }\n label { grid-column: 1 / -1; ${type('sm')} font-weight: ${fontWeight('semibold')}; }\n input { min-block-size: 44px; box-sizing: border-box; inline-size: 100%; padding: ${space(2.5)} ${space(3)}; font: inherit; color: ${t.text}; background: ${t.surfaceCard}; border: ${t.borderThin} solid ${t.border}; border-radius: ${t.radiusLg}; box-shadow: ${t.shadowXs}; }\n button { ${targetSize} min-block-size: 44px; padding: ${space(2)} ${space(5)}; font: inherit; ${type('sm')} font-weight: ${fontWeight('semibold')}; color: ${t.onBrand}; background: ${t.brand}; border: 0; border-radius: ${t.radiusLg}; box-shadow: ${t.shadowXs}; cursor: pointer; }\n button:hover { background: ${t.brandHover}; }\n .note { grid-column: 1 / -1; margin: ${space(1)} 0 0; color: ${t.textMuted}; ${type('sm')} }\n .done { margin: 0; ${type('md')} font-weight: ${fontWeight('semibold')}; }\n @container (max-width: 40rem) { .wrap { grid-template-columns: minmax(0, 1fr); } }\n `,\n ];\n\n private submit(event: SubmitEvent): void {\n event.preventDefault();\n const form = event.currentTarget as HTMLFormElement;\n if (typeof form.reportValidity === 'function' && !form.reportValidity()) return;\n const email = (form.querySelector('input') as HTMLInputElement).value.trim();\n this.dispatchEvent(new CustomEvent('impakt-submit', { detail: { email }, bubbles: true, composed: true }));\n this.done = true;\n this.requestUpdate();\n }\n\n render(): TemplateResult {\n const field = this.id_('email');\n return html`<div class=\"wrap\" part=\"wrap\">\n <div class=\"words\">\n ${this.heading ? html`<div class=\"h\" role=\"heading\" aria-level=${this.headingLevel}>${this.heading}</div>` : nothing}\n ${this.lead ? html`<p class=\"lead\">${this.lead}</p>` : nothing}\n </div>\n <div aria-live=\"polite\">${\n this.done\n ? html`<p class=\"done\">${this.doneText}</p>`\n : html`<form @submit=${this.submit}>\n <label for=${field}>${this.label}</label>\n <input id=${field} type=\"email\" name=\"email\" autocomplete=\"email\" required />\n <button type=\"submit\">${this.buttonText}</button>\n ${this.smallPrint ? html`<p class=\"note\">${this.smallPrint}</p>` : nothing}\n </form>`\n }</div>\n </div>`;\n }\n}\n\ncustomElements.define('impakt-carousel', ImpaktCarousel);\ncustomElements.define('impakt-gallery', ImpaktGallery);\ncustomElements.define('impakt-logo-cloud', ImpaktLogoCloud);\ncustomElements.define('impakt-steps', ImpaktSteps);\ncustomElements.define('impakt-media-split', ImpaktMediaSplit);\ncustomElements.define('impakt-cta-banner', ImpaktCtaBanner);\ncustomElements.define('impakt-reviews', ImpaktReviews);\ncustomElements.define('impakt-newsletter', ImpaktNewsletter);\ndeclare global {\n interface HTMLElementTagNameMap {\n 'impakt-carousel': ImpaktCarousel;\n 'impakt-gallery': ImpaktGallery;\n 'impakt-logo-cloud': ImpaktLogoCloud;\n 'impakt-steps': ImpaktSteps;\n 'impakt-media-split': ImpaktMediaSplit;\n 'impakt-cta-banner': ImpaktCtaBanner;\n 'impakt-reviews': ImpaktReviews;\n 'impakt-newsletter': ImpaktNewsletter;\n }\n}\n", "import { css, html, nothing, type TemplateResult } from 'lit';\nimport { say, pageLocale, ImpaktElement, focusRing, targetSize, fontWeight, space, spaceAround, t, type, iconSvg } from '@atomic-ui/ui';\n\nexport interface SitePlot {\n id?: string;\n /** What is printed on the pin, such as 14. */\n number: string;\n /** The house type, such as The Hawthorn. */\n name?: string;\n status: 'available' | 'reserved' | 'sold';\n price?: string;\n beds?: string;\n /** How far across the plan the pin sits, from 0 to 100. */\n x: number | string;\n /** How far down the plan the pin sits, from 0 to 100. */\n y: number | string;\n href?: string;\n}\n\n/**\n * A drawing of the development with a pin on every plot. Choose a pin to see\n * whether it is available, what it costs and where to go next.\n *\n * Every pin is a button named in full, such as \"Plot 14, The Hawthorn,\n * Available, \u00A3385,000\". Status is shown by the pin's shape as well as its\n * colour, so it does not rely on colour alone (1.4.1).\n *\n * @category content\n * @icon map\n * @fires {CustomEvent<{ plot: SitePlot }>} impakt-select - When a plot is chosen. The plot is in detail.plot.\n */\nexport class ImpaktSitePlan extends ImpaktElement {\n static properties = {\n imageSrc: { type: String, attribute: 'image-src' },\n imageAlt: { type: String, attribute: 'image-alt' },\n plots: { type: Array },\n hint: { type: String },\n selectedPlot: { type: String, attribute: 'selected-plot' },\n panel: { type: String, reflect: true },\n plotWord: { type: String, attribute: 'plot-word' },\n actionText: { type: String, attribute: 'action-text' },\n availableText: { type: String, attribute: 'available-text' },\n reservedText: { type: String, attribute: 'reserved-text' },\n soldText: { type: String, attribute: 'sold-text' },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n declare imageSrc: string;\n declare imageAlt: string;\n declare plots: SitePlot[];\n /** The number of the plot shown first. */\n declare selectedPlot: string;\n /** The details beside the plan, or floating over it. */\n declare panel: 'beside' | 'over';\n /** What is said before a plot is chosen. */\n declare hint: string;\n declare plotWord: string;\n declare actionText: string;\n declare availableText: string;\n declare reservedText: string;\n declare soldText: string;\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n private chosen: SitePlot | undefined;\n\n constructor() {\n super();\n this.imageSrc = '';\n this.imageAlt = '';\n this.plots = [];\n this.hint = 'Choose a plot to see its price and availability.';\n this.selectedPlot = '';\n this.panel = 'beside';\n this.plotWord = 'Plot';\n this.actionText = 'View this home';\n this.availableText = 'Available';\n this.reservedText = 'Reserved';\n this.soldText = 'Sold';\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n spaceAround,\n css`\n :host { display: block; container-type: inline-size; }\n .wrap { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: ${space(6)}; align-items: start; }\n .plan { position: relative; overflow: hidden; border-radius: ${t.radius2xl}; background: ${t.surfaceSubtle}; box-shadow: ${t.shadowMd}; line-height: 0; }\n .plan img { inline-size: 100%; block-size: auto; }\n .pin { position: absolute; display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; inline-size: 34px; block-size: 34px; margin: -17px 0 0 -17px; padding: 0; font: inherit; ${type('xs')} line-height: 1; font-weight: ${fontWeight('bold')}; color: ${t.onBrand}; background: ${t.brand}; border: 2px solid ${t.surfaceCard}; border-radius: 50%; box-shadow: ${t.shadowMd}; cursor: pointer; transition: transform 120ms ease-in-out; }\n .pin:hover { transform: scale(1.12); }\n .pin.reserved { color: ${t.text}; background: ${t.warningSubtle}; border-color: ${t.warning}; border-style: dashed; }\n .pin.sold { color: ${t.textMuted}; background: ${t.surfaceCard}; border-color: ${t.border}; border-radius: ${t.radius}; }\n .pin[aria-pressed='true'] { transform: scale(1.22); box-shadow: ${t.shadowLg}, 0 0 0 3px ${t.brand}; }\n .panel { display: flex; flex-direction: column; gap: ${space(3)}; padding: ${space(6)}; background: ${t.surfaceCard}; border-radius: ${t.radius2xl}; box-shadow: ${t.shadowSm}, 0 0 0 1px color-mix(in srgb, ${t.text} 6%, transparent); }\n .hint { margin: 0; color: ${t.textMuted}; }\n .name { margin: 0; font-family: ${t.fontHeading}; ${type('2xl')} font-weight: ${fontWeight('bold')}; color: ${t.textHeading}; }\n .sub { margin: 0; color: ${t.textMuted}; }\n .price { margin: 0; ${type('xl')} font-weight: ${fontWeight('semibold')}; }\n .status { align-self: flex-start; padding: ${space(0.5)} ${space(2.5)}; ${type('xs')} font-weight: ${fontWeight('semibold')}; color: ${t.successText}; background: ${t.successSubtle}; border-radius: 999px; }\n .status.reserved { color: ${t.warningText}; background: ${t.warningSubtle}; }\n .status.sold { color: ${t.text}; background: ${t.surfaceSubtle}; }\n .go { ${targetSize} display: inline-flex; align-items: center; justify-content: center; gap: ${space(2)}; padding: ${space(2)} ${space(4)}; ${type('sm')} font-weight: ${fontWeight('semibold')}; color: ${t.onBrand}; text-decoration: none; background: ${t.brand}; border-radius: ${t.radiusLg}; }\n .go:hover { background: ${t.brandHover}; }\n .legend { display: flex; flex-wrap: wrap; gap: ${space(4)}; margin: ${space(3)} 0 0; padding: 0; list-style: none; ${type('sm')} color: ${t.textMuted}; }\n .legend li { display: inline-flex; align-items: center; gap: ${space(2)}; }\n .key { box-sizing: border-box; inline-size: 14px; block-size: 14px; background: ${t.brand}; border: 2px solid ${t.surfaceCard}; border-radius: 50%; outline: 1px solid color-mix(in srgb, currentColor 55%, transparent); }\n .key.reserved { background: ${t.warningSubtle}; border: 2px dashed ${t.warning}; }\n .key.sold { background: ${t.surfaceCard}; border: 2px solid ${t.border}; border-radius: 3px; }\n :host { --plan-card: var(--impakt-solid-card, ${t.surfaceCard}); --plan-text: var(--impakt-solid-text, ${t.text}); --plan-heading: var(--impakt-solid-heading, ${t.text}); --plan-muted: var(--impakt-solid-muted, ${t.textMuted}); }\n :host([panel='over']) .panel { background: var(--plan-card); color: var(--plan-text); --impakt-color-surface-card: var(--plan-card); --impakt-color-text-default: var(--plan-text); --impakt-color-text-heading: var(--plan-heading); --impakt-color-text-muted: var(--plan-muted); }\n @container (min-width: 44.01rem) { :host([panel='over']) .wrap { position: relative; grid-template-columns: minmax(0, 1fr); } :host([panel='over']) .panel { position: absolute; inset-block-start: 32%; inset-inline-end: ${space(8)}; inline-size: 22.5rem; box-sizing: border-box; box-shadow: ${t.shadowXl}; } }\n @container (max-width: 44rem) { .wrap { grid-template-columns: minmax(0, 1fr); } }\n `,\n ];\n\n willUpdate(changed: Map<string, unknown>): void {\n if ((changed.has('selectedPlot') || changed.has('plots')) && this.selectedPlot && !this.chosen)\n this.chosen = this.plots.find((p) => String(p.number) === this.selectedPlot);\n }\n\n private word(status: string): string {\n return status === 'sold' ? this.soldText : status === 'reserved' ? this.reservedText : this.availableText;\n }\n\n private choose(plot: SitePlot): void {\n this.chosen = plot;\n this.requestUpdate();\n this.dispatchEvent(new CustomEvent('impakt-select', { detail: { plot }, bubbles: true, composed: true }));\n }\n\n private renderPanel(): TemplateResult {\n const plot = this.chosen;\n if (!plot) return html`<p class=\"hint\">${this.hint}</p>`;\n const status = plot.status ?? 'available';\n return html`<span class=\"status ${status}\">${this.word(status)}</span>\n <p class=\"name\">${this.plotWord} ${plot.number}</p>\n ${plot.name || plot.beds ? html`<p class=\"sub\">${[plot.name, plot.beds].filter(Boolean).join(' \u00B7 ')}</p>` : nothing}\n ${plot.price ? html`<p class=\"price\">${plot.price}</p>` : nothing}\n ${plot.href && status !== 'sold' ? html`<a class=\"go\" href=${plot.href}>${this.actionText}${iconSvg('arrow-right', '16px')}</a>` : nothing}`;\n }\n\n render(): TemplateResult {\n return html`<div class=\"wrap\" part=\"wrap\">\n <div>\n <div class=\"plan\" part=\"plan\">\n <img src=${this.imageSrc} alt=${this.imageAlt} />\n ${this.plots.map((plot) => {\n const status = plot.status ?? 'available';\n const name = [`${this.plotWord} ${plot.number}`, plot.name, this.word(status), plot.price].filter(Boolean).join(', ');\n return html`<button class=\"pin ${status}\" type=\"button\" style=\"left:${Number(plot.x)}%;top:${Number(plot.y)}%\" aria-label=${name} aria-pressed=${String(this.chosen === plot)} @click=${() => this.choose(plot)}>${plot.number}</button>`;\n })}\n </div>\n <ul class=\"legend\">\n <li><span class=\"key\"></span>${this.availableText}</li>\n <li><span class=\"key reserved\"></span>${this.reservedText}</li>\n <li><span class=\"key sold\"></span>${this.soldText}</li>\n </ul>\n </div>\n <div class=\"panel\" part=\"panel\" aria-live=\"polite\">${this.renderPanel()}</div>\n </div>`;\n }\n}\n\n/** The monthly repayment on a loan. A rate of nothing is the loan split evenly. */\nexport function monthlyPayment(loan: number, annualRate: number, years: number): number {\n const months = years * 12;\n if (loan <= 0 || months <= 0) return 0;\n const rate = annualRate / 100 / 12;\n return rate === 0 ? loan / months : (loan * rate) / (1 - (1 + rate) ** -months);\n}\n\n/**\n * What a home would cost each month, worked out as the sliders move.\n *\n * The result is an estimate and the warning under it is on by default, because\n * UK rules expect it wherever repayments are shown. Change the words for other\n * markets, but check with whoever signs off your financial promotions first.\n *\n * @category form\n * @icon pound\n */\nexport class ImpaktMortgageCalculator extends ImpaktElement {\n static properties = {\n heading: { type: String },\n price: { type: Number },\n depositPercent: { type: Number, attribute: 'deposit-percent' },\n rate: { type: Number },\n years: { type: Number },\n currency: { type: String },\n smallPrint: { type: String, attribute: 'small-print' },\n headingLevel: { type: Number, attribute: 'heading-level' },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n declare heading: string;\n declare price: number;\n declare depositPercent: number;\n declare rate: number;\n declare years: number;\n /** The three-letter currency code, such as GBP. */\n declare currency: string;\n declare smallPrint: string;\n declare headingLevel: 2 | 3;\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n constructor() {\n super();\n this.heading = 'What would it cost each month?';\n this.price = 385000;\n this.depositPercent = 10;\n this.rate = 4.5;\n this.years = 30;\n this.currency = 'GBP';\n this.smallPrint = 'This is an estimate, not a mortgage offer. Your home may be repossessed if you do not keep up repayments on your mortgage.';\n this.headingLevel = 2;\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n spaceAround,\n css`\n :host { display: block; container-type: inline-size; }\n .wrap { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); overflow: hidden; background: ${t.surfaceCard}; border-radius: ${t.radius2xl}; box-shadow: ${t.shadowMd}, 0 0 0 1px color-mix(in srgb, ${t.text} 6%, transparent); }\n .inputs { display: flex; flex-direction: column; gap: ${space(5)}; padding: ${space(8)}; }\n .h { margin: 0; font-family: ${t.fontHeading}; ${type('2xl')} font-weight: ${fontWeight('bold')}; color: ${t.textHeading}; }\n label { display: flex; justify-content: space-between; gap: ${space(3)}; ${type('sm')} font-weight: ${fontWeight('semibold')}; margin-block-end: ${space(1.5)}; }\n .read { font-weight: ${fontWeight('regular')}; color: ${t.textMuted}; }\n input[type='number'] { box-sizing: border-box; inline-size: 100%; min-block-size: 44px; padding: ${space(2)} ${space(3)}; font: inherit; color: ${t.text}; background: ${t.surfaceCard}; border: ${t.borderThin} solid ${t.border}; border-radius: ${t.radiusLg}; }\n input[type='range'] { inline-size: 100%; min-block-size: 24px; margin: 0; accent-color: ${t.brand}; }\n .two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: ${space(4)}; }\n .result { display: flex; flex-direction: column; justify-content: center; gap: ${space(2)}; padding: ${space(8)}; color: ${t.onBrand}; background: ${t.brand}; }\n .caption { margin: 0; ${type('sm')} opacity: 0.85; }\n output { display: block; font-family: ${t.fontHeading}; ${type('4xl')} font-weight: ${fontWeight('bold')}; }\n dl { display: grid; gap: ${space(2)}; margin: ${space(4)} 0 0; padding-block-start: ${space(4)}; border-block-start: 1px solid color-mix(in srgb, ${t.onBrand} 25%, transparent); ${type('sm')} }\n dl div { display: flex; justify-content: space-between; gap: ${space(3)}; }\n dt { opacity: 0.85; }\n dd { margin: 0; font-weight: ${fontWeight('semibold')}; }\n /* Muted text is proved against the card colour, not this band, so the small print here is in the text colour (1.4.3). */\n .small { grid-column: 1 / -1; margin: 0; padding: ${space(4)} ${space(8)}; ${type('xs')} color: ${t.text}; background: ${t.surfaceSubtle}; }\n @container (max-width: 44rem) { .wrap { grid-template-columns: minmax(0, 1fr); } .inputs, .result { padding: ${space(5)}; } .small { padding: ${space(4)} ${space(5)}; } }\n `,\n ];\n\n private money(amount: number): string {\n try {\n return new Intl.NumberFormat(pageLocale(this), { style: 'currency', currency: this.currency, maximumFractionDigits: 0 }).format(amount);\n } catch {\n return String(Math.round(amount));\n }\n }\n\n private field(key: 'price' | 'depositPercent' | 'rate' | 'years'): (event: Event) => void {\n return (event) => {\n this[key] = Number((event.target as HTMLInputElement).value) || 0;\n };\n }\n\n render(): TemplateResult {\n const deposit = (this.price * this.depositPercent) / 100;\n const loan = Math.max(this.price - deposit, 0);\n const monthly = monthlyPayment(loan, this.rate, this.years);\n return html`<div class=\"wrap\" part=\"wrap\">\n <div class=\"inputs\">\n ${this.heading ? html`<div class=\"h\" role=\"heading\" aria-level=${this.headingLevel}>${this.heading}</div>` : nothing}\n <div><label for=${this.id_('price')}>${say('Home price')}</label><input id=${this.id_('price')} type=\"number\" min=\"0\" step=\"1000\" inputmode=\"numeric\" .value=${String(this.price)} @input=${this.field('price')} /></div>\n <div><label for=${this.id_('deposit')}>${say('Deposit')} <span class=\"read\">${this.depositPercent}% \u00B7 ${this.money(deposit)}</span></label><input id=${this.id_('deposit')} type=\"range\" min=\"5\" max=\"60\" step=\"1\" .value=${String(this.depositPercent)} @input=${this.field('depositPercent')} /></div>\n <div class=\"two\">\n <div><label for=${this.id_('years')}>${say('Term')} <span class=\"read\">${say('{years} years', { years: this.years })}</span></label><input id=${this.id_('years')} type=\"range\" min=\"5\" max=\"40\" step=\"1\" .value=${String(this.years)} @input=${this.field('years')} /></div>\n <div><label for=${this.id_('rate')}>${say('Interest rate (%)')}</label><input id=${this.id_('rate')} type=\"number\" min=\"0\" max=\"20\" step=\"0.05\" inputmode=\"decimal\" .value=${String(this.rate)} @input=${this.field('rate')} /></div>\n </div>\n </div>\n <div class=\"result\">\n <p class=\"caption\">${say('Estimated monthly repayment')}</p>\n <output for=${`${this.id_('price')} ${this.id_('deposit')} ${this.id_('years')} ${this.id_('rate')}`}>${this.money(monthly)}</output>\n <dl>\n <div><dt>${say('You would borrow')}</dt><dd>${this.money(loan)}</dd></div>\n <div><dt>${say('Total repayable')}</dt><dd>${this.money(monthly * this.years * 12)}</dd></div>\n </dl>\n </div>\n ${this.smallPrint ? html`<p class=\"small\">${this.smallPrint}</p>` : nothing}\n </div>`;\n }\n}\n\n/**\n * Two pictures of one place with a handle to drag between them: a bare plot\n * and the finished street, a shell and the fitted kitchen.\n *\n * The handle is a native range control, so it works with a finger, a mouse and\n * the arrow keys, and a screen reader hears how far across it is. Both pictures\n * need descriptions, because they are the content.\n *\n * @category content\n * @icon image\n */\nexport class ImpaktBeforeAfter extends ImpaktElement {\n static properties = {\n beforeSrc: { type: String, attribute: 'before-src' },\n beforeAlt: { type: String, attribute: 'before-alt' },\n afterSrc: { type: String, attribute: 'after-src' },\n afterAlt: { type: String, attribute: 'after-alt' },\n beforeLabel: { type: String, attribute: 'before-label' },\n afterLabel: { type: String, attribute: 'after-label' },\n label: { type: String },\n position: { type: Number },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n declare beforeSrc: string;\n declare beforeAlt: string;\n declare afterSrc: string;\n declare afterAlt: string;\n declare beforeLabel: string;\n declare afterLabel: string;\n /** The name of the handle for a screen reader. */\n declare label: string;\n /** How far across the handle starts, from 0 to 100. */\n declare position: number;\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n constructor() {\n super();\n this.beforeSrc = '';\n this.beforeAlt = '';\n this.afterSrc = '';\n this.afterAlt = '';\n this.beforeLabel = 'Before';\n this.afterLabel = 'After';\n this.label = 'Compare the two pictures';\n this.position = 50;\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n spaceAround,\n css`\n .frame { position: relative; overflow: hidden; border-radius: ${t.radius2xl}; box-shadow: ${t.shadowLg}; line-height: 0; --at: 50%; }\n img { display: block; inline-size: 100%; block-size: auto; }\n .after { position: absolute; inset: 0; block-size: 100%; object-fit: cover; clip-path: inset(0 0 0 var(--at)); }\n .tag { position: absolute; inset-block-start: ${space(3)}; padding: ${space(1)} ${space(3)}; ${type('xs')} line-height: 1.4; font-weight: ${fontWeight('semibold')}; color: ${t.text}; background: ${t.surfaceCard}; border-radius: 999px; box-shadow: ${t.shadowSm}; }\n .tag.b { inset-inline-start: ${space(3)}; }\n .tag.a { inset-inline-end: ${space(3)}; }\n .line { position: absolute; inset-block: 0; inset-inline-start: var(--at); inline-size: 2px; margin-inline-start: -1px; background: ${t.surfaceCard}; pointer-events: none; }\n .grip { position: absolute; inset-block-start: 50%; inset-inline-start: 50%; display: flex; align-items: center; justify-content: center; inline-size: 44px; block-size: 44px; margin: -22px 0 0 -22px; color: ${t.text}; background: ${t.surfaceCard}; border-radius: 50%; box-shadow: ${t.shadowMd}; }\n input { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; margin: 0; opacity: 0; cursor: ew-resize; touch-action: pan-y; }\n .frame:has(input:focus-visible) .grip { box-shadow: ${t.focusShadow}; }\n `,\n ];\n\n render(): TemplateResult {\n return html`<div class=\"frame\" part=\"frame\" style=\"--at:${this.position}%\">\n <img src=${this.beforeSrc} alt=${this.beforeAlt} />\n <img class=\"after\" src=${this.afterSrc} alt=${this.afterAlt} />\n <span class=\"tag b\" aria-hidden=\"true\">${this.beforeLabel}</span>\n <span class=\"tag a\" aria-hidden=\"true\">${this.afterLabel}</span>\n <span class=\"line\"><span class=\"grip\">${iconSvg('arrow-left', '14px')}${iconSvg('arrow-right', '14px')}</span></span>\n <input type=\"range\" min=\"0\" max=\"100\" aria-label=${this.label} .value=${String(this.position)} @input=${(e: Event) => {\n this.position = Number((e.target as HTMLInputElement).value);\n }} />\n </div>`;\n }\n}\n\n/**\n * A bar fixed to the bottom of the screen that keeps the one thing to do in\n * reach, such as booking a viewing.\n *\n * It appears once the visitor has scrolled, keeps a space for itself at the end\n * of the page, and tells the browser to scroll focused controls clear of it so\n * it never covers what the keyboard is on (2.4.11).\n *\n * @category navigation\n * @icon bar\n * @slot actions - The button or link to keep in reach.\n */\nexport class ImpaktStickyBar extends ImpaktElement {\n static properties = {\n label: { type: String },\n heading: { type: String },\n lead: { type: String },\n showOn: { type: String, reflect: true, attribute: 'show-on' },\n revealAfter: { type: Number, attribute: 'reveal-after' },\n };\n /** The name of this region for a screen reader. */\n declare label: string;\n declare heading: string;\n declare lead: string;\n declare showOn: 'phones' | 'all';\n /** How many pixels the visitor scrolls before it appears. */\n declare revealAfter: number;\n\n private shown = false;\n\n constructor() {\n super();\n this.label = 'Quick actions';\n this.heading = '';\n this.lead = '';\n this.showOn = 'phones';\n this.revealAfter = 400;\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n css`\n :host { display: block; }\n .bar { position: fixed; inset-inline: 0; inset-block-end: 0; z-index: 900; display: flex; align-items: center; justify-content: space-between; gap: ${space(4)}; padding: ${space(3)} ${space(4)} calc(${space(3)} + env(safe-area-inset-bottom)); background: ${t.surfaceCard}; box-shadow: ${t.shadowXl}, 0 -1px 0 color-mix(in srgb, ${t.text} 8%, transparent); transform: translateY(110%); visibility: hidden; transition: transform 220ms cubic-bezier(0.16, 1, 0.3, 1), visibility 220ms; }\n .bar.on { transform: none; visibility: visible; }\n .spacer { block-size: 5rem; }\n .h { font-family: ${t.fontHeading}; ${type('md')} font-weight: ${fontWeight('bold')}; color: ${t.textHeading}; }\n .t { ${type('xs')} color: ${t.textMuted}; }\n .words { min-inline-size: 0; }\n .actions { display: flex; flex: none; gap: ${space(2)}; }\n @media (min-width: 48rem) { :host([show-on='phones']) { display: none; } }\n `,\n ];\n\n private check = (): void => {\n const shown = window.scrollY >= this.revealAfter;\n if (shown === this.shown) return;\n this.shown = shown;\n this.requestUpdate();\n this.clearance(shown);\n };\n\n /** Leaves room for the bar when the browser scrolls something into view. */\n private clearance(on: boolean): void {\n const visible = on && getComputedStyle(this).display !== 'none';\n const height = visible ? `${this.renderRoot.querySelector('.bar')?.getBoundingClientRect().height ?? 80}px` : '';\n const root = document.documentElement.style;\n root.scrollPaddingBlockEnd = height;\n // The toast reads this to sit above the bar rather than on its button.\n if (height) root.setProperty('--impakt-bottom-bar', height);\n else root.removeProperty('--impakt-bottom-bar');\n }\n\n connectedCallback(): void {\n super.connectedCallback();\n window.addEventListener('scroll', this.check, { passive: true });\n this.check();\n }\n\n disconnectedCallback(): void {\n super.disconnectedCallback();\n window.removeEventListener('scroll', this.check);\n this.clearance(false);\n }\n\n render(): TemplateResult {\n return html`<div class=\"spacer\"></div>\n <section class=\"bar ${this.shown ? 'on' : ''}\" part=\"bar\" aria-label=${this.label}>\n <div class=\"words\">\n ${this.heading ? html`<div class=\"h\">${this.heading}</div>` : nothing}\n ${this.lead ? html`<div class=\"t\">${this.lead}</div>` : nothing}\n </div>\n <div class=\"actions\"><slot name=\"actions\"></slot></div>\n </section>`;\n }\n}\n\nexport interface NearbyItem {\n id?: string;\n place: string;\n /** How far, in words: 8 minutes by train. */\n distance: string;\n}\n\n/**\n * Where a place is and how to get there: a map picture, the address, opening\n * hours, travel times and a link for directions.\n *\n * The map is a picture you supply, not an embedded map. An embed loads a third\n * party's cookies before the visitor has agreed to anything.\n *\n * @category content\n * @icon map-pin\n * @role heading\n */\nexport class ImpaktLocationCard extends ImpaktElement {\n static properties = {\n heading: { type: String },\n address: { type: String },\n hours: { type: String },\n phone: { type: String },\n mapSrc: { type: String, attribute: 'map-src' },\n mapAlt: { type: String, attribute: 'map-alt' },\n directionsText: { type: String, attribute: 'directions-text' },\n directionsHref: { type: String, attribute: 'directions-href' },\n nearby: { type: Array },\n headingLevel: { type: Number, attribute: 'heading-level' },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n declare heading: string;\n declare address: string;\n declare hours: string;\n declare phone: string;\n declare mapSrc: string;\n declare mapAlt: string;\n declare directionsText: string;\n /** Leave empty and the link searches a map for the address. */\n declare directionsHref: string;\n declare nearby: NearbyItem[];\n declare headingLevel: 2 | 3;\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n constructor() {\n super();\n this.heading = '';\n this.address = '';\n this.hours = '';\n this.phone = '';\n this.mapSrc = '';\n this.mapAlt = '';\n this.directionsText = 'Get directions';\n this.directionsHref = '';\n this.nearby = [];\n this.headingLevel = 2;\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n spaceAround,\n css`\n :host { display: block; container-type: inline-size; }\n .wrap { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: hidden; background: ${t.surfaceCard}; border-radius: ${t.radius2xl}; box-shadow: ${t.shadowMd}, 0 0 0 1px color-mix(in srgb, ${t.text} 6%, transparent); }\n .wrap.solo { grid-template-columns: minmax(0, 1fr); }\n .map { min-block-size: 16rem; background: ${t.surfaceSubtle}; }\n .map img { display: block; inline-size: 100%; block-size: 100%; object-fit: cover; }\n .info { display: flex; flex-direction: column; gap: ${space(3)}; padding: ${space(8)}; }\n .h { margin: 0; font-family: ${t.fontHeading}; ${type('2xl')} font-weight: ${fontWeight('bold')}; color: ${t.textHeading}; }\n .row { display: flex; gap: ${space(3)}; margin: 0; white-space: pre-line; }\n .row svg { flex: none; margin-block-start: ${space(0.5)}; color: ${t.brand}; }\n .row a { display: inline-flex; align-items: center; min-block-size: ${t.targetMin}; margin-block-start: -2px; }\n a { color: ${t.link}; }\n ul { display: grid; gap: ${space(1.5)}; margin: ${space(1)} 0; padding: ${space(3)} 0 0; list-style: none; border-block-start: 1px solid color-mix(in srgb, ${t.text} 10%, transparent); ${type('sm')} }\n li { display: flex; justify-content: space-between; gap: ${space(3)}; }\n li span:last-child { color: ${t.textMuted}; text-align: end; }\n .go { ${targetSize} align-self: flex-start; display: inline-flex; align-items: center; gap: ${space(2)}; padding: ${space(2)} ${space(4)}; ${type('sm')} font-weight: ${fontWeight('semibold')}; color: ${t.onBrand}; text-decoration: none; background: ${t.brand}; border-radius: ${t.radiusLg}; }\n .go:hover { background: ${t.brandHover}; }\n @container (max-width: 44rem) { .wrap { grid-template-columns: minmax(0, 1fr); } .info { padding: ${space(5)}; } }\n `,\n ];\n\n render(): TemplateResult {\n const directions = this.directionsHref || (this.address ? `https://www.google.com/maps/search/?api=1&query=${encodeURIComponent(this.address)}` : '');\n return html`<div class=\"wrap ${this.mapSrc ? '' : 'solo'}\" part=\"wrap\">\n ${this.mapSrc ? html`<div class=\"map\"><img src=${this.mapSrc} alt=${this.mapAlt} /></div>` : nothing}\n <div class=\"info\">\n ${this.heading ? html`<div class=\"h\" role=\"heading\" aria-level=${this.headingLevel}>${this.heading}</div>` : nothing}\n ${this.address ? html`<p class=\"row\">${iconSvg('map-pin', '20px')}<span>${this.address}</span></p>` : nothing}\n ${this.hours ? html`<p class=\"row\">${iconSvg('clock', '20px')}<span>${this.hours}</span></p>` : nothing}\n ${this.phone ? html`<p class=\"row\">${iconSvg('phone', '20px')}<a href=${`tel:${this.phone.replace(/\\s+/g, '')}`}>${this.phone}</a></p>` : nothing}\n ${this.nearby.length ? html`<ul>${this.nearby.map((item) => html`<li><span>${item.place}</span><span>${item.distance}</span></li>`)}</ul>` : nothing}\n ${directions ? html`<a class=\"go\" href=${directions}>${this.directionsText}${iconSvg('arrow-right', '16px')}</a>` : nothing}\n </div>\n </div>`;\n }\n}\n\ncustomElements.define('impakt-site-plan', ImpaktSitePlan);\ncustomElements.define('impakt-mortgage-calculator', ImpaktMortgageCalculator);\ncustomElements.define('impakt-before-after', ImpaktBeforeAfter);\ncustomElements.define('impakt-sticky-bar', ImpaktStickyBar);\ncustomElements.define('impakt-location-card', ImpaktLocationCard);\ndeclare global {\n interface HTMLElementTagNameMap {\n 'impakt-site-plan': ImpaktSitePlan;\n 'impakt-mortgage-calculator': ImpaktMortgageCalculator;\n 'impakt-before-after': ImpaktBeforeAfter;\n 'impakt-sticky-bar': ImpaktStickyBar;\n 'impakt-location-card': ImpaktLocationCard;\n }\n}\n", "import { css, html, nothing, type TemplateResult } from 'lit';\nimport { say, pageLocale, ImpaktElement, focusRing, targetSize, visuallyHidden, fontWeight, space, spaceAround, t, type } from '@atomic-ui/ui';\n\ntype Space = 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\nconst card = css`\n .card { background: ${t.surfaceCard}; border-radius: ${t.radiusXl}; box-shadow: ${t.shadowSm}, 0 0 0 1px ${t.hairline}; }\n .h { margin: 0; font-family: ${t.fontHeading}; ${type('2xl')} font-weight: ${fontWeight('bold')}; color: ${t.textHeading}; }\n .btn { display: inline-flex; justify-content: center; align-items: center; min-block-size: 44px; padding: ${space(2.5)} ${space(5)}; font: inherit; font-weight: ${fontWeight('semibold')}; color: ${t.onBrand}; text-decoration: none; background: ${t.brand}; border: 0; border-radius: ${t.radiusLg}; cursor: pointer; }\n .btn:hover { background: ${t.brandHover}; }\n .btn.quiet { color: ${t.link}; background: transparent; box-shadow: inset 0 0 0 ${t.borderThin} ${t.border}; }\n .small { margin: 0; ${type('xs')} color: ${t.textMuted}; }\n .visually-hidden { ${visuallyHidden} }\n`;\n\nconst money = (amount: number, currency = 'GBP', digits = 0) => {\n try {\n return new Intl.NumberFormat(pageLocale(), { style: 'currency', currency, maximumFractionDigits: digits, minimumFractionDigits: digits }).format(amount);\n } catch {\n return String(Math.round(amount));\n }\n};\n\n/** One plan in a comparison. */\nexport interface PlanItem {\n id: string;\n name: string;\n /** The price as shown, such as \u00A312. */\n price: string;\n /** What the price is for, such as `a month`. */\n period?: string;\n note?: string;\n /** The rows this plan has, by their words, separated by commas. */\n includes: string;\n href?: string;\n /** A label such as `Most popular`, which also makes the plan stand out. */\n badge?: string;\n}\n\n/** One line a comparison checks every plan against. */\nexport interface PlanRow {\n id: string;\n label: string;\n}\n\n/**\n * Cover levels side by side, with a tick or a cross for each thing they\n * include and a button under each.\n *\n * A tick is never colour alone: each one says \"Included\" or \"Not included\" to\n * a screen reader. On a narrow screen the plans stack, each with its own list.\n *\n * @fires {CustomEvent<{ plan: PlanItem }>} impakt-select - When a plan is chosen. Cancel it to stay on the page.\n * @category content\n * @icon table\n */\nexport class ImpaktPlanComparison extends ImpaktElement {\n static properties = {\n heading: { type: String },\n plans: { type: Array },\n rows: { type: Array },\n buttonText: { type: String, attribute: 'button-text' },\n headingLevel: { type: Number, attribute: 'heading-level' },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n declare heading: string;\n declare plans: PlanItem[];\n declare rows: PlanRow[];\n declare buttonText: string;\n declare headingLevel: 2 | 3;\n declare spaceAbove: Space;\n declare spaceBelow: Space;\n\n constructor() {\n super();\n this.heading = 'Compare cover';\n this.plans = [];\n this.rows = [];\n this.buttonText = 'Choose';\n this.headingLevel = 2;\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n targetSize,\n spaceAround,\n card,\n css`\n :host { display: block; container-type: inline-size; }\n .h { margin-block-end: ${space(5)}; }\n .grid { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: ${space(4)}; }\n .plan { position: relative; display: flex; flex-direction: column; gap: ${space(3)}; padding: ${space(6)}; }\n .plan.top { box-shadow: 0 0 0 2px ${t.brand}, ${t.shadowMd}; }\n .badge { position: absolute; inset-block-start: 0; inset-inline-start: 50%; transform: translate(-50%, -50%); padding: ${space(1)} ${space(3)}; border-radius: 999px; ${type('xs')} font-weight: ${fontWeight('bold')}; color: ${t.onBrand}; background: ${t.brand}; white-space: nowrap; }\n .name { margin: 0; ${type('lg')} font-weight: ${fontWeight('bold')}; color: ${t.text}; }\n .price { margin: 0; font-family: ${t.fontHeading}; ${type('3xl')} font-weight: ${fontWeight('bold')}; color: ${t.text}; }\n .period { ${type('sm')} font-weight: ${fontWeight('regular')}; color: ${t.textMuted}; }\n .note { margin: 0; ${type('sm')} color: ${t.textMuted}; }\n ul { flex: 1; margin: 0; padding: ${space(3)} 0 0; list-style: none; display: grid; gap: ${space(2)}; border-block-start: 1px solid ${t.rule}; align-content: start; }\n li { display: flex; gap: ${space(2)}; ${type('sm')} }\n li[data-has='false'] { color: ${t.textMuted}; }\n .mark { flex-shrink: 0; inline-size: 1.25em; font-weight: ${fontWeight('bold')}; text-align: center; }\n li[data-has='true'] .mark { color: ${t.successText}; }\n @container (max-width: 40rem) { .grid { grid-template-columns: minmax(0, 1fr); gap: ${space(6)}; } }\n `,\n ];\n\n private has(plan: PlanItem, row: PlanRow): boolean {\n return plan.includes\n .split(',')\n .map((s) => s.trim().toLowerCase())\n .includes(row.label.trim().toLowerCase());\n }\n\n private choose(plan: PlanItem, event: Event): void {\n const go = this.dispatchEvent(new CustomEvent('impakt-select', { detail: { plan }, bubbles: true, composed: true, cancelable: true }));\n if (!go) event.preventDefault();\n }\n\n render(): TemplateResult {\n return html`\n ${this.heading ? html`<div class=\"h\" role=\"heading\" aria-level=${this.headingLevel}>${this.heading}</div>` : nothing}\n <div class=\"grid\" style=${`--cols: ${Math.max(1, this.plans.length)}`}>\n ${this.plans.map(\n (p) => html`<section class=\"card plan ${p.badge ? 'top' : ''}\" aria-labelledby=${this.id_(`n-${p.id}`)}>\n ${p.badge ? html`<span class=\"badge\">${p.badge}</span>` : nothing}\n <h3 class=\"name\" id=${this.id_(`n-${p.id}`)}>${p.name}</h3>\n <p class=\"price\">${p.price}${p.period ? html` <span class=\"period\">${p.period}</span>` : nothing}</p>\n ${p.note ? html`<p class=\"note\">${p.note}</p>` : nothing}\n <ul>${this.rows.map((r) => {\n const has = this.has(p, r);\n return html`<li data-has=${String(has)}><span class=\"mark\" aria-hidden=\"true\">${has ? '\u2713' : '\u2013'}</span><span>${r.label}<span class=\"visually-hidden\">: ${say(has ? 'included' : 'not included')}</span></span></li>`;\n })}</ul>\n ${\n p.href\n ? html`<a class=\"btn ${p.badge ? '' : 'quiet'}\" href=${p.href} @click=${(e: Event) => this.choose(p, e)}>${this.buttonText}<span class=\"visually-hidden\"> ${p.name}</span></a>`\n : html`<button class=\"btn ${p.badge ? '' : 'quiet'}\" type=\"button\" @click=${(e: Event) => this.choose(p, e)}>${this.buttonText}<span class=\"visually-hidden\"> ${p.name}</span></button>`\n }\n </section>`,\n )}\n </div>`;\n }\n}\n\n/** A YouTube or Vimeo address as its privacy-friendly embed, or null for a plain video file. */\nexport function embedOf(src: string, locale?: string): string | null {\n const yt = /(?:youtube\\.com\\/(?:watch\\?v=|embed\\/|shorts\\/)|youtu\\.be\\/)([\\w-]{6,})/.exec(src);\n // The player's own controls and captions in the page's language (ADR 0026).\n const hl =\n locale && !/^en\\b/i.test(locale) ? `&hl=${encodeURIComponent(locale.split('-')[0]!)}&cc_lang_pref=${encodeURIComponent(locale.split('-')[0]!)}` : '';\n if (yt) return `https://www.youtube-nocookie.com/embed/${yt[1]}?autoplay=1&rel=0${hl}`;\n const vimeo = /vimeo\\.com\\/(?:video\\/)?(\\d+)/.exec(src);\n if (vimeo) return `https://player.vimeo.com/video/${vimeo[1]}?autoplay=1&dnt=1`;\n return null;\n}\n\n/**\n * A video, with its title, captions and a transcript link.\n *\n * A YouTube or Vimeo video shows its poster and a Play button first, and only\n * loads the player when pressed, so the page stays fast and nothing is sent to\n * the video site until someone chooses to watch. A video file plays in the\n * browser's own player, with captions from `captions-src`.\n *\n * @category media\n * @icon play\n */\nexport class ImpaktVideo extends ImpaktElement {\n static properties = {\n videoSrc: { type: String, attribute: 'video-src' },\n label: { type: String },\n posterSrc: { type: String, attribute: 'poster-src' },\n captionsSrc: { type: String, attribute: 'captions-src' },\n transcriptHref: { type: String, attribute: 'transcript-href' },\n playText: { type: String, attribute: 'play-text' },\n ratio: { type: String, reflect: true },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n /** A YouTube or Vimeo address, or a video file such as an .mp4. */\n declare videoSrc: string;\n /** What the video is, read out before it plays. */\n declare label: string;\n declare posterSrc: string;\n /** A captions file in WebVTT, for a video file. */\n declare captionsSrc: string;\n declare transcriptHref: string;\n declare playText: string;\n declare ratio: '16:9' | '4:3' | '1:1' | '9:16';\n declare playing: boolean;\n declare spaceAbove: Space;\n declare spaceBelow: Space;\n\n constructor() {\n super();\n this.videoSrc = '';\n this.label = 'Video';\n this.posterSrc = '';\n this.captionsSrc = '';\n this.transcriptHref = '';\n this.playText = 'Play video';\n this.ratio = '16:9';\n this.playing = false;\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n spaceAround,\n card,\n css`\n :host { display: block; }\n .frame { position: relative; overflow: hidden; aspect-ratio: 16 / 9; border-radius: ${t.radiusXl}; background: #111; }\n :host([ratio='4:3']) .frame { aspect-ratio: 4 / 3; }\n :host([ratio='1:1']) .frame { aspect-ratio: 1; }\n :host([ratio='9:16']) .frame { aspect-ratio: 9 / 16; max-inline-size: 420px; }\n iframe, video, img { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; border: 0; object-fit: cover; }\n .play { position: absolute; inset: 0; display: grid; place-items: center; inline-size: 100%; padding: 0; color: #fff; background: linear-gradient(transparent 40%, rgb(0 0 0 / 0.55)); border: 0; cursor: pointer; }\n .disc { display: grid; place-items: center; inline-size: 72px; block-size: 72px; border-radius: 50%; background: ${t.brand}; box-shadow: ${t.shadowLg}; }\n /* Held inside the frame at both edges, so loosened or long words wrap rather than run out of it (1.4.12). */\n .label { position: absolute; inset-inline: ${space(5)}; inset-block-end: ${space(4)}; ${type('lg')} font-weight: ${fontWeight('semibold')}; text-align: start; }\n .foot { margin: ${space(2)} 0 0; ${type('sm')} }\n .foot a { color: ${t.link}; }\n .empty { display: grid; place-items: center; block-size: 100%; color: #ccc; }\n `,\n ];\n\n render(): TemplateResult {\n const embed = embedOf(this.videoSrc, pageLocale(this));\n let player: TemplateResult;\n if (!this.videoSrc) player = html`<div class=\"empty\">${say('Add a video address')}</div>`;\n else if (embed && this.playing)\n player = html`<iframe src=${embed} title=${this.label} allow=\"autoplay; encrypted-media; picture-in-picture; fullscreen\" allowfullscreen></iframe>`;\n else if (embed)\n player = html`${this.posterSrc ? html`<img src=${this.posterSrc} alt=\"\" />` : nothing}\n <button class=\"play\" type=\"button\" @click=${() => {\n this.playing = true;\n }}>\n <span class=\"disc\" aria-hidden=\"true\"><svg width=\"28\" height=\"28\" viewBox=\"0 0 24 24\" fill=\"currentColor\"><path d=\"M8 5v14l11-7z\"/></svg></span>\n <span class=\"label\">${this.playText}<span class=\"visually-hidden\">: ${this.label}</span></span>\n </button>`;\n else\n player = html`<video controls preload=\"metadata\" poster=${this.posterSrc || nothing} aria-label=${this.label}>\n <source src=${this.videoSrc} />\n ${this.captionsSrc ? html`<track kind=\"captions\" src=${this.captionsSrc} srclang=\"en\" label=\"English\" default />` : nothing}\n </video>`;\n return html`<div class=\"frame\" part=\"frame\">${player}</div>\n ${this.transcriptHref ? html`<p class=\"foot\"><a href=${this.transcriptHref}>${say('Read the transcript')}<span class=\"visually-hidden\">${say(' of {video}', { video: this.label })}</span></a></p>` : nothing}`;\n }\n}\n\nconst NOTICE_WORDS: Record<string, { heading: string; text: string }> = {\n mortgage: { heading: 'Your home may be repossessed', text: 'Your home may be repossessed if you do not keep up repayments on your mortgage.' },\n 'secured-loan': {\n heading: 'Think carefully before securing other debts against your home',\n text: 'Your home may be repossessed if you do not keep up repayments on a mortgage or any other debt secured on it.',\n },\n investment: { heading: 'Capital at risk', text: 'The value of investments can go down as well as up, and you may get back less than you put in.' },\n insurance: { heading: 'Important information', text: 'Read the policy documents to check the cover suits your needs. Limits and exclusions apply.' },\n custom: { heading: '', text: '' },\n};\n\n/**\n * The warning and the regulator wording a financial page must carry, as a\n * block of its own so it is never left off.\n *\n * Pick the kind to start from the usual words, or `custom` to write your own.\n * Whatever it says, check it with whoever signs off your financial promotions.\n *\n * @category feedback\n * @icon shield\n */\nexport class ImpaktRegulatoryNotice extends ImpaktElement {\n static properties = {\n kind: { type: String, reflect: true },\n heading: { type: String },\n text: { type: String },\n firm: { type: String },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n declare kind: 'mortgage' | 'secured-loan' | 'investment' | 'insurance' | 'custom';\n /** Leave empty to use the usual heading for the kind. */\n declare heading: string;\n /** Leave empty to use the usual warning for the kind. */\n declare text: string;\n /** Who you are and who regulates you, such as \"Acme Ltd is authorised and regulated by the Financial Conduct Authority (FRN 123456).\" */\n declare firm: string;\n declare spaceAbove: Space;\n declare spaceBelow: Space;\n\n constructor() {\n super();\n this.kind = 'mortgage';\n this.heading = '';\n this.text = '';\n this.firm = '';\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n spaceAround,\n css`\n :host { display: block; }\n .box { padding: ${space(5)}; border-inline-start: 6px solid ${t.warning}; border-radius: ${t.radiusLg}; background: ${t.warningSubtle}; }\n :host([kind='insurance']) .box { border-color: ${t.info}; background: ${t.infoSubtle}; }\n strong { display: block; margin-block-end: ${space(1)}; ${type('md')} color: ${t.text}; }\n p { margin: 0; color: ${t.text}; }\n /* Muted text is proved against the card colour, not the notice's, so the firm's line is in the text colour (1.4.3). */\n .firm { margin-block-start: ${space(3)}; ${type('sm')} color: ${t.text}; }\n `,\n ];\n\n render(): TemplateResult {\n const preset = NOTICE_WORDS[this.kind] ?? NOTICE_WORDS.custom!;\n const heading = this.heading || (preset.heading ? say(preset.heading) : '');\n const text = this.text || (preset.text ? say(preset.text) : '');\n return html`<aside class=\"box\" part=\"box\" aria-label=${heading || say('Important information')}>\n ${heading ? html`<strong>${heading}</strong>` : nothing}\n ${text ? html`<p>${text}</p>` : nothing}\n ${this.firm ? html`<p class=\"firm\">${this.firm}</p>` : nothing}\n </aside>`;\n }\n}\n\n/** One band of a tax: everything above `from` and up to the next band's `from` is charged at `rate`. */\ninterface Band {\n from: number;\n rate: number;\n}\n\n/**\n * Stamp Duty Land Tax for England and Northern Ireland, from 1 April 2025.\n * Exported so the numbers can be checked, and changed in one place.\n */\nexport const SDLT = {\n standard: [\n { from: 0, rate: 0 },\n { from: 125000, rate: 2 },\n { from: 250000, rate: 5 },\n { from: 925000, rate: 10 },\n { from: 1500000, rate: 12 },\n ] as Band[],\n firstTime: [\n { from: 0, rate: 0 },\n { from: 300000, rate: 5 },\n ] as Band[],\n firstTimeLimit: 500000,\n additionalSurcharge: 5,\n};\n\nfunction taxOn(price: number, bands: Band[], extra = 0): number {\n let tax = 0;\n bands.forEach((band, i) => {\n const top = bands[i + 1]?.from ?? Infinity;\n if (price > band.from) tax += ((Math.min(price, top) - band.from) * (band.rate + extra)) / 100;\n });\n return Math.round(tax);\n}\n\n/** The stamp duty on a home, for a mover, a first-time buyer or a second home. */\nexport function stampDuty(price: number, buyer: 'mover' | 'first-time' | 'additional'): number {\n if (price <= 0) return 0;\n if (buyer === 'first-time' && price <= SDLT.firstTimeLimit) return taxOn(price, SDLT.firstTime);\n if (buyer === 'additional') return price < 40000 ? 0 : taxOn(price, SDLT.standard, SDLT.additionalSurcharge);\n return taxOn(price, SDLT.standard);\n}\n\nconst calcStyles = css`\n :host { display: block; container-type: inline-size; }\n .wrap { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); overflow: hidden; }\n .inputs { display: flex; flex-direction: column; gap: ${space(5)}; padding: ${space(8)}; }\n label, legend { display: block; ${type('sm')} font-weight: ${fontWeight('semibold')}; margin-block-end: ${space(1.5)}; padding: 0; }\n fieldset { margin: 0; padding: 0; border: 0; }\n .choices { display: flex; flex-wrap: wrap; gap: ${space(2)}; }\n .choices label { display: inline-flex; align-items: center; gap: ${space(2)}; margin: 0; padding: ${space(2)} ${space(3)}; font-weight: ${fontWeight('regular')}; border: ${t.borderThin} solid ${t.border}; border-radius: ${t.radiusLg}; cursor: pointer; }\n .choices input { accent-color: ${t.brand}; }\n input[type='number'] { box-sizing: border-box; inline-size: 100%; min-block-size: 44px; padding: ${space(2)} ${space(3)}; font: inherit; color: ${t.text}; background: ${t.surfaceCard}; border: ${t.borderThin} solid ${t.border}; border-radius: ${t.radiusLg}; }\n .result { display: flex; flex-direction: column; justify-content: center; gap: ${space(2)}; padding: ${space(8)}; color: ${t.onBrand}; background: ${t.brand}; }\n .caption { margin: 0; ${type('sm')} opacity: 0.85; }\n output { display: block; font-family: ${t.fontHeading}; ${type('4xl')} font-weight: ${fontWeight('bold')}; }\n .line { margin: 0; ${type('sm')} }\n .foot { grid-column: 1 / -1; padding: ${space(4)} ${space(8)}; background: ${t.surfaceSubtle}; }\n /* Muted text is proved against the card colour, not this band, so the small print here is in the text colour (1.4.3). */\n .foot .small { color: ${t.text}; }\n @container (max-width: 44rem) { .wrap { grid-template-columns: minmax(0, 1fr); } .inputs, .result { padding: ${space(5)}; } .foot { padding: ${space(4)} ${space(5)}; } }\n`;\n\n/**\n * How much stamp duty a home would cost, for a home mover, a first-time buyer\n * or a second home, worked out as the price is typed.\n *\n * The rates are England and Northern Ireland's from 1 April 2025. Scotland and\n * Wales have their own taxes, and rates change, so the small print says which\n * rates these are and points to GOV.UK.\n *\n * @category form\n * @icon pound\n */\nexport class ImpaktStampDutyCalculator extends ImpaktElement {\n static properties = {\n heading: { type: String },\n price: { type: Number },\n buyer: { type: String },\n smallPrint: { type: String, attribute: 'small-print' },\n headingLevel: { type: Number, attribute: 'heading-level' },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n declare heading: string;\n declare price: number;\n declare buyer: 'mover' | 'first-time' | 'additional';\n declare smallPrint: string;\n declare headingLevel: 2 | 3;\n declare spaceAbove: Space;\n declare spaceBelow: Space;\n\n constructor() {\n super();\n this.heading = 'How much stamp duty would you pay?';\n this.price = 385000;\n this.buyer = 'first-time';\n this.smallPrint =\n 'Based on Stamp Duty Land Tax rates in England and Northern Ireland from 1 April 2025. Scotland and Wales have their own taxes. Check what you would pay on GOV.UK.';\n this.headingLevel = 2;\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [...ImpaktElement.styles, focusRing, spaceAround, card, calcStyles];\n\n render(): TemplateResult {\n const duty = stampDuty(this.price, this.buyer);\n const rate = this.price > 0 ? (duty / this.price) * 100 : 0;\n const buyers: [typeof this.buyer, string][] = [\n ['first-time', say('First home')],\n ['mover', say('Moving home')],\n ['additional', say('Second home')],\n ];\n return html`<div class=\"card wrap\" part=\"wrap\">\n <div class=\"inputs\">\n ${this.heading ? html`<div class=\"h\" role=\"heading\" aria-level=${this.headingLevel}>${this.heading}</div>` : nothing}\n <div><label for=${this.id_('price')}>${say('Price of the home (\u00A3)')}</label>\n <input id=${this.id_('price')} type=\"number\" min=\"0\" step=\"1000\" inputmode=\"numeric\" .value=${String(this.price)} @input=${(e: Event) => {\n this.price = Number((e.target as HTMLInputElement).value) || 0;\n }} /></div>\n <fieldset><legend>${say('Are you buying')}</legend><div class=\"choices\">\n ${buyers.map(\n ([value, label]) =>\n html`<label><input type=\"radio\" name=${this.id_('buyer')} .checked=${this.buyer === value} @change=${() => {\n this.buyer = value;\n }} />${label}</label>`,\n )}\n </div></fieldset>\n </div>\n <div class=\"result\" aria-live=\"polite\">\n <p class=\"caption\">${say('Stamp duty to pay')}</p>\n <output for=${this.id_('price')}>${money(duty)}</output>\n <p class=\"line\">${duty ? say('About {rate}% of the price', { rate: rate.toFixed(1) }) : say('Nothing to pay at this price')}</p>\n ${this.buyer === 'first-time' && this.price > SDLT.firstTimeLimit ? html`<p class=\"line\">${say('First-time buyer relief stops above {limit}, so the usual rates apply.', { limit: money(SDLT.firstTimeLimit) })}</p>` : nothing}\n </div>\n ${this.smallPrint ? html`<div class=\"foot\"><p class=\"small\">${this.smallPrint}</p></div>` : nothing}\n </div>`;\n }\n}\n\n/**\n * Roughly how much someone could borrow, from what they earn, and the price\n * of home that buys with their deposit.\n *\n * Lenders usually lend four to four and a half times income; the multiple is\n * a setting. It is a guide, not an offer, and the small print says so.\n *\n * @category form\n * @icon pound\n */\nexport class ImpaktAffordabilityCalculator extends ImpaktElement {\n static properties = {\n heading: { type: String },\n income: { type: Number },\n secondIncome: { type: Number, attribute: 'second-income' },\n deposit: { type: Number },\n timesIncome: { type: Number, attribute: 'times-income' },\n smallPrint: { type: String, attribute: 'small-print' },\n headingLevel: { type: Number, attribute: 'heading-level' },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n declare heading: string;\n declare income: number;\n declare secondIncome: number;\n declare deposit: number;\n /** How many times income a lender would lend, such as 4.5. */\n declare timesIncome: number;\n declare smallPrint: string;\n declare headingLevel: 2 | 3;\n declare spaceAbove: Space;\n declare spaceBelow: Space;\n\n constructor() {\n super();\n this.heading = 'How much could you borrow?';\n this.income = 45000;\n this.secondIncome = 0;\n this.deposit = 30000;\n this.timesIncome = 4.5;\n this.smallPrint =\n 'This is a guide, not a mortgage offer. What a lender offers depends on your circumstances. Your home may be repossessed if you do not keep up repayments on your mortgage.';\n this.headingLevel = 2;\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [...ImpaktElement.styles, focusRing, spaceAround, card, calcStyles];\n\n private field(key: 'income' | 'secondIncome' | 'deposit'): (event: Event) => void {\n return (event) => {\n this[key] = Number((event.target as HTMLInputElement).value) || 0;\n };\n }\n\n render(): TemplateResult {\n const borrow = Math.max(0, (this.income + this.secondIncome) * this.timesIncome);\n const input = (key: 'income' | 'secondIncome' | 'deposit', label: string) => html`<div><label for=${this.id_(key)}>${label}</label>\n <input id=${this.id_(key)} type=\"number\" min=\"0\" step=\"1000\" inputmode=\"numeric\" .value=${String(this[key])} @input=${this.field(key)} /></div>`;\n return html`<div class=\"card wrap\" part=\"wrap\">\n <div class=\"inputs\">\n ${this.heading ? html`<div class=\"h\" role=\"heading\" aria-level=${this.headingLevel}>${this.heading}</div>` : nothing}\n ${input('income', say('Your yearly income before tax (\u00A3)'))}\n ${input('secondIncome', say('A second person\u2019s income, if buying together (\u00A3)'))}\n ${input('deposit', say('Your deposit (\u00A3)'))}\n </div>\n <div class=\"result\" aria-live=\"polite\">\n <p class=\"caption\">${say('You could borrow about')}</p>\n <output>${money(borrow)}</output>\n <p class=\"line\">${say('With your deposit, that\u2019s a home of about {amount}.', { amount: money(borrow + this.deposit) })}</p>\n </div>\n ${this.smallPrint ? html`<div class=\"foot\"><p class=\"small\">${this.smallPrint}</p></div>` : nothing}\n </div>`;\n }\n}\n\n/**\n * How to get in touch: a phone number, opening hours, an email address, and a\n * short form to ask for a call back.\n *\n * The form fires `impakt-submit` with the name, phone number and best time; the\n * app sends it on. Then the block thanks them in place.\n *\n * @fires {CustomEvent<{ name: string; phone: string; when: string }>} impakt-submit - When the form is sent.\n * @category content\n * @icon phone\n */\nexport class ImpaktContactBlock extends ImpaktElement {\n static properties = {\n heading: { type: String },\n phone: { type: String },\n hours: { type: String },\n email: { type: String },\n callbackHeading: { type: String, attribute: 'callback-heading' },\n buttonText: { type: String, attribute: 'button-text' },\n doneText: { type: String, attribute: 'done-text' },\n headingLevel: { type: Number, attribute: 'heading-level' },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n declare heading: string;\n declare phone: string;\n /** One line a day or range, such as \"Monday to Friday, 9am to 6pm\". */\n declare hours: string;\n declare email: string;\n /** Leave empty to show no call back form. */\n declare callbackHeading: string;\n declare buttonText: string;\n declare doneText: string;\n declare headingLevel: 2 | 3;\n declare sent: boolean;\n declare spaceAbove: Space;\n declare spaceBelow: Space;\n\n constructor() {\n super();\n this.heading = 'Talk to us';\n this.phone = '0800 000 0000';\n this.hours = 'Monday to Friday, 9am to 6pm\\nSaturday, 10am to 2pm';\n this.email = '';\n this.callbackHeading = 'Or we can call you';\n this.buttonText = 'Ask for a call back';\n this.doneText = 'Thanks. We\u2019ll call you at the time you chose.';\n this.headingLevel = 2;\n this.sent = false;\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n spaceAround,\n card,\n css`\n :host { display: block; container-type: inline-size; }\n .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: ${space(6)}; padding: ${space(8)}; }\n .phone { display: inline-block; margin: ${space(3)} 0; font-family: ${t.fontHeading}; ${type('3xl')} font-weight: ${fontWeight('bold')}; color: ${t.link}; text-decoration: none; }\n .hours { margin: 0; white-space: pre-line; color: ${t.textMuted}; }\n .email { display: inline-flex; align-items: center; min-block-size: ${t.targetMin}; margin-block-start: ${space(3)}; color: ${t.link}; overflow-wrap: anywhere; }\n form { display: grid; gap: ${space(3)}; padding: ${space(5)}; border-radius: ${t.radiusLg}; background: ${t.surfaceInset}; }\n .sub { margin: 0; ${type('lg')} font-weight: ${fontWeight('bold')}; color: ${t.text}; }\n label { display: block; ${type('sm')} font-weight: ${fontWeight('semibold')}; margin-block-end: ${space(1)}; }\n input, select { box-sizing: border-box; inline-size: 100%; min-block-size: 44px; padding: ${space(2)} ${space(3)}; font: inherit; color: ${t.text}; background: ${t.surfaceCard}; border: ${t.borderThin} solid ${t.border}; border-radius: ${t.radiusLg}; }\n .done { margin: 0; padding: ${space(5)}; border-radius: ${t.radiusLg}; background: ${t.successSubtle}; color: ${t.successText}; font-weight: ${fontWeight('semibold')}; }\n @container (max-width: 40rem) { .wrap { grid-template-columns: minmax(0, 1fr); padding: ${space(5)}; } }\n `,\n ];\n\n private submit(event: SubmitEvent): void {\n event.preventDefault();\n const form = new FormData(event.target as HTMLFormElement);\n const data = { name: String(form.get('name') ?? ''), phone: String(form.get('phone') ?? ''), when: String(form.get('when') ?? '') };\n this.dispatchEvent(new CustomEvent('impakt-submit', { detail: data, bubbles: true, composed: true }));\n this.sent = true;\n }\n\n render(): TemplateResult {\n return html`<div class=\"card wrap\" part=\"wrap\">\n <div>\n ${this.heading ? html`<div class=\"h\" role=\"heading\" aria-level=${this.headingLevel}>${this.heading}</div>` : nothing}\n ${this.phone ? html`<a class=\"phone\" href=${`tel:${this.phone.replace(/[^\\d+]/g, '')}`}>${this.phone}</a>` : nothing}\n ${this.hours ? html`<p class=\"hours\">${this.hours}</p>` : nothing}\n ${this.email ? html`<a class=\"email\" href=${`mailto:${this.email}`}>${this.email}</a>` : nothing}\n </div>\n ${\n !this.callbackHeading\n ? nothing\n : this.sent\n ? html`<p class=\"done\" role=\"status\">${this.doneText}</p>`\n : html`<form @submit=${this.submit} aria-labelledby=${this.id_('cb')}>\n <p class=\"sub\" id=${this.id_('cb')}>${this.callbackHeading}</p>\n <div><label for=${this.id_('name')}>${say('Your name')}</label><input id=${this.id_('name')} name=\"name\" autocomplete=\"name\" required /></div>\n <div><label for=${this.id_('tel')}>${say('Phone number')}</label><input id=${this.id_('tel')} name=\"phone\" type=\"tel\" autocomplete=\"tel\" required /></div>\n <div><label for=${this.id_('when')}>${say('Best time to call')}</label><select id=${this.id_('when')} name=\"when\"><option value=\"Morning\">${say('Morning')}</option><option value=\"Afternoon\">${say('Afternoon')}</option><option value=\"Evening\">${say('Evening')}</option></select></div>\n <button class=\"btn\" type=\"submit\">${this.buttonText}</button>\n </form>`\n }\n </div>`;\n }\n}\n\n// Working values, not settings: kept out of `properties` so the page designer does not offer them.\nImpaktVideo.createProperty('playing', { state: true });\nImpaktContactBlock.createProperty('sent', { state: true });\n\ncustomElements.define('impakt-plan-comparison', ImpaktPlanComparison);\ncustomElements.define('impakt-video', ImpaktVideo);\ncustomElements.define('impakt-regulatory-notice', ImpaktRegulatoryNotice);\ncustomElements.define('impakt-stamp-duty-calculator', ImpaktStampDutyCalculator);\ncustomElements.define('impakt-affordability-calculator', ImpaktAffordabilityCalculator);\ncustomElements.define('impakt-contact-block', ImpaktContactBlock);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'impakt-plan-comparison': ImpaktPlanComparison;\n 'impakt-video': ImpaktVideo;\n 'impakt-regulatory-notice': ImpaktRegulatoryNotice;\n 'impakt-stamp-duty-calculator': ImpaktStampDutyCalculator;\n 'impakt-affordability-calculator': ImpaktAffordabilityCalculator;\n 'impakt-contact-block': ImpaktContactBlock;\n }\n}\n", "/**\n * A cost estimator: a few questions, one at a time, with a budget beside them\n * that moves as the answers change, and then a result with a timeline, a team\n * and a way of working.\n *\n * Every number is content. Each choice says what it adds to the cost and the\n * weeks, or what it multiplies them by, and the bands say how big a team a\n * cost needs. The arithmetic lives here, in code, because a binding never\n * computes (ADR 0003): a studio changes its rates in the CMS, not the rules.\n */\nimport { css, html, nothing, unsafeCSS, type TemplateResult } from 'lit';\nimport {\n ImpaktElement,\n pageLocale,\n say,\n focusRing,\n targetSize,\n visuallyHidden,\n fontSize,\n fontWeight,\n space,\n spaceAround,\n t,\n type,\n toneOf,\n} from '@atomic-ui/ui';\n\n/** One answer to a question, and what it does to the estimate. */\nexport interface EstimatorChoice {\n id: string;\n label: string;\n /** A line under the label, such as \"iPhone and Android\". */\n hint?: string;\n /** Added to the cost, counted in units (see `unit`). */\n cost?: number;\n /** Added to the weeks. */\n weeks?: number;\n /** Multiplies the cost, such as 1.35 for a more polished first version. */\n costFactor?: number;\n /** Multiplies the weeks. */\n weeksFactor?: number;\n /** Engineers added to the team, such as one more to go faster. */\n engineers?: number;\n /** Shown beside the budget when it is picked. */\n tip?: string;\n /** How the summary names it, such as \"a SaaS platform\" or \"payments\". The label when left out. */\n phrase?: string;\n}\n\n/** One question. */\nexport interface EstimatorQuestion {\n id: string;\n heading: string;\n hint?: string;\n /** `one` picks one card, `many` picks any number, and `scale` is a slider across the choices in order. */\n kind: 'one' | 'many' | 'scale';\n choices: EstimatorChoice[];\n /** The choices picked at the start. A `one` or `scale` question takes the first id; with none, its first choice. */\n start?: string[];\n /** A short name for the question in the summary that is sent on, such as \"Polish\". Left out of it when there is none. */\n short?: string;\n /** For a `many` question, whether the summary lists what was picked, as in \"with payments and AI features\". Yes when left out. */\n inSummary?: boolean;\n}\n\n/** A band of cost: the first band whose `below` the cost is under applies, or the last one. */\nexport interface EstimatorBand {\n below?: number;\n /** For a team band, how many engineers. */\n engineers?: number;\n /** For a way-of-working band, what it is called. */\n text?: string;\n}\n\n/** One part of the timeline. The part with no share takes the weeks the others leave. */\nexport interface EstimatorPhase {\n label: string;\n /** Its share of the weeks, such as 0.1. At least one week either way. */\n share?: number;\n}\n\n/** What an estimate came to, as the `impakt-estimate` event carries it. */\nexport interface EstimateResult {\n low: number;\n high: number;\n weeks: number;\n engineers: number;\n way: string;\n summary: string;\n /** The ids picked for each question. */\n answers: Record<string, string[]>;\n}\n\nconst sum = (xs: number[]) => xs.reduce((a, b) => a + b, 0);\nconst bandFor = (bands: EstimatorBand[], cost: number): EstimatorBand | undefined =>\n bands.find((b) => typeof b.below === 'number' && cost < b.below) ?? bands.at(-1);\n\n/** The arithmetic, apart from the element so it can be checked on its own. */\nexport function estimate(\n questions: EstimatorQuestion[],\n answers: Record<string, string[]>,\n rules: { low: number; high: number; minWeeks: number; teams: EstimatorBand[]; ways: EstimatorBand[] },\n): { cost: number; low: number; high: number; weeks: number; engineers: number; way: string } {\n const chosen = questions.flatMap((q) => (answers[q.id] ?? []).flatMap((id) => q.choices.filter((c) => c.id === id)));\n let cost = sum(chosen.map((c) => c.cost ?? 0));\n let weeks = sum(chosen.map((c) => c.weeks ?? 0));\n for (const c of chosen) {\n cost *= c.costFactor ?? 1;\n weeks *= c.weeksFactor ?? 1;\n }\n const engineers = (bandFor(rules.teams, cost)?.engineers ?? 1) + sum(chosen.map((c) => c.engineers ?? 0));\n return {\n cost,\n low: Math.round(cost * rules.low),\n high: Math.round(cost * rules.high),\n weeks: Math.max(rules.minWeeks, Math.round(weeks)),\n engineers,\n way: bandFor(rules.ways, cost)?.text ?? '',\n };\n}\n\n/** The weeks each part of the timeline takes, adding up to the whole. */\nexport function phaseWeeks(phases: EstimatorPhase[], weeks: number): number[] {\n const fixed = phases.map((p) => (typeof p.share === 'number' ? Math.max(1, Math.round(weeks * p.share)) : 0));\n const rest = Math.max(1, weeks - sum(fixed));\n return phases.map((p, i) => (typeof p.share === 'number' ? fixed[i]! : rest));\n}\n\n/**\n * Asks a few questions one at a time and keeps a budget beside them that moves\n * with every answer, then shows the estimate: the range, the weeks, how long\n * each part takes, the team and the way of working. The visitor can send the\n * estimate on to a contact page, where a message box can start with it.\n *\n * @category form\n * @icon calculator\n * @fires {CustomEvent<EstimateResult>} impakt-estimate - When the estimate is sent on. The result is in detail.\n */\nexport class ImpaktEstimator extends ImpaktElement {\n static properties = {\n questions: { type: Array },\n teams: { type: Array },\n ways: { type: Array },\n phases: { type: Array },\n low: { type: Number },\n high: { type: Number },\n minWeeks: { type: Number, attribute: 'min-weeks' },\n currency: { type: String },\n unit: { type: Number },\n intro: { type: String },\n budgetLabel: { type: String, attribute: 'budget-label' },\n resultHeading: { type: String, attribute: 'result-heading' },\n teamText: { type: String, attribute: 'team-text' },\n teamTextOne: { type: String, attribute: 'team-text-one' },\n note: { type: String },\n contactHref: { type: String, attribute: 'contact-href' },\n sendLabel: { type: String, attribute: 'send-label' },\n headingLevel: { type: Number, attribute: 'heading-level' },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n\n /** The questions, in the order they are asked. */\n declare questions: EstimatorQuestion[];\n /** How many engineers each band of cost needs. */\n declare teams: EstimatorBand[];\n /** The way of working for each band of cost. */\n declare ways: EstimatorBand[];\n /** The parts of the timeline, in order. */\n declare phases: EstimatorPhase[];\n /** The low end of the range, as a share of the cost. */\n declare low: number;\n /** The high end of the range, as a share of the cost. */\n declare high: number;\n /** The fewest weeks an estimate says. */\n declare minWeeks: number;\n /** The currency the cost is in, such as GBP. */\n declare currency: string;\n /** What one unit of cost is worth, such as 1000 when the costs are in thousands. */\n declare unit: number;\n /** Beside the budget before anything is picked, such as \"Start by telling us what you are building.\" */\n declare intro: string;\n declare budgetLabel: string;\n declare resultHeading: string;\n /** The team, with {n} for the number of engineers. */\n declare teamText: string;\n /** The team when it has one engineer. */\n declare teamTextOne: string;\n /** A line under the result, such as how accurate it is. */\n declare note: string;\n /** Where the estimate is sent on to. With none, there is no button to send it. */\n declare contactHref: string;\n declare sendLabel: string;\n /** The level of each question's heading. */\n declare headingLevel: number;\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n private at = 0;\n private answers: Record<string, string[]> = {};\n private tip = '';\n private copied = '';\n private started = false;\n\n constructor() {\n super();\n this.questions = [];\n this.teams = [];\n this.ways = [];\n this.phases = [];\n this.low = 0.85;\n this.high = 1.25;\n this.minWeeks = 1;\n this.currency = 'GBP';\n this.unit = 1;\n this.intro = '';\n this.budgetLabel = 'Indicative budget';\n this.resultHeading = 'Your estimate';\n this.teamText = '{n} engineers';\n this.teamTextOne = '1 engineer';\n this.note = '';\n this.contactHref = '';\n this.sendLabel = 'Send this to us';\n this.headingLevel = 2;\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n spaceAround,\n focusRing,\n css`\n :host { display: block; container-type: inline-size; }\n [hidden] { display: none !important; }\n .wrap { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: ${space(10)}; align-items: start; }\n .mono { font-family: ${t.fontMono}; font-size: ${fontSize('xs')}; letter-spacing: 0.04em; text-transform: uppercase; color: ${t.textMuted}; margin: 0; }\n .sr-only { ${visuallyHidden} }\n\n .progress { display: grid; gap: ${space(2)}; margin-block-end: ${space(6)}; }\n .bar { block-size: 4px; border-radius: 2px; background: color-mix(in srgb, currentColor 12%, transparent); overflow: hidden; }\n .bar i { display: block; block-size: 100%; background: ${t.brand}; transition: inline-size 300ms ease; }\n\n fieldset { border: 0; margin: 0; padding: 0; min-inline-size: 0; }\n legend { padding: 0; margin-block-end: ${space(2)}; }\n .q { margin: 0; font-family: ${t.fontHeading}; font-weight: ${fontWeight('bold')}; ${type('3xl')} letter-spacing: ${t.trackingTight}; color: ${t.textHeading}; outline: none; }\n .hint { margin: 0 0 ${space(6)}; color: ${t.textMuted}; }\n\n .choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: ${space(3)}; }\n .choices.many { grid-template-columns: repeat(3, minmax(0, 1fr)); }\n .choice { position: relative; display: grid; gap: ${space(1)}; align-content: start; padding: ${space(4)}; border: ${t.borderThin} solid ${t.border}; border-radius: ${t.radiusLg}; background: ${t.surfaceCard}; cursor: pointer; transition: border-color 120ms ease, background 120ms ease; }\n .choice:hover { border-color: ${t.borderStrong}; }\n .choice input { ${visuallyHidden} }\n .choice:has(input:checked) { border-color: ${t.brand}; box-shadow: inset 0 0 0 1px ${t.brand}; background: ${t.brandSubtle}; }\n .choice:has(input:focus-visible) { box-shadow: ${t.focusShadow}; }\n .many .choice { padding: ${space(3)}; }\n .label { font-weight: ${fontWeight('semibold')}; }\n .small { ${type('sm')} color: ${t.textMuted}; }\n /* A tick for a picked feature, drawn in the corner. */\n .many .choice:has(input:checked)::after { content: '\u2713'; position: absolute; inset-block-start: ${space(2)}; inset-inline-end: ${space(3)}; color: ${t.brand}; font-weight: ${fontWeight('bold')}; }\n\n .scale { display: grid; gap: ${space(3)}; }\n .scale input { inline-size: 100%; accent-color: ${t.brand}; ${targetSize} }\n .ticks { display: flex; justify-content: space-between; ${type('sm')} color: ${t.textMuted}; }\n .ticks span[aria-current] { color: ${t.text}; font-weight: ${fontWeight('semibold')}; }\n .now { margin: 0; }\n\n .nav { display: flex; gap: ${space(3)}; margin-block-start: ${space(8)}; }\n button, .send { ${targetSize} display: inline-flex; align-items: center; justify-content: center; gap: ${space(2)}; padding: ${space(2.5)} ${space(5)}; border-radius: ${t.radiusLg}; font: inherit; font-weight: ${fontWeight('semibold')}; cursor: pointer; text-decoration: none; border: ${t.borderThin} solid transparent; }\n .primary, .send { background: ${t.brand}; color: ${t.onBrand}; }\n .primary:hover, .send:hover { background: ${t.brandHover}; }\n .secondary { background: transparent; color: ${t.text}; border-color: ${t.borderStrong}; }\n .secondary:hover { background: ${t.surfaceSubtle}; }\n\n .panel { position: sticky; inset-block-start: ${space(6)}; overflow: hidden; isolation: isolate; padding: ${space(8)}; border-radius: ${t.radiusXl}; background: ${t.surfaceCard}; box-shadow: ${t.shadowMd}; display: grid; gap: ${space(2)}; }\n /* The glow behind the budget grows as the product does. */\n .glow { position: absolute; z-index: -1; inset-block-start: -40%; inset-inline-end: -30%; inline-size: 120%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, ${unsafeCSS(toneOf(1, 0))} 45%, transparent), color-mix(in srgb, ${unsafeCSS(toneOf(2, 1))} 25%, transparent) 45%, transparent 70%); transform: scale(var(--s, 0.7)); transform-origin: 70% 30%; transition: transform 500ms cubic-bezier(.2, .8, .2, 1); pointer-events: none; }\n .range { margin: 0; font-family: ${t.fontHeading}; font-weight: ${fontWeight('bold')}; font-size: ${fontSize('5xl')}; line-height: 1; letter-spacing: ${t.trackingTight}; color: ${t.textHeading}; }\n .weeks { margin: 0; ${type('lg')} }\n .tip { margin: ${space(4)} 0 0; padding-block-start: ${space(4)}; border-block-start: 1px solid color-mix(in srgb, currentColor 15%, transparent); color: ${t.textMuted}; }\n\n .result { display: grid; gap: ${space(6)}; }\n .summary { margin: 0; ${type('xl')} text-wrap: pretty; }\n .phases { display: flex; gap: 3px; block-size: 14px; border-radius: 7px; overflow: hidden; }\n .phases i { display: block; }\n .legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: ${space(2)} ${space(5)}; }\n .legend li { display: inline-flex; align-items: center; gap: ${space(2)}; }\n .legend li::before { content: ''; inline-size: 10px; block-size: 10px; border-radius: 50%; background: var(--c); }\n dl { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: ${space(4)}; }\n dt { margin: 0 0 ${space(1)}; }\n dd { margin: 0; font-weight: ${fontWeight('semibold')}; }\n .actions { display: flex; flex-wrap: wrap; gap: ${space(3)}; }\n .note { margin: 0; ${type('sm')} color: ${t.textMuted}; }\n .status { margin: 0; ${type('sm')} }\n\n @container (max-width: 48rem) {\n .wrap { grid-template-columns: minmax(0, 1fr); gap: ${space(8)}; }\n /* Not sticky once the panel is under the questions, but still the glow's containing block, so the panel clips it\n and it never widens the page (1.4.10). */\n .panel { position: relative; inset-block-start: auto; }\n .choices.many { grid-template-columns: repeat(2, minmax(0, 1fr)); }\n }\n @container (max-width: 30rem) {\n .choices { grid-template-columns: minmax(0, 1fr); }\n .range { font-size: ${fontSize('4xl')}; }\n }\n @media (forced-colors: active) {\n .choice:has(input:checked) { outline: 3px solid Highlight; }\n .bar i, .phases i, .legend li::before { background: CanvasText !important; }\n .glow { display: none; }\n }\n `,\n ];\n\n /** The answers each question starts with. */\n private reset(): void {\n this.answers = Object.fromEntries(\n (this.questions ?? []).map((q) => {\n const ids = (q.start ?? []).filter((id) => q.choices.some((c) => c.id === id));\n if (q.kind === 'many') return [q.id, ids];\n return [q.id, [ids[0] ?? q.choices[0]?.id].filter((x): x is string => Boolean(x))];\n }),\n );\n this.at = 0;\n this.tip = '';\n this.copied = '';\n }\n\n protected willUpdate(changed: Map<string, unknown>): void {\n if (changed.has('questions') || !this.started) {\n this.reset();\n this.started = true;\n }\n }\n\n private get rules() {\n return { low: this.low, high: this.high, minWeeks: this.minWeeks, teams: this.teams ?? [], ways: this.ways ?? [] };\n }\n\n private money(n: number): string {\n try {\n return new Intl.NumberFormat(pageLocale(this), {\n style: 'currency',\n currency: this.currency || 'GBP',\n notation: 'compact',\n maximumFractionDigits: 0,\n }).format(n * (this.unit || 1));\n } catch {\n return String(n * (this.unit || 1));\n }\n }\n\n private listOf(words: string[]): string {\n try {\n return new Intl.ListFormat(pageLocale(this), { type: 'conjunction' }).format(words);\n } catch {\n return words.join(', ');\n }\n }\n\n private weeksWord(n: number): string {\n return n === 1 ? say('{n} week', { n }) : say('{n} weeks', { n });\n }\n\n /** The largest the budget can be, so the glow is full size at it. */\n private get most(): number {\n const qs = this.questions ?? [];\n const answers = Object.fromEntries(\n qs.map((q) => {\n if (q.kind === 'many') return [q.id, q.choices.map((c) => c.id)];\n const best = [...q.choices].sort((a, b) => (b.cost ?? 0) * (b.costFactor ?? 1) - (a.cost ?? 0) * (a.costFactor ?? 1))[0];\n return [q.id, best ? [best.id] : []];\n }),\n );\n return estimate(qs, answers, this.rules).high || 1;\n }\n\n private summaryOf(r: ReturnType<typeof estimate>): string {\n const qs = this.questions ?? [];\n const one = qs.find((q) => q.kind === 'one');\n const thing = one ? one.choices.find((c) => c.id === this.answers[one.id]?.[0]) : undefined;\n const many = qs\n .filter((q) => q.kind === 'many' && q.inSummary !== false)\n .flatMap((q) =>\n (this.answers[q.id] ?? []).map((id) => {\n const c = q.choices.find((x) => x.id === id);\n return c ? c.phrase || c.label : id;\n }),\n );\n const name = thing ? thing.phrase || thing.label : '';\n const first = !name\n ? ''\n : many.length\n ? say('You are building {thing} with {list}.', { thing: name, list: this.listOf(many) })\n : say('You are building {thing}.', { thing: name });\n const rest = say('Expect {range} and about {weeks} to a first release.', { range: this.rangeOf(r), weeks: this.weeksWord(r.weeks) });\n return first ? `${first} ${rest}` : rest;\n }\n\n private rangeOf(r: { low: number; high: number }): string {\n return say('{low} to {high}', { low: this.money(r.low), high: this.money(r.high) });\n }\n private teamOf(n: number): string {\n return n === 1 ? this.teamTextOne : this.teamText.replace('{n}', String(n));\n }\n\n private pick(q: EstimatorQuestion, choice: EstimatorChoice, on: boolean): void {\n const now = this.answers[q.id] ?? [];\n this.answers = {\n ...this.answers,\n [q.id]: q.kind === 'many' ? (on ? [...now.filter((id) => id !== choice.id), choice.id] : now.filter((id) => id !== choice.id)) : [choice.id],\n };\n if (on && choice.tip) this.tip = choice.tip;\n this.requestUpdate();\n }\n\n private go(to: number): void {\n const last = (this.questions ?? []).length;\n this.at = Math.max(0, Math.min(last, to));\n this.copied = '';\n this.requestUpdate();\n void this.updateComplete.then(() => (this.renderRoot.querySelector('.current .q') as HTMLElement | null)?.focus({ preventScroll: true }));\n }\n\n private result(): EstimateResult {\n const r = estimate(this.questions ?? [], this.answers, this.rules);\n return {\n low: r.low * (this.unit || 1),\n high: r.high * (this.unit || 1),\n weeks: r.weeks,\n engineers: r.engineers,\n way: r.way,\n summary: this.textOf(r),\n answers: this.answers,\n };\n }\n\n /** The estimate as words to send or copy. */\n private textOf(r: ReturnType<typeof estimate>): string {\n const parts = [this.summaryOf(r), `${this.teamOf(r.engineers)}.`];\n if (r.way) parts.push(`${r.way}.`);\n const picked = (this.questions ?? [])\n .filter((q) => q.short && q.kind !== 'many')\n .map((q) => {\n const c = q.choices.find((x) => x.id === this.answers[q.id]?.[0]);\n return c ? `${q.short}: ${c.label}.` : '';\n })\n .filter(Boolean);\n const many = (this.questions ?? [])\n .filter((q) => q.short && q.kind === 'many' && q.inSummary === false)\n .map((q) => {\n const labels = (this.answers[q.id] ?? []).map((id) => q.choices.find((x) => x.id === id)?.label ?? id);\n return labels.length ? `${q.short}: ${this.listOf(labels)}.` : '';\n })\n .filter(Boolean);\n return [...parts, ...many, ...picked].join(' ');\n }\n\n private send(e: Event): void {\n const result = this.result();\n try {\n sessionStorage.setItem('impakt.estimate', result.summary);\n } catch {\n /* storage can be blocked; the link still goes */\n }\n const go = this.dispatchEvent(new CustomEvent('impakt-estimate', { detail: result, bubbles: true, composed: true, cancelable: true }));\n if (!go) e.preventDefault();\n }\n\n private async copy(): Promise<void> {\n const text = this.result().summary;\n try {\n await navigator.clipboard.writeText(text);\n this.copied = say('Summary copied.');\n } catch {\n this.copied = say('Copying is blocked here. Select the summary above instead.');\n }\n this.requestUpdate();\n }\n\n private heading(text: string): TemplateResult {\n const l = Math.min(Math.max(this.headingLevel || 2, 2), 6);\n return html`<div class=\"q\" role=\"heading\" aria-level=${l} tabindex=\"-1\">${text}</div>`;\n }\n\n private renderQuestion(q: EstimatorQuestion, i: number): TemplateResult {\n const picked = this.answers[q.id] ?? [];\n const current = i === this.at;\n if (q.kind === 'scale') {\n const index = Math.max(\n 0,\n q.choices.findIndex((c) => c.id === picked[0]),\n );\n const chosen = q.choices[index];\n return html`<fieldset class=${current ? 'current' : ''} ?hidden=${!current}>\n <legend>${this.heading(q.heading)}</legend>\n ${q.hint ? html`<p class=\"hint\">${q.hint}</p>` : nothing}\n <div class=\"scale\">\n <input type=\"range\" min=\"0\" max=${Math.max(0, q.choices.length - 1)} step=\"1\" .value=${String(index)} aria-label=${q.heading} aria-valuetext=${chosen?.label ?? ''}\n @input=${(e: Event) => {\n const c = q.choices[Number((e.target as HTMLInputElement).value)];\n if (c) this.pick(q, c, true);\n }}>\n <div class=\"ticks\" aria-hidden=\"true\">${q.choices.map((c, k) => html`<span aria-current=${k === index ? 'true' : nothing}>${c.label}</span>`)}</div>\n ${chosen?.hint ? html`<p class=\"now\">${chosen.hint}</p>` : nothing}\n </div>\n </fieldset>`;\n }\n const many = q.kind === 'many';\n return html`<fieldset class=${current ? 'current' : ''} ?hidden=${!current}>\n <legend>${this.heading(q.heading)}</legend>\n ${q.hint ? html`<p class=\"hint\">${q.hint}</p>` : nothing}\n <div class=\"choices ${many ? 'many' : ''}\">\n ${q.choices.map(\n (c) => html`<label class=\"choice\">\n <input type=${many ? 'checkbox' : 'radio'} name=${`${this.uid}-${q.id}`} value=${c.id} .checked=${picked.includes(c.id)}\n @change=${(e: Event) => this.pick(q, c, (e.target as HTMLInputElement).checked)}>\n <span class=\"label\">${c.label}</span>\n ${c.hint ? html`<span class=\"small\">${c.hint}</span>` : nothing}\n </label>`,\n )}\n </div>\n </fieldset>`;\n }\n\n private renderResult(r: ReturnType<typeof estimate>): TemplateResult {\n const weeks = phaseWeeks(this.phases ?? [], r.weeks);\n const current = this.at === (this.questions ?? []).length;\n return html`<div class=\"result ${current ? 'current' : ''}\" ?hidden=${!current}>\n ${this.heading(this.resultHeading)}\n <p class=\"summary\">${this.summaryOf(r)}</p>\n ${\n (this.phases ?? []).length\n ? html`\n <div class=\"phases\" aria-hidden=\"true\">${(this.phases ?? []).map((_, i) => html`<i style=${`flex-grow:${weeks[i]};background:${toneOf(undefined, i)}`}></i>`)}</div>\n <ul class=\"legend\">${(this.phases ?? []).map((p, i) => html`<li style=${`--c:${toneOf(undefined, i)}`}>${p.label} <b>${this.weeksWord(weeks[i]!)}</b></li>`)}</ul>`\n : nothing\n }\n <dl>\n <div><dt class=\"mono\">${say('Your team')}</dt><dd>${this.teamOf(r.engineers)}</dd></div>\n ${r.way ? html`<div><dt class=\"mono\">${say('Way of working')}</dt><dd>${r.way}</dd></div>` : nothing}\n </dl>\n <div class=\"actions\">\n ${this.contactHref ? html`<a class=\"send\" href=${this.contactHref} @click=${(e: Event) => this.send(e)}>${this.sendLabel} <span aria-hidden=\"true\">\u2192</span></a>` : nothing}\n <button type=\"button\" class=\"secondary\" @click=${() => this.copy()}>${say('Copy summary')}</button>\n <button type=\"button\" class=\"secondary\" @click=${() => {\n this.reset();\n this.go(0);\n }}>${say('Start again')}</button>\n </div>\n <p class=\"status\" role=\"status\">${this.copied}</p>\n ${this.note ? html`<p class=\"note\">${this.note}</p>` : nothing}\n </div>`;\n }\n\n render(): TemplateResult {\n const qs = this.questions ?? [];\n const total = qs.length;\n const r = estimate(qs, this.answers, this.rules);\n const done = this.at >= total;\n const scale = (0.6 + Math.min(1, r.high / this.most) * 1.1).toFixed(2);\n return html`<div class=\"wrap\">\n <div>\n <div class=\"progress\">\n <p class=\"mono\">${done ? this.resultHeading : say('Step {step} of {steps}', { step: this.at + 1, steps: total })}</p>\n <div class=\"bar\" aria-hidden=\"true\"><i style=${`inline-size:${total ? (done ? 100 : ((this.at + 1) / (total + 1)) * 100) : 0}%`}></i></div>\n </div>\n ${qs.map((q, i) => this.renderQuestion(q, i))}\n ${this.renderResult(r)}\n ${\n done\n ? nothing\n : html`<div class=\"nav\">\n ${this.at > 0 ? html`<button type=\"button\" class=\"secondary\" @click=${() => this.go(this.at - 1)}>${say('Back')}</button>` : nothing}\n <button type=\"button\" class=\"primary\" @click=${() => this.go(this.at + 1)}>${this.at === total - 1 ? say('See my estimate') : say('Next')} <span aria-hidden=\"true\">\u2192</span></button>\n </div>`\n }\n </div>\n <aside class=\"panel\" part=\"panel\" style=${`--s:${scale}`}>\n <div class=\"glow\" aria-hidden=\"true\"></div>\n <p class=\"mono\">${this.budgetLabel}</p>\n <p class=\"range\" aria-live=\"polite\" aria-atomic=\"true\">${this.rangeOf(r)}</p>\n <p class=\"weeks\">${say('About {weeks} to a first release', { weeks: this.weeksWord(r.weeks) })}</p>\n <p class=\"tip\" aria-live=\"polite\">${this.tip || this.intro}</p>\n </aside>\n </div>`;\n }\n}\n\ncustomElements.define('impakt-estimator', ImpaktEstimator);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'impakt-estimator': ImpaktEstimator;\n }\n}\n", "/**\n * A site's own header and footer, drawn as one piece each, for the layout's\n * header and footer slots, and the wordmark that starts a header.\n *\n * The chip that sits beside a wordmark is a product component, `impakt-chip`,\n * and comes from `@atomic-ui/ui`.\n *\n * The page frame (`impakt-page`) gives them their landmarks, so neither draws a\n * `<header>` or `<footer>` of its own: a second banner would be one a screen\n * reader announces twice.\n */\nimport { css, html, nothing, type TemplateResult } from 'lit';\n// The base, the tokens and the nav and button these draw come from @atomic-ui/ui, which defines its elements on import.\nimport { ImpaktElement, focusRing, hideOn, fontSize, fontWeight, space, t, type, toneOf, type NavLink, type Tone } from '@atomic-ui/ui';\n\n/** The footer stripe's colours, left to right. */\n/** The stripe's segments take the brand's chart colours in order. */\nconst STRIPE = [0, 1, 2, 3, 4];\n\n/** Code-like labels: a branch, a hash, a commit message. */\nconst MONO = t.fontMono;\n\n// Quieter words are faded to 0.72, no further: that keeps them at 4.5:1 on the page and card colours (1.4.3).\n\n/**\n * The site header: the brand, the main links and one call to action, with an\n * optional chip beside the brand and a status before the action.\n *\n * The links fold behind a Menu button when they do not fit, as `impakt-nav`\n * does. The chip and the status are labels, not controls, and they are left\n * out on a phone so the brand, the menu and the action keep the row.\n *\n * **Build your own.** Place components in its three slots, start, middle and\n * end, and each slot that holds something replaces what the props draw there:\n * a wordmark and chips at the start, a nav in the middle, a status and a\n * button at the end, in any order. Give a component `hideOn: 'phone'` to leave\n * it out on a phone, so the phone's header is built from the same pieces.\n *\n * @category layout\n * @icon header\n * @slot start - The brand: a wordmark or logo, and any chips beside it.\n * @slot middle - The links, usually one nav.\n * @slot end - A status and the call to action.\n * @fires {CustomEvent<null>} impakt-action - When the call to action is pressed.\n */\nexport class ImpaktSiteHeader extends ImpaktElement {\n static properties = {\n brand: { type: String },\n logoSrc: { type: String, attribute: 'logo-src' },\n logoAlt: { type: String, attribute: 'logo-alt' },\n home: { type: String },\n badge: { type: String },\n meta: { type: String },\n links: { type: Array },\n label: { type: String },\n menuText: { type: String, attribute: 'menu-text' },\n status: { type: String },\n statusMeta: { type: String, attribute: 'status-meta' },\n statusTone: { type: String, attribute: 'status-tone' },\n actionText: { type: String, attribute: 'action-text' },\n actionHref: { type: String, attribute: 'action-href' },\n };\n /** The site's name, set as a wordmark when there is no logo picture. */\n declare brand: string;\n /** A logo picture, used instead of the wordmark. */\n declare logoSrc: string;\n /** What the logo says. Leave empty to use the brand name. */\n declare logoAlt: string;\n /** Where the brand links to. */\n declare home: string;\n /** A short chip beside the brand, such as \"main\". */\n declare badge: string;\n /** A code-like line after the chip, such as a commit hash. */\n declare meta: string;\n declare links: NavLink[];\n /** The name of the links' landmark. */\n declare label: string;\n /** The words on the button that opens the links on a narrow screen. */\n declare menuText: string;\n /** A status before the action, such as the stage the site is at. */\n declare status: string;\n /** A code-like line in the status, such as a hash. */\n declare statusMeta: string;\n declare statusTone: Tone;\n declare actionText: string;\n declare actionHref: string;\n\n constructor() {\n super();\n this.brand = '';\n this.logoSrc = '';\n this.logoAlt = '';\n this.home = '/';\n this.badge = '';\n this.meta = '';\n this.links = [];\n this.label = 'Main';\n this.menuText = 'Menu';\n this.status = '';\n this.statusMeta = '';\n this.statusTone = 'success';\n this.actionText = '';\n this.actionHref = '';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n css`\n :host { display: block; container-type: inline-size; }\n .bar { display: flex; align-items: center; gap: ${space(6)}; }\n .start { display: flex; align-items: center; gap: ${space(3)}; flex: none; }\n .middle { flex: 1 1 8rem; min-inline-size: 0; display: flex; align-items: center; justify-content: center; }\n .middle ::slotted(*) { flex: 1 1 auto; min-inline-size: 0; }\n slot { display: contents; }\n .brand { display: inline-flex; align-items: center; min-block-size: ${t.targetMin}; color: inherit; text-decoration: none; font-family: ${t.fontHeading}; font-weight: ${fontWeight('semibold')}; ${type('2xl')} letter-spacing: -0.02em; line-height: 1; border-radius: ${t.radiusSm}; }\n .brand img { display: block; block-size: 32px; inline-size: auto; }\n .chip { display: inline-flex; align-items: center; gap: ${space(1)}; padding: 2px ${space(2)}; border-radius: ${t.radius}; background: color-mix(in srgb, currentColor 7%, transparent); font-family: ${MONO}; font-size: ${fontSize('xs')}; }\n .chip svg { inline-size: 12px; block-size: 12px; }\n .meta { font-family: ${MONO}; font-size: ${fontSize('xs')}; opacity: 0.72; }\n .middle impakt-nav { flex: 1 1 8rem; }\n .end { display: flex; align-items: center; gap: ${space(3)}; flex: none; }\n .end:empty, .start:empty { display: none; }\n .status { display: inline-flex; align-items: center; gap: ${space(2)}; padding: ${space(1)} ${space(3)}; border: ${t.borderThin} solid ${t.border}; border-radius: 999px; background: ${t.surfaceCard}; font-family: ${MONO}; font-size: ${fontSize('xs')}; white-space: nowrap; }\n .status .dot { inline-size: 8px; block-size: 8px; border-radius: 50%; background: var(--tone); }\n .status .hash { opacity: 0.72; }\n @container (max-width: 56rem) { .chip, .meta, .status { display: none; } .bar { gap: ${space(3)}; } }\n `,\n ];\n\n private act(): void {\n this.dispatchEvent(new CustomEvent('impakt-action', { bubbles: true, composed: true }));\n }\n\n render(): TemplateResult {\n const wordmark = this.logoSrc ? html`<img src=${this.logoSrc} alt=${this.logoAlt || this.brand} />` : html`${this.brand}`;\n // Each region shows what is placed in its slot, or, when nothing is, what the props describe.\n return html`<div class=\"bar\" part=\"bar\">\n <div class=\"start\"><slot name=\"start\">\n ${this.brand || this.logoSrc ? html`<a class=\"brand\" href=${this.home || '/'} part=\"brand\">${wordmark}</a>` : nothing}\n ${this.badge ? html`<span class=\"chip\" part=\"badge\"><svg viewBox=\"0 0 14 14\" aria-hidden=\"true\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\"><circle cx=\"3.5\" cy=\"3\" r=\"1.5\"/><circle cx=\"3.5\" cy=\"11\" r=\"1.5\"/><circle cx=\"10.5\" cy=\"4.5\" r=\"1.5\"/><path d=\"M3.5 4.5v5M10.5 6c0 2.5-3 2.5-6 4\"/></svg>${this.badge}</span>` : nothing}\n ${this.meta ? html`<span class=\"meta\" part=\"meta\">${this.meta}</span>` : nothing}\n </slot></div>\n <div class=\"middle\"><slot name=\"middle\">${(this.links ?? []).length ? html`<impakt-nav align=\"center\" size=\"sm\" .links=${this.links} .label=${this.label} .menuText=${this.menuText}></impakt-nav>` : nothing}</slot></div>\n <div class=\"end\"><slot name=\"end\">\n ${this.status ? html`<span class=\"status\" part=\"status\" style=${`--tone:${toneOf(this.statusTone, 0)}`}><span class=\"dot\" aria-hidden=\"true\"></span>${this.status}${this.statusMeta ? html` <span class=\"hash\">${this.statusMeta}</span>` : nothing}</span>` : nothing}\n ${this.actionText ? html`<impakt-button variant=\"primary\" icon-after=\"arrow-right\" href=${this.actionHref || nothing} @click=${this.act}>${this.actionText}</impakt-button>` : nothing}\n </slot></div>\n </div>`;\n }\n}\n\n/**\n * The site's name as a wordmark, or its logo, linking home: the start of a\n * site header.\n *\n * @category layout\n * @icon logo\n */\nexport class ImpaktWordmark extends ImpaktElement {\n static properties = {\n text: { type: String },\n src: { type: String },\n alt: { type: String },\n href: { type: String },\n size: { type: String, reflect: true },\n hideOn: { type: String, reflect: true, attribute: 'hide-on' },\n };\n /** The name, set in the heading face. */\n declare text: string;\n /** A logo picture, used instead of the name. */\n declare src: string;\n /** What the logo says. Leave empty to use the name. */\n declare alt: string;\n declare href: string;\n /** Larger on a wide header, smaller on a phone's. */\n declare size: 'sm' | 'md' | 'lg';\n declare hideOn: 'never' | 'phone' | 'wide';\n\n constructor() {\n super();\n this.text = '';\n this.src = '';\n this.alt = '';\n this.href = '/';\n this.size = 'md';\n this.hideOn = 'never';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n hideOn,\n css`\n :host { display: inline-flex; align-items: center; flex: none; }\n a { color: inherit; text-decoration: none; font-family: ${t.fontHeading}; font-weight: ${fontWeight('semibold')}; letter-spacing: -0.02em; line-height: 1; border-radius: ${t.radiusSm}; }\n :host([size='sm']) a { ${type('xl')} } :host([size='md']) a { ${type('2xl')} } :host([size='lg']) a { ${type('3xl')} }\n img { display: block; block-size: 32px; inline-size: auto; }\n @media (max-width: 40rem) { :host([size='md']) a, :host([size='lg']) a { ${type('xl')} } }\n `,\n ];\n\n render(): TemplateResult {\n // The name arrives as the element's words when a page places it, or as `text` when it is set directly.\n return html`<a href=${this.href || '/'} part=\"link\">${this.src ? html`<img src=${this.src} alt=${this.alt || this.text || this.textContent?.trim() || ''} />` : html`<slot>${this.text}</slot>`}</a>`;\n }\n}\n\n/** One line of a footer's log: a code, what it says, and the colour of its dot. */\nexport interface FooterLogLine {\n meta?: string;\n text: string;\n tone?: Tone;\n}\n\n/** A column of footer links under a short heading. */\nexport interface FooterColumn {\n heading: string;\n links: NavLink[];\n}\n\n/**\n * The site footer: the footer band with the brand set large, an optional log of\n * lines beside it, columns of links, a legal line and a stripe of the brand's\n * colours along the foot.\n *\n * Each column is a list under its own heading, so a screen reader can move\n * from one to the next. The log is a list too; its dots are decoration.\n *\n * @category layout\n * @icon footer\n */\nexport class ImpaktSiteFooter extends ImpaktElement {\n static properties = {\n brand: { type: String },\n brandSize: { type: String, reflect: true, attribute: 'brand-size' },\n log: { type: Array },\n columns: { type: Array },\n columnsOnPhone: { type: String, attribute: 'columns-on-phone', reflect: true },\n legal: { type: String },\n stripe: { type: Boolean, reflect: true },\n headingLevel: { type: Number, attribute: 'heading-level' },\n };\n /** The site's name, set large. */\n declare brand: string;\n /**\n * How large the name is set. `display` runs it the full width of the footer,\n * under the columns, sized by the footer's own width so it never spills at\n * 320px.\n */\n declare brandSize: 'lg' | 'display';\n /** Lines set in code type under the brand, newest first. The first is bright. */\n declare log: FooterLogLine[];\n declare columns: FooterColumn[];\n /** `hidden` leaves the link columns out on a phone, so the footer there is the name, the lines and the legal line. */\n declare columnsOnPhone: 'shown' | 'hidden';\n /** The line at the foot, such as the copyright. */\n declare legal: string;\n /** A stripe of the brand's colours along the bottom edge. */\n declare stripe: boolean;\n /** The level of each column's heading. */\n declare headingLevel: 2 | 3 | 4;\n\n constructor() {\n super();\n this.brand = '';\n this.brandSize = 'lg';\n this.log = [];\n this.columns = [];\n this.columnsOnPhone = 'shown';\n this.legal = '';\n this.stripe = false;\n this.headingLevel = 2;\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n css`\n /* The page frame's footer band gives the colours; this sits flush with its foot so the stripe meets the edge. */\n :host { display: block; container-type: inline-size; position: relative; padding-block: ${space(8)} ${space(4)}; margin-block-end: calc(-1 * ${space(8)}); }\n .top { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: ${space(10)}; }\n .brand { margin: 0; font-family: ${t.fontHeading}; font-weight: ${fontWeight('bold')}; font-size: clamp(3rem, 6vw, 4.5rem); line-height: 1; letter-spacing: -0.03em; }\n /* The name as a wordmark across the whole footer, under the columns. */\n :host([brand-size='display']) .top { grid-template-columns: 1fr; }\n :host([brand-size='display']) .top > div:first-child { order: 2; }\n :host([brand-size='display']) .brand { font-weight: ${fontWeight('semibold')}; font-size: clamp(3rem, 27cqi, 24rem); line-height: 0.9; letter-spacing: -0.06em; overflow-wrap: anywhere; }\n ul { list-style: none; margin: 0; padding: 0; }\n .log { margin-block-start: ${space(8)}; display: grid; gap: ${space(3)}; font-family: ${MONO}; font-size: ${fontSize('sm')}; }\n .log li { display: flex; align-items: center; gap: ${space(3)}; opacity: 0.72; }\n .log li:first-child { opacity: 1; }\n .log .dot { flex: none; inline-size: 10px; block-size: 10px; border-radius: 50%; background: var(--tone); }\n .log .code { margin-inline-end: ${space(3)}; }\n .columns { display: grid; grid-template-columns: repeat(var(--count, 4), minmax(0, 1fr)); gap: ${space(8)}; }\n .h { margin: 0 0 ${space(4)}; font-family: ${MONO}; font-size: ${fontSize('xs')}; font-weight: ${fontWeight('medium')}; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.72; }\n .columns ul { display: grid; gap: ${space(3)}; }\n a { color: inherit; text-decoration: none; font-weight: ${fontWeight('medium')}; border-radius: ${t.radiusSm}; }\n a:hover { text-decoration: underline; text-underline-offset: 0.25em; }\n .legal { margin: ${space(16)} 0 0; font-family: ${MONO}; font-size: ${fontSize('xs')}; opacity: 0.72; }\n .stripe { position: absolute; inset-inline: -100vmax; inset-block-end: 0; block-size: 6px; display: flex; }\n .stripe span { flex: 1; }\n @container (max-width: 48rem) { .top { grid-template-columns: 1fr; } .columns { grid-template-columns: repeat(2, minmax(0, 1fr)); } }\n @container (max-width: 40rem) { :host([columns-on-phone='hidden']) .columns { display: none; } }\n @media (forced-colors: active) { :host { border-block-start: 1px solid CanvasText; } .log .dot { border: 1px solid CanvasText; } }\n `,\n ];\n\n private heading(text: string): TemplateResult {\n const level = Math.min(Math.max(this.headingLevel || 2, 2), 4);\n return level === 3 ? html`<h3 class=\"h\">${text}</h3>` : level === 4 ? html`<h4 class=\"h\">${text}</h4>` : html`<h2 class=\"h\">${text}</h2>`;\n }\n\n render(): TemplateResult {\n const log = this.log ?? [];\n return html`<div part=\"footer\">\n <div class=\"top\">\n <div>\n ${this.brand ? html`<p class=\"brand\" part=\"brand\">${this.brand}</p>` : nothing}\n ${log.length ? html`<ul class=\"log\" part=\"log\">${log.map((line, i) => html`<li style=${`--tone:${toneOf(line.tone ?? (i === 0 ? 'success' : 'accent'), i)}`}><span class=\"dot\" aria-hidden=\"true\"></span><span>${line.meta ? html`<span class=\"code\">${line.meta}</span>` : nothing}${line.text}</span></li>`)}</ul>` : nothing}\n </div>\n <div class=\"columns\" part=\"columns\" style=${`--count:${Math.max(1, (this.columns ?? []).length)}`}>\n ${(this.columns ?? []).map((column) => html`<div>${this.heading(column.heading)}<ul>${(column.links ?? []).map((link) => html`<li><a href=${link.href}>${link.label}</a></li>`)}</ul></div>`)}\n </div>\n </div>\n ${this.legal ? html`<p class=\"legal\" part=\"legal\">${this.legal}</p>` : nothing}\n ${this.stripe ? html`<div class=\"stripe\" aria-hidden=\"true\">${STRIPE.map((i) => html`<span style=${`background:${toneOf(undefined, i)}`}></span>`)}</div>` : nothing}\n </div>`;\n }\n}\n\ncustomElements.define('impakt-site-header', ImpaktSiteHeader);\ncustomElements.define('impakt-wordmark', ImpaktWordmark);\ncustomElements.define('impakt-site-footer', ImpaktSiteFooter);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'impakt-site-header': ImpaktSiteHeader;\n 'impakt-wordmark': ImpaktWordmark;\n 'impakt-site-footer': ImpaktSiteFooter;\n }\n}\n", "import { html, css, nothing, type TemplateResult, type PropertyValues } from 'lit';\nimport { say, ImpaktElement, fontSize, fontWeight, space, t, token } from '@atomic-ui/ui';\n\nexport type SceneDrive = 'view' | 'page' | 'loop' | 'scrubber';\nexport type SceneLayout = 'stage' | 'split';\n\nconst clamp = (n: number) => Math.min(1, Math.max(0, n));\n\n/**\n * A scene: a stage whose children move along a progress from 0 to 1.\n *\n * The children declare timelines in their `motion` block, and `@atomic-ui/motion`\n * compiles them to keyframes. This element owns only the progress, and where it\n * comes from is the `drive` (ADR 0027):\n *\n * - `view` \u2014 the scene's own passage through the viewport. The stage pins\n * while the scene scrolls past, for `length` screens, or beside the content\n * in the default slot when `layout` is `split`.\n * - `page` \u2014 the scroll position of the whole page.\n * - `loop` \u2014 time, over `duration` seconds, repeating. **It always shows a\n * pause button**, because anything that moves on its own for more than five\n * seconds must be pausable (WCAG 2.2.2), and a scene that could forget that\n * is one the gate would have to catch on every page.\n * - `scrubber` \u2014 an `impakt-scrubber` placed in the `controls` slot.\n *\n * Progress is published three ways: the `progress` property, the\n * `--impakt-scene-progress` custom property on the host, and an\n * `impakt-scene-progress` event. Engines with scroll-driven animations run `view`\n * and `page` scenes natively, and the runtime ignores the event for them.\n *\n * Under reduced motion a `loop` does not start, and nothing pins: the stage\n * and the content stack, so every state of the scene can be read in order.\n *\n * @category layout\n * @icon layers\n * @slot stage - What moves, layered one over another. Pinned while the scene plays,\n * beside the content in `split` layout, after it, so the words are read first.\n * @slot - Content that scrolls past the stage, such as chapters.\n * @slot controls - An `impakt-scrubber`, for a scene driven by one.\n * @fires {CustomEvent<{ progress: number }>} impakt-scene-progress - `{ progress }` whenever the progress changes.\n */\nexport class ImpaktScene extends ImpaktElement {\n static properties = {\n drive: { type: String, reflect: true },\n layout: { type: String, reflect: true },\n length: { type: Number },\n duration: { type: Number },\n label: { type: String },\n progress: { type: Number },\n controls: { type: String, reflect: true },\n bleed: { type: Boolean, reflect: true },\n hideOn: { type: String, reflect: true, attribute: 'hide-on' },\n };\n\n /** Where the progress comes from. */\n declare drive: 'view' | 'page' | 'loop' | 'scrubber';\n /** `stage` pins one full-width stage; `split` pins it beside the content. */\n declare layout: 'stage' | 'split';\n /** How many screens of scrolling a `view` scene lasts, in `stage` layout. */\n declare length: number;\n /** Seconds per cycle of a `loop` scene. */\n declare duration: number;\n /** The scene's accessible name. Also names its pause button. */\n declare label: string;\n /** From 0 to 1. Set it to seek a `scrubber` scene, or where one starts. */\n declare progress: number;\n /**\n * Where the controls sit: `below` the stage, or `over` its foot, floating\n * on what it shows, as a video's do. Under reduced motion they sit below.\n */\n declare controls: 'below' | 'over';\n /** Run the stage to the window's edges, past the page's margins, as a hero drawn edge to edge does. */\n declare bleed: boolean;\n /**\n * Leave it out on a phone, or on anything wider, for a picture drawn twice:\n * once for a wide screen and once for a narrow one. Never both.\n */\n declare hideOn: 'never' | 'phone' | 'wide';\n /**\n * Whether a loop is paused: the scene's own state, set by its pause button\n * or by `pause()`. A plain field rather than a property, so it is never one\n * of the settings an author is offered.\n */\n private paused = false;\n\n private frame = 0;\n private started = 0;\n private reduced = false;\n private seekFrom = 0;\n private seekTo = 0;\n private seekStart = 0;\n private seekMs = 0;\n\n constructor() {\n super();\n this.drive = 'view';\n this.layout = 'stage';\n this.length = 3;\n this.duration = 8;\n this.label = 'Animation';\n this.progress = 0;\n this.controls = 'below';\n this.bleed = false;\n this.hideOn = 'never';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n css`\n :host {\n display: block;\n position: relative;\n }\n :host([drive='view'][layout='stage']) {\n min-height: calc(var(--impakt-scene-length, 3) * 100svh);\n }\n .frame {\n display: grid;\n grid-template-columns: minmax(0, 1fr);\n }\n :host([layout='split']) .frame {\n grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);\n gap: ${space(8)};\n }\n .stage {\n position: sticky;\n top: 0;\n height: 100svh;\n display: grid;\n place-items: center;\n overflow: clip;\n }\n /* What is on the stage is layered, as in a motion tool: each thing sits\n over the one before, so a later layer's timeline can reveal it over an\n earlier one. */\n .stage ::slotted(*) {\n grid-area: 1 / 1;\n max-width: 100%;\n }\n :host([drive='loop']) .stage,\n :host([drive='scrubber']) .stage {\n position: relative;\n height: auto;\n min-height: 60svh;\n }\n .controls {\n display: flex;\n gap: ${space(3)};\n align-items: center;\n justify-content: center;\n padding-block: ${space(3)};\n }\n :host([bleed]) { margin-inline: calc(50% - 50vw); }\n @media (max-width: 40rem) { :host([hide-on='phone']) { display: none; } }\n @media (min-width: 40.0625rem) { :host([hide-on='wide']) { display: none; } }\n /* Over the stage, the controls float at its foot, above the layers and clear of its edges. */\n .stage > .controls { position: absolute; inset-inline: ${space(6)}; inset-block-end: ${space(6)}; z-index: 2; padding: 0; }\n .stage > .controls ::slotted(*) { box-shadow: 0 12px 32px rgb(16 19 23 / 14%); border-radius: 16px; background: var(--impakt-color-surface-card, #fff); }\n /* A control takes the row, so a graph scrubber spans the stage; a narrower one centres itself. */\n .controls ::slotted(*) { flex: 1 1 auto; min-width: 0; }\n .pause {\n min-width: ${token('target.min', '24px')};\n min-height: ${token('target.min', '24px')};\n padding: ${space(2)} ${space(4)};\n border-radius: ${token('radius.full', '9999px')};\n border: 1px solid ${t.border};\n background: ${t.surfaceCard};\n color: ${t.text};\n font-size: ${fontSize('sm')};\n font-weight: ${fontWeight('medium')};\n cursor: pointer;\n }\n .pause:focus-visible {\n outline: none;\n box-shadow: ${token('focus.ring.shadow', '0 0 0 2px #fff, 0 0 0 4px #1a1a1a')};\n }\n @media (max-width: 48rem) {\n :host([layout='split']) .frame {\n grid-template-columns: minmax(0, 1fr);\n }\n :host([layout='split']) .stage {\n height: 50svh;\n z-index: 1;\n }\n }\n @media (prefers-reduced-motion: reduce) {\n :host {\n min-height: 0 !important;\n }\n .stage {\n position: relative;\n height: auto;\n gap: ${space(6)};\n }\n /* With less motion the layers are shown one after another, so every\n state the scene would have moved through can still be seen. */\n .stage ::slotted(*) {\n grid-area: auto;\n }\n }\n `,\n ];\n\n /** @ignore */\n connectedCallback(): void {\n super.connectedCallback();\n try {\n this.reduced = window.matchMedia('(prefers-reduced-motion: reduce)').matches;\n } catch {\n this.reduced = false;\n }\n window.addEventListener('scroll', this.onScroll, { passive: true, capture: true });\n window.addEventListener('resize', this.onScroll);\n this.schedule();\n }\n\n /** @ignore */\n disconnectedCallback(): void {\n super.disconnectedCallback();\n window.removeEventListener('scroll', this.onScroll, { capture: true });\n window.removeEventListener('resize', this.onScroll);\n if (this.frame) cancelAnimationFrame(this.frame);\n this.frame = 0;\n }\n\n /** @ignore */\n protected updated(changed: PropertyValues<this>): void {\n if (changed.has('length')) this.style.setProperty('--impakt-scene-length', String(this.length));\n if (changed.has('progress')) this.publish();\n if (changed.has('drive')) {\n this.started = 0;\n this.schedule();\n }\n }\n\n /**\n * Move to a progress. With `ms`, ease there; without, jump. A scrubber seeks\n * a scene to a named stop this way.\n */\n seek(to: number, ms = 0): void {\n if (ms <= 0 || this.reduced) {\n this.progress = clamp(to);\n return;\n }\n this.seekFrom = this.progress;\n this.seekTo = clamp(to);\n this.seekStart = 0;\n this.seekMs = ms;\n this.schedule();\n }\n\n private onScroll = () => {\n if (this.drive === 'view' || this.drive === 'page') this.schedule();\n };\n\n private schedule(): void {\n if (!this.frame && typeof requestAnimationFrame === 'function') this.frame = requestAnimationFrame(this.tick);\n }\n\n private tick = (now: number) => {\n this.frame = 0;\n if (this.seekMs) {\n if (!this.seekStart) this.seekStart = now;\n const p = Math.min(1, (now - this.seekStart) / this.seekMs);\n // ease-in-out, so a jump between stops reads as travel rather than a cut\n const e = p < 0.5 ? 4 * p * p * p : 1 - Math.pow(-2 * p + 2, 3) / 2;\n this.progress = this.seekFrom + (this.seekTo - this.seekFrom) * e;\n if (p < 1) this.schedule();\n else this.seekMs = 0;\n return;\n }\n if (this.drive === 'view') {\n const r = this.getBoundingClientRect();\n const vh = window.innerHeight || 1;\n this.progress = clamp(-r.top / Math.max(1, r.height - vh));\n } else if (this.drive === 'page') {\n const doc = document.documentElement;\n this.progress = clamp(window.scrollY / Math.max(1, doc.scrollHeight - (window.innerHeight || 0)));\n } else if (this.drive === 'loop' && !this.paused && !this.reduced) {\n if (!this.started) this.started = now - this.progress * this.duration * 1000;\n this.progress = ((now - this.started) / (this.duration * 1000)) % 1;\n this.schedule();\n }\n };\n\n private publish(): void {\n this.style.setProperty('--impakt-scene-progress', this.progress.toFixed(4));\n this.dispatchEvent(new CustomEvent('impakt-scene-progress', { detail: { progress: this.progress }, bubbles: true, composed: true }));\n }\n\n private setPaused(paused: boolean): void {\n if (this.paused === paused) return;\n this.paused = paused;\n this.started = 0;\n this.schedule();\n this.requestUpdate();\n }\n\n private togglePause = () => this.setPaused(!this.paused);\n\n /** Stop a loop where it is, as its pause button does. An editor scrubbing the scene calls it. */\n pause(): void {\n this.setPaused(true);\n }\n\n render(): TemplateResult {\n const loop = this.drive === 'loop';\n const over = this.controls === 'over' && !this.reduced;\n const controls = html`<div class=\"controls\" part=\"controls\">\n <slot name=\"controls\"></slot>\n ${\n loop && !this.reduced\n ? html`<button class=\"pause\" type=\"button\" aria-pressed=${this.paused ? 'true' : 'false'} @click=${this.togglePause}>\n ${this.paused ? say('Play {name}', { name: this.label }) : say('Pause {name}', { name: this.label })}\n </button>`\n : nothing\n }\n </div>`;\n const stage = html`<div class=\"stage\" part=\"stage\"><slot name=\"stage\"></slot>${over ? controls : nothing}</div>`;\n return html`\n <div class=\"frame\" part=\"frame\" role=\"region\" aria-label=${this.label}>\n ${\n this.layout === 'split'\n ? html`<div class=\"content\" part=\"content\"><slot></slot></div>${stage}`\n : html`${stage}<div class=\"content\" part=\"content\"><slot></slot></div>`\n }\n </div>\n ${over ? nothing : controls}\n `;\n }\n}\n\ncustomElements.define('impakt-scene', ImpaktScene);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'impakt-scene': ImpaktScene;\n }\n}\n", "import { html, css, type TemplateResult } from 'lit';\nimport { say, ImpaktElement, visuallyHidden, fontSize, fontWeight, space, t, token } from '@atomic-ui/ui';\nimport type { ImpaktScene } from './scene';\n\nexport interface ScrubberStop {\n /** Where the stop sits on the scene's progress, from 0 to 1. */\n at: number;\n label: string;\n /** A short code beside it in the graph look, such as a commit hash. */\n meta?: string;\n /** A line under the code in the graph look, such as a commit message. */\n note?: string;\n /**\n * The colour of the line up to this stop, in the graph look: a named tone,\n * or 1 to 5 for the brand's chart colours, as a project's phases are drawn.\n */\n tone?: 'brand' | 'accent' | 'info' | 'success' | 'warning' | 'danger' | 1 | 2 | 3 | 4 | 5;\n}\n\nconst TONES = {\n brand: 'var(--impakt-color-brand-default, #1f4ed8)',\n accent: 'var(--impakt-color-accent-default, #c8a15a)',\n info: 'var(--impakt-color-status-info-default, #1f4ed8)',\n success: 'var(--impakt-color-status-success-default, #047857)',\n warning: 'var(--impakt-color-status-warning-default, #b45309)',\n danger: 'var(--impakt-color-status-danger-default, #c8102e)',\n} as const;\n\n/**\n * Drives the scene it sits in, by hand.\n *\n * Place it in an `impakt-scene`'s `controls` slot and set that scene's `drive`\n * to `scrubber`. Dragging moves through the scene; a named stop seeks to it\n * with an eased move rather than a cut, which is what makes the Commit-style\n * \"time travel\" read as travel.\n *\n * **It is a native range input.** A slider built from divs has to recreate\n * arrow keys, Page Up and Down, Home and End, the value announcement and touch\n * handling, and every one of those is a place to get it wrong. The input\n * already does all of it. The stops are buttons beside it, so a keyboard or\n * switch user reaches each named moment in one action instead of nudging a\n * thumb to find it (2.5.7, dragging movements).\n *\n * @category action\n * @icon adjustments-horizontal\n */\nexport class ImpaktScrubber extends ImpaktElement {\n static properties = {\n label: { type: String },\n stops: { type: Array },\n look: { type: String, reflect: true },\n hint: { type: String },\n value: { type: Number, state: true },\n };\n\n /** The slider's accessible name. */\n declare label: string;\n declare stops: ScrubberStop[];\n /**\n * `buttons` lists the stops as buttons under the slider. `graph` draws them\n * as commits on a line that fills in each stop's colour as it is dragged,\n * with the current one's code and note beside it.\n */\n declare look: 'buttons' | 'graph';\n /** A word of help in the graph look, such as \"drag to time-travel\". */\n declare hint: string;\n declare value: number;\n\n private scene: ImpaktScene | null = null;\n\n constructor() {\n super();\n this.label = 'Scene progress';\n this.stops = [];\n this.look = 'buttons';\n this.hint = '';\n this.value = 0;\n }\n\n static styles = [\n ...ImpaktElement.styles,\n css`\n :host {\n display: block;\n width: 100%;\n max-width: 48rem;\n margin-inline: auto;\n }\n .wrap {\n display: grid;\n gap: ${space(2)};\n padding: ${space(3)} ${space(4)};\n border-radius: ${token('radius.xl', '16px')};\n background: ${t.surfaceCard};\n box-shadow: ${token('shadow.lg', '0 10px 15px -3px rgba(0,0,0,.1)')};\n border: 1px solid ${t.border};\n }\n input {\n width: 100%;\n min-height: ${token('target.min', '24px')};\n accent-color: ${t.brand};\n margin: 0;\n }\n .stops {\n position: relative;\n display: flex;\n flex-wrap: wrap;\n gap: ${space(2)};\n list-style: none;\n margin: 0;\n padding: 0;\n }\n button {\n min-height: ${token('target.min', '24px')};\n padding: ${space(1)} ${space(3)};\n border-radius: ${token('radius.full', '9999px')};\n border: 1px solid ${t.border};\n background: transparent;\n color: ${t.textMuted};\n font-size: ${fontSize('xs')};\n font-weight: ${fontWeight('medium')};\n cursor: pointer;\n }\n button[aria-current='true'] {\n color: ${t.text};\n border-color: ${t.text};\n }\n .sr-only {\n ${visuallyHidden}\n }\n /* The graph look: the code of where you are, the line of stops, where you are. */\n :host([look='graph']) { max-width: none; }\n .graph { display: grid; grid-template-columns: minmax(8rem, auto) minmax(0, 1fr) auto; gap: ${space(6)}; align-items: center; padding: ${space(4)} ${space(6)}; border-radius: ${token('radius.xl', '16px')}; background: ${t.surfaceCard}; box-shadow: ${token('shadow.lg', '0 10px 15px -3px rgba(0,0,0,.1)')}; border: 1px solid ${t.border}; }\n .mono { font-family: ${t.fontMono}; font-size: ${fontSize('xs')}; letter-spacing: 0.04em; }\n .head { display: grid; gap: 2px; }\n .head .k { color: ${t.textMuted}; text-transform: uppercase; }\n .head .code { font-size: ${fontSize('md')}; color: ${t.text}; }\n .head .note { color: ${t.textMuted}; }\n .line { position: relative; block-size: 48px; }\n .track, .fill { position: absolute; inset-inline: 0; inset-block-start: 14px; block-size: 3px; border-radius: 3px; background: ${t.border}; opacity: 0.5; }\n .fill { opacity: 1; background: none; display: flex; overflow: hidden; }\n .fill span { block-size: 100%; }\n .dot { position: absolute; inset-block-start: 15px; inline-size: 14px; block-size: 14px; translate: -50% -50%; border-radius: 50%; border: 2px solid var(--c); background: ${t.surfaceCard}; padding: 0; min-height: 0; cursor: pointer; }\n .dot[data-passed] { background: var(--c); }\n .dot[aria-current='true'] { inline-size: 24px; block-size: 24px; box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 25%, transparent); }\n .dot-label { position: absolute; inset-block-start: 30px; translate: -50% 0; white-space: nowrap; color: ${t.textMuted}; text-transform: uppercase; pointer-events: none; }\n .dot-label[data-current] { color: ${t.text}; font-weight: ${fontWeight('bold')}; }\n .line input { position: absolute; inset: 0 0 auto; block-size: 30px; opacity: 0; cursor: grab; }\n .line input:focus-visible { opacity: 1; }\n .where { display: grid; gap: ${space(2)}; justify-items: end; }\n .chip { display: inline-flex; align-items: center; gap: ${space(2)}; padding: ${space(1)} ${space(3)}; border-radius: ${token('radius.full', '9999px')}; border: 1px solid ${t.border}; color: ${t.text}; text-transform: uppercase; }\n .chip::before { content: ''; inline-size: 8px; block-size: 8px; border-radius: 50%; background: var(--c); }\n .hint { color: ${t.textMuted}; text-transform: uppercase; }\n /* Muted by colour, not opacity, so the code keeps its contrast (1.4.3). */\n .chip .meta { color: ${t.textMuted}; }\n @media (max-width: 48rem) {\n .graph { grid-template-columns: minmax(0, 1fr); }\n .where { justify-items: start; }\n .dot-label:not([data-current]) { display: none; }\n }\n button:focus-visible,\n input:focus-visible {\n outline: none;\n box-shadow: ${token('focus.ring.shadow', '0 0 0 2px #fff, 0 0 0 4px #1a1a1a')};\n }\n `,\n ];\n\n /** @ignore */\n connectedCallback(): void {\n super.connectedCallback();\n this.scene = this.closest('impakt-scene');\n this.scene?.addEventListener('impakt-scene-progress', this.onProgress);\n if (this.scene) this.value = this.scene.progress;\n }\n\n /** @ignore */\n disconnectedCallback(): void {\n super.disconnectedCallback();\n this.scene?.removeEventListener('impakt-scene-progress', this.onProgress);\n this.scene = null;\n }\n\n private onProgress = (e: Event) => {\n this.value = (e as CustomEvent<{ progress: number }>).detail.progress;\n };\n\n private onInput = (e: Event) => {\n const v = Number((e.target as HTMLInputElement).value) / 1000;\n this.value = v;\n this.scene?.seek(v);\n };\n\n private goTo(stop: ScrubberStop) {\n this.scene?.seek(stop.at, 600);\n }\n\n /** The stop nearest the current position, which the stop list marks as current. */\n private nearest(): number {\n let best = -1;\n let gap = Infinity;\n this.stops.forEach((s, i) => {\n const d = Math.abs(s.at - this.value);\n if (d < gap) {\n gap = d;\n best = i;\n }\n });\n return best;\n }\n\n private renderGraph(nearestIndex: number, valueText: string): TemplateResult {\n let current = nearestIndex;\n const stops = [...(this.stops ?? [])].sort((a, b) => a.at - b.at);\n // Where you are, among the stops in the order they are drawn.\n current = stops.indexOf(this.stops[current]!);\n const colour = (s: ScrubberStop | undefined) => {\n const tone = s?.tone ?? 'brand';\n return typeof tone === 'number' ? `var(--impakt-color-chart-${tone}, ${TONES.brand})` : (TONES[tone] ?? TONES.brand);\n };\n const now = stops[current] ?? stops[0];\n // The line fills in each stop's colour, from the stop before it to it, as far as the playhead.\n const segments = stops.map((s, i) => {\n const from = i === 0 ? 0 : stops[i - 1]!.at;\n const to = Math.min(s.at, this.value);\n return { width: Math.round(Math.max(0, to - from) * 10000) / 100, c: colour(s) };\n });\n return html`<div class=\"graph\" part=\"wrap\">\n <div class=\"head mono\" aria-hidden=\"true\">\n <span class=\"k\">HEAD</span>\n <span class=\"code\">${now?.meta ?? now?.label ?? ''}</span>\n ${now?.note ? html`<span class=\"note\">${now.note}</span>` : null}\n </div>\n <div class=\"line\">\n <div class=\"track\"></div>\n <div class=\"fill\" aria-hidden=\"true\">${segments.map((g) => html`<span style=${`width:${g.width}%;background:${g.c}`}></span>`)}</div>\n ${stops.map(\n (s, i) => html`\n <button type=\"button\" class=\"dot\" style=${`left:${s.at * 100}%;--c:${colour(s)}`} ?data-passed=${s.at <= this.value + 0.0001} aria-current=${i === current ? 'true' : 'false'} @click=${() => this.goTo(s)}>\n <span class=\"sr-only\">${say('Go to {name}', { name: s.label })}</span>\n </button>\n <span class=\"dot-label mono\" style=${`left:${s.at * 100}%`} ?data-current=${i === current} aria-hidden=\"true\">${s.label}</span>`,\n )}\n <input type=\"range\" min=\"0\" max=\"1000\" step=\"1\" .value=${String(Math.round(this.value * 1000))} aria-label=${this.label} aria-valuetext=${valueText} @input=${this.onInput} />\n </div>\n <div class=\"where\" aria-hidden=\"true\">\n ${now ? html`<span class=\"chip mono\" style=${`--c:${colour(now)}`}>${now.label}${now.meta ? html` <span class=\"meta\">${now.meta}</span>` : null}</span>` : null}\n ${this.hint ? html`<span class=\"hint mono\">${this.hint}</span>` : null}\n </div>\n </div>`;\n }\n\n render(): TemplateResult {\n const current = this.nearest();\n const valueText = current >= 0 ? this.stops[current].label : `${Math.round(this.value * 100)}%`;\n if (this.look === 'graph') return this.renderGraph(current, valueText);\n return html`\n <div class=\"wrap\" part=\"wrap\">\n <input\n type=\"range\"\n min=\"0\"\n max=\"1000\"\n step=\"1\"\n .value=${String(Math.round(this.value * 1000))}\n aria-label=${this.label}\n aria-valuetext=${valueText}\n @input=${this.onInput}\n />\n ${\n this.stops.length\n ? html`<ul class=\"stops\" part=\"stops\">\n ${this.stops.map(\n (s, i) => html`<li>\n <button type=\"button\" aria-current=${i === current ? 'true' : 'false'} @click=${() => this.goTo(s)}>\n <span aria-hidden=\"true\">${s.label}</span><span class=\"sr-only\">${say('Go to {name}', { name: s.label })}</span>\n </button>\n </li>`,\n )}\n </ul>`\n : null\n }\n </div>\n `;\n }\n}\n\ncustomElements.define('impakt-scrubber', ImpaktScrubber);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'impakt-scrubber': ImpaktScrubber;\n }\n}\n", "/**\n * Blocks that tell how software was made, in the language software is made\n * in: a release with what it added and removed, services as branches that\n * merge into one product, checks that passed, and a project drawn as a commit\n * graph. They came from building the Impakt site's Commit design in Strata, and\n * they are written for any studio, agency or product team that wants to show\n * its work this way.\n *\n * Every colour is a brand token. A lane's colour is a tone (brand, accent or\n * a status colour), never a hex value, so a partner's brand restyles them.\n */\nimport { css, html, nothing, svg, type TemplateResult } from 'lit';\nimport {\n say,\n ImpaktElement,\n focusRing,\n visuallyHidden,\n fontSize,\n fontWeight,\n space,\n spaceAround,\n t,\n type,\n iconSvg,\n toneOf,\n TONE,\n type Tone,\n} from '@atomic-ui/ui';\nimport './property';\n\n// The tones (`Tone`, `TONE`, `toneOf`) are shared with `impakt-chip`, so they live in @atomic-ui/ui.\n\n/**\n * Marks an element `shown` once a quarter of it is on screen, so it can draw\n * itself in (the Commit motion spec's branch draw, graph draw and checks run).\n * Where nothing can watch, it is shown at once; what draws in is decided by\n * CSS under `prefers-reduced-motion: no-preference`, so reduced motion never waits.\n */\nfunction revealOnView(el: HTMLElement, onShow?: () => void): () => void {\n const show = () => {\n el.setAttribute('shown', '');\n onShow?.();\n };\n if (typeof IntersectionObserver !== 'function') {\n show();\n return () => undefined;\n }\n const io = new IntersectionObserver(\n (entries) => {\n if (entries.some((e) => e.isIntersecting)) {\n show();\n io.disconnect();\n }\n },\n { threshold: 0.25 },\n );\n io.observe(el);\n return () => io.disconnect();\n}\nconst reduced = () => typeof matchMedia === 'function' && matchMedia('(prefers-reduced-motion: reduce)').matches;\n\n/** Code-like labels: a branch name, a version, a hash. The brand has no code face, so the system's is used. */\nconst mono = css`.mono { font-family: ${t.fontMono}; font-size: ${fontSize('xs')}; letter-spacing: 0.04em; }`;\n\nconst heading = (level: number, text: string | TemplateResult, cls: string): TemplateResult => {\n const l = Math.min(Math.max(level || 3, 2), 6);\n switch (l) {\n case 2:\n return html`<h2 class=${cls}>${text}</h2>`;\n case 4:\n return html`<h4 class=${cls}>${text}</h4>`;\n case 5:\n return html`<h5 class=${cls}>${text}</h5>`;\n case 6:\n return html`<h6 class=${cls}>${text}</h6>`;\n default:\n return html`<h3 class=${cls}>${text}</h3>`;\n }\n};\n\nconst words = css`\n .h { margin: 0; color: var(--impakt-heading, ${t.textHeading}); font-family: ${t.fontHeading}; font-weight: ${fontWeight('bold')}; letter-spacing: ${t.trackingTight}; text-wrap: balance; }\n .body { margin: 0; color: inherit; opacity: 0.8; text-wrap: pretty; }\n .meta { margin: 0; color: inherit; opacity: 0.72; text-transform: uppercase; }\n .sr-only { ${visuallyHidden} }\n`;\n\n// \u2500\u2500 Release card \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\n/** One line of what a release changed. */\nexport interface DiffLine {\n id?: string;\n /** Added, taken away, or kept as it was. */\n change: 'added' | 'removed' | 'same';\n text: string;\n}\n\n/**\n * A piece of work told as a release: what it looked like when it started and\n * what shipped, a version line, and a short diff of what it added and took\n * away.\n *\n * With both pictures it is a before-and-after comparison a visitor drags; with\n * one it is a picture. The diff is a list, each line saying \"Added\" or\n * \"Removed\" for a screen reader, since the + and \u2212 are only drawn.\n *\n * @category content\n * @icon git-commit\n */\nexport class ImpaktReleaseCard extends ImpaktElement {\n static properties = {\n label: { type: String },\n heading: { type: String },\n text: { type: String },\n beforeSrc: { type: String, attribute: 'before-src' },\n beforeAlt: { type: String, attribute: 'before-alt' },\n afterSrc: { type: String, attribute: 'after-src' },\n afterAlt: { type: String, attribute: 'after-alt' },\n items: { type: Array },\n href: { type: String },\n headingLevel: { type: Number, attribute: 'heading-level' },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n /** A line above the heading, such as \"v1.0 \u00B7 Legal tech \u00B7 Property\". */\n declare label: string;\n declare heading: string;\n declare text: string;\n /** What it started as: a sketch or a wireframe. */\n declare beforeSrc: string;\n declare beforeAlt: string;\n /** What shipped. */\n declare afterSrc: string;\n declare afterAlt: string;\n /** What the release added, took away or kept. */\n declare items: DiffLine[];\n /** Where the heading links to, such as the case study. */\n declare href: string;\n declare headingLevel: 2 | 3 | 4;\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n constructor() {\n super();\n this.label = '';\n this.heading = '';\n this.text = '';\n this.beforeSrc = '';\n this.beforeAlt = '';\n this.afterSrc = '';\n this.afterAlt = '';\n this.items = [];\n this.href = '';\n this.headingLevel = 3;\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n spaceAround,\n mono,\n words,\n css`\n :host { display: block; }\n article { display: flex; flex-direction: column; gap: ${space(3)}; }\n .media { border-radius: ${t.radiusXl}; overflow: clip; background: ${t.surfaceInset}; }\n .media img { display: block; inline-size: 100%; aspect-ratio: 5 / 3; object-fit: cover; }\n impakt-before-after { display: block; }\n .h { font-size: ${fontSize('3xl')}; }\n .h a { color: inherit; text-decoration: none; }\n .h a:hover { text-decoration: underline; text-underline-offset: 0.15em; }\n .h a:focus-visible { outline: none; box-shadow: ${t.focusShadow}; border-radius: ${t.radiusSm}; }\n ul { list-style: none; margin: ${space(1)} 0 0; padding: 0; display: grid; gap: ${space(1)}; }\n li { display: grid; grid-template-columns: 1.25em minmax(0, 1fr); gap: ${space(2)}; padding: ${space(1)} ${space(3)}; border-radius: ${t.radius}; }\n li[data-change='added'] { background: ${t.successSubtle}; color: ${t.successText}; }\n li[data-change='removed'] { background: ${t.dangerSubtle}; color: ${t.dangerText}; }\n li[data-change='same'] { color: ${t.textMuted}; }\n .sign { font-weight: ${fontWeight('bold')}; }\n `,\n ];\n\n private raf = 0;\n\n /** Sweep the seam, as Commit's release wipe does: off the screenshot on hover, back on leaving. */\n private wipe(to: number): void {\n const ba = this.renderRoot.querySelector('impakt-before-after') as (HTMLElement & { position: number }) | null;\n if (!ba) return;\n cancelAnimationFrame(this.raf);\n if (reduced()) {\n ba.position = to;\n return;\n }\n const from = ba.position ?? SEAM;\n const start = performance.now();\n // cubic-bezier(.65, 0, .35, 1), near enough: an ease-in-out.\n const ease = (k: number) => (k < 0.5 ? 4 * k * k * k : 1 - Math.pow(-2 * k + 2, 3) / 2);\n const step = (now: number) => {\n const k = Math.min(1, (now - start) / 450);\n ba.position = from + (to - from) * ease(k);\n if (k < 1) this.raf = requestAnimationFrame(step);\n };\n this.raf = requestAnimationFrame(step);\n }\n\n disconnectedCallback(): void {\n super.disconnectedCallback();\n cancelAnimationFrame(this.raf);\n }\n\n render(): TemplateResult {\n const both = this.beforeSrc && this.afterSrc;\n const title = this.href ? html`<a href=${this.href}>${this.heading}</a>` : this.heading;\n const SIGN = { added: '+', removed: '\u2212', same: ' ' } as const;\n const SAID = { added: say('Added'), removed: say('Removed'), same: say('Kept') } as const;\n return html`<article part=\"card\">\n ${\n both\n ? html`<div class=\"media\" @pointerenter=${(e: PointerEvent) => e.pointerType === 'mouse' && this.wipe(0)} @pointerleave=${(e: PointerEvent) => e.pointerType === 'mouse' && this.wipe(SEAM)}><impakt-before-after .position=${SEAM} .beforeSrc=${this.beforeSrc} .beforeAlt=${this.beforeAlt} .afterSrc=${this.afterSrc} .afterAlt=${this.afterAlt} .beforeLabel=${say('Before')} .afterLabel=${say('Shipped')} .label=${say('Compare {name} before and after', { name: this.heading })}></impakt-before-after></div>`\n : this.afterSrc || this.beforeSrc\n ? html`<div class=\"media\"><img src=${this.afterSrc || this.beforeSrc} alt=${this.afterSrc ? this.afterAlt : this.beforeAlt} loading=\"lazy\" /></div>`\n : nothing\n }\n ${this.label ? html`<p class=\"meta mono\">${this.label}</p>` : nothing}\n ${this.heading ? headingWith(this.headingLevel, title) : nothing}\n ${this.text ? html`<p class=\"body\">${this.text}</p>` : nothing}\n ${(this.items ?? []).length ? html`<ul class=\"mono\" part=\"diff\">${this.items.map((line) => html`<li data-change=${line.change}><span class=\"sign\" aria-hidden=\"true\">${SIGN[line.change] ?? ' '}</span><span><span class=\"sr-only\">${SAID[line.change] ?? ''}: </span>${line.text}</span></li>`)}</ul>` : nothing}\n </article>`;\n }\n}\n\n// \u2500\u2500 Release list \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\n/**\n * One release in a list: a release card's props. `title` is read when there is\n * no `heading`, because that is what a collection's entry carries (ADR 0028).\n */\nexport interface ReleaseItem {\n label?: string;\n heading?: string;\n title?: string;\n text?: string;\n beforeSrc?: string;\n beforeAlt?: string;\n afterSrc?: string;\n afterAlt?: string;\n items?: DiffLine[];\n href?: string;\n}\n\n/**\n * Releases side by side, two to a row: a changelog of case studies.\n *\n * Bind `items` to a collection's entries and the list follows them: a new case\n * study appears here when it is published. The release for the page being\n * read is left out, so a case study's \"more work\" does not offer itself.\n *\n * @category content\n * @icon git-commit\n */\nexport class ImpaktReleaseList extends ImpaktElement {\n static properties = {\n items: { type: Array },\n columns: { type: String, reflect: true },\n headingLevel: { type: Number, attribute: 'heading-level' },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n declare items: ReleaseItem[];\n /** Releases in a row on a wide screen. One on a phone. */\n declare columns: 'one' | 'two' | 'three';\n declare headingLevel: 2 | 3 | 4;\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n constructor() {\n super();\n this.items = [];\n this.columns = 'two';\n this.headingLevel = 3;\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n spaceAround,\n css`\n :host { display: block; container-type: inline-size; }\n ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: ${space(12)} ${space(10)}; }\n :host([columns='one']) ul { grid-template-columns: minmax(0, 1fr); }\n :host([columns='three']) ul { grid-template-columns: repeat(3, minmax(0, 1fr)); }\n @container (max-width: 44rem) { ul, :host([columns='three']) ul { grid-template-columns: minmax(0, 1fr); } }\n `,\n ];\n\n render(): TemplateResult {\n const here = typeof location === 'undefined' ? '' : location.pathname.replace(/\\/$/, '');\n const shown = (this.items ?? []).filter((item) => !item.href || item.href.replace(/\\/$/, '') !== here);\n return html`<ul part=\"list\">${shown.map((item) => {\n const heading = item.heading ?? item.title ?? '';\n return html`<li><impakt-release-card\n .label=${item.label ?? ''} .heading=${heading} .text=${item.text ?? ''} .href=${item.href ?? ''}\n .beforeSrc=${item.beforeSrc ?? ''} .beforeAlt=${item.beforeAlt || say('{name} as a wireframe', { name: heading })}\n .afterSrc=${item.afterSrc ?? ''} .afterAlt=${item.afterAlt || say('{name} as it shipped', { name: heading })}\n .items=${item.items ?? []} .headingLevel=${this.headingLevel}></impakt-release-card></li>`;\n })}</ul>`;\n }\n}\n\n/** Where the seam rests: the wireframe covers the left of the screenshot until it is pointed at. */\nconst SEAM = 42;\n\n/** A heading holding a template, such as a link. */\nfunction headingWith(level: number, content: TemplateResult | string): TemplateResult {\n const l = Math.min(Math.max(level || 3, 2), 6);\n if (l === 2) return html`<h2 class=\"h\">${content}</h2>`;\n if (l === 4) return html`<h4 class=\"h\">${content}</h4>`;\n if (l === 5) return html`<h5 class=\"h\">${content}</h5>`;\n if (l === 6) return html`<h6 class=\"h\">${content}</h6>`;\n return html`<h3 class=\"h\">${content}</h3>`;\n}\n\n// \u2500\u2500 Branch list \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\n/** One branch: a service, a team, a line of work. */\nexport interface Branch {\n id?: string;\n /** A short code-like name, such as \"feature/mobile-apps\". */\n path?: string;\n heading: string;\n text?: string;\n /** A few words below the text, such as the tools it uses. */\n tags?: string[];\n tone?: Tone;\n /** Where the heading links to, such as the service's own page. */\n href?: string;\n}\n\n/**\n * Several lines of work that come together into one: each item branches off a\n * main line on the left and merges back into it, and the line ends in what\n * they make together.\n *\n * The lines are drawn; the items are a list with headings, so a screen reader\n * reads the work, not the drawing.\n *\n * @category content\n * @icon git-merge\n */\nexport class ImpaktBranchList extends ImpaktElement {\n static properties = {\n items: { type: Array },\n trunk: { type: String },\n headingLevel: { type: Number, attribute: 'heading-level' },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n declare items: Branch[];\n /** What the main line ends in, such as \"main \u2190 one team owns the result\". */\n declare trunk: string;\n declare headingLevel: 2 | 3 | 4;\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n constructor() {\n super();\n this.items = [];\n this.trunk = '';\n this.headingLevel = 3;\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n spaceAround,\n mono,\n words,\n css`\n :host { display: block; container-type: inline-size; --trunk: color-mix(in srgb, currentColor 70%, transparent); }\n ul { list-style: none; margin: 0; padding: 0; position: relative; }\n ul::before { content: ''; position: absolute; inset-block: 0; inset-inline-start: 11px; inline-size: 3px; border-radius: 3px; background: var(--trunk); }\n li { position: relative; display: grid; grid-template-columns: 96px minmax(0, 1fr); padding-block: ${space(6)}; }\n .graph { position: relative; }\n .graph svg { position: absolute; inset-block-start: -${space(6)}; inset-inline-start: 0; inline-size: 96px; block-size: calc(100% + ${space(12)}); overflow: visible; }\n .row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: ${space(4)} ${space(10)}; align-items: start; }\n .path { margin: 0 0 ${space(2)}; opacity: 0.72; }\n .h { font-size: ${fontSize('3xl')}; line-height: 1.05; }\n .h a { color: inherit; text-decoration: none; }\n .h a:hover { text-decoration: underline; text-underline-offset: 0.15em; }\n .h a:focus-visible { outline: none; box-shadow: ${t.focusShadow}; border-radius: ${t.radiusSm}; }\n .detail { display: flex; flex-direction: column; gap: ${space(3)}; padding-block-start: ${space(1)}; }\n .tags { margin: 0; opacity: 0.7; text-transform: uppercase; }\n .end { position: relative; display: flex; align-items: center; gap: ${space(3)}; padding-block-start: ${space(4)}; }\n .end::before { content: ''; inline-size: 16px; block-size: 16px; margin-inline-start: 5px; border-radius: 50%; background: currentColor; }\n @container (max-width: 44rem) {\n li { grid-template-columns: 56px minmax(0, 1fr); }\n .graph svg { inline-size: 56px; }\n .row { grid-template-columns: minmax(0, 1fr); }\n .h { font-size: ${fontSize('2xl')}; }\n }\n /* Branch draw: each branch opens down from the trunk, 120 ms after the one above, then its dot pops. */\n @media (prefers-reduced-motion: no-preference) {\n .graph svg { clip-path: inset(0 0 100% 0); transition: clip-path 700ms cubic-bezier(.25, 1, .5, 1) calc(var(--i, 0) * 120ms); }\n .graph circle { transform-box: fill-box; transform-origin: center; transform: scale(0); transition: transform 200ms ease-out calc(var(--i, 0) * 120ms + 500ms); }\n :host([shown]) .graph svg { clip-path: inset(0); }\n :host([shown]) .graph circle { transform: scale(1); }\n }\n `,\n ];\n\n private unwatch: () => void = () => undefined;\n connectedCallback(): void {\n super.connectedCallback();\n this.unwatch = revealOnView(this);\n }\n disconnectedCallback(): void {\n super.disconnectedCallback();\n this.unwatch();\n }\n\n render(): TemplateResult {\n // Each branch leaves the trunk, swings out to its dot level with the\n // heading, and returns: drawn in a 96-wide box, scaled down on phones.\n const branch = (colour: string) => svg`<svg viewBox=\"0 0 96 200\" preserveAspectRatio=\"none\" aria-hidden=\"true\" focusable=\"false\">\n <path d=\"M12 0 C12 40 60 30 60 70 L60 120 C60 160 12 160 12 200\" fill=\"none\" stroke=${colour} stroke-width=\"3\" vector-effect=\"non-scaling-stroke\" />\n <circle cx=\"60\" cy=\"86\" r=\"8\" fill=${colour} />\n </svg>`;\n return html`<ul part=\"list\">${(this.items ?? []).map(\n (item, i) => html`<li part=\"item\" style=${`--i:${i}`}>\n <div class=\"graph\">${branch(toneOf(item.tone, i))}</div>\n <div>\n ${item.path ? html`<p class=\"path mono\">${item.path}</p>` : nothing}\n <div class=\"row\">\n ${heading(this.headingLevel, item.href ? html`<a href=${item.href}>${item.heading}</a>` : item.heading, 'h')}\n <div class=\"detail\">\n ${item.text ? html`<p class=\"body\">${item.text}</p>` : nothing}\n ${item.tags?.length ? html`<p class=\"tags mono\">${item.tags.join(' \u00B7 ')}</p>` : nothing}\n </div>\n </div>\n </div>\n </li>`,\n )}</ul>\n ${this.trunk ? html`<p class=\"end mono\" part=\"trunk\">${this.trunk}</p>` : nothing}`;\n }\n}\n\n// \u2500\u2500 Check list \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\n/** One check that passed: a figure and what it measures. */\nexport interface CheckItem {\n id?: string;\n figure: string;\n label: string;\n /** A word at the end of the row, such as \"passed\". */\n status?: string;\n}\n\n/**\n * Proof as a list of passing checks: a large figure, what it measures, and its\n * status, each row ticked. It reads its colours from the band it sits on, so\n * it works on a dark section as well as a light one.\n *\n * @category content\n * @icon list-check\n */\nexport class ImpaktCheckList extends ImpaktElement {\n static properties = {\n items: { type: Array },\n summary: { type: String },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n declare items: CheckItem[];\n /** A line above the list, such as \"All 4 checks passed\". */\n declare summary: string;\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n constructor() {\n super();\n this.items = [];\n this.summary = '';\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n spaceAround,\n mono,\n words,\n css`\n :host { display: block; container-type: inline-size; }\n .summary { display: inline-flex; align-items: center; gap: ${space(2)}; margin: 0 0 ${space(6)}; padding: ${space(1)} ${space(3)}; border-radius: ${t.radiusXl}; border: 1px solid color-mix(in srgb, currentColor 25%, transparent); }\n .summary::before { content: ''; inline-size: 8px; block-size: 8px; border-radius: 50%; background: ${t.success}; }\n /* The rows share one grid, so the figure column fits the widest figure and every row lines up. */\n ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 32px max-content minmax(0, 1fr) auto; column-gap: ${space(6)}; }\n li { grid-column: 1 / -1; display: grid; grid-template-columns: subgrid; align-items: center; padding-block: ${space(5)}; border-block-end: 1px solid color-mix(in srgb, currentColor 18%, transparent); }\n /* Checks run: each tick pops in, 150 ms after the one above. */\n @media (prefers-reduced-motion: no-preference) {\n .tick { transform: scale(0); transition: transform 600ms cubic-bezier(.34, 1.56, .64, 1) calc(var(--i, 0) * 150ms); }\n :host([shown]) .tick { transform: scale(1); }\n }\n .sr-only { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }\n /* A passed check is a filled disc with a tick cut out of it, as a CI run shows one. */\n .tick { display: inline-flex; align-items: center; justify-content: center; inline-size: 26px; block-size: 26px; border-radius: 50%; background: ${t.success}; color: var(--impakt-color-status-success-on, #fff); }\n .figure { margin: 0; font-family: ${t.fontHeading}; font-weight: ${fontWeight('bold')}; font-size: ${fontSize('5xl')}; line-height: 1; letter-spacing: ${t.trackingTight}; white-space: nowrap; }\n .label { margin: 0; ${type('xl')} }\n .status { margin: 0; opacity: 0.72; }\n @container (max-width: 40rem) {\n ul { grid-template-columns: 28px minmax(0, 1fr); }\n li { row-gap: ${space(1)}; }\n .label, .status { grid-column: 2; }\n .figure { font-size: ${fontSize('4xl')}; }\n }\n `,\n ];\n\n private unwatch: () => void = () => undefined;\n /** How far each figure has counted up, from 0 to 1, while the checks run. */\n private counted: number[] | null = null;\n connectedCallback(): void {\n super.connectedCallback();\n this.unwatch = revealOnView(this, () => this.run());\n }\n disconnectedCallback(): void {\n super.disconnectedCallback();\n this.unwatch();\n }\n\n /** Checks run: each figure counts up over 1200 ms, 150 ms after the one above. */\n private run(): void {\n if (reduced()) return;\n const items = this.items ?? [];\n const start = performance.now();\n const step = (now: number) => {\n this.counted = items.map((_, i) => Math.min(1, Math.max(0, (now - start - i * 150) / 1200)));\n this.requestUpdate();\n if (this.counted.some((k) => k < 1)) requestAnimationFrame(step);\n else this.counted = null;\n };\n requestAnimationFrame(step);\n }\n\n render(): TemplateResult {\n // While counting, the drawn figure is hidden from screen readers and the final one is read instead.\n const shownFigure = (figure: string, i: number) => {\n const k = this.counted?.[i];\n const m = /^(\\d+)(.*)$/.exec(figure);\n if (k === undefined || k >= 1 || !m) return html`${figure}`;\n const eased = 1 - Math.pow(1 - k, 3);\n return html`<span aria-hidden=\"true\">${Math.round(Number(m[1]) * eased)}${m[2]}</span><span class=\"sr-only\">${figure}</span>`;\n };\n return html`${this.summary ? html`<p class=\"summary mono\" part=\"summary\">${this.summary}</p>` : nothing}\n <ul part=\"list\">${(this.items ?? []).map(\n (item, i) => html`<li part=\"item\" style=${`--i:${i}`}>\n <span class=\"tick\" aria-hidden=\"true\">${iconSvg('check', '16px')}</span>\n <p class=\"figure\">${shownFigure(item.figure, i)}</p>\n <p class=\"label\">${item.label}</p>\n ${item.status ? html`<p class=\"status mono\">${item.status}</p>` : html`<span></span>`}\n </li>`,\n )}</ul>`;\n }\n}\n\n// \u2500\u2500 Branch timeline \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\n/** One stretch of work, drawn as a branch off the main line. */\nexport interface TimelineLane {\n id?: string;\n label: string;\n /** Where it starts and ends, in the timeline's units (weeks, say). */\n from: number;\n to: number;\n tone?: Tone;\n}\n\n/** A moment on a lane, such as a demo. */\nexport interface TimelineMark {\n id?: string;\n label: string;\n at: number;\n}\n\n/**\n * A project drawn as a commit graph: a main line along a scale of weeks, each\n * phase branching off it and merging back, moments marked on the way, and a\n * release tag where it ships.\n *\n * It is a picture, so it carries a text alternative that says the same in\n * words: each phase and when it runs. The steps that explain the phases go\n * beside it as their own block.\n *\n * @category content\n * @icon git-branch\n */\nexport class ImpaktBranchTimeline extends ImpaktElement {\n static properties = {\n lanes: { type: Array },\n marks: { type: Array },\n span: { type: Number },\n unit: { type: String },\n every: { type: Number },\n release: { type: String },\n releaseAt: { type: Number, attribute: 'release-at' },\n label: { type: String },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n declare lanes: TimelineLane[];\n declare marks: TimelineMark[];\n /** How long the whole timeline is, in its units. */\n declare span: number;\n /** The unit's short name on the scale, such as \"wk\". */\n declare unit: string;\n /** How often the scale is labelled. */\n declare every: number;\n /** The tag where it ships, such as \"v1.0 \u00B7 launch\". */\n declare release: string;\n declare releaseAt: number;\n /** What the picture shows, for a screen reader. */\n declare label: string;\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n constructor() {\n super();\n this.lanes = [];\n this.marks = [];\n this.span = 20;\n this.unit = '';\n this.every = 2;\n this.release = '';\n this.releaseAt = 0;\n this.label = '';\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n spaceAround,\n mono,\n words,\n css`\n :host { display: block; }\n /* On a narrow screen the graph scrolls sideways, so the scroller takes focus and the arrow keys move it (2.1.1). */\n figure { margin: 0; overflow-x: auto; border-radius: ${t.radiusSm}; }\n svg { display: block; inline-size: 100%; min-inline-size: 640px; block-size: auto; overflow: visible; }\n text { font-family: ${t.fontMono}; font-size: 12px; fill: currentColor; }\n .faint { opacity: 0.5; }\n /* A lane's label keeps a band of the page colour around it, so a line crossing it stays legible. */\n .halo { paint-order: stroke; stroke: var(--impakt-color-surface-card, #fff); stroke-width: 5px; stroke-linejoin: round; }\n /* Graph draw: the graph opens left to right, so each demo appears as the line reaches it. */\n @media (prefers-reduced-motion: no-preference) {\n svg { clip-path: inset(0 100% 0 0); transition: clip-path 1400ms cubic-bezier(.25, 1, .5, 1); }\n :host([shown]) svg { clip-path: inset(0 -40px 0 0); }\n }\n `,\n ];\n\n private unwatch: () => void = () => undefined;\n connectedCallback(): void {\n super.connectedCallback();\n this.unwatch = revealOnView(this);\n }\n disconnectedCallback(): void {\n super.disconnectedCallback();\n this.unwatch();\n }\n\n render(): TemplateResult {\n const W = 1200;\n const left = 24;\n const right = W - 60;\n const span = this.span > 0 ? this.span : 20;\n const x = (v: number) => left + (Math.min(Math.max(v, 0), span) / span) * (right - left);\n const lanes = this.lanes ?? [];\n const rowH = 52;\n const H = 40 + (lanes.length + 1) * rowH + 40;\n const mainY = 40;\n const laneY = (i: number) => mainY + (i + 1) * rowH;\n const ticks: number[] = [];\n for (let v = 0; v <= span; v += Math.max(1, this.every || 2)) ticks.push(v);\n const laneOf = (at: number) => lanes.findIndex((l) => at >= l.from && at <= l.to);\n // A lane's label goes under it, out of the way of the curves, unless its marks are labelled there.\n const marked = (i: number) => (this.marks ?? []).some((m) => laneOf(m.at) === i);\n const unit = this.unit || say('wk');\n const label = this.label || say('Project timeline');\n const described = lanes.map((l) => `${l.label}: ${say('{unit} {from} to {to}', { unit, from: l.from, to: l.to })}`).join('; ');\n return html`<figure part=\"figure\" tabindex=\"0\">\n <svg viewBox=\"0 0 ${W} ${H}\" role=\"img\" aria-label=${`${label}. ${described}${this.release ? `. ${say('{name} at {unit} {at}', { name: this.release, unit, at: this.releaseAt })}` : ''}`}>\n <line x1=${left} y1=${mainY} x2=${right + 40} y2=${mainY} stroke=\"currentColor\" stroke-width=\"3\" stroke-linecap=\"round\" />\n <path d=\"M${right + 28} ${mainY - 7} L${right + 40} ${mainY} L${right + 28} ${mainY + 7}\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"3\" />\n ${lanes.map((l, i) => {\n const c = toneOf(l.tone, i);\n const y = laneY(i);\n const a = x(l.from);\n const b = x(l.to);\n const bend = Math.min(36, (b - a) / 3);\n return svg`<g>\n <path d=\"M${a} ${mainY} C${a} ${(mainY + y) / 2} ${a + bend} ${y} ${a + bend * 1.6} ${y} L${b - bend * 1.6} ${y} C${b - bend} ${y} ${b} ${(mainY + y) / 2} ${b} ${mainY}\" fill=\"none\" stroke=${c} stroke-width=\"3\" />\n <circle cx=${a} cy=${mainY} r=\"7\" fill=${c} />\n <text x=${a + bend * 1.6} y=${marked(i) ? y - 10 : y + 20} class=\"halo\" style=${`fill:${c}`}>${l.label}</text>\n </g>`;\n })}\n ${(this.marks ?? []).map((m) => {\n const i = laneOf(m.at);\n const y = i >= 0 ? laneY(i) : mainY;\n const c = i >= 0 ? toneOf(lanes[i]!.tone, i) : 'currentColor';\n return svg`<g><circle cx=${x(m.at)} cy=${y} r=\"6\" fill=\"var(--impakt-color-surface-card, #fff)\" stroke=${c} stroke-width=\"3\" /><text x=${x(m.at)} y=${y + 22} text-anchor=\"middle\" class=\"faint\">${m.label}</text></g>`;\n })}\n ${\n this.release\n ? svg`<g>\n <circle cx=${x(this.releaseAt)} cy=${mainY} r=\"10\" fill=${TONE.success} />\n <rect x=${x(this.releaseAt) - 8} y=${mainY - 36} rx=\"4\" width=${this.release.length * 7.6 + 16} height=\"22\" fill=${TONE.success} />\n <text x=${x(this.releaseAt)} y=${mainY - 21} style=\"fill:var(--impakt-color-surface-card, #fff)\">${this.release}</text>\n </g>`\n : nothing\n }\n ${ticks.map((v) => svg`<text x=${x(v)} y=${H - 10} text-anchor=\"middle\" class=\"faint\">${unit} ${v}</text>`)}\n </svg>\n </figure>`;\n }\n}\n\ncustomElements.define('impakt-release-card', ImpaktReleaseCard);\ncustomElements.define('impakt-release-list', ImpaktReleaseList);\ncustomElements.define('impakt-branch-list', ImpaktBranchList);\ncustomElements.define('impakt-check-list', ImpaktCheckList);\ncustomElements.define('impakt-branch-timeline', ImpaktBranchTimeline);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'impakt-release-card': ImpaktReleaseCard;\n 'impakt-release-list': ImpaktReleaseList;\n 'impakt-branch-list': ImpaktBranchList;\n 'impakt-check-list': ImpaktCheckList;\n 'impakt-branch-timeline': ImpaktBranchTimeline;\n }\n}\n"],
|
|
5
|
-
"mappings": ";AAUA,MAAO,iBCVP,OAAS,OAAAA,GAAK,QAAAC,EAAM,WAAAC,MAAoC,iBACxD,OAAS,iBAAAC,GAAe,YAAAC,GAAU,cAAAC,GAAY,cAAAC,GAAY,SAAAC,EAAO,eAAAC,GAAa,KAAAC,EAAG,QAAAC,GAAM,WAAAC,OAAe,iBAGtG,IAAMC,GAAU,CAACC,EAAeC,EAAcC,IAAgCd,eAAkBc,CAAG,8BAA8BF,CAAK,IAAIC,CAAI,SAExIE,GAAgBhB;AAAA,2BACKS,EAAE,WAAW,kBAAkBA,EAAE,WAAW,kBAAkBJ,GAAW,MAAM,CAAC,kBAAkBC,GAAW,OAAO,CAAC;AAAA,wFACxDG,EAAE,KAAK,OAAOC,GAAK,IAAI,CAAC,mGAAmGD,EAAE,WAAW,oDAAoDJ,GAAW,UAAU,CAAC,sBAAsBI,EAAE,YAAY;AAAA,oCAC1SH,GAAW,QAAQ,CAAC;AAAA,EAiB3CW,GAAN,cAAyBd,EAAc,CAC5C,YAAO,WAAa,CAClB,QAAS,CAAE,KAAM,MAAO,EACxB,QAAS,CAAE,KAAM,MAAO,EACxB,KAAM,CAAE,KAAM,MAAO,EACrB,MAAO,CAAE,KAAM,OAAQ,QAAS,EAAK,EACrC,SAAU,CAAE,KAAM,OAAQ,UAAW,WAAY,EACjD,SAAU,CAAE,KAAM,OAAQ,UAAW,WAAY,EACjD,UAAW,CAAE,KAAM,OAAQ,QAAS,EAAK,EAC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C,OAAOqB,EAAC,+DAA+DD,EAAC,+BAA+Bd,EAAEN,EAAE,EAAE,CAAC,MAAMqB,GAAI,EAAE,uCAAuCrB,EAAE,KAAK,aAC5M,CAAC,CAAC;AAAA,UAEA,KAAK,QACDT;AAAA,uBACSe,EAAE,KAAK,SAAS,CAAC,OAAOK,CAAK,gBAAgBc,GAAK,OAAO;AAAA,oBAC5DnB,EAAE,KAAK,SAAS,EAAI,CAAC,MAAMK,EAAQ,EAAE,iBAAiB,KAAK,QAAQ,OAAS,IAAM,EAAE,qBAAqBc,GAAK,OAAO;AAAA,oBACrHnB,EAAE,KAAK,SAAS,CAAC,MAAMK,EAAQ,EAAE,wDAAwD,KAAK,OAAO;AAAA,cAE3GhC,EACN;AAAA,UACEkC,GAAM,IAAKN,GAAMhB,aAAce,EAAEC,CAAC,CAAC,MAAMG,EAAI,EAAE,uCAAuCO,EAAI,IAAIV,CAAC,SAAS,CAAC;AAAA;AAAA,cAGjH,CACF,EAEA,eAAe,OAAO,sBAAuB9C,EAAiB,EAC9D,eAAe,OAAO,sBAAuBqB,EAAiB,EAC9D,eAAe,OAAO,qBAAsBM,EAAgB,EAC5D,eAAe,OAAO,oBAAqBM,EAAe,EAC1D,eAAe,OAAO,yBAA0BS,EAAoB",
|
|
4
|
+
"sourcesContent": ["/**\n * @atomic-ui/blocks \u2014 the section blocks Impakt sites are built from: marketing blocks,\n * property and selling tools, the site frame and the changelog blocks. Standard\n * custom elements in Lit, styled only from design tokens, built to WCAG 2.2 AA.\n *\n * Importing this module defines every block. It imports `@atomic-ui/ui` first,\n * which defines the product components the blocks draw inside themselves, such\n * as `impakt-button`, `impakt-nav` and `impakt-select`, and gives them their\n * base class, tokens and style fragments.\n */\nimport '@atomic-ui/ui';\n\nexport {\n ImpaktHero,\n ImpaktFeatureList,\n ImpaktQuote,\n ImpaktStat,\n ImpaktAnnouncement,\n ImpaktSearchBar,\n type FeatureItem,\n type SearchField,\n} from './components/marketing';\nexport { ImpaktCardGrid, type CardItem } from './components/card-grid';\nexport { ImpaktJourneyButton, JOURNEY_STAGES, type JourneyStage } from './components/journey';\nexport {\n ImpaktWorkList,\n ImpaktStatRow,\n ImpaktFaq,\n ImpaktSiteMenu,\n ImpaktOffer,\n ImpaktPostCard,\n ImpaktHighlight,\n type WorkItem,\n type StatRowItem,\n type FaqItem,\n} from './components/studio';\nexport {\n ImpaktCarousel,\n ImpaktGallery,\n ImpaktLogoCloud,\n ImpaktSteps,\n ImpaktMediaSplit,\n ImpaktCtaBanner,\n ImpaktReviews,\n ImpaktNewsletter,\n gallerySpan,\n type GalleryItem,\n type LogoItem,\n type StepItem,\n type ReviewItem,\n} from './components/organisms';\nexport {\n ImpaktSitePlan,\n ImpaktMortgageCalculator,\n ImpaktBeforeAfter,\n ImpaktStickyBar,\n ImpaktLocationCard,\n monthlyPayment,\n type SitePlot,\n type NearbyItem,\n} from './components/property';\nexport {\n ImpaktPlanComparison,\n ImpaktVideo,\n ImpaktRegulatoryNotice,\n ImpaktStampDutyCalculator,\n ImpaktAffordabilityCalculator,\n ImpaktContactBlock,\n stampDuty,\n embedOf,\n SDLT,\n type PlanItem,\n type PlanRow,\n} from './components/selling';\nexport {\n ImpaktEstimator,\n estimate,\n phaseWeeks,\n type EstimatorQuestion,\n type EstimatorChoice,\n type EstimatorBand,\n type EstimatorPhase,\n type EstimateResult,\n} from './components/estimator';\nexport { ImpaktSiteHeader, ImpaktSiteFooter, ImpaktWordmark, type FooterLogLine, type FooterColumn } from './components/site';\nexport { ImpaktScene, type SceneDrive, type SceneLayout } from './components/scene';\nexport { ImpaktScrubber, type ScrubberStop } from './components/scrubber';\nexport {\n ImpaktReleaseCard,\n ImpaktReleaseList,\n ImpaktBranchList,\n ImpaktCheckList,\n ImpaktBranchTimeline,\n type DiffLine,\n type ReleaseItem,\n type Branch,\n type CheckItem,\n type TimelineLane,\n type TimelineMark,\n} from './components/changelog';\n", "import { css, html, nothing, type TemplateResult } from 'lit';\nimport { ImpaktElement, fontSize, fontWeight, lineHeight, space, spaceAround, t, type, iconSvg } from '@atomic-ui/ui';\n\n/** A heading at a level the author chose, drawn at a size the component chose. */\nconst heading = (level: number, text: string, cls: string): TemplateResult => html`<div class=${cls} role=\"heading\" aria-level=${level}>${text}</div>`;\n\nconst headingStyles = css`\n .h { margin: 0; color: ${t.textHeading}; font-family: ${t.fontHeading}; font-weight: ${fontWeight('bold')}; line-height: ${lineHeight('tight')}; }\n .eyebrow { margin: 0; color: var(--impakt-eyebrow, var(--impakt-color-text-eyebrow, ${t.brand})); ${type('sm')} font-size: var(--impakt-font-size-eyebrow, var(--impakt-font-size-sm, 0.875rem)); font-family: ${t.fontEyebrow}; font-weight: var(--impakt-font-weight-eyebrow, ${fontWeight('semibold')}); letter-spacing: ${t.trackingWide}; text-transform: uppercase; }\n .body { margin: 0; line-height: ${lineHeight('normal')}; max-inline-size: 65ch; }\n`;\n\n/**\n * The opening of a page: a short label, a big heading, a line of text, the\n * page's main actions and, beside them, a picture.\n *\n * Put the buttons in the `actions` slot. The picture goes beside the words on\n * a wide screen and below them on a phone, so the heading is always the first\n * thing read.\n *\n * @category layout\n * @icon hero\n * @role heading\n * @slot actions - The page's main buttons and links.\n * @slot search - A search bar across the bottom of a full-picture hero.\n */\nexport class ImpaktHero extends ImpaktElement {\n static properties = {\n eyebrow: { type: String },\n heading: { type: String },\n lead: { type: String },\n level: { type: Number, reflect: true },\n imageSrc: { type: String, attribute: 'image-src' },\n imageAlt: { type: String, attribute: 'image-alt' },\n treatment: { type: String, reflect: true },\n ratingText: { type: String, attribute: 'rating-text' },\n eyebrowIcon: { type: String, attribute: 'eyebrow-icon' },\n align: { type: String, reflect: true },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n /** A short label above the heading, such as the name of the development. */\n declare eyebrow: string;\n declare heading: string;\n /** A sentence or two under the heading. */\n declare lead: string;\n /** The heading's level in the page. A page's hero is usually its only level 1. */\n declare level: 1 | 2;\n declare imageSrc: string;\n /** What the picture shows. Leave empty only when it is decoration. */\n declare imageAlt: string;\n /** The picture beside the words, or filling the whole block with the words over it. */\n declare treatment: 'split' | 'cover';\n /** A short line of proof on the picture, such as \"4.8 from 312 buyers\". */\n declare ratingText: string;\n /** A small picture before the eyebrow on a full-picture hero. */\n declare eyebrowIcon:\n | 'none'\n | 'arrow-right'\n | 'arrow-left'\n | 'chevron-right'\n | 'chevron-down'\n | 'check'\n | 'close'\n | 'menu'\n | 'plus'\n | 'minus'\n | 'search'\n | 'external'\n | 'download'\n | 'home'\n | 'phone'\n | 'mail'\n | 'map-pin'\n | 'calendar'\n | 'clock'\n | 'user'\n | 'star'\n | 'heart'\n | 'shield'\n | 'leaf'\n | 'sun'\n | 'bolt'\n | 'key'\n | 'info'\n | 'warning'\n | 'document'\n | 'pound'\n | 'chat';\n /** Where the words sit. Centred heroes have no picture beside them. */\n declare align: 'start' | 'center';\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n constructor() {\n super();\n this.eyebrow = '';\n this.heading = '';\n this.lead = '';\n this.level = 1;\n this.imageSrc = '';\n this.imageAlt = '';\n this.treatment = 'split';\n this.ratingText = '';\n this.eyebrowIcon = 'none';\n this.align = 'start';\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n spaceAround,\n headingStyles,\n css`\n :host { display: block; container-type: inline-size; }\n .hero { display: grid; grid-template-columns: minmax(0, 1fr); gap: ${space(8)}; align-items: center; }\n .hero.pictured { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }\n .words { display: flex; flex-direction: column; gap: ${space(4)}; }\n :host([align='center']) .words { align-items: center; text-align: center; margin-inline: auto; max-inline-size: 48rem; }\n .h { ${type('5xl')} letter-spacing: ${t.trackingTight}; text-wrap: balance; }\n .body { ${type('lg')} color: ${t.textMuted}; text-wrap: pretty; }\n @container (max-width: 40rem) { .h { ${type('4xl')} } }\n .actions { display: flex; flex-wrap: wrap; gap: ${space(3)} ${space(4)}; align-items: center; margin-block-start: ${space(2)}; }\n :host([align='center']) .actions { justify-content: center; }\n img { display: block; inline-size: 100%; block-size: auto; border-radius: ${t.radius2xl}; aspect-ratio: 4 / 3; object-fit: cover; box-shadow: ${t.shadowLg}; }\n @container (max-width: 48rem) { .hero.pictured { grid-template-columns: minmax(0, 1fr); } }\n /* Cover: the picture fills the block edge to edge, a scrim keeps the words readable (1.4.3). */\n .cover { position: relative; display: flex; flex-direction: column; justify-content: center; min-block-size: clamp(44rem, 61vw, 55rem); margin-inline: calc(var(--impakt-bleed, 1) * (50% - 50vw)); padding: ${space(32)} max(${space(8)}, calc(var(--impakt-bleed, 1) * (50vw - 50%))) ${space(24)}; overflow: hidden; color: #fff; --impakt-color-text-heading: #fff; }\n .cover img { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; aspect-ratio: auto; border-radius: 0; box-shadow: none; }\n .cover::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgb(18 31 26 / 0.82) 0%, rgb(18 31 26 / 0.42) 55%, rgb(18 31 26 / 0.05) 100%); }\n .cover .words { position: relative; z-index: 1; max-inline-size: 48rem; }\n .cover .eyebrow { display: inline-flex; align-items: center; gap: ${space(2)}; align-self: flex-start; padding: ${space(2)} ${space(3.5)}; color: #fff; background: rgb(255 255 255 / 0.16); border-radius: 999px; text-transform: none; letter-spacing: 0; }\n .chip-line { position: relative; z-index: 1; block-size: 0; }\n .chip { position: absolute; inset-block-start: ${space(14)}; inset-inline-end: ${space(9)}; display: inline-flex; align-items: center; gap: ${space(2.5)}; padding: ${space(3)} ${space(4.5)}; ${type('sm')} font-weight: ${fontWeight('semibold')}; white-space: nowrap; color: #fff; background: rgb(255 255 255 / 0.16); border-radius: ${t.radiusXl}; }\n .finder { position: relative; z-index: 1; margin-block-start: ${space(12)}; }\n .cover .h { font-size: clamp(3rem, 6.4vw, 5.75rem); line-height: 1; }\n .cover .body { color: rgb(255 255 255 / 0.92); max-inline-size: 40rem; }\n @container (max-width: 64rem) { .chip { display: none; } }\n @container (max-width: 30rem) { .finder { display: none; } }\n @container (max-width: 48rem) { .finder { margin-block-start: ${space(6)}; } .cover { justify-content: flex-end; min-block-size: 43.75rem; padding-block: ${space(32)} ${space(10)}; } .cover::after { background: linear-gradient(180deg, rgb(18 31 26 / 0.1) 0%, rgb(18 31 26 / 0.3) 42%, rgb(18 31 26 / 0.86) 100%); } .cover .h { font-size: 3rem; } }\n `,\n ];\n\n render(): TemplateResult {\n if (this.treatment === 'cover' && this.imageSrc) {\n return html`<div class=\"cover\" part=\"hero\">\n ${this.ratingText ? html`<div class=\"chip-line\"><div class=\"chip\">${iconSvg('star', '20px')}${this.ratingText}</div></div>` : nothing}\n <img src=${this.imageSrc} alt=${this.imageAlt} part=\"image\" />\n <div class=\"words\">\n ${this.eyebrow ? html`<p class=\"eyebrow\" part=\"eyebrow\">${this.eyebrowIcon !== 'none' ? iconSvg(this.eyebrowIcon, '16px') : nothing}${this.eyebrow}</p>` : nothing}\n ${heading(this.level, this.heading, 'h')}\n ${this.lead ? html`<p class=\"body\">${this.lead}</p>` : nothing}\n <div class=\"actions\"><slot name=\"actions\"></slot></div>\n </div>\n <div class=\"finder\"><slot name=\"search\"></slot></div>\n </div>`;\n }\n const pictured = Boolean(this.imageSrc) && this.align !== 'center';\n return html`<div class=\"hero ${pictured ? 'pictured' : ''}\" part=\"hero\">\n <div class=\"words\">\n ${this.eyebrow ? html`<p class=\"eyebrow\" part=\"eyebrow\">${this.eyebrow}</p>` : nothing}\n ${heading(this.level, this.heading, 'h')}\n ${this.lead ? html`<p class=\"body\">${this.lead}</p>` : nothing}\n <div class=\"actions\"><slot name=\"actions\"></slot></div>\n </div>\n ${pictured ? html`<img src=${this.imageSrc} alt=${this.imageAlt} part=\"image\" />` : nothing}\n </div>`;\n }\n}\n\n/** One benefit or feature in a list of them. */\nexport interface FeatureItem {\n id?: string;\n icon?: string;\n heading: string;\n text?: string;\n}\n\n/**\n * Benefits or features side by side, each with an icon, a short heading and a\n * line of text: \"Ten years of cover\", \"Lower bills from day one\".\n *\n * The icons are decoration, because each heading already says what it is.\n * The items are a list, so a screen reader says how many there are.\n *\n * @category content\n * @icon features\n */\nexport class ImpaktFeatureList extends ImpaktElement {\n static properties = {\n items: { type: Array },\n columns: { type: String, reflect: true },\n headingLevel: { type: Number, attribute: 'heading-level' },\n layout: { type: String, reflect: true },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n declare items: FeatureItem[];\n declare columns: 'two' | 'three' | 'four';\n /** The level of each item's heading. One below the heading above the list. */\n declare headingLevel: 2 | 3 | 4;\n /** Icons above the words, or beside them. */\n declare layout: 'stacked' | 'inline';\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n constructor() {\n super();\n this.items = [];\n this.columns = 'three';\n this.headingLevel = 3;\n this.layout = 'stacked';\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n spaceAround,\n headingStyles,\n css`\n :host { display: block; container-type: inline-size; }\n ul { list-style: none; margin: 0; padding: 0; display: grid; gap: ${space(8)} ${space(6)}; grid-template-columns: repeat(3, minmax(0, 1fr)); }\n :host([columns='two']) ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }\n :host([columns='four']) ul { grid-template-columns: repeat(4, minmax(0, 1fr)); }\n li { display: flex; flex-direction: column; gap: ${space(2)}; }\n :host([layout='inline']) li { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: ${space(4)}; align-items: start; }\n :host([layout='inline']) .words { display: flex; flex-direction: column; gap: ${space(1)}; }\n .icon { display: inline-flex; align-items: center; justify-content: center; inline-size: 48px; block-size: 48px; border-radius: ${t.radiusLg}; background: ${t.brandSubtle}; color: ${t.brand}; margin-block-end: ${space(2)}; }\n :host([layout='inline']) .icon { margin: 0; }\n .h { font-size: ${fontSize('lg')}; }\n .body { color: ${t.text}; }\n @container (max-width: 48rem) { ul, :host([columns='four']) ul { grid-template-columns: repeat(2, minmax(0, 1fr)); } }\n @container (max-width: 32rem) { ul, :host([columns='two']) ul, :host([columns='four']) ul { grid-template-columns: minmax(0, 1fr); } }\n `,\n ];\n\n render(): TemplateResult {\n return html`<ul part=\"list\">${(this.items ?? []).map(\n (item) => html`<li part=\"item\">\n ${item.icon ? html`<span class=\"icon\">${iconSvg(item.icon, '24px')}</span>` : nothing}\n <div class=\"words\">${heading(this.headingLevel, item.heading, 'h')}${item.text ? html`<p class=\"body\">${item.text}</p>` : nothing}</div>\n </li>`,\n )}</ul>`;\n }\n}\n\n/**\n * Something a customer said, and who said it.\n *\n * It is a `blockquote` with a `figcaption`, so the words and the person are\n * tied together for a screen reader as well as on the screen.\n *\n * @category content\n * @icon quote\n */\nexport class ImpaktQuote extends ImpaktElement {\n static properties = {\n quote: { type: String },\n person: { type: String },\n about: { type: String },\n imageSrc: { type: String, attribute: 'image-src' },\n size: { type: String, reflect: true },\n align: { type: String, reflect: true },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n /** The words they said, without quotation marks. */\n declare quote: string;\n /** Who said it. */\n declare person: string;\n /** Who they are, such as \"Bought at Larkfield Meadows, 2025\". */\n declare about: string;\n /** A photo of them. It is decoration, because their name is beside it. */\n declare imageSrc: string;\n declare size: 'md' | 'lg';\n declare align: 'start' | 'center';\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n constructor() {\n super();\n this.quote = '';\n this.person = '';\n this.about = '';\n this.imageSrc = '';\n this.size = 'md';\n this.align = 'start';\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n spaceAround,\n css`\n :host { display: block; }\n figure { margin: 0; display: flex; flex-direction: column; gap: ${space(4)}; max-inline-size: 48rem; }\n :host([align='center']) figure { margin-inline: auto; align-items: center; text-align: center; }\n blockquote { margin: 0; font-family: ${t.fontHeading}; font-size: ${fontSize('lg')}; line-height: ${lineHeight('normal')}; color: inherit; }\n :host([size='lg']) blockquote { font-size: ${fontSize('2xl')}; line-height: ${lineHeight('tight')}; }\n blockquote::before { content: '\\\\201C'; } blockquote::after { content: '\\\\201D'; }\n figcaption { display: flex; align-items: center; gap: ${space(3)}; }\n img { inline-size: 48px; block-size: 48px; border-radius: 50%; object-fit: cover; }\n .name { font-weight: ${fontWeight('semibold')}; }\n .detail { color: ${t.textMuted}; font-size: ${fontSize('sm')}; }\n `,\n ];\n\n render(): TemplateResult {\n return html`<figure part=\"figure\">\n <blockquote part=\"quote\">${this.quote}</blockquote>\n ${this.person ? html`<figcaption>${this.imageSrc ? html`<img src=${this.imageSrc} alt=\"\" />` : nothing}<span><span class=\"name\">${this.person}</span>${this.about ? html`<br /><span class=\"detail\">${this.about}</span>` : nothing}</span></figcaption>` : nothing}\n </figure>`;\n }\n}\n\n/**\n * A number that makes a point, with what it counts beneath it: \"36 years\",\n * \"Building in Kent since 1987\".\n *\n * @category content\n * @icon stat\n */\nexport class ImpaktStat extends ImpaktElement {\n static properties = {\n figure: { type: String },\n label: { type: String },\n note: { type: String },\n size: { type: String, reflect: true },\n align: { type: String, reflect: true },\n };\n /** How large the number is drawn. */\n declare size: 'md' | 'lg' | 'xl';\n /** The number, written as it should appear, such as \"36\" or \"\u00A3280k\". */\n declare figure: string;\n /** What the number counts. */\n declare label: string;\n /** A line more, if the label needs it. */\n declare note: string;\n declare align: 'start' | 'center';\n\n constructor() {\n super();\n this.figure = '';\n this.label = '';\n this.note = '';\n this.size = 'md';\n this.align = 'start';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n css`\n :host { display: block; }\n .stat { display: flex; flex-direction: column; gap: ${space(1)}; }\n :host([align='center']) .stat { align-items: center; text-align: center; }\n .value { font-family: ${t.fontHeading}; font-size: ${fontSize('3xl')}; font-weight: ${fontWeight('bold')}; line-height: 1; color: ${t.textHeading}; }\n :host([size='lg']) .value { font-size: ${fontSize('5xl')}; }\n :host([size='xl']) .value { font-size: clamp(2.75rem, 6vw, 4rem); }\n .label { font-weight: ${fontWeight('semibold')}; }\n .detail { color: ${t.textMuted}; font-size: ${fontSize('sm')}; }\n `,\n ];\n\n render(): TemplateResult {\n // Read as one phrase, \"36 years\", rather than a bare number and then a label.\n return html`<p class=\"stat\" part=\"stat\" style=\"margin:0\"><span class=\"value\">${this.figure}</span> <span class=\"label\">${this.label}</span>${this.note ? html` <span class=\"detail\">${this.note}</span>` : nothing}</p>`;\n }\n}\n\n/**\n * A thin line of news across the top of a page: a launch, a change to opening\n * hours. Keep it to one short sentence.\n *\n * @category feedback\n * @icon alert\n */\nexport class ImpaktAnnouncement extends ImpaktElement {\n static properties = {\n message: { type: String },\n linkText: { type: String, attribute: 'link-text' },\n href: { type: String },\n };\n declare message: string;\n declare linkText: string;\n declare href: string;\n\n constructor() {\n super();\n this.message = '';\n this.linkText = '';\n this.href = '';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n css`\n :host { display: block; }\n .bar { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: ${space(2)} ${space(3)}; padding: ${space(2.5)} ${space(5)}; ${type('sm')} text-align: center; color: ${t.onBrand}; background: ${t.brand}; }\n :host { margin-inline: calc(var(--impakt-bleed, 1) * (50% - 50vw)); }\n a { display: inline-flex; align-items: center; gap: ${space(1)}; min-block-size: ${t.targetMin}; color: inherit; font-weight: ${fontWeight('semibold')}; }\n `,\n ];\n\n render(): TemplateResult {\n return html`<div class=\"bar\" part=\"bar\"><span>${this.message}</span>${this.linkText && this.href ? html`<a href=${this.href}>${this.linkText}${iconSvg('arrow-right', '14px')}</a>` : nothing}</div>`;\n }\n}\n\n/** One choice in a search bar. */\nexport interface SearchField {\n id?: string;\n /** The name it sends, such as \"bedrooms\". */\n name?: string;\n label: string;\n /** What it shows before anything is chosen. */\n placeholder?: string;\n /** The other choices, separated by commas. */\n options?: string;\n}\n\n/**\n * A row of choices and one button that finds what fits: where, how many\n * bedrooms, up to what budget.\n *\n * Each choice is a native select with a real label. It sends the visitor to\n * `action` with their choices in the address, so it works as a plain link can.\n *\n * @category form\n * @icon search\n * @fires {CustomEvent<{ values: Record<string, string> }>} impakt-submit - When the search is run. The choices are in detail.values.\n */\nexport class ImpaktSearchBar extends ImpaktElement {\n static properties = {\n items: { type: Array },\n buttonText: { type: String, attribute: 'button-text' },\n action: { type: String },\n label: { type: String },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n declare items: SearchField[];\n declare buttonText: string;\n /** Where the search goes. Leave empty to handle it in the app. */\n declare action: string;\n /** What the search is called for a screen reader. */\n declare label: string;\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n constructor() {\n super();\n this.items = [];\n this.buttonText = 'Search';\n this.action = '';\n this.label = 'Search';\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n spaceAround,\n css`\n :host { display: block; container-type: inline-size; }\n form { display: flex; align-items: center; padding: ${space(3)}; background: ${t.surfaceCard}; color: ${t.text}; border-radius: ${t.radius2xl}; box-shadow: ${t.shadowXl}; }\n .field { flex: 1; min-inline-size: 0; display: flex; flex-direction: column; gap: ${space(1)}; padding: ${space(1.5)} ${space(5)}; }\n label { ${type('sm')} color: ${t.textMuted}; }\n select { inline-size: 100%; min-block-size: 28px; padding: 0; font: inherit; ${type('sm')} font-weight: ${fontWeight('semibold')}; color: ${t.text}; background: transparent; border: 0; border-radius: ${t.radiusSm}; cursor: pointer; }\n select:focus-visible, button:focus-visible { outline: 2px solid ${t.brand}; outline-offset: 2px; }\n button { flex: none; min-block-size: 48px; padding: ${space(3)} ${space(6)}; font: inherit; font-weight: ${fontWeight('semibold')}; color: ${t.onBrand}; background: ${t.brand}; border: 0; border-radius: ${t.radiusLg}; cursor: pointer; }\n button:hover { background: ${t.brandHover}; }\n @container (max-width: 56rem) { form { flex-wrap: wrap; } .field { flex: 1 1 40%; } button { inline-size: 100%; } }\n @container (max-width: 30rem) { form { flex-direction: column; align-items: stretch; gap: ${space(2)}; } .field { flex: none; } }\n `,\n ];\n\n private submit(event: SubmitEvent): void {\n const data = new FormData(event.currentTarget as HTMLFormElement);\n const values: Record<string, string> = {};\n data.forEach((value, key) => {\n if (value !== '') values[key] = String(value);\n });\n this.dispatchEvent(new CustomEvent('impakt-submit', { detail: { values }, bubbles: true, composed: true }));\n if (!this.action) event.preventDefault();\n }\n\n render(): TemplateResult {\n return html`<form role=\"search\" aria-label=${this.label} method=\"get\" action=${this.action || nothing} @submit=${this.submit} part=\"form\">\n ${(this.items ?? []).map((field, i) => {\n const id = this.id_(`field-${i}`);\n const choices = String(field.options ?? '')\n .split(',')\n .map((o) => o.trim())\n .filter(Boolean);\n return html`<div class=\"field\"><label for=${id}>${field.label}</label><select id=${id} name=${field.name || field.label.toLowerCase().replace(/[^a-z0-9]+/g, '-')}>\n <option value=\"\">${field.placeholder || 'Any'}</option>${choices.map((c) => html`<option value=${c}>${c}</option>`)}\n </select></div>`;\n })}\n <button type=\"submit\">${this.buttonText}</button>\n </form>`;\n }\n}\n\ncustomElements.define('impakt-search-bar', ImpaktSearchBar);\ncustomElements.define('impakt-announcement', ImpaktAnnouncement);\ncustomElements.define('impakt-hero', ImpaktHero);\ncustomElements.define('impakt-feature-list', ImpaktFeatureList);\ncustomElements.define('impakt-quote', ImpaktQuote);\ncustomElements.define('impakt-stat', ImpaktStat);\ndeclare global {\n interface HTMLElementTagNameMap {\n 'impakt-hero': ImpaktHero;\n 'impakt-feature-list': ImpaktFeatureList;\n 'impakt-quote': ImpaktQuote;\n 'impakt-stat': ImpaktStat;\n }\n}\n", "/**\n * A row of linked cards.\n */\nimport { css, html, nothing, type TemplateResult } from 'lit';\nimport { ImpaktElement, focusRing, fontSize, fontWeight, lineHeight, space, spaceAround, t, iconSvg } from '@atomic-ui/ui';\n\n/** One card in a row of them. */\nexport interface CardItem {\n id?: string;\n heading: string;\n text?: string;\n imageSrc?: string;\n imageAlt?: string;\n href?: string;\n badge?: string;\n}\n\n/**\n * A row of cards, each a picture, a heading, a line of text and a link: the\n * developments on a developments page, or the house types at one of them.\n *\n * **The whole card is the link's target, and the heading is its name.** The\n * link is on the heading, so a screen reader hears \"Larkfield Meadows, link\"\n * once rather than the whole card read out as one long link, and a pointer\n * can still press anywhere on the card.\n *\n * @category content\n * @icon cards\n */\nexport class ImpaktCardGrid extends ImpaktElement {\n static properties = {\n items: { type: Array },\n columns: { type: String, reflect: true },\n headingLevel: { type: Number, attribute: 'heading-level' },\n ratio: { type: String, reflect: true },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n declare items: CardItem[];\n declare columns: 'two' | 'three' | 'four';\n /** The level of each card's heading. One below the heading above the cards. */\n declare headingLevel: 2 | 3 | 4;\n /** The shape of each card's picture. */\n declare ratio: '16:9' | '4:3' | '3:2' | '1:1';\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n constructor() {\n super();\n this.items = [];\n this.columns = 'three';\n this.headingLevel = 3;\n this.ratio = '4:3';\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n spaceAround,\n css`\n :host { display: block; container-type: inline-size; --ratio: 4 / 3; }\n :host([ratio='16:9']) { --ratio: 16 / 9; }\n :host([ratio='3:2']) { --ratio: 3 / 2; }\n :host([ratio='1:1']) { --ratio: 1 / 1; }\n ul { list-style: none; margin: 0; padding: 0; display: grid; gap: ${space(6)}; grid-template-columns: repeat(3, minmax(0, 1fr)); }\n :host([columns='two']) ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }\n :host([columns='four']) ul { grid-template-columns: repeat(4, minmax(0, 1fr)); }\n li { position: relative; display: flex; flex-direction: column; background: ${t.surfaceCard}; border: ${t.borderThin} solid ${t.hairline}; border-radius: ${t.radiusXl}; box-shadow: ${t.shadowSm}; overflow: hidden; transition: box-shadow 150ms ease-in-out, transform 150ms ease-in-out; }\n li.linked:hover { box-shadow: ${t.shadowLg}; transform: translateY(-2px); }\n img { display: block; inline-size: 100%; aspect-ratio: var(--ratio); object-fit: cover; }\n .words { display: flex; flex-direction: column; gap: ${space(2)}; padding: ${space(5)}; flex: 1; }\n .h { margin: 0; color: ${t.textHeading}; font-family: ${t.fontHeading}; font-size: ${fontSize('lg')}; font-weight: ${fontWeight('bold')}; line-height: ${lineHeight('tight')}; }\n .h a { color: inherit; text-decoration: none; border-radius: ${t.radiusSm}; }\n .h a::after { content: ''; position: absolute; inset: 0; }\n li.linked:hover .h a { text-decoration: underline; text-underline-offset: 0.2em; }\n .body { margin: 0; line-height: ${lineHeight('normal')}; }\n .badge { align-self: flex-start; padding: ${space(0.5)} ${space(2)}; border-radius: ${t.radius}; font-size: ${fontSize('sm')}; font-weight: ${fontWeight('medium')}; background: ${t.brandSubtle}; color: ${t.brand}; box-shadow: inset 0 0 0 1px ${t.hairline}; }\n .more { margin-block-start: auto; display: inline-flex; align-items: center; gap: ${space(1)}; color: ${t.link}; font-weight: ${fontWeight('semibold')}; }\n @container (max-width: 48rem) { ul, :host([columns='four']) ul { grid-template-columns: repeat(2, minmax(0, 1fr)); } }\n @container (max-width: 32rem) { ul, :host([columns='two']) ul, :host([columns='four']) ul { grid-template-columns: minmax(0, 1fr); } }\n `,\n ];\n\n render(): TemplateResult {\n return html`<ul part=\"list\">${(this.items ?? []).map(\n (card) => html`<li class=${card.href ? 'linked' : ''} part=\"card\">\n ${card.imageSrc ? html`<img src=${card.imageSrc} alt=${card.imageAlt ?? ''} loading=\"lazy\" />` : nothing}\n <div class=\"words\">\n ${card.badge ? html`<span class=\"badge\">${card.badge}</span>` : nothing}\n <div class=\"h\" role=\"heading\" aria-level=${this.headingLevel}>${card.href ? html`<a href=${card.href}>${card.heading}</a>` : card.heading}</div>\n ${card.text ? html`<p class=\"body\">${card.text}</p>` : nothing}\n ${card.href ? html`<span class=\"more\" aria-hidden=\"true\">${iconSvg('arrow-right', '1em')}</span>` : nothing}\n </div>\n </li>`,\n )}</ul>`;\n }\n}\n\ncustomElements.define('impakt-card-grid', ImpaktCardGrid);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'impakt-card-grid': ImpaktCardGrid;\n }\n}\n", "/**\n * The journey button: a site's one call to action, drawn at the stage a\n * section of the page is about.\n */\nimport { css, html, nothing, type TemplateResult } from 'lit';\nimport { ImpaktElement, focusRing, fontSize, fontWeight, space, t, token } from '@atomic-ui/ui';\n\n/** The stages a button passes through on its way to being live, in order. */\nexport const JOURNEY_STAGES = ['note', 'wireframe', 'component', 'code', 'live'] as const;\nexport type JourneyStage = (typeof JOURNEY_STAGES)[number];\n\nconst isStage = (value: unknown): value is JourneyStage => (JOURNEY_STAGES as readonly string[]).includes(value as string);\n\n/** The arrow after the words. Drawn, so no font has to hold the glyph. */\nconst arrow = html`<svg class=\"arrow\" viewBox=\"0 0 20 12\" width=\"20\" height=\"12\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" aria-hidden=\"true\" focusable=\"false\">\n <path d=\"M0 6h18M13 1l5 5-5 5\" />\n</svg>`;\n\n/**\n * A call to action drawn as the thing it once was: a sticky note from a\n * workshop, a wireframe box, a designed component, the code that renders it,\n * and at last the live button. A page shows it at the stage each section is\n * about, so the same button is seen being made as the page is read.\n *\n * **It is the same link at every stage.** Whatever it is drawn as, it is one\n * `<a>` whose name is its words, so a screen reader and a keyboard meet an\n * ordinary link; the note, the wireframe cross, the measuring marks and the\n * lines of code around it are decoration and are hidden (1.3.1, 4.1.2). Its\n * target is at least 44px tall at every stage (2.5.8).\n *\n * **A page that shows it more than once sets `decorative` on the copies.** A\n * decorative one is a picture of the button, not a control: it has no link\n * and is hidden from a screen reader, so the page does not hold five links\n * that say the same thing (2.4.4).\n *\n * **One button can follow the page.** Give `track` a selector for the page's\n * sections, each carrying `data-journey-stage`, and the button takes the stage\n * of whichever section is across the middle of the screen. It watches with an\n * IntersectionObserver, so nothing runs while the page scrolls.\n *\n * **Only transforms, opacity and colour move**, so a change of stage costs no\n * layout. With reduced motion asked for, a stage cuts straight to the next\n * (2.3.3). The words on every fill are a pair the tokens already measured:\n * the accent with its own text colour, and the text colour with the card\n * colour (1.4.3). A brand whose ink is dark may colour the words in the code\n * window by setting `--impakt-journey-code-words`.\n *\n * @category action\n * @icon button\n * @fires {CustomEvent<{ stage: JourneyStage }>} impakt-journey-stage - When a tracked button changes stage as the page scrolls.\n */\nexport class ImpaktJourneyButton extends ImpaktElement {\n static properties = {\n stage: { type: String, reflect: true },\n label: { type: String },\n href: { type: String },\n decorative: { type: Boolean, reflect: true },\n track: { type: String },\n code: { type: Array },\n };\n /** What the button is drawn as. */\n declare stage: JourneyStage;\n /** The button's words, such as \"Book a 30-minute call\". */\n declare label: string;\n /** Where the button goes. */\n declare href: string;\n /** Draw it as a picture only, with no link, for a page that already has the real button. */\n declare decorative: boolean;\n /**\n * A selector for the sections of the page that each carry\n * `data-journey-stage`. The button then takes the stage of the section\n * across the middle of the screen. Leave empty to set `stage` by hand.\n */\n declare track: string;\n /**\n * Lines of code drawn around the words at the `code` stage, split where the\n * words go: the lines before, then the lines after. They are decoration and\n * are not read. Left empty, plain bars are drawn instead.\n */\n declare code: { before?: string[]; after?: string[] };\n\n constructor() {\n super();\n this.stage = 'live';\n this.label = '';\n this.href = '';\n this.decorative = false;\n this.track = '';\n this.code = {};\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n css`\n :host { display: block; inline-size: min(100%, 26rem); --impakt-journey-accent: ${token('color.accent.default', '#ffd43b')}; --impakt-journey-on-accent: ${token('color.accent.on', '#1a1a1a')}; --impakt-journey-ease: cubic-bezier(0.65, 0, 0.35, 1); --impakt-journey-time: 600ms; }\n .frame { position: relative; block-size: 15rem; }\n /* Each plate is one stage's shape. Only its opacity and transform ever change. */\n .plate { position: absolute; box-sizing: border-box; opacity: 0; pointer-events: none; transition: opacity var(--impakt-journey-time) var(--impakt-journey-ease), transform var(--impakt-journey-time) var(--impakt-journey-ease); }\n .bar { inset-inline: 0; inset-block-start: calc(50% - 3rem); block-size: 6rem; }\n .note { inset-inline-start: 12%; inset-block-start: 0.5rem; inline-size: min(14rem, 80%); block-size: 14rem; background: var(--impakt-journey-accent); box-shadow: 0 1.1rem 2.2rem rgb(0 0 0 / 0.18); transform: rotate(-4deg); }\n .wire { background: ${t.surfaceCard}; border: ${t.borderThin} dashed ${t.textMuted}; }\n .wire svg { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; color: ${t.rule}; }\n .solid { background: var(--impakt-journey-accent); }\n .shadow { box-shadow: 0 0.9rem 1.75rem rgb(0 0 0 / 0.22); }\n .window { inset: 0; padding: ${space(5)}; background: ${t.text}; border-radius: ${t.radius}; font-family: ${t.fontMono}; font-size: ${fontSize('sm')}; line-height: 1.6; color: color-mix(in srgb, ${t.surfaceCard} 78%, ${t.text}); white-space: pre; overflow: hidden; display: grid; grid-template-rows: 1fr 44px 1fr; }\n .window .before { align-self: end; display: flex; flex-direction: column; }\n .window .after { align-self: start; display: flex; flex-direction: column; }\n .window .rule { display: block; block-size: 0.5em; margin-block: 0.55em; background: currentColor; opacity: 0.35; }\n /* A measuring line above the bar, with a tick at each end. */\n .marks { inset-inline: 0; inset-block-start: calc(50% - 4.5rem); block-size: 0.75rem; border-inline: 1.5px solid ${t.text}; }\n .marks::before { content: ''; position: absolute; inset-inline: 0; inset-block-start: calc(50% - 0.75px); border-block-start: 1.5px solid ${t.text}; }\n\n /* A stage that has passed shrinks toward the next shape as it fades; one still to come starts from the last. */\n /* The note flattens without growing wider, so a shape that is not showing never reaches past the block (1.4.10). */\n :host(:not([stage='note'])) .note { transform: rotate(0deg) scale(1, 0.45); }\n :host([stage='note']) .wire { transform: rotate(-4deg) scale(0.6, 1.9); }\n :host(:not([stage='code'])) .window { transform: scale(0.94, 0.5); }\n :host([stage='note']) .note, :host([stage='wireframe']) .wire, :host(:is([stage='component'], [stage='live'])) .solid, :host([stage='code']) .window, :host([stage='component']) .marks, :host([stage='live']) .shadow { opacity: 1; }\n\n /* The words. One element at every stage: a link, or a picture of one. */\n .words { position: absolute; inset-inline: 0; inset-block-start: calc(50% - 3rem); box-sizing: border-box; min-block-size: 6rem; display: flex; align-items: center; justify-content: space-between; gap: ${space(4)}; padding-inline: ${space(8)}; font-family: ${t.fontBody}; font-size: ${fontSize('lg')}; font-weight: ${fontWeight('medium')}; line-height: 1.2; color: var(--impakt-journey-on-accent); text-decoration: none; transition: color var(--impakt-journey-time) var(--impakt-journey-ease), transform 180ms cubic-bezier(0.2, 0, 0, 1); }\n .arrow { flex: none; }\n :host([stage='note']) .words { inset-inline: 12% auto; inset-block-start: 0.5rem; inline-size: min(14rem, 80%); min-block-size: 14rem; flex-direction: column; align-items: flex-start; justify-content: space-between; padding: ${space(6)}; font-size: ${fontSize('2xl')}; font-weight: ${fontWeight('semibold')}; letter-spacing: -0.02em; transform: rotate(-4deg); }\n :host([stage='note']) .arrow { align-self: flex-end; }\n :host([stage='wireframe']) .words { justify-content: center; font-family: ${t.fontMono}; font-size: ${fontSize('sm')}; font-weight: ${fontWeight('regular')}; color: ${t.textMuted}; }\n :host([stage='code']) .words { inset-inline: ${space(5)}; justify-content: flex-start; min-block-size: 44px; inset-block-start: calc(50% - 22px); padding-inline: 3ch 0; font-family: ${t.fontMono}; font-size: ${fontSize('sm')}; font-weight: ${fontWeight('regular')}; color: var(--impakt-journey-code-words, ${t.surfaceCard}); }\n /* Live, it answers a pointer: it lifts when pointed at and sits when pressed. */\n :host([stage='live']) a.words:hover { transform: translateY(-2px); }\n :host([stage='live']) a.words:active { transform: translateY(1px); }\n a.words:focus-visible { outline: none; box-shadow: ${t.focusShadow}; }\n @media (prefers-reduced-motion: reduce) { .plate, .words { transition: none; } :host([stage='live']) a.words:hover, :host([stage='live']) a.words:active { transform: none; } }\n @media (forced-colors: active) {\n .plate { forced-color-adjust: none; }\n .note, .solid { background: Highlight; }\n .marks, .marks::before { border-color: CanvasText; }\n .window { background: Canvas; border: 1px solid CanvasText; color: CanvasText; }\n .wire { background: Canvas; border-color: CanvasText; }\n .words, :host([stage='wireframe']) .words, :host([stage='code']) .words { color: LinkText; forced-color-adjust: none; }\n :host(:is([stage='note'], [stage='component'], [stage='live'])) .words { color: HighlightText; }\n }\n `,\n ];\n\n private observer?: IntersectionObserver;\n\n connectedCallback(): void {\n super.connectedCallback();\n // The first render starts the watch; this is for a button taken off the page and put back.\n if (this.hasUpdated) this.watch();\n }\n\n disconnectedCallback(): void {\n super.disconnectedCallback();\n this.observer?.disconnect();\n this.observer = undefined;\n }\n\n protected willUpdate(changed: Map<string, unknown>): void {\n // A stage that is not one of the five would draw nothing at all, so it falls back to the finished button.\n if (changed.has('stage') && !isStage(this.stage)) this.stage = 'live';\n }\n\n protected updated(changed: Map<string, unknown>): void {\n if (changed.has('track')) this.watch();\n }\n\n /** Follow the sections named by `track`: the one across the middle of the screen sets the stage. */\n private watch(): void {\n this.observer?.disconnect();\n this.observer = undefined;\n if (!this.track || !this.isConnected || typeof IntersectionObserver !== 'function') return;\n let sections: Element[];\n try {\n sections = Array.from(this.ownerDocument.querySelectorAll(this.track)).filter((el) => isStage(el.getAttribute('data-journey-stage')));\n } catch {\n // Not a selector: nothing to follow.\n return;\n }\n if (!sections.length) return;\n // A line across the middle of the screen. A section is \"current\" while it crosses that line.\n this.observer = new IntersectionObserver((entries) => this.crossed(entries), { rootMargin: '-50% 0px -50% 0px', threshold: 0 });\n for (const section of sections) this.observer.observe(section);\n }\n\n private crossed(entries: IntersectionObserverEntry[]): void {\n const entry = entries.find((e) => e.isIntersecting);\n const stage = entry?.target.getAttribute('data-journey-stage');\n if (!isStage(stage) || stage === this.stage) return;\n this.stage = stage;\n this.dispatchEvent(new CustomEvent('impakt-journey-stage', { detail: { stage }, bubbles: true, composed: true }));\n }\n\n private lines(lines: string[] | undefined, fallback: number): TemplateResult[] {\n return lines?.length\n ? lines.map((line) => html`<span>${line}</span>`)\n : Array.from({ length: fallback }, (_, i) => html`<span class=\"rule\" style=${`inline-size:${[58, 72, 44][i % 3]}%`}></span>`);\n }\n\n render(): TemplateResult {\n const words = html`<span>${this.label}</span>${arrow}`;\n return html`<div class=\"frame\" part=\"frame\" aria-hidden=${this.decorative ? 'true' : nothing}>\n <span class=\"plate note\" aria-hidden=\"true\"></span>\n <span class=\"plate bar wire\" aria-hidden=\"true\"><svg viewBox=\"0 0 100 100\" preserveAspectRatio=\"none\" fill=\"none\" stroke=\"currentColor\" focusable=\"false\"><path d=\"M0 0 100 100M0 100 100 0\" vector-effect=\"non-scaling-stroke\" /></svg></span>\n <span class=\"plate bar shadow\" aria-hidden=\"true\"></span>\n <span class=\"plate bar solid\" aria-hidden=\"true\"></span>\n <span class=\"plate window\" aria-hidden=\"true\"><span class=\"before\">${this.lines(this.code?.before, 3)}</span><span></span><span class=\"after\">${this.lines(this.code?.after, 2)}</span></span>\n <span class=\"plate marks\" aria-hidden=\"true\"></span>\n ${this.decorative || !this.href ? html`<span class=\"words\" part=\"button\">${words}</span>` : html`<a class=\"words\" part=\"button\" href=${this.href}>${words}</a>`}\n </div>`;\n }\n}\n\ncustomElements.define('impakt-journey-button', ImpaktJourneyButton);\ndeclare global {\n interface HTMLElementTagNameMap {\n 'impakt-journey-button': ImpaktJourneyButton;\n }\n}\n", "/**\n * The blocks a studio's own site is built from: the numbered list of work, a\n * row of figures, and the questions at the foot of a page.\n */\nimport { css, html, nothing, type TemplateResult } from 'lit';\nimport {\n ImpaktElement,\n focusRing,\n fontSize,\n fontWeight,\n lineHeight,\n lockScroll,\n space,\n spaceAround,\n t,\n token,\n unlockScroll,\n type NavLink,\n} from '@atomic-ui/ui';\n\n/** One project in a list of work. */\nexport interface WorkItem {\n id?: string;\n /** The project's name, set large. */\n name: string;\n /** What it is and who it is for, such as \"Web platform \u00B7 Automotive\". */\n meta?: string;\n /** Where the row goes when it is pressed. Leave empty for a row that goes nowhere. */\n href?: string;\n}\n\n/** The arrow at the end of a row that goes somewhere. Drawn, so no font has to hold the glyph. */\nconst arrow = html`<svg viewBox=\"0 0 22 22\" width=\"22\" height=\"22\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" aria-hidden=\"true\" focusable=\"false\">\n <path d=\"M5 17 17 5M8 5h9v9\" />\n</svg>`;\n\n/**\n * A numbered list of projects, each name set large: the work on a studio's\n * home page, or the index on its work page.\n *\n * **Each row is one link.** The link sits on the project's name, which is a\n * heading, and is stretched over the row, so the whole row can be pressed\n * while a screen reader meets one link with one name (2.4.4, 2.5.8). The\n * number and the arrow are decoration and are hidden from it; the list itself\n * says how many projects there are and which one this is (1.3.1).\n *\n * **Pointing at a row and focusing it look the same.** The row turns to the\n * text colour with the card colour on it, a pair every brand's tokens already\n * hold at 4.5:1, so the state never depends on a colour of its own (1.4.3,\n * 1.4.11). The focus ring is still drawn over it (2.4.7).\n *\n * The names shrink with the block's own width, not the window's, so the list\n * reads the same in a narrow column as on a phone (1.4.10).\n *\n * @category content\n * @icon list\n */\nexport class ImpaktWorkList extends ImpaktElement {\n static properties = {\n items: { type: Array },\n headingLevel: { type: Number, attribute: 'heading-level' },\n start: { type: Number },\n label: { type: String },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n /** The projects, in order. */\n declare items: WorkItem[];\n /** The heading level of each project's name. It depends on what is above the list on the page. */\n declare headingLevel: number;\n /** The number the first project is given. */\n declare start: number;\n /** A name for the list, so a screen reader can tell it from other lists on the page. Leave empty for none. */\n declare label: string;\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n constructor() {\n super();\n this.items = [];\n this.headingLevel = 3;\n this.start = 1;\n this.label = '';\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n spaceAround,\n css`\n :host { display: block; container: impakt-work-list / inline-size; }\n ol { list-style: none; margin: 0; padding: 0; border-block-start: ${t.borderThin} solid ${t.text}; }\n li { position: relative; display: grid; grid-template-columns: 3rem minmax(0, 1fr) auto auto; align-items: center; column-gap: ${space(6)}; padding: ${space(5)} ${space(8)}; border-block-end: ${t.borderThin} solid ${t.text}; transition: background-color 140ms ease-out, color 140ms ease-out; }\n .number { font-family: ${t.fontMono}; font-size: ${fontSize('sm')}; font-variant-numeric: tabular-nums; color: ${t.textMuted}; }\n .name { font-family: ${t.fontHeading}; font-size: clamp(2rem, 7cqi, 4.5rem); font-weight: ${fontWeight('semibold')}; line-height: 1; letter-spacing: -0.05em; color: ${t.text}; overflow-wrap: anywhere; }\n .name a { color: inherit; text-decoration: none; }\n /* The link is stretched over the row, so the row is one target. */\n .name a::after { content: ''; position: absolute; inset: 0; }\n .name a:focus-visible { outline: none; }\n .name a:focus-visible::after { box-shadow: ${t.focusShadow}; }\n .meta { font-family: ${t.fontMono}; font-size: ${fontSize('sm')}; letter-spacing: ${t.trackingWide}; text-transform: uppercase; color: ${t.textMuted}; }\n .arrow { display: flex; color: ${t.text}; }\n /* Pointed at or focused, the row turns to ink. The card colour on the text colour is a pair every brand already holds at 4.5:1. */\n li:has(a):hover, li:has(a:focus-visible) { background: ${t.text}; }\n li:has(a):hover .name, li:has(a:focus-visible) .name { color: ${t.surfaceCard}; }\n li:has(a):hover :is(.number, .meta), li:has(a:focus-visible) :is(.number, .meta) { color: color-mix(in srgb, ${t.surfaceCard} 78%, ${t.text}); }\n li:has(a):hover .arrow, li:has(a:focus-visible) .arrow { color: ${token('color.accent.default', 'currentColor')}; }\n @container impakt-work-list (max-width: 40rem) {\n li { grid-template-columns: 2rem minmax(0, 1fr) auto; column-gap: ${space(3)}; padding-inline: ${space(4)}; }\n .meta { grid-column: 2; grid-row: 2; margin-block-start: ${space(2)}; }\n .arrow { grid-column: 3; grid-row: 1; }\n }\n @media (forced-colors: active) {\n li:has(a):hover, li:has(a:focus-visible) { background: Canvas; outline: 2px solid Highlight; outline-offset: -2px; }\n li:has(a):hover :is(.name, .number, .meta, .arrow), li:has(a:focus-visible) :is(.name, .number, .meta, .arrow) { color: CanvasText; }\n }\n `,\n ];\n\n render(): TemplateResult {\n // role=\"list\" is set by hand: a list with its markers removed is not announced as a list by every screen reader.\n return html`<ol role=\"list\" part=\"list\" aria-label=${this.label || nothing}>\n ${this.items.map((item, index) => {\n const number = String(this.start + index).padStart(2, '0');\n return html`<li part=\"row\">\n <span class=\"number\" aria-hidden=\"true\">${number}</span>\n <div class=\"name\" part=\"name\" role=\"heading\" aria-level=${this.headingLevel}>\n ${item.href ? html`<a href=${item.href} part=\"link\">${item.name}</a>` : item.name}\n </div>\n ${item.meta ? html`<span class=\"meta\" part=\"meta\">${item.meta}</span>` : html`<span></span>`}\n ${item.href ? html`<span class=\"arrow\">${arrow}</span>` : html`<span></span>`}\n </li>`;\n })}\n </ol>`;\n }\n}\n\n/** One figure in a row of them. */\nexport interface StatRowItem {\n /** The number, written as it should appear, such as \"161 ms\" or \"4\". */\n figure: string;\n /** What the number counts. */\n label: string;\n /** A line more, if the label needs it. */\n note?: string;\n}\n\n/**\n * A row of figures under a rule, each with what it counts: \"4 live products\",\n * \"161 ms response time\".\n *\n * The figures are a list, so a screen reader says how many there are, and each\n * is read as one phrase, \"161 ms response time\", not a bare number followed\n * some way off by its label (1.3.1). The row wraps by its own width: four\n * across, then two, then one, with nothing to scroll sideways at 320px\n * (1.4.10).\n *\n * @category content\n * @icon stat\n */\nexport class ImpaktStatRow extends ImpaktElement {\n static properties = {\n items: { type: Array },\n label: { type: String },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n /** The figures, in order. Four fit a row on a wide page. */\n declare items: StatRowItem[];\n /** A name for the row, such as \"Live products\", read before the figures. Leave empty for none. */\n declare label: string;\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n constructor() {\n super();\n this.items = [];\n this.label = '';\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n spaceAround,\n css`\n :host { display: block; container: impakt-stat-row / inline-size; }\n ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); gap: ${space(6)}; }\n li { border-block-start: ${t.borderThin} solid ${t.rule}; padding-block-start: ${space(5)}; }\n p { margin: 0; display: flex; flex-direction: column; gap: ${space(2)}; }\n .value { font-family: ${t.fontHeading}; font-size: clamp(2.25rem, 6cqi, 3.25rem); font-weight: ${fontWeight('semibold')}; line-height: 1; letter-spacing: -0.04em; color: ${t.textHeading}; }\n .label { font-size: ${fontSize('sm')}; line-height: ${lineHeight('normal')}; color: ${t.textMuted}; }\n .note { font-size: ${fontSize('sm')}; color: ${t.textMuted}; }\n `,\n ];\n\n render(): TemplateResult {\n return html`<ul role=\"list\" part=\"list\" aria-label=${this.label || nothing}>\n ${this.items.map(\n (item) =>\n html`<li part=\"stat\">\n <p><span class=\"value\" part=\"value\">${item.figure}</span> <span class=\"label\" part=\"label\">${item.label}</span>${item.note ? html` <span class=\"note\">${item.note}</span>` : nothing}</p>\n </li>`,\n )}\n </ul>`;\n }\n}\n\n/** One question and its answer. */\nexport interface FaqItem {\n id: string;\n /** The question. */\n heading: string;\n /** The answer, as plain text. An answer with links or a list is slotted as `panel-<id>` instead. */\n body: string;\n}\n\n/**\n * The questions at the foot of a page, under a heading: a title, a line of\n * introduction, and the questions as sections that open.\n *\n * It is `impakt-accordion` with the heading a page always writes above it, so\n * the levels cannot drift: the questions are always one level below the\n * block's own heading (1.3.1). With a heading, the block is a region named by\n * it, so a screen reader can jump straight to the questions (2.4.1).\n *\n * An answer that is more than words is slotted as `panel-<id>`, exactly as\n * on the accordion, and is passed through to it.\n *\n * @category content\n * @icon accordion\n */\nexport class ImpaktFaq extends ImpaktElement {\n static properties = {\n eyebrow: { type: String },\n heading: { type: String },\n lead: { type: String },\n items: { type: Array },\n headingLevel: { type: Number, attribute: 'heading-level' },\n open: { type: Array },\n multiple: { type: Boolean },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n /** The small line above the heading, such as \"Questions\". */\n declare eyebrow: string;\n /** The block's heading, such as \"Questions founders ask us first.\" */\n declare heading: string;\n /** A line under the heading. */\n declare lead: string;\n /** The questions, in order. */\n declare items: FaqItem[];\n /** The level of the block's heading. The questions are one level below it. */\n declare headingLevel: number;\n /** The ids of the questions that start open. */\n declare open: string[];\n /** Let more than one answer be open at once. */\n declare multiple: boolean;\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n constructor() {\n super();\n this.eyebrow = '';\n this.heading = '';\n this.lead = '';\n this.items = [];\n this.headingLevel = 2;\n this.open = [];\n this.multiple = true;\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n spaceAround,\n css`\n :host { display: block; container: impakt-faq / inline-size; }\n .head { display: flex; flex-direction: column; gap: ${space(4)}; margin-block-end: ${space(10)}; max-inline-size: 44rem; }\n .eyebrow { margin: 0; font-family: ${t.fontEyebrow}; font-size: ${fontSize('sm')}; color: var(--impakt-eyebrow, ${t.textMuted}); }\n .heading { font-family: ${t.fontHeading}; font-size: clamp(2rem, 6cqi, 3.25rem); font-weight: ${fontWeight('semibold')}; line-height: 1.04; letter-spacing: -0.04em; color: ${t.textHeading}; }\n .lead { margin: 0; font-size: ${fontSize('md')}; line-height: ${lineHeight('normal')}; color: ${t.textMuted}; }\n impakt-accordion { border-block-start: ${t.borderThin} solid ${t.rule}; }\n `,\n ];\n\n render(): TemplateResult {\n const headingId = this.id_('heading');\n const level = Math.min(Math.max(this.headingLevel, 1), 5);\n const head =\n this.eyebrow || this.heading || this.lead\n ? html`<div class=\"head\" part=\"head\">\n ${this.eyebrow ? html`<p class=\"eyebrow\" part=\"eyebrow\">${this.eyebrow}</p>` : nothing}\n ${this.heading ? html`<div id=${headingId} class=\"heading\" part=\"heading\" role=\"heading\" aria-level=${level}>${this.heading}</div>` : nothing}\n ${this.lead ? html`<p class=\"lead\" part=\"lead\">${this.lead}</p>` : nothing}\n </div>`\n : nothing;\n // Each answer's slot is passed through to the accordion, with the plain answer as what shows when nothing is slotted.\n const accordion = html`<impakt-accordion part=\"questions\" .items=${this.items} .headingLevel=${level + 1} .open=${this.open} .multiple=${this.multiple}>\n ${this.items.map((item) => html`<slot name=${`panel-${item.id}`} slot=${`panel-${item.id}`}>${item.body}</slot>`)}\n </impakt-accordion>`;\n return this.heading ? html`<section aria-labelledby=${headingId}>${head}${accordion}</section>` : html`<div>${head}${accordion}</div>`;\n }\n}\n\n/**\n * A site's menu as a whole screen: a few large links, for a phone or for a\n * site with only a handful of pages.\n *\n * **It is a native `<dialog>` opened with `showModal()`**, as the drawer is, so\n * the focus trap, Escape, the inert page behind it and the return of focus to\n * the button that opened it all come from the browser (2.1.2, 2.4.3). The page\n * behind does not scroll while it is open. The button that opens it is the\n * page's own; set `open` from it and listen for `impakt-close`.\n *\n * **The links are a navigation landmark with a name**, and the page the reader\n * is on carries `aria-current=\"page\"` and is marked with a square, so the mark\n * does not depend on colour (1.4.1). A brand whose ink is dark may also colour\n * it, by setting `--impakt-site-menu-current`.\n *\n * The menu is drawn in ink: the text colour as the background with the card\n * colour on it, a pair every brand already holds at 4.5:1. A component slotted\n * at its foot takes the same colours through its tokens; a plain link there\n * keeps the page's own link colour, so slot `impakt-link` instead.\n *\n * @category navigation\n * @icon menu\n * @slot footer - Under the links: a call to action, an email address.\n * @fires {CustomEvent<null>} impakt-close - When the menu is closed, by its button, by Escape or by following a link.\n */\nexport class ImpaktSiteMenu extends ImpaktElement {\n static properties = {\n open: { type: Boolean, reflect: true },\n links: { type: Array },\n current: { type: String },\n brand: { type: String },\n home: { type: String },\n label: { type: String },\n closeText: { type: String, attribute: 'close-text' },\n };\n /** Whether the menu is showing. */\n declare open: boolean;\n /** The pages, in order. */\n declare links: NavLink[];\n /** The `href` of the page the reader is on, so its link is marked. */\n declare current: string;\n /** The site's name, at the top. */\n declare brand: string;\n /** Where the site's name goes. */\n declare home: string;\n /** The menu's name, read when it opens and as the name of its links. */\n declare label: string;\n /** The words on the button that closes it. */\n declare closeText: string;\n\n constructor() {\n super();\n this.open = false;\n this.links = [];\n this.current = '';\n this.brand = '';\n this.home = '/';\n this.label = 'Menu';\n this.closeText = 'Close';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n css`\n /* The ink colours are taken on the host, because the dialog repaints the text colour for what is inside it. */\n :host { --impakt-menu: ${t.text}; --impakt-menu-on: ${t.surfaceCard}; --impakt-menu-muted: color-mix(in srgb, ${t.surfaceCard} 78%, ${t.text}); --impakt-menu-rule: color-mix(in srgb, ${t.surfaceCard} 18%, ${t.text}); }\n dialog { box-sizing: border-box; display: none; flex-direction: column; inline-size: 100vw; max-inline-size: 100vw; block-size: 100dvh; max-block-size: 100dvh; margin: 0; padding: 0; border: 0; overflow: auto; background: var(--impakt-menu); color: var(--impakt-menu-on); }\n dialog[open] { display: flex; }\n dialog::backdrop { background: var(--impakt-menu); }\n .bar { display: flex; align-items: center; justify-content: space-between; gap: ${space(4)}; padding: ${space(2)} ${space(4)}; border-block-end: ${t.borderThin} solid var(--impakt-menu-rule); }\n .brand { color: inherit; text-decoration: none; font-family: ${t.fontHeading}; font-size: ${fontSize('md')}; font-weight: ${fontWeight('semibold')}; border-radius: ${t.radiusSm}; }\n .close { display: inline-flex; align-items: center; gap: ${space(2)}; min-block-size: 44px; padding: 0 ${space(4)}; font: inherit; font-size: ${fontSize('sm')}; font-weight: ${fontWeight('medium')}; color: var(--impakt-menu); background: var(--impakt-menu-on); border: 0; border-radius: ${t.radius}; cursor: pointer; }\n nav { flex: 1; padding: ${space(6)} ${space(5)} 0; }\n ol { list-style: none; margin: 0; padding: 0; }\n li { border-block-end: ${t.borderThin} solid var(--impakt-menu-rule); }\n li a { display: flex; align-items: center; justify-content: space-between; gap: ${space(4)}; padding-block: ${space(4)}; color: inherit; text-decoration: none; font-family: ${t.fontHeading}; font-size: clamp(2.25rem, 12vw, 3.5rem); font-weight: ${fontWeight('semibold')}; line-height: 1; letter-spacing: -0.05em; }\n li a:hover .words { text-decoration: underline; text-decoration-thickness: 0.06em; text-underline-offset: 0.12em; }\n .number { font-family: ${t.fontMono}; font-size: ${fontSize('sm')}; font-weight: ${fontWeight('regular')}; letter-spacing: 0; color: var(--impakt-menu-muted); }\n /*\n * The current page is marked with a square. Its colour stays the menu's own text colour unless a brand sets\n * --impakt-site-menu-current, because an accent is only readable on ink when the brand's ink is dark (1.4.3).\n */\n a[aria-current] { color: var(--impakt-site-menu-current, var(--impakt-menu-on)); }\n a[aria-current] .words::before { content: ''; display: inline-block; inline-size: 0.28em; block-size: 0.28em; margin-inline-end: 0.22em; vertical-align: 0.18em; background: currentColor; }\n .foot { display: flex; flex-direction: column; gap: ${space(4)}; padding: ${space(8)} ${space(5)} calc(${space(8)} + env(safe-area-inset-bottom)); }\n .foot[hidden] { display: none; }\n /* What is slotted at the foot is read on ink too. */\n ::slotted(*) { --impakt-color-text-default: var(--impakt-menu-on); --impakt-color-text-heading: var(--impakt-menu-on); --impakt-color-text-muted: var(--impakt-menu-muted); --impakt-color-text-link: var(--impakt-menu-on); --impakt-color-text-link-hover: var(--impakt-menu-on); color: var(--impakt-menu-on); }\n @media (forced-colors: active) { dialog { border: 1px solid CanvasText; } .close { border: 1px solid ButtonText; } }\n `,\n ];\n\n private hasFooter = false;\n\n private get dialog(): HTMLDialogElement | null {\n return this.renderRoot.querySelector('dialog');\n }\n\n updated(changed: Map<string, unknown>): void {\n if (!changed.has('open')) return;\n const dialog = this.dialog;\n if (!dialog) return;\n if (this.open) {\n if (typeof dialog.showModal === 'function') dialog.showModal();\n else dialog.setAttribute('open', '');\n lockScroll(this);\n } else {\n if (typeof dialog.close === 'function' && dialog.open) dialog.close();\n else dialog.removeAttribute('open');\n unlockScroll(this);\n }\n }\n\n disconnectedCallback(): void {\n super.disconnectedCallback();\n unlockScroll(this);\n }\n\n private close(): void {\n if (!this.open) return;\n this.open = false;\n this.dispatchEvent(new CustomEvent('impakt-close', { bubbles: true, composed: true }));\n }\n\n private footerChanged(event: Event): void {\n this.hasFooter = (event.target as HTMLSlotElement).assignedNodes().length > 0;\n this.requestUpdate();\n }\n\n render(): TemplateResult {\n return html`<dialog part=\"dialog\" aria-label=${this.label} @cancel=${() => this.close()} @close=${() => this.close()}>\n <div class=\"bar\" part=\"bar\">\n ${this.brand ? html`<a class=\"brand\" href=${this.home || '/'} part=\"brand\">${this.brand}</a>` : html`<span></span>`}\n <button class=\"close\" type=\"button\" part=\"close\" @click=${() => this.close()}>\n <span>${this.closeText}</span>\n <svg viewBox=\"0 0 12 12\" width=\"12\" height=\"12\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" aria-hidden=\"true\" focusable=\"false\"><path d=\"M1 1l10 10M11 1 1 11\" /></svg>\n </button>\n </div>\n <nav aria-label=${this.label} part=\"nav\">\n <ol role=\"list\">\n ${(this.links ?? []).map((link, index) => {\n const current = !!this.current && link.href === this.current;\n // Following a link closes the menu, so a link to a place on the same page does not leave it open over that place.\n return html`<li>\n <a href=${link.href} aria-current=${current ? 'page' : nothing} part=\"link\" @click=${() => this.close()}>\n <span class=\"words\">${link.label}</span><span class=\"number\" aria-hidden=\"true\">${String(index + 1).padStart(2, '0')}</span>\n </a>\n </li>`;\n })}\n </ol>\n </nav>\n <div class=\"foot\" part=\"footer\" ?hidden=${!this.hasFooter}><slot name=\"footer\" @slotchange=${this.footerChanged}></slot></div>\n </dialog>`;\n }\n}\n\n/**\n * An offer, set out in two halves: what it is, with one action, and a short\n * numbered list of what you get.\n *\n * It draws no background of its own. Put it in `impakt-section` with the\n * `accent` or `ink` tone and it takes that band's colours, so the words on it\n * are always the colour the tokens measured against the band (1.4.3).\n *\n * The points are an ordered list, so a screen reader says how many there are;\n * the numbers drawn beside them are decoration (1.3.1). The halves stack by\n * the block's own width (1.4.10).\n *\n * @category content\n * @icon megaphone\n * @slot actions - The action: one button.\n */\nexport class ImpaktOffer extends ImpaktElement {\n static properties = {\n eyebrow: { type: String },\n heading: { type: String },\n lead: { type: String },\n points: { type: Array },\n headingLevel: { type: Number, attribute: 'heading-level' },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n /** The small line above the heading, such as \"Free for founders and product owners\". */\n declare eyebrow: string;\n /** What is offered, such as \"Get a 48-hour product teardown.\" */\n declare heading: string;\n /** A sentence or two more. */\n declare lead: string;\n /** What you get, one short line each. */\n declare points: string[];\n declare headingLevel: number;\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n constructor() {\n super();\n this.eyebrow = '';\n this.heading = '';\n this.lead = '';\n this.points = [];\n this.headingLevel = 2;\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n spaceAround,\n css`\n :host { display: block; container: impakt-offer / inline-size; }\n .offer { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: ${space(12)}; align-items: start; }\n .copy { display: flex; flex-direction: column; align-items: flex-start; gap: ${space(5)}; }\n .eyebrow { margin: 0; font-family: ${t.fontEyebrow}; font-size: ${fontSize('sm')}; color: var(--impakt-eyebrow, ${t.textMuted}); }\n .heading { font-family: ${t.fontHeading}; font-size: clamp(2rem, 6cqi, 3.75rem); font-weight: ${fontWeight('semibold')}; line-height: 1; letter-spacing: -0.04em; color: ${t.textHeading}; }\n .lead { margin: 0; max-inline-size: 32rem; font-size: ${fontSize('md')}; line-height: ${lineHeight('normal')}; color: ${t.text}; }\n ol { list-style: none; margin: 0; padding: 0; }\n li { display: flex; gap: ${space(5)}; padding-block: ${space(5)}; border-block-start: ${t.borderThin} solid ${t.text}; font-size: ${fontSize('lg')}; font-weight: ${fontWeight('medium')}; line-height: 1.2; color: ${t.text}; }\n .number { flex: none; font-family: ${t.fontMono}; font-size: ${fontSize('sm')}; font-weight: ${fontWeight('regular')}; line-height: 1.6; }\n @container impakt-offer (max-width: 44rem) { .offer { grid-template-columns: 1fr; gap: ${space(8)}; } }\n `,\n ];\n\n render(): TemplateResult {\n const level = Math.min(Math.max(this.headingLevel, 1), 6);\n return html`<div class=\"offer\" part=\"offer\">\n <div class=\"copy\">\n ${this.eyebrow ? html`<p class=\"eyebrow\" part=\"eyebrow\">${this.eyebrow}</p>` : nothing}\n ${this.heading ? html`<div class=\"heading\" part=\"heading\" role=\"heading\" aria-level=${level}>${this.heading}</div>` : nothing}\n ${this.lead ? html`<p class=\"lead\" part=\"lead\">${this.lead}</p>` : nothing}\n <slot name=\"actions\"></slot>\n </div>\n ${\n (this.points ?? []).length\n ? html`<ol role=\"list\" part=\"points\">\n ${this.points.map((point, index) => html`<li><span class=\"number\" aria-hidden=\"true\">${String(index + 1).padStart(2, '0')}</span><span>${point}</span></li>`)}\n </ol>`\n : nothing\n }\n </div>`;\n }\n}\n\n/**\n * A card for one article: what it is filed under, its title and a line about\n * it.\n *\n * **The card is one link.** The link sits on the title, which is a heading,\n * and is stretched over the card, so the whole card can be pressed while a\n * screen reader meets one link named by the title, not a \"Read more\" that says\n * nothing out of context (2.4.4). `link-text` adds a visible line such as\n * \"Read\"; it is decoration and is hidden from a screen reader, which already\n * has the title.\n *\n * @category content\n * @icon card\n */\nexport class ImpaktPostCard extends ImpaktElement {\n static properties = {\n heading: { type: String },\n text: { type: String },\n meta: { type: String },\n href: { type: String },\n linkText: { type: String, attribute: 'link-text' },\n headingLevel: { type: Number, attribute: 'heading-level' },\n };\n /** The article's title. */\n declare heading: string;\n /** A line about it. */\n declare text: string;\n /** What it is filed under and how long it is, such as \"Pricing \u00B7 7 min read\". */\n declare meta: string;\n /** Where the card goes. */\n declare href: string;\n /** A visible line at the foot of the card, such as \"Read\". Leave empty for none. */\n declare linkText: string;\n declare headingLevel: number;\n\n constructor() {\n super();\n this.heading = '';\n this.text = '';\n this.meta = '';\n this.href = '';\n this.linkText = '';\n this.headingLevel = 3;\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n css`\n :host { display: block; block-size: 100%; }\n article { position: relative; box-sizing: border-box; block-size: 100%; display: flex; flex-direction: column; gap: ${space(4)}; padding: ${space(6)}; background: ${t.surfaceCard}; border: ${t.borderThin} solid ${t.text}; border-radius: ${t.radius}; transition: background-color 140ms ease-out; }\n .meta { margin: 0; font-family: ${t.fontMono}; font-size: ${fontSize('sm')}; letter-spacing: ${t.trackingWide}; text-transform: uppercase; color: ${t.textMuted}; }\n .heading { font-family: ${t.fontHeading}; font-size: ${fontSize('xl')}; font-weight: ${fontWeight('semibold')}; line-height: 1.15; letter-spacing: -0.025em; color: ${t.text}; }\n .heading a { color: inherit; text-decoration: none; }\n .heading a::after { content: ''; position: absolute; inset: 0; border-radius: inherit; }\n .heading a:focus-visible { outline: none; }\n .heading a:focus-visible::after { box-shadow: ${t.focusShadow}; }\n article:has(a):hover .heading { text-decoration: underline; text-decoration-thickness: 0.08em; text-underline-offset: 0.18em; }\n .text { margin: 0; font-size: ${fontSize('sm')}; line-height: ${lineHeight('normal')}; color: ${t.textMuted}; }\n .more { margin-block-start: auto; font-family: ${t.fontMono}; font-size: ${fontSize('sm')}; letter-spacing: ${t.trackingWide}; text-transform: uppercase; color: ${t.text}; }\n @media (forced-colors: active) { article { border-color: CanvasText; } }\n `,\n ];\n\n render(): TemplateResult {\n const level = Math.min(Math.max(this.headingLevel, 1), 6);\n return html`<article part=\"card\">\n ${this.meta ? html`<p class=\"meta\" part=\"meta\">${this.meta}</p>` : nothing}\n <div class=\"heading\" part=\"heading\" role=\"heading\" aria-level=${level}>${this.href ? html`<a href=${this.href} part=\"link\">${this.heading}</a>` : this.heading}</div>\n ${this.text ? html`<p class=\"text\" part=\"text\">${this.text}</p>` : nothing}\n ${this.linkText && this.href ? html`<span class=\"more\" aria-hidden=\"true\">${this.linkText} \u2192</span>` : nothing}\n </article>`;\n }\n}\n\n/**\n * A word or two of a heading picked out as if selected in a design tool: the\n * accent colour behind it, an outline and four handles.\n *\n * It is decoration round real text. The words stay in the heading, in the\n * page, so they are read, found and translated as the rest of it is; the\n * handles and the optional label are hidden from a screen reader (1.3.1).\n * The words on the accent are the colour the tokens measured against it\n * (1.4.3). Nothing moves, so there is nothing to stop for reduced motion.\n *\n * @category content\n * @icon text\n * @slot - The words to pick out.\n */\nexport class ImpaktHighlight extends ImpaktElement {\n static properties = {\n label: { type: String },\n };\n /** A small tag under the words, such as \"Design \u00B7 H1 / 120\". It is decoration and is not read. */\n declare label: string;\n\n constructor() {\n super();\n this.label = '';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n css`\n :host { display: inline-block; position: relative; padding-inline: 0.1em; margin-inline: -0.02em; background: ${token('color.accent.default', '#ffd43b')}; color: ${token('color.accent.on', '#1a1a1a')}; outline: 1.5px solid ${token('color.accent.on', '#1a1a1a')}; outline-offset: -1px; }\n .handle { position: absolute; inline-size: 8px; block-size: 8px; box-sizing: border-box; background: ${t.surfaceCard}; border: 1.5px solid ${token('color.accent.on', '#1a1a1a')}; }\n .handle:nth-of-type(1) { inset-block-start: -4px; inset-inline-start: -4px; }\n .handle:nth-of-type(2) { inset-block-start: -4px; inset-inline-end: -4px; }\n .handle:nth-of-type(3) { inset-block-end: -4px; inset-inline-start: -4px; }\n .handle:nth-of-type(4) { inset-block-end: -4px; inset-inline-end: -4px; }\n .label { position: absolute; inset-block-start: calc(100% + 8px); inset-inline-start: 0; padding: 3px 7px; white-space: nowrap; font-family: ${t.fontMono}; font-size: 0.6875rem; font-weight: ${fontWeight('medium')}; line-height: 1.4; letter-spacing: 0.06em; text-transform: uppercase; color: ${t.surfaceCard}; background: ${t.text}; border-radius: 3px; }\n @media (forced-colors: active) { :host { forced-color-adjust: none; background: Highlight; color: HighlightText; outline-color: HighlightText; } .handle { border-color: HighlightText; background: Canvas; } .label { background: CanvasText; color: Canvas; } }\n `,\n ];\n\n render(): TemplateResult {\n return html`<slot></slot><span class=\"handle\" aria-hidden=\"true\"></span><span class=\"handle\" aria-hidden=\"true\"></span><span class=\"handle\" aria-hidden=\"true\"></span><span class=\"handle\" aria-hidden=\"true\"></span>${\n this.label ? html`<span class=\"label\" part=\"label\" aria-hidden=\"true\">${this.label}</span>` : nothing\n }`;\n }\n}\n\ncustomElements.define('impakt-work-list', ImpaktWorkList);\ncustomElements.define('impakt-stat-row', ImpaktStatRow);\ncustomElements.define('impakt-faq', ImpaktFaq);\ncustomElements.define('impakt-site-menu', ImpaktSiteMenu);\ncustomElements.define('impakt-offer', ImpaktOffer);\ncustomElements.define('impakt-post-card', ImpaktPostCard);\ncustomElements.define('impakt-highlight', ImpaktHighlight);\ndeclare global {\n interface HTMLElementTagNameMap {\n 'impakt-work-list': ImpaktWorkList;\n 'impakt-stat-row': ImpaktStatRow;\n 'impakt-faq': ImpaktFaq;\n 'impakt-site-menu': ImpaktSiteMenu;\n 'impakt-offer': ImpaktOffer;\n 'impakt-post-card': ImpaktPostCard;\n 'impakt-highlight': ImpaktHighlight;\n }\n}\n", "import { css, html, nothing, type TemplateResult } from 'lit';\nimport { say, ImpaktElement, focusRing, targetSize, visuallyHidden, fontWeight, lineHeight, space, spaceAround, t, token, type, iconSvg } from '@atomic-ui/ui';\n\nconst token_accent = token('color.accent.default', '#c8a15a');\n\nconst reducedMotion = (): boolean => typeof matchMedia === 'function' && matchMedia('(prefers-reduced-motion: reduce)').matches;\n\n/** A round control laid over or beside content: previous, next, close. */\nconst roundButton = css`\n .round { ${targetSize} display: inline-flex; align-items: center; justify-content: center; inline-size: 44px; block-size: 44px; padding: 0; color: ${t.text}; background: ${t.surfaceCard}; border: ${t.borderThin} solid ${t.rule}; border-radius: 50%; box-shadow: ${t.shadowSm}; cursor: pointer; transition: box-shadow 120ms ease-in-out, background-color 120ms ease-in-out; }\n .round:hover:not(:disabled) { box-shadow: ${t.shadowMd}; }\n .round:disabled { opacity: 0.4; cursor: not-allowed; box-shadow: none; }\n`;\n\nconst headingStyles = css`\n .eyebrow { margin: 0; color: var(--impakt-eyebrow, var(--impakt-color-text-eyebrow, ${t.brand})); ${type('sm')} font-size: var(--impakt-font-size-eyebrow, var(--impakt-font-size-sm, 0.875rem)); font-family: ${t.fontEyebrow}; font-weight: var(--impakt-font-weight-eyebrow, ${fontWeight('semibold')}); letter-spacing: ${t.trackingWide}; text-transform: uppercase; }\n .h { margin: 0; color: ${t.textHeading}; font-family: ${t.fontHeading}; font-weight: ${fontWeight('bold')}; letter-spacing: ${t.trackingTight}; text-wrap: balance; }\n .lead { margin: 0; color: ${t.textMuted}; text-wrap: pretty; }\n`;\n\n/**\n * Slides that move sideways: house types, reviews, the rooms of a show home.\n * Put anything in it, one child to a slide.\n *\n * It follows the ARIA carousel pattern. Each slide is named \"2 of 6\", a live\n * region says where you are, and it can be moved with the buttons, the dots,\n * the arrow keys, a swipe or a scroll.\n *\n * **It moves only when asked.** Autoplay is off by default. Turned on, it has a\n * Pause button, stops while pointed at or focused, and never runs for someone\n * who has asked for reduced motion (2.2.2).\n *\n * @category content\n * @icon carousel\n * @slot - The slides, one child to each.\n */\nexport class ImpaktCarousel extends ImpaktElement {\n static properties = {\n label: { type: String },\n perView: { type: String, reflect: true, attribute: 'per-view' },\n arrows: { type: String, reflect: true },\n autoplay: { type: Boolean, reflect: true },\n seconds: { type: Number },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n /** What the slides are, for a screen reader, such as \"House types\". */\n declare label: string;\n /** How many slides show at once on a wide screen. A tablet shows at most two, and a phone one. */\n declare perView: '1' | '2' | '3';\n /** Where the arrows sit: under the slides, or level with the heading above them. */\n declare arrows: 'below' | 'top';\n /** Move on by itself. People can pause it, and it never runs for those who ask for less motion. */\n declare autoplay: boolean;\n /** How long each slide stays, when it moves by itself. */\n declare seconds: number;\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n private index = 0;\n private count = 0;\n /** How many slides fit right now, which the width decides. */\n private visible: number | null = null;\n /** Where a button or dot is taking the row. Until it arrives, the scroll position is not the truth. */\n private heading: number | null = null;\n private settle: ReturnType<typeof setTimeout> | undefined;\n private observer: ResizeObserver | undefined;\n private paused = false;\n private held = false;\n private timer: ReturnType<typeof setInterval> | undefined;\n\n constructor() {\n super();\n this.label = 'Slides';\n this.perView = '1';\n this.arrows = 'below';\n this.autoplay = false;\n this.seconds = 6;\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n spaceAround,\n roundButton,\n css`\n :host { display: block; container-type: inline-size; --most: 1; --gap: ${space(6)}; }\n :host([per-view='2']) { --most: 2; }\n :host([per-view='3']) { --most: 3; }\n .track { --per: var(--most); display: flex; gap: var(--gap); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-block: ${space(1)} ${space(2)}; border-radius: ${t.radiusLg}; }\n .track::-webkit-scrollbar { display: none; }\n ::slotted(*) { flex: 0 0 calc((100% - (var(--per) - 1) * var(--gap)) / var(--per)); min-inline-size: 0; scroll-snap-align: start; box-sizing: border-box; }\n /* Whole slides only: a slice of the next one reads as content spilling out of the page. */\n @container (max-width: 60rem) { .track { --per: min(var(--most), 2); } }\n @container (max-width: 40rem) { .track { --per: 1; --gap: ${space(4)}; } }\n .controls { display: flex; align-items: center; justify-content: space-between; gap: ${space(4)}; margin-block-start: ${space(4)}; }\n .dots { display: flex; flex-wrap: wrap; gap: ${space(1)}; }\n .dot { ${targetSize} display: inline-flex; align-items: center; justify-content: center; padding: 0; background: transparent; border: 0; cursor: pointer; border-radius: ${t.radiusSm}; }\n .dot span { display: block; inline-size: 8px; block-size: 8px; border-radius: 999px; background: ${t.rule}; transition: inline-size 150ms ease-in-out, background-color 150ms ease-in-out; }\n .dot[aria-current='true'] span { inline-size: 24px; background: ${t.brand}; }\n .buttons { display: flex; gap: ${space(2)}; }\n section { position: relative; }\n @container (min-width: 40.01rem) { :host([arrows='top']) .buttons { position: absolute; inset-block-end: calc(100% + ${space(4)}); inset-inline-end: 0; } }\n .sr-only { ${visuallyHidden} }\n @media (forced-colors: active) { .dot span { background: CanvasText; } .dot[aria-current='true'] span { background: Highlight; } }\n `,\n ];\n\n private get track(): HTMLElement | null {\n return this.renderRoot.querySelector('.track');\n }\n\n private get slides(): HTMLElement[] {\n return Array.from(this.children) as HTMLElement[];\n }\n\n /** The last slide that can sit at the start of the row. */\n private get last(): number {\n return Math.max(0, this.count - (this.visible ?? Number(this.perView || 1)));\n }\n\n /** Count what actually fits, and keep the row on a real stop when that changes. */\n private measure(): void {\n const track = this.track;\n const first = this.slides[0];\n if (!track || !first) return;\n const width = first.getBoundingClientRect().width;\n if (width <= 0) return;\n const gap = Number.parseFloat(getComputedStyle(track).columnGap) || 0;\n const fits = Math.max(1, Math.round((track.clientWidth + gap) / (width + gap)));\n if (fits === this.visible) return;\n this.visible = fits;\n this.index = Math.min(this.index, this.last);\n const slide = this.slides[this.index];\n if (slide && typeof track.scrollTo === 'function') track.scrollTo({ left: slide.offsetLeft - track.offsetLeft, behavior: 'auto' });\n this.requestUpdate();\n }\n\n private onSlots(): void {\n const slides = this.slides;\n this.count = slides.length;\n slides.forEach((slide, i) => {\n slide.setAttribute('role', 'group');\n slide.setAttribute('aria-roledescription', say('slide'));\n slide.setAttribute('aria-label', say('{slide} of {slides}', { slide: i + 1, slides: slides.length }));\n });\n this.measure();\n this.requestUpdate();\n }\n\n private go(to: number): void {\n const target = Math.min(this.last, Math.max(0, to));\n this.index = target;\n this.heading = target;\n clearTimeout(this.settle);\n // If the row has not got there by now (a tab in the background, say), put it there.\n this.settle = setTimeout(() => {\n const arrived = this.heading === null;\n this.heading = null;\n const track = this.track;\n const slide = this.slides[this.index];\n if (!arrived && track && slide && typeof track.scrollTo === 'function') track.scrollTo({ left: slide.offsetLeft - track.offsetLeft, behavior: 'auto' });\n }, 900);\n this.requestUpdate();\n const track = this.track;\n const slide = this.slides[target];\n if (track && slide && typeof track.scrollTo === 'function') {\n track.scrollTo({ left: slide.offsetLeft - track.offsetLeft, behavior: reducedMotion() ? 'auto' : 'smooth' });\n }\n }\n\n private onScroll(): void {\n const track = this.track;\n const slides = this.slides;\n if (!track || !slides.length) return;\n let nearest = 0;\n let distance = Infinity;\n slides.forEach((slide, i) => {\n const d = Math.abs(slide.offsetLeft - track.offsetLeft - track.scrollLeft);\n if (d < distance) {\n distance = d;\n nearest = i;\n }\n });\n if (this.heading !== null) {\n if (nearest === this.heading && distance < 2) {\n this.heading = null;\n clearTimeout(this.settle);\n }\n return;\n }\n if (nearest !== this.index) {\n this.index = Math.min(nearest, this.last);\n this.requestUpdate();\n }\n }\n\n private onKey(event: KeyboardEvent): void {\n if (event.key === 'ArrowRight') {\n event.preventDefault();\n this.go(this.index + 1);\n }\n if (event.key === 'ArrowLeft') {\n event.preventDefault();\n this.go(this.index - 1);\n }\n }\n\n private get canPlay(): boolean {\n return this.autoplay && !reducedMotion();\n }\n\n private restart(): void {\n clearInterval(this.timer);\n this.timer = undefined;\n if (!this.canPlay || this.paused || this.held) return;\n this.timer = setInterval(() => this.go(this.index >= this.last ? 0 : this.index + 1), Math.max(2, this.seconds) * 1000);\n }\n\n private hold(held: boolean): void {\n this.held = held;\n this.restart();\n }\n\n private togglePause(): void {\n this.paused = !this.paused;\n this.restart();\n this.requestUpdate();\n }\n\n protected firstUpdated(): void {\n if (typeof ResizeObserver === 'function' && this.track) {\n this.observer = new ResizeObserver(() => this.measure());\n this.observer.observe(this.track);\n }\n }\n\n protected updated(changed: Map<string, unknown>): void {\n if (changed.has('autoplay') || changed.has('seconds')) this.restart();\n if (changed.has('perView')) this.measure();\n }\n\n connectedCallback(): void {\n super.connectedCallback();\n if (this.track) this.observer?.observe(this.track);\n this.restart();\n }\n\n disconnectedCallback(): void {\n super.disconnectedCallback();\n this.observer?.disconnect();\n clearInterval(this.timer);\n clearTimeout(this.settle);\n }\n\n render(): TemplateResult {\n const stops = Array.from({ length: this.last + 1 }, (_, i) => i);\n return html`<section aria-roledescription=${say('carousel')} aria-label=${this.label} part=\"carousel\" @keydown=${this.onKey}\n @mouseenter=${() => this.hold(true)} @mouseleave=${() => this.hold(false)} @focusin=${() => this.hold(true)} @focusout=${() => this.hold(false)}>\n <div class=\"track\" part=\"track\" tabindex=\"0\" @scroll=${this.onScroll}><slot @slotchange=${this.onSlots}></slot></div>\n <div class=\"controls\" part=\"controls\">\n <div class=\"dots\">${stops.length > 1 ? stops.map((i) => html`<button class=\"dot\" type=\"button\" aria-label=${say('Go to slide {slide}', { slide: i + 1 })} aria-current=${i === this.index ? 'true' : 'false'} @click=${() => this.go(i)}><span></span></button>`) : nothing}</div>\n <div class=\"buttons\">\n ${this.canPlay ? html`<button class=\"round\" type=\"button\" aria-label=${say(this.paused ? 'Play the slides' : 'Pause the slides')} @click=${this.togglePause}>${this.paused ? iconSvg('arrow-right', '18px') : html`<svg width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"currentColor\" aria-hidden=\"true\"><rect x=\"6\" y=\"5\" width=\"4\" height=\"14\" rx=\"1\"/><rect x=\"14\" y=\"5\" width=\"4\" height=\"14\" rx=\"1\"/></svg>`}</button>` : nothing}\n <button class=\"round\" type=\"button\" aria-label=${say('Previous slide')} ?disabled=${this.index === 0} @click=${() => this.go(this.index - 1)}>${iconSvg('arrow-left', '18px')}</button>\n <button class=\"round\" type=\"button\" aria-label=${say('Next slide')} ?disabled=${this.index >= this.last} @click=${() => this.go(this.index + 1)}>${iconSvg('arrow-right', '18px')}</button>\n </div>\n </div>\n <p class=\"sr-only\" aria-live=\"polite\">${say('Slide {slide} of {slides}', { slide: this.index + 1, slides: this.count })}</p>\n </section>`;\n }\n}\n\n/** One picture in a gallery. */\nexport interface GalleryItem {\n id?: string;\n src: string;\n alt: string;\n caption?: string;\n}\n\n/**\n * How far a gallery picture stretches so that no row ends in a gap, on a wide\n * container and on a narrow one. The large first picture keeps its own size.\n */\nexport function gallerySpan(index: number, count: number, layout: 'feature' | 'grid'): { wide: number; narrow: number; rows: number } {\n const last = index === count - 1;\n const span = { wide: 1, narrow: 1, rows: 1 };\n if (layout === 'grid') {\n if (last) {\n span.wide = count % 3 ? 4 - (count % 3) : 1;\n span.narrow = count % 2 ? 2 : 1;\n }\n return span;\n }\n if (index === 0) return span;\n if (count === 2) return { wide: 2, narrow: 2, rows: 2 };\n if (count === 3) return { ...span, wide: 2 };\n if (last) {\n const extra = (count - 5) % 4;\n span.wide = count === 4 ? 2 : count > 5 && extra ? 5 - extra : 1;\n span.narrow = count % 2 ? 1 : 2;\n }\n return span;\n}\n\n/**\n * A set of pictures, with the first shown large, that open full screen one at\n * a time: the rooms of a show home, or views of a development.\n *\n * Each picture is a button. The full-screen view is a real modal dialog, so\n * focus stays inside it, Escape closes it and focus returns to the picture that\n * opened it. The arrow keys move between pictures.\n *\n * @category media\n * @icon gallery\n */\nexport class ImpaktGallery extends ImpaktElement {\n static properties = {\n items: { type: Array },\n layout: { type: String, reflect: true },\n label: { type: String },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n declare items: GalleryItem[];\n /** One large picture with smaller ones beside it, or an even grid. */\n declare layout: 'feature' | 'grid';\n /** What the pictures are of, for a screen reader. */\n declare label: string;\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n private shown = -1;\n private opener: HTMLElement | null = null;\n\n constructor() {\n super();\n this.items = [];\n this.layout = 'feature';\n this.label = 'Gallery';\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n spaceAround,\n roundButton,\n css`\n :host { display: block; container-type: inline-size; }\n ul { list-style: none; margin: 0; padding: 0; display: grid; gap: ${space(3)}; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 180px; }\n :host([layout='grid']) ul { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 220px; }\n li { grid-column: span var(--span-wide, 1); grid-row: span var(--span-rows, 1); }\n :host([layout='feature']) li:first-child { grid-column: span 2; grid-row: span 2; }\n .open { position: relative; display: block; inline-size: 100%; block-size: 100%; padding: 0; border: 0; background: ${t.surfaceInset}; border-radius: ${t.radiusXl}; overflow: hidden; cursor: zoom-in; }\n .open img { display: block; inline-size: 100%; block-size: 100%; object-fit: cover; transition: transform 300ms ease-out; }\n .open:hover img { transform: scale(1.03); }\n @container (max-width: 40rem) { ul, :host([layout='grid']) ul { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 130px; } li { grid-column: span var(--span-narrow, 1); } }\n dialog { padding: 0; border: 0; background: transparent; max-inline-size: none; max-block-size: none; inline-size: 100vw; block-size: 100dvh; }\n dialog::backdrop { background: rgb(10 14 12 / 0.9); }\n .stage { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; block-size: 100%; box-sizing: border-box; padding: ${space(4)}; gap: ${space(3)}; color: #fff; }\n .bar { display: flex; align-items: center; justify-content: space-between; ${type('sm')} }\n .middle { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: ${space(3)}; min-block-size: 0; }\n .middle img { display: block; margin: auto; max-inline-size: 100%; max-block-size: 100%; object-fit: contain; border-radius: ${t.radiusLg}; }\n figure { margin: 0; display: flex; min-block-size: 0; block-size: 100%; }\n .caption { margin: 0; text-align: center; ${type('sm')} }\n `,\n ];\n\n private get dialog(): HTMLDialogElement | null {\n return this.renderRoot.querySelector('dialog');\n }\n\n private open(index: number, event: Event): void {\n this.opener = event.currentTarget as HTMLElement;\n this.shown = index;\n this.requestUpdate();\n void this.updateComplete.then(() => {\n const d = this.dialog;\n if (d && !d.open) {\n if (typeof d.showModal === 'function') d.showModal();\n else d.setAttribute('open', '');\n }\n });\n }\n\n private close(): void {\n const d = this.dialog;\n if (d?.open) {\n if (typeof d.close === 'function') d.close();\n else d.removeAttribute('open');\n }\n this.onClosed();\n }\n\n private onClosed(): void {\n if (this.shown === -1) return;\n this.shown = -1;\n this.requestUpdate();\n this.opener?.focus();\n }\n\n private step(by: number): void {\n const n = (this.items ?? []).length;\n if (!n || this.shown < 0) return;\n this.shown = (this.shown + by + n) % n;\n this.requestUpdate();\n }\n\n private onKey(event: KeyboardEvent): void {\n if (event.key === 'ArrowRight') {\n event.preventDefault();\n this.step(1);\n }\n if (event.key === 'ArrowLeft') {\n event.preventDefault();\n this.step(-1);\n }\n }\n\n render(): TemplateResult {\n const items = this.items ?? [];\n const current = this.shown >= 0 ? items[this.shown] : undefined;\n return html`<ul aria-label=${this.label} part=\"list\">${items.map((item, i) => {\n const span = gallerySpan(i, items.length, this.layout);\n return html`<li style=${`--span-wide:${span.wide};--span-narrow:${span.narrow};--span-rows:${span.rows}`}>\n <button class=\"open\" type=\"button\" aria-label=${say('View larger: {picture}', { picture: item.alt })} @click=${(e: Event) => this.open(i, e)}><img src=${item.src} alt=${item.alt} loading=\"lazy\" /></button>\n </li>`;\n })}</ul>\n <dialog aria-label=${this.label} @keydown=${this.onKey} @close=${this.onClosed}>\n ${\n current\n ? html`<div class=\"stage\">\n <div class=\"bar\"><span>${this.shown + 1} of ${items.length}</span><button class=\"round\" type=\"button\" aria-label=${say('Close')} @click=${this.close}>${iconSvg('close', '18px')}</button></div>\n <div class=\"middle\">\n <button class=\"round\" type=\"button\" aria-label=${say('Previous picture')} @click=${() => this.step(-1)}>${iconSvg('arrow-left', '18px')}</button>\n <figure><img src=${current.src} alt=${current.alt} /></figure>\n <button class=\"round\" type=\"button\" aria-label=${say('Next picture')} @click=${() => this.step(1)}>${iconSvg('arrow-right', '18px')}</button>\n </div>\n <p class=\"caption\">${current.caption ?? current.alt}</p>\n </div>`\n : nothing\n }\n </dialog>`;\n }\n}\n\n/** One accreditation or partner. */\nexport interface LogoItem {\n id?: string;\n src: string;\n alt: string;\n href?: string;\n}\n\n/**\n * A row of logos that lends trust: accreditations, awards, lenders, partners.\n *\n * The logos are drawn quietly so they do not fight the page, and come to full\n * colour when pointed at. Each one is named by its alt text.\n *\n * @category content\n * @icon logos\n */\nexport class ImpaktLogoCloud extends ImpaktElement {\n static properties = {\n heading: { type: String },\n items: { type: Array },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n /** A line above the logos, such as \"Accredited by\". */\n declare heading: string;\n declare items: LogoItem[];\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n constructor() {\n super();\n this.heading = '';\n this.items = [];\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n spaceAround,\n css`\n :host { display: block; }\n p { margin: 0 0 ${space(6)}; text-align: center; color: ${t.textMuted}; ${type('sm')} font-weight: ${fontWeight('medium')}; }\n ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: ${space(8)} ${space(12)}; }\n img { display: block; block-size: 40px; inline-size: auto; max-inline-size: 160px; object-fit: contain; filter: grayscale(1); opacity: 0.7; transition: filter 200ms ease-in-out, opacity 200ms ease-in-out; }\n li:hover img { filter: none; opacity: 1; }\n a { display: block; border-radius: ${t.radiusSm}; }\n `,\n ];\n\n render(): TemplateResult {\n return html`${this.heading ? html`<p part=\"heading\">${this.heading}</p>` : nothing}\n <ul part=\"list\">${(this.items ?? []).map((logo) => html`<li>${logo.href ? html`<a href=${logo.href}><img src=${logo.src} alt=${logo.alt} /></a>` : html`<img src=${logo.src} alt=${logo.alt} />`}</li>`)}</ul>`;\n }\n}\n\n/** One step in a process. */\nexport interface StepItem {\n id?: string;\n heading: string;\n text?: string;\n /** A short line above the heading, such as how long the step takes. */\n meta?: string;\n}\n\n/**\n * A process, in order, joined by a line: how buying a home works, what happens\n * after you apply.\n *\n * It is an ordered list, so a screen reader says the number and how many there\n * are. The numbers are drawn from the list, not typed in.\n *\n * @category content\n * @icon steps\n */\nexport class ImpaktSteps extends ImpaktElement {\n static properties = {\n items: { type: Array },\n orientation: { type: String, reflect: true },\n look: { type: String, reflect: true },\n headingLevel: { type: Number, attribute: 'heading-level' },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n declare items: StepItem[];\n /** Across the page, or down it. Across becomes down on a narrow screen. */\n declare orientation: 'horizontal' | 'vertical';\n /**\n * `numbered` joins numbered circles with a line. `ruled` gives each step a\n * coloured rule along its top, in the brand's chart colours, as a project\n * plan's phases are drawn. The steps are an ordered list either way.\n */\n declare look: 'numbered' | 'ruled';\n /** The level of each step's heading. One below the heading above the steps. */\n declare headingLevel: 2 | 3 | 4;\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n constructor() {\n super();\n this.items = [];\n this.orientation = 'horizontal';\n this.look = 'numbered';\n this.headingLevel = 3;\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n spaceAround,\n headingStyles,\n css`\n :host { display: block; container-type: inline-size; }\n ol { list-style: none; margin: 0; padding: 0; counter-reset: step; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: ${space(6)}; }\n li { position: relative; counter-increment: step; display: flex; flex-direction: column; gap: ${space(2)}; }\n li::before { content: counter(step); display: flex; align-items: center; justify-content: center; inline-size: 40px; block-size: 40px; border-radius: 50%; background: ${t.brand}; color: ${t.onBrand}; ${type('sm')} font-weight: ${fontWeight('bold')}; position: relative; z-index: 1; margin-block-end: ${space(2)}; }\n li:not(:last-child)::after { content: ''; position: absolute; inset-block-start: 20px; inset-inline-start: 48px; inset-inline-end: calc(-1 * ${space(6)} + 8px); block-size: 2px; background: ${t.rule}; }\n .h { ${type('lg')} letter-spacing: 0; }\n .meta { margin: 0; ${type('sm')} color: ${t.textMuted}; font-family: ${t.fontMono}; letter-spacing: 0.02em; }\n .body { margin: 0; color: ${t.textMuted}; line-height: ${lineHeight('normal')}; text-wrap: pretty; }\n :host([orientation='vertical']) ol { grid-auto-flow: row; }\n :host([orientation='vertical']) li { padding-inline-start: 56px; min-block-size: 56px; }\n :host([orientation='vertical']) li::before { position: absolute; inset-inline-start: 0; inset-block-start: 0; margin: 0; }\n :host([orientation='vertical']) li:not(:last-child)::after { inset-block-start: 48px; inset-block-end: calc(-1 * ${space(6)} + 8px); inset-inline-start: 19px; inset-inline-end: auto; inline-size: 2px; block-size: auto; }\n @container (max-width: 40rem) {\n ol { grid-auto-flow: row; }\n li { padding-inline-start: 56px; min-block-size: 56px; }\n li::before { position: absolute; inset-inline-start: 0; inset-block-start: 0; margin: 0; }\n li:not(:last-child)::after { inset-block-start: 48px; inset-block-end: calc(-1 * ${space(6)} + 8px); inset-inline-start: 19px; inset-inline-end: auto; inline-size: 2px; block-size: auto; }\n }\n :host([look='ruled']) li { padding-block-start: ${space(5)}; border-block-start: 3px solid var(--rule); }\n :host([look='ruled']) li::before, :host([look='ruled']) li::after { display: none; }\n :host([look='ruled']) ol { gap: ${space(5)}; }\n /* On a phone the ruled steps become a branch graph: one trunk down the left, and each step a coloured branch off it with a dot. */\n @container (max-width: 40rem) {\n :host([look='ruled']) ol { gap: 0; }\n :host([look='ruled']) li { padding-inline-start: 40px; padding-block: ${space(6)}; min-block-size: 0; border-block-start: 0; }\n :host([look='ruled']) li::before { display: block; content: ''; position: absolute; inset-block: 0; inset-inline-start: 0; inline-size: 2px; block-size: auto; border-radius: 0; margin: 0; background: ${t.text}; }\n :host([look='ruled']) li::after { display: block; content: ''; position: absolute; inset-block: ${space(3)}; inset-inline-start: 2px; inset-inline-end: auto; inline-size: 12px; block-size: auto; background: radial-gradient(circle at 100% 34px, var(--rule) 4px, transparent 4.5px); border: 2px solid var(--rule); border-inline-start: 0; border-radius: 0 14px 14px 0; }\n }\n @media (forced-colors: active) { li::before { border: 1px solid CanvasText; } li:not(:last-child)::after { background: CanvasText; } :host([look='ruled']) li { border-block-start-color: CanvasText; } }\n `,\n ];\n\n render(): TemplateResult {\n return html`<ol part=\"list\">${(this.items ?? []).map(\n (\n step,\n i,\n ) => html`<li part=\"step\" style=${this.look === 'ruled' ? `--rule:var(--impakt-color-chart-${(i % 5) + 1}, ${'var(--impakt-color-brand-default, #1f4ed8)'})` : nothing}>\n ${step.meta ? html`<p class=\"meta\">${step.meta}</p>` : nothing}\n <div class=\"h\" role=\"heading\" aria-level=${this.headingLevel}>${step.heading}</div>\n ${step.text ? html`<p class=\"body\">${step.text}</p>` : nothing}\n </li>`,\n )}</ol>`;\n }\n}\n\n/**\n * A picture beside words, the working section of a marketing page: a heading,\n * a line of text, a short list of points and an action.\n *\n * On a phone the words come first, whichever side the picture is on, so the\n * reading order never depends on the layout.\n *\n * @category layout\n * @icon split\n * @role heading\n * @slot actions - Buttons and links under the words.\n */\nexport class ImpaktMediaSplit extends ImpaktElement {\n static properties = {\n eyebrow: { type: String },\n heading: { type: String },\n lead: { type: String },\n points: { type: Array },\n level: { type: Number, reflect: true },\n imageSrc: { type: String, attribute: 'image-src' },\n imageAlt: { type: String, attribute: 'image-alt' },\n imageSide: { type: String, reflect: true, attribute: 'image-side' },\n insetSrc: { type: String, attribute: 'inset-src' },\n insetAlt: { type: String, attribute: 'inset-alt' },\n ratio: { type: String, reflect: true },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n declare eyebrow: string;\n declare heading: string;\n /** A sentence or two under the heading. */\n declare lead: string;\n /** Short points, each drawn with a tick. */\n declare points: string[];\n /** The heading's level in the page. */\n declare level: 2 | 3;\n declare imageSrc: string;\n /** What the picture shows. Leave empty only when it is decoration. */\n declare imageAlt: string;\n /** A smaller picture overlapping the corner of the main one. */\n declare insetSrc: string;\n declare insetAlt: string;\n /** Which side the picture sits on, on a wide screen. */\n declare imageSide: 'start' | 'end';\n /** The picture's shape. */\n declare ratio: '4:3' | '1:1' | '3:2' | '16:9';\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n constructor() {\n super();\n this.eyebrow = '';\n this.heading = '';\n this.lead = '';\n this.points = [];\n this.level = 2;\n this.imageSrc = '';\n this.imageAlt = '';\n this.imageSide = 'end';\n this.insetSrc = '';\n this.insetAlt = '';\n this.ratio = '4:3';\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n spaceAround,\n headingStyles,\n css`\n :host { display: block; container-type: inline-size; --ratio: 4 / 3; }\n :host([ratio='1:1']) { --ratio: 1 / 1; }\n :host([ratio='3:2']) { --ratio: 3 / 2; }\n :host([ratio='16:9']) { --ratio: 16 / 9; }\n .split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: ${space(16)}; align-items: center; }\n :host([image-side='start']) .picture { order: -1; }\n .words { display: flex; flex-direction: column; gap: ${space(4)}; }\n .h { ${type('4xl')} }\n .lead { ${type('lg')} }\n ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: ${space(3)}; }\n li { display: flex; gap: ${space(3)}; align-items: flex-start; line-height: ${lineHeight('normal')}; }\n .tick { flex: none; display: inline-flex; align-items: center; justify-content: center; inline-size: 24px; block-size: 24px; border-radius: 50%; background: ${t.brandSubtle}; color: ${t.brand}; }\n .actions { display: flex; flex-wrap: wrap; gap: ${space(3)} ${space(4)}; align-items: center; margin-block-start: ${space(2)}; }\n img { display: block; inline-size: 100%; aspect-ratio: var(--ratio); object-fit: cover; border-radius: ${t.radius2xl}; box-shadow: ${t.shadowXl}; }\n .picture { position: relative; }\n .picture.has-inset { padding-block-end: 8%; padding-inline-end: 4%; }\n .inset { position: absolute; inset-block-end: 0; inset-inline-end: 0; inline-size: 42%; aspect-ratio: 10 / 7; border: 6px solid ${t.surfaceCard}; border-radius: ${t.radiusXl}; box-sizing: border-box; }\n @container (max-width: 48rem) {\n .split { grid-template-columns: minmax(0, 1fr); gap: ${space(8)}; }\n :host([image-side='start']) .picture { order: 0; }\n .h { ${type('3xl')} }\n }\n `,\n ];\n\n render(): TemplateResult {\n return html`<div class=\"split\" part=\"split\">\n <div class=\"words\">\n ${this.eyebrow ? html`<p class=\"eyebrow\" part=\"eyebrow\">${this.eyebrow}</p>` : nothing}\n <div class=\"h\" role=\"heading\" aria-level=${this.level}>${this.heading}</div>\n ${this.lead ? html`<p class=\"lead\">${this.lead}</p>` : nothing}\n ${this.points?.length ? html`<ul>${this.points.map((p) => html`<li><span class=\"tick\">${iconSvg('check', '14px')}</span><span>${p}</span></li>`)}</ul>` : nothing}\n <div class=\"actions\"><slot name=\"actions\"></slot></div>\n </div>\n ${this.imageSrc ? html`<div class=\"picture ${this.insetSrc ? 'has-inset' : ''}\"><img src=${this.imageSrc} alt=${this.imageAlt} loading=\"lazy\" part=\"image\" />${this.insetSrc ? html`<img class=\"inset\" src=${this.insetSrc} alt=${this.insetAlt} loading=\"lazy\" />` : nothing}</div>` : nothing}\n </div>`;\n }\n}\n\n/**\n * The closing push of a page: a rounded panel with a heading, a line of text\n * and the page's main action, set apart from everything above it.\n *\n * @category layout\n * @icon banner\n * @slot actions - The buttons.\n */\nexport class ImpaktCtaBanner extends ImpaktElement {\n static properties = {\n heading: { type: String },\n lead: { type: String },\n tone: { type: String, reflect: true },\n align: { type: String, reflect: true },\n imageSrc: { type: String, attribute: 'image-src' },\n imageAlt: { type: String, attribute: 'image-alt' },\n headingLevel: { type: Number, attribute: 'heading-level' },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n declare heading: string;\n declare lead: string;\n /** The panel's colour. */\n declare tone: 'brand' | 'subtle' | 'card';\n /** Words beside the action, centred above it, or above it on the left. */\n declare align: 'split' | 'center' | 'stacked';\n /** A photo behind the words, with a scrim so they stay readable. */\n declare imageSrc: string;\n declare imageAlt: string;\n declare headingLevel: 2 | 3;\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n constructor() {\n super();\n this.heading = '';\n this.lead = '';\n this.tone = 'brand';\n this.align = 'split';\n this.imageSrc = '';\n this.imageAlt = '';\n this.headingLevel = 2;\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n spaceAround,\n headingStyles,\n css`\n :host { display: block; container-type: inline-size; }\n .panel { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: ${space(8)}; padding: ${space(16)}; border-radius: ${t.radius2xl}; background: ${t.surfaceCard}; box-shadow: ${t.shadowSm}, inset 0 0 0 1px ${t.hairline}; }\n :host([tone='subtle']) .panel { background: ${t.surfaceSubtle}; box-shadow: none; }\n :host([tone='brand']) .panel { background: ${t.brand}; color: ${t.onBrand}; box-shadow: ${t.shadowLg}; }\n /* Only the words take the light colours: a button in the actions keeps its own. */\n :host([tone='brand']) .words { --impakt-color-text-heading: ${t.onBrand}; --impakt-color-text-default: ${t.onBrand}; --impakt-color-text-muted: ${t.onBrand}; --impakt-color-text-link: ${t.onBrand}; }\n /* A soft glow in the corner, so a flat colour has some depth. Decoration only. */\n :host([tone='brand']) .panel::before { content: ''; position: absolute; inset-block-start: -40%; inset-inline-end: -10%; inline-size: 60%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, ${t.onBrand} 18%, transparent), transparent); pointer-events: none; }\n .photo { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; object-fit: cover; }\n .panel.pictured { min-block-size: 26rem; color: #fff; background: #12211a; --impakt-color-text-heading: #fff; }\n .panel.pictured::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgb(18 31 26 / 0.8) 0%, rgb(18 31 26 / 0.1) 75%); }\n .panel.pictured .words, .panel.pictured .actions { z-index: 1; }\n @container (max-width: 48rem) { .panel.pictured { justify-content: flex-end; } .panel.pictured::after { background: linear-gradient(180deg, rgb(18 31 26 / 0.15) 0%, rgb(18 31 26 / 0.85) 100%); } }\n .words { position: relative; display: flex; flex-direction: column; gap: ${space(3)}; max-inline-size: 40rem; }\n .h { ${type('4xl')} }\n .lead { ${type('lg')} }\n .actions { position: relative; flex: none; display: flex; flex-wrap: wrap; gap: ${space(3)}; }\n :host([align='stacked']) .panel { flex-direction: column; align-items: flex-start; justify-content: center; }\n :host([align='center']) .panel { flex-direction: column; text-align: center; }\n :host([align='center']) .words { align-items: center; }\n @container (max-width: 48rem) { .panel { flex-direction: column; align-items: flex-start; padding: ${space(8)} ${space(6)}; } .h { ${type('3xl')} } :host([align='center']) .panel { align-items: center; } }\n @media (forced-colors: active) { .panel { border: 1px solid CanvasText; } }\n `,\n ];\n\n render(): TemplateResult {\n return html`<div class=\"panel ${this.imageSrc ? 'pictured' : ''}\" part=\"panel\">\n ${this.imageSrc ? html`<img class=\"photo\" src=${this.imageSrc} alt=${this.imageAlt} />` : nothing}\n <div class=\"words\">\n <div class=\"h\" role=\"heading\" aria-level=${this.headingLevel}>${this.heading}</div>\n ${this.lead ? html`<p class=\"lead\">${this.lead}</p>` : nothing}\n </div>\n <div class=\"actions\"><slot name=\"actions\"></slot></div>\n </div>`;\n }\n}\n\n/** One review. */\nexport interface ReviewItem {\n id?: string;\n quote: string;\n person: string;\n about?: string;\n rating?: number;\n avatarSrc?: string;\n}\n\nconst stars = (rating: number): TemplateResult =>\n html`<span class=\"stars\" role=\"img\" aria-label=${say('Rated {rating} out of 5', { rating })}>${[1, 2, 3, 4, 5].map((n) => html`<svg width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" aria-hidden=\"true\" fill=${n <= rating ? 'currentColor' : 'none'} stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linejoin=\"round\"><path d=\"M12 3.5l2.6 5.4 5.9.7-4.4 4 1.2 5.8L12 16.5l-5.3 2.9 1.2-5.8-4.4-4 5.9-.7z\"/></svg>`)}</span>`;\n\nconst initials = (name: string): string =>\n name\n .split(/\\s+/)\n .filter((w) => /^[A-Za-z]/.test(w) && w.toLowerCase() !== 'and')\n .slice(0, 2)\n .map((w) => w[0]!.toUpperCase())\n .join('');\n\n/**\n * What customers say, in cards, with their rating and a face or their\n * initials, and a summary line above them.\n *\n * A rating is said in words as well as drawn in stars.\n *\n * @category content\n * @icon reviews\n */\nexport class ImpaktReviews extends ImpaktElement {\n static properties = {\n summary: { type: String },\n rating: { type: Number },\n items: { type: Array },\n columns: { type: String, reflect: true },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n /** A line above the reviews, such as \"4.8 from 312 buyers\". */\n declare summary: string;\n /** The overall rating out of 5, drawn beside the summary. */\n declare rating: number | undefined;\n declare items: ReviewItem[];\n declare columns: 'two' | 'three';\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n constructor() {\n super();\n this.summary = '';\n this.rating = undefined;\n this.items = [];\n this.columns = 'three';\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n spaceAround,\n css`\n :host { display: block; container-type: inline-size; }\n .top { display: flex; align-items: center; gap: ${space(3)}; margin-block-end: ${space(6)}; ${type('sm')} font-weight: ${fontWeight('medium')}; }\n .stars { display: inline-flex; gap: 2px; color: ${token_accent}; }\n ul { list-style: none; margin: 0; padding: 0; display: grid; gap: ${space(6)}; grid-template-columns: repeat(3, minmax(0, 1fr)); }\n :host([columns='two']) ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }\n li { display: flex; flex-direction: column; gap: ${space(4)}; padding: ${space(6)}; background: ${t.surfaceCard}; border-radius: ${t.radiusXl}; box-shadow: ${t.shadowSm}, inset 0 0 0 1px ${t.hairline}; }\n blockquote { margin: 0; flex: 1; ${type('md')} text-wrap: pretty; }\n .who { display: flex; align-items: center; gap: ${space(3)}; }\n .face { flex: none; display: inline-flex; align-items: center; justify-content: center; inline-size: 44px; block-size: 44px; border-radius: 50%; overflow: hidden; background: ${t.brandSubtle}; color: ${t.brand}; ${type('sm')} font-weight: ${fontWeight('bold')}; }\n .face img { inline-size: 100%; block-size: 100%; object-fit: cover; }\n .name { font-weight: ${fontWeight('semibold')}; ${type('sm')} }\n .about { color: ${t.textMuted}; ${type('sm')} }\n @container (max-width: 56rem) { ul, :host([columns='two']) ul { grid-template-columns: minmax(0, 1fr); } }\n `,\n ];\n\n render(): TemplateResult {\n return html`${this.summary || this.rating ? html`<p class=\"top\" part=\"summary\" style=\"margin-block-start:0\">${this.rating ? stars(Math.round(this.rating)) : nothing}<span>${this.summary}</span></p>` : nothing}\n <ul part=\"list\">${(this.items ?? []).map(\n (r) => html`<li part=\"review\">\n ${r.rating ? stars(r.rating) : nothing}\n <blockquote>${r.quote}</blockquote>\n <div class=\"who\"><span class=\"face\" aria-hidden=\"true\">${r.avatarSrc ? html`<img src=${r.avatarSrc} alt=\"\" />` : initials(r.person)}</span><span><span class=\"name\">${r.person}</span>${r.about ? html`<br /><span class=\"about\">${r.about}</span>` : nothing}</span></div>\n </li>`,\n )}</ul>`;\n }\n}\n\n/**\n * An email sign-up in one line: release dates, price lists, launch news.\n *\n * The field has a real label, the browser checks the address, and what happens\n * with the address is said beside the button. The app receives the address and\n * says when it is done.\n *\n * @category form\n * @icon mail\n * @fires {CustomEvent<{ email: string }>} impakt-submit - When a valid address is sent. The address is in detail.email.\n */\nexport class ImpaktNewsletter extends ImpaktElement {\n static properties = {\n heading: { type: String },\n lead: { type: String },\n label: { type: String },\n buttonText: { type: String, attribute: 'button-text' },\n smallPrint: { type: String, attribute: 'small-print' },\n doneText: { type: String, attribute: 'done-text' },\n headingLevel: { type: Number, attribute: 'heading-level' },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n declare heading: string;\n declare lead: string;\n /** The field's label. */\n declare label: string;\n declare buttonText: string;\n /** What happens with the address, such as how to stop the emails. */\n declare smallPrint: string;\n /** What is said once the address is sent. */\n declare doneText: string;\n declare headingLevel: 2 | 3;\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n private done = false;\n\n constructor() {\n super();\n this.heading = '';\n this.lead = '';\n this.label = 'Email address';\n this.buttonText = 'Sign up';\n this.smallPrint = '';\n this.doneText = 'Thank you. You\u2019re on the list.';\n this.headingLevel = 2;\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n spaceAround,\n headingStyles,\n css`\n :host { display: block; container-type: inline-size; }\n .wrap { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: ${space(8)}; align-items: center; }\n .words { display: flex; flex-direction: column; gap: ${space(2)}; }\n .h { ${type('2xl')} }\n form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: ${space(1)} ${space(3)}; }\n label { grid-column: 1 / -1; ${type('sm')} font-weight: ${fontWeight('semibold')}; }\n input { min-block-size: 44px; box-sizing: border-box; inline-size: 100%; padding: ${space(2.5)} ${space(3)}; font: inherit; color: ${t.text}; background: ${t.surfaceCard}; border: ${t.borderThin} solid ${t.border}; border-radius: ${t.radiusLg}; box-shadow: ${t.shadowXs}; }\n button { ${targetSize} min-block-size: 44px; padding: ${space(2)} ${space(5)}; font: inherit; ${type('sm')} font-weight: ${fontWeight('semibold')}; color: ${t.onBrand}; background: ${t.brand}; border: 0; border-radius: ${t.radiusLg}; box-shadow: ${t.shadowXs}; cursor: pointer; }\n button:hover { background: ${t.brandHover}; }\n .note { grid-column: 1 / -1; margin: ${space(1)} 0 0; color: ${t.textMuted}; ${type('sm')} }\n .done { margin: 0; ${type('md')} font-weight: ${fontWeight('semibold')}; }\n @container (max-width: 40rem) { .wrap { grid-template-columns: minmax(0, 1fr); } }\n `,\n ];\n\n private submit(event: SubmitEvent): void {\n event.preventDefault();\n const form = event.currentTarget as HTMLFormElement;\n if (typeof form.reportValidity === 'function' && !form.reportValidity()) return;\n const email = (form.querySelector('input') as HTMLInputElement).value.trim();\n this.dispatchEvent(new CustomEvent('impakt-submit', { detail: { email }, bubbles: true, composed: true }));\n this.done = true;\n this.requestUpdate();\n }\n\n render(): TemplateResult {\n const field = this.id_('email');\n return html`<div class=\"wrap\" part=\"wrap\">\n <div class=\"words\">\n ${this.heading ? html`<div class=\"h\" role=\"heading\" aria-level=${this.headingLevel}>${this.heading}</div>` : nothing}\n ${this.lead ? html`<p class=\"lead\">${this.lead}</p>` : nothing}\n </div>\n <div aria-live=\"polite\">${\n this.done\n ? html`<p class=\"done\">${this.doneText}</p>`\n : html`<form @submit=${this.submit}>\n <label for=${field}>${this.label}</label>\n <input id=${field} type=\"email\" name=\"email\" autocomplete=\"email\" required />\n <button type=\"submit\">${this.buttonText}</button>\n ${this.smallPrint ? html`<p class=\"note\">${this.smallPrint}</p>` : nothing}\n </form>`\n }</div>\n </div>`;\n }\n}\n\ncustomElements.define('impakt-carousel', ImpaktCarousel);\ncustomElements.define('impakt-gallery', ImpaktGallery);\ncustomElements.define('impakt-logo-cloud', ImpaktLogoCloud);\ncustomElements.define('impakt-steps', ImpaktSteps);\ncustomElements.define('impakt-media-split', ImpaktMediaSplit);\ncustomElements.define('impakt-cta-banner', ImpaktCtaBanner);\ncustomElements.define('impakt-reviews', ImpaktReviews);\ncustomElements.define('impakt-newsletter', ImpaktNewsletter);\ndeclare global {\n interface HTMLElementTagNameMap {\n 'impakt-carousel': ImpaktCarousel;\n 'impakt-gallery': ImpaktGallery;\n 'impakt-logo-cloud': ImpaktLogoCloud;\n 'impakt-steps': ImpaktSteps;\n 'impakt-media-split': ImpaktMediaSplit;\n 'impakt-cta-banner': ImpaktCtaBanner;\n 'impakt-reviews': ImpaktReviews;\n 'impakt-newsletter': ImpaktNewsletter;\n }\n}\n", "import { css, html, nothing, type TemplateResult } from 'lit';\nimport { say, pageLocale, ImpaktElement, focusRing, targetSize, fontWeight, space, spaceAround, t, type, iconSvg } from '@atomic-ui/ui';\n\nexport interface SitePlot {\n id?: string;\n /** What is printed on the pin, such as 14. */\n number: string;\n /** The house type, such as The Hawthorn. */\n name?: string;\n status: 'available' | 'reserved' | 'sold';\n price?: string;\n beds?: string;\n /** How far across the plan the pin sits, from 0 to 100. */\n x: number | string;\n /** How far down the plan the pin sits, from 0 to 100. */\n y: number | string;\n href?: string;\n}\n\n/**\n * A drawing of the development with a pin on every plot. Choose a pin to see\n * whether it is available, what it costs and where to go next.\n *\n * Every pin is a button named in full, such as \"Plot 14, The Hawthorn,\n * Available, \u00A3385,000\". Status is shown by the pin's shape as well as its\n * colour, so it does not rely on colour alone (1.4.1).\n *\n * @category content\n * @icon map\n * @fires {CustomEvent<{ plot: SitePlot }>} impakt-select - When a plot is chosen. The plot is in detail.plot.\n */\nexport class ImpaktSitePlan extends ImpaktElement {\n static properties = {\n imageSrc: { type: String, attribute: 'image-src' },\n imageAlt: { type: String, attribute: 'image-alt' },\n plots: { type: Array },\n hint: { type: String },\n selectedPlot: { type: String, attribute: 'selected-plot' },\n panel: { type: String, reflect: true },\n plotWord: { type: String, attribute: 'plot-word' },\n actionText: { type: String, attribute: 'action-text' },\n availableText: { type: String, attribute: 'available-text' },\n reservedText: { type: String, attribute: 'reserved-text' },\n soldText: { type: String, attribute: 'sold-text' },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n declare imageSrc: string;\n declare imageAlt: string;\n declare plots: SitePlot[];\n /** The number of the plot shown first. */\n declare selectedPlot: string;\n /** The details beside the plan, or floating over it. */\n declare panel: 'beside' | 'over';\n /** What is said before a plot is chosen. */\n declare hint: string;\n declare plotWord: string;\n declare actionText: string;\n declare availableText: string;\n declare reservedText: string;\n declare soldText: string;\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n private chosen: SitePlot | undefined;\n\n constructor() {\n super();\n this.imageSrc = '';\n this.imageAlt = '';\n this.plots = [];\n this.hint = 'Choose a plot to see its price and availability.';\n this.selectedPlot = '';\n this.panel = 'beside';\n this.plotWord = 'Plot';\n this.actionText = 'View this home';\n this.availableText = 'Available';\n this.reservedText = 'Reserved';\n this.soldText = 'Sold';\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n spaceAround,\n css`\n :host { display: block; container-type: inline-size; }\n .wrap { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: ${space(6)}; align-items: start; }\n .plan { position: relative; overflow: hidden; border-radius: ${t.radius2xl}; background: ${t.surfaceSubtle}; box-shadow: ${t.shadowMd}; line-height: 0; }\n .plan img { inline-size: 100%; block-size: auto; }\n .pin { position: absolute; display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; inline-size: 34px; block-size: 34px; margin: -17px 0 0 -17px; padding: 0; font: inherit; ${type('xs')} line-height: 1; font-weight: ${fontWeight('bold')}; color: ${t.onBrand}; background: ${t.brand}; border: 2px solid ${t.surfaceCard}; border-radius: 50%; box-shadow: ${t.shadowMd}; cursor: pointer; transition: transform 120ms ease-in-out; }\n .pin:hover { transform: scale(1.12); }\n .pin.reserved { color: ${t.text}; background: ${t.warningSubtle}; border-color: ${t.warning}; border-style: dashed; }\n .pin.sold { color: ${t.textMuted}; background: ${t.surfaceCard}; border-color: ${t.border}; border-radius: ${t.radius}; }\n .pin[aria-pressed='true'] { transform: scale(1.22); box-shadow: ${t.shadowLg}, 0 0 0 3px ${t.brand}; }\n .panel { display: flex; flex-direction: column; gap: ${space(3)}; padding: ${space(6)}; background: ${t.surfaceCard}; border-radius: ${t.radius2xl}; box-shadow: ${t.shadowSm}, 0 0 0 1px color-mix(in srgb, ${t.text} 6%, transparent); }\n .hint { margin: 0; color: ${t.textMuted}; }\n .name { margin: 0; font-family: ${t.fontHeading}; ${type('2xl')} font-weight: ${fontWeight('bold')}; color: ${t.textHeading}; }\n .sub { margin: 0; color: ${t.textMuted}; }\n .price { margin: 0; ${type('xl')} font-weight: ${fontWeight('semibold')}; }\n .status { align-self: flex-start; padding: ${space(0.5)} ${space(2.5)}; ${type('xs')} font-weight: ${fontWeight('semibold')}; color: ${t.successText}; background: ${t.successSubtle}; border-radius: 999px; }\n .status.reserved { color: ${t.warningText}; background: ${t.warningSubtle}; }\n .status.sold { color: ${t.text}; background: ${t.surfaceSubtle}; }\n .go { ${targetSize} display: inline-flex; align-items: center; justify-content: center; gap: ${space(2)}; padding: ${space(2)} ${space(4)}; ${type('sm')} font-weight: ${fontWeight('semibold')}; color: ${t.onBrand}; text-decoration: none; background: ${t.brand}; border-radius: ${t.radiusLg}; }\n .go:hover { background: ${t.brandHover}; }\n .legend { display: flex; flex-wrap: wrap; gap: ${space(4)}; margin: ${space(3)} 0 0; padding: 0; list-style: none; ${type('sm')} color: ${t.textMuted}; }\n .legend li { display: inline-flex; align-items: center; gap: ${space(2)}; }\n .key { box-sizing: border-box; inline-size: 14px; block-size: 14px; background: ${t.brand}; border: 2px solid ${t.surfaceCard}; border-radius: 50%; outline: 1px solid color-mix(in srgb, currentColor 55%, transparent); }\n .key.reserved { background: ${t.warningSubtle}; border: 2px dashed ${t.warning}; }\n .key.sold { background: ${t.surfaceCard}; border: 2px solid ${t.border}; border-radius: 3px; }\n :host { --plan-card: var(--impakt-solid-card, ${t.surfaceCard}); --plan-text: var(--impakt-solid-text, ${t.text}); --plan-heading: var(--impakt-solid-heading, ${t.text}); --plan-muted: var(--impakt-solid-muted, ${t.textMuted}); }\n :host([panel='over']) .panel { background: var(--plan-card); color: var(--plan-text); --impakt-color-surface-card: var(--plan-card); --impakt-color-text-default: var(--plan-text); --impakt-color-text-heading: var(--plan-heading); --impakt-color-text-muted: var(--plan-muted); }\n @container (min-width: 44.01rem) { :host([panel='over']) .wrap { position: relative; grid-template-columns: minmax(0, 1fr); } :host([panel='over']) .panel { position: absolute; inset-block-start: 32%; inset-inline-end: ${space(8)}; inline-size: 22.5rem; box-sizing: border-box; box-shadow: ${t.shadowXl}; } }\n @container (max-width: 44rem) { .wrap { grid-template-columns: minmax(0, 1fr); } }\n `,\n ];\n\n willUpdate(changed: Map<string, unknown>): void {\n if ((changed.has('selectedPlot') || changed.has('plots')) && this.selectedPlot && !this.chosen)\n this.chosen = this.plots.find((p) => String(p.number) === this.selectedPlot);\n }\n\n private word(status: string): string {\n return status === 'sold' ? this.soldText : status === 'reserved' ? this.reservedText : this.availableText;\n }\n\n private choose(plot: SitePlot): void {\n this.chosen = plot;\n this.requestUpdate();\n this.dispatchEvent(new CustomEvent('impakt-select', { detail: { plot }, bubbles: true, composed: true }));\n }\n\n private renderPanel(): TemplateResult {\n const plot = this.chosen;\n if (!plot) return html`<p class=\"hint\">${this.hint}</p>`;\n const status = plot.status ?? 'available';\n return html`<span class=\"status ${status}\">${this.word(status)}</span>\n <p class=\"name\">${this.plotWord} ${plot.number}</p>\n ${plot.name || plot.beds ? html`<p class=\"sub\">${[plot.name, plot.beds].filter(Boolean).join(' \u00B7 ')}</p>` : nothing}\n ${plot.price ? html`<p class=\"price\">${plot.price}</p>` : nothing}\n ${plot.href && status !== 'sold' ? html`<a class=\"go\" href=${plot.href}>${this.actionText}${iconSvg('arrow-right', '16px')}</a>` : nothing}`;\n }\n\n render(): TemplateResult {\n return html`<div class=\"wrap\" part=\"wrap\">\n <div>\n <div class=\"plan\" part=\"plan\">\n <img src=${this.imageSrc} alt=${this.imageAlt} />\n ${this.plots.map((plot) => {\n const status = plot.status ?? 'available';\n const name = [`${this.plotWord} ${plot.number}`, plot.name, this.word(status), plot.price].filter(Boolean).join(', ');\n return html`<button class=\"pin ${status}\" type=\"button\" style=\"left:${Number(plot.x)}%;top:${Number(plot.y)}%\" aria-label=${name} aria-pressed=${String(this.chosen === plot)} @click=${() => this.choose(plot)}>${plot.number}</button>`;\n })}\n </div>\n <ul class=\"legend\">\n <li><span class=\"key\"></span>${this.availableText}</li>\n <li><span class=\"key reserved\"></span>${this.reservedText}</li>\n <li><span class=\"key sold\"></span>${this.soldText}</li>\n </ul>\n </div>\n <div class=\"panel\" part=\"panel\" aria-live=\"polite\">${this.renderPanel()}</div>\n </div>`;\n }\n}\n\n/** The monthly repayment on a loan. A rate of nothing is the loan split evenly. */\nexport function monthlyPayment(loan: number, annualRate: number, years: number): number {\n const months = years * 12;\n if (loan <= 0 || months <= 0) return 0;\n const rate = annualRate / 100 / 12;\n return rate === 0 ? loan / months : (loan * rate) / (1 - (1 + rate) ** -months);\n}\n\n/**\n * What a home would cost each month, worked out as the sliders move.\n *\n * The result is an estimate and the warning under it is on by default, because\n * UK rules expect it wherever repayments are shown. Change the words for other\n * markets, but check with whoever signs off your financial promotions first.\n *\n * @category form\n * @icon pound\n */\nexport class ImpaktMortgageCalculator extends ImpaktElement {\n static properties = {\n heading: { type: String },\n price: { type: Number },\n depositPercent: { type: Number, attribute: 'deposit-percent' },\n rate: { type: Number },\n years: { type: Number },\n currency: { type: String },\n smallPrint: { type: String, attribute: 'small-print' },\n headingLevel: { type: Number, attribute: 'heading-level' },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n declare heading: string;\n declare price: number;\n declare depositPercent: number;\n declare rate: number;\n declare years: number;\n /** The three-letter currency code, such as GBP. */\n declare currency: string;\n declare smallPrint: string;\n declare headingLevel: 2 | 3;\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n constructor() {\n super();\n this.heading = 'What would it cost each month?';\n this.price = 385000;\n this.depositPercent = 10;\n this.rate = 4.5;\n this.years = 30;\n this.currency = 'GBP';\n this.smallPrint = 'This is an estimate, not a mortgage offer. Your home may be repossessed if you do not keep up repayments on your mortgage.';\n this.headingLevel = 2;\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n spaceAround,\n css`\n :host { display: block; container-type: inline-size; }\n .wrap { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); overflow: hidden; background: ${t.surfaceCard}; border-radius: ${t.radius2xl}; box-shadow: ${t.shadowMd}, 0 0 0 1px color-mix(in srgb, ${t.text} 6%, transparent); }\n .inputs { display: flex; flex-direction: column; gap: ${space(5)}; padding: ${space(8)}; }\n .h { margin: 0; font-family: ${t.fontHeading}; ${type('2xl')} font-weight: ${fontWeight('bold')}; color: ${t.textHeading}; }\n label { display: flex; justify-content: space-between; gap: ${space(3)}; ${type('sm')} font-weight: ${fontWeight('semibold')}; margin-block-end: ${space(1.5)}; }\n .read { font-weight: ${fontWeight('regular')}; color: ${t.textMuted}; }\n input[type='number'] { box-sizing: border-box; inline-size: 100%; min-block-size: 44px; padding: ${space(2)} ${space(3)}; font: inherit; color: ${t.text}; background: ${t.surfaceCard}; border: ${t.borderThin} solid ${t.border}; border-radius: ${t.radiusLg}; }\n input[type='range'] { inline-size: 100%; min-block-size: 24px; margin: 0; accent-color: ${t.brand}; }\n .two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: ${space(4)}; }\n .result { display: flex; flex-direction: column; justify-content: center; gap: ${space(2)}; padding: ${space(8)}; color: ${t.onBrand}; background: ${t.brand}; }\n .caption { margin: 0; ${type('sm')} opacity: 0.85; }\n output { display: block; font-family: ${t.fontHeading}; ${type('4xl')} font-weight: ${fontWeight('bold')}; }\n dl { display: grid; gap: ${space(2)}; margin: ${space(4)} 0 0; padding-block-start: ${space(4)}; border-block-start: 1px solid color-mix(in srgb, ${t.onBrand} 25%, transparent); ${type('sm')} }\n dl div { display: flex; justify-content: space-between; gap: ${space(3)}; }\n dt { opacity: 0.85; }\n dd { margin: 0; font-weight: ${fontWeight('semibold')}; }\n /* Muted text is proved against the card colour, not this band, so the small print here is in the text colour (1.4.3). */\n .small { grid-column: 1 / -1; margin: 0; padding: ${space(4)} ${space(8)}; ${type('xs')} color: ${t.text}; background: ${t.surfaceSubtle}; }\n @container (max-width: 44rem) { .wrap { grid-template-columns: minmax(0, 1fr); } .inputs, .result { padding: ${space(5)}; } .small { padding: ${space(4)} ${space(5)}; } }\n `,\n ];\n\n private money(amount: number): string {\n try {\n return new Intl.NumberFormat(pageLocale(this), { style: 'currency', currency: this.currency, maximumFractionDigits: 0 }).format(amount);\n } catch {\n return String(Math.round(amount));\n }\n }\n\n private field(key: 'price' | 'depositPercent' | 'rate' | 'years'): (event: Event) => void {\n return (event) => {\n this[key] = Number((event.target as HTMLInputElement).value) || 0;\n };\n }\n\n render(): TemplateResult {\n const deposit = (this.price * this.depositPercent) / 100;\n const loan = Math.max(this.price - deposit, 0);\n const monthly = monthlyPayment(loan, this.rate, this.years);\n return html`<div class=\"wrap\" part=\"wrap\">\n <div class=\"inputs\">\n ${this.heading ? html`<div class=\"h\" role=\"heading\" aria-level=${this.headingLevel}>${this.heading}</div>` : nothing}\n <div><label for=${this.id_('price')}>${say('Home price')}</label><input id=${this.id_('price')} type=\"number\" min=\"0\" step=\"1000\" inputmode=\"numeric\" .value=${String(this.price)} @input=${this.field('price')} /></div>\n <div><label for=${this.id_('deposit')}>${say('Deposit')} <span class=\"read\">${this.depositPercent}% \u00B7 ${this.money(deposit)}</span></label><input id=${this.id_('deposit')} type=\"range\" min=\"5\" max=\"60\" step=\"1\" .value=${String(this.depositPercent)} @input=${this.field('depositPercent')} /></div>\n <div class=\"two\">\n <div><label for=${this.id_('years')}>${say('Term')} <span class=\"read\">${say('{years} years', { years: this.years })}</span></label><input id=${this.id_('years')} type=\"range\" min=\"5\" max=\"40\" step=\"1\" .value=${String(this.years)} @input=${this.field('years')} /></div>\n <div><label for=${this.id_('rate')}>${say('Interest rate (%)')}</label><input id=${this.id_('rate')} type=\"number\" min=\"0\" max=\"20\" step=\"0.05\" inputmode=\"decimal\" .value=${String(this.rate)} @input=${this.field('rate')} /></div>\n </div>\n </div>\n <div class=\"result\">\n <p class=\"caption\">${say('Estimated monthly repayment')}</p>\n <output for=${`${this.id_('price')} ${this.id_('deposit')} ${this.id_('years')} ${this.id_('rate')}`}>${this.money(monthly)}</output>\n <dl>\n <div><dt>${say('You would borrow')}</dt><dd>${this.money(loan)}</dd></div>\n <div><dt>${say('Total repayable')}</dt><dd>${this.money(monthly * this.years * 12)}</dd></div>\n </dl>\n </div>\n ${this.smallPrint ? html`<p class=\"small\">${this.smallPrint}</p>` : nothing}\n </div>`;\n }\n}\n\n/**\n * Two pictures of one place with a handle to drag between them: a bare plot\n * and the finished street, a shell and the fitted kitchen.\n *\n * The handle is a native range control, so it works with a finger, a mouse and\n * the arrow keys, and a screen reader hears how far across it is. Both pictures\n * need descriptions, because they are the content.\n *\n * @category content\n * @icon image\n */\nexport class ImpaktBeforeAfter extends ImpaktElement {\n static properties = {\n beforeSrc: { type: String, attribute: 'before-src' },\n beforeAlt: { type: String, attribute: 'before-alt' },\n afterSrc: { type: String, attribute: 'after-src' },\n afterAlt: { type: String, attribute: 'after-alt' },\n beforeLabel: { type: String, attribute: 'before-label' },\n afterLabel: { type: String, attribute: 'after-label' },\n label: { type: String },\n position: { type: Number },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n declare beforeSrc: string;\n declare beforeAlt: string;\n declare afterSrc: string;\n declare afterAlt: string;\n declare beforeLabel: string;\n declare afterLabel: string;\n /** The name of the handle for a screen reader. */\n declare label: string;\n /** How far across the handle starts, from 0 to 100. */\n declare position: number;\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n constructor() {\n super();\n this.beforeSrc = '';\n this.beforeAlt = '';\n this.afterSrc = '';\n this.afterAlt = '';\n this.beforeLabel = 'Before';\n this.afterLabel = 'After';\n this.label = 'Compare the two pictures';\n this.position = 50;\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n spaceAround,\n css`\n .frame { position: relative; overflow: hidden; border-radius: ${t.radius2xl}; box-shadow: ${t.shadowLg}; line-height: 0; --at: 50%; }\n img { display: block; inline-size: 100%; block-size: auto; }\n .after { position: absolute; inset: 0; block-size: 100%; object-fit: cover; clip-path: inset(0 0 0 var(--at)); }\n .tag { position: absolute; inset-block-start: ${space(3)}; padding: ${space(1)} ${space(3)}; ${type('xs')} line-height: 1.4; font-weight: ${fontWeight('semibold')}; color: ${t.text}; background: ${t.surfaceCard}; border-radius: 999px; box-shadow: ${t.shadowSm}; }\n .tag.b { inset-inline-start: ${space(3)}; }\n .tag.a { inset-inline-end: ${space(3)}; }\n .line { position: absolute; inset-block: 0; inset-inline-start: var(--at); inline-size: 2px; margin-inline-start: -1px; background: ${t.surfaceCard}; pointer-events: none; }\n .grip { position: absolute; inset-block-start: 50%; inset-inline-start: 50%; display: flex; align-items: center; justify-content: center; inline-size: 44px; block-size: 44px; margin: -22px 0 0 -22px; color: ${t.text}; background: ${t.surfaceCard}; border-radius: 50%; box-shadow: ${t.shadowMd}; }\n input { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; margin: 0; opacity: 0; cursor: ew-resize; touch-action: pan-y; }\n .frame:has(input:focus-visible) .grip { box-shadow: ${t.focusShadow}; }\n `,\n ];\n\n render(): TemplateResult {\n return html`<div class=\"frame\" part=\"frame\" style=\"--at:${this.position}%\">\n <img src=${this.beforeSrc} alt=${this.beforeAlt} />\n <img class=\"after\" src=${this.afterSrc} alt=${this.afterAlt} />\n <span class=\"tag b\" aria-hidden=\"true\">${this.beforeLabel}</span>\n <span class=\"tag a\" aria-hidden=\"true\">${this.afterLabel}</span>\n <span class=\"line\"><span class=\"grip\">${iconSvg('arrow-left', '14px')}${iconSvg('arrow-right', '14px')}</span></span>\n <input type=\"range\" min=\"0\" max=\"100\" aria-label=${this.label} .value=${String(this.position)} @input=${(e: Event) => {\n this.position = Number((e.target as HTMLInputElement).value);\n }} />\n </div>`;\n }\n}\n\n/**\n * A bar fixed to the bottom of the screen that keeps the one thing to do in\n * reach, such as booking a viewing.\n *\n * It appears once the visitor has scrolled, keeps a space for itself at the end\n * of the page, and tells the browser to scroll focused controls clear of it so\n * it never covers what the keyboard is on (2.4.11).\n *\n * @category navigation\n * @icon bar\n * @slot actions - The button or link to keep in reach.\n */\nexport class ImpaktStickyBar extends ImpaktElement {\n static properties = {\n label: { type: String },\n heading: { type: String },\n lead: { type: String },\n showOn: { type: String, reflect: true, attribute: 'show-on' },\n revealAfter: { type: Number, attribute: 'reveal-after' },\n };\n /** The name of this region for a screen reader. */\n declare label: string;\n declare heading: string;\n declare lead: string;\n declare showOn: 'phones' | 'all';\n /** How many pixels the visitor scrolls before it appears. */\n declare revealAfter: number;\n\n private shown = false;\n\n constructor() {\n super();\n this.label = 'Quick actions';\n this.heading = '';\n this.lead = '';\n this.showOn = 'phones';\n this.revealAfter = 400;\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n css`\n :host { display: block; }\n .bar { position: fixed; inset-inline: 0; inset-block-end: 0; z-index: 900; display: flex; align-items: center; justify-content: space-between; gap: ${space(4)}; padding: ${space(3)} ${space(4)} calc(${space(3)} + env(safe-area-inset-bottom)); background: ${t.surfaceCard}; box-shadow: ${t.shadowXl}, 0 -1px 0 color-mix(in srgb, ${t.text} 8%, transparent); transform: translateY(110%); visibility: hidden; transition: transform 220ms cubic-bezier(0.16, 1, 0.3, 1), visibility 220ms; }\n .bar.on { transform: none; visibility: visible; }\n .spacer { block-size: 5rem; }\n .h { font-family: ${t.fontHeading}; ${type('md')} font-weight: ${fontWeight('bold')}; color: ${t.textHeading}; }\n .t { ${type('xs')} color: ${t.textMuted}; }\n .words { min-inline-size: 0; }\n .actions { display: flex; flex: none; gap: ${space(2)}; }\n @media (min-width: 48rem) { :host([show-on='phones']) { display: none; } }\n `,\n ];\n\n private check = (): void => {\n const shown = window.scrollY >= this.revealAfter;\n if (shown === this.shown) return;\n this.shown = shown;\n this.requestUpdate();\n this.clearance(shown);\n };\n\n /** Leaves room for the bar when the browser scrolls something into view. */\n private clearance(on: boolean): void {\n const visible = on && getComputedStyle(this).display !== 'none';\n const height = visible ? `${this.renderRoot.querySelector('.bar')?.getBoundingClientRect().height ?? 80}px` : '';\n const root = document.documentElement.style;\n root.scrollPaddingBlockEnd = height;\n // The toast reads this to sit above the bar rather than on its button.\n if (height) root.setProperty('--impakt-bottom-bar', height);\n else root.removeProperty('--impakt-bottom-bar');\n }\n\n connectedCallback(): void {\n super.connectedCallback();\n window.addEventListener('scroll', this.check, { passive: true });\n this.check();\n }\n\n disconnectedCallback(): void {\n super.disconnectedCallback();\n window.removeEventListener('scroll', this.check);\n this.clearance(false);\n }\n\n render(): TemplateResult {\n return html`<div class=\"spacer\"></div>\n <section class=\"bar ${this.shown ? 'on' : ''}\" part=\"bar\" aria-label=${this.label}>\n <div class=\"words\">\n ${this.heading ? html`<div class=\"h\">${this.heading}</div>` : nothing}\n ${this.lead ? html`<div class=\"t\">${this.lead}</div>` : nothing}\n </div>\n <div class=\"actions\"><slot name=\"actions\"></slot></div>\n </section>`;\n }\n}\n\nexport interface NearbyItem {\n id?: string;\n place: string;\n /** How far, in words: 8 minutes by train. */\n distance: string;\n}\n\n/**\n * Where a place is and how to get there: a map picture, the address, opening\n * hours, travel times and a link for directions.\n *\n * The map is a picture you supply, not an embedded map. An embed loads a third\n * party's cookies before the visitor has agreed to anything.\n *\n * @category content\n * @icon map-pin\n * @role heading\n */\nexport class ImpaktLocationCard extends ImpaktElement {\n static properties = {\n heading: { type: String },\n address: { type: String },\n hours: { type: String },\n phone: { type: String },\n mapSrc: { type: String, attribute: 'map-src' },\n mapAlt: { type: String, attribute: 'map-alt' },\n directionsText: { type: String, attribute: 'directions-text' },\n directionsHref: { type: String, attribute: 'directions-href' },\n nearby: { type: Array },\n headingLevel: { type: Number, attribute: 'heading-level' },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n declare heading: string;\n declare address: string;\n declare hours: string;\n declare phone: string;\n declare mapSrc: string;\n declare mapAlt: string;\n declare directionsText: string;\n /** Leave empty and the link searches a map for the address. */\n declare directionsHref: string;\n declare nearby: NearbyItem[];\n declare headingLevel: 2 | 3;\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n constructor() {\n super();\n this.heading = '';\n this.address = '';\n this.hours = '';\n this.phone = '';\n this.mapSrc = '';\n this.mapAlt = '';\n this.directionsText = 'Get directions';\n this.directionsHref = '';\n this.nearby = [];\n this.headingLevel = 2;\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n spaceAround,\n css`\n :host { display: block; container-type: inline-size; }\n .wrap { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: hidden; background: ${t.surfaceCard}; border-radius: ${t.radius2xl}; box-shadow: ${t.shadowMd}, 0 0 0 1px color-mix(in srgb, ${t.text} 6%, transparent); }\n .wrap.solo { grid-template-columns: minmax(0, 1fr); }\n .map { min-block-size: 16rem; background: ${t.surfaceSubtle}; }\n .map img { display: block; inline-size: 100%; block-size: 100%; object-fit: cover; }\n .info { display: flex; flex-direction: column; gap: ${space(3)}; padding: ${space(8)}; }\n .h { margin: 0; font-family: ${t.fontHeading}; ${type('2xl')} font-weight: ${fontWeight('bold')}; color: ${t.textHeading}; }\n .row { display: flex; gap: ${space(3)}; margin: 0; white-space: pre-line; }\n .row svg { flex: none; margin-block-start: ${space(0.5)}; color: ${t.brand}; }\n .row a { display: inline-flex; align-items: center; min-block-size: ${t.targetMin}; margin-block-start: -2px; }\n a { color: ${t.link}; }\n ul { display: grid; gap: ${space(1.5)}; margin: ${space(1)} 0; padding: ${space(3)} 0 0; list-style: none; border-block-start: 1px solid color-mix(in srgb, ${t.text} 10%, transparent); ${type('sm')} }\n li { display: flex; justify-content: space-between; gap: ${space(3)}; }\n li span:last-child { color: ${t.textMuted}; text-align: end; }\n .go { ${targetSize} align-self: flex-start; display: inline-flex; align-items: center; gap: ${space(2)}; padding: ${space(2)} ${space(4)}; ${type('sm')} font-weight: ${fontWeight('semibold')}; color: ${t.onBrand}; text-decoration: none; background: ${t.brand}; border-radius: ${t.radiusLg}; }\n .go:hover { background: ${t.brandHover}; }\n @container (max-width: 44rem) { .wrap { grid-template-columns: minmax(0, 1fr); } .info { padding: ${space(5)}; } }\n `,\n ];\n\n render(): TemplateResult {\n const directions = this.directionsHref || (this.address ? `https://www.google.com/maps/search/?api=1&query=${encodeURIComponent(this.address)}` : '');\n return html`<div class=\"wrap ${this.mapSrc ? '' : 'solo'}\" part=\"wrap\">\n ${this.mapSrc ? html`<div class=\"map\"><img src=${this.mapSrc} alt=${this.mapAlt} /></div>` : nothing}\n <div class=\"info\">\n ${this.heading ? html`<div class=\"h\" role=\"heading\" aria-level=${this.headingLevel}>${this.heading}</div>` : nothing}\n ${this.address ? html`<p class=\"row\">${iconSvg('map-pin', '20px')}<span>${this.address}</span></p>` : nothing}\n ${this.hours ? html`<p class=\"row\">${iconSvg('clock', '20px')}<span>${this.hours}</span></p>` : nothing}\n ${this.phone ? html`<p class=\"row\">${iconSvg('phone', '20px')}<a href=${`tel:${this.phone.replace(/\\s+/g, '')}`}>${this.phone}</a></p>` : nothing}\n ${this.nearby.length ? html`<ul>${this.nearby.map((item) => html`<li><span>${item.place}</span><span>${item.distance}</span></li>`)}</ul>` : nothing}\n ${directions ? html`<a class=\"go\" href=${directions}>${this.directionsText}${iconSvg('arrow-right', '16px')}</a>` : nothing}\n </div>\n </div>`;\n }\n}\n\ncustomElements.define('impakt-site-plan', ImpaktSitePlan);\ncustomElements.define('impakt-mortgage-calculator', ImpaktMortgageCalculator);\ncustomElements.define('impakt-before-after', ImpaktBeforeAfter);\ncustomElements.define('impakt-sticky-bar', ImpaktStickyBar);\ncustomElements.define('impakt-location-card', ImpaktLocationCard);\ndeclare global {\n interface HTMLElementTagNameMap {\n 'impakt-site-plan': ImpaktSitePlan;\n 'impakt-mortgage-calculator': ImpaktMortgageCalculator;\n 'impakt-before-after': ImpaktBeforeAfter;\n 'impakt-sticky-bar': ImpaktStickyBar;\n 'impakt-location-card': ImpaktLocationCard;\n }\n}\n", "import { css, html, nothing, type TemplateResult } from 'lit';\nimport { say, pageLocale, ImpaktElement, focusRing, targetSize, visuallyHidden, fontWeight, space, spaceAround, t, type } from '@atomic-ui/ui';\n\ntype Space = 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\nconst card = css`\n .card { background: ${t.surfaceCard}; border-radius: ${t.radiusXl}; box-shadow: ${t.shadowSm}, 0 0 0 1px ${t.hairline}; }\n .h { margin: 0; font-family: ${t.fontHeading}; ${type('2xl')} font-weight: ${fontWeight('bold')}; color: ${t.textHeading}; }\n .btn { display: inline-flex; justify-content: center; align-items: center; min-block-size: 44px; padding: ${space(2.5)} ${space(5)}; font: inherit; font-weight: ${fontWeight('semibold')}; color: ${t.onBrand}; text-decoration: none; background: ${t.brand}; border: 0; border-radius: ${t.radiusLg}; cursor: pointer; }\n .btn:hover { background: ${t.brandHover}; }\n .btn.quiet { color: ${t.link}; background: transparent; box-shadow: inset 0 0 0 ${t.borderThin} ${t.border}; }\n .small { margin: 0; ${type('xs')} color: ${t.textMuted}; }\n .visually-hidden { ${visuallyHidden} }\n`;\n\nconst money = (amount: number, currency = 'GBP', digits = 0) => {\n try {\n return new Intl.NumberFormat(pageLocale(), { style: 'currency', currency, maximumFractionDigits: digits, minimumFractionDigits: digits }).format(amount);\n } catch {\n return String(Math.round(amount));\n }\n};\n\n/** One plan in a comparison. */\nexport interface PlanItem {\n id: string;\n name: string;\n /** The price as shown, such as \u00A312. */\n price: string;\n /** What the price is for, such as `a month`. */\n period?: string;\n note?: string;\n /** The rows this plan has, by their words, separated by commas. */\n includes: string;\n href?: string;\n /** A label such as `Most popular`, which also makes the plan stand out. */\n badge?: string;\n}\n\n/** One line a comparison checks every plan against. */\nexport interface PlanRow {\n id: string;\n label: string;\n}\n\n/**\n * Cover levels side by side, with a tick or a cross for each thing they\n * include and a button under each.\n *\n * A tick is never colour alone: each one says \"Included\" or \"Not included\" to\n * a screen reader. On a narrow screen the plans stack, each with its own list.\n *\n * @fires {CustomEvent<{ plan: PlanItem }>} impakt-select - When a plan is chosen. Cancel it to stay on the page.\n * @category content\n * @icon table\n */\nexport class ImpaktPlanComparison extends ImpaktElement {\n static properties = {\n heading: { type: String },\n plans: { type: Array },\n rows: { type: Array },\n buttonText: { type: String, attribute: 'button-text' },\n headingLevel: { type: Number, attribute: 'heading-level' },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n declare heading: string;\n declare plans: PlanItem[];\n declare rows: PlanRow[];\n declare buttonText: string;\n declare headingLevel: 2 | 3;\n declare spaceAbove: Space;\n declare spaceBelow: Space;\n\n constructor() {\n super();\n this.heading = 'Compare cover';\n this.plans = [];\n this.rows = [];\n this.buttonText = 'Choose';\n this.headingLevel = 2;\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n targetSize,\n spaceAround,\n card,\n css`\n :host { display: block; container-type: inline-size; }\n .h { margin-block-end: ${space(5)}; }\n .grid { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: ${space(4)}; }\n .plan { position: relative; display: flex; flex-direction: column; gap: ${space(3)}; padding: ${space(6)}; }\n .plan.top { box-shadow: 0 0 0 2px ${t.brand}, ${t.shadowMd}; }\n .badge { position: absolute; inset-block-start: 0; inset-inline-start: 50%; transform: translate(-50%, -50%); padding: ${space(1)} ${space(3)}; border-radius: 999px; ${type('xs')} font-weight: ${fontWeight('bold')}; color: ${t.onBrand}; background: ${t.brand}; white-space: nowrap; }\n .name { margin: 0; ${type('lg')} font-weight: ${fontWeight('bold')}; color: ${t.text}; }\n .price { margin: 0; font-family: ${t.fontHeading}; ${type('3xl')} font-weight: ${fontWeight('bold')}; color: ${t.text}; }\n .period { ${type('sm')} font-weight: ${fontWeight('regular')}; color: ${t.textMuted}; }\n .note { margin: 0; ${type('sm')} color: ${t.textMuted}; }\n ul { flex: 1; margin: 0; padding: ${space(3)} 0 0; list-style: none; display: grid; gap: ${space(2)}; border-block-start: 1px solid ${t.rule}; align-content: start; }\n li { display: flex; gap: ${space(2)}; ${type('sm')} }\n li[data-has='false'] { color: ${t.textMuted}; }\n .mark { flex-shrink: 0; inline-size: 1.25em; font-weight: ${fontWeight('bold')}; text-align: center; }\n li[data-has='true'] .mark { color: ${t.successText}; }\n @container (max-width: 40rem) { .grid { grid-template-columns: minmax(0, 1fr); gap: ${space(6)}; } }\n `,\n ];\n\n private has(plan: PlanItem, row: PlanRow): boolean {\n return plan.includes\n .split(',')\n .map((s) => s.trim().toLowerCase())\n .includes(row.label.trim().toLowerCase());\n }\n\n private choose(plan: PlanItem, event: Event): void {\n const go = this.dispatchEvent(new CustomEvent('impakt-select', { detail: { plan }, bubbles: true, composed: true, cancelable: true }));\n if (!go) event.preventDefault();\n }\n\n render(): TemplateResult {\n return html`\n ${this.heading ? html`<div class=\"h\" role=\"heading\" aria-level=${this.headingLevel}>${this.heading}</div>` : nothing}\n <div class=\"grid\" style=${`--cols: ${Math.max(1, this.plans.length)}`}>\n ${this.plans.map(\n (p) => html`<section class=\"card plan ${p.badge ? 'top' : ''}\" aria-labelledby=${this.id_(`n-${p.id}`)}>\n ${p.badge ? html`<span class=\"badge\">${p.badge}</span>` : nothing}\n <h3 class=\"name\" id=${this.id_(`n-${p.id}`)}>${p.name}</h3>\n <p class=\"price\">${p.price}${p.period ? html` <span class=\"period\">${p.period}</span>` : nothing}</p>\n ${p.note ? html`<p class=\"note\">${p.note}</p>` : nothing}\n <ul>${this.rows.map((r) => {\n const has = this.has(p, r);\n return html`<li data-has=${String(has)}><span class=\"mark\" aria-hidden=\"true\">${has ? '\u2713' : '\u2013'}</span><span>${r.label}<span class=\"visually-hidden\">: ${say(has ? 'included' : 'not included')}</span></span></li>`;\n })}</ul>\n ${\n p.href\n ? html`<a class=\"btn ${p.badge ? '' : 'quiet'}\" href=${p.href} @click=${(e: Event) => this.choose(p, e)}>${this.buttonText}<span class=\"visually-hidden\"> ${p.name}</span></a>`\n : html`<button class=\"btn ${p.badge ? '' : 'quiet'}\" type=\"button\" @click=${(e: Event) => this.choose(p, e)}>${this.buttonText}<span class=\"visually-hidden\"> ${p.name}</span></button>`\n }\n </section>`,\n )}\n </div>`;\n }\n}\n\n/** A YouTube or Vimeo address as its privacy-friendly embed, or null for a plain video file. */\nexport function embedOf(src: string, locale?: string): string | null {\n const yt = /(?:youtube\\.com\\/(?:watch\\?v=|embed\\/|shorts\\/)|youtu\\.be\\/)([\\w-]{6,})/.exec(src);\n // The player's own controls and captions in the page's language (ADR 0026).\n const hl =\n locale && !/^en\\b/i.test(locale) ? `&hl=${encodeURIComponent(locale.split('-')[0]!)}&cc_lang_pref=${encodeURIComponent(locale.split('-')[0]!)}` : '';\n if (yt) return `https://www.youtube-nocookie.com/embed/${yt[1]}?autoplay=1&rel=0${hl}`;\n const vimeo = /vimeo\\.com\\/(?:video\\/)?(\\d+)/.exec(src);\n if (vimeo) return `https://player.vimeo.com/video/${vimeo[1]}?autoplay=1&dnt=1`;\n return null;\n}\n\n/**\n * A video, with its title, captions and a transcript link.\n *\n * A YouTube or Vimeo video shows its poster and a Play button first, and only\n * loads the player when pressed, so the page stays fast and nothing is sent to\n * the video site until someone chooses to watch. A video file plays in the\n * browser's own player, with captions from `captions-src`.\n *\n * @category media\n * @icon play\n */\nexport class ImpaktVideo extends ImpaktElement {\n static properties = {\n videoSrc: { type: String, attribute: 'video-src' },\n label: { type: String },\n posterSrc: { type: String, attribute: 'poster-src' },\n captionsSrc: { type: String, attribute: 'captions-src' },\n transcriptHref: { type: String, attribute: 'transcript-href' },\n playText: { type: String, attribute: 'play-text' },\n ratio: { type: String, reflect: true },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n /** A YouTube or Vimeo address, or a video file such as an .mp4. */\n declare videoSrc: string;\n /** What the video is, read out before it plays. */\n declare label: string;\n declare posterSrc: string;\n /** A captions file in WebVTT, for a video file. */\n declare captionsSrc: string;\n declare transcriptHref: string;\n declare playText: string;\n declare ratio: '16:9' | '4:3' | '1:1' | '9:16';\n declare playing: boolean;\n declare spaceAbove: Space;\n declare spaceBelow: Space;\n\n constructor() {\n super();\n this.videoSrc = '';\n this.label = 'Video';\n this.posterSrc = '';\n this.captionsSrc = '';\n this.transcriptHref = '';\n this.playText = 'Play video';\n this.ratio = '16:9';\n this.playing = false;\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n spaceAround,\n card,\n css`\n :host { display: block; }\n .frame { position: relative; overflow: hidden; aspect-ratio: 16 / 9; border-radius: ${t.radiusXl}; background: #111; }\n :host([ratio='4:3']) .frame { aspect-ratio: 4 / 3; }\n :host([ratio='1:1']) .frame { aspect-ratio: 1; }\n :host([ratio='9:16']) .frame { aspect-ratio: 9 / 16; max-inline-size: 420px; }\n iframe, video, img { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; border: 0; object-fit: cover; }\n .play { position: absolute; inset: 0; display: grid; place-items: center; inline-size: 100%; padding: 0; color: #fff; background: linear-gradient(transparent 40%, rgb(0 0 0 / 0.55)); border: 0; cursor: pointer; }\n .disc { display: grid; place-items: center; inline-size: 72px; block-size: 72px; border-radius: 50%; background: ${t.brand}; box-shadow: ${t.shadowLg}; }\n /* Held inside the frame at both edges, so loosened or long words wrap rather than run out of it (1.4.12). */\n .label { position: absolute; inset-inline: ${space(5)}; inset-block-end: ${space(4)}; ${type('lg')} font-weight: ${fontWeight('semibold')}; text-align: start; }\n .foot { margin: ${space(2)} 0 0; ${type('sm')} }\n .foot a { color: ${t.link}; }\n .empty { display: grid; place-items: center; block-size: 100%; color: #ccc; }\n `,\n ];\n\n render(): TemplateResult {\n const embed = embedOf(this.videoSrc, pageLocale(this));\n let player: TemplateResult;\n if (!this.videoSrc) player = html`<div class=\"empty\">${say('Add a video address')}</div>`;\n else if (embed && this.playing)\n player = html`<iframe src=${embed} title=${this.label} allow=\"autoplay; encrypted-media; picture-in-picture; fullscreen\" allowfullscreen></iframe>`;\n else if (embed)\n player = html`${this.posterSrc ? html`<img src=${this.posterSrc} alt=\"\" />` : nothing}\n <button class=\"play\" type=\"button\" @click=${() => {\n this.playing = true;\n }}>\n <span class=\"disc\" aria-hidden=\"true\"><svg width=\"28\" height=\"28\" viewBox=\"0 0 24 24\" fill=\"currentColor\"><path d=\"M8 5v14l11-7z\"/></svg></span>\n <span class=\"label\">${this.playText}<span class=\"visually-hidden\">: ${this.label}</span></span>\n </button>`;\n else\n player = html`<video controls preload=\"metadata\" poster=${this.posterSrc || nothing} aria-label=${this.label}>\n <source src=${this.videoSrc} />\n ${this.captionsSrc ? html`<track kind=\"captions\" src=${this.captionsSrc} srclang=\"en\" label=\"English\" default />` : nothing}\n </video>`;\n return html`<div class=\"frame\" part=\"frame\">${player}</div>\n ${this.transcriptHref ? html`<p class=\"foot\"><a href=${this.transcriptHref}>${say('Read the transcript')}<span class=\"visually-hidden\">${say(' of {video}', { video: this.label })}</span></a></p>` : nothing}`;\n }\n}\n\nconst NOTICE_WORDS: Record<string, { heading: string; text: string }> = {\n mortgage: { heading: 'Your home may be repossessed', text: 'Your home may be repossessed if you do not keep up repayments on your mortgage.' },\n 'secured-loan': {\n heading: 'Think carefully before securing other debts against your home',\n text: 'Your home may be repossessed if you do not keep up repayments on a mortgage or any other debt secured on it.',\n },\n investment: { heading: 'Capital at risk', text: 'The value of investments can go down as well as up, and you may get back less than you put in.' },\n insurance: { heading: 'Important information', text: 'Read the policy documents to check the cover suits your needs. Limits and exclusions apply.' },\n custom: { heading: '', text: '' },\n};\n\n/**\n * The warning and the regulator wording a financial page must carry, as a\n * block of its own so it is never left off.\n *\n * Pick the kind to start from the usual words, or `custom` to write your own.\n * Whatever it says, check it with whoever signs off your financial promotions.\n *\n * @category feedback\n * @icon shield\n */\nexport class ImpaktRegulatoryNotice extends ImpaktElement {\n static properties = {\n kind: { type: String, reflect: true },\n heading: { type: String },\n text: { type: String },\n firm: { type: String },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n declare kind: 'mortgage' | 'secured-loan' | 'investment' | 'insurance' | 'custom';\n /** Leave empty to use the usual heading for the kind. */\n declare heading: string;\n /** Leave empty to use the usual warning for the kind. */\n declare text: string;\n /** Who you are and who regulates you, such as \"Acme Ltd is authorised and regulated by the Financial Conduct Authority (FRN 123456).\" */\n declare firm: string;\n declare spaceAbove: Space;\n declare spaceBelow: Space;\n\n constructor() {\n super();\n this.kind = 'mortgage';\n this.heading = '';\n this.text = '';\n this.firm = '';\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n spaceAround,\n css`\n :host { display: block; }\n .box { padding: ${space(5)}; border-inline-start: 6px solid ${t.warning}; border-radius: ${t.radiusLg}; background: ${t.warningSubtle}; }\n :host([kind='insurance']) .box { border-color: ${t.info}; background: ${t.infoSubtle}; }\n strong { display: block; margin-block-end: ${space(1)}; ${type('md')} color: ${t.text}; }\n p { margin: 0; color: ${t.text}; }\n /* Muted text is proved against the card colour, not the notice's, so the firm's line is in the text colour (1.4.3). */\n .firm { margin-block-start: ${space(3)}; ${type('sm')} color: ${t.text}; }\n `,\n ];\n\n render(): TemplateResult {\n const preset = NOTICE_WORDS[this.kind] ?? NOTICE_WORDS.custom!;\n const heading = this.heading || (preset.heading ? say(preset.heading) : '');\n const text = this.text || (preset.text ? say(preset.text) : '');\n return html`<aside class=\"box\" part=\"box\" aria-label=${heading || say('Important information')}>\n ${heading ? html`<strong>${heading}</strong>` : nothing}\n ${text ? html`<p>${text}</p>` : nothing}\n ${this.firm ? html`<p class=\"firm\">${this.firm}</p>` : nothing}\n </aside>`;\n }\n}\n\n/** One band of a tax: everything above `from` and up to the next band's `from` is charged at `rate`. */\ninterface Band {\n from: number;\n rate: number;\n}\n\n/**\n * Stamp Duty Land Tax for England and Northern Ireland, from 1 April 2025.\n * Exported so the numbers can be checked, and changed in one place.\n */\nexport const SDLT = {\n standard: [\n { from: 0, rate: 0 },\n { from: 125000, rate: 2 },\n { from: 250000, rate: 5 },\n { from: 925000, rate: 10 },\n { from: 1500000, rate: 12 },\n ] as Band[],\n firstTime: [\n { from: 0, rate: 0 },\n { from: 300000, rate: 5 },\n ] as Band[],\n firstTimeLimit: 500000,\n additionalSurcharge: 5,\n};\n\nfunction taxOn(price: number, bands: Band[], extra = 0): number {\n let tax = 0;\n bands.forEach((band, i) => {\n const top = bands[i + 1]?.from ?? Infinity;\n if (price > band.from) tax += ((Math.min(price, top) - band.from) * (band.rate + extra)) / 100;\n });\n return Math.round(tax);\n}\n\n/** The stamp duty on a home, for a mover, a first-time buyer or a second home. */\nexport function stampDuty(price: number, buyer: 'mover' | 'first-time' | 'additional'): number {\n if (price <= 0) return 0;\n if (buyer === 'first-time' && price <= SDLT.firstTimeLimit) return taxOn(price, SDLT.firstTime);\n if (buyer === 'additional') return price < 40000 ? 0 : taxOn(price, SDLT.standard, SDLT.additionalSurcharge);\n return taxOn(price, SDLT.standard);\n}\n\nconst calcStyles = css`\n :host { display: block; container-type: inline-size; }\n .wrap { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); overflow: hidden; }\n .inputs { display: flex; flex-direction: column; gap: ${space(5)}; padding: ${space(8)}; }\n label, legend { display: block; ${type('sm')} font-weight: ${fontWeight('semibold')}; margin-block-end: ${space(1.5)}; padding: 0; }\n fieldset { margin: 0; padding: 0; border: 0; }\n .choices { display: flex; flex-wrap: wrap; gap: ${space(2)}; }\n .choices label { display: inline-flex; align-items: center; gap: ${space(2)}; margin: 0; padding: ${space(2)} ${space(3)}; font-weight: ${fontWeight('regular')}; border: ${t.borderThin} solid ${t.border}; border-radius: ${t.radiusLg}; cursor: pointer; }\n .choices input { accent-color: ${t.brand}; }\n input[type='number'] { box-sizing: border-box; inline-size: 100%; min-block-size: 44px; padding: ${space(2)} ${space(3)}; font: inherit; color: ${t.text}; background: ${t.surfaceCard}; border: ${t.borderThin} solid ${t.border}; border-radius: ${t.radiusLg}; }\n .result { display: flex; flex-direction: column; justify-content: center; gap: ${space(2)}; padding: ${space(8)}; color: ${t.onBrand}; background: ${t.brand}; }\n .caption { margin: 0; ${type('sm')} opacity: 0.85; }\n output { display: block; font-family: ${t.fontHeading}; ${type('4xl')} font-weight: ${fontWeight('bold')}; }\n .line { margin: 0; ${type('sm')} }\n .foot { grid-column: 1 / -1; padding: ${space(4)} ${space(8)}; background: ${t.surfaceSubtle}; }\n /* Muted text is proved against the card colour, not this band, so the small print here is in the text colour (1.4.3). */\n .foot .small { color: ${t.text}; }\n @container (max-width: 44rem) { .wrap { grid-template-columns: minmax(0, 1fr); } .inputs, .result { padding: ${space(5)}; } .foot { padding: ${space(4)} ${space(5)}; } }\n`;\n\n/**\n * How much stamp duty a home would cost, for a home mover, a first-time buyer\n * or a second home, worked out as the price is typed.\n *\n * The rates are England and Northern Ireland's from 1 April 2025. Scotland and\n * Wales have their own taxes, and rates change, so the small print says which\n * rates these are and points to GOV.UK.\n *\n * @category form\n * @icon pound\n */\nexport class ImpaktStampDutyCalculator extends ImpaktElement {\n static properties = {\n heading: { type: String },\n price: { type: Number },\n buyer: { type: String },\n smallPrint: { type: String, attribute: 'small-print' },\n headingLevel: { type: Number, attribute: 'heading-level' },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n declare heading: string;\n declare price: number;\n declare buyer: 'mover' | 'first-time' | 'additional';\n declare smallPrint: string;\n declare headingLevel: 2 | 3;\n declare spaceAbove: Space;\n declare spaceBelow: Space;\n\n constructor() {\n super();\n this.heading = 'How much stamp duty would you pay?';\n this.price = 385000;\n this.buyer = 'first-time';\n this.smallPrint =\n 'Based on Stamp Duty Land Tax rates in England and Northern Ireland from 1 April 2025. Scotland and Wales have their own taxes. Check what you would pay on GOV.UK.';\n this.headingLevel = 2;\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [...ImpaktElement.styles, focusRing, spaceAround, card, calcStyles];\n\n render(): TemplateResult {\n const duty = stampDuty(this.price, this.buyer);\n const rate = this.price > 0 ? (duty / this.price) * 100 : 0;\n const buyers: [typeof this.buyer, string][] = [\n ['first-time', say('First home')],\n ['mover', say('Moving home')],\n ['additional', say('Second home')],\n ];\n return html`<div class=\"card wrap\" part=\"wrap\">\n <div class=\"inputs\">\n ${this.heading ? html`<div class=\"h\" role=\"heading\" aria-level=${this.headingLevel}>${this.heading}</div>` : nothing}\n <div><label for=${this.id_('price')}>${say('Price of the home (\u00A3)')}</label>\n <input id=${this.id_('price')} type=\"number\" min=\"0\" step=\"1000\" inputmode=\"numeric\" .value=${String(this.price)} @input=${(e: Event) => {\n this.price = Number((e.target as HTMLInputElement).value) || 0;\n }} /></div>\n <fieldset><legend>${say('Are you buying')}</legend><div class=\"choices\">\n ${buyers.map(\n ([value, label]) =>\n html`<label><input type=\"radio\" name=${this.id_('buyer')} .checked=${this.buyer === value} @change=${() => {\n this.buyer = value;\n }} />${label}</label>`,\n )}\n </div></fieldset>\n </div>\n <div class=\"result\" aria-live=\"polite\">\n <p class=\"caption\">${say('Stamp duty to pay')}</p>\n <output for=${this.id_('price')}>${money(duty)}</output>\n <p class=\"line\">${duty ? say('About {rate}% of the price', { rate: rate.toFixed(1) }) : say('Nothing to pay at this price')}</p>\n ${this.buyer === 'first-time' && this.price > SDLT.firstTimeLimit ? html`<p class=\"line\">${say('First-time buyer relief stops above {limit}, so the usual rates apply.', { limit: money(SDLT.firstTimeLimit) })}</p>` : nothing}\n </div>\n ${this.smallPrint ? html`<div class=\"foot\"><p class=\"small\">${this.smallPrint}</p></div>` : nothing}\n </div>`;\n }\n}\n\n/**\n * Roughly how much someone could borrow, from what they earn, and the price\n * of home that buys with their deposit.\n *\n * Lenders usually lend four to four and a half times income; the multiple is\n * a setting. It is a guide, not an offer, and the small print says so.\n *\n * @category form\n * @icon pound\n */\nexport class ImpaktAffordabilityCalculator extends ImpaktElement {\n static properties = {\n heading: { type: String },\n income: { type: Number },\n secondIncome: { type: Number, attribute: 'second-income' },\n deposit: { type: Number },\n timesIncome: { type: Number, attribute: 'times-income' },\n smallPrint: { type: String, attribute: 'small-print' },\n headingLevel: { type: Number, attribute: 'heading-level' },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n declare heading: string;\n declare income: number;\n declare secondIncome: number;\n declare deposit: number;\n /** How many times income a lender would lend, such as 4.5. */\n declare timesIncome: number;\n declare smallPrint: string;\n declare headingLevel: 2 | 3;\n declare spaceAbove: Space;\n declare spaceBelow: Space;\n\n constructor() {\n super();\n this.heading = 'How much could you borrow?';\n this.income = 45000;\n this.secondIncome = 0;\n this.deposit = 30000;\n this.timesIncome = 4.5;\n this.smallPrint =\n 'This is a guide, not a mortgage offer. What a lender offers depends on your circumstances. Your home may be repossessed if you do not keep up repayments on your mortgage.';\n this.headingLevel = 2;\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [...ImpaktElement.styles, focusRing, spaceAround, card, calcStyles];\n\n private field(key: 'income' | 'secondIncome' | 'deposit'): (event: Event) => void {\n return (event) => {\n this[key] = Number((event.target as HTMLInputElement).value) || 0;\n };\n }\n\n render(): TemplateResult {\n const borrow = Math.max(0, (this.income + this.secondIncome) * this.timesIncome);\n const input = (key: 'income' | 'secondIncome' | 'deposit', label: string) => html`<div><label for=${this.id_(key)}>${label}</label>\n <input id=${this.id_(key)} type=\"number\" min=\"0\" step=\"1000\" inputmode=\"numeric\" .value=${String(this[key])} @input=${this.field(key)} /></div>`;\n return html`<div class=\"card wrap\" part=\"wrap\">\n <div class=\"inputs\">\n ${this.heading ? html`<div class=\"h\" role=\"heading\" aria-level=${this.headingLevel}>${this.heading}</div>` : nothing}\n ${input('income', say('Your yearly income before tax (\u00A3)'))}\n ${input('secondIncome', say('A second person\u2019s income, if buying together (\u00A3)'))}\n ${input('deposit', say('Your deposit (\u00A3)'))}\n </div>\n <div class=\"result\" aria-live=\"polite\">\n <p class=\"caption\">${say('You could borrow about')}</p>\n <output>${money(borrow)}</output>\n <p class=\"line\">${say('With your deposit, that\u2019s a home of about {amount}.', { amount: money(borrow + this.deposit) })}</p>\n </div>\n ${this.smallPrint ? html`<div class=\"foot\"><p class=\"small\">${this.smallPrint}</p></div>` : nothing}\n </div>`;\n }\n}\n\n/**\n * How to get in touch: a phone number, opening hours, an email address, and a\n * short form to ask for a call back.\n *\n * The form fires `impakt-submit` with the name, phone number and best time; the\n * app sends it on. Then the block thanks them in place.\n *\n * @fires {CustomEvent<{ name: string; phone: string; when: string }>} impakt-submit - When the form is sent.\n * @category content\n * @icon phone\n */\nexport class ImpaktContactBlock extends ImpaktElement {\n static properties = {\n heading: { type: String },\n phone: { type: String },\n hours: { type: String },\n email: { type: String },\n callbackHeading: { type: String, attribute: 'callback-heading' },\n buttonText: { type: String, attribute: 'button-text' },\n doneText: { type: String, attribute: 'done-text' },\n headingLevel: { type: Number, attribute: 'heading-level' },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n declare heading: string;\n declare phone: string;\n /** One line a day or range, such as \"Monday to Friday, 9am to 6pm\". */\n declare hours: string;\n declare email: string;\n /** Leave empty to show no call back form. */\n declare callbackHeading: string;\n declare buttonText: string;\n declare doneText: string;\n declare headingLevel: 2 | 3;\n declare sent: boolean;\n declare spaceAbove: Space;\n declare spaceBelow: Space;\n\n constructor() {\n super();\n this.heading = 'Talk to us';\n this.phone = '0800 000 0000';\n this.hours = 'Monday to Friday, 9am to 6pm\\nSaturday, 10am to 2pm';\n this.email = '';\n this.callbackHeading = 'Or we can call you';\n this.buttonText = 'Ask for a call back';\n this.doneText = 'Thanks. We\u2019ll call you at the time you chose.';\n this.headingLevel = 2;\n this.sent = false;\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n spaceAround,\n card,\n css`\n :host { display: block; container-type: inline-size; }\n .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: ${space(6)}; padding: ${space(8)}; }\n .phone { display: inline-block; margin: ${space(3)} 0; font-family: ${t.fontHeading}; ${type('3xl')} font-weight: ${fontWeight('bold')}; color: ${t.link}; text-decoration: none; }\n .hours { margin: 0; white-space: pre-line; color: ${t.textMuted}; }\n .email { display: inline-flex; align-items: center; min-block-size: ${t.targetMin}; margin-block-start: ${space(3)}; color: ${t.link}; overflow-wrap: anywhere; }\n form { display: grid; gap: ${space(3)}; padding: ${space(5)}; border-radius: ${t.radiusLg}; background: ${t.surfaceInset}; }\n .sub { margin: 0; ${type('lg')} font-weight: ${fontWeight('bold')}; color: ${t.text}; }\n label { display: block; ${type('sm')} font-weight: ${fontWeight('semibold')}; margin-block-end: ${space(1)}; }\n input, select { box-sizing: border-box; inline-size: 100%; min-block-size: 44px; padding: ${space(2)} ${space(3)}; font: inherit; color: ${t.text}; background: ${t.surfaceCard}; border: ${t.borderThin} solid ${t.border}; border-radius: ${t.radiusLg}; }\n .done { margin: 0; padding: ${space(5)}; border-radius: ${t.radiusLg}; background: ${t.successSubtle}; color: ${t.successText}; font-weight: ${fontWeight('semibold')}; }\n @container (max-width: 40rem) { .wrap { grid-template-columns: minmax(0, 1fr); padding: ${space(5)}; } }\n `,\n ];\n\n private submit(event: SubmitEvent): void {\n event.preventDefault();\n const form = new FormData(event.target as HTMLFormElement);\n const data = { name: String(form.get('name') ?? ''), phone: String(form.get('phone') ?? ''), when: String(form.get('when') ?? '') };\n this.dispatchEvent(new CustomEvent('impakt-submit', { detail: data, bubbles: true, composed: true }));\n this.sent = true;\n }\n\n render(): TemplateResult {\n return html`<div class=\"card wrap\" part=\"wrap\">\n <div>\n ${this.heading ? html`<div class=\"h\" role=\"heading\" aria-level=${this.headingLevel}>${this.heading}</div>` : nothing}\n ${this.phone ? html`<a class=\"phone\" href=${`tel:${this.phone.replace(/[^\\d+]/g, '')}`}>${this.phone}</a>` : nothing}\n ${this.hours ? html`<p class=\"hours\">${this.hours}</p>` : nothing}\n ${this.email ? html`<a class=\"email\" href=${`mailto:${this.email}`}>${this.email}</a>` : nothing}\n </div>\n ${\n !this.callbackHeading\n ? nothing\n : this.sent\n ? html`<p class=\"done\" role=\"status\">${this.doneText}</p>`\n : html`<form @submit=${this.submit} aria-labelledby=${this.id_('cb')}>\n <p class=\"sub\" id=${this.id_('cb')}>${this.callbackHeading}</p>\n <div><label for=${this.id_('name')}>${say('Your name')}</label><input id=${this.id_('name')} name=\"name\" autocomplete=\"name\" required /></div>\n <div><label for=${this.id_('tel')}>${say('Phone number')}</label><input id=${this.id_('tel')} name=\"phone\" type=\"tel\" autocomplete=\"tel\" required /></div>\n <div><label for=${this.id_('when')}>${say('Best time to call')}</label><select id=${this.id_('when')} name=\"when\"><option value=\"Morning\">${say('Morning')}</option><option value=\"Afternoon\">${say('Afternoon')}</option><option value=\"Evening\">${say('Evening')}</option></select></div>\n <button class=\"btn\" type=\"submit\">${this.buttonText}</button>\n </form>`\n }\n </div>`;\n }\n}\n\n// Working values, not settings: kept out of `properties` so the page designer does not offer them.\nImpaktVideo.createProperty('playing', { state: true });\nImpaktContactBlock.createProperty('sent', { state: true });\n\ncustomElements.define('impakt-plan-comparison', ImpaktPlanComparison);\ncustomElements.define('impakt-video', ImpaktVideo);\ncustomElements.define('impakt-regulatory-notice', ImpaktRegulatoryNotice);\ncustomElements.define('impakt-stamp-duty-calculator', ImpaktStampDutyCalculator);\ncustomElements.define('impakt-affordability-calculator', ImpaktAffordabilityCalculator);\ncustomElements.define('impakt-contact-block', ImpaktContactBlock);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'impakt-plan-comparison': ImpaktPlanComparison;\n 'impakt-video': ImpaktVideo;\n 'impakt-regulatory-notice': ImpaktRegulatoryNotice;\n 'impakt-stamp-duty-calculator': ImpaktStampDutyCalculator;\n 'impakt-affordability-calculator': ImpaktAffordabilityCalculator;\n 'impakt-contact-block': ImpaktContactBlock;\n }\n}\n", "/**\n * A cost estimator: a few questions, one at a time, with a budget beside them\n * that moves as the answers change, and then a result with a timeline, a team\n * and a way of working.\n *\n * Every number is content. Each choice says what it adds to the cost and the\n * weeks, or what it multiplies them by, and the bands say how big a team a\n * cost needs. The arithmetic lives here, in code, because a binding never\n * computes (ADR 0003): a studio changes its rates in the CMS, not the rules.\n */\nimport { css, html, nothing, unsafeCSS, type TemplateResult } from 'lit';\nimport {\n ImpaktElement,\n pageLocale,\n say,\n focusRing,\n targetSize,\n visuallyHidden,\n fontSize,\n fontWeight,\n space,\n spaceAround,\n t,\n type,\n toneOf,\n} from '@atomic-ui/ui';\n\n/** One answer to a question, and what it does to the estimate. */\nexport interface EstimatorChoice {\n id: string;\n label: string;\n /** A line under the label, such as \"iPhone and Android\". */\n hint?: string;\n /** Added to the cost, counted in units (see `unit`). */\n cost?: number;\n /** Added to the weeks. */\n weeks?: number;\n /** Multiplies the cost, such as 1.35 for a more polished first version. */\n costFactor?: number;\n /** Multiplies the weeks. */\n weeksFactor?: number;\n /** Engineers added to the team, such as one more to go faster. */\n engineers?: number;\n /** Shown beside the budget when it is picked. */\n tip?: string;\n /** How the summary names it, such as \"a SaaS platform\" or \"payments\". The label when left out. */\n phrase?: string;\n}\n\n/** One question. */\nexport interface EstimatorQuestion {\n id: string;\n heading: string;\n hint?: string;\n /** `one` picks one card, `many` picks any number, and `scale` is a slider across the choices in order. */\n kind: 'one' | 'many' | 'scale';\n choices: EstimatorChoice[];\n /** The choices picked at the start. A `one` or `scale` question takes the first id; with none, its first choice. */\n start?: string[];\n /** A short name for the question in the summary that is sent on, such as \"Polish\". Left out of it when there is none. */\n short?: string;\n /** For a `many` question, whether the summary lists what was picked, as in \"with payments and AI features\". Yes when left out. */\n inSummary?: boolean;\n}\n\n/** A band of cost: the first band whose `below` the cost is under applies, or the last one. */\nexport interface EstimatorBand {\n below?: number;\n /** For a team band, how many engineers. */\n engineers?: number;\n /** For a way-of-working band, what it is called. */\n text?: string;\n}\n\n/** One part of the timeline. The part with no share takes the weeks the others leave. */\nexport interface EstimatorPhase {\n label: string;\n /** Its share of the weeks, such as 0.1. At least one week either way. */\n share?: number;\n}\n\n/** What an estimate came to, as the `impakt-estimate` event carries it. */\nexport interface EstimateResult {\n low: number;\n high: number;\n weeks: number;\n engineers: number;\n way: string;\n summary: string;\n /** The ids picked for each question. */\n answers: Record<string, string[]>;\n}\n\nconst sum = (xs: number[]) => xs.reduce((a, b) => a + b, 0);\nconst bandFor = (bands: EstimatorBand[], cost: number): EstimatorBand | undefined =>\n bands.find((b) => typeof b.below === 'number' && cost < b.below) ?? bands.at(-1);\n\n/** The arithmetic, apart from the element so it can be checked on its own. */\nexport function estimate(\n questions: EstimatorQuestion[],\n answers: Record<string, string[]>,\n rules: { low: number; high: number; minWeeks: number; teams: EstimatorBand[]; ways: EstimatorBand[] },\n): { cost: number; low: number; high: number; weeks: number; engineers: number; way: string } {\n const chosen = questions.flatMap((q) => (answers[q.id] ?? []).flatMap((id) => q.choices.filter((c) => c.id === id)));\n let cost = sum(chosen.map((c) => c.cost ?? 0));\n let weeks = sum(chosen.map((c) => c.weeks ?? 0));\n for (const c of chosen) {\n cost *= c.costFactor ?? 1;\n weeks *= c.weeksFactor ?? 1;\n }\n const engineers = (bandFor(rules.teams, cost)?.engineers ?? 1) + sum(chosen.map((c) => c.engineers ?? 0));\n return {\n cost,\n low: Math.round(cost * rules.low),\n high: Math.round(cost * rules.high),\n weeks: Math.max(rules.minWeeks, Math.round(weeks)),\n engineers,\n way: bandFor(rules.ways, cost)?.text ?? '',\n };\n}\n\n/** The weeks each part of the timeline takes, adding up to the whole. */\nexport function phaseWeeks(phases: EstimatorPhase[], weeks: number): number[] {\n const fixed = phases.map((p) => (typeof p.share === 'number' ? Math.max(1, Math.round(weeks * p.share)) : 0));\n const rest = Math.max(1, weeks - sum(fixed));\n return phases.map((p, i) => (typeof p.share === 'number' ? fixed[i]! : rest));\n}\n\n/**\n * Asks a few questions one at a time and keeps a budget beside them that moves\n * with every answer, then shows the estimate: the range, the weeks, how long\n * each part takes, the team and the way of working. The visitor can send the\n * estimate on to a contact page, where a message box can start with it.\n *\n * @category form\n * @icon calculator\n * @fires {CustomEvent<EstimateResult>} impakt-estimate - When the estimate is sent on. The result is in detail.\n */\nexport class ImpaktEstimator extends ImpaktElement {\n static properties = {\n questions: { type: Array },\n teams: { type: Array },\n ways: { type: Array },\n phases: { type: Array },\n low: { type: Number },\n high: { type: Number },\n minWeeks: { type: Number, attribute: 'min-weeks' },\n currency: { type: String },\n unit: { type: Number },\n intro: { type: String },\n budgetLabel: { type: String, attribute: 'budget-label' },\n resultHeading: { type: String, attribute: 'result-heading' },\n teamText: { type: String, attribute: 'team-text' },\n teamTextOne: { type: String, attribute: 'team-text-one' },\n note: { type: String },\n contactHref: { type: String, attribute: 'contact-href' },\n sendLabel: { type: String, attribute: 'send-label' },\n headingLevel: { type: Number, attribute: 'heading-level' },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n\n /** The questions, in the order they are asked. */\n declare questions: EstimatorQuestion[];\n /** How many engineers each band of cost needs. */\n declare teams: EstimatorBand[];\n /** The way of working for each band of cost. */\n declare ways: EstimatorBand[];\n /** The parts of the timeline, in order. */\n declare phases: EstimatorPhase[];\n /** The low end of the range, as a share of the cost. */\n declare low: number;\n /** The high end of the range, as a share of the cost. */\n declare high: number;\n /** The fewest weeks an estimate says. */\n declare minWeeks: number;\n /** The currency the cost is in, such as GBP. */\n declare currency: string;\n /** What one unit of cost is worth, such as 1000 when the costs are in thousands. */\n declare unit: number;\n /** Beside the budget before anything is picked, such as \"Start by telling us what you are building.\" */\n declare intro: string;\n declare budgetLabel: string;\n declare resultHeading: string;\n /** The team, with {n} for the number of engineers. */\n declare teamText: string;\n /** The team when it has one engineer. */\n declare teamTextOne: string;\n /** A line under the result, such as how accurate it is. */\n declare note: string;\n /** Where the estimate is sent on to. With none, there is no button to send it. */\n declare contactHref: string;\n declare sendLabel: string;\n /** The level of each question's heading. */\n declare headingLevel: number;\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n private at = 0;\n private answers: Record<string, string[]> = {};\n private tip = '';\n private copied = '';\n private started = false;\n\n constructor() {\n super();\n this.questions = [];\n this.teams = [];\n this.ways = [];\n this.phases = [];\n this.low = 0.85;\n this.high = 1.25;\n this.minWeeks = 1;\n this.currency = 'GBP';\n this.unit = 1;\n this.intro = '';\n this.budgetLabel = 'Indicative budget';\n this.resultHeading = 'Your estimate';\n this.teamText = '{n} engineers';\n this.teamTextOne = '1 engineer';\n this.note = '';\n this.contactHref = '';\n this.sendLabel = 'Send this to us';\n this.headingLevel = 2;\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n spaceAround,\n focusRing,\n css`\n :host { display: block; container-type: inline-size; }\n [hidden] { display: none !important; }\n .wrap { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: ${space(10)}; align-items: start; }\n .mono { font-family: ${t.fontMono}; font-size: ${fontSize('xs')}; letter-spacing: 0.04em; text-transform: uppercase; color: ${t.textMuted}; margin: 0; }\n .sr-only { ${visuallyHidden} }\n\n .progress { display: grid; gap: ${space(2)}; margin-block-end: ${space(6)}; }\n .bar { block-size: 4px; border-radius: 2px; background: color-mix(in srgb, currentColor 12%, transparent); overflow: hidden; }\n .bar i { display: block; block-size: 100%; background: ${t.brand}; transition: inline-size 300ms ease; }\n\n fieldset { border: 0; margin: 0; padding: 0; min-inline-size: 0; }\n legend { padding: 0; margin-block-end: ${space(2)}; }\n .q { margin: 0; font-family: ${t.fontHeading}; font-weight: ${fontWeight('bold')}; ${type('3xl')} letter-spacing: ${t.trackingTight}; color: ${t.textHeading}; outline: none; }\n .hint { margin: 0 0 ${space(6)}; color: ${t.textMuted}; }\n\n .choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: ${space(3)}; }\n .choices.many { grid-template-columns: repeat(3, minmax(0, 1fr)); }\n .choice { position: relative; display: grid; gap: ${space(1)}; align-content: start; padding: ${space(4)}; border: ${t.borderThin} solid ${t.border}; border-radius: ${t.radiusLg}; background: ${t.surfaceCard}; cursor: pointer; transition: border-color 120ms ease, background 120ms ease; }\n .choice:hover { border-color: ${t.borderStrong}; }\n .choice input { ${visuallyHidden} }\n .choice:has(input:checked) { border-color: ${t.brand}; box-shadow: inset 0 0 0 1px ${t.brand}; background: ${t.brandSubtle}; }\n .choice:has(input:focus-visible) { box-shadow: ${t.focusShadow}; }\n .many .choice { padding: ${space(3)}; }\n .label { font-weight: ${fontWeight('semibold')}; }\n .small { ${type('sm')} color: ${t.textMuted}; }\n /* A tick for a picked feature, drawn in the corner. */\n .many .choice:has(input:checked)::after { content: '\u2713'; position: absolute; inset-block-start: ${space(2)}; inset-inline-end: ${space(3)}; color: ${t.brand}; font-weight: ${fontWeight('bold')}; }\n\n .scale { display: grid; gap: ${space(3)}; }\n .scale input { inline-size: 100%; accent-color: ${t.brand}; ${targetSize} }\n .ticks { display: flex; justify-content: space-between; ${type('sm')} color: ${t.textMuted}; }\n .ticks span[aria-current] { color: ${t.text}; font-weight: ${fontWeight('semibold')}; }\n .now { margin: 0; }\n\n .nav { display: flex; gap: ${space(3)}; margin-block-start: ${space(8)}; }\n button, .send { ${targetSize} display: inline-flex; align-items: center; justify-content: center; gap: ${space(2)}; padding: ${space(2.5)} ${space(5)}; border-radius: ${t.radiusLg}; font: inherit; font-weight: ${fontWeight('semibold')}; cursor: pointer; text-decoration: none; border: ${t.borderThin} solid transparent; }\n .primary, .send { background: ${t.brand}; color: ${t.onBrand}; }\n .primary:hover, .send:hover { background: ${t.brandHover}; }\n .secondary { background: transparent; color: ${t.text}; border-color: ${t.borderStrong}; }\n .secondary:hover { background: ${t.surfaceSubtle}; }\n\n .panel { position: sticky; inset-block-start: ${space(6)}; overflow: hidden; isolation: isolate; padding: ${space(8)}; border-radius: ${t.radiusXl}; background: ${t.surfaceCard}; box-shadow: ${t.shadowMd}; display: grid; gap: ${space(2)}; }\n /* The glow behind the budget grows as the product does. */\n .glow { position: absolute; z-index: -1; inset-block-start: -40%; inset-inline-end: -30%; inline-size: 120%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, ${unsafeCSS(toneOf(1, 0))} 45%, transparent), color-mix(in srgb, ${unsafeCSS(toneOf(2, 1))} 25%, transparent) 45%, transparent 70%); transform: scale(var(--s, 0.7)); transform-origin: 70% 30%; transition: transform 500ms cubic-bezier(.2, .8, .2, 1); pointer-events: none; }\n .range { margin: 0; font-family: ${t.fontHeading}; font-weight: ${fontWeight('bold')}; font-size: ${fontSize('5xl')}; line-height: 1; letter-spacing: ${t.trackingTight}; color: ${t.textHeading}; }\n .weeks { margin: 0; ${type('lg')} }\n .tip { margin: ${space(4)} 0 0; padding-block-start: ${space(4)}; border-block-start: 1px solid color-mix(in srgb, currentColor 15%, transparent); color: ${t.textMuted}; }\n\n .result { display: grid; gap: ${space(6)}; }\n .summary { margin: 0; ${type('xl')} text-wrap: pretty; }\n .phases { display: flex; gap: 3px; block-size: 14px; border-radius: 7px; overflow: hidden; }\n .phases i { display: block; }\n .legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: ${space(2)} ${space(5)}; }\n .legend li { display: inline-flex; align-items: center; gap: ${space(2)}; }\n .legend li::before { content: ''; inline-size: 10px; block-size: 10px; border-radius: 50%; background: var(--c); }\n dl { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: ${space(4)}; }\n dt { margin: 0 0 ${space(1)}; }\n dd { margin: 0; font-weight: ${fontWeight('semibold')}; }\n .actions { display: flex; flex-wrap: wrap; gap: ${space(3)}; }\n .note { margin: 0; ${type('sm')} color: ${t.textMuted}; }\n .status { margin: 0; ${type('sm')} }\n\n @container (max-width: 48rem) {\n .wrap { grid-template-columns: minmax(0, 1fr); gap: ${space(8)}; }\n /* Not sticky once the panel is under the questions, but still the glow's containing block, so the panel clips it\n and it never widens the page (1.4.10). */\n .panel { position: relative; inset-block-start: auto; }\n .choices.many { grid-template-columns: repeat(2, minmax(0, 1fr)); }\n }\n @container (max-width: 30rem) {\n .choices { grid-template-columns: minmax(0, 1fr); }\n .range { font-size: ${fontSize('4xl')}; }\n }\n @media (forced-colors: active) {\n .choice:has(input:checked) { outline: 3px solid Highlight; }\n .bar i, .phases i, .legend li::before { background: CanvasText !important; }\n .glow { display: none; }\n }\n `,\n ];\n\n /** The answers each question starts with. */\n private reset(): void {\n this.answers = Object.fromEntries(\n (this.questions ?? []).map((q) => {\n const ids = (q.start ?? []).filter((id) => q.choices.some((c) => c.id === id));\n if (q.kind === 'many') return [q.id, ids];\n return [q.id, [ids[0] ?? q.choices[0]?.id].filter((x): x is string => Boolean(x))];\n }),\n );\n this.at = 0;\n this.tip = '';\n this.copied = '';\n }\n\n protected willUpdate(changed: Map<string, unknown>): void {\n if (changed.has('questions') || !this.started) {\n this.reset();\n this.started = true;\n }\n }\n\n private get rules() {\n return { low: this.low, high: this.high, minWeeks: this.minWeeks, teams: this.teams ?? [], ways: this.ways ?? [] };\n }\n\n private money(n: number): string {\n try {\n return new Intl.NumberFormat(pageLocale(this), {\n style: 'currency',\n currency: this.currency || 'GBP',\n notation: 'compact',\n maximumFractionDigits: 0,\n }).format(n * (this.unit || 1));\n } catch {\n return String(n * (this.unit || 1));\n }\n }\n\n private listOf(words: string[]): string {\n try {\n return new Intl.ListFormat(pageLocale(this), { type: 'conjunction' }).format(words);\n } catch {\n return words.join(', ');\n }\n }\n\n private weeksWord(n: number): string {\n return n === 1 ? say('{n} week', { n }) : say('{n} weeks', { n });\n }\n\n /** The largest the budget can be, so the glow is full size at it. */\n private get most(): number {\n const qs = this.questions ?? [];\n const answers = Object.fromEntries(\n qs.map((q) => {\n if (q.kind === 'many') return [q.id, q.choices.map((c) => c.id)];\n const best = [...q.choices].sort((a, b) => (b.cost ?? 0) * (b.costFactor ?? 1) - (a.cost ?? 0) * (a.costFactor ?? 1))[0];\n return [q.id, best ? [best.id] : []];\n }),\n );\n return estimate(qs, answers, this.rules).high || 1;\n }\n\n private summaryOf(r: ReturnType<typeof estimate>): string {\n const qs = this.questions ?? [];\n const one = qs.find((q) => q.kind === 'one');\n const thing = one ? one.choices.find((c) => c.id === this.answers[one.id]?.[0]) : undefined;\n const many = qs\n .filter((q) => q.kind === 'many' && q.inSummary !== false)\n .flatMap((q) =>\n (this.answers[q.id] ?? []).map((id) => {\n const c = q.choices.find((x) => x.id === id);\n return c ? c.phrase || c.label : id;\n }),\n );\n const name = thing ? thing.phrase || thing.label : '';\n const first = !name\n ? ''\n : many.length\n ? say('You are building {thing} with {list}.', { thing: name, list: this.listOf(many) })\n : say('You are building {thing}.', { thing: name });\n const rest = say('Expect {range} and about {weeks} to a first release.', { range: this.rangeOf(r), weeks: this.weeksWord(r.weeks) });\n return first ? `${first} ${rest}` : rest;\n }\n\n private rangeOf(r: { low: number; high: number }): string {\n return say('{low} to {high}', { low: this.money(r.low), high: this.money(r.high) });\n }\n private teamOf(n: number): string {\n return n === 1 ? this.teamTextOne : this.teamText.replace('{n}', String(n));\n }\n\n private pick(q: EstimatorQuestion, choice: EstimatorChoice, on: boolean): void {\n const now = this.answers[q.id] ?? [];\n this.answers = {\n ...this.answers,\n [q.id]: q.kind === 'many' ? (on ? [...now.filter((id) => id !== choice.id), choice.id] : now.filter((id) => id !== choice.id)) : [choice.id],\n };\n if (on && choice.tip) this.tip = choice.tip;\n this.requestUpdate();\n }\n\n private go(to: number): void {\n const last = (this.questions ?? []).length;\n this.at = Math.max(0, Math.min(last, to));\n this.copied = '';\n this.requestUpdate();\n void this.updateComplete.then(() => (this.renderRoot.querySelector('.current .q') as HTMLElement | null)?.focus({ preventScroll: true }));\n }\n\n private result(): EstimateResult {\n const r = estimate(this.questions ?? [], this.answers, this.rules);\n return {\n low: r.low * (this.unit || 1),\n high: r.high * (this.unit || 1),\n weeks: r.weeks,\n engineers: r.engineers,\n way: r.way,\n summary: this.textOf(r),\n answers: this.answers,\n };\n }\n\n /** The estimate as words to send or copy. */\n private textOf(r: ReturnType<typeof estimate>): string {\n const parts = [this.summaryOf(r), `${this.teamOf(r.engineers)}.`];\n if (r.way) parts.push(`${r.way}.`);\n const picked = (this.questions ?? [])\n .filter((q) => q.short && q.kind !== 'many')\n .map((q) => {\n const c = q.choices.find((x) => x.id === this.answers[q.id]?.[0]);\n return c ? `${q.short}: ${c.label}.` : '';\n })\n .filter(Boolean);\n const many = (this.questions ?? [])\n .filter((q) => q.short && q.kind === 'many' && q.inSummary === false)\n .map((q) => {\n const labels = (this.answers[q.id] ?? []).map((id) => q.choices.find((x) => x.id === id)?.label ?? id);\n return labels.length ? `${q.short}: ${this.listOf(labels)}.` : '';\n })\n .filter(Boolean);\n return [...parts, ...many, ...picked].join(' ');\n }\n\n private send(e: Event): void {\n const result = this.result();\n try {\n sessionStorage.setItem('impakt.estimate', result.summary);\n } catch {\n /* storage can be blocked; the link still goes */\n }\n const go = this.dispatchEvent(new CustomEvent('impakt-estimate', { detail: result, bubbles: true, composed: true, cancelable: true }));\n if (!go) e.preventDefault();\n }\n\n private async copy(): Promise<void> {\n const text = this.result().summary;\n try {\n await navigator.clipboard.writeText(text);\n this.copied = say('Summary copied.');\n } catch {\n this.copied = say('Copying is blocked here. Select the summary above instead.');\n }\n this.requestUpdate();\n }\n\n private heading(text: string): TemplateResult {\n const l = Math.min(Math.max(this.headingLevel || 2, 2), 6);\n return html`<div class=\"q\" role=\"heading\" aria-level=${l} tabindex=\"-1\">${text}</div>`;\n }\n\n private renderQuestion(q: EstimatorQuestion, i: number): TemplateResult {\n const picked = this.answers[q.id] ?? [];\n const current = i === this.at;\n if (q.kind === 'scale') {\n const index = Math.max(\n 0,\n q.choices.findIndex((c) => c.id === picked[0]),\n );\n const chosen = q.choices[index];\n return html`<fieldset class=${current ? 'current' : ''} ?hidden=${!current}>\n <legend>${this.heading(q.heading)}</legend>\n ${q.hint ? html`<p class=\"hint\">${q.hint}</p>` : nothing}\n <div class=\"scale\">\n <input type=\"range\" min=\"0\" max=${Math.max(0, q.choices.length - 1)} step=\"1\" .value=${String(index)} aria-label=${q.heading} aria-valuetext=${chosen?.label ?? ''}\n @input=${(e: Event) => {\n const c = q.choices[Number((e.target as HTMLInputElement).value)];\n if (c) this.pick(q, c, true);\n }}>\n <div class=\"ticks\" aria-hidden=\"true\">${q.choices.map((c, k) => html`<span aria-current=${k === index ? 'true' : nothing}>${c.label}</span>`)}</div>\n ${chosen?.hint ? html`<p class=\"now\">${chosen.hint}</p>` : nothing}\n </div>\n </fieldset>`;\n }\n const many = q.kind === 'many';\n return html`<fieldset class=${current ? 'current' : ''} ?hidden=${!current}>\n <legend>${this.heading(q.heading)}</legend>\n ${q.hint ? html`<p class=\"hint\">${q.hint}</p>` : nothing}\n <div class=\"choices ${many ? 'many' : ''}\">\n ${q.choices.map(\n (c) => html`<label class=\"choice\">\n <input type=${many ? 'checkbox' : 'radio'} name=${`${this.uid}-${q.id}`} value=${c.id} .checked=${picked.includes(c.id)}\n @change=${(e: Event) => this.pick(q, c, (e.target as HTMLInputElement).checked)}>\n <span class=\"label\">${c.label}</span>\n ${c.hint ? html`<span class=\"small\">${c.hint}</span>` : nothing}\n </label>`,\n )}\n </div>\n </fieldset>`;\n }\n\n private renderResult(r: ReturnType<typeof estimate>): TemplateResult {\n const weeks = phaseWeeks(this.phases ?? [], r.weeks);\n const current = this.at === (this.questions ?? []).length;\n return html`<div class=\"result ${current ? 'current' : ''}\" ?hidden=${!current}>\n ${this.heading(this.resultHeading)}\n <p class=\"summary\">${this.summaryOf(r)}</p>\n ${\n (this.phases ?? []).length\n ? html`\n <div class=\"phases\" aria-hidden=\"true\">${(this.phases ?? []).map((_, i) => html`<i style=${`flex-grow:${weeks[i]};background:${toneOf(undefined, i)}`}></i>`)}</div>\n <ul class=\"legend\">${(this.phases ?? []).map((p, i) => html`<li style=${`--c:${toneOf(undefined, i)}`}>${p.label} <b>${this.weeksWord(weeks[i]!)}</b></li>`)}</ul>`\n : nothing\n }\n <dl>\n <div><dt class=\"mono\">${say('Your team')}</dt><dd>${this.teamOf(r.engineers)}</dd></div>\n ${r.way ? html`<div><dt class=\"mono\">${say('Way of working')}</dt><dd>${r.way}</dd></div>` : nothing}\n </dl>\n <div class=\"actions\">\n ${this.contactHref ? html`<a class=\"send\" href=${this.contactHref} @click=${(e: Event) => this.send(e)}>${this.sendLabel} <span aria-hidden=\"true\">\u2192</span></a>` : nothing}\n <button type=\"button\" class=\"secondary\" @click=${() => this.copy()}>${say('Copy summary')}</button>\n <button type=\"button\" class=\"secondary\" @click=${() => {\n this.reset();\n this.go(0);\n }}>${say('Start again')}</button>\n </div>\n <p class=\"status\" role=\"status\">${this.copied}</p>\n ${this.note ? html`<p class=\"note\">${this.note}</p>` : nothing}\n </div>`;\n }\n\n render(): TemplateResult {\n const qs = this.questions ?? [];\n const total = qs.length;\n const r = estimate(qs, this.answers, this.rules);\n const done = this.at >= total;\n const scale = (0.6 + Math.min(1, r.high / this.most) * 1.1).toFixed(2);\n return html`<div class=\"wrap\">\n <div>\n <div class=\"progress\">\n <p class=\"mono\">${done ? this.resultHeading : say('Step {step} of {steps}', { step: this.at + 1, steps: total })}</p>\n <div class=\"bar\" aria-hidden=\"true\"><i style=${`inline-size:${total ? (done ? 100 : ((this.at + 1) / (total + 1)) * 100) : 0}%`}></i></div>\n </div>\n ${qs.map((q, i) => this.renderQuestion(q, i))}\n ${this.renderResult(r)}\n ${\n done\n ? nothing\n : html`<div class=\"nav\">\n ${this.at > 0 ? html`<button type=\"button\" class=\"secondary\" @click=${() => this.go(this.at - 1)}>${say('Back')}</button>` : nothing}\n <button type=\"button\" class=\"primary\" @click=${() => this.go(this.at + 1)}>${this.at === total - 1 ? say('See my estimate') : say('Next')} <span aria-hidden=\"true\">\u2192</span></button>\n </div>`\n }\n </div>\n <aside class=\"panel\" part=\"panel\" style=${`--s:${scale}`}>\n <div class=\"glow\" aria-hidden=\"true\"></div>\n <p class=\"mono\">${this.budgetLabel}</p>\n <p class=\"range\" aria-live=\"polite\" aria-atomic=\"true\">${this.rangeOf(r)}</p>\n <p class=\"weeks\">${say('About {weeks} to a first release', { weeks: this.weeksWord(r.weeks) })}</p>\n <p class=\"tip\" aria-live=\"polite\">${this.tip || this.intro}</p>\n </aside>\n </div>`;\n }\n}\n\ncustomElements.define('impakt-estimator', ImpaktEstimator);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'impakt-estimator': ImpaktEstimator;\n }\n}\n", "/**\n * A site's own header and footer, drawn as one piece each, for the layout's\n * header and footer slots, and the wordmark that starts a header.\n *\n * The chip that sits beside a wordmark is a product component, `impakt-chip`,\n * and comes from `@atomic-ui/ui`.\n *\n * The page frame (`impakt-page`) gives them their landmarks, so neither draws a\n * `<header>` or `<footer>` of its own: a second banner would be one a screen\n * reader announces twice.\n */\nimport { css, html, nothing, type TemplateResult } from 'lit';\n// The base, the tokens and the nav and button these draw come from @atomic-ui/ui, which defines its elements on import.\nimport { ImpaktElement, focusRing, hideOn, fontSize, fontWeight, space, t, type, toneOf, type NavLink, type Tone } from '@atomic-ui/ui';\n\n/** The footer stripe's colours, left to right. */\n/** The stripe's segments take the brand's chart colours in order. */\nconst STRIPE = [0, 1, 2, 3, 4];\n\n/** Code-like labels: a branch, a hash, a commit message. */\nconst MONO = t.fontMono;\n\n// Quieter words are faded to 0.72, no further: that keeps them at 4.5:1 on the page and card colours (1.4.3).\n\n/**\n * The site header: the brand, the main links and one call to action, with an\n * optional chip beside the brand and a status before the action.\n *\n * The links fold behind a Menu button when they do not fit, as `impakt-nav`\n * does. The chip and the status are labels, not controls, and they are left\n * out on a phone so the brand, the menu and the action keep the row.\n *\n * **Build your own.** Place components in its three slots, start, middle and\n * end, and each slot that holds something replaces what the props draw there:\n * a wordmark and chips at the start, a nav in the middle, a status and a\n * button at the end, in any order. Give a component `hideOn: 'phone'` to leave\n * it out on a phone, so the phone's header is built from the same pieces.\n *\n * @category layout\n * @icon header\n * @slot start - The brand: a wordmark or logo, and any chips beside it.\n * @slot middle - The links, usually one nav.\n * @slot end - A status and the call to action.\n * @fires {CustomEvent<null>} impakt-action - When the call to action is pressed.\n */\nexport class ImpaktSiteHeader extends ImpaktElement {\n static properties = {\n brand: { type: String },\n logoSrc: { type: String, attribute: 'logo-src' },\n logoAlt: { type: String, attribute: 'logo-alt' },\n home: { type: String },\n badge: { type: String },\n meta: { type: String },\n links: { type: Array },\n label: { type: String },\n menuText: { type: String, attribute: 'menu-text' },\n status: { type: String },\n statusMeta: { type: String, attribute: 'status-meta' },\n statusTone: { type: String, attribute: 'status-tone' },\n actionText: { type: String, attribute: 'action-text' },\n actionHref: { type: String, attribute: 'action-href' },\n };\n /** The site's name, set as a wordmark when there is no logo picture. */\n declare brand: string;\n /** A logo picture, used instead of the wordmark. */\n declare logoSrc: string;\n /** What the logo says. Leave empty to use the brand name. */\n declare logoAlt: string;\n /** Where the brand links to. */\n declare home: string;\n /** A short chip beside the brand, such as \"main\". */\n declare badge: string;\n /** A code-like line after the chip, such as a commit hash. */\n declare meta: string;\n declare links: NavLink[];\n /** The name of the links' landmark. */\n declare label: string;\n /** The words on the button that opens the links on a narrow screen. */\n declare menuText: string;\n /** A status before the action, such as the stage the site is at. */\n declare status: string;\n /** A code-like line in the status, such as a hash. */\n declare statusMeta: string;\n declare statusTone: Tone;\n declare actionText: string;\n declare actionHref: string;\n\n constructor() {\n super();\n this.brand = '';\n this.logoSrc = '';\n this.logoAlt = '';\n this.home = '/';\n this.badge = '';\n this.meta = '';\n this.links = [];\n this.label = 'Main';\n this.menuText = 'Menu';\n this.status = '';\n this.statusMeta = '';\n this.statusTone = 'success';\n this.actionText = '';\n this.actionHref = '';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n css`\n :host { display: block; container-type: inline-size; }\n .bar { display: flex; align-items: center; gap: ${space(6)}; }\n .start { display: flex; align-items: center; gap: ${space(3)}; flex: none; }\n .middle { flex: 1 1 8rem; min-inline-size: 0; display: flex; align-items: center; justify-content: center; }\n .middle ::slotted(*) { flex: 1 1 auto; min-inline-size: 0; }\n slot { display: contents; }\n .brand { display: inline-flex; align-items: center; min-block-size: ${t.targetMin}; color: inherit; text-decoration: none; font-family: ${t.fontHeading}; font-weight: ${fontWeight('semibold')}; ${type('2xl')} letter-spacing: -0.02em; line-height: 1; border-radius: ${t.radiusSm}; }\n .brand img { display: block; block-size: 32px; inline-size: auto; }\n .chip { display: inline-flex; align-items: center; gap: ${space(1)}; padding: 2px ${space(2)}; border-radius: ${t.radius}; background: color-mix(in srgb, currentColor 7%, transparent); font-family: ${MONO}; font-size: ${fontSize('xs')}; }\n .chip svg { inline-size: 12px; block-size: 12px; }\n .meta { font-family: ${MONO}; font-size: ${fontSize('xs')}; opacity: 0.72; }\n .middle impakt-nav { flex: 1 1 8rem; }\n .end { display: flex; align-items: center; gap: ${space(3)}; flex: none; }\n .end:empty, .start:empty { display: none; }\n .status { display: inline-flex; align-items: center; gap: ${space(2)}; padding: ${space(1)} ${space(3)}; border: ${t.borderThin} solid ${t.border}; border-radius: 999px; background: ${t.surfaceCard}; font-family: ${MONO}; font-size: ${fontSize('xs')}; white-space: nowrap; }\n .status .dot { inline-size: 8px; block-size: 8px; border-radius: 50%; background: var(--tone); }\n .status .hash { opacity: 0.72; }\n @container (max-width: 56rem) { .chip, .meta, .status { display: none; } .bar { gap: ${space(3)}; } }\n /* With no script the links cannot fold behind a Menu button. On a narrow screen they take a\n line of their own under the name and the action, and wrap there. */\n @container (max-width: 40rem) {\n :host(:not(:defined)) .bar { flex-wrap: wrap; row-gap: ${space(1)}; }\n :host(:not(:defined)) .start { flex: 1 1 auto; }\n :host(:not(:defined)) .middle { order: 3; flex: 1 1 100%; justify-content: flex-start; }\n }\n `,\n ];\n\n private act(): void {\n this.dispatchEvent(new CustomEvent('impakt-action', { bubbles: true, composed: true }));\n }\n\n render(): TemplateResult {\n const wordmark = this.logoSrc ? html`<img src=${this.logoSrc} alt=${this.logoAlt || this.brand} />` : html`${this.brand}`;\n // Each region shows what is placed in its slot, or, when nothing is, what the props describe.\n return html`<div class=\"bar\" part=\"bar\">\n <div class=\"start\"><slot name=\"start\">\n ${this.brand || this.logoSrc ? html`<a class=\"brand\" href=${this.home || '/'} part=\"brand\">${wordmark}</a>` : nothing}\n ${this.badge ? html`<span class=\"chip\" part=\"badge\"><svg viewBox=\"0 0 14 14\" aria-hidden=\"true\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\"><circle cx=\"3.5\" cy=\"3\" r=\"1.5\"/><circle cx=\"3.5\" cy=\"11\" r=\"1.5\"/><circle cx=\"10.5\" cy=\"4.5\" r=\"1.5\"/><path d=\"M3.5 4.5v5M10.5 6c0 2.5-3 2.5-6 4\"/></svg>${this.badge}</span>` : nothing}\n ${this.meta ? html`<span class=\"meta\" part=\"meta\">${this.meta}</span>` : nothing}\n </slot></div>\n <div class=\"middle\"><slot name=\"middle\">${(this.links ?? []).length ? html`<impakt-nav align=\"center\" size=\"sm\" .links=${this.links} .label=${this.label} .menuText=${this.menuText}></impakt-nav>` : nothing}</slot></div>\n <div class=\"end\"><slot name=\"end\">\n ${this.status ? html`<span class=\"status\" part=\"status\" style=${`--tone:${toneOf(this.statusTone, 0)}`}><span class=\"dot\" aria-hidden=\"true\"></span>${this.status}${this.statusMeta ? html` <span class=\"hash\">${this.statusMeta}</span>` : nothing}</span>` : nothing}\n ${this.actionText ? html`<impakt-button variant=\"primary\" icon-after=\"arrow-right\" href=${this.actionHref || nothing} @click=${this.act}>${this.actionText}</impakt-button>` : nothing}\n </slot></div>\n </div>`;\n }\n}\n\n/**\n * The site's name as a wordmark, or its logo, linking home: the start of a\n * site header.\n *\n * @category layout\n * @icon logo\n */\nexport class ImpaktWordmark extends ImpaktElement {\n static properties = {\n text: { type: String },\n src: { type: String },\n alt: { type: String },\n href: { type: String },\n size: { type: String, reflect: true },\n hideOn: { type: String, reflect: true, attribute: 'hide-on' },\n };\n /** The name, set in the heading face. */\n declare text: string;\n /** A logo picture, used instead of the name. */\n declare src: string;\n /** What the logo says. Leave empty to use the name. */\n declare alt: string;\n declare href: string;\n /** Larger on a wide header, smaller on a phone's. */\n declare size: 'sm' | 'md' | 'lg';\n declare hideOn: 'never' | 'phone' | 'wide';\n\n constructor() {\n super();\n this.text = '';\n this.src = '';\n this.alt = '';\n this.href = '/';\n this.size = 'md';\n this.hideOn = 'never';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n hideOn,\n css`\n :host { display: inline-flex; align-items: center; flex: none; }\n a { color: inherit; text-decoration: none; font-family: ${t.fontHeading}; font-weight: ${fontWeight('semibold')}; letter-spacing: -0.02em; line-height: 1; border-radius: ${t.radiusSm}; }\n :host([size='sm']) a { ${type('xl')} } :host([size='md']) a { ${type('2xl')} } :host([size='lg']) a { ${type('3xl')} }\n img { display: block; block-size: 32px; inline-size: auto; }\n @media (max-width: 40rem) { :host([size='md']) a, :host([size='lg']) a { ${type('xl')} } }\n `,\n ];\n\n render(): TemplateResult {\n // The name arrives as the element's words when a page places it, or as `text` when it is set directly.\n return html`<a href=${this.href || '/'} part=\"link\">${this.src ? html`<img src=${this.src} alt=${this.alt || this.text || this.textContent?.trim() || ''} />` : html`<slot>${this.text}</slot>`}</a>`;\n }\n}\n\n/** One line of a footer's log: a code, what it says, and the colour of its dot. */\nexport interface FooterLogLine {\n meta?: string;\n text: string;\n tone?: Tone;\n}\n\n/** A column of footer links under a short heading. */\nexport interface FooterColumn {\n heading: string;\n links: NavLink[];\n}\n\n/**\n * The site footer: the footer band with the brand set large, an optional log of\n * lines beside it, columns of links, a legal line and a stripe of the brand's\n * colours along the foot.\n *\n * Each column is a list under its own heading, so a screen reader can move\n * from one to the next. The log is a list too; its dots are decoration.\n *\n * @category layout\n * @icon footer\n */\nexport class ImpaktSiteFooter extends ImpaktElement {\n static properties = {\n brand: { type: String },\n brandSize: { type: String, reflect: true, attribute: 'brand-size' },\n log: { type: Array },\n columns: { type: Array },\n columnsOnPhone: { type: String, attribute: 'columns-on-phone', reflect: true },\n legal: { type: String },\n stripe: { type: Boolean, reflect: true },\n headingLevel: { type: Number, attribute: 'heading-level' },\n };\n /** The site's name, set large. */\n declare brand: string;\n /**\n * How large the name is set. `display` runs it the full width of the footer,\n * under the columns, sized by the footer's own width so it never spills at\n * 320px.\n */\n declare brandSize: 'lg' | 'display';\n /** Lines set in code type under the brand, newest first. The first is bright. */\n declare log: FooterLogLine[];\n declare columns: FooterColumn[];\n /** `hidden` leaves the link columns out on a phone, so the footer there is the name, the lines and the legal line. */\n declare columnsOnPhone: 'shown' | 'hidden';\n /** The line at the foot, such as the copyright. */\n declare legal: string;\n /** A stripe of the brand's colours along the bottom edge. */\n declare stripe: boolean;\n /** The level of each column's heading. */\n declare headingLevel: 2 | 3 | 4;\n\n constructor() {\n super();\n this.brand = '';\n this.brandSize = 'lg';\n this.log = [];\n this.columns = [];\n this.columnsOnPhone = 'shown';\n this.legal = '';\n this.stripe = false;\n this.headingLevel = 2;\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n css`\n /* The page frame's footer band gives the colours; this sits flush with its foot so the stripe meets the edge. */\n :host { display: block; container-type: inline-size; position: relative; padding-block: ${space(8)} ${space(4)}; margin-block-end: calc(-1 * ${space(8)}); }\n .top { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: ${space(10)}; }\n .brand { margin: 0; font-family: ${t.fontHeading}; font-weight: ${fontWeight('bold')}; font-size: clamp(3rem, 6vw, 4.5rem); line-height: 1; letter-spacing: -0.03em; }\n /* The name as a wordmark across the whole footer, under the columns. */\n :host([brand-size='display']) .top { grid-template-columns: 1fr; }\n :host([brand-size='display']) .top > div:first-child { order: 2; }\n :host([brand-size='display']) .brand { font-weight: ${fontWeight('semibold')}; font-size: clamp(3rem, 27cqi, 24rem); line-height: 0.9; letter-spacing: -0.06em; overflow-wrap: anywhere; }\n ul { list-style: none; margin: 0; padding: 0; }\n .log { margin-block-start: ${space(8)}; display: grid; gap: ${space(3)}; font-family: ${MONO}; font-size: ${fontSize('sm')}; }\n .log li { display: flex; align-items: center; gap: ${space(3)}; opacity: 0.72; }\n .log li:first-child { opacity: 1; }\n .log .dot { flex: none; inline-size: 10px; block-size: 10px; border-radius: 50%; background: var(--tone); }\n .log .code { margin-inline-end: ${space(3)}; }\n .columns { display: grid; grid-template-columns: repeat(var(--count, 4), minmax(0, 1fr)); gap: ${space(8)}; }\n .h { margin: 0 0 ${space(4)}; font-family: ${MONO}; font-size: ${fontSize('xs')}; font-weight: ${fontWeight('medium')}; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.72; }\n .columns ul { display: grid; gap: ${space(3)}; }\n a { color: inherit; text-decoration: none; font-weight: ${fontWeight('medium')}; border-radius: ${t.radiusSm}; }\n a:hover { text-decoration: underline; text-underline-offset: 0.25em; }\n .legal { margin: ${space(16)} 0 0; font-family: ${MONO}; font-size: ${fontSize('xs')}; opacity: 0.72; }\n .stripe { position: absolute; inset-inline: -100vmax; inset-block-end: 0; block-size: 6px; display: flex; }\n .stripe span { flex: 1; }\n @container (max-width: 48rem) { .top { grid-template-columns: 1fr; } .columns { grid-template-columns: repeat(2, minmax(0, 1fr)); } }\n @container (max-width: 40rem) { :host([columns-on-phone='hidden']) .columns { display: none; } }\n @media (forced-colors: active) { :host { border-block-start: 1px solid CanvasText; } .log .dot { border: 1px solid CanvasText; } }\n `,\n ];\n\n private heading(text: string): TemplateResult {\n const level = Math.min(Math.max(this.headingLevel || 2, 2), 4);\n return level === 3 ? html`<h3 class=\"h\">${text}</h3>` : level === 4 ? html`<h4 class=\"h\">${text}</h4>` : html`<h2 class=\"h\">${text}</h2>`;\n }\n\n render(): TemplateResult {\n const log = this.log ?? [];\n return html`<div part=\"footer\">\n <div class=\"top\">\n <div>\n ${this.brand ? html`<p class=\"brand\" part=\"brand\">${this.brand}</p>` : nothing}\n ${log.length ? html`<ul class=\"log\" part=\"log\">${log.map((line, i) => html`<li style=${`--tone:${toneOf(line.tone ?? (i === 0 ? 'success' : 'accent'), i)}`}><span class=\"dot\" aria-hidden=\"true\"></span><span>${line.meta ? html`<span class=\"code\">${line.meta}</span>` : nothing}${line.text}</span></li>`)}</ul>` : nothing}\n </div>\n <div class=\"columns\" part=\"columns\" style=${`--count:${Math.max(1, (this.columns ?? []).length)}`}>\n ${(this.columns ?? []).map((column) => html`<div>${this.heading(column.heading)}<ul>${(column.links ?? []).map((link) => html`<li><a href=${link.href}>${link.label}</a></li>`)}</ul></div>`)}\n </div>\n </div>\n ${this.legal ? html`<p class=\"legal\" part=\"legal\">${this.legal}</p>` : nothing}\n ${this.stripe ? html`<div class=\"stripe\" aria-hidden=\"true\">${STRIPE.map((i) => html`<span style=${`background:${toneOf(undefined, i)}`}></span>`)}</div>` : nothing}\n </div>`;\n }\n}\n\ncustomElements.define('impakt-site-header', ImpaktSiteHeader);\ncustomElements.define('impakt-wordmark', ImpaktWordmark);\ncustomElements.define('impakt-site-footer', ImpaktSiteFooter);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'impakt-site-header': ImpaktSiteHeader;\n 'impakt-wordmark': ImpaktWordmark;\n 'impakt-site-footer': ImpaktSiteFooter;\n }\n}\n", "import { html, css, nothing, type TemplateResult, type PropertyValues } from 'lit';\nimport { say, ImpaktElement, fontSize, fontWeight, space, t, token } from '@atomic-ui/ui';\n\nexport type SceneDrive = 'view' | 'page' | 'loop' | 'scrubber';\nexport type SceneLayout = 'stage' | 'split';\n\nconst clamp = (n: number) => Math.min(1, Math.max(0, n));\n\n/**\n * A scene: a stage whose children move along a progress from 0 to 1.\n *\n * The children declare timelines in their `motion` block, and `@atomic-ui/motion`\n * compiles them to keyframes. This element owns only the progress, and where it\n * comes from is the `drive` (ADR 0027):\n *\n * - `view` \u2014 the scene's own passage through the viewport. The stage pins\n * while the scene scrolls past, for `length` screens, or beside the content\n * in the default slot when `layout` is `split`.\n * - `page` \u2014 the scroll position of the whole page.\n * - `loop` \u2014 time, over `duration` seconds, repeating. **It always shows a\n * pause button**, because anything that moves on its own for more than five\n * seconds must be pausable (WCAG 2.2.2), and a scene that could forget that\n * is one the gate would have to catch on every page.\n * - `scrubber` \u2014 an `impakt-scrubber` placed in the `controls` slot.\n *\n * Progress is published three ways: the `progress` property, the\n * `--impakt-scene-progress` custom property on the host, and an\n * `impakt-scene-progress` event. Engines with scroll-driven animations run `view`\n * and `page` scenes natively, and the runtime ignores the event for them.\n *\n * Under reduced motion a `loop` does not start, and nothing pins: the stage\n * and the content stack, so every state of the scene can be read in order.\n *\n * @category layout\n * @icon layers\n * @slot stage - What moves, layered one over another. Pinned while the scene plays,\n * beside the content in `split` layout, after it, so the words are read first.\n * @slot - Content that scrolls past the stage, such as chapters.\n * @slot controls - An `impakt-scrubber`, for a scene driven by one.\n * @fires {CustomEvent<{ progress: number }>} impakt-scene-progress - `{ progress }` whenever the progress changes.\n */\nexport class ImpaktScene extends ImpaktElement {\n static properties = {\n drive: { type: String, reflect: true },\n layout: { type: String, reflect: true },\n length: { type: Number },\n duration: { type: Number },\n label: { type: String },\n progress: { type: Number },\n controls: { type: String, reflect: true },\n bleed: { type: Boolean, reflect: true },\n hideOn: { type: String, reflect: true, attribute: 'hide-on' },\n };\n\n /** Where the progress comes from. */\n declare drive: 'view' | 'page' | 'loop' | 'scrubber';\n /** `stage` pins one full-width stage; `split` pins it beside the content. */\n declare layout: 'stage' | 'split';\n /** How many screens of scrolling a `view` scene lasts, in `stage` layout. */\n declare length: number;\n /** Seconds per cycle of a `loop` scene. */\n declare duration: number;\n /** The scene's accessible name. Also names its pause button. */\n declare label: string;\n /** From 0 to 1. Set it to seek a `scrubber` scene, or where one starts. */\n declare progress: number;\n /**\n * Where the controls sit: `below` the stage, or `over` its foot, floating\n * on what it shows, as a video's do. Under reduced motion they sit below.\n */\n declare controls: 'below' | 'over';\n /** Run the stage to the window's edges, past the page's margins, as a hero drawn edge to edge does. */\n declare bleed: boolean;\n /**\n * Leave it out on a phone, or on anything wider, for a picture drawn twice:\n * once for a wide screen and once for a narrow one. Never both.\n */\n declare hideOn: 'never' | 'phone' | 'wide';\n /**\n * Whether a loop is paused: the scene's own state, set by its pause button\n * or by `pause()`. A plain field rather than a property, so it is never one\n * of the settings an author is offered.\n */\n private paused = false;\n\n private frame = 0;\n private started = 0;\n private reduced = false;\n private seekFrom = 0;\n private seekTo = 0;\n private seekStart = 0;\n private seekMs = 0;\n\n constructor() {\n super();\n this.drive = 'view';\n this.layout = 'stage';\n this.length = 3;\n this.duration = 8;\n this.label = 'Animation';\n this.progress = 0;\n this.controls = 'below';\n this.bleed = false;\n this.hideOn = 'never';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n css`\n :host {\n display: block;\n position: relative;\n }\n :host([drive='view'][layout='stage']) {\n min-height: calc(var(--impakt-scene-length, 3) * 100svh);\n }\n .frame {\n display: grid;\n grid-template-columns: minmax(0, 1fr);\n }\n :host([layout='split']) .frame {\n grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);\n gap: ${space(8)};\n }\n .stage {\n position: sticky;\n top: 0;\n height: 100svh;\n display: grid;\n place-items: center;\n overflow: clip;\n }\n /* What is on the stage is layered, as in a motion tool: each thing sits\n over the one before, so a later layer's timeline can reveal it over an\n earlier one. */\n .stage ::slotted(*) {\n grid-area: 1 / 1;\n max-width: 100%;\n }\n :host([drive='loop']) .stage,\n :host([drive='scrubber']) .stage {\n position: relative;\n height: auto;\n min-height: 60svh;\n }\n .controls {\n display: flex;\n gap: ${space(3)};\n align-items: center;\n justify-content: center;\n padding-block: ${space(3)};\n }\n :host([bleed]) { margin-inline: calc(50% - 50vw); }\n @media (max-width: 40rem) { :host([hide-on='phone']) { display: none; } }\n @media (min-width: 40.0625rem) { :host([hide-on='wide']) { display: none; } }\n /* Over the stage, the controls float at its foot, above the layers and clear of its edges. */\n .stage > .controls { position: absolute; inset-inline: ${space(6)}; inset-block-end: ${space(6)}; z-index: 2; padding: 0; }\n .stage > .controls ::slotted(*) { box-shadow: 0 12px 32px rgb(16 19 23 / 14%); border-radius: 16px; background: var(--impakt-color-surface-card, #fff); }\n /* A control takes the row, so a graph scrubber spans the stage; a narrower one centres itself. */\n .controls ::slotted(*) { flex: 1 1 auto; min-width: 0; }\n .pause {\n min-width: ${token('target.min', '24px')};\n min-height: ${token('target.min', '24px')};\n padding: ${space(2)} ${space(4)};\n border-radius: ${token('radius.full', '9999px')};\n border: 1px solid ${t.border};\n background: ${t.surfaceCard};\n color: ${t.text};\n font-size: ${fontSize('sm')};\n font-weight: ${fontWeight('medium')};\n cursor: pointer;\n }\n .pause:focus-visible {\n outline: none;\n box-shadow: ${token('focus.ring.shadow', '0 0 0 2px #fff, 0 0 0 4px #1a1a1a')};\n }\n @media (max-width: 48rem) {\n :host([layout='split']) .frame {\n grid-template-columns: minmax(0, 1fr);\n }\n :host([layout='split']) .stage {\n height: 50svh;\n z-index: 1;\n }\n }\n @media (prefers-reduced-motion: reduce) {\n :host {\n min-height: 0 !important;\n }\n .stage {\n position: relative;\n height: auto;\n gap: ${space(6)};\n }\n /* With less motion the layers are shown one after another, so every\n state the scene would have moved through can still be seen. */\n .stage ::slotted(*) {\n grid-area: auto;\n }\n }\n `,\n ];\n\n /** @ignore */\n connectedCallback(): void {\n super.connectedCallback();\n try {\n this.reduced = window.matchMedia('(prefers-reduced-motion: reduce)').matches;\n } catch {\n this.reduced = false;\n }\n window.addEventListener('scroll', this.onScroll, { passive: true, capture: true });\n window.addEventListener('resize', this.onScroll);\n this.schedule();\n }\n\n /** @ignore */\n disconnectedCallback(): void {\n super.disconnectedCallback();\n window.removeEventListener('scroll', this.onScroll, { capture: true });\n window.removeEventListener('resize', this.onScroll);\n if (this.frame) cancelAnimationFrame(this.frame);\n this.frame = 0;\n }\n\n /** @ignore */\n protected updated(changed: PropertyValues<this>): void {\n if (changed.has('length')) this.style.setProperty('--impakt-scene-length', String(this.length));\n if (changed.has('progress')) this.publish();\n if (changed.has('drive')) {\n this.started = 0;\n this.schedule();\n }\n }\n\n /**\n * Move to a progress. With `ms`, ease there; without, jump. A scrubber seeks\n * a scene to a named stop this way.\n */\n seek(to: number, ms = 0): void {\n if (ms <= 0 || this.reduced) {\n this.progress = clamp(to);\n return;\n }\n this.seekFrom = this.progress;\n this.seekTo = clamp(to);\n this.seekStart = 0;\n this.seekMs = ms;\n this.schedule();\n }\n\n private onScroll = () => {\n if (this.drive === 'view' || this.drive === 'page') this.schedule();\n };\n\n private schedule(): void {\n if (!this.frame && typeof requestAnimationFrame === 'function') this.frame = requestAnimationFrame(this.tick);\n }\n\n private tick = (now: number) => {\n this.frame = 0;\n if (this.seekMs) {\n if (!this.seekStart) this.seekStart = now;\n const p = Math.min(1, (now - this.seekStart) / this.seekMs);\n // ease-in-out, so a jump between stops reads as travel rather than a cut\n const e = p < 0.5 ? 4 * p * p * p : 1 - Math.pow(-2 * p + 2, 3) / 2;\n this.progress = this.seekFrom + (this.seekTo - this.seekFrom) * e;\n if (p < 1) this.schedule();\n else this.seekMs = 0;\n return;\n }\n if (this.drive === 'view') {\n const r = this.getBoundingClientRect();\n const vh = window.innerHeight || 1;\n this.progress = clamp(-r.top / Math.max(1, r.height - vh));\n } else if (this.drive === 'page') {\n const doc = document.documentElement;\n this.progress = clamp(window.scrollY / Math.max(1, doc.scrollHeight - (window.innerHeight || 0)));\n } else if (this.drive === 'loop' && !this.paused && !this.reduced) {\n if (!this.started) this.started = now - this.progress * this.duration * 1000;\n this.progress = ((now - this.started) / (this.duration * 1000)) % 1;\n this.schedule();\n }\n };\n\n private publish(): void {\n this.style.setProperty('--impakt-scene-progress', this.progress.toFixed(4));\n this.dispatchEvent(new CustomEvent('impakt-scene-progress', { detail: { progress: this.progress }, bubbles: true, composed: true }));\n }\n\n private setPaused(paused: boolean): void {\n if (this.paused === paused) return;\n this.paused = paused;\n this.started = 0;\n this.schedule();\n this.requestUpdate();\n }\n\n private togglePause = () => this.setPaused(!this.paused);\n\n /** Stop a loop where it is, as its pause button does. An editor scrubbing the scene calls it. */\n pause(): void {\n this.setPaused(true);\n }\n\n render(): TemplateResult {\n const loop = this.drive === 'loop';\n const over = this.controls === 'over' && !this.reduced;\n const controls = html`<div class=\"controls\" part=\"controls\">\n <slot name=\"controls\"></slot>\n ${\n loop && !this.reduced\n ? html`<button class=\"pause\" type=\"button\" aria-pressed=${this.paused ? 'true' : 'false'} @click=${this.togglePause}>\n ${this.paused ? say('Play {name}', { name: this.label }) : say('Pause {name}', { name: this.label })}\n </button>`\n : nothing\n }\n </div>`;\n const stage = html`<div class=\"stage\" part=\"stage\"><slot name=\"stage\"></slot>${over ? controls : nothing}</div>`;\n return html`\n <div class=\"frame\" part=\"frame\" role=\"region\" aria-label=${this.label}>\n ${\n this.layout === 'split'\n ? html`<div class=\"content\" part=\"content\"><slot></slot></div>${stage}`\n : html`${stage}<div class=\"content\" part=\"content\"><slot></slot></div>`\n }\n </div>\n ${over ? nothing : controls}\n `;\n }\n}\n\ncustomElements.define('impakt-scene', ImpaktScene);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'impakt-scene': ImpaktScene;\n }\n}\n", "import { html, css, type TemplateResult } from 'lit';\nimport { say, ImpaktElement, visuallyHidden, fontSize, fontWeight, space, t, token } from '@atomic-ui/ui';\nimport type { ImpaktScene } from './scene';\n\nexport interface ScrubberStop {\n /** Where the stop sits on the scene's progress, from 0 to 1. */\n at: number;\n label: string;\n /** A short code beside it in the graph look, such as a commit hash. */\n meta?: string;\n /** A line under the code in the graph look, such as a commit message. */\n note?: string;\n /**\n * The colour of the line up to this stop, in the graph look: a named tone,\n * or 1 to 5 for the brand's chart colours, as a project's phases are drawn.\n */\n tone?: 'brand' | 'accent' | 'info' | 'success' | 'warning' | 'danger' | 1 | 2 | 3 | 4 | 5;\n}\n\nconst TONES = {\n brand: 'var(--impakt-color-brand-default, #1f4ed8)',\n accent: 'var(--impakt-color-accent-default, #c8a15a)',\n info: 'var(--impakt-color-status-info-default, #1f4ed8)',\n success: 'var(--impakt-color-status-success-default, #047857)',\n warning: 'var(--impakt-color-status-warning-default, #b45309)',\n danger: 'var(--impakt-color-status-danger-default, #c8102e)',\n} as const;\n\n/**\n * Drives the scene it sits in, by hand.\n *\n * Place it in an `impakt-scene`'s `controls` slot and set that scene's `drive`\n * to `scrubber`. Dragging moves through the scene; a named stop seeks to it\n * with an eased move rather than a cut, which is what makes the Commit-style\n * \"time travel\" read as travel.\n *\n * **It is a native range input.** A slider built from divs has to recreate\n * arrow keys, Page Up and Down, Home and End, the value announcement and touch\n * handling, and every one of those is a place to get it wrong. The input\n * already does all of it. The stops are buttons beside it, so a keyboard or\n * switch user reaches each named moment in one action instead of nudging a\n * thumb to find it (2.5.7, dragging movements).\n *\n * @category action\n * @icon adjustments-horizontal\n */\nexport class ImpaktScrubber extends ImpaktElement {\n static properties = {\n label: { type: String },\n stops: { type: Array },\n look: { type: String, reflect: true },\n hint: { type: String },\n value: { type: Number, state: true },\n };\n\n /** The slider's accessible name. */\n declare label: string;\n declare stops: ScrubberStop[];\n /**\n * `buttons` lists the stops as buttons under the slider. `graph` draws them\n * as commits on a line that fills in each stop's colour as it is dragged,\n * with the current one's code and note beside it.\n */\n declare look: 'buttons' | 'graph';\n /** A word of help in the graph look, such as \"drag to time-travel\". */\n declare hint: string;\n declare value: number;\n\n private scene: ImpaktScene | null = null;\n\n constructor() {\n super();\n this.label = 'Scene progress';\n this.stops = [];\n this.look = 'buttons';\n this.hint = '';\n this.value = 0;\n }\n\n static styles = [\n ...ImpaktElement.styles,\n css`\n :host {\n display: block;\n width: 100%;\n max-width: 48rem;\n margin-inline: auto;\n }\n .wrap {\n display: grid;\n gap: ${space(2)};\n padding: ${space(3)} ${space(4)};\n border-radius: ${token('radius.xl', '16px')};\n background: ${t.surfaceCard};\n box-shadow: ${token('shadow.lg', '0 10px 15px -3px rgba(0,0,0,.1)')};\n border: 1px solid ${t.border};\n }\n input {\n width: 100%;\n min-height: ${token('target.min', '24px')};\n accent-color: ${t.brand};\n margin: 0;\n }\n .stops {\n position: relative;\n display: flex;\n flex-wrap: wrap;\n gap: ${space(2)};\n list-style: none;\n margin: 0;\n padding: 0;\n }\n button {\n min-height: ${token('target.min', '24px')};\n padding: ${space(1)} ${space(3)};\n border-radius: ${token('radius.full', '9999px')};\n border: 1px solid ${t.border};\n background: transparent;\n color: ${t.textMuted};\n font-size: ${fontSize('xs')};\n font-weight: ${fontWeight('medium')};\n cursor: pointer;\n }\n button[aria-current='true'] {\n color: ${t.text};\n border-color: ${t.text};\n }\n .sr-only {\n ${visuallyHidden}\n }\n /* The graph look: the code of where you are, the line of stops, where you are. */\n :host([look='graph']) { max-width: none; }\n .graph { display: grid; grid-template-columns: minmax(8rem, auto) minmax(0, 1fr) auto; gap: ${space(6)}; align-items: center; padding: ${space(4)} ${space(6)}; border-radius: ${token('radius.xl', '16px')}; background: ${t.surfaceCard}; box-shadow: ${token('shadow.lg', '0 10px 15px -3px rgba(0,0,0,.1)')}; border: 1px solid ${t.border}; }\n .mono { font-family: ${t.fontMono}; font-size: ${fontSize('xs')}; letter-spacing: 0.04em; }\n .head { display: grid; gap: 2px; }\n .head .k { color: ${t.textMuted}; text-transform: uppercase; }\n .head .code { font-size: ${fontSize('md')}; color: ${t.text}; }\n .head .note { color: ${t.textMuted}; }\n .line { position: relative; block-size: 48px; }\n .track, .fill { position: absolute; inset-inline: 0; inset-block-start: 14px; block-size: 3px; border-radius: 3px; background: ${t.border}; opacity: 0.5; }\n .fill { opacity: 1; background: none; display: flex; overflow: hidden; }\n .fill span { block-size: 100%; }\n .dot { position: absolute; inset-block-start: 15px; inline-size: 14px; block-size: 14px; translate: -50% -50%; border-radius: 50%; border: 2px solid var(--c); background: ${t.surfaceCard}; padding: 0; min-height: 0; cursor: pointer; }\n .dot[data-passed] { background: var(--c); }\n .dot[aria-current='true'] { inline-size: 24px; block-size: 24px; box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 25%, transparent); }\n .dot-label { position: absolute; inset-block-start: 30px; translate: -50% 0; white-space: nowrap; color: ${t.textMuted}; text-transform: uppercase; pointer-events: none; }\n .dot-label[data-current] { color: ${t.text}; font-weight: ${fontWeight('bold')}; }\n .line input { position: absolute; inset: 0 0 auto; block-size: 30px; opacity: 0; cursor: grab; }\n .line input:focus-visible { opacity: 1; }\n .where { display: grid; gap: ${space(2)}; justify-items: end; }\n .chip { display: inline-flex; align-items: center; gap: ${space(2)}; padding: ${space(1)} ${space(3)}; border-radius: ${token('radius.full', '9999px')}; border: 1px solid ${t.border}; color: ${t.text}; text-transform: uppercase; }\n .chip::before { content: ''; inline-size: 8px; block-size: 8px; border-radius: 50%; background: var(--c); }\n .hint { color: ${t.textMuted}; text-transform: uppercase; }\n /* Muted by colour, not opacity, so the code keeps its contrast (1.4.3). */\n .chip .meta { color: ${t.textMuted}; }\n @media (max-width: 48rem) {\n .graph { grid-template-columns: minmax(0, 1fr); }\n .where { justify-items: start; }\n .dot-label:not([data-current]) { display: none; }\n }\n button:focus-visible,\n input:focus-visible {\n outline: none;\n box-shadow: ${token('focus.ring.shadow', '0 0 0 2px #fff, 0 0 0 4px #1a1a1a')};\n }\n `,\n ];\n\n /** @ignore */\n connectedCallback(): void {\n super.connectedCallback();\n this.scene = this.closest('impakt-scene');\n this.scene?.addEventListener('impakt-scene-progress', this.onProgress);\n if (this.scene) this.value = this.scene.progress;\n }\n\n /** @ignore */\n disconnectedCallback(): void {\n super.disconnectedCallback();\n this.scene?.removeEventListener('impakt-scene-progress', this.onProgress);\n this.scene = null;\n }\n\n private onProgress = (e: Event) => {\n this.value = (e as CustomEvent<{ progress: number }>).detail.progress;\n };\n\n private onInput = (e: Event) => {\n const v = Number((e.target as HTMLInputElement).value) / 1000;\n this.value = v;\n this.scene?.seek(v);\n };\n\n private goTo(stop: ScrubberStop) {\n this.scene?.seek(stop.at, 600);\n }\n\n /** The stop nearest the current position, which the stop list marks as current. */\n private nearest(): number {\n let best = -1;\n let gap = Infinity;\n this.stops.forEach((s, i) => {\n const d = Math.abs(s.at - this.value);\n if (d < gap) {\n gap = d;\n best = i;\n }\n });\n return best;\n }\n\n private renderGraph(nearestIndex: number, valueText: string): TemplateResult {\n let current = nearestIndex;\n const stops = [...(this.stops ?? [])].sort((a, b) => a.at - b.at);\n // Where you are, among the stops in the order they are drawn.\n current = stops.indexOf(this.stops[current]!);\n const colour = (s: ScrubberStop | undefined) => {\n const tone = s?.tone ?? 'brand';\n return typeof tone === 'number' ? `var(--impakt-color-chart-${tone}, ${TONES.brand})` : (TONES[tone] ?? TONES.brand);\n };\n const now = stops[current] ?? stops[0];\n // The line fills in each stop's colour, from the stop before it to it, as far as the playhead.\n const segments = stops.map((s, i) => {\n const from = i === 0 ? 0 : stops[i - 1]!.at;\n const to = Math.min(s.at, this.value);\n return { width: Math.round(Math.max(0, to - from) * 10000) / 100, c: colour(s) };\n });\n return html`<div class=\"graph\" part=\"wrap\">\n <div class=\"head mono\" aria-hidden=\"true\">\n <span class=\"k\">HEAD</span>\n <span class=\"code\">${now?.meta ?? now?.label ?? ''}</span>\n ${now?.note ? html`<span class=\"note\">${now.note}</span>` : null}\n </div>\n <div class=\"line\">\n <div class=\"track\"></div>\n <div class=\"fill\" aria-hidden=\"true\">${segments.map((g) => html`<span style=${`width:${g.width}%;background:${g.c}`}></span>`)}</div>\n ${stops.map(\n (s, i) => html`\n <button type=\"button\" class=\"dot\" style=${`left:${s.at * 100}%;--c:${colour(s)}`} ?data-passed=${s.at <= this.value + 0.0001} aria-current=${i === current ? 'true' : 'false'} @click=${() => this.goTo(s)}>\n <span class=\"sr-only\">${say('Go to {name}', { name: s.label })}</span>\n </button>\n <span class=\"dot-label mono\" style=${`left:${s.at * 100}%`} ?data-current=${i === current} aria-hidden=\"true\">${s.label}</span>`,\n )}\n <input type=\"range\" min=\"0\" max=\"1000\" step=\"1\" .value=${String(Math.round(this.value * 1000))} aria-label=${this.label} aria-valuetext=${valueText} @input=${this.onInput} />\n </div>\n <div class=\"where\" aria-hidden=\"true\">\n ${now ? html`<span class=\"chip mono\" style=${`--c:${colour(now)}`}>${now.label}${now.meta ? html` <span class=\"meta\">${now.meta}</span>` : null}</span>` : null}\n ${this.hint ? html`<span class=\"hint mono\">${this.hint}</span>` : null}\n </div>\n </div>`;\n }\n\n render(): TemplateResult {\n const current = this.nearest();\n const valueText = current >= 0 ? this.stops[current].label : `${Math.round(this.value * 100)}%`;\n if (this.look === 'graph') return this.renderGraph(current, valueText);\n return html`\n <div class=\"wrap\" part=\"wrap\">\n <input\n type=\"range\"\n min=\"0\"\n max=\"1000\"\n step=\"1\"\n .value=${String(Math.round(this.value * 1000))}\n aria-label=${this.label}\n aria-valuetext=${valueText}\n @input=${this.onInput}\n />\n ${\n this.stops.length\n ? html`<ul class=\"stops\" part=\"stops\">\n ${this.stops.map(\n (s, i) => html`<li>\n <button type=\"button\" aria-current=${i === current ? 'true' : 'false'} @click=${() => this.goTo(s)}>\n <span aria-hidden=\"true\">${s.label}</span><span class=\"sr-only\">${say('Go to {name}', { name: s.label })}</span>\n </button>\n </li>`,\n )}\n </ul>`\n : null\n }\n </div>\n `;\n }\n}\n\ncustomElements.define('impakt-scrubber', ImpaktScrubber);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'impakt-scrubber': ImpaktScrubber;\n }\n}\n", "/**\n * Blocks that tell how software was made, in the language software is made\n * in: a release with what it added and removed, services as branches that\n * merge into one product, checks that passed, and a project drawn as a commit\n * graph. They came from building the Impakt site's Commit design in Strata, and\n * they are written for any studio, agency or product team that wants to show\n * its work this way.\n *\n * Every colour is a brand token. A lane's colour is a tone (brand, accent or\n * a status colour), never a hex value, so a partner's brand restyles them.\n */\nimport { css, html, nothing, svg, type TemplateResult } from 'lit';\nimport {\n say,\n ImpaktElement,\n focusRing,\n visuallyHidden,\n fontSize,\n fontWeight,\n space,\n spaceAround,\n t,\n type,\n iconSvg,\n toneOf,\n TONE,\n type Tone,\n} from '@atomic-ui/ui';\nimport './property';\n\n// The tones (`Tone`, `TONE`, `toneOf`) are shared with `impakt-chip`, so they live in @atomic-ui/ui.\n\n/**\n * Marks an element `shown` once a quarter of it is on screen, so it can draw\n * itself in (the Commit motion spec's branch draw, graph draw and checks run).\n * Where nothing can watch, it is shown at once; what draws in is decided by\n * CSS under `prefers-reduced-motion: no-preference`, so reduced motion never waits.\n */\nfunction revealOnView(el: HTMLElement, onShow?: () => void): () => void {\n const show = () => {\n el.setAttribute('shown', '');\n onShow?.();\n };\n if (typeof IntersectionObserver !== 'function') {\n show();\n return () => undefined;\n }\n const io = new IntersectionObserver(\n (entries) => {\n if (entries.some((e) => e.isIntersecting)) {\n show();\n io.disconnect();\n }\n },\n { threshold: 0.25 },\n );\n io.observe(el);\n return () => io.disconnect();\n}\nconst reduced = () => typeof matchMedia === 'function' && matchMedia('(prefers-reduced-motion: reduce)').matches;\n\n/** Code-like labels: a branch name, a version, a hash. The brand has no code face, so the system's is used. */\nconst mono = css`.mono { font-family: ${t.fontMono}; font-size: ${fontSize('xs')}; letter-spacing: 0.04em; }`;\n\nconst heading = (level: number, text: string | TemplateResult, cls: string): TemplateResult => {\n const l = Math.min(Math.max(level || 3, 2), 6);\n switch (l) {\n case 2:\n return html`<h2 class=${cls}>${text}</h2>`;\n case 4:\n return html`<h4 class=${cls}>${text}</h4>`;\n case 5:\n return html`<h5 class=${cls}>${text}</h5>`;\n case 6:\n return html`<h6 class=${cls}>${text}</h6>`;\n default:\n return html`<h3 class=${cls}>${text}</h3>`;\n }\n};\n\nconst words = css`\n .h { margin: 0; color: var(--impakt-heading, ${t.textHeading}); font-family: ${t.fontHeading}; font-weight: ${fontWeight('bold')}; letter-spacing: ${t.trackingTight}; text-wrap: balance; }\n .body { margin: 0; color: inherit; opacity: 0.8; text-wrap: pretty; }\n .meta { margin: 0; color: inherit; opacity: 0.72; text-transform: uppercase; }\n .sr-only { ${visuallyHidden} }\n`;\n\n// \u2500\u2500 Release card \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\n/** One line of what a release changed. */\nexport interface DiffLine {\n id?: string;\n /** Added, taken away, or kept as it was. */\n change: 'added' | 'removed' | 'same';\n text: string;\n}\n\n/**\n * A piece of work told as a release: what it looked like when it started and\n * what shipped, a version line, and a short diff of what it added and took\n * away.\n *\n * With both pictures it is a before-and-after comparison a visitor drags; with\n * one it is a picture. The diff is a list, each line saying \"Added\" or\n * \"Removed\" for a screen reader, since the + and \u2212 are only drawn.\n *\n * @category content\n * @icon git-commit\n */\nexport class ImpaktReleaseCard extends ImpaktElement {\n static properties = {\n label: { type: String },\n heading: { type: String },\n text: { type: String },\n beforeSrc: { type: String, attribute: 'before-src' },\n beforeAlt: { type: String, attribute: 'before-alt' },\n afterSrc: { type: String, attribute: 'after-src' },\n afterAlt: { type: String, attribute: 'after-alt' },\n items: { type: Array },\n href: { type: String },\n headingLevel: { type: Number, attribute: 'heading-level' },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n /** A line above the heading, such as \"v1.0 \u00B7 Legal tech \u00B7 Property\". */\n declare label: string;\n declare heading: string;\n declare text: string;\n /** What it started as: a sketch or a wireframe. */\n declare beforeSrc: string;\n declare beforeAlt: string;\n /** What shipped. */\n declare afterSrc: string;\n declare afterAlt: string;\n /** What the release added, took away or kept. */\n declare items: DiffLine[];\n /** Where the heading links to, such as the case study. */\n declare href: string;\n declare headingLevel: 2 | 3 | 4;\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n constructor() {\n super();\n this.label = '';\n this.heading = '';\n this.text = '';\n this.beforeSrc = '';\n this.beforeAlt = '';\n this.afterSrc = '';\n this.afterAlt = '';\n this.items = [];\n this.href = '';\n this.headingLevel = 3;\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n spaceAround,\n mono,\n words,\n css`\n :host { display: block; }\n article { display: flex; flex-direction: column; gap: ${space(3)}; }\n .media { border-radius: ${t.radiusXl}; overflow: clip; background: ${t.surfaceInset}; }\n .media img { display: block; inline-size: 100%; aspect-ratio: 5 / 3; object-fit: cover; }\n impakt-before-after { display: block; }\n .h { font-size: ${fontSize('3xl')}; }\n .h a { color: inherit; text-decoration: none; }\n .h a:hover { text-decoration: underline; text-underline-offset: 0.15em; }\n .h a:focus-visible { outline: none; box-shadow: ${t.focusShadow}; border-radius: ${t.radiusSm}; }\n ul { list-style: none; margin: ${space(1)} 0 0; padding: 0; display: grid; gap: ${space(1)}; }\n li { display: grid; grid-template-columns: 1.25em minmax(0, 1fr); gap: ${space(2)}; padding: ${space(1)} ${space(3)}; border-radius: ${t.radius}; }\n li[data-change='added'] { background: ${t.successSubtle}; color: ${t.successText}; }\n li[data-change='removed'] { background: ${t.dangerSubtle}; color: ${t.dangerText}; }\n li[data-change='same'] { color: ${t.textMuted}; }\n .sign { font-weight: ${fontWeight('bold')}; }\n `,\n ];\n\n private raf = 0;\n\n /** Sweep the seam, as Commit's release wipe does: off the screenshot on hover, back on leaving. */\n private wipe(to: number): void {\n const ba = this.renderRoot.querySelector('impakt-before-after') as (HTMLElement & { position: number }) | null;\n if (!ba) return;\n cancelAnimationFrame(this.raf);\n if (reduced()) {\n ba.position = to;\n return;\n }\n const from = ba.position ?? SEAM;\n const start = performance.now();\n // cubic-bezier(.65, 0, .35, 1), near enough: an ease-in-out.\n const ease = (k: number) => (k < 0.5 ? 4 * k * k * k : 1 - Math.pow(-2 * k + 2, 3) / 2);\n const step = (now: number) => {\n const k = Math.min(1, (now - start) / 450);\n ba.position = from + (to - from) * ease(k);\n if (k < 1) this.raf = requestAnimationFrame(step);\n };\n this.raf = requestAnimationFrame(step);\n }\n\n disconnectedCallback(): void {\n super.disconnectedCallback();\n cancelAnimationFrame(this.raf);\n }\n\n render(): TemplateResult {\n const both = this.beforeSrc && this.afterSrc;\n const title = this.href ? html`<a href=${this.href}>${this.heading}</a>` : this.heading;\n const SIGN = { added: '+', removed: '\u2212', same: ' ' } as const;\n const SAID = { added: say('Added'), removed: say('Removed'), same: say('Kept') } as const;\n return html`<article part=\"card\">\n ${\n both\n ? html`<div class=\"media\" @pointerenter=${(e: PointerEvent) => e.pointerType === 'mouse' && this.wipe(0)} @pointerleave=${(e: PointerEvent) => e.pointerType === 'mouse' && this.wipe(SEAM)}><impakt-before-after .position=${SEAM} .beforeSrc=${this.beforeSrc} .beforeAlt=${this.beforeAlt} .afterSrc=${this.afterSrc} .afterAlt=${this.afterAlt} .beforeLabel=${say('Before')} .afterLabel=${say('Shipped')} .label=${say('Compare {name} before and after', { name: this.heading })}></impakt-before-after></div>`\n : this.afterSrc || this.beforeSrc\n ? html`<div class=\"media\"><img src=${this.afterSrc || this.beforeSrc} alt=${this.afterSrc ? this.afterAlt : this.beforeAlt} loading=\"lazy\" /></div>`\n : nothing\n }\n ${this.label ? html`<p class=\"meta mono\">${this.label}</p>` : nothing}\n ${this.heading ? headingWith(this.headingLevel, title) : nothing}\n ${this.text ? html`<p class=\"body\">${this.text}</p>` : nothing}\n ${(this.items ?? []).length ? html`<ul class=\"mono\" part=\"diff\">${this.items.map((line) => html`<li data-change=${line.change}><span class=\"sign\" aria-hidden=\"true\">${SIGN[line.change] ?? ' '}</span><span><span class=\"sr-only\">${SAID[line.change] ?? ''}: </span>${line.text}</span></li>`)}</ul>` : nothing}\n </article>`;\n }\n}\n\n// \u2500\u2500 Release list \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\n/**\n * One release in a list: a release card's props. `title` is read when there is\n * no `heading`, because that is what a collection's entry carries (ADR 0028).\n */\nexport interface ReleaseItem {\n label?: string;\n heading?: string;\n title?: string;\n text?: string;\n beforeSrc?: string;\n beforeAlt?: string;\n afterSrc?: string;\n afterAlt?: string;\n items?: DiffLine[];\n href?: string;\n}\n\n/**\n * Releases side by side, two to a row: a changelog of case studies.\n *\n * Bind `items` to a collection's entries and the list follows them: a new case\n * study appears here when it is published. The release for the page being\n * read is left out, so a case study's \"more work\" does not offer itself.\n *\n * @category content\n * @icon git-commit\n */\nexport class ImpaktReleaseList extends ImpaktElement {\n static properties = {\n items: { type: Array },\n columns: { type: String, reflect: true },\n headingLevel: { type: Number, attribute: 'heading-level' },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n declare items: ReleaseItem[];\n /** Releases in a row on a wide screen. One on a phone. */\n declare columns: 'one' | 'two' | 'three';\n declare headingLevel: 2 | 3 | 4;\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n constructor() {\n super();\n this.items = [];\n this.columns = 'two';\n this.headingLevel = 3;\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n spaceAround,\n css`\n :host { display: block; container-type: inline-size; }\n ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: ${space(12)} ${space(10)}; }\n :host([columns='one']) ul { grid-template-columns: minmax(0, 1fr); }\n :host([columns='three']) ul { grid-template-columns: repeat(3, minmax(0, 1fr)); }\n @container (max-width: 44rem) { ul, :host([columns='three']) ul { grid-template-columns: minmax(0, 1fr); } }\n `,\n ];\n\n render(): TemplateResult {\n const here = typeof location === 'undefined' ? '' : location.pathname.replace(/\\/$/, '');\n const shown = (this.items ?? []).filter((item) => !item.href || item.href.replace(/\\/$/, '') !== here);\n return html`<ul part=\"list\">${shown.map((item) => {\n const heading = item.heading ?? item.title ?? '';\n return html`<li><impakt-release-card\n .label=${item.label ?? ''} .heading=${heading} .text=${item.text ?? ''} .href=${item.href ?? ''}\n .beforeSrc=${item.beforeSrc ?? ''} .beforeAlt=${item.beforeAlt || say('{name} as a wireframe', { name: heading })}\n .afterSrc=${item.afterSrc ?? ''} .afterAlt=${item.afterAlt || say('{name} as it shipped', { name: heading })}\n .items=${item.items ?? []} .headingLevel=${this.headingLevel}></impakt-release-card></li>`;\n })}</ul>`;\n }\n}\n\n/** Where the seam rests: the wireframe covers the left of the screenshot until it is pointed at. */\nconst SEAM = 42;\n\n/** A heading holding a template, such as a link. */\nfunction headingWith(level: number, content: TemplateResult | string): TemplateResult {\n const l = Math.min(Math.max(level || 3, 2), 6);\n if (l === 2) return html`<h2 class=\"h\">${content}</h2>`;\n if (l === 4) return html`<h4 class=\"h\">${content}</h4>`;\n if (l === 5) return html`<h5 class=\"h\">${content}</h5>`;\n if (l === 6) return html`<h6 class=\"h\">${content}</h6>`;\n return html`<h3 class=\"h\">${content}</h3>`;\n}\n\n// \u2500\u2500 Branch list \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\n/** One branch: a service, a team, a line of work. */\nexport interface Branch {\n id?: string;\n /** A short code-like name, such as \"feature/mobile-apps\". */\n path?: string;\n heading: string;\n text?: string;\n /** A few words below the text, such as the tools it uses. */\n tags?: string[];\n tone?: Tone;\n /** Where the heading links to, such as the service's own page. */\n href?: string;\n}\n\n/**\n * Several lines of work that come together into one: each item branches off a\n * main line on the left and merges back into it, and the line ends in what\n * they make together.\n *\n * The lines are drawn; the items are a list with headings, so a screen reader\n * reads the work, not the drawing.\n *\n * @category content\n * @icon git-merge\n */\nexport class ImpaktBranchList extends ImpaktElement {\n static properties = {\n items: { type: Array },\n trunk: { type: String },\n headingLevel: { type: Number, attribute: 'heading-level' },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n declare items: Branch[];\n /** What the main line ends in, such as \"main \u2190 one team owns the result\". */\n declare trunk: string;\n declare headingLevel: 2 | 3 | 4;\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n constructor() {\n super();\n this.items = [];\n this.trunk = '';\n this.headingLevel = 3;\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n spaceAround,\n mono,\n words,\n css`\n :host { display: block; container-type: inline-size; --trunk: color-mix(in srgb, currentColor 70%, transparent); }\n ul { list-style: none; margin: 0; padding: 0; position: relative; }\n ul::before { content: ''; position: absolute; inset-block: 0; inset-inline-start: 11px; inline-size: 3px; border-radius: 3px; background: var(--trunk); }\n li { position: relative; display: grid; grid-template-columns: 96px minmax(0, 1fr); padding-block: ${space(6)}; }\n .graph { position: relative; }\n .graph svg { position: absolute; inset-block-start: -${space(6)}; inset-inline-start: 0; inline-size: 96px; block-size: calc(100% + ${space(12)}); overflow: visible; }\n .row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: ${space(4)} ${space(10)}; align-items: start; }\n .path { margin: 0 0 ${space(2)}; opacity: 0.72; }\n .h { font-size: ${fontSize('3xl')}; line-height: 1.05; }\n .h a { color: inherit; text-decoration: none; }\n .h a:hover { text-decoration: underline; text-underline-offset: 0.15em; }\n .h a:focus-visible { outline: none; box-shadow: ${t.focusShadow}; border-radius: ${t.radiusSm}; }\n .detail { display: flex; flex-direction: column; gap: ${space(3)}; padding-block-start: ${space(1)}; }\n .tags { margin: 0; opacity: 0.7; text-transform: uppercase; }\n .end { position: relative; display: flex; align-items: center; gap: ${space(3)}; padding-block-start: ${space(4)}; }\n .end::before { content: ''; inline-size: 16px; block-size: 16px; margin-inline-start: 5px; border-radius: 50%; background: currentColor; }\n @container (max-width: 44rem) {\n li { grid-template-columns: 56px minmax(0, 1fr); }\n .graph svg { inline-size: 56px; }\n .row { grid-template-columns: minmax(0, 1fr); }\n .h { font-size: ${fontSize('2xl')}; }\n }\n /* Branch draw: each branch opens down from the trunk, 120 ms after the one above, then its dot pops. */\n @media (prefers-reduced-motion: no-preference) {\n .graph svg { clip-path: inset(0 0 100% 0); transition: clip-path 700ms cubic-bezier(.25, 1, .5, 1) calc(var(--i, 0) * 120ms); }\n .graph circle { transform-box: fill-box; transform-origin: center; transform: scale(0); transition: transform 200ms ease-out calc(var(--i, 0) * 120ms + 500ms); }\n :host([shown]) .graph svg { clip-path: inset(0); }\n :host([shown]) .graph circle { transform: scale(1); }\n }\n `,\n ];\n\n private unwatch: () => void = () => undefined;\n connectedCallback(): void {\n super.connectedCallback();\n this.unwatch = revealOnView(this);\n }\n disconnectedCallback(): void {\n super.disconnectedCallback();\n this.unwatch();\n }\n\n render(): TemplateResult {\n // Each branch leaves the trunk, swings out to its dot level with the\n // heading, and returns: drawn in a 96-wide box, scaled down on phones.\n const branch = (colour: string) => svg`<svg viewBox=\"0 0 96 200\" preserveAspectRatio=\"none\" aria-hidden=\"true\" focusable=\"false\">\n <path d=\"M12 0 C12 40 60 30 60 70 L60 120 C60 160 12 160 12 200\" fill=\"none\" stroke=${colour} stroke-width=\"3\" vector-effect=\"non-scaling-stroke\" />\n <circle cx=\"60\" cy=\"86\" r=\"8\" fill=${colour} />\n </svg>`;\n return html`<ul part=\"list\">${(this.items ?? []).map(\n (item, i) => html`<li part=\"item\" style=${`--i:${i}`}>\n <div class=\"graph\">${branch(toneOf(item.tone, i))}</div>\n <div>\n ${item.path ? html`<p class=\"path mono\">${item.path}</p>` : nothing}\n <div class=\"row\">\n ${heading(this.headingLevel, item.href ? html`<a href=${item.href}>${item.heading}</a>` : item.heading, 'h')}\n <div class=\"detail\">\n ${item.text ? html`<p class=\"body\">${item.text}</p>` : nothing}\n ${item.tags?.length ? html`<p class=\"tags mono\">${item.tags.join(' \u00B7 ')}</p>` : nothing}\n </div>\n </div>\n </div>\n </li>`,\n )}</ul>\n ${this.trunk ? html`<p class=\"end mono\" part=\"trunk\">${this.trunk}</p>` : nothing}`;\n }\n}\n\n// \u2500\u2500 Check list \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\n/** One check that passed: a figure and what it measures. */\nexport interface CheckItem {\n id?: string;\n figure: string;\n label: string;\n /** A word at the end of the row, such as \"passed\". */\n status?: string;\n}\n\n/**\n * Proof as a list of passing checks: a large figure, what it measures, and its\n * status, each row ticked. It reads its colours from the band it sits on, so\n * it works on a dark section as well as a light one.\n *\n * @category content\n * @icon list-check\n */\nexport class ImpaktCheckList extends ImpaktElement {\n static properties = {\n items: { type: Array },\n summary: { type: String },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n declare items: CheckItem[];\n /** A line above the list, such as \"All 4 checks passed\". */\n declare summary: string;\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n constructor() {\n super();\n this.items = [];\n this.summary = '';\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n spaceAround,\n mono,\n words,\n css`\n :host { display: block; container-type: inline-size; }\n .summary { display: inline-flex; align-items: center; gap: ${space(2)}; margin: 0 0 ${space(6)}; padding: ${space(1)} ${space(3)}; border-radius: ${t.radiusXl}; border: 1px solid color-mix(in srgb, currentColor 25%, transparent); }\n .summary::before { content: ''; inline-size: 8px; block-size: 8px; border-radius: 50%; background: ${t.success}; }\n /* The rows share one grid, so the figure column fits the widest figure and every row lines up. */\n ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 32px max-content minmax(0, 1fr) auto; column-gap: ${space(6)}; }\n li { grid-column: 1 / -1; display: grid; grid-template-columns: subgrid; align-items: center; padding-block: ${space(5)}; border-block-end: 1px solid color-mix(in srgb, currentColor 18%, transparent); }\n /* Checks run: each tick pops in, 150 ms after the one above. */\n @media (prefers-reduced-motion: no-preference) {\n .tick { transform: scale(0); transition: transform 600ms cubic-bezier(.34, 1.56, .64, 1) calc(var(--i, 0) * 150ms); }\n :host([shown]) .tick { transform: scale(1); }\n }\n .sr-only { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }\n /* A passed check is a filled disc with a tick cut out of it, as a CI run shows one. */\n .tick { display: inline-flex; align-items: center; justify-content: center; inline-size: 26px; block-size: 26px; border-radius: 50%; background: ${t.success}; color: var(--impakt-color-status-success-on, #fff); }\n .figure { margin: 0; font-family: ${t.fontHeading}; font-weight: ${fontWeight('bold')}; font-size: ${fontSize('5xl')}; line-height: 1; letter-spacing: ${t.trackingTight}; white-space: nowrap; }\n .label { margin: 0; ${type('xl')} }\n .status { margin: 0; opacity: 0.72; }\n @container (max-width: 40rem) {\n ul { grid-template-columns: 28px minmax(0, 1fr); }\n li { row-gap: ${space(1)}; }\n .label, .status { grid-column: 2; }\n .figure { font-size: ${fontSize('4xl')}; }\n }\n `,\n ];\n\n private unwatch: () => void = () => undefined;\n /** How far each figure has counted up, from 0 to 1, while the checks run. */\n private counted: number[] | null = null;\n connectedCallback(): void {\n super.connectedCallback();\n this.unwatch = revealOnView(this, () => this.run());\n }\n disconnectedCallback(): void {\n super.disconnectedCallback();\n this.unwatch();\n }\n\n /** Checks run: each figure counts up over 1200 ms, 150 ms after the one above. */\n private run(): void {\n if (reduced()) return;\n const items = this.items ?? [];\n const start = performance.now();\n const step = (now: number) => {\n this.counted = items.map((_, i) => Math.min(1, Math.max(0, (now - start - i * 150) / 1200)));\n this.requestUpdate();\n if (this.counted.some((k) => k < 1)) requestAnimationFrame(step);\n else this.counted = null;\n };\n requestAnimationFrame(step);\n }\n\n render(): TemplateResult {\n // While counting, the drawn figure is hidden from screen readers and the final one is read instead.\n const shownFigure = (figure: string, i: number) => {\n const k = this.counted?.[i];\n const m = /^(\\d+)(.*)$/.exec(figure);\n if (k === undefined || k >= 1 || !m) return html`${figure}`;\n const eased = 1 - Math.pow(1 - k, 3);\n return html`<span aria-hidden=\"true\">${Math.round(Number(m[1]) * eased)}${m[2]}</span><span class=\"sr-only\">${figure}</span>`;\n };\n return html`${this.summary ? html`<p class=\"summary mono\" part=\"summary\">${this.summary}</p>` : nothing}\n <ul part=\"list\">${(this.items ?? []).map(\n (item, i) => html`<li part=\"item\" style=${`--i:${i}`}>\n <span class=\"tick\" aria-hidden=\"true\">${iconSvg('check', '16px')}</span>\n <p class=\"figure\">${shownFigure(item.figure, i)}</p>\n <p class=\"label\">${item.label}</p>\n ${item.status ? html`<p class=\"status mono\">${item.status}</p>` : html`<span></span>`}\n </li>`,\n )}</ul>`;\n }\n}\n\n// \u2500\u2500 Branch timeline \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\n/** One stretch of work, drawn as a branch off the main line. */\nexport interface TimelineLane {\n id?: string;\n label: string;\n /** Where it starts and ends, in the timeline's units (weeks, say). */\n from: number;\n to: number;\n tone?: Tone;\n}\n\n/** A moment on a lane, such as a demo. */\nexport interface TimelineMark {\n id?: string;\n label: string;\n at: number;\n}\n\n/**\n * A project drawn as a commit graph: a main line along a scale of weeks, each\n * phase branching off it and merging back, moments marked on the way, and a\n * release tag where it ships.\n *\n * It is a picture, so it carries a text alternative that says the same in\n * words: each phase and when it runs. The steps that explain the phases go\n * beside it as their own block.\n *\n * @category content\n * @icon git-branch\n */\nexport class ImpaktBranchTimeline extends ImpaktElement {\n static properties = {\n lanes: { type: Array },\n marks: { type: Array },\n span: { type: Number },\n unit: { type: String },\n every: { type: Number },\n release: { type: String },\n releaseAt: { type: Number, attribute: 'release-at' },\n label: { type: String },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n declare lanes: TimelineLane[];\n declare marks: TimelineMark[];\n /** How long the whole timeline is, in its units. */\n declare span: number;\n /** The unit's short name on the scale, such as \"wk\". */\n declare unit: string;\n /** How often the scale is labelled. */\n declare every: number;\n /** The tag where it ships, such as \"v1.0 \u00B7 launch\". */\n declare release: string;\n declare releaseAt: number;\n /** What the picture shows, for a screen reader. */\n declare label: string;\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n constructor() {\n super();\n this.lanes = [];\n this.marks = [];\n this.span = 20;\n this.unit = '';\n this.every = 2;\n this.release = '';\n this.releaseAt = 0;\n this.label = '';\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n spaceAround,\n mono,\n words,\n css`\n :host { display: block; }\n /* On a narrow screen the graph scrolls sideways, so the scroller takes focus and the arrow keys move it (2.1.1). */\n figure { margin: 0; overflow-x: auto; border-radius: ${t.radiusSm}; }\n svg { display: block; inline-size: 100%; min-inline-size: 640px; block-size: auto; overflow: visible; }\n text { font-family: ${t.fontMono}; font-size: 12px; fill: currentColor; }\n .faint { opacity: 0.5; }\n /* A lane's label keeps a band of the page colour around it, so a line crossing it stays legible. */\n .halo { paint-order: stroke; stroke: var(--impakt-color-surface-card, #fff); stroke-width: 5px; stroke-linejoin: round; }\n /* Graph draw: the graph opens left to right, so each demo appears as the line reaches it. */\n @media (prefers-reduced-motion: no-preference) {\n svg { clip-path: inset(0 100% 0 0); transition: clip-path 1400ms cubic-bezier(.25, 1, .5, 1); }\n :host([shown]) svg { clip-path: inset(0 -40px 0 0); }\n }\n `,\n ];\n\n private unwatch: () => void = () => undefined;\n connectedCallback(): void {\n super.connectedCallback();\n this.unwatch = revealOnView(this);\n }\n disconnectedCallback(): void {\n super.disconnectedCallback();\n this.unwatch();\n }\n\n render(): TemplateResult {\n const W = 1200;\n const left = 24;\n const right = W - 60;\n const span = this.span > 0 ? this.span : 20;\n const x = (v: number) => left + (Math.min(Math.max(v, 0), span) / span) * (right - left);\n const lanes = this.lanes ?? [];\n const rowH = 52;\n const H = 40 + (lanes.length + 1) * rowH + 40;\n const mainY = 40;\n const laneY = (i: number) => mainY + (i + 1) * rowH;\n const ticks: number[] = [];\n for (let v = 0; v <= span; v += Math.max(1, this.every || 2)) ticks.push(v);\n const laneOf = (at: number) => lanes.findIndex((l) => at >= l.from && at <= l.to);\n // A lane's label goes under it, out of the way of the curves, unless its marks are labelled there.\n const marked = (i: number) => (this.marks ?? []).some((m) => laneOf(m.at) === i);\n const unit = this.unit || say('wk');\n const label = this.label || say('Project timeline');\n const described = lanes.map((l) => `${l.label}: ${say('{unit} {from} to {to}', { unit, from: l.from, to: l.to })}`).join('; ');\n return html`<figure part=\"figure\" tabindex=\"0\">\n <svg viewBox=\"0 0 ${W} ${H}\" role=\"img\" aria-label=${`${label}. ${described}${this.release ? `. ${say('{name} at {unit} {at}', { name: this.release, unit, at: this.releaseAt })}` : ''}`}>\n <line x1=${left} y1=${mainY} x2=${right + 40} y2=${mainY} stroke=\"currentColor\" stroke-width=\"3\" stroke-linecap=\"round\" />\n <path d=\"M${right + 28} ${mainY - 7} L${right + 40} ${mainY} L${right + 28} ${mainY + 7}\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"3\" />\n ${lanes.map((l, i) => {\n const c = toneOf(l.tone, i);\n const y = laneY(i);\n const a = x(l.from);\n const b = x(l.to);\n const bend = Math.min(36, (b - a) / 3);\n return svg`<g>\n <path d=\"M${a} ${mainY} C${a} ${(mainY + y) / 2} ${a + bend} ${y} ${a + bend * 1.6} ${y} L${b - bend * 1.6} ${y} C${b - bend} ${y} ${b} ${(mainY + y) / 2} ${b} ${mainY}\" fill=\"none\" stroke=${c} stroke-width=\"3\" />\n <circle cx=${a} cy=${mainY} r=\"7\" fill=${c} />\n <text x=${a + bend * 1.6} y=${marked(i) ? y - 10 : y + 20} class=\"halo\" style=${`fill:${c}`}>${l.label}</text>\n </g>`;\n })}\n ${(this.marks ?? []).map((m) => {\n const i = laneOf(m.at);\n const y = i >= 0 ? laneY(i) : mainY;\n const c = i >= 0 ? toneOf(lanes[i]!.tone, i) : 'currentColor';\n return svg`<g><circle cx=${x(m.at)} cy=${y} r=\"6\" fill=\"var(--impakt-color-surface-card, #fff)\" stroke=${c} stroke-width=\"3\" /><text x=${x(m.at)} y=${y + 22} text-anchor=\"middle\" class=\"faint\">${m.label}</text></g>`;\n })}\n ${\n this.release\n ? svg`<g>\n <circle cx=${x(this.releaseAt)} cy=${mainY} r=\"10\" fill=${TONE.success} />\n <rect x=${x(this.releaseAt) - 8} y=${mainY - 36} rx=\"4\" width=${this.release.length * 7.6 + 16} height=\"22\" fill=${TONE.success} />\n <text x=${x(this.releaseAt)} y=${mainY - 21} style=\"fill:var(--impakt-color-surface-card, #fff)\">${this.release}</text>\n </g>`\n : nothing\n }\n ${ticks.map((v) => svg`<text x=${x(v)} y=${H - 10} text-anchor=\"middle\" class=\"faint\">${unit} ${v}</text>`)}\n </svg>\n </figure>`;\n }\n}\n\ncustomElements.define('impakt-release-card', ImpaktReleaseCard);\ncustomElements.define('impakt-release-list', ImpaktReleaseList);\ncustomElements.define('impakt-branch-list', ImpaktBranchList);\ncustomElements.define('impakt-check-list', ImpaktCheckList);\ncustomElements.define('impakt-branch-timeline', ImpaktBranchTimeline);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'impakt-release-card': ImpaktReleaseCard;\n 'impakt-release-list': ImpaktReleaseList;\n 'impakt-branch-list': ImpaktBranchList;\n 'impakt-check-list': ImpaktCheckList;\n 'impakt-branch-timeline': ImpaktBranchTimeline;\n }\n}\n"],
|
|
5
|
+
"mappings": ";AAUA,MAAO,iBCVP,OAAS,OAAAA,GAAK,QAAAC,EAAM,WAAAC,MAAoC,iBACxD,OAAS,iBAAAC,GAAe,YAAAC,GAAU,cAAAC,GAAY,cAAAC,GAAY,SAAAC,EAAO,eAAAC,GAAa,KAAAC,EAAG,QAAAC,GAAM,WAAAC,OAAe,iBAGtG,IAAMC,GAAU,CAACC,EAAeC,EAAcC,IAAgCd,eAAkBc,CAAG,8BAA8BF,CAAK,IAAIC,CAAI,SAExIE,GAAgBhB;AAAA,2BACKS,EAAE,WAAW,kBAAkBA,EAAE,WAAW,kBAAkBJ,GAAW,MAAM,CAAC,kBAAkBC,GAAW,OAAO,CAAC;AAAA,wFACxDG,EAAE,KAAK,OAAOC,GAAK,IAAI,CAAC,mGAAmGD,EAAE,WAAW,oDAAoDJ,GAAW,UAAU,CAAC,sBAAsBI,EAA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": ["css", "html", "nothing", "ImpaktElement", "fontSize", "fontWeight", "lineHeight", "space", "spaceAround", "t", "type", "iconSvg", "heading", "level", "text", "cls", "headingStyles", "ImpaktHero", "pictured", "ImpaktFeatureList", "item", "ImpaktQuote", "ImpaktStat", "ImpaktAnnouncement", "ImpaktSearchBar", "event", "data", "values", "value", "key", "field", "i", "id", "choices", "o", "c", "css", "html", "nothing", "ImpaktElement", "focusRing", "fontSize", "fontWeight", "lineHeight", "space", "spaceAround", "t", "iconSvg", "ImpaktCardGrid", "card", "css", "html", "nothing", "ImpaktElement", "focusRing", "fontSize", "fontWeight", "space", "t", "token", "JOURNEY_STAGES", "isStage", "value", "arrow", "ImpaktJourneyButton", "changed", "sections", "el", "entries", "section", "stage", "e", "lines", "fallback", "line", "_", "i", "words", "css", "html", "nothing", "ImpaktElement", "focusRing", "fontSize", "fontWeight", "lineHeight", "lockScroll", "space", "spaceAround", "t", "token", "unlockScroll", "arrow", "ImpaktWorkList", "item", "index", "number", "ImpaktStatRow", "ImpaktFaq", "headingId", "level", "head", "accordion", "ImpaktSiteMenu", "changed", "dialog", "event", "link", "current", "ImpaktOffer", "point", "ImpaktPostCard", "ImpaktHighlight", "css", "html", "nothing", "say", "ImpaktElement", "focusRing", "targetSize", "visuallyHidden", "fontWeight", "lineHeight", "space", "spaceAround", "t", "token", "type", "iconSvg", "token_accent", "reducedMotion", "roundButton", "headingStyles", "ImpaktCarousel", "track", "first", "width", "gap", "fits", "slide", "slides", "i", "to", "target", "arrived", "nearest", "distance", "d", "event", "held", "changed", "stops", "_", "gallerySpan", "index", "count", "layout", "last", "span", "extra", "ImpaktGallery", "by", "n", "items", "current", "item", "e", "ImpaktLogoCloud", "logo", "ImpaktSteps", "step", "ImpaktMediaSplit", "p", "ImpaktCtaBanner", "stars", "rating", "initials", "name", "w", "ImpaktReviews", "r", "ImpaktNewsletter", "form", "email", "field", "css", "html", "nothing", "say", "pageLocale", "ImpaktElement", "focusRing", "targetSize", "fontWeight", "space", "spaceAround", "t", "type", "iconSvg", "ImpaktSitePlan", "changed", "p", "status", "plot", "name", "monthlyPayment", "loan", "annualRate", "years", "months", "rate", "ImpaktMortgageCalculator", "amount", "key", "event", "deposit", "monthly", "ImpaktBeforeAfter", "e", "ImpaktStickyBar", "shown", "on", "height", "root", "ImpaktLocationCard", "directions", "item", "css", "html", "nothing", "say", "pageLocale", "ImpaktElement", "focusRing", "targetSize", "visuallyHidden", "fontWeight", "space", "spaceAround", "t", "type", "card", "money", "amount", "currency", "digits", "ImpaktPlanComparison", "plan", "row", "s", "event", "p", "r", "has", "embedOf", "src", "locale", "yt", "hl", "vimeo", "ImpaktVideo", "embed", "player", "NOTICE_WORDS", "ImpaktRegulatoryNotice", "preset", "heading", "text", "SDLT", "taxOn", "price", "bands", "extra", "tax", "band", "i", "top", "stampDuty", "buyer", "calcStyles", "ImpaktStampDutyCalculator", "duty", "rate", "buyers", "e", "value", "label", "ImpaktAffordabilityCalculator", "key", "borrow", "input", "ImpaktContactBlock", "form", "data", "css", "html", "nothing", "unsafeCSS", "ImpaktElement", "pageLocale", "say", "focusRing", "targetSize", "visuallyHidden", "fontSize", "fontWeight", "space", "spaceAround", "t", "type", "toneOf", "sum", "xs", "a", "b", "bandFor", "bands", "cost", "estimate", "questions", "answers", "rules", "chosen", "q", "id", "c", "weeks", "engineers", "phaseWeeks", "phases", "fixed", "p", "rest", "i", "ImpaktEstimator", "ids", "x", "changed", "n", "words", "qs", "best", "r", "one", "thing", "many", "name", "first", "choice", "on", "now", "to", "last", "parts", "picked", "labels", "result", "text", "l", "current", "index", "e", "k", "_", "total", "done", "scale", "css", "html", "nothing", "ImpaktElement", "focusRing", "hideOn", "fontSize", "fontWeight", "space", "t", "type", "toneOf", "STRIPE", "MONO", "ImpaktSiteHeader", "wordmark", "ImpaktWordmark", "ImpaktSiteFooter", "text", "level", "log", "line", "column", "link", "i", "html", "css", "nothing", "say", "ImpaktElement", "fontSize", "fontWeight", "space", "t", "token", "clamp", "ImpaktScene", "now", "p", "e", "r", "vh", "doc", "changed", "to", "ms", "paused", "loop", "over", "controls", "stage", "html", "css", "say", "ImpaktElement", "visuallyHidden", "fontSize", "fontWeight", "space", "t", "token", "TONES", "ImpaktScrubber", "v", "stop", "best", "gap", "s", "i", "d", "nearestIndex", "valueText", "current", "stops", "a", "b", "colour", "tone", "now", "segments", "from", "to", "g", "css", "html", "nothing", "svg", "say", "ImpaktElement", "focusRing", "visuallyHidden", "fontSize", "fontWeight", "space", "spaceAround", "t", "type", "iconSvg", "toneOf", "TONE", "revealOnView", "el", "onShow", "show", "io", "entries", "e", "reduced", "mono", "css", "t", "fontSize", "heading", "level", "text", "cls", "html", "words", "fontWeight", "visuallyHidden", "ImpaktReleaseCard", "ImpaktElement", "spaceAround", "space", "to", "ba", "from", "SEAM", "start", "ease", "k", "step", "now", "both", "title", "SIGN", "SAID", "say", "nothing", "headingWith", "line", "ImpaktReleaseList", "here", "shown", "item", "content", "l", "ImpaktBranchList", "branch", "colour", "svg", "i", "toneOf", "ImpaktCheckList", "type", "items", "_", "shownFigure", "figure", "m", "eased", "iconSvg", "ImpaktBranchTimeline", "focusRing", "span", "x", "v", "lanes", "rowH", "H", "mainY", "laneY", "ticks", "laneOf", "at", "marked", "unit", "label", "described", "c", "y", "a", "b", "bend", "TONE"]
|
|
7
7
|
}
|