@toolbox-web/grid 1.27.1 → 1.28.0

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.
Files changed (73) hide show
  1. package/all.d.ts +1 -0
  2. package/all.js +2 -2
  3. package/all.js.map +1 -1
  4. package/index.js +1 -1
  5. package/index.js.map +1 -1
  6. package/lib/core/types.d.ts +0 -2
  7. package/lib/features/tooltip.d.ts +7 -0
  8. package/lib/features/tooltip.js +2 -0
  9. package/lib/features/tooltip.js.map +1 -0
  10. package/lib/plugins/clipboard/index.js +1 -1
  11. package/lib/plugins/clipboard/index.js.map +1 -1
  12. package/lib/plugins/column-virtualization/index.js +1 -1
  13. package/lib/plugins/column-virtualization/index.js.map +1 -1
  14. package/lib/plugins/context-menu/index.js +1 -1
  15. package/lib/plugins/context-menu/index.js.map +1 -1
  16. package/lib/plugins/editing/index.js +1 -1
  17. package/lib/plugins/editing/index.js.map +1 -1
  18. package/lib/plugins/editing/types.d.ts +2 -0
  19. package/lib/plugins/export/index.js +1 -1
  20. package/lib/plugins/export/index.js.map +1 -1
  21. package/lib/plugins/filtering/FilteringPlugin.d.ts +27 -1
  22. package/lib/plugins/filtering/index.d.ts +1 -1
  23. package/lib/plugins/filtering/index.js +1 -1
  24. package/lib/plugins/filtering/index.js.map +1 -1
  25. package/lib/plugins/filtering/types.d.ts +7 -0
  26. package/lib/plugins/grouping-columns/index.js +1 -1
  27. package/lib/plugins/grouping-columns/index.js.map +1 -1
  28. package/lib/plugins/grouping-rows/index.js +2 -2
  29. package/lib/plugins/grouping-rows/index.js.map +1 -1
  30. package/lib/plugins/master-detail/index.js +1 -1
  31. package/lib/plugins/master-detail/index.js.map +1 -1
  32. package/lib/plugins/multi-sort/index.js +1 -1
  33. package/lib/plugins/multi-sort/index.js.map +1 -1
  34. package/lib/plugins/pinned-columns/index.js +1 -1
  35. package/lib/plugins/pinned-columns/index.js.map +1 -1
  36. package/lib/plugins/pinned-rows/index.js +1 -1
  37. package/lib/plugins/pinned-rows/index.js.map +1 -1
  38. package/lib/plugins/pivot/index.js +1 -1
  39. package/lib/plugins/pivot/index.js.map +1 -1
  40. package/lib/plugins/print/index.js +1 -1
  41. package/lib/plugins/print/index.js.map +1 -1
  42. package/lib/plugins/reorder-columns/index.js +1 -1
  43. package/lib/plugins/reorder-columns/index.js.map +1 -1
  44. package/lib/plugins/reorder-rows/index.js +1 -1
  45. package/lib/plugins/reorder-rows/index.js.map +1 -1
  46. package/lib/plugins/responsive/index.js +1 -1
  47. package/lib/plugins/responsive/index.js.map +1 -1
  48. package/lib/plugins/selection/index.js +1 -1
  49. package/lib/plugins/selection/index.js.map +1 -1
  50. package/lib/plugins/server-side/index.js +1 -1
  51. package/lib/plugins/server-side/index.js.map +1 -1
  52. package/lib/plugins/tooltip/TooltipPlugin.d.ts +52 -0
  53. package/lib/plugins/tooltip/index.d.ts +8 -0
  54. package/lib/plugins/tooltip/index.js +2 -0
  55. package/lib/plugins/tooltip/index.js.map +1 -0
  56. package/lib/plugins/tooltip/types.d.ts +78 -0
  57. package/lib/plugins/tree/index.js +1 -1
  58. package/lib/plugins/tree/index.js.map +1 -1
  59. package/lib/plugins/undo-redo/index.js +1 -1
  60. package/lib/plugins/undo-redo/index.js.map +1 -1
  61. package/lib/plugins/visibility/index.js +1 -1
  62. package/lib/plugins/visibility/index.js.map +1 -1
  63. package/package.json +1 -1
  64. package/umd/grid.all.umd.js +1 -1
  65. package/umd/grid.all.umd.js.map +1 -1
  66. package/umd/grid.umd.js +1 -1
  67. package/umd/grid.umd.js.map +1 -1
  68. package/umd/plugins/context-menu.umd.js +1 -1
  69. package/umd/plugins/context-menu.umd.js.map +1 -1
  70. package/umd/plugins/filtering.umd.js +1 -1
  71. package/umd/plugins/filtering.umd.js.map +1 -1
  72. package/umd/plugins/tooltip.umd.js +2 -0
  73. package/umd/plugins/tooltip.umd.js.map +1 -0
@@ -0,0 +1,2 @@
1
+ !function(t,o){"object"==typeof exports&&"undefined"!=typeof module?o(exports,require("../../core/plugin/base-plugin")):"function"==typeof define&&define.amd?define(["exports","../../core/plugin/base-plugin"],o):o((t="undefined"!=typeof globalThis?globalThis:t||self).TbwGridPlugin_tooltip={},t.TbwGrid)}(this,function(t,o){"use strict";function e(t){return t.scrollWidth>t.clientWidth}function r(){return"function"==typeof HTMLElement.prototype?.showPopover}class i extends o.BaseGridPlugin{name="tooltip";styles='@layer tbw-plugins{.tbw-tooltip-popover{margin:0;padding:var(--tbw-tooltip-padding, var(--tbw-spacing-sm, .375rem) var(--tbw-spacing-md, .5rem));background:var(--tbw-tooltip-bg, light-dark(#333338, #484850));color:var(--tbw-tooltip-fg, light-dark(#f5f5f5, #f0f0f0));border:1px solid var(--tbw-tooltip-border, light-dark(#222226, #6a6a72));border-radius:var(--tbw-tooltip-radius, var(--tbw-border-radius, .25rem));box-shadow:none;filter:var(--tbw-tooltip-shadow, drop-shadow(0 4px 4px rgba(0, 0, 0, .45)));font-family:var(--tbw-font-family, system-ui, sans-serif);font-size:var(--tbw-tooltip-font-size, var(--tbw-font-size-sm, .9285em));max-width:var(--tbw-tooltip-max-width, 300px);white-space:pre-line;word-wrap:break-word;overflow-wrap:break-word;pointer-events:none;z-index:10001}.tbw-tooltip-popover:after{content:"";position:absolute;width:var(--tbw-tooltip-arrow-size, 14px);height:var(--tbw-tooltip-arrow-size, 14px);left:var(--tbw-tooltip-arrow-offset, 16px);background:inherit;pointer-events:none}.tbw-tooltip-popover:not(.tbw-tooltip-above):after{top:calc(var(--tbw-tooltip-arrow-size, 14px) / -2);transform:rotate(45deg);border-top:1px solid var(--tbw-tooltip-border, light-dark(#222226, #6a6a72));border-left:1px solid var(--tbw-tooltip-border, light-dark(#222226, #6a6a72))}.tbw-tooltip-popover.tbw-tooltip-above:after{bottom:calc(var(--tbw-tooltip-arrow-size, 14px) / -2);transform:rotate(45deg);border-bottom:1px solid var(--tbw-tooltip-border, light-dark(#222226, #6a6a72));border-right:1px solid var(--tbw-tooltip-border, light-dark(#222226, #6a6a72))}@supports (anchor-name: --test){.tbw-tooltip-popover{position-anchor:--tbw-tooltip-anchor;top:calc(anchor(bottom) + 11px);left:anchor(left);position-try-fallbacks:--tbw-tooltip-flip-above}@position-try --tbw-tooltip-flip-above{top:auto;bottom:calc(anchor(top) + 11px)}}}';static manifest={ownedProperties:[{property:"cellTooltip",level:"column",description:'the "cellTooltip" column property'},{property:"headerTooltip",level:"column",description:'the "headerTooltip" column property'}],configRules:[]};#t=null;#o=null;#e=!1;get#r(){return!1!==this.config.header}get#i(){return!1!==this.config.cell}attach(t){super.attach(t)}detach(){this.#l(),this.#t?.remove(),this.#t=null,this.#e=!1,super.detach()}afterRender(){this.#n(),this.#s()}#n(){if(this.#t)return;const t=document.createElement("div");t.className="tbw-tooltip-popover",t.setAttribute("popover","hint"),t.style.overflow="visible",t.style.margin="0",document.body.appendChild(t),this.#t=t}#p(t,o){if(this.#t){if(this.#a(),t.style.setProperty("anchor-name","--tbw-tooltip-anchor"),this.#o=t,this.#t.textContent=o,r())try{this.#t.showPopover()}catch{}"undefined"!=typeof CSS&&!0===CSS.supports?.("anchor-name","--test")?requestAnimationFrame(()=>this.#d(t)):this.#c(t)}}#l(){if(this.#t){if(r())try{this.#t.hidePopover()}catch{}this.#t.classList.remove("tbw-tooltip-above")}this.#a()}#a(){this.#o&&(this.#o.style.removeProperty("anchor-name"),this.#o=null)}#c(t){if(!this.#t)return;const o=t.getBoundingClientRect();this.#t.style.position="fixed",this.#t.style.left=`${o.left}px`;window.innerHeight-o.bottom<80?(this.#t.style.top="",this.#t.style.bottom=window.innerHeight-o.top+11+"px",this.#t.classList.add("tbw-tooltip-above")):(this.#t.style.top=`${o.bottom+11}px`,this.#t.style.bottom="",this.#t.classList.remove("tbw-tooltip-above"))}#d(t){if(!this.#t)return;const o=t.getBoundingClientRect(),e=this.#t.getBoundingClientRect();this.#t.classList.toggle("tbw-tooltip-above",e.bottom<=o.top)}#s(){if(this.#e)return;const t=this.gridElement?.querySelector(".tbw-grid-root");t&&(this.#e=!0,t.addEventListener("mouseover",t=>this.#h(t),{signal:this.disconnectSignal}),t.addEventListener("mouseout",t=>this.#u(t),{signal:this.disconnectSignal}))}#h(t){const o=t.target;if(!o?.closest)return;const e=o.closest('[part~="header-cell"]');if(e&&this.#r)return void this.#b(e);const r=o.closest("[data-row][data-col]");r&&this.#i&&this.#f(r)}#u(t){const o=t.target;if(!o?.closest)return;const e=o.closest('[part~="header-cell"], [data-row][data-col]');if(!e)return;const r=t.relatedTarget;r&&e.contains(r)||this.#l()}#b(t){const o=parseInt(t.getAttribute("data-col")??"-1",10);if(o<0)return;const r=this.visibleColumns[o];if(!r)return;const i=function(t,o){const r=t.headerTooltip;if(!1===r)return null;if("string"==typeof r)return r;if("function"==typeof r)return r({column:t,value:t.header??t.field});const i=o.querySelector("span:first-child")??o;return e(i)&&i.textContent?.trim()||null}(r,t);i&&this.#p(t,i)}#f(t){const o=parseInt(t.getAttribute("data-row")??"-1",10),r=parseInt(t.getAttribute("data-col")??"-1",10);if(o<0||r<0)return;const i=this.visibleColumns[r];if(!i)return;const l=this.rows[o],n=l?.[i.field],s=function(t,o,r,i){const l=t.cellTooltip;if(!1===l)return null;if("string"==typeof l)return l;if("function"==typeof l)return l({value:i,row:r,column:t,field:t.field});return e(o)&&o.textContent?.trim()||null}(i,t,l,n);s&&this.#p(t,s)}}t.TooltipPlugin=i,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})});
2
+ //# sourceMappingURL=tooltip.umd.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tooltip.umd.js","sources":["../../../../../libs/grid/src/lib/plugins/tooltip/TooltipPlugin.ts"],"sourcesContent":["/**\n * Tooltip Plugin\n *\n * Shows styled popover tooltips on header and data cells when text\n * overflows (ellipsis). Uses the Popover API (`popover=\"hint\"`) with\n * CSS anchor positioning for consistent, themed placement.\n *\n * Supports per-column overrides via `cellTooltip` and `headerTooltip`\n * on column config.\n */\n\nimport type { GridElement, PluginManifest } from '../../core/plugin/base-plugin';\nimport { BaseGridPlugin } from '../../core/plugin/base-plugin';\nimport type { CellRenderContext, ColumnConfig, HeaderLabelContext } from '../../core/types';\nimport tooltipStyles from './tooltip.css?inline';\nimport type { TooltipConfig } from './types';\n\n// #region Helpers\n\n/** Check if an element's text content overflows its visible width. */\nfunction isOverflowing(el: HTMLElement): boolean {\n return el.scrollWidth > el.clientWidth;\n}\n\n/**\n * Resolve the tooltip text for a cell.\n * Returns the text to show, or `null` to suppress.\n */\nfunction resolveCellTooltip(column: ColumnConfig, cell: HTMLElement, row: unknown, value: unknown): string | null {\n const spec = column.cellTooltip;\n\n if (spec === false) return null;\n if (typeof spec === 'string') return spec;\n if (typeof spec === 'function') {\n const ctx: CellRenderContext = { value, row, column, field: column.field };\n return spec(ctx);\n }\n\n // Default: show textContent only when overflowing\n if (isOverflowing(cell)) {\n return cell.textContent?.trim() || null;\n }\n\n return null;\n}\n\n/**\n * Resolve the tooltip text for a header cell.\n * Returns the text to show, or `null` to suppress.\n */\nfunction resolveHeaderTooltip(column: ColumnConfig, headerCell: HTMLElement): string | null {\n const spec = column.headerTooltip;\n\n if (spec === false) return null;\n if (typeof spec === 'string') return spec;\n if (typeof spec === 'function') {\n const ctx: HeaderLabelContext = {\n column,\n value: column.header ?? column.field,\n };\n return spec(ctx);\n }\n\n // Default: show header text only when overflowing\n const labelSpan = headerCell.querySelector('span:first-child') as HTMLElement | null;\n const target = labelSpan ?? headerCell;\n\n if (isOverflowing(target)) {\n return target.textContent?.trim() || null;\n }\n\n return null;\n}\n\n/** Runtime check — happy-dom and older browsers may lack Popover API. */\nfunction supportsPopover(): boolean {\n return typeof HTMLElement.prototype?.showPopover === 'function';\n}\n\n/** Runtime check for CSS anchor positioning. */\nfunction supportsAnchor(): boolean {\n return typeof CSS !== 'undefined' && CSS.supports?.('anchor-name', '--test') === true;\n}\n// #endregion\n\n// #region TooltipPlugin\n/**\n * Tooltip Plugin for tbw-grid\n *\n * Shows styled popover tooltips when header or cell text overflows its\n * container. Uses the Popover API with CSS anchor positioning for\n * consistent themed appearance across light and dark modes.\n *\n * ## Installation\n *\n * ```ts\n * import { TooltipPlugin } from '@toolbox-web/grid/plugins/tooltip';\n * ```\n *\n * @example Default — auto-tooltip on overflow\n * ```ts\n * grid.gridConfig = {\n * plugins: [new TooltipPlugin()],\n * };\n * ```\n *\n * @example Header-only tooltips\n * ```ts\n * grid.gridConfig = {\n * plugins: [new TooltipPlugin({ cell: false })],\n * };\n * ```\n *\n * @example Per-column overrides\n * ```ts\n * grid.gridConfig = {\n * columns: [\n * { field: 'name', cellTooltip: (ctx) => `${ctx.row.first} ${ctx.row.last}` },\n * { field: 'actions', cellTooltip: false },\n * { field: 'revenue', headerTooltip: 'Total revenue in USD (before tax)' },\n * ],\n * plugins: [new TooltipPlugin()],\n * };\n * ```\n *\n * @category Plugins\n */\nexport class TooltipPlugin extends BaseGridPlugin<TooltipConfig> {\n readonly name = 'tooltip';\n override readonly styles = tooltipStyles;\n\n static override readonly manifest: PluginManifest<TooltipConfig> = {\n ownedProperties: [\n { property: 'cellTooltip', level: 'column', description: 'the \"cellTooltip\" column property' },\n { property: 'headerTooltip', level: 'column', description: 'the \"headerTooltip\" column property' },\n ],\n configRules: [],\n };\n\n /** The shared popover element for all tooltips. */\n #popoverEl: HTMLElement | null = null;\n\n /** The cell currently acting as CSS anchor. */\n #anchorCell: HTMLElement | null = null;\n\n /** Whether delegated listeners are bound. */\n #bound = false;\n\n /** Whether header tooltips are enabled globally. */\n get #headerEnabled(): boolean {\n return this.config.header !== false;\n }\n\n /** Whether cell tooltips are enabled globally. */\n get #cellEnabled(): boolean {\n return this.config.cell !== false;\n }\n\n override attach(grid: GridElement): void {\n super.attach(grid);\n }\n\n override detach(): void {\n this.#hideTooltip();\n this.#popoverEl?.remove();\n this.#popoverEl = null;\n this.#bound = false;\n super.detach();\n }\n\n override afterRender(): void {\n this.#ensurePopover();\n this.#bindEvents();\n }\n\n // #region Popover Lifecycle\n\n /** Create the shared popover element (once). */\n #ensurePopover(): void {\n if (this.#popoverEl) return;\n const el = document.createElement('div');\n el.className = 'tbw-tooltip-popover';\n el.setAttribute('popover', 'hint');\n // Override UA popover defaults that @layer CSS cannot beat\n el.style.overflow = 'visible';\n el.style.margin = '0';\n document.body.appendChild(el);\n this.#popoverEl = el;\n }\n\n /** Show the popover anchored to `cell` with the given `text`. */\n #showTooltip(cell: HTMLElement, text: string): void {\n if (!this.#popoverEl) return;\n\n // Move the CSS anchor to the hovered cell\n this.#clearAnchor();\n cell.style.setProperty('anchor-name', '--tbw-tooltip-anchor');\n this.#anchorCell = cell;\n\n // Set content (always textContent — safe, no XSS)\n this.#popoverEl.textContent = text;\n\n // Show via Popover API\n if (supportsPopover()) {\n try {\n this.#popoverEl.showPopover();\n } catch {\n /* already shown */\n }\n }\n\n if (supportsAnchor()) {\n // Detect flip after the browser resolves position-try-fallbacks\n requestAnimationFrame(() => this.#detectFlip(cell));\n } else {\n this.#positionFallback(cell);\n }\n }\n\n /** Hide the popover and clear the anchor reference. */\n #hideTooltip(): void {\n if (this.#popoverEl) {\n if (supportsPopover()) {\n try {\n this.#popoverEl.hidePopover();\n } catch {\n /* already hidden */\n }\n }\n this.#popoverEl.classList.remove('tbw-tooltip-above');\n }\n this.#clearAnchor();\n }\n\n /** Remove the CSS anchor-name from the previous cell. */\n #clearAnchor(): void {\n if (this.#anchorCell) {\n this.#anchorCell.style.removeProperty('anchor-name');\n this.#anchorCell = null;\n }\n }\n\n /**\n * Fallback positioning for browsers without CSS anchor support.\n * Places the popover below or above the cell using fixed coordinates.\n */\n #positionFallback(cell: HTMLElement): void {\n if (!this.#popoverEl) return;\n const cellRect = cell.getBoundingClientRect();\n const arrowGap = 11;\n\n this.#popoverEl.style.position = 'fixed';\n this.#popoverEl.style.left = `${cellRect.left}px`;\n\n // Check if there's space below\n const spaceBelow = window.innerHeight - cellRect.bottom;\n if (spaceBelow < 80) {\n // Place above the cell\n this.#popoverEl.style.top = '';\n this.#popoverEl.style.bottom = `${window.innerHeight - cellRect.top + arrowGap}px`;\n this.#popoverEl.classList.add('tbw-tooltip-above');\n } else {\n this.#popoverEl.style.top = `${cellRect.bottom + arrowGap}px`;\n this.#popoverEl.style.bottom = '';\n this.#popoverEl.classList.remove('tbw-tooltip-above');\n }\n }\n\n /** Toggle the arrow direction class after CSS anchor positioning resolves. */\n #detectFlip(cell: HTMLElement): void {\n if (!this.#popoverEl) return;\n const cellRect = cell.getBoundingClientRect();\n const popoverRect = this.#popoverEl.getBoundingClientRect();\n // If the popover's bottom edge is above the cell's top, it flipped\n this.#popoverEl.classList.toggle('tbw-tooltip-above', popoverRect.bottom <= cellRect.top);\n }\n // #endregion\n\n // #region Event Delegation\n\n /** Bind delegated mouseover/mouseout once. */\n #bindEvents(): void {\n if (this.#bound) return;\n const container = this.gridElement?.querySelector('.tbw-grid-root');\n if (!container) return;\n\n this.#bound = true;\n\n container.addEventListener('mouseover', (e: Event) => this.#onMouseOver(e as MouseEvent), {\n signal: this.disconnectSignal,\n });\n\n container.addEventListener('mouseout', (e: Event) => this.#onMouseOut(e as MouseEvent), {\n signal: this.disconnectSignal,\n });\n }\n\n #onMouseOver(e: MouseEvent): void {\n const target = e.target as HTMLElement;\n if (!target?.closest) return;\n\n // Check for header cell\n const headerCell = target.closest('[part~=\"header-cell\"]') as HTMLElement | null;\n if (headerCell && this.#headerEnabled) {\n this.#showHeaderTooltip(headerCell);\n return;\n }\n\n // Check for data cell\n const dataCell = target.closest('[data-row][data-col]') as HTMLElement | null;\n if (dataCell && this.#cellEnabled) {\n this.#showCellTooltip(dataCell);\n }\n }\n\n #onMouseOut(e: MouseEvent): void {\n const target = e.target as HTMLElement;\n if (!target?.closest) return;\n\n const cell = target.closest('[part~=\"header-cell\"], [data-row][data-col]') as HTMLElement | null;\n if (!cell) return;\n\n // Keep tooltip if pointer moved to a child still inside the same cell\n const related = e.relatedTarget as HTMLElement | null;\n if (related && cell.contains(related)) return;\n\n this.#hideTooltip();\n }\n // #endregion\n\n // #region Tooltip Resolution\n\n #showHeaderTooltip(headerCell: HTMLElement): void {\n const colIndex = parseInt(headerCell.getAttribute('data-col') ?? '-1', 10);\n if (colIndex < 0) return;\n\n const column = this.visibleColumns[colIndex];\n if (!column) return;\n\n const text = resolveHeaderTooltip(column, headerCell);\n if (text) {\n this.#showTooltip(headerCell, text);\n }\n }\n\n #showCellTooltip(cell: HTMLElement): void {\n const rowIndex = parseInt(cell.getAttribute('data-row') ?? '-1', 10);\n const colIndex = parseInt(cell.getAttribute('data-col') ?? '-1', 10);\n if (rowIndex < 0 || colIndex < 0) return;\n\n const column = this.visibleColumns[colIndex];\n if (!column) return;\n\n const row = this.rows[rowIndex];\n const value = row?.[column.field as keyof typeof row];\n\n const text = resolveCellTooltip(column, cell, row, value);\n if (text) {\n this.#showTooltip(cell, text);\n }\n }\n // #endregion\n}\n// #endregion\n"],"names":["isOverflowing","el","scrollWidth","clientWidth","supportsPopover","HTMLElement","prototype","showPopover","TooltipPlugin","BaseGridPlugin","name","styles","static","ownedProperties","property","level","description","configRules","popoverEl","anchorCell","bound","headerEnabled","this","config","header","cellEnabled","cell","attach","grid","super","detach","hideTooltip","remove","afterRender","ensurePopover","bindEvents","document","createElement","className","setAttribute","style","overflow","margin","body","appendChild","showTooltip","text","clearAnchor","setProperty","textContent","CSS","supports","requestAnimationFrame","detectFlip","positionFallback","hidePopover","classList","removeProperty","cellRect","getBoundingClientRect","position","left","window","innerHeight","bottom","top","add","popoverRect","toggle","container","gridElement","querySelector","addEventListener","e","onMouseOver","signal","disconnectSignal","onMouseOut","target","closest","headerCell","showHeaderTooltip","dataCell","showCellTooltip","related","relatedTarget","contains","colIndex","parseInt","getAttribute","column","visibleColumns","spec","headerTooltip","value","field","trim","resolveHeaderTooltip","rowIndex","row","rows","cellTooltip","resolveCellTooltip"],"mappings":"iVAoBA,SAASA,EAAcC,GACrB,OAAOA,EAAGC,YAAcD,EAAGE,WAC7B,CAqDA,SAASC,IACP,MAAqD,mBAAvCC,YAAYC,WA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