{"version":3,"file":"forty-cdk-scroll-area.mjs","sources":["../../../projects/forty-cdk/scroll-area/src/scroll-area-context.ts","../../../projects/forty-cdk/scroll-area/src/scroll-area-defaults.ts","../../../projects/forty-cdk/scroll-area/src/scroll-area.ts","../../../projects/forty-cdk/scroll-area/src/scroll-area-viewport.ts","../../../projects/forty-cdk/scroll-area/src/scroll-area-content.ts","../../../projects/forty-cdk/scroll-area/src/track-press.ts","../../../projects/forty-cdk/scroll-area/src/scroll-area-scrollbar.ts","../../../projects/forty-cdk/scroll-area/src/scroll-area-thumb.ts","../../../projects/forty-cdk/scroll-area/src/scroll-area-corner.ts","../../../projects/forty-cdk/scroll-area/src/forty-cdk-scroll-area.ts"],"sourcesContent":["import { inject, InjectionToken, type Signal } from '@angular/core';\n\nimport { orphanContextError, type WritingDirection } from 'forty-cdk/core';\n\nexport type ForScrollAreaType = 'auto' | 'always' | 'scroll' | 'hover';\nexport type ForScrollbarOrientation = 'horizontal' | 'vertical';\n\n/**\n * What a primary-button press on bare scrollbar track does:\n * - `'page'` — step one page toward the press and auto-repeat while held,\n *   stopping when the thumb reaches the pointer (platform default).\n * - `'jump'` — centre the thumb on the press point, then scrub while held.\n * - `'none'` — the library ignores track presses entirely.\n */\nexport type ForScrollAreaTrackPress = 'none' | 'page' | 'jump';\n\n/** Read surface `[forScrollArea]` publishes through {@link FOR_SCROLL_AREA_CONTEXT}. */\nexport interface ForScrollAreaContext {\n  readonly type: Signal<ForScrollAreaType>;\n  readonly scrollHideDelay: Signal<number>;\n  readonly dir: Signal<WritingDirection>;\n  /** Behaviour of a primary-button press on bare scrollbar track. */\n  readonly trackPress: Signal<ForScrollAreaTrackPress>;\n  /** ms a `trackPress=\"page\"` hold waits before the first auto-repeat step. */\n  readonly trackPressRepeatDelay: Signal<number>;\n  /** ms between auto-repeat steps of a held `trackPress=\"page\"` gesture. */\n  readonly trackPressRepeatInterval: Signal<number>;\n\n  /** The scrolling element (registered by `ForScrollAreaViewport`). */\n  readonly viewport: Signal<HTMLElement | null>;\n  /** The content element (registered by `ForScrollAreaContent`, observed by the viewport). */\n  readonly content: Signal<HTMLElement | null>;\n  /** Live scroll offset of the viewport. */\n  readonly scrollLeft: Signal<number>;\n  readonly scrollTop: Signal<number>;\n  /** Live size measurements of the viewport. */\n  readonly clientWidth: Signal<number>;\n  readonly clientHeight: Signal<number>;\n  readonly scrollWidth: Signal<number>;\n  readonly scrollHeight: Signal<number>;\n\n  /** True while the user is hovering anywhere on the root (for `type=\"hover\"`). */\n  readonly hovering: Signal<boolean>;\n  /** True for a short window after the most recent scroll (for `type=\"scroll\"`). */\n  readonly scrolling: Signal<boolean>;\n\n  registerViewport(el: HTMLElement | null): void;\n  registerContent(el: HTMLElement): void;\n  unregisterContent(el: HTMLElement): void;\n  reportScroll(left: number, top: number): void;\n  reportSize(clientW: number, clientH: number, scrollW: number, scrollH: number): void;\n  noteUserScroll(): void;\n}\n\nexport const FOR_SCROLL_AREA_CONTEXT = new InjectionToken<ForScrollAreaContext>(\n  'FOR_SCROLL_AREA_CONTEXT',\n);\n\nexport function injectScrollAreaContext(piece: string): ForScrollAreaContext {\n  const ctx = inject(FOR_SCROLL_AREA_CONTEXT, { optional: true });\n  if (!ctx) {\n    throw orphanContextError({\n      code: 'FORCDK-SCROLL-AREA-001',\n      piece,\n      root: '[forScrollArea]',\n      token: 'FOR_SCROLL_AREA_CONTEXT',\n    });\n  }\n  return ctx;\n}\n","import { type Provider } from '@angular/core';\n\nimport { createDefaults } from 'forty-cdk/core';\nimport { type ForScrollAreaTrackPress } from './scroll-area-context';\n\n/**\n * Defaults inherited by descendant scroll areas in the surrounding injector\n * scope. Configure with `provideForScrollAreaDefaults` either at the\n * application root or in any component's `providers` array; partial\n * overrides merge with the parent scope.\n */\nexport interface ForScrollAreaDefaults {\n  /**\n   * Milliseconds after the most recent scroll before the synthetic\n   * scrollbars fade. Applies when `type` is `'scroll'` or `'hover'`.\n   */\n  scrollHideDelay: number;\n\n  /**\n   * What a primary-button press on bare scrollbar track does: page toward the\n   * press (with auto-repeat while held), jump the thumb to the press point, or\n   * nothing at all.\n   */\n  trackPress: ForScrollAreaTrackPress;\n\n  /**\n   * Milliseconds a held `trackPress=\"page\"` gesture waits before the first\n   * auto-repeat page step.\n   */\n  trackPressRepeatDelay: number;\n\n  /**\n   * Milliseconds between auto-repeat page steps of a held `trackPress=\"page\"`\n   * gesture, after `trackPressRepeatDelay` has elapsed.\n   */\n  trackPressRepeatInterval: number;\n}\n\n/**\n * Library fallback for scroll area defaults, read at the root injector when no\n * consumer has called `provideForScrollAreaDefaults`. Exported for the shared defaults\n * contract spec; not re-exported from the primitive's public entry.\n */\nexport const FOR_SCROLL_AREA_FALLBACK_DEFAULTS: ForScrollAreaDefaults = {\n  scrollHideDelay: 600,\n  trackPress: 'page',\n  trackPressRepeatDelay: 300,\n  trackPressRepeatInterval: 50,\n};\n\nconst { token, provideDefaults } = createDefaults<ForScrollAreaDefaults>(\n  'FOR_SCROLL_AREA_DEFAULTS',\n  FOR_SCROLL_AREA_FALLBACK_DEFAULTS,\n);\n\n/** Token holding the resolved scroll-area defaults for the current scope. */\nexport const FOR_SCROLL_AREA_DEFAULTS = token;\n\n/**\n * Configures forty-cdk scroll-area defaults for this injector scope. Partial\n * overrides inherit unspecified keys from the parent scope (or library\n * defaults at the root).\n */\nexport function provideForScrollAreaDefaults(\n  defaults: Partial<ForScrollAreaDefaults> = {},\n): Provider[] {\n  return provideDefaults(defaults);\n}\n","import { DestroyRef, Directive, inject, input, numberAttribute, signal } from '@angular/core';\n\nimport { type WritingDirection, injectTextDirection } from 'forty-cdk/core';\nimport {\n  FOR_SCROLL_AREA_CONTEXT,\n  type ForScrollAreaContext,\n  type ForScrollAreaTrackPress,\n  type ForScrollAreaType,\n} from './scroll-area-context';\nimport { FOR_SCROLL_AREA_DEFAULTS } from './scroll-area-defaults';\n\n/**\n * Root of the custom-scrollbar primitive. Owns the viewport reference,\n * scroll geometry signals, and visibility state for the synthetic\n * scrollbars.\n *\n * Native scrollbars on the inner viewport are hidden via styles injected\n * by `[forScrollAreaViewport]` (the only place in forty-cdk that\n * imperatively touches CSS); the consumer styles `[forScrollAreaThumb]`\n * however they like.\n *\n * @example\n * ```html\n * <div forScrollArea>\n *   <div forScrollAreaViewport>\n *     <div forScrollAreaContent>… long content …</div>\n *   </div>\n *   <div forScrollAreaScrollbar orientation=\"vertical\">\n *     <div forScrollAreaThumb></div>\n *   </div>\n *   <div forScrollAreaScrollbar orientation=\"horizontal\">\n *     <div forScrollAreaThumb></div>\n *   </div>\n *   <div forScrollAreaCorner></div>\n * </div>\n * ```\n */\n@Directive({\n  selector: '[forScrollArea]',\n  exportAs: 'forScrollArea',\n  host: {\n    '[attr.data-type]': 'type()',\n    '[attr.dir]': 'dir()',\n    '(pointerenter)': 'onPointerEnter()',\n    '(pointerleave)': 'onPointerLeave()',\n  },\n  providers: [{ provide: FOR_SCROLL_AREA_CONTEXT, useExisting: ForScrollArea }],\n})\nexport class ForScrollArea implements ForScrollAreaContext {\n  readonly #defaults = inject(FOR_SCROLL_AREA_DEFAULTS);\n\n  /**\n   * When the synthetic scrollbars are visible:\n   * - `auto`: shown whenever the axis overflows, regardless of interaction;\n   *   self-hides when the content fits.\n   * - `always`: the scrollbar (and corner) stay mounted and\n   *   `data-state=\"visible\"` regardless of overflow — a stable, always-painted\n   *   track. When the axis does not overflow the thumb fills\n   *   the full track and dragging is a no-op. The library is headless and does\n   *   not own layout, so to actually *reserve* the gutter (no content shift\n   *   when crossing the overflow boundary) the consumer lays the scrollbar out\n   *   in flow — see the ScrollArea README's grid example.\n   * - `scroll`: shown during scroll, faded after `scrollHideDelay` ms.\n   * - `hover`: shown while the cursor is over the area (and during scroll).\n   */\n  readonly type = input<ForScrollAreaType>('hover');\n\n  /**\n   * ms after the most recent scroll before scrollbars fade (only\n   * `type=\"scroll\"` and `\"hover\"`). The default is read from\n   * `provideForScrollAreaDefaults` for the surrounding scope.\n   */\n  readonly scrollHideDelay = input(this.#defaults.scrollHideDelay, {\n    transform: numberAttribute,\n  });\n\n  /**\n   * What a primary-button press on bare scrollbar track does:\n   * - `page`: step one page toward the press and auto-repeat while held,\n   *   stopping once the thumb reaches the pointer (platform behaviour).\n   * - `jump`: centre the thumb on the press point, then scrub while held.\n   * - `none`: the library ignores track presses, leaving the gesture to the\n   *   consumer (the scrollbar's `scrollToTrackPoint` / `pageBy` commands stay\n   *   available for a hand-rolled handler).\n   *\n   * A track press never moves focus. The default is read from\n   * `provideForScrollAreaDefaults` for the surrounding scope.\n   */\n  readonly trackPress = input<ForScrollAreaTrackPress>(this.#defaults.trackPress);\n\n  /**\n   * ms a held `trackPress=\"page\"` gesture waits before the first auto-repeat\n   * page step. The default is read from `provideForScrollAreaDefaults` for the\n   * surrounding scope.\n   */\n  readonly trackPressRepeatDelay = input(this.#defaults.trackPressRepeatDelay, {\n    transform: numberAttribute,\n  });\n\n  /**\n   * ms between auto-repeat page steps of a held `trackPress=\"page\"` gesture,\n   * once `trackPressRepeatDelay` has elapsed. The default is read from\n   * `provideForScrollAreaDefaults` for the surrounding scope.\n   */\n  readonly trackPressRepeatInterval = input(this.#defaults.trackPressRepeatInterval, {\n    transform: numberAttribute,\n  });\n\n  /**\n   * Writing direction. When unset (default `null`), the inherited ambient\n   * direction is resolved from the nearest ancestor carrying a `dir` attribute\n   * (or `<html dir>`), defaulting to `'ltr'`. An explicit `[dir]` always wins.\n   * The resolved value is reflected to the host `dir` attribute and positions\n   * the vertical scrollbar on the left in RTL.\n   */\n  readonly _dirInput = input<WritingDirection | null>(null, { alias: 'dir' });\n  readonly dir = injectTextDirection(this._dirInput);\n\n  readonly #viewport = signal<HTMLElement | null>(null);\n  readonly viewport = this.#viewport.asReadonly();\n\n  readonly #content = signal<HTMLElement | null>(null);\n  readonly content = this.#content.asReadonly();\n\n  readonly #scrollLeft = signal(0);\n  readonly #scrollTop = signal(0);\n  readonly scrollLeft = this.#scrollLeft.asReadonly();\n  readonly scrollTop = this.#scrollTop.asReadonly();\n\n  readonly #clientW = signal(0);\n  readonly #clientH = signal(0);\n  readonly #scrollW = signal(0);\n  readonly #scrollH = signal(0);\n  readonly clientWidth = this.#clientW.asReadonly();\n  readonly clientHeight = this.#clientH.asReadonly();\n  readonly scrollWidth = this.#scrollW.asReadonly();\n  readonly scrollHeight = this.#scrollH.asReadonly();\n\n  readonly #hovering = signal(false);\n  readonly hovering = this.#hovering.asReadonly();\n\n  readonly #scrolling = signal(false);\n  readonly scrolling = this.#scrolling.asReadonly();\n  #scrollTimer: ReturnType<typeof setTimeout> | null = null;\n\n  registerViewport(el: HTMLElement | null): void {\n    this.#viewport.set(el);\n  }\n\n  registerContent(el: HTMLElement): void {\n    this.#content.set(el);\n  }\n\n  unregisterContent(el: HTMLElement): void {\n    // Only clear if the unregistering element is the one we currently track,\n    // so a late teardown of an old content piece doesn't blow away a freshly\n    // registered replacement.\n    if (this.#content() === el) {\n      this.#content.set(null);\n    }\n  }\n\n  reportScroll(left: number, top: number): void {\n    this.#scrollLeft.set(left);\n    this.#scrollTop.set(top);\n  }\n\n  reportSize(clientW: number, clientH: number, scrollW: number, scrollH: number): void {\n    this.#clientW.set(clientW);\n    this.#clientH.set(clientH);\n    this.#scrollW.set(scrollW);\n    this.#scrollH.set(scrollH);\n  }\n\n  noteUserScroll(): void {\n    this.#scrolling.set(true);\n    if (this.#scrollTimer !== null) clearTimeout(this.#scrollTimer);\n    this.#scrollTimer = setTimeout(\n      () => {\n        this.#scrollTimer = null;\n        this.#scrolling.set(false);\n      },\n      Math.max(0, this.scrollHideDelay()),\n    );\n  }\n\n  protected onPointerEnter(): void {\n    this.#hovering.set(true);\n  }\n\n  protected onPointerLeave(): void {\n    this.#hovering.set(false);\n  }\n\n  constructor() {\n    inject(DestroyRef).onDestroy(() => {\n      if (this.#scrollTimer !== null) clearTimeout(this.#scrollTimer);\n    });\n  }\n}\n","import {\n  DOCUMENT,\n  PLATFORM_ID,\n  afterNextRender,\n  booleanAttribute,\n  DestroyRef,\n  Directive,\n  effect,\n  ElementRef,\n  inject,\n  input,\n} from '@angular/core';\nimport { isPlatformBrowser } from '@angular/common';\n\nimport { injectScrollAreaContext } from './scroll-area-context';\n\nconst HIDE_NATIVE_SCROLLBARS_STYLE_ID = 'for-scroll-area-hide-native';\nconst HIDE_NATIVE_SCROLLBARS_CSS = `\n  [forScrollAreaViewport] {\n    overflow: scroll;\n    -ms-overflow-style: none;\n    scrollbar-width: none;\n  }\n  [forScrollAreaViewport]::-webkit-scrollbar {\n    display: none;\n    width: 0;\n    height: 0;\n  }\n`;\n\nfunction injectHidingStylesOnce(doc: Document): void {\n  if (doc.getElementById(HIDE_NATIVE_SCROLLBARS_STYLE_ID)) return;\n  const style = doc.createElement('style');\n  style.id = HIDE_NATIVE_SCROLLBARS_STYLE_ID;\n  style.textContent = HIDE_NATIVE_SCROLLBARS_CSS;\n  doc.head.appendChild(style);\n}\n\n/**\n * The actually-scrolling element. Hides native scrollbars (the only place\n * in forty-cdk that ships CSS — see README), tracks scroll position, and\n * reports geometry to the root so the synthetic scrollbar can render.\n *\n * Focusable by default (`tabindex=\"0\"`) so a scroll area whose content has no\n * focusable children is still reachable and keyboard-scrollable — the browser\n * gives a focused overflow container native arrow / PageUp / PageDown / Home /\n * End / Space scrolling. Consumers whose content is already keyboard-focusable\n * can drop the extra tab stop with `[focusable]=\"false\"`.\n */\n@Directive({\n  selector: '[forScrollAreaViewport]',\n  exportAs: 'forScrollAreaViewport',\n  host: {\n    '[attr.tabindex]': 'focusable() ? 0 : null',\n    '(scroll)': 'onScroll()',\n  },\n})\nexport class ForScrollAreaViewport {\n  readonly #ctx = injectScrollAreaContext('ForScrollAreaViewport');\n\n  /**\n   * Whether the viewport is a keyboard tab stop. Defaults to `true`, emitting\n   * `tabindex=\"0\"` so the scroll container is focusable and gets native\n   * keyboard scrolling (arrows / PageUp / PageDown / Home / End / Space) even\n   * when its content holds no focusable elements. Set `false` to remove the\n   * extra tab stop when the projected content is already keyboard-focusable.\n   */\n  readonly focusable = input(true, { transform: booleanAttribute });\n  readonly #host = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n  readonly #document = inject(DOCUMENT);\n  readonly #isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n\n  constructor() {\n    if (this.#isBrowser) {\n      injectHidingStylesOnce(this.#document);\n    }\n    this.#ctx.registerViewport(this.#host);\n    inject(DestroyRef).onDestroy(() => this.#ctx.registerViewport(null));\n\n    afterNextRender(() => {\n      this.#syncScroll();\n      this.#syncSize();\n    });\n\n    // Track size changes via ResizeObserver — simpler / lighter than\n    // polling, and consistent with the rest of the library's reactive\n    // patterns. Browser-only API; no-op on server.\n    //\n    // The content element is observed only when the consumer explicitly\n    // marks it with `[forScrollAreaContent]`. Without that marker we skip\n    // content observation entirely (rather than guessing `firstElementChild`,\n    // which silently breaks on layered / multi-sibling layouts).\n    if (this.#isBrowser && typeof ResizeObserver !== 'undefined') {\n      const ro = new ResizeObserver(() => this.#syncSize());\n      ro.observe(this.#host);\n      inject(DestroyRef).onDestroy(() => ro.disconnect());\n\n      // Re-attach the observer whenever the registered content element\n      // changes (registers, unregisters, or swaps). `effect` is the right\n      // primitive here: this is a DOM imperative side effect, not derived\n      // state — see CLAUDE.md \"Never propagate state inside `effect()`\".\n      let observedContent: HTMLElement | null = null;\n      effect(() => {\n        const next = this.#ctx.content();\n        if (next === observedContent) return;\n        if (observedContent) ro.unobserve(observedContent);\n        if (next) ro.observe(next);\n        observedContent = next;\n      });\n    }\n  }\n\n  protected onScroll(): void {\n    this.#syncScroll();\n    this.#ctx.noteUserScroll();\n  }\n\n  #syncScroll(): void {\n    this.#ctx.reportScroll(this.#host.scrollLeft, this.#host.scrollTop);\n  }\n\n  #syncSize(): void {\n    this.#ctx.reportSize(\n      this.#host.clientWidth,\n      this.#host.clientHeight,\n      this.#host.scrollWidth,\n      this.#host.scrollHeight,\n    );\n    this.#syncScroll();\n  }\n}\n","import { DestroyRef, Directive, ElementRef, inject } from '@angular/core';\n\nimport { injectScrollAreaContext } from './scroll-area-context';\n\n/**\n * Marks the content element inside `[forScrollAreaViewport]`. The viewport\n * observes this element with a `ResizeObserver` so `scrollWidth` /\n * `scrollHeight` updates when content reflows.\n *\n * Required for the synthetic scrollbar to react to content resizes — without\n * it, the viewport falls back to no observation and scrollbars stay sized to\n * whatever the layout reported on first render.\n */\n@Directive({\n  selector: '[forScrollAreaContent]',\n  exportAs: 'forScrollAreaContent',\n})\nexport class ForScrollAreaContent {\n  readonly #ctx = injectScrollAreaContext('ForScrollAreaContent');\n  readonly #host = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n\n  constructor() {\n    this.#ctx.registerContent(this.#host);\n    inject(DestroyRef).onDestroy(() => this.#ctx.unregisterContent(this.#host));\n  }\n}\n","import { clamp } from 'forty-cdk/core';\n\n/**\n * Track geometry needed to map a press point to a scroll position, all in the\n * scrollbar's start-edge-origin (left / top) space.\n */\nexport interface TrackJumpGeometry {\n  /** Press offset from the track's start edge, in CSS pixels. */\n  readonly point: number;\n  /** Rendered thumb length along the track's axis, in CSS pixels. */\n  readonly thumbSize: number;\n  /** Travel available to the thumb (`trackLength - thumbSize`), never negative. */\n  readonly usableTrack: number;\n  /** Maximum scroll offset of the axis (`scrollSize - clientSize`), never negative. */\n  readonly maxScroll: number;\n}\n\n/** {@link TrackJumpGeometry} plus the state a repeating page step needs. */\nexport interface TrackPageGeometry extends TrackJumpGeometry {\n  /** Current (or intended) scroll position in the same start-edge-origin space. */\n  readonly position: number;\n  /** One page step in scroll pixels. */\n  readonly pageStep: number;\n}\n\n/** `-1` before the thumb, `1` after it, `0` inside the thumb band. */\nexport type TrackPressDirection = -1 | 0 | 1;\n\n/**\n * Which way a press at `point` sits relative to the thumb band\n * `[thumbOffset, thumbOffset + thumbSize]`.\n */\nexport function trackPressDirection(\n  point: number,\n  thumbOffset: number,\n  thumbSize: number,\n): TrackPressDirection {\n  if (point < thumbOffset) return -1;\n  if (point > thumbOffset + thumbSize) return 1;\n  return 0;\n}\n\n/**\n * Scroll position that centres the thumb on the press point, clamped into\n * `[0, maxScroll]`. Returns `null` when the axis cannot scroll or the thumb\n * fills the track, meaning \"nothing to do\".\n */\nexport function jumpPosition(g: TrackJumpGeometry): number | null {\n  if (g.usableTrack <= 0 || g.maxScroll <= 0) return null;\n  const offset = clamp(g.point - g.thumbSize / 2, 0, g.usableTrack);\n  return (offset / g.usableTrack) * g.maxScroll;\n}\n\n/**\n * Next scroll position for a one-page step in `direction`, never moving the\n * thumb past the press point: `limit` is the position at which the thumb's\n * leading edge lands exactly on the point. Returns `null` when the step would\n * not advance — the thumb already covers the point, or the axis cannot scroll —\n * so a repeating caller keeps its timer alive and resumes if the pointer moves\n * further.\n */\nexport function pagePosition(g: TrackPageGeometry, direction: -1 | 1): number | null {\n  if (g.usableTrack <= 0 || g.maxScroll <= 0) return null;\n  const perPx = g.maxScroll / g.usableTrack;\n  const limit = clamp((direction === 1 ? g.point - g.thumbSize : g.point) * perPx, 0, g.maxScroll);\n  const candidate = clamp(g.position + direction * g.pageStep, 0, g.maxScroll);\n  const next = direction === 1 ? Math.min(candidate, limit) : Math.max(candidate, limit);\n  if (direction === 1 ? next <= g.position : next >= g.position) return null;\n  return next;\n}\n","import {\n  computed,\n  DestroyRef,\n  DOCUMENT,\n  Directive,\n  ElementRef,\n  inject,\n  input,\n  signal,\n} from '@angular/core';\n\nimport { clamp, injectElementSize } from 'forty-cdk/core';\nimport { injectScrollAreaContext, type ForScrollbarOrientation } from './scroll-area-context';\nimport { jumpPosition, pagePosition, trackPressDirection } from './track-press';\n\nconst MIN_THUMB_SIZE = 8;\nconst MIN_PAGE_FRACTION = 0.875;\nconst MAX_PAGE_OVERLAP_PX = 40;\n\n/**\n * Synthetic scrollbar track. Reflects `data-orientation`, `data-state`\n * (`visible` / `hidden`), owns the track / thumb geometry the thumb renders\n * from, and handles a press on bare track (`trackPress` on the root).\n *\n * The element is fully removed (`hidden`) when the corresponding axis has\n * no overflow *and* `type` is not `'always'` — there is no scrollbar to\n * render. Under `type=\"always\"` the track stays painted regardless of\n * overflow, so the consumer's reserved gutter is never empty.\n * Visibility is enforced with an inline `display: none` (which beats any\n * author `display` rule a consumer applies via a class) in addition to the\n * `hidden` attribute that removes it from the a11y tree.\n */\n@Directive({\n  selector: '[forScrollAreaScrollbar]',\n  exportAs: 'forScrollAreaScrollbar',\n  host: {\n    '[attr.data-orientation]': 'orientation()',\n    '[attr.data-state]': 'state()',\n    '[hidden]': '!painted()',\n    '[style.display]': 'painted() ? null : \"none\"',\n    '(pointerdown)': 'onTrackPointerDown($event)',\n    '(lostpointercapture)': 'onLostPointerCapture()',\n  },\n})\nexport class ForScrollAreaScrollbar {\n  /**\n   * Axis this scrollbar controls.\n   */\n  readonly orientation = input.required<ForScrollbarOrientation>();\n  readonly ctx = injectScrollAreaContext('ForScrollAreaScrollbar');\n  readonly host = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n  readonly #document = inject(DOCUMENT);\n\n  /**\n   * Reactive size of the track itself, measured independently of the viewport.\n   * The thumb's size and travel are computed against the *track* length, which\n   * the consumer is free to lay out shorter than the viewport (e.g. insets, a\n   * reserved corner, padding), so the viewport's reported client dimensions are\n   * not a substitute — the track must be observed directly.\n   *\n   * The target is a constant (`this.host` never changes), so `injectElementSize`'s\n   * target-swap branch is dead weight here; it is reused only for its\n   * `ResizeObserver` plumbing and change-deduped emission.\n   */\n  readonly #hostRef = signal<HTMLElement | null>(this.host);\n  readonly size = injectElementSize(this.#hostRef);\n\n  /** Track length along this scrollbar's axis, in CSS pixels. */\n  readonly trackLength = computed<number>(() => {\n    const size = this.size();\n    if (!size) return 0;\n    return this.orientation() === 'horizontal' ? size.width : size.height;\n  });\n\n  /**\n   * Maximum scroll offset of this axis (`scrollSize - clientSize`), floored at\n   * `0`. Epsilon-free — unlike `hasOverflow`, which keeps a 1px\n   * threshold because it gates the track's self-removal.\n   */\n  readonly maxScroll = computed<number>(() => {\n    const ctx = this.ctx;\n    const max =\n      this.orientation() === 'horizontal'\n        ? ctx.scrollWidth() - ctx.clientWidth()\n        : ctx.scrollHeight() - ctx.clientHeight();\n    return Math.max(0, max);\n  });\n\n  readonly #ratio = computed<number>(() => {\n    const ctx = this.ctx;\n    if (this.orientation() === 'horizontal') {\n      const sw = ctx.scrollWidth();\n      if (sw <= 0) return 0;\n      return Math.min(1, ctx.clientWidth() / sw);\n    }\n    const sh = ctx.scrollHeight();\n    if (sh <= 0) return 0;\n    return Math.min(1, ctx.clientHeight() / sh);\n  });\n\n  /**\n   * Rendered thumb length in CSS pixels — the viewport / content ratio applied\n   * to the track, floored at a `8px` minimum so a very long content still\n   * leaves a grabbable thumb.\n   */\n  readonly thumbSize = computed<number>(() => {\n    const tl = this.trackLength();\n    const r = this.#ratio();\n    if (tl === 0 || r === 0) return 0;\n    return Math.max(MIN_THUMB_SIZE, Math.floor(tl * r));\n  });\n\n  /** Travel available to the thumb along the track, floored at `0`. */\n  readonly usableTrack = computed<number>(() => Math.max(0, this.trackLength() - this.thumbSize()));\n\n  /**\n   * Scroll offset of this axis normalised to a start-edge-origin (left / top)\n   * value in `[0, maxScroll]`.\n   *\n   * On the vertical axis this is just `scrollTop`. On the horizontal axis, LTR\n   * `scrollLeft` is already left-origin, but in RTL the browser reports\n   * `scrollLeft` in the negative model (`0` at rest with the content's right\n   * edge flush, `-maxScroll` when scrolled fully left), so a left-origin\n   * position is `scrollLeft + maxScroll` — `maxScroll` at rest (thumb pinned to\n   * the right) down to `0` when scrolled forward. Every other geometry member\n   * (and `scrollToPosition`) works in this one space, so RTL is absorbed here\n   * and nowhere else.\n   */\n  readonly scrollPosition = computed<number>(() => {\n    if (this.orientation() === 'vertical') return this.ctx.scrollTop();\n    const max = this.maxScroll();\n    return this.ctx.dir() === 'rtl' ? this.ctx.scrollLeft() + max : this.ctx.scrollLeft();\n  });\n\n  /**\n   * Thumb offset from the track's start edge in CSS pixels, in the same\n   * start-edge-origin space as `scrollPosition` (so in RTL the thumb rests at\n   * `usableTrack`, flush with the track's right edge).\n   */\n  readonly thumbOffset = computed<number>(() => {\n    const max = this.maxScroll();\n    if (max <= 0) return 0;\n    return (this.scrollPosition() / max) * this.usableTrack() || 0;\n  });\n\n  /**\n   * One page step in scroll pixels — `max(client * 0.875, client - 40, 1)`,\n   * mirroring the platform's page step so a paged track press keeps a sliver of\n   * the previous page in view instead of stepping a full viewport.\n   */\n  readonly pageStep = computed<number>(() => {\n    const client =\n      this.orientation() === 'horizontal' ? this.ctx.clientWidth() : this.ctx.clientHeight();\n    return Math.max(client * MIN_PAGE_FRACTION, client - MAX_PAGE_OVERLAP_PX, 1);\n  });\n\n  readonly #dragging = signal(false);\n  /** True while the thumb is being dragged. Pins the track visible / painted. */\n  readonly dragging = this.#dragging.asReadonly();\n\n  readonly #pressing = signal(false);\n  /** True while a track press is in flight. Pins the track visible / painted. */\n  readonly pressing = this.#pressing.asReadonly();\n\n  readonly #thumb = signal<HTMLElement | null>(null);\n  /** The registered `[forScrollAreaThumb]` element, when one is mounted. */\n  readonly thumb = this.#thumb.asReadonly();\n\n  #pressPoint = 0;\n  #pressDirection: -1 | 1 | null = null;\n  #pressTarget = 0;\n  #pressPointerId: number | null = null;\n  #repeatTimer: ReturnType<typeof setTimeout> | null = null;\n  #gesture: AbortController | null = null;\n\n  constructor() {\n    inject(DestroyRef).onDestroy(() => this.#endPress());\n  }\n\n  /**\n   * Marks the track as actively dragged so an in-flight drag is never aborted\n   * by the scrollbar self-hiding (`type=\"hover\"` / `\"scroll\"` fading the track,\n   * or a consumer `display:none` on `data-state=\"hidden\"`). Called by the thumb\n   * on pointer-down / drag-end.\n   */\n  setDragging(dragging: boolean): void {\n    this.#dragging.set(dragging);\n  }\n\n  /**\n   * Registers the thumb element so the track handler can tell a press that\n   * originated on the thumb (the thumb owns that gesture) from a bare-track\n   * press. Called by `[forScrollAreaThumb]` on construction.\n   */\n  registerThumb(el: HTMLElement): void {\n    this.#thumb.set(el);\n  }\n\n  /**\n   * Clears the registered thumb, guarded on identity so a late teardown of an\n   * old thumb doesn't blow away a freshly registered replacement.\n   */\n  unregisterThumb(el: HTMLElement): void {\n    if (this.#thumb() === el) {\n      this.#thumb.set(null);\n    }\n  }\n\n  readonly hasOverflow = computed<boolean>(() => {\n    if (this.orientation() === 'horizontal') {\n      return this.ctx.scrollWidth() - this.ctx.clientWidth() > 1;\n    }\n    return this.ctx.scrollHeight() - this.ctx.clientHeight() > 1;\n  });\n\n  /**\n   * Whether the track is rendered at all. `'always'` keeps it painted\n   * unconditionally (a stable, always-present track); every\n   * other `type` paints only the axis that actually overflows. An in-flight\n   * thumb drag or track press also pins it painted so the gesture is never\n   * aborted by the track self-removing. Gates both the `hidden` attribute and\n   * the inline `display: none` self-removal.\n   */\n  readonly painted = computed<boolean>(\n    () => this.dragging() || this.pressing() || this.ctx.type() === 'always' || this.hasOverflow(),\n  );\n\n  /**\n   * `'visible' | 'hidden'`. An in-flight thumb drag or track press forces\n   * `'visible'` so a consumer fade on `data-state=\"hidden\"` can't hide the\n   * track mid-gesture. Otherwise: `'always'` resolves to `'visible'` regardless\n   * of overflow — the track is permanently present. `'auto'` shows whenever the\n   * axis overflows; `'hover'` / `'scroll'` additionally gate on the interaction\n   * signals. A non-overflowing axis is `'hidden'` for every mode except\n   * `'always'`.\n   */\n  readonly state = computed<'visible' | 'hidden'>(() => {\n    if (this.dragging() || this.pressing()) return 'visible';\n    switch (this.ctx.type()) {\n      case 'always':\n        return 'visible';\n      case 'auto':\n        return this.hasOverflow() ? 'visible' : 'hidden';\n      case 'hover':\n        return this.hasOverflow() && (this.ctx.hovering() || this.ctx.scrolling())\n          ? 'visible'\n          : 'hidden';\n      case 'scroll':\n        return this.hasOverflow() && this.ctx.scrolling() ? 'visible' : 'hidden';\n    }\n  });\n\n  /**\n   * Scrolls the viewport so this axis rests at `position`, given in the\n   * start-edge-origin space of `scrollPosition` and clamped into\n   * `[0, maxScroll]`. RTL's negative `scrollLeft` model is applied here.\n   *\n   * Writes plain `scrollLeft` / `scrollTop` — the library ships no\n   * `behavior: 'smooth'`, so motion (and its `prefers-reduced-motion` gate) is\n   * the consumer's `scroll-behavior` on `[forScrollAreaViewport]`.\n   */\n  scrollToPosition(position: number): void {\n    const viewport = this.ctx.viewport();\n    if (!viewport) return;\n    const max = this.maxScroll();\n    if (max <= 0) return;\n    const next = clamp(position, 0, max);\n    if (this.orientation() === 'vertical') {\n      viewport.scrollTop = next;\n      return;\n    }\n    viewport.scrollLeft = this.ctx.dir() === 'rtl' ? next - max : next;\n  }\n\n  /**\n   * Offset of a pointer event from the track's start edge along this axis, in\n   * CSS pixels. The horizontal reading is measured from `rect.left` in **both**\n   * writing directions, because `thumbOffset` is left-origin in RTL too — RTL\n   * is absorbed once, in `scrollPosition` / `scrollToPosition`.\n   */\n  trackPointFromEvent(event: PointerEvent): number {\n    const rect = this.host.getBoundingClientRect();\n    return this.orientation() === 'horizontal'\n      ? event.clientX - rect.left\n      : event.clientY - rect.top;\n  }\n\n  /**\n   * Scrolls so the thumb is centred on `trackPx` (an offset from the track's\n   * start edge). A no-op when the axis cannot scroll or the thumb fills the\n   * track.\n   */\n  scrollToTrackPoint(trackPx: number): void {\n    const next = jumpPosition({\n      point: trackPx,\n      thumbSize: this.thumbSize(),\n      usableTrack: this.usableTrack(),\n      maxScroll: this.maxScroll(),\n    });\n    if (next === null) return;\n    this.scrollToPosition(next);\n  }\n\n  /**\n   * Steps the viewport one `pageStep` forward (`1`) or backward (`-1`) along\n   * this axis, clamped to the scroll range. A no-op when the axis cannot scroll\n   * or is already at that end.\n   */\n  pageBy(direction: -1 | 1): void {\n    const next = pagePosition(\n      {\n        point: direction === 1 ? this.trackLength() : 0,\n        thumbSize: this.thumbSize(),\n        usableTrack: this.usableTrack(),\n        maxScroll: this.maxScroll(),\n        position: this.scrollPosition(),\n        pageStep: this.pageStep(),\n      },\n      direction,\n    );\n    if (next === null) return;\n    this.scrollToPosition(next);\n  }\n\n  protected onTrackPointerDown(event: PointerEvent): void {\n    if ((event.pointerType === 'mouse' && event.button !== 0) || event.defaultPrevented) return;\n    const mode = this.ctx.trackPress();\n    if (mode === 'none') return;\n    const thumb = this.thumb();\n    if (thumb && thumb.contains(event.target as Node)) return;\n    event.preventDefault();\n    const point = this.trackPointFromEvent(event);\n    if (mode === 'jump') {\n      this.#beginPress(event, point, null);\n      this.scrollToTrackPoint(point);\n      return;\n    }\n    const direction = trackPressDirection(point, this.thumbOffset(), this.thumbSize());\n    if (direction === 0) return;\n    this.#beginPress(event, point, direction);\n    this.#pressTarget = this.scrollPosition();\n    this.#pageOnce();\n    this.#scheduleRepeat(this.ctx.trackPressRepeatDelay());\n  }\n\n  protected onLostPointerCapture(): void {\n    this.#endPress();\n  }\n\n  #beginPress(event: PointerEvent, point: number, direction: -1 | 1 | null): void {\n    this.#pressPoint = point;\n    this.#pressDirection = direction;\n    this.#pressing.set(true);\n    this.#pressPointerId = event.pointerId;\n    this.host.setPointerCapture(event.pointerId);\n    // Listen on the owner document, not the track element: pointer capture is\n    // set on the track (so the gesture stays bound to this pointer), but the\n    // captured node can be removed mid-gesture when the scrollbar self-hides\n    // (`type=\"hover\"` / `\"scroll\"`). Document-level listeners keep firing after\n    // that removal, so the gesture is not silently aborted.\n    this.#gesture = new AbortController();\n    const options = { signal: this.#gesture.signal };\n    const doc = this.#document;\n    doc.addEventListener('pointermove', this.#onPressMove, options);\n    doc.addEventListener('pointerup', this.#onPressUp, options);\n    doc.addEventListener('pointercancel', this.#onPressUp, options);\n  }\n\n  readonly #onPressMove = (event: PointerEvent): void => {\n    if (!this.#pressing()) return;\n    const point = this.trackPointFromEvent(event);\n    this.#pressPoint = point;\n    if (this.#pressDirection === null) {\n      this.scrollToTrackPoint(point);\n    }\n  };\n\n  readonly #onPressUp = (): void => {\n    this.#endPress();\n  };\n\n  #pageOnce(): void {\n    if (this.#pressDirection === null) return;\n    const next = pagePosition(\n      {\n        point: this.#pressPoint,\n        thumbSize: this.thumbSize(),\n        usableTrack: this.usableTrack(),\n        maxScroll: this.maxScroll(),\n        position: this.#pressTarget,\n        pageStep: this.pageStep(),\n      },\n      this.#pressDirection,\n    );\n    if (next === null) return;\n    this.#pressTarget = next;\n    this.scrollToPosition(next);\n  }\n\n  #scheduleRepeat(delay: number): void {\n    if (this.#repeatTimer !== null) clearTimeout(this.#repeatTimer);\n    this.#repeatTimer = setTimeout(\n      () => {\n        this.#repeatTimer = null;\n        if (!this.#pressing()) return;\n        this.#pageOnce();\n        this.#scheduleRepeat(Math.max(0, this.ctx.trackPressRepeatInterval()));\n      },\n      Math.max(0, delay),\n    );\n  }\n\n  #endPress(): void {\n    if (this.#repeatTimer !== null) {\n      clearTimeout(this.#repeatTimer);\n      this.#repeatTimer = null;\n    }\n    this.#pressing.set(false);\n    this.#pressDirection = null;\n    this.#gesture?.abort();\n    this.#gesture = null;\n    const pointerId = this.#pressPointerId;\n    this.#pressPointerId = null;\n    if (pointerId !== null && this.host.hasPointerCapture(pointerId)) {\n      this.host.releasePointerCapture(pointerId);\n    }\n  }\n}\n","import { DestroyRef, DOCUMENT, Directive, ElementRef, inject, signal } from '@angular/core';\n\nimport { orphanContextError } from 'forty-cdk/core';\nimport { ForScrollAreaScrollbar } from './scroll-area-scrollbar';\n\nfunction injectRequiredScrollbar(): ForScrollAreaScrollbar {\n  const scrollbar = inject(ForScrollAreaScrollbar, { optional: true });\n  if (!scrollbar) {\n    throw orphanContextError({\n      code: 'FORCDK-SCROLL-AREA-002',\n      piece: 'ForScrollAreaThumb',\n      root: '[forScrollAreaScrollbar]',\n      token: 'ForScrollAreaScrollbar',\n    });\n  }\n  return scrollbar;\n}\n\n/**\n * The draggable thumb inside a `[forScrollAreaScrollbar]`. Sizes itself\n * proportionally to viewport / content and translates along the track\n * based on `scrollLeft` / `scrollTop`. Pointer-drag scrolls the viewport\n * proportionally.\n */\n@Directive({\n  selector: '[forScrollAreaThumb]',\n  exportAs: 'forScrollAreaThumb',\n  host: {\n    '[style.position]': '\"absolute\"',\n    '[style.width.px]': 'widthPx()',\n    '[style.height.px]': 'heightPx()',\n    '[style.left.px]': 'leftPx()',\n    '[style.top.px]': 'topPx()',\n    '[style.transform]': 'transformValue()',\n    '[attr.data-orientation]': 'scrollbar.orientation()',\n    '[attr.data-state]': 'scrollbar.state()',\n    '(pointerdown)': 'onPointerDown($event)',\n    '(lostpointercapture)': 'onLostPointerCapture()',\n  },\n})\nexport class ForScrollAreaThumb {\n  readonly scrollbar = injectRequiredScrollbar();\n  readonly #host = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n  readonly #document = inject(DOCUMENT);\n\n  readonly #dragging = signal(false);\n  #dragStartPointer = 0;\n  #dragStartPosition = 0;\n  #gesture: AbortController | null = null;\n\n  constructor() {\n    this.scrollbar.registerThumb(this.#host);\n    inject(DestroyRef).onDestroy(() => {\n      this.scrollbar.unregisterThumb(this.#host);\n      this.#endDrag();\n    });\n  }\n\n  protected widthPx(): number | null {\n    return this.scrollbar.orientation() === 'horizontal' ? this.scrollbar.thumbSize() : null;\n  }\n  protected heightPx(): number | null {\n    return this.scrollbar.orientation() === 'vertical' ? this.scrollbar.thumbSize() : null;\n  }\n  protected leftPx(): number | null {\n    return this.scrollbar.orientation() === 'horizontal' ? 0 : null;\n  }\n  protected topPx(): number | null {\n    return this.scrollbar.orientation() === 'vertical' ? 0 : null;\n  }\n  protected transformValue(): string {\n    if (this.scrollbar.orientation() === 'horizontal') {\n      return `translateX(${this.scrollbar.thumbOffset()}px)`;\n    }\n    return `translateY(${this.scrollbar.thumbOffset()}px)`;\n  }\n\n  protected onPointerDown(event: PointerEvent): void {\n    if (event.pointerType === 'mouse' && event.button !== 0) return;\n    event.preventDefault();\n    this.#dragging.set(true);\n    this.scrollbar.setDragging(true);\n    this.#host.setPointerCapture(event.pointerId);\n    this.#dragStartPointer =\n      this.scrollbar.orientation() === 'horizontal' ? event.clientX : event.clientY;\n    this.#dragStartPosition = this.scrollbar.scrollPosition();\n    // Listen on the owner document, not the thumb element: pointer capture is\n    // set on the thumb (so the gesture stays bound to this pointer), but the\n    // captured node can be removed mid-drag when the scrollbar self-hides\n    // (`type=\"hover\"` / `\"scroll\"`). Document-level listeners keep firing after\n    // that removal, so the drag is not silently aborted. `lostpointercapture`\n    // tears the gesture down if capture is otherwise lost.\n    this.#gesture = new AbortController();\n    const options = { signal: this.#gesture.signal };\n    const doc = this.#document;\n    doc.addEventListener('pointermove', this.#onPointerMove, options);\n    doc.addEventListener('pointerup', this.#onPointerUp, options);\n    doc.addEventListener('pointercancel', this.#onPointerUp, options);\n  }\n\n  protected onLostPointerCapture(): void {\n    this.#endDrag();\n  }\n\n  readonly #onPointerMove = (event: PointerEvent): void => {\n    if (!this.#dragging()) return;\n    const usable = this.scrollbar.usableTrack();\n    if (usable <= 0) return;\n    const delta =\n      this.scrollbar.orientation() === 'horizontal'\n        ? event.clientX - this.#dragStartPointer\n        : event.clientY - this.#dragStartPointer;\n    this.scrollbar.scrollToPosition(\n      this.#dragStartPosition + (delta / usable) * this.scrollbar.maxScroll(),\n    );\n  };\n\n  readonly #onPointerUp = (event: PointerEvent): void => {\n    this.#endDrag();\n    if (this.#host.hasPointerCapture(event.pointerId)) {\n      this.#host.releasePointerCapture(event.pointerId);\n    }\n  };\n\n  #endDrag(): void {\n    this.#dragging.set(false);\n    this.scrollbar.setDragging(false);\n    this.#gesture?.abort();\n    this.#gesture = null;\n  }\n}\n","import { computed, Directive } from '@angular/core';\n\nimport { injectScrollAreaContext } from './scroll-area-context';\n\n/**\n * Filler in the corner where horizontal and vertical scrollbars meet.\n * Shown when both axes overflow, or unconditionally under `type=\"always\"`\n * (both tracks are permanently present then). Visibility is enforced with an\n * inline `display: none` (which beats any author `display` rule a consumer\n * applies via a class) in addition to the `hidden` attribute that removes it\n * from the a11y tree.\n */\n@Directive({\n  selector: '[forScrollAreaCorner]',\n  exportAs: 'forScrollAreaCorner',\n  host: {\n    '[hidden]': '!visible()',\n    '[style.display]': 'visible() ? null : \"none\"',\n  },\n})\nexport class ForScrollAreaCorner {\n  protected readonly ctx = injectScrollAreaContext('ForScrollAreaCorner');\n\n  protected readonly visible = computed<boolean>(() => {\n    if (this.ctx.type() === 'always') return true;\n    const hOverflow = this.ctx.scrollWidth() - this.ctx.clientWidth() > 1;\n    const vOverflow = this.ctx.scrollHeight() - this.ctx.clientHeight() > 1;\n    return hOverflow && vOverflow;\n  });\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;MAsDa,uBAAuB,GAAG,IAAI,cAAc,CACvD,yBAAyB;AAGrB,SAAU,uBAAuB,CAAC,KAAa,EAAA;AACnD,IAAA,MAAM,GAAG,GAAG,MAAM,CAAC,uBAAuB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IAC/D,IAAI,CAAC,GAAG,EAAE;AACR,QAAA,MAAM,kBAAkB,CAAC;AACvB,YAAA,IAAI,EAAE,wBAAwB;YAC9B,KAAK;AACL,YAAA,IAAI,EAAE,iBAAiB;AACvB,YAAA,KAAK,EAAE,yBAAyB;AACjC,SAAA,CAAC;IACJ;AACA,IAAA,OAAO,GAAG;AACZ;;AC/BA;;;;AAIG;AACI,MAAM,iCAAiC,GAA0B;AACtE,IAAA,eAAe,EAAE,GAAG;AACpB,IAAA,UAAU,EAAE,MAAM;AAClB,IAAA,qBAAqB,EAAE,GAAG;AAC1B,IAAA,wBAAwB,EAAE,EAAE;CAC7B;AAED,MAAM,EAAE,KAAK,EAAE,eAAe,EAAE,GAAG,cAAc,CAC/C,0BAA0B,EAC1B,iCAAiC,CAClC;AAED;AACO,MAAM,wBAAwB,GAAG;AAExC;;;;AAIG;AACG,SAAU,4BAA4B,CAC1C,QAAA,GAA2C,EAAE,EAAA;AAE7C,IAAA,OAAO,eAAe,CAAC,QAAQ,CAAC;AAClC;;ACxDA;;;;;;;;;;;;;;;;;;;;;;;;;AAyBG;MAYU,aAAa,CAAA;AACf,IAAA,SAAS,GAAG,MAAM,CAAC,wBAAwB,CAAC;AAErD;;;;;;;;;;;;;AAaG;IACM,IAAI,GAAG,KAAK,CA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