@descope/web-components-ui 1.0.234 → 1.0.236
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/cjs/index.cjs.js +770 -647
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.esm.js +754 -632
- package/dist/index.esm.js.map +1 -1
- package/dist/umd/{4513.js → 1721.js} +1 -1
- package/dist/umd/3003.js +1 -1
- package/dist/umd/3092.js +23 -18
- package/dist/umd/322.js +90 -0
- package/dist/umd/4226.js +1 -1
- package/dist/umd/4447.js +1 -2
- package/dist/umd/5345.js +1 -1
- package/dist/umd/5517.js +2 -0
- package/dist/umd/5806.js +3 -3
- package/dist/umd/5977.js +18 -13
- package/dist/umd/6091.js +1 -1
- package/dist/umd/6542.js +22 -22
- package/dist/umd/6770.js +2 -2
- package/dist/umd/7531.js +77 -6
- package/dist/umd/849.js +744 -0
- package/dist/umd/849.js.LICENSE.txt +11 -0
- package/dist/umd/8623.js +2 -0
- package/dist/umd/8725.js +2 -2
- package/dist/umd/{1990.js → 9092.js} +21 -17
- package/dist/umd/9211.js +33 -19
- package/dist/umd/{7514.js → 9558.js} +128 -110
- package/dist/umd/descope-badge-index-js.js +1 -0
- package/dist/umd/descope-button-index-js.js +1 -1
- package/dist/umd/descope-date-picker-index-js.js +1 -1
- package/dist/umd/descope-grid-descope-grid-selection-column-index-js.js +1 -1
- package/dist/umd/descope-grid-descope-grid-status-column-index-js.js +1 -1
- package/dist/umd/descope-grid-descope-grid-text-column-index-js.js +1 -1
- package/dist/umd/descope-grid-index-js.js +1 -1
- package/dist/umd/index.js +1 -1
- package/package.json +14 -13
- package/src/components/descope-badge/BadgeClass.js +54 -0
- package/src/components/descope-badge/index.js +5 -0
- package/src/index.cjs.js +1 -0
- package/src/index.d.ts +1 -0
- package/src/theme/components/badge.js +71 -0
- package/src/theme/components/index.js +2 -0
- package/dist/umd/2873.js +0 -738
- package/dist/umd/2873.js.LICENSE.txt +0 -21
- package/dist/umd/446.js +0 -92
- package/dist/umd/729.js +0 -1
- package/dist/umd/9629.js +0 -2
- package/dist/umd/9671.js +0 -1
- /package/dist/umd/{4447.js.LICENSE.txt → 322.js.LICENSE.txt} +0 -0
- /package/dist/umd/{446.js.LICENSE.txt → 5517.js.LICENSE.txt} +0 -0
- /package/dist/umd/{9629.js.LICENSE.txt → 8623.js.LICENSE.txt} +0 -0
- /package/dist/umd/{1990.js.LICENSE.txt → 9092.js.LICENSE.txt} +0 -0
- /package/dist/umd/{7514.js.LICENSE.txt → 9558.js.LICENSE.txt} +0 -0
    
        package/dist/umd/2873.js
    DELETED
    
    | @@ -1,738 +0,0 @@ | |
| 1 | 
            -
            /*! For license information please see 2873.js.LICENSE.txt */
         | 
| 2 | 
            -
            "use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[2873],{2873:(e,t,i)=>{i(1195),i(1735),i(9098),i(9416),i(9849),i(4173),i(6545);var r=i(6570);(0,r.hC)("vaadin-grid",r.iv`
         | 
| 3 | 
            -
                :host {
         | 
| 4 | 
            -
                  font-family: var(--lumo-font-family);
         | 
| 5 | 
            -
                  font-size: var(--lumo-font-size-m);
         | 
| 6 | 
            -
                  line-height: var(--lumo-line-height-s);
         | 
| 7 | 
            -
                  color: var(--lumo-body-text-color);
         | 
| 8 | 
            -
                  background-color: var(--lumo-base-color);
         | 
| 9 | 
            -
                  box-sizing: border-box;
         | 
| 10 | 
            -
                  -webkit-text-size-adjust: 100%;
         | 
| 11 | 
            -
                  -webkit-tap-highlight-color: transparent;
         | 
| 12 | 
            -
                  -webkit-font-smoothing: antialiased;
         | 
| 13 | 
            -
                  -moz-osx-font-smoothing: grayscale;
         | 
| 14 | 
            -
             | 
| 15 | 
            -
                  /* For internal use only */
         | 
| 16 | 
            -
                  --_lumo-grid-border-color: var(--lumo-contrast-20pct);
         | 
| 17 | 
            -
                  --_lumo-grid-secondary-border-color: var(--lumo-contrast-10pct);
         | 
| 18 | 
            -
                  --_lumo-grid-border-width: 1px;
         | 
| 19 | 
            -
                  --_lumo-grid-selected-row-color: var(--lumo-primary-color-10pct);
         | 
| 20 | 
            -
                }
         | 
| 21 | 
            -
             | 
| 22 | 
            -
                /* No (outer) border */
         | 
| 23 | 
            -
             | 
| 24 | 
            -
                :host(:not([theme~='no-border'])) {
         | 
| 25 | 
            -
                  border: var(--_lumo-grid-border-width) solid var(--_lumo-grid-border-color);
         | 
| 26 | 
            -
                }
         | 
| 27 | 
            -
             | 
| 28 | 
            -
                :host([disabled]) {
         | 
| 29 | 
            -
                  opacity: 0.7;
         | 
| 30 | 
            -
                }
         | 
| 31 | 
            -
             | 
| 32 | 
            -
                /* Cell styles */
         | 
| 33 | 
            -
             | 
| 34 | 
            -
                [part~='cell'] {
         | 
| 35 | 
            -
                  min-height: var(--lumo-size-m);
         | 
| 36 | 
            -
                  background-color: var(--lumo-base-color);
         | 
| 37 | 
            -
                }
         | 
| 38 | 
            -
             | 
| 39 | 
            -
                [part~='cell'] ::slotted(vaadin-grid-cell-content) {
         | 
| 40 | 
            -
                  cursor: default;
         | 
| 41 | 
            -
                  padding: var(--lumo-space-xs) var(--lumo-space-m);
         | 
| 42 | 
            -
                }
         | 
| 43 | 
            -
             | 
| 44 | 
            -
                /* Apply row borders by default and introduce the "no-row-borders" variant */
         | 
| 45 | 
            -
                :host(:not([theme~='no-row-borders'])) [part~='cell']:not([part~='details-cell']) {
         | 
| 46 | 
            -
                  border-top: var(--_lumo-grid-border-width) solid var(--_lumo-grid-secondary-border-color);
         | 
| 47 | 
            -
                }
         | 
| 48 | 
            -
             | 
| 49 | 
            -
                /* Hide first body row top border */
         | 
| 50 | 
            -
                :host(:not([theme~='no-row-borders'])) [part~='first-row'] [part~='cell']:not([part~='details-cell']) {
         | 
| 51 | 
            -
                  border-top: 0;
         | 
| 52 | 
            -
                  min-height: calc(var(--lumo-size-m) - var(--_lumo-grid-border-width));
         | 
| 53 | 
            -
                }
         | 
| 54 | 
            -
             | 
| 55 | 
            -
                /* Focus-ring */
         | 
| 56 | 
            -
             | 
| 57 | 
            -
                [part~='row'] {
         | 
| 58 | 
            -
                  position: relative;
         | 
| 59 | 
            -
                }
         | 
| 60 | 
            -
             | 
| 61 | 
            -
                [part~='row']:focus,
         | 
| 62 | 
            -
                [part~='focused-cell']:focus {
         | 
| 63 | 
            -
                  outline: none;
         | 
| 64 | 
            -
                }
         | 
| 65 | 
            -
             | 
| 66 | 
            -
                :host([navigating]) [part~='row']:focus::before,
         | 
| 67 | 
            -
                :host([navigating]) [part~='focused-cell']:focus::before {
         | 
| 68 | 
            -
                  content: '';
         | 
| 69 | 
            -
                  position: absolute;
         | 
| 70 | 
            -
                  inset: 0;
         | 
| 71 | 
            -
                  pointer-events: none;
         | 
| 72 | 
            -
                  box-shadow: inset 0 0 0 2px var(--lumo-primary-color-50pct);
         | 
| 73 | 
            -
                }
         | 
| 74 | 
            -
             | 
| 75 | 
            -
                :host([navigating]) [part~='row']:focus::before {
         | 
| 76 | 
            -
                  transform: translateX(calc(-1 * var(--_grid-horizontal-scroll-position)));
         | 
| 77 | 
            -
                  z-index: 3;
         | 
| 78 | 
            -
                }
         | 
| 79 | 
            -
             | 
| 80 | 
            -
                /* Drag and Drop styles */
         | 
| 81 | 
            -
                :host([dragover])::after {
         | 
| 82 | 
            -
                  content: '';
         | 
| 83 | 
            -
                  position: absolute;
         | 
| 84 | 
            -
                  z-index: 100;
         | 
| 85 | 
            -
                  inset: 0;
         | 
| 86 | 
            -
                  pointer-events: none;
         | 
| 87 | 
            -
                  box-shadow: inset 0 0 0 2px var(--lumo-primary-color-50pct);
         | 
| 88 | 
            -
                }
         | 
| 89 | 
            -
             | 
| 90 | 
            -
                [part~='row'][dragover] {
         | 
| 91 | 
            -
                  z-index: 100 !important;
         | 
| 92 | 
            -
                }
         | 
| 93 | 
            -
             | 
| 94 | 
            -
                [part~='row'][dragover] [part~='cell'] {
         | 
| 95 | 
            -
                  overflow: visible;
         | 
| 96 | 
            -
                }
         | 
| 97 | 
            -
             | 
| 98 | 
            -
                [part~='row'][dragover] [part~='cell']::after {
         | 
| 99 | 
            -
                  content: '';
         | 
| 100 | 
            -
                  position: absolute;
         | 
| 101 | 
            -
                  inset: 0;
         | 
| 102 | 
            -
                  height: calc(var(--_lumo-grid-border-width) + 2px);
         | 
| 103 | 
            -
                  pointer-events: none;
         | 
| 104 | 
            -
                  background: var(--lumo-primary-color-50pct);
         | 
| 105 | 
            -
                }
         | 
| 106 | 
            -
             | 
| 107 | 
            -
                [part~='row'][dragover] [part~='cell'][last-frozen]::after {
         | 
| 108 | 
            -
                  right: -1px;
         | 
| 109 | 
            -
                }
         | 
| 110 | 
            -
             | 
| 111 | 
            -
                :host([theme~='no-row-borders']) [dragover] [part~='cell']::after {
         | 
| 112 | 
            -
                  height: 2px;
         | 
| 113 | 
            -
                }
         | 
| 114 | 
            -
             | 
| 115 | 
            -
                [part~='row'][dragover='below'] [part~='cell']::after {
         | 
| 116 | 
            -
                  top: 100%;
         | 
| 117 | 
            -
                  bottom: auto;
         | 
| 118 | 
            -
                  margin-top: -1px;
         | 
| 119 | 
            -
                }
         | 
| 120 | 
            -
             | 
| 121 | 
            -
                :host([all-rows-visible]) [part~='last-row'][dragover='below'] [part~='cell']::after {
         | 
| 122 | 
            -
                  height: 1px;
         | 
| 123 | 
            -
                }
         | 
| 124 | 
            -
             | 
| 125 | 
            -
                [part~='row'][dragover='above'] [part~='cell']::after {
         | 
| 126 | 
            -
                  top: auto;
         | 
| 127 | 
            -
                  bottom: 100%;
         | 
| 128 | 
            -
                  margin-bottom: -1px;
         | 
| 129 | 
            -
                }
         | 
| 130 | 
            -
             | 
| 131 | 
            -
                [part~='row'][details-opened][dragover='below'] [part~='cell']:not([part~='details-cell'])::after,
         | 
| 132 | 
            -
                [part~='row'][details-opened][dragover='above'] [part~='details-cell']::after {
         | 
| 133 | 
            -
                  display: none;
         | 
| 134 | 
            -
                }
         | 
| 135 | 
            -
             | 
| 136 | 
            -
                [part~='row'][dragover][dragover='on-top'] [part~='cell']::after {
         | 
| 137 | 
            -
                  height: 100%;
         | 
| 138 | 
            -
                  opacity: 0.5;
         | 
| 139 | 
            -
                }
         | 
| 140 | 
            -
             | 
| 141 | 
            -
                [part~='row'][dragstart] [part~='cell'] {
         | 
| 142 | 
            -
                  border: none !important;
         | 
| 143 | 
            -
                  box-shadow: none !important;
         | 
| 144 | 
            -
                }
         | 
| 145 | 
            -
             | 
| 146 | 
            -
                [part~='row'][dragstart] [part~='cell'][last-column] {
         | 
| 147 | 
            -
                  border-radius: 0 var(--lumo-border-radius-s) var(--lumo-border-radius-s) 0;
         | 
| 148 | 
            -
                }
         | 
| 149 | 
            -
             | 
| 150 | 
            -
                [part~='row'][dragstart] [part~='cell'][first-column] {
         | 
| 151 | 
            -
                  border-radius: var(--lumo-border-radius-s) 0 0 var(--lumo-border-radius-s);
         | 
| 152 | 
            -
                }
         | 
| 153 | 
            -
             | 
| 154 | 
            -
                #scroller [part~='row'][dragstart]:not([dragstart=''])::after {
         | 
| 155 | 
            -
                  display: block;
         | 
| 156 | 
            -
                  position: absolute;
         | 
| 157 | 
            -
                  left: var(--_grid-drag-start-x);
         | 
| 158 | 
            -
                  top: var(--_grid-drag-start-y);
         | 
| 159 | 
            -
                  z-index: 100;
         | 
| 160 | 
            -
                  content: attr(dragstart);
         | 
| 161 | 
            -
                  align-items: center;
         | 
| 162 | 
            -
                  justify-content: center;
         | 
| 163 | 
            -
                  box-sizing: border-box;
         | 
| 164 | 
            -
                  padding: calc(var(--lumo-space-xs) * 0.8);
         | 
| 165 | 
            -
                  color: var(--lumo-error-contrast-color);
         | 
| 166 | 
            -
                  background-color: var(--lumo-error-color);
         | 
| 167 | 
            -
                  border-radius: var(--lumo-border-radius-m);
         | 
| 168 | 
            -
                  font-family: var(--lumo-font-family);
         | 
| 169 | 
            -
                  font-size: var(--lumo-font-size-xxs);
         | 
| 170 | 
            -
                  line-height: 1;
         | 
| 171 | 
            -
                  font-weight: 500;
         | 
| 172 | 
            -
                  text-transform: initial;
         | 
| 173 | 
            -
                  letter-spacing: initial;
         | 
| 174 | 
            -
                  min-width: calc(var(--lumo-size-s) * 0.7);
         | 
| 175 | 
            -
                  text-align: center;
         | 
| 176 | 
            -
                }
         | 
| 177 | 
            -
             | 
| 178 | 
            -
                /* Headers and footers */
         | 
| 179 | 
            -
             | 
| 180 | 
            -
                [part~='header-cell'] ::slotted(vaadin-grid-cell-content),
         | 
| 181 | 
            -
                [part~='footer-cell'] ::slotted(vaadin-grid-cell-content),
         | 
| 182 | 
            -
                [part~='reorder-ghost'] {
         | 
| 183 | 
            -
                  font-size: var(--lumo-font-size-s);
         | 
| 184 | 
            -
                  font-weight: 500;
         | 
| 185 | 
            -
                }
         | 
| 186 | 
            -
             | 
| 187 | 
            -
                [part~='footer-cell'] ::slotted(vaadin-grid-cell-content) {
         | 
| 188 | 
            -
                  font-weight: 400;
         | 
| 189 | 
            -
                }
         | 
| 190 | 
            -
             | 
| 191 | 
            -
                [part~='row']:only-child [part~='header-cell'] {
         | 
| 192 | 
            -
                  min-height: var(--lumo-size-xl);
         | 
| 193 | 
            -
                }
         | 
| 194 | 
            -
             | 
| 195 | 
            -
                /* Header borders */
         | 
| 196 | 
            -
             | 
| 197 | 
            -
                /* Hide first header row top border */
         | 
| 198 | 
            -
                :host(:not([theme~='no-row-borders'])) [part~='row']:first-child [part~='header-cell'] {
         | 
| 199 | 
            -
                  border-top: 0;
         | 
| 200 | 
            -
                }
         | 
| 201 | 
            -
             | 
| 202 | 
            -
                [part~='row']:last-child [part~='header-cell'] {
         | 
| 203 | 
            -
                  border-bottom: var(--_lumo-grid-border-width) solid transparent;
         | 
| 204 | 
            -
                }
         | 
| 205 | 
            -
             | 
| 206 | 
            -
                :host(:not([theme~='no-row-borders'])) [part~='row']:last-child [part~='header-cell'] {
         | 
| 207 | 
            -
                  border-bottom-color: var(--_lumo-grid-secondary-border-color);
         | 
| 208 | 
            -
                }
         | 
| 209 | 
            -
             | 
| 210 | 
            -
                /* Overflow uses a stronger border color */
         | 
| 211 | 
            -
                :host([overflow~='top']) [part~='row']:last-child [part~='header-cell'] {
         | 
| 212 | 
            -
                  border-bottom-color: var(--_lumo-grid-border-color);
         | 
| 213 | 
            -
                }
         | 
| 214 | 
            -
             | 
| 215 | 
            -
                /* Footer borders */
         | 
| 216 | 
            -
             | 
| 217 | 
            -
                [part~='row']:first-child [part~='footer-cell'] {
         | 
| 218 | 
            -
                  border-top: var(--_lumo-grid-border-width) solid transparent;
         | 
| 219 | 
            -
                }
         | 
| 220 | 
            -
             | 
| 221 | 
            -
                :host(:not([theme~='no-row-borders'])) [part~='row']:first-child [part~='footer-cell'] {
         | 
| 222 | 
            -
                  border-top-color: var(--_lumo-grid-secondary-border-color);
         | 
| 223 | 
            -
                }
         | 
| 224 | 
            -
             | 
| 225 | 
            -
                /* Overflow uses a stronger border color */
         | 
| 226 | 
            -
                :host([overflow~='bottom']) [part~='row']:first-child [part~='footer-cell'] {
         | 
| 227 | 
            -
                  border-top-color: var(--_lumo-grid-border-color);
         | 
| 228 | 
            -
                }
         | 
| 229 | 
            -
             | 
| 230 | 
            -
                /* Column reordering */
         | 
| 231 | 
            -
             | 
| 232 | 
            -
                :host([reordering]) [part~='cell'] {
         | 
| 233 | 
            -
                  background: linear-gradient(var(--lumo-shade-20pct), var(--lumo-shade-20pct)) var(--lumo-base-color);
         | 
| 234 | 
            -
                }
         | 
| 235 | 
            -
             | 
| 236 | 
            -
                :host([reordering]) [part~='cell'][reorder-status='allowed'] {
         | 
| 237 | 
            -
                  background: var(--lumo-base-color);
         | 
| 238 | 
            -
                }
         | 
| 239 | 
            -
             | 
| 240 | 
            -
                :host([reordering]) [part~='cell'][reorder-status='dragging'] {
         | 
| 241 | 
            -
                  background: linear-gradient(var(--lumo-contrast-5pct), var(--lumo-contrast-5pct)) var(--lumo-base-color);
         | 
| 242 | 
            -
                }
         | 
| 243 | 
            -
             | 
| 244 | 
            -
                [part~='reorder-ghost'] {
         | 
| 245 | 
            -
                  opacity: 0.85;
         | 
| 246 | 
            -
                  box-shadow: var(--lumo-box-shadow-s);
         | 
| 247 | 
            -
                  /* TODO Use the same styles as for the cell element (reorder-ghost copies styles from the cell element) */
         | 
| 248 | 
            -
                  padding: var(--lumo-space-s) var(--lumo-space-m) !important;
         | 
| 249 | 
            -
                }
         | 
| 250 | 
            -
             | 
| 251 | 
            -
                /* Column resizing */
         | 
| 252 | 
            -
             | 
| 253 | 
            -
                [part='resize-handle'] {
         | 
| 254 | 
            -
                  width: 3px;
         | 
| 255 | 
            -
                  background-color: var(--lumo-primary-color-50pct);
         | 
| 256 | 
            -
                  opacity: 0;
         | 
| 257 | 
            -
                  transition: opacity 0.2s;
         | 
| 258 | 
            -
                }
         | 
| 259 | 
            -
             | 
| 260 | 
            -
                :host(:not([reordering])) *:not([column-resizing]) [part~='cell']:hover [part='resize-handle'],
         | 
| 261 | 
            -
                [part='resize-handle']:active {
         | 
| 262 | 
            -
                  opacity: 1;
         | 
| 263 | 
            -
                  transition-delay: 0.15s;
         | 
| 264 | 
            -
                }
         | 
| 265 | 
            -
             | 
| 266 | 
            -
                /* Column borders */
         | 
| 267 | 
            -
             | 
| 268 | 
            -
                :host([theme~='column-borders']) [part~='cell']:not([last-column]):not([part~='details-cell']) {
         | 
| 269 | 
            -
                  border-right: var(--_lumo-grid-border-width) solid var(--_lumo-grid-secondary-border-color);
         | 
| 270 | 
            -
                }
         | 
| 271 | 
            -
             | 
| 272 | 
            -
                /* Frozen columns */
         | 
| 273 | 
            -
             | 
| 274 | 
            -
                [last-frozen] {
         | 
| 275 | 
            -
                  border-right: var(--_lumo-grid-border-width) solid transparent;
         | 
| 276 | 
            -
                  overflow: hidden;
         | 
| 277 | 
            -
                }
         | 
| 278 | 
            -
             | 
| 279 | 
            -
                :host([overflow~='start']) [part~='cell'][last-frozen]:not([part~='details-cell']) {
         | 
| 280 | 
            -
                  border-right-color: var(--_lumo-grid-border-color);
         | 
| 281 | 
            -
                }
         | 
| 282 | 
            -
             | 
| 283 | 
            -
                [first-frozen-to-end] {
         | 
| 284 | 
            -
                  border-left: var(--_lumo-grid-border-width) solid transparent;
         | 
| 285 | 
            -
                }
         | 
| 286 | 
            -
             | 
| 287 | 
            -
                :host([overflow~='end']) [part~='cell'][first-frozen-to-end]:not([part~='details-cell']) {
         | 
| 288 | 
            -
                  border-left-color: var(--_lumo-grid-border-color);
         | 
| 289 | 
            -
                }
         | 
| 290 | 
            -
             | 
| 291 | 
            -
                /* Row stripes */
         | 
| 292 | 
            -
             | 
| 293 | 
            -
                :host([theme~='row-stripes']) [part~='even-row'] [part~='body-cell'],
         | 
| 294 | 
            -
                :host([theme~='row-stripes']) [part~='even-row'] [part~='details-cell'] {
         | 
| 295 | 
            -
                  background-image: linear-gradient(var(--lumo-contrast-5pct), var(--lumo-contrast-5pct));
         | 
| 296 | 
            -
                  background-repeat: repeat-x;
         | 
| 297 | 
            -
                }
         | 
| 298 | 
            -
             | 
| 299 | 
            -
                /* Selected row */
         | 
| 300 | 
            -
             | 
| 301 | 
            -
                /* Raise the selected rows above unselected rows (so that box-shadow can cover unselected rows) */
         | 
| 302 | 
            -
                :host(:not([reordering])) [part~='row'][selected] {
         | 
| 303 | 
            -
                  z-index: 1;
         | 
| 304 | 
            -
                }
         | 
| 305 | 
            -
             | 
| 306 | 
            -
                :host(:not([reordering])) [part~='row'][selected] [part~='body-cell']:not([part~='details-cell']) {
         | 
| 307 | 
            -
                  background-image: linear-gradient(var(--_lumo-grid-selected-row-color), var(--_lumo-grid-selected-row-color));
         | 
| 308 | 
            -
                  background-repeat: repeat;
         | 
| 309 | 
            -
                }
         | 
| 310 | 
            -
             | 
| 311 | 
            -
                /* Cover the border of an unselected row */
         | 
| 312 | 
            -
                :host(:not([theme~='no-row-borders'])) [part~='row'][selected] [part~='cell']:not([part~='details-cell']) {
         | 
| 313 | 
            -
                  box-shadow: 0 var(--_lumo-grid-border-width) 0 0 var(--_lumo-grid-selected-row-color);
         | 
| 314 | 
            -
                }
         | 
| 315 | 
            -
             | 
| 316 | 
            -
                /* Compact */
         | 
| 317 | 
            -
             | 
| 318 | 
            -
                :host([theme~='compact']) [part~='row']:only-child [part~='header-cell'] {
         | 
| 319 | 
            -
                  min-height: var(--lumo-size-m);
         | 
| 320 | 
            -
                }
         | 
| 321 | 
            -
             | 
| 322 | 
            -
                :host([theme~='compact']) [part~='cell'] {
         | 
| 323 | 
            -
                  min-height: var(--lumo-size-s);
         | 
| 324 | 
            -
                }
         | 
| 325 | 
            -
             | 
| 326 | 
            -
                :host([theme~='compact']) [part~='first-row'] [part~='cell']:not([part~='details-cell']) {
         | 
| 327 | 
            -
                  min-height: calc(var(--lumo-size-s) - var(--_lumo-grid-border-width));
         | 
| 328 | 
            -
                }
         | 
| 329 | 
            -
             | 
| 330 | 
            -
                :host([theme~='compact']) [part~='cell'] ::slotted(vaadin-grid-cell-content) {
         | 
| 331 | 
            -
                  padding: var(--lumo-space-xs) var(--lumo-space-s);
         | 
| 332 | 
            -
                }
         | 
| 333 | 
            -
             | 
| 334 | 
            -
                /* Wrap cell contents */
         | 
| 335 | 
            -
             | 
| 336 | 
            -
                :host([theme~='wrap-cell-content']) [part~='cell'] ::slotted(vaadin-grid-cell-content) {
         | 
| 337 | 
            -
                  white-space: normal;
         | 
| 338 | 
            -
                }
         | 
| 339 | 
            -
             | 
| 340 | 
            -
                /* RTL specific styles */
         | 
| 341 | 
            -
             | 
| 342 | 
            -
                :host([dir='rtl']) [part~='row'][dragstart] [part~='cell'][last-column] {
         | 
| 343 | 
            -
                  border-radius: var(--lumo-border-radius-s) 0 0 var(--lumo-border-radius-s);
         | 
| 344 | 
            -
                }
         | 
| 345 | 
            -
             | 
| 346 | 
            -
                :host([dir='rtl']) [part~='row'][dragstart] [part~='cell'][first-column] {
         | 
| 347 | 
            -
                  border-radius: 0 var(--lumo-border-radius-s) var(--lumo-border-radius-s) 0;
         | 
| 348 | 
            -
                }
         | 
| 349 | 
            -
             | 
| 350 | 
            -
                :host([dir='rtl'][theme~='column-borders']) [part~='cell']:not([last-column]):not([part~='details-cell']) {
         | 
| 351 | 
            -
                  border-right: none;
         | 
| 352 | 
            -
                  border-left: var(--_lumo-grid-border-width) solid var(--_lumo-grid-secondary-border-color);
         | 
| 353 | 
            -
                }
         | 
| 354 | 
            -
             | 
| 355 | 
            -
                :host([dir='rtl']) [last-frozen] {
         | 
| 356 | 
            -
                  border-right: none;
         | 
| 357 | 
            -
                  border-left: var(--_lumo-grid-border-width) solid transparent;
         | 
| 358 | 
            -
                }
         | 
| 359 | 
            -
             | 
| 360 | 
            -
                :host([dir='rtl']) [first-frozen-to-end] {
         | 
| 361 | 
            -
                  border-left: none;
         | 
| 362 | 
            -
                  border-right: var(--_lumo-grid-border-width) solid transparent;
         | 
| 363 | 
            -
                }
         | 
| 364 | 
            -
             | 
| 365 | 
            -
                :host([dir='rtl'][overflow~='start']) [part~='cell'][last-frozen]:not([part~='details-cell']) {
         | 
| 366 | 
            -
                  border-left-color: var(--_lumo-grid-border-color);
         | 
| 367 | 
            -
                }
         | 
| 368 | 
            -
             | 
| 369 | 
            -
                :host([dir='rtl'][overflow~='end']) [part~='cell'][first-frozen-to-end]:not([part~='details-cell']) {
         | 
| 370 | 
            -
                  border-right-color: var(--_lumo-grid-border-color);
         | 
| 371 | 
            -
                }
         | 
| 372 | 
            -
              `,{moduleId:"lumo-grid"}),i(4089),(0,r.hC)("vaadin-grid",r.iv`
         | 
| 373 | 
            -
                @keyframes vaadin-grid-appear {
         | 
| 374 | 
            -
                  to {
         | 
| 375 | 
            -
                    opacity: 1;
         | 
| 376 | 
            -
                  }
         | 
| 377 | 
            -
                }
         | 
| 378 | 
            -
             | 
| 379 | 
            -
                :host {
         | 
| 380 | 
            -
                  display: flex;
         | 
| 381 | 
            -
                  flex-direction: column;
         | 
| 382 | 
            -
                  animation: 1ms vaadin-grid-appear;
         | 
| 383 | 
            -
                  height: 400px;
         | 
| 384 | 
            -
                  flex: 1 1 auto;
         | 
| 385 | 
            -
                  align-self: stretch;
         | 
| 386 | 
            -
                  position: relative;
         | 
| 387 | 
            -
                }
         | 
| 388 | 
            -
             | 
| 389 | 
            -
                :host([hidden]) {
         | 
| 390 | 
            -
                  display: none !important;
         | 
| 391 | 
            -
                }
         | 
| 392 | 
            -
             | 
| 393 | 
            -
                :host([disabled]) {
         | 
| 394 | 
            -
                  pointer-events: none;
         | 
| 395 | 
            -
                }
         | 
| 396 | 
            -
             | 
| 397 | 
            -
                #scroller {
         | 
| 398 | 
            -
                  display: flex;
         | 
| 399 | 
            -
                  flex-direction: column;
         | 
| 400 | 
            -
                  min-height: 100%;
         | 
| 401 | 
            -
                  transform: translateY(0);
         | 
| 402 | 
            -
                  width: auto;
         | 
| 403 | 
            -
                  height: auto;
         | 
| 404 | 
            -
                  position: absolute;
         | 
| 405 | 
            -
                  inset: 0;
         | 
| 406 | 
            -
                }
         | 
| 407 | 
            -
             | 
| 408 | 
            -
                :host([all-rows-visible]) {
         | 
| 409 | 
            -
                  height: auto;
         | 
| 410 | 
            -
                  align-self: flex-start;
         | 
| 411 | 
            -
                  flex-grow: 0;
         | 
| 412 | 
            -
                  width: 100%;
         | 
| 413 | 
            -
                }
         | 
| 414 | 
            -
             | 
| 415 | 
            -
                :host([all-rows-visible]) #scroller {
         | 
| 416 | 
            -
                  width: 100%;
         | 
| 417 | 
            -
                  height: 100%;
         | 
| 418 | 
            -
                  position: relative;
         | 
| 419 | 
            -
                }
         | 
| 420 | 
            -
             | 
| 421 | 
            -
                :host([all-rows-visible]) #items {
         | 
| 422 | 
            -
                  min-height: 1px;
         | 
| 423 | 
            -
                }
         | 
| 424 | 
            -
             | 
| 425 | 
            -
                #table {
         | 
| 426 | 
            -
                  display: flex;
         | 
| 427 | 
            -
                  flex-direction: column;
         | 
| 428 | 
            -
                  width: 100%;
         | 
| 429 | 
            -
                  height: 100%;
         | 
| 430 | 
            -
                  overflow: auto;
         | 
| 431 | 
            -
                  position: relative;
         | 
| 432 | 
            -
                  outline: none;
         | 
| 433 | 
            -
                  /* Workaround for a Desktop Safari bug: new stacking context here prevents the scrollbar from getting hidden */
         | 
| 434 | 
            -
                  z-index: 0;
         | 
| 435 | 
            -
                }
         | 
| 436 | 
            -
             | 
| 437 | 
            -
                #header,
         | 
| 438 | 
            -
                #footer {
         | 
| 439 | 
            -
                  display: block;
         | 
| 440 | 
            -
                  position: -webkit-sticky;
         | 
| 441 | 
            -
                  position: sticky;
         | 
| 442 | 
            -
                  left: 0;
         | 
| 443 | 
            -
                  overflow: visible;
         | 
| 444 | 
            -
                  width: 100%;
         | 
| 445 | 
            -
                  z-index: 1;
         | 
| 446 | 
            -
                }
         | 
| 447 | 
            -
             | 
| 448 | 
            -
                #header {
         | 
| 449 | 
            -
                  top: 0;
         | 
| 450 | 
            -
                }
         | 
| 451 | 
            -
             | 
| 452 | 
            -
                th {
         | 
| 453 | 
            -
                  text-align: inherit;
         | 
| 454 | 
            -
                }
         | 
| 455 | 
            -
             | 
| 456 | 
            -
                /* Safari doesn't work with "inherit" */
         | 
| 457 | 
            -
                [safari] th {
         | 
| 458 | 
            -
                  text-align: initial;
         | 
| 459 | 
            -
                }
         | 
| 460 | 
            -
             | 
| 461 | 
            -
                #footer {
         | 
| 462 | 
            -
                  bottom: 0;
         | 
| 463 | 
            -
                }
         | 
| 464 | 
            -
             | 
| 465 | 
            -
                #items {
         | 
| 466 | 
            -
                  flex-grow: 1;
         | 
| 467 | 
            -
                  flex-shrink: 0;
         | 
| 468 | 
            -
                  display: block;
         | 
| 469 | 
            -
                  position: -webkit-sticky;
         | 
| 470 | 
            -
                  position: sticky;
         | 
| 471 | 
            -
                  width: 100%;
         | 
| 472 | 
            -
                  left: 0;
         | 
| 473 | 
            -
                  overflow: visible;
         | 
| 474 | 
            -
                }
         | 
| 475 | 
            -
             | 
| 476 | 
            -
                [part~='row'] {
         | 
| 477 | 
            -
                  display: flex;
         | 
| 478 | 
            -
                  width: 100%;
         | 
| 479 | 
            -
                  box-sizing: border-box;
         | 
| 480 | 
            -
                  margin: 0;
         | 
| 481 | 
            -
                }
         | 
| 482 | 
            -
             | 
| 483 | 
            -
                [part~='row'][loading] [part~='body-cell'] ::slotted(vaadin-grid-cell-content) {
         | 
| 484 | 
            -
                  visibility: hidden;
         | 
| 485 | 
            -
                }
         | 
| 486 | 
            -
             | 
| 487 | 
            -
                [column-rendering='lazy'] [part~='body-cell']:not([frozen]):not([frozen-to-end]) {
         | 
| 488 | 
            -
                  transform: translateX(var(--_grid-lazy-columns-start));
         | 
| 489 | 
            -
                }
         | 
| 490 | 
            -
             | 
| 491 | 
            -
                #items [part~='row'] {
         | 
| 492 | 
            -
                  position: absolute;
         | 
| 493 | 
            -
                }
         | 
| 494 | 
            -
             | 
| 495 | 
            -
                #items [part~='row']:empty {
         | 
| 496 | 
            -
                  height: 100%;
         | 
| 497 | 
            -
                }
         | 
| 498 | 
            -
             | 
| 499 | 
            -
                [part~='cell']:not([part~='details-cell']) {
         | 
| 500 | 
            -
                  flex-shrink: 0;
         | 
| 501 | 
            -
                  flex-grow: 1;
         | 
| 502 | 
            -
                  box-sizing: border-box;
         | 
| 503 | 
            -
                  display: flex;
         | 
| 504 | 
            -
                  width: 100%;
         | 
| 505 | 
            -
                  position: relative;
         | 
| 506 | 
            -
                  align-items: center;
         | 
| 507 | 
            -
                  padding: 0;
         | 
| 508 | 
            -
                  white-space: nowrap;
         | 
| 509 | 
            -
                }
         | 
| 510 | 
            -
             | 
| 511 | 
            -
                [part~='cell'] > [tabindex] {
         | 
| 512 | 
            -
                  display: flex;
         | 
| 513 | 
            -
                  align-items: inherit;
         | 
| 514 | 
            -
                  outline: none;
         | 
| 515 | 
            -
                  position: absolute;
         | 
| 516 | 
            -
                  inset: 0;
         | 
| 517 | 
            -
                }
         | 
| 518 | 
            -
             | 
| 519 | 
            -
                [part~='details-cell'] {
         | 
| 520 | 
            -
                  position: absolute;
         | 
| 521 | 
            -
                  bottom: 0;
         | 
| 522 | 
            -
                  width: 100%;
         | 
| 523 | 
            -
                  box-sizing: border-box;
         | 
| 524 | 
            -
                  padding: 0;
         | 
| 525 | 
            -
                }
         | 
| 526 | 
            -
             | 
| 527 | 
            -
                [part~='cell'] ::slotted(vaadin-grid-cell-content) {
         | 
| 528 | 
            -
                  display: block;
         | 
| 529 | 
            -
                  width: 100%;
         | 
| 530 | 
            -
                  box-sizing: border-box;
         | 
| 531 | 
            -
                  overflow: hidden;
         | 
| 532 | 
            -
                  text-overflow: ellipsis;
         | 
| 533 | 
            -
                }
         | 
| 534 | 
            -
             | 
| 535 | 
            -
                [hidden] {
         | 
| 536 | 
            -
                  display: none !important;
         | 
| 537 | 
            -
                }
         | 
| 538 | 
            -
             | 
| 539 | 
            -
                [frozen],
         | 
| 540 | 
            -
                [frozen-to-end] {
         | 
| 541 | 
            -
                  z-index: 2;
         | 
| 542 | 
            -
                  will-change: transform;
         | 
| 543 | 
            -
                }
         | 
| 544 | 
            -
             | 
| 545 | 
            -
                [no-scrollbars][safari] #table,
         | 
| 546 | 
            -
                [no-scrollbars][firefox] #table {
         | 
| 547 | 
            -
                  overflow: hidden;
         | 
| 548 | 
            -
                }
         | 
| 549 | 
            -
             | 
| 550 | 
            -
                /* Reordering styles */
         | 
| 551 | 
            -
                :host([reordering]) [part~='cell'] ::slotted(vaadin-grid-cell-content),
         | 
| 552 | 
            -
                :host([reordering]) [part~='resize-handle'],
         | 
| 553 | 
            -
                #scroller[no-content-pointer-events] [part~='cell'] ::slotted(vaadin-grid-cell-content) {
         | 
| 554 | 
            -
                  pointer-events: none;
         | 
| 555 | 
            -
                }
         | 
| 556 | 
            -
             | 
| 557 | 
            -
                [part~='reorder-ghost'] {
         | 
| 558 | 
            -
                  visibility: hidden;
         | 
| 559 | 
            -
                  position: fixed;
         | 
| 560 | 
            -
                  pointer-events: none;
         | 
| 561 | 
            -
                  opacity: 0.5;
         | 
| 562 | 
            -
             | 
| 563 | 
            -
                  /* Prevent overflowing the grid in Firefox */
         | 
| 564 | 
            -
                  top: 0;
         | 
| 565 | 
            -
                  left: 0;
         | 
| 566 | 
            -
                }
         | 
| 567 | 
            -
             | 
| 568 | 
            -
                :host([reordering]) {
         | 
| 569 | 
            -
                  -moz-user-select: none;
         | 
| 570 | 
            -
                  -webkit-user-select: none;
         | 
| 571 | 
            -
                  user-select: none;
         | 
| 572 | 
            -
                }
         | 
| 573 | 
            -
             | 
| 574 | 
            -
                /* Resizing styles */
         | 
| 575 | 
            -
                [part~='resize-handle'] {
         | 
| 576 | 
            -
                  position: absolute;
         | 
| 577 | 
            -
                  top: 0;
         | 
| 578 | 
            -
                  right: 0;
         | 
| 579 | 
            -
                  height: 100%;
         | 
| 580 | 
            -
                  cursor: col-resize;
         | 
| 581 | 
            -
                  z-index: 1;
         | 
| 582 | 
            -
                }
         | 
| 583 | 
            -
             | 
| 584 | 
            -
                [part~='resize-handle']::before {
         | 
| 585 | 
            -
                  position: absolute;
         | 
| 586 | 
            -
                  content: '';
         | 
| 587 | 
            -
                  height: 100%;
         | 
| 588 | 
            -
                  width: 35px;
         | 
| 589 | 
            -
                  transform: translateX(-50%);
         | 
| 590 | 
            -
                }
         | 
| 591 | 
            -
             | 
| 592 | 
            -
                [last-column] [part~='resize-handle']::before,
         | 
| 593 | 
            -
                [last-frozen] [part~='resize-handle']::before {
         | 
| 594 | 
            -
                  width: 18px;
         | 
| 595 | 
            -
                  transform: none;
         | 
| 596 | 
            -
                  right: 0;
         | 
| 597 | 
            -
                }
         | 
| 598 | 
            -
             | 
| 599 | 
            -
                [frozen-to-end] [part~='resize-handle'] {
         | 
| 600 | 
            -
                  left: 0;
         | 
| 601 | 
            -
                  right: auto;
         | 
| 602 | 
            -
                }
         | 
| 603 | 
            -
             | 
| 604 | 
            -
                [frozen-to-end] [part~='resize-handle']::before {
         | 
| 605 | 
            -
                  left: 0;
         | 
| 606 | 
            -
                  right: auto;
         | 
| 607 | 
            -
                }
         | 
| 608 | 
            -
             | 
| 609 | 
            -
                [first-frozen-to-end] [part~='resize-handle']::before {
         | 
| 610 | 
            -
                  width: 18px;
         | 
| 611 | 
            -
                  transform: none;
         | 
| 612 | 
            -
                }
         | 
| 613 | 
            -
             | 
| 614 | 
            -
                [first-frozen-to-end] {
         | 
| 615 | 
            -
                  margin-inline-start: auto;
         | 
| 616 | 
            -
                }
         | 
| 617 | 
            -
             | 
| 618 | 
            -
                /* Hide resize handle if scrolled to end */
         | 
| 619 | 
            -
                :host(:not([overflow~='end'])) [first-frozen-to-end] [part~='resize-handle'] {
         | 
| 620 | 
            -
                  display: none;
         | 
| 621 | 
            -
                }
         | 
| 622 | 
            -
             | 
| 623 | 
            -
                #scroller[column-resizing] {
         | 
| 624 | 
            -
                  -ms-user-select: none;
         | 
| 625 | 
            -
                  -moz-user-select: none;
         | 
| 626 | 
            -
                  -webkit-user-select: none;
         | 
| 627 | 
            -
                  user-select: none;
         | 
| 628 | 
            -
                }
         | 
| 629 | 
            -
             | 
| 630 | 
            -
                /* Sizer styles */
         | 
| 631 | 
            -
                #sizer {
         | 
| 632 | 
            -
                  display: flex;
         | 
| 633 | 
            -
                  position: absolute;
         | 
| 634 | 
            -
                  visibility: hidden;
         | 
| 635 | 
            -
                }
         | 
| 636 | 
            -
             | 
| 637 | 
            -
                #sizer [part~='details-cell'] {
         | 
| 638 | 
            -
                  display: none !important;
         | 
| 639 | 
            -
                }
         | 
| 640 | 
            -
             | 
| 641 | 
            -
                #sizer [part~='cell'][hidden] {
         | 
| 642 | 
            -
                  display: none !important;
         | 
| 643 | 
            -
                }
         | 
| 644 | 
            -
             | 
| 645 | 
            -
                #sizer [part~='cell'] {
         | 
| 646 | 
            -
                  display: block;
         | 
| 647 | 
            -
                  flex-shrink: 0;
         | 
| 648 | 
            -
                  line-height: 0;
         | 
| 649 | 
            -
                  height: 0 !important;
         | 
| 650 | 
            -
                  min-height: 0 !important;
         | 
| 651 | 
            -
                  max-height: 0 !important;
         | 
| 652 | 
            -
                  padding: 0 !important;
         | 
| 653 | 
            -
                  border: none !important;
         | 
| 654 | 
            -
                }
         | 
| 655 | 
            -
             | 
| 656 | 
            -
                #sizer [part~='cell']::before {
         | 
| 657 | 
            -
                  content: '-';
         | 
| 658 | 
            -
                }
         | 
| 659 | 
            -
             | 
| 660 | 
            -
                #sizer [part~='cell'] ::slotted(vaadin-grid-cell-content) {
         | 
| 661 | 
            -
                  display: none !important;
         | 
| 662 | 
            -
                }
         | 
| 663 | 
            -
             | 
| 664 | 
            -
                /* RTL specific styles */
         | 
| 665 | 
            -
             | 
| 666 | 
            -
                :host([dir='rtl']) #items,
         | 
| 667 | 
            -
                :host([dir='rtl']) #header,
         | 
| 668 | 
            -
                :host([dir='rtl']) #footer {
         | 
| 669 | 
            -
                  left: auto;
         | 
| 670 | 
            -
                }
         | 
| 671 | 
            -
             | 
| 672 | 
            -
                :host([dir='rtl']) [part~='reorder-ghost'] {
         | 
| 673 | 
            -
                  left: auto;
         | 
| 674 | 
            -
                  right: 0;
         | 
| 675 | 
            -
                }
         | 
| 676 | 
            -
             | 
| 677 | 
            -
                :host([dir='rtl']) [part~='resize-handle'] {
         | 
| 678 | 
            -
                  left: 0;
         | 
| 679 | 
            -
                  right: auto;
         | 
| 680 | 
            -
                }
         | 
| 681 | 
            -
             | 
| 682 | 
            -
                :host([dir='rtl']) [part~='resize-handle']::before {
         | 
| 683 | 
            -
                  transform: translateX(50%);
         | 
| 684 | 
            -
                }
         | 
| 685 | 
            -
             | 
| 686 | 
            -
                :host([dir='rtl']) [last-column] [part~='resize-handle']::before,
         | 
| 687 | 
            -
                :host([dir='rtl']) [last-frozen] [part~='resize-handle']::before {
         | 
| 688 | 
            -
                  left: 0;
         | 
| 689 | 
            -
                  right: auto;
         | 
| 690 | 
            -
                }
         | 
| 691 | 
            -
             | 
| 692 | 
            -
                :host([dir='rtl']) [frozen-to-end] [part~='resize-handle'] {
         | 
| 693 | 
            -
                  right: 0;
         | 
| 694 | 
            -
                  left: auto;
         | 
| 695 | 
            -
                }
         | 
| 696 | 
            -
             | 
| 697 | 
            -
                :host([dir='rtl']) [frozen-to-end] [part~='resize-handle']::before {
         | 
| 698 | 
            -
                  right: 0;
         | 
| 699 | 
            -
                  left: auto;
         | 
| 700 | 
            -
                }
         | 
| 701 | 
            -
             | 
| 702 | 
            -
                @media (forced-colors: active) {
         | 
| 703 | 
            -
                  [part~='selected-row'] [part~='first-column-cell']::after {
         | 
| 704 | 
            -
                    content: '';
         | 
| 705 | 
            -
                    position: absolute;
         | 
| 706 | 
            -
                    top: 0;
         | 
| 707 | 
            -
                    left: 0;
         | 
| 708 | 
            -
                    bottom: 0;
         | 
| 709 | 
            -
                    border: 2px solid;
         | 
| 710 | 
            -
                  }
         | 
| 711 | 
            -
             | 
| 712 | 
            -
                  [part~='focused-cell']::before {
         | 
| 713 | 
            -
                    outline: 2px solid !important;
         | 
| 714 | 
            -
                    outline-offset: -1px;
         | 
| 715 | 
            -
                  }
         | 
| 716 | 
            -
                }
         | 
| 717 | 
            -
              `,{moduleId:"vaadin-grid-styles"});var o=i(4241),s=i(6155),n=i(2807),a=i(2521),l=i(3550),d=i(8298),h=i(7913),c=i(1037),_=i(6139),u=i(3726),p=i(262),g=i(4463),m=i(3003),f=i(4346);const b=e=>class extends e{static get observers(){return["_a11yUpdateGridSize(size, _columnTree, _columnTree.*)"]}_a11yGetHeaderRowCount(e){return e.filter((e=>e.some((e=>e.headerRenderer||e.path||e.header)))).length}_a11yGetFooterRowCount(e){return e.filter((e=>e.some((e=>e.headerRenderer)))).length}_a11yUpdateGridSize(e,t){if(void 0===e||void 0===t)return;const i=t[t.length-1];this.$.table.setAttribute("aria-rowcount",e+this._a11yGetHeaderRowCount(t)+this._a11yGetFooterRowCount(t)),this.$.table.setAttribute("aria-colcount",i&&i.length||0),this._a11yUpdateHeaderRows(),this._a11yUpdateFooterRows()}_a11yUpdateHeaderRows(){(0,f.pj)(this.$.header,((e,t)=>{e.setAttribute("aria-rowindex",t+1)}))}_a11yUpdateFooterRows(){(0,f.pj)(this.$.footer,((e,t)=>{e.setAttribute("aria-rowindex",this._a11yGetHeaderRowCount(this._columnTree)+this.size+t+1)}))}_a11yUpdateRowRowindex(e,t){e.setAttribute("aria-rowindex",t+this._a11yGetHeaderRowCount(this._columnTree)+1)}_a11yUpdateRowSelected(e,t){e.setAttribute("aria-selected",Boolean(t)),(0,f.CL)(e,(e=>{e.setAttribute("aria-selected",Boolean(t))}))}_a11yUpdateRowExpanded(e){this.__isRowExpandable(e)?e.setAttribute("aria-expanded","false"):this.__isRowCollapsible(e)?e.setAttribute("aria-expanded","true"):e.removeAttribute("aria-expanded")}_a11yUpdateRowLevel(e,t){t>0||this.__isRowCollapsible(e)||this.__isRowExpandable(e)?e.setAttribute("aria-level",t+1):e.removeAttribute("aria-level")}_a11ySetRowDetailsCell(e,t){(0,f.CL)(e,(e=>{e!==t&&e.setAttribute("aria-controls",t.id)}))}_a11yUpdateCellColspan(e,t){e.setAttribute("aria-colspan",Number(t))}_a11yUpdateSorters(){Array.from(this.querySelectorAll("vaadin-grid-sorter")).forEach((e=>{let t=e.parentNode;for(;t&&"vaadin-grid-cell-content"!==t.localName;)t=t.parentNode;t&&t.assignedSlot&&t.assignedSlot.parentNode.setAttribute("aria-sort",{asc:"ascending",desc:"descending"}[String(e.direction)]||"none")}))}},v=e=>class extends e{static get properties(){return{activeItem:{type:Object,notify:!0,value:null}}}ready(){super.ready(),this.$.scroller.addEventListener("click",this._onClick.bind(this)),this.addEventListener("cell-activate",this._activateItem.bind(this)),this.addEventListener("row-activate",this._activateItem.bind(this))}_activateItem(e){const t=e.detail.model,i=t?t.item:null;i&&(this.activeItem=this._itemsEqual(this.activeItem,i)?null:i)}_onClick(e){if(e.defaultPrevented)return;const t=e.composedPath(),i=t[t.indexOf(this.$.table)-3];if(!i||i.getAttribute("part").indexOf("details-cell")>-1)return;const r=i._content,o=this.getRootNode().activeElement;r.contains(o)||this._isFocusable(e.target)||e.target instanceof HTMLLabelElement||this.dispatchEvent(new CustomEvent("cell-activate",{detail:{model:this.__getRowModel(i.parentElement)}}))}_isFocusable(e){return(e=>{if(!e.parentNode)return!1;const t=Array.from(e.parentNode.querySelectorAll("[tabindex], button, input, select, textarea, object, iframe, a[href], area[href]")).filter((e=>{const t=e.getAttribute("part");return!(t&&t.includes("body-cell"))})).includes(e);return!e.disabled&&t&&e.offsetParent&&"hidden"!==getComputedStyle(e).visibility})(e)}};function C(e,t){return e.split(".").reduce(((e,t)=>e[t]),t)}function w(e,t,i){if(0===i.length)return!1;let r=!0;return e.forEach((({path:e})=>{e&&-1!==e.indexOf(".")&&void 0===C(e.replace(/\.[^.]*$/u,""),i[0])&&(console.warn(`Path "${e}" used for ${t} does not exist in all of the items, ${t} is disabled.`),r=!1)})),r}function y(e){return[void 0,null].indexOf(e)>=0?"":isNaN(e)?e.toString():e}function x(e,t){return(e=y(e))<(t=y(t))?-1:e>t?1:0}const I=e=>class extends e{static get properties(){return{items:Array}}static get observers(){return["__dataProviderOrItemsChanged(dataProvider, items, isAttached, items.*, _filters, _sorters)"]}__setArrayDataProvider(e){const t=(i=this.items,(e,t)=>{let r=i?[...i]:[];e.filters&&w(e.filters,"filtering",r)&&(r=function(e,t){return e.filter((e=>t.every((t=>{const i=y(C(t.path,e)),r=y(t.value).toString().toLowerCase();return i.toString().toLowerCase().includes(r)}))))}(r,e.filters)),Array.isArray(e.sortOrders)&&e.sortOrders.length&&w(e.sortOrders,"sorting",r)&&(r=function(e,t){return e.sort(((e,i)=>t.map((t=>"asc"===t.direction?x(C(t.path,e),C(t.path,i)):"desc"===t.direction?x(C(t.path,i),C(t.path,e)):0)).reduce(((e,t)=>0!==e?e:t),0)))}(r,e.sortOrders));const o=Math.min(r.length,e.pageSize),s=e.page*o,n=s+o;t(r.slice(s,n),r.length)});var i;t.__items=e,this.setProperties({_arrayDataProvider:t,size:e.length,dataProvider:t})}__dataProviderOrItemsChanged(e,t,i){i&&(this._arrayDataProvider?e!==this._arrayDataProvider?this.setProperties({_arrayDataProvider:void 0,items:void 0}):t?this._arrayDataProvider.__items===t?(this.clearCache(),this.size=this._effectiveSize):this.__setArrayDataProvider(t):(this.setProperties({_arrayDataProvider:void 0,dataProvider:void 0,size:0}),this.clearCache()):t&&this.__setArrayDataProvider(t))}};var z=i(9109);const S=e=>class extends e{static get properties(){return{columnReorderingAllowed:{type:Boolean,value:!1},_orderBaseScope:{type:Number,value:1e7}}}static get observers(){return["_updateOrders(_columnTree)"]}ready(){super.ready(),(0,z.NH)(this,"track",this._onTrackEvent),this._reorderGhost=this.shadowRoot.querySelector('[part="reorder-ghost"]'),this.addEventListener("touchstart",this._onTouchStart.bind(this)),this.addEventListener("touchmove",this._onTouchMove.bind(this)),this.addEventListener("touchend",this._onTouchEnd.bind(this)),this.addEventListener("contextmenu",this._onContextMenu.bind(this))}_onContextMenu(e){this.hasAttribute("reordering")&&(e.preventDefault(),c.T||this._onTrackEnd())}_onTouchStart(e){this._startTouchReorderTimeout=setTimeout((()=>{this._onTrackStart({detail:{x:e.touches[0].clientX,y:e.touches[0].clientY}})}),100)}_onTouchMove(e){this._draggedColumn&&e.preventDefault(),clearTimeout(this._startTouchReorderTimeout)}_onTouchEnd(){clearTimeout(this._startTouchReorderTimeout),this._onTrackEnd()}_onTrackEvent(e){if("start"===e.detail.state){const t=e.composedPath(),i=t[t.indexOf(this.$.header)-2];if(!i||!i._content)return;if(i._content.contains(this.getRootNode().activeElement))return;if(this.$.scroller.hasAttribute("column-resizing"))return;this._touchDevice||this._onTrackStart(e)}else"track"===e.detail.state?this._onTrack(e):"end"===e.detail.state&&this._onTrackEnd(e)}_onTrackStart(e){if(!this.columnReorderingAllowed)return;const t=e.composedPath&&e.composedPath();if(t&&t.some((e=>e.hasAttribute&&e.hasAttribute("draggable"))))return;const i=this._cellFromPoint(e.detail.x,e.detail.y);if(i&&i.getAttribute("part").includes("header-cell")){for(this.toggleAttribute("reordering",!0),this._draggedColumn=i._column;1===this._draggedColumn.parentElement.childElementCount;)this._draggedColumn=this._draggedColumn.parentElement;this._setSiblingsReorderStatus(this._draggedColumn,"allowed"),this._draggedColumn._reorderStatus="dragging",this._updateGhost(i),this._reorderGhost.style.visibility="visible",this._updateGhostPosition(e.detail.x,this._touchDevice?e.detail.y-50:e.detail.y),this._autoScroller()}}_onTrack(e){if(!this._draggedColumn)return;const t=this._cellFromPoint(e.detail.x,e.detail.y);if(!t)return;const i=this._getTargetColumn(t,this._draggedColumn);if(this._isSwapAllowed(this._draggedColumn,i)&&this._isSwappableByPosition(i,e.detail.x)){const e=this._columnTree.findIndex((e=>e.includes(i))),t=this._getColumnsInOrder(e),r=t.indexOf(this._draggedColumn),o=t.indexOf(i),s=r<o?1:-1;for(let e=r;e!==o;e+=s)this._swapColumnOrders(this._draggedColumn,t[e+s])}this._updateGhostPosition(e.detail.x,this._touchDevice?e.detail.y-50:e.detail.y),this._lastDragClientX=e.detail.x}_onTrackEnd(){this._draggedColumn&&(this.toggleAttribute("reordering",!1),this._draggedColumn._reorderStatus="",this._setSiblingsReorderStatus(this._draggedColumn,""),this._draggedColumn=null,this._lastDragClientX=null,this._reorderGhost.style.visibility="hidden",this.dispatchEvent(new CustomEvent("column-reorder",{detail:{columns:this._getColumnsInOrder()}})))}_getColumnsInOrder(e=this._columnTree.length-1){return this._columnTree[e].filter((e=>!e.hidden)).sort(((e,t)=>e._order-t._order))}_cellFromPoint(e=0,t=0){this._draggedColumn||this.$.scroller.toggleAttribute("no-content-pointer-events",!0);const i=this.shadowRoot.elementFromPoint(e,t);if(this.$.scroller.toggleAttribute("no-content-pointer-events",!1),i&&i._column)return i}_updateGhostPosition(e,t){const i=this._reorderGhost.getBoundingClientRect(),r=e-i.width/2,o=t-i.height/2,s=parseInt(this._reorderGhost._left||0),n=parseInt(this._reorderGhost._top||0);this._reorderGhost._left=s-(i.left-r),this._reorderGhost._top=n-(i.top-o),this._reorderGhost.style.transform=`translate(${this._reorderGhost._left}px, ${this._reorderGhost._top}px)`}_updateGhost(e){const t=this._reorderGhost;t.textContent=e._content.innerText;const i=window.getComputedStyle(e);return["boxSizing","display","width","height","background","alignItems","padding","border","flex-direction","overflow"].forEach((e=>{t.style[e]=i[e]})),t}_updateOrders(e){void 0!==e&&(e[0].forEach((e=>{e._order=0})),(0,f.kp)(e[0],this._orderBaseScope,0))}_setSiblingsReorderStatus(e,t){(0,f.pj)(e.parentNode,(i=>{/column/u.test(i.localName)&&this._isSwapAllowed(i,e)&&(i._reorderStatus=t)}))}_autoScroller(){if(this._lastDragClientX){const e=this._lastDragClientX-this.getBoundingClientRect().right+50,t=this.getBoundingClientRect().left-this._lastDragClientX+50;e>0?this.$.table.scrollLeft+=e/10:t>0&&(this.$.table.scrollLeft-=t/10)}this._draggedColumn&&setTimeout((()=>this._autoScroller()),10)}_isSwapAllowed(e,t){if(e&&t){const i=e!==t,r=e.parentElement===t.parentElement,o=e.frozen&&t.frozen||e.frozenToEnd&&t.frozenToEnd||!e.frozen&&!e.frozenToEnd&&!t.frozen&&!t.frozenToEnd;return i&&r&&o}}_isSwappableByPosition(e,t){const i=Array.from(this.$.header.querySelectorAll('tr:not([hidden]) [part~="cell"]')).find((t=>e.contains(t._column))),r=this.$.header.querySelector("tr:not([hidden]) [reorder-status=dragging]").getBoundingClientRect(),o=i.getBoundingClientRect();return o.left>r.left?t>o.right-r.width:t<o.left+r.width}_swapColumnOrders(e,t){[e._order,t._order]=[t._order,e._order],this._debounceUpdateFrozenColumn(),this._updateFirstAndLastColumn()}_getTargetColumn(e,t){if(e&&t){let i=e._column;for(;i.parentElement!==t.parentElement&&i!==this;)i=i.parentElement;return i.parentElement===t.parentElement?i:e._column}}},A=e=>class extends e{ready(){super.ready();const e=this.$.scroller;(0,z.NH)(e,"track",this._onHeaderTrack.bind(this)),e.addEventListener("touchmove",(t=>e.hasAttribute("column-resizing")&&t.preventDefault())),e.addEventListener("contextmenu",(e=>"resize-handle"===e.target.getAttribute("part")&&e.preventDefault())),e.addEventListener("mousedown",(e=>"resize-handle"===e.target.getAttribute("part")&&e.preventDefault()))}_onHeaderTrack(e){const t=e.target;if("resize-handle"===t.getAttribute("part")){let i=t.parentElement._column;for(this.$.scroller.toggleAttribute("column-resizing",!0);"vaadin-grid-column-group"===i.localName;)i=i._childColumns.slice(0).sort(((e,t)=>e._order-t._order)).filter((e=>!e.hidden)).pop();const r=this.__isRTL,o=e.detail.x,s=Array.from(this.$.header.querySelectorAll('[part~="row"]:last-child [part~="cell"]')),n=s.find((e=>e._column===i));if(n.offsetWidth){const e=getComputedStyle(n._content),t=10+parseInt(e.paddingLeft)+parseInt(e.paddingRight)+parseInt(e.borderLeftWidth)+parseInt(e.borderRightWidth)+parseInt(e.marginLeft)+parseInt(e.marginRight);let s;const a=n.offsetWidth,l=n.getBoundingClientRect();s=n.hasAttribute("frozen-to-end")?a+(r?o-l.right:l.left-o):a+(r?l.left-o:o-l.right),i.width=`${Math.max(t,s)}px`,i.flexGrow=0}s.sort(((e,t)=>e._column._order-t._column._order)).forEach(((e,t,i)=>{t<i.indexOf(n)&&(e._column.width=`${e.offsetWidth}px`,e._column.flexGrow=0)}));const a=this._frozenToEndCells[0];if(a&&this.$.table.scrollWidth>this.$.table.offsetWidth){const e=a.getBoundingClientRect(),t=o-(r?e.right:e.left);(r&&t<=0||!r&&t>=0)&&(this.$.table.scrollLeft+=t)}"end"===e.detail.state&&(this.$.scroller.toggleAttribute("column-resizing",!1),this.dispatchEvent(new CustomEvent("column-resize",{detail:{resizedColumn:i}}))),this._resizeHandler()}}};var E=i(4905);const R=class e{constructor(e,t,i){this.grid=e,this.parentCache=t,this.parentItem=i,this.itemCaches={},this.items=[],this.effectiveSize=0,this.size=0,this.pendingRequests={}}isLoading(){return Boolean(Object.keys(this.pendingRequests).length||Object.keys(this.itemCaches).filter((e=>this.itemCaches[e].isLoading()))[0])}getItemForIndex(e){const{cache:t,scaledIndex:i}=this.getCacheAndIndex(e);return t.items[i]}updateSize(){this.effectiveSize=!this.parentItem||this.grid._isExpanded(this.parentItem)?this.size+Object.keys(this.itemCaches).reduce(((e,t)=>{const i=this.itemCaches[t];return i.updateSize(),e+i.effectiveSize}),0):0}ensureSubCacheForScaledIndex(t){if(!this.itemCaches[t]){const i=new e(this.grid,this,this.items[t]);this.itemCaches[t]=i,this.grid._loadPage(0,i)}}getCacheAndIndex(e){let t=e;for(const[e,i]of Object.entries(this.itemCaches)){const r=Number(e);if(t<=r)return{cache:this,scaledIndex:t};if(t<=r+i.effectiveSize)return i.getCacheAndIndex(t-r-1);t-=i.effectiveSize}return{cache:this,scaledIndex:t}}getFlatIndex(e){const t=Math.max(0,Math.min(this.size-1,e));return Object.entries(this.itemCaches).reduce(((e,[i,r])=>t>Number(i)?e+r.effectiveSize:e),t)}},F=e=>class extends e{static get properties(){return{size:{type:Number,notify:!0},pageSize:{type:Number,value:50,observer:"_pageSizeChanged"},dataProvider:{type:Object,notify:!0,observer:"_dataProviderChanged"},loading:{type:Boolean,notify:!0,readOnly:!0,reflectToAttribute:!0},_cache:{type:Object,value(){return new R(this)}},_hasData:{type:Boolean,value:!1},itemHasChildrenPath:{type:String,value:"children",observer:"__itemHasChildrenPathChanged"},itemIdPath:{type:String,value:null},expandedItems:{type:Object,notify:!0,value:()=>[]},__expandedKeys:{type:Object,computed:"__computeExpandedKeys(itemIdPath, expandedItems.*)"}}}static get observers(){return["_sizeChanged(size)","_expandedItemsChanged(expandedItems.*)"]}_sizeChanged(e){const t=e-this._cache.size;this._cache.size+=t,this._cache.effectiveSize+=t,this._effectiveSize=this._cache.effectiveSize}__itemHasChildrenPathChanged(e,t){(t||"children"!==e)&&this.requestContentUpdate()}_getItem(e,t){if(e>=this._effectiveSize)return;t.index=e;const{cache:i,scaledIndex:r}=this._cache.getCacheAndIndex(e),o=i.items[r];o?(this.__updateLoading(t,!1),this._updateItem(t,o),this._isExpanded(o)&&i.ensureSubCacheForScaledIndex(r)):(this.__updateLoading(t,!0),this._loadPage(this._getPageForIndex(r),i))}__updateLoading(e,t){const i=(0,f.Fy)(e);(0,f.xq)(e,"loading",t),(0,f.c0)(i,"loading-row-cell",t)}getItemId(e){return this.itemIdPath?(0,E.U)(this.itemIdPath,e):e}_isExpanded(e){return this.__expandedKeys.has(this.getItemId(e))}_expandedItemsChanged(){this._cache.updateSize(),this._effectiveSize=this._cache.effectiveSize,this.__updateVisibleRows()}__computeExpandedKeys(e,t){const i=t.base||[],r=new Set;return i.forEach((e=>{r.add(this.getItemId(e))})),r}expandItem(e){this._isExpanded(e)||(this.expandedItems=[...this.expandedItems,e])}collapseItem(e){this._isExpanded(e)&&(this.expandedItems=this.expandedItems.filter((t=>!this._itemsEqual(t,e))))}_getIndexLevel(e){let{cache:t}=this._cache.getCacheAndIndex(e),i=0;for(;t.parentCache;)t=t.parentCache,i+=1;return i}_loadPage(e,t){if(!t.pendingRequests[e]&&this.dataProvider){this._setLoading(!0),t.pendingRequests[e]=!0;const i={page:e,pageSize:this.pageSize,sortOrders:this._mapSorters(),filters:this._mapFilters(),parentItem:t.parentItem};this.dataProvider(i,((r,o)=>{void 0!==o?t.size=o:i.parentItem&&(t.size=r.length),r.forEach(((i,r)=>{const o=e*this.pageSize+r;t.items[o]=i})),this._cache.updateSize(),this._effectiveSize=this._cache.effectiveSize,this._getRenderedRows().forEach((e=>{const{cache:t,scaledIndex:i}=this._cache.getCacheAndIndex(e.index),r=t.items[i];r&&this._isExpanded(r)&&t.ensureSubCacheForScaledIndex(i)})),this._hasData=!0,delete t.pendingRequests[e],this._debouncerApplyCachedData=_.dx.debounce(this._debouncerApplyCachedData,h.Wc.after(0),(()=>{this._setLoading(!1),this._getRenderedRows().forEach((e=>{this._cache.getItemForIndex(e.index)&&this._getItem(e.index,e)})),this.__scrollToPendingIndexes(),this.__dispatchPendingBodyCellFocus()})),this._cache.isLoading()||this._debouncerApplyCachedData.flush(),this._onDataProviderPageLoaded()}))}}_onDataProviderPageLoaded(){}_getPageForIndex(e){return Math.floor(e/this.pageSize)}clearCache(){this._cache=new R(this),this._cache.size=this.size||0,this._cache.updateSize(),this._hasData=!1,this.__updateVisibleRows(),this._effectiveSize||this._loadPage(0,this._cache)}_pageSizeChanged(e,t){void 0!==t&&e!==t&&this.clearCache()}_checkSize(){void 0===this.size&&0===this._effectiveSize&&console.warn("The <vaadin-grid> needs the total number of items in order to display rows, which you can specify either by setting the `size` property, or by providing it to the second argument of the `dataProvider` function `callback` call.")}_dataProviderChanged(e,t){void 0!==t&&this.clearCache(),this._ensureFirstPageLoaded(),this._debouncerCheckSize=_.dx.debounce(this._debouncerCheckSize,h.Wc.after(2e3),this._checkSize.bind(this))}_ensureFirstPageLoaded(){this._hasData||this._loadPage(0,this._cache)}_itemsEqual(e,t){return this.getItemId(e)===this.getItemId(t)}_getItemIndexInArray(e,t){let i=-1;return t.forEach(((t,r)=>{this._itemsEqual(t,e)&&(i=r)})),i}scrollToIndex(...e){let t;for(;t!==(t=this.__getGlobalFlatIndex(e));)this._scrollToFlatIndex(t);!this._cache.isLoading()&&this.clientHeight||(this.__pendingScrollToIndexes=e)}__getGlobalFlatIndex([e,...t],i=this._cache,r=0){e===1/0&&(e=i.size-1);const o=i.getFlatIndex(e),s=i.itemCaches[e];return s&&s.effectiveSize&&t.length?this.__getGlobalFlatIndex(t,s,r+o+1):r+o}__scrollToPendingIndexes(){if(this.__pendingScrollToIndexes&&this.$.items.children.length){const e=this.__pendingScrollToIndexes;delete this.__pendingScrollToIndexes,this.scrollToIndex(...e)}}},T="between",$="on-top-or-between",D="above",O="below",P="empty",L=!("draggable"in document.createElement("div")),N=e=>class extends e{static get properties(){return{dropMode:String,rowsDraggable:Boolean,dragFilter:Function,dropFilter:Function,__dndAutoScrollThreshold:{value:50}}}static get observers(){return["_dragDropAccessChanged(rowsDraggable, dropMode, dragFilter, dropFilter, loading)"]}ready(){super.ready(),this.$.table.addEventListener("dragstart",this._onDragStart.bind(this)),this.$.table.addEventListener("dragend",this._onDragEnd.bind(this)),this.$.table.addEventListener("dragover",this._onDragOver.bind(this)),this.$.table.addEventListener("dragleave",this._onDragLeave.bind(this)),this.$.table.addEventListener("drop",this._onDrop.bind(this)),this.$.table.addEventListener("dragenter",(e=>{this.dropMode&&(e.preventDefault(),e.stopPropagation())}))}_onDragStart(e){if(this.rowsDraggable){let t=e.target;if("vaadin-grid-cell-content"===t.localName&&(t=t.assignedSlot.parentNode.parentNode),t.parentNode!==this.$.items)return;if(e.stopPropagation(),this.toggleAttribute("dragging-rows",!0),this._safari){const e=t.style.transform;t.style.top=/translateY\((.*)\)/u.exec(e)[1],t.style.transform="none",requestAnimationFrame((()=>{t.style.top="",t.style.transform=e}))}const i=t.getBoundingClientRect();L?e.dataTransfer.setDragImage(t):e.dataTransfer.setDragImage(t,e.clientX-i.left,e.clientY-i.top);let r=[t];this._isSelected(t._item)&&(r=this.__getViewportRows().filter((e=>this._isSelected(e._item))).filter((e=>!this.dragFilter||this.dragFilter(this.__getRowModel(e))))),e.dataTransfer.setData("text",this.__formatDefaultTransferData(r)),(0,f.UN)(t,{dragstart:r.length>1?`${r.length}`:""}),this.style.setProperty("--_grid-drag-start-x",e.clientX-i.left+20+"px"),this.style.setProperty("--_grid-drag-start-y",e.clientY-i.top+10+"px"),requestAnimationFrame((()=>{(0,f.UN)(t,{dragstart:!1}),this.style.setProperty("--_grid-drag-start-x",""),this.style.setProperty("--_grid-drag-start-y","")}));const o=new CustomEvent("grid-dragstart",{detail:{draggedItems:r.map((e=>e._item)),setDragData:(t,i)=>e.dataTransfer.setData(t,i),setDraggedItemsCount:e=>t.setAttribute("dragstart",e)}});o.originalEvent=e,this.dispatchEvent(o)}}_onDragEnd(e){this.toggleAttribute("dragging-rows",!1),e.stopPropagation();const t=new CustomEvent("grid-dragend");t.originalEvent=e,this.dispatchEvent(t)}_onDragLeave(e){e.stopPropagation(),this._clearDragStyles()}_onDragOver(e){if(this.dropMode){if(this._dropLocation=void 0,this._dragOverItem=void 0,this.__dndAutoScroll(e.clientY))return void this._clearDragStyles();let t=e.composedPath().find((e=>"tr"===e.localName));if(this._effectiveSize&&"on-grid"!==this.dropMode)if(t&&t.parentNode===this.$.items){const i=t.getBoundingClientRect();if(this._dropLocation="on-top",this.dropMode===T){const t=e.clientY-i.top<i.bottom-e.clientY;this._dropLocation=t?D:O}else this.dropMode===$&&(e.clientY-i.top<i.height/3?this._dropLocation=D:e.clientY-i.top>i.height/3*2&&(this._dropLocation=O))}else{if(t)return;if(this.dropMode!==T&&this.dropMode!==$)return;t=Array.from(this.$.items.children).filter((e=>!e.hidden)).pop(),this._dropLocation=O}else this._dropLocation=P;if(t&&t.hasAttribute("drop-disabled"))return void(this._dropLocation=void 0);e.stopPropagation(),e.preventDefault(),this._dropLocation===P?this.toggleAttribute("dragover",!0):t?(this._dragOverItem=t._item,t.getAttribute("dragover")!==this._dropLocation&&(0,f.cO)(t,{dragover:this._dropLocation})):this._clearDragStyles()}}__dndAutoScroll(e){if(this.__dndAutoScrolling)return!0;const t=this.$.header.getBoundingClientRect().bottom,i=this.$.footer.getBoundingClientRect().top,r=t-e+this.__dndAutoScrollThreshold,o=e-i+this.__dndAutoScrollThreshold;let s=0;if(o>0?s=2*o:r>0&&(s=2*-r),s){const e=this.$.table.scrollTop;if(this.$.table.scrollTop+=s,e!==this.$.table.scrollTop)return this.__dndAutoScrolling=!0,setTimeout((()=>{this.__dndAutoScrolling=!1}),20),!0}}__getViewportRows(){const e=this.$.header.getBoundingClientRect().bottom,t=this.$.footer.getBoundingClientRect().top;return Array.from(this.$.items.children).filter((i=>{const r=i.getBoundingClientRect();return r.bottom>e&&r.top<t}))}_clearDragStyles(){this.removeAttribute("dragover"),(0,f.pj)(this.$.items,(e=>{(0,f.cO)(e,{dragover:null})}))}_onDrop(e){if(this.dropMode){e.stopPropagation(),e.preventDefault();const t=e.dataTransfer.types&&Array.from(e.dataTransfer.types).map((t=>({type:t,data:e.dataTransfer.getData(t)})));this._clearDragStyles();const i=new CustomEvent("grid-drop",{bubbles:e.bubbles,cancelable:e.cancelable,detail:{dropTargetItem:this._dragOverItem,dropLocation:this._dropLocation,dragData:t}});i.originalEvent=e,this.dispatchEvent(i)}}__formatDefaultTransferData(e){return e.map((e=>Array.from(e.children).filter((e=>!e.hidden&&-1===e.getAttribute("part").indexOf("details-cell"))).sort(((e,t)=>e._column._order>t._column._order?1:-1)).map((e=>e._content.textContent.trim())).filter((e=>e)).join("\t"))).join("\n")}_dragDropAccessChanged(){this.filterDragAndDrop()}filterDragAndDrop(){(0,f.pj)(this.$.items,(e=>{e.hidden||this._filterDragAndDrop(e,this.__getRowModel(e))}))}_filterDragAndDrop(e,t){const i=this.loading||e.hasAttribute("loading"),r=!this.rowsDraggable||i||this.dragFilter&&!this.dragFilter(t),o=!this.dropMode||i||this.dropFilter&&!this.dropFilter(t);(0,f.CL)(e,(e=>{r?e._content.removeAttribute("draggable"):e._content.setAttribute("draggable",!0)})),(0,f.UN)(e,{"drag-disabled":!!r,"drop-disabled":!!o})}};function k(e,t,i){return{index:e,removed:t,addedCount:i}}i(7894);function M(e,t){return e===t}var H=i(2224),W=i(1342);function B(e){return"slot"===e.localName}let G=class{static getFlattenedNodes(e){const t=(0,W.r)(e);return B(e)?t.assignedNodes({flatten:!0}):Array.from(t.childNodes).map((e=>B(e)?(0,W.r)(e).assignedNodes({flatten:!0}):[e])).reduce(((e,t)=>e.concat(t)),[])}constructor(e,t){this._shadyChildrenObserver=null,this._nativeChildrenObserver=null,this._connected=!1,this._target=e,this.callback=t,this._effectiveNodes=[],this._observer=null,this._scheduled=!1,this._boundSchedule=()=>{this._schedule()},this.connect(),this._schedule()}connect(){B(this._target)?this._listenSlots([this._target]):(0,W.r)(this._target).children&&(this._listenSlots((0,W.r)(this._target).children),window.ShadyDOM?this._shadyChildrenObserver=window.ShadyDOM.observeChildren(this._target,(e=>{this._processMutations(e)})):(this._nativeChildrenObserver=new MutationObserver((e=>{this._processMutations(e)})),this._nativeChildrenObserver.observe(this._target,{childList:!0}))),this._connected=!0}disconnect(){B(this._target)?this._unlistenSlots([this._target]):(0,W.r)(this._target).children&&(this._unlistenSlots((0,W.r)(this._target).children),window.ShadyDOM&&this._shadyChildrenObserver?(window.ShadyDOM.unobserveChildren(this._shadyChildrenObserver),this._shadyChildrenObserver=null):this._nativeChildrenObserver&&(this._nativeChildrenObserver.disconnect(),this._nativeChildrenObserver=null)),this._connected=!1}_schedule(){this._scheduled||(this._scheduled=!0,H.YA.run((()=>this.flush())))}_processMutations(e){this._processSlotMutations(e),this.flush()}_processSlotMutations(e){if(e)for(let t=0;t<e.length;t++){let i=e[t];i.addedNodes&&this._listenSlots(i.addedNodes),i.removedNodes&&this._unlistenSlots(i.removedNodes)}}flush(){if(!this._connected)return!1;window.ShadyDOM&&ShadyDOM.flush(),this._nativeChildrenObserver?this._processSlotMutations(this._nativeChildrenObserver.takeRecords()):this._shadyChildrenObserver&&this._processSlotMutations(this._shadyChildrenObserver.takeRecords()),this._scheduled=!1;let e={target:this._target,addedNodes:[],removedNodes:[]},t=this.constructor.getFlattenedNodes(this._target),i=(r=t,o=this._effectiveNodes,function(e,t,i,r,o,s){let n,a=0,l=0,d=Math.min(i-t,s-o);if(0==t&&0==o&&(a=function(e,t,i){for(let r=0;r<i;r++)if(!M(e[r],t[r]))return r;return i}(e,r,d)),i==e.length&&s==r.length&&(l=function(e,t,i){let r=e.length,o=t.length,s=0;for(;s<i&&M(e[--r],t[--o]);)s++;return s}(e,r,d-a)),o+=a,s-=l,(i-=l)-(t+=a)==0&&s-o==0)return[];if(t==i){for(n=k(t,[],0);o<s;)n.removed.push(r[o++]);return[n]}if(o==s)return[k(t,[],i-t)];let h=function(e){let t=e.length-1,i=e[0].length-1,r=e[t][i],o=[];for(;t>0||i>0;){if(0==t){o.push(2),i--;continue}if(0==i){o.push(3),t--;continue}let s,n=e[t-1][i-1],a=e[t-1][i],l=e[t][i-1];s=a<l?a<n?a:n:l<n?l:n,s==n?(n==r?o.push(0):(o.push(1),r=n),t--,i--):s==a?(o.push(3),t--,r=a):(o.push(2),i--,r=l)}return o.reverse(),o}(function(e,t,i,r,o,s){let n=s-o+1,a=i-t+1,l=new Array(n);for(let e=0;e<n;e++)l[e]=new Array(a),l[e][0]=e;for(let e=0;e<a;e++)l[0][e]=e;for(let i=1;i<n;i++)for(let s=1;s<a;s++)if(M(e[t+s-1],r[o+i-1]))l[i][s]=l[i-1][s-1];else{let e=l[i-1][s]+1,t=l[i][s-1]+1;l[i][s]=e<t?e:t}return l}(e,t,i,r,o,s));n=void 0;let c=[],_=t,u=o;for(let e=0;e<h.length;e++)switch(h[e]){case 0:n&&(c.push(n),n=void 0),_++,u++;break;case 1:n||(n=k(_,[],0)),n.addedCount++,_++,n.removed.push(r[u]),u++;break;case 2:n||(n=k(_,[],0)),n.addedCount++,_++;break;case 3:n||(n=k(_,[],0)),n.removed.push(r[u]),u++}return n&&c.push(n),c}(r,0,r.length,o,0,o.length));var r,o;for(let t,r=0;r<i.length&&(t=i[r]);r++)for(let i,r=0;r<t.removed.length&&(i=t.removed[r]);r++)e.removedNodes.push(i);for(let r,o=0;o<i.length&&(r=i[o]);o++)for(let i=r.index;i<r.index+r.addedCount;i++)e.addedNodes.push(t[i]);this._effectiveNodes=t;let s=!1;return(e.addedNodes.length||e.removedNodes.length)&&(s=!0,this.callback.call(this._target,e)),s}_listenSlots(e){for(let t=0;t<e.length;t++){let i=e[t];B(i)&&i.addEventListener("slotchange",this._boundSchedule)}}_unlistenSlots(e){for(let t=0;t<e.length;t++){let i=e[t];B(i)&&i.removeEventListener("slotchange",this._boundSchedule)}}};function U(e,t){if(!e||!t||e.length!==t.length)return!1;for(let i=0,r=e.length;i<r;i++)if(e[i]instanceof Array&&t[i]instanceof Array){if(!U(e[i],t[i]))return!1}else if(e[i]!==t[i])return!1;return!0}const V=e=>class extends e{static get properties(){return{_columnTree:Object}}ready(){super.ready(),this._addNodeObserver()}_hasColumnGroups(e){return e.some((e=>"vaadin-grid-column-group"===e.localName))}_getChildColumns(e){return G.getFlattenedNodes(e).filter(this._isColumnElement)}_flattenColumnGroups(e){return e.map((e=>"vaadin-grid-column-group"===e.localName?this._getChildColumns(e):[e])).reduce(((e,t)=>e.concat(t)),[])}_getColumnTree(){const e=G.getFlattenedNodes(this).filter(this._isColumnElement),t=[e];let i=e;for(;this._hasColumnGroups(i);)i=this._flattenColumnGroups(i),t.push(i);return t}_debounceUpdateColumnTree(){this.__updateColumnTreeDebouncer=_.dx.debounce(this.__updateColumnTreeDebouncer,h.YA,(()=>this._updateColumnTree()))}_updateColumnTree(){const e=this._getColumnTree();U(e,this._columnTree)||(this._columnTree=e)}_addNodeObserver(){this._observer=new G(this,(e=>{const t=e=>e.filter(this._isColumnElement).length>0;if(t(e.addedNodes)||t(e.removedNodes)){const t=e.removedNodes.flatMap((e=>e._allCells)),i=e=>t.filter((t=>t&&t._content.contains(e))).length;this.__removeSorters(this._sorters.filter(i)),this.__removeFilters(this._filters.filter(i)),this._debounceUpdateColumnTree()}this._debouncerCheckImports=_.dx.debounce(this._debouncerCheckImports,h.Wc.after(2e3),this._checkImports.bind(this)),this._ensureFirstPageLoaded()}))}_checkImports(){["vaadin-grid-column-group","vaadin-grid-filter","vaadin-grid-filter-column","vaadin-grid-tree-toggle","vaadin-grid-selection-column","vaadin-grid-sort-column","vaadin-grid-sorter"].forEach((e=>{const t=this.querySelector(e);!t||t instanceof o.H3||console.warn(`Make sure you have imported the required module for <${e}> element.`)}))}_updateFirstAndLastColumn(){Array.from(this.shadowRoot.querySelectorAll("tr")).forEach((e=>this._updateFirstAndLastColumnForRow(e)))}_updateFirstAndLastColumnForRow(e){Array.from(e.querySelectorAll('[part~="cell"]:not([part~="details-cell"])')).sort(((e,t)=>e._column._order-t._column._order)).forEach(((e,t,i)=>{(0,f.FQ)(e,"first-column",0===t),(0,f.FQ)(e,"last-column",t===i.length-1)}))}_isColumnElement(e){return e.nodeType===Node.ELEMENT_NODE&&/\bcolumn\b/u.test(e.localName)}},q=e=>class extends e{getEventContext(e){const t={},i=e.__composedPath||e.composedPath(),r=i[i.indexOf(this.$.table)-3];return r?(t.section=["body","header","footer","details"].find((e=>r.getAttribute("part").indexOf(e)>-1)),r._column&&(t.column=r._column),"body"!==t.section&&"details"!==t.section||Object.assign(t,this.__getRowModel(r.parentElement)),t):t}},j=e=>class extends e{static get properties(){return{_filters:{type:Array,value:()=>[]}}}ready(){super.ready(),this.addEventListener("filter-changed",this._filterChanged.bind(this))}_filterChanged(e){e.stopPropagation(),this.__addFilter(e.target),this.__applyFilters()}__removeFilters(e){0!==e.length&&(this._filters=this._filters.filter((t=>e.indexOf(t)<0)),this.__applyFilters())}__addFilter(e){-1===this._filters.indexOf(e)&&this._filters.push(e)}__applyFilters(){this.dataProvider&&this.isAttached&&this.clearCache()}_mapFilters(){return this._filters.map((e=>({path:e.path,value:e.value})))}},K=e=>class extends e{static get properties(){return{_headerFocusable:{type:Object,observer:"_focusableChanged"},_itemsFocusable:{type:Object,observer:"_focusableChanged"},_footerFocusable:{type:Object,observer:"_focusableChanged"},_navigatingIsHidden:Boolean,_focusedItemIndex:{type:Number,value:0},_focusedColumnOrder:Number,_focusedCell:{type:Object,observer:"_focusedCellChanged"},interacting:{type:Boolean,value:!1,reflectToAttribute:!0,readOnly:!0,observer:"_interactingChanged"}}}get __rowFocusMode(){return this.__isRow(this._itemsFocusable)||this.__isRow(this._headerFocusable)||this.__isRow(this._footerFocusable)}set __rowFocusMode(e){["_itemsFocusable","_footerFocusable","_headerFocusable"].forEach((t=>{const i=this[t];if(e){const e=i&&i.parentElement;this.__isCell(i)?this[t]=e:this.__isCell(e)&&(this[t]=e.parentElement)}else if(!e&&this.__isRow(i)){const e=i.firstElementChild;this[t]=e._focusButton||e}}))}ready(){super.ready(),this._ios||this._android||(this.addEventListener("keydown",this._onKeyDown),this.addEventListener("keyup",this._onKeyUp),this.addEventListener("focusin",this._onFocusIn),this.addEventListener("focusout",this._onFocusOut),this.$.table.addEventListener("focusin",this._onContentFocusIn.bind(this)),this.addEventListener("mousedown",(()=>{this.toggleAttribute("navigating",!1),this._isMousedown=!0,this._focusedColumnOrder=void 0})),this.addEventListener("mouseup",(()=>{this._isMousedown=!1})))}_focusableChanged(e,t){t&&t.setAttribute("tabindex","-1"),e&&this._updateGridSectionFocusTarget(e)}_focusedCellChanged(e,t){t&&(0,u.x_)(t,"part","focused-cell"),e&&(0,u.$2)(e,"part","focused-cell")}_interactingChanged(){this._updateGridSectionFocusTarget(this._headerFocusable),this._updateGridSectionFocusTarget(this._itemsFocusable),this._updateGridSectionFocusTarget(this._footerFocusable)}__updateItemsFocusable(){if(!this._itemsFocusable)return;const e=this.shadowRoot.activeElement===this._itemsFocusable;this._getRenderedRows().forEach((e=>{if(e.index===this._focusedItemIndex)if(this.__rowFocusMode)this._itemsFocusable=e;else{let t=this._itemsFocusable.parentElement,i=this._itemsFocusable;if(t){this.__isCell(t)&&(i=t,t=t.parentElement);const r=[...t.children].indexOf(i);this._itemsFocusable=this.__getFocusable(e,e.children[r])}}})),e&&this._itemsFocusable.focus()}_onKeyDown(e){const t=e.key;let i;switch(t){case"ArrowUp":case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"PageUp":case"PageDown":case"Home":case"End":i="Navigation";break;case"Enter":case"Escape":case"F2":i="Interaction";break;case"Tab":i="Tab";break;case" ":i="Space"}this._detectInteracting(e),this.interacting&&"Interaction"!==i&&(i=void 0),i&&this[`_on${i}KeyDown`](e,t)}_ensureScrolledToIndex(e){[...this.$.items.children].find((t=>t.index===e))?this.__scrollIntoViewport(e):this.scrollToIndex(e)}__isRowExpandable(e){if(this.itemHasChildrenPath){const t=e._item;return t&&(0,E.U)(this.itemHasChildrenPath,t)&&!this._isExpanded(t)}}__isRowCollapsible(e){return this._isExpanded(e._item)}__isDetailsCell(e){return e.matches('[part~="details-cell"]')}__isCell(e){return e instanceof HTMLTableCellElement}__isRow(e){return e instanceof HTMLTableRowElement}__getIndexOfChildElement(e){return Array.prototype.indexOf.call(e.parentNode.children,e)}_onNavigationKeyDown(e,t){e.preventDefault();const i=this._lastVisibleIndex-this._firstVisibleIndex-1,r=this.__isRTL;let o=0,s=0;switch(t){case"ArrowRight":o=r?-1:1;break;case"ArrowLeft":o=r?1:-1;break;case"Home":this.__rowFocusMode||e.ctrlKey?s=-1/0:o=-1/0;break;case"End":this.__rowFocusMode||e.ctrlKey?s=1/0:o=1/0;break;case"ArrowDown":s=1;break;case"ArrowUp":s=-1;break;case"PageDown":s=i;break;case"PageUp":s=-i}const n=e.composedPath().find((e=>this.__isRow(e))),a=e.composedPath().find((e=>this.__isCell(e)));if(this.__rowFocusMode&&!n||!this.__rowFocusMode&&!a)return;const l=r?"ArrowRight":"ArrowLeft";if(t===(r?"ArrowLeft":"ArrowRight")){if(this.__rowFocusMode)return this.__isRowExpandable(n)?void this.expandItem(n._item):(this.__rowFocusMode=!1,void this._onCellNavigation(n.firstElementChild,0,0))}else if(t===l)if(this.__rowFocusMode){if(this.__isRowCollapsible(n))return void this.collapseItem(n._item)}else if(a===[...n.children].sort(((e,t)=>e._order-t._order))[0]||this.__isDetailsCell(a))return this.__rowFocusMode=!0,void this._onRowNavigation(n,0);this.__rowFocusMode?this._onRowNavigation(n,s):this._onCellNavigation(a,o,s)}_onRowNavigation(e,t){const{dstRow:i}=this.__navigateRows(t,e);i&&i.focus()}__getIndexInGroup(e,t){return e.parentNode===this.$.items?void 0!==t?t:e.index:this.__getIndexOfChildElement(e)}__navigateRows(e,t,i){const r=this.__getIndexInGroup(t,this._focusedItemIndex),o=t.parentNode,s=(o===this.$.items?this._effectiveSize:o.children.length)-1;let n=Math.max(0,Math.min(r+e,s));if(o!==this.$.items){if(n>r)for(;n<s&&o.children[n].hidden;)n+=1;else if(n<r)for(;n>0&&o.children[n].hidden;)n-=1;return this.toggleAttribute("navigating",!0),{dstRow:o.children[n]}}let a=!1;if(i){const s=this.__isDetailsCell(i);if(o===this.$.items){const i=t._item,o=this._cache.getItemForIndex(n);a=s?0===e:1===e&&this._isDetailsOpened(i)||-1===e&&n!==r&&this._isDetailsOpened(o),a!==s&&(1===e&&a||-1===e&&!a)&&(n=r)}}return this._ensureScrolledToIndex(n),this._focusedItemIndex=n,this.toggleAttribute("navigating",!0),{dstRow:[...o.children].find((e=>!e.hidden&&e.index===n)),dstIsRowDetails:a}}_onCellNavigation(e,t,i){const r=e.parentNode,{dstRow:o,dstIsRowDetails:s}=this.__navigateRows(i,r,e);if(!o)return;let n=this.__getIndexOfChildElement(e);this.$.items.contains(e)&&(n=[...this.$.sizer.children].findIndex((t=>t._column===e._column)));const a=this.__isDetailsCell(e),l=r.parentNode,d=this.__getIndexInGroup(r,this._focusedItemIndex);if(void 0===this._focusedColumnOrder&&(this._focusedColumnOrder=a?0:this._getColumns(l,d).filter((e=>!e.hidden))[n]._order),s)[...o.children].find((e=>this.__isDetailsCell(e))).focus();else{const r=this.__getIndexInGroup(o,this._focusedItemIndex),s=this._getColumns(l,r).filter((e=>!e.hidden)),n=s.map((e=>e._order)).sort(((e,t)=>e-t)),d=n.length-1,h=n.indexOf(n.slice(0).sort(((e,t)=>Math.abs(e-this._focusedColumnOrder)-Math.abs(t-this._focusedColumnOrder)))[0]),c=0===i&&a?h:Math.max(0,Math.min(h+t,d));c!==h&&(this._focusedColumnOrder=void 0);const _=s.reduce(((e,t,i)=>(e[t._order]=i,e)),{})[n[c]];let u;if(this.$.items.contains(e)){const e=this.$.sizer.children[_];this._lazyColumns&&(this.__isColumnInViewport(e._column)||e.scrollIntoView(),this.__updateColumnsBodyContentHidden(),this.__updateHorizontalScrollPosition()),u=[...o.children].find((t=>t._column===e._column)),this._scrollHorizontallyToCell(u)}else u=o.children[_],this._scrollHorizontallyToCell(u);u.focus()}}_onInteractionKeyDown(e,t){const i=e.composedPath()[0],r="input"===i.localName&&!/^(button|checkbox|color|file|image|radio|range|reset|submit)$/iu.test(i.type);let o;switch(t){case"Enter":o=!this.interacting||!r;break;case"Escape":o=!1;break;case"F2":o=!this.interacting}const{cell:s}=this._getGridEventLocation(e);if(this.interacting!==o&&null!==s)if(o){const t=s._content.querySelector("[focus-target]")||[...s._content.querySelectorAll("*")].find((e=>this._isFocusable(e)));t&&(e.preventDefault(),t.focus(),this._setInteracting(!0),this.toggleAttribute("navigating",!1))}else e.preventDefault(),this._focusedColumnOrder=void 0,s.focus(),this._setInteracting(!1),this.toggleAttribute("navigating",!0);"Escape"===t&&this._hideTooltip(!0)}_predictFocusStepTarget(e,t){const i=[this.$.table,this._headerFocusable,this._itemsFocusable,this._footerFocusable,this.$.focusexit];let r=i.indexOf(e);for(r+=t;r>=0&&r<=i.length-1;){let e=i[r];if(e&&!this.__rowFocusMode&&(e=i[r].parentNode),e&&!e.hidden)break;r+=t}let o=i[r];if(o&&!this.__isHorizontallyInViewport(o)){const e=this._getColumnsInOrder().find((e=>this.__isColumnInViewport(e)));if(e)if(o===this._headerFocusable)o=e._headerCell;else if(o===this._itemsFocusable){const t=o._column._cells.indexOf(o);o=e._cells[t]}else o===this._footerFocusable&&(o=e._footerCell)}return o}_onTabKeyDown(e){const t=this._predictFocusStepTarget(e.composedPath()[0],e.shiftKey?-1:1);if(t){if(e.stopPropagation(),t===this.$.table)this.$.table.focus();else if(t===this.$.focusexit)this.$.focusexit.focus();else if(t===this._itemsFocusable){let i=t;const r=this.__isRow(t)?t:t.parentNode;if(this._ensureScrolledToIndex(this._focusedItemIndex),r.index!==this._focusedItemIndex&&this.__isCell(t)){const e=Array.from(r.children).indexOf(this._itemsFocusable),t=Array.from(this.$.items.children).find((e=>!e.hidden&&e.index===this._focusedItemIndex));t&&(i=t.children[e])}e.preventDefault(),i.focus()}else e.preventDefault(),t.focus();this.toggleAttribute("navigating",!0)}}_onSpaceKeyDown(e){e.preventDefault();const t=e.composedPath()[0],i=this.__isRow(t);!i&&t._content&&t._content.firstElementChild||this.dispatchEvent(new CustomEvent(i?"row-activate":"cell-activate",{detail:{model:this.__getRowModel(i?t:t.parentElement)}}))}_onKeyUp(e){if(!/^( |SpaceBar)$/u.test(e.key)||this.interacting)return;e.preventDefault();const t=e.composedPath()[0];if(t._content&&t._content.firstElementChild){const i=this.hasAttribute("navigating");t._content.firstElementChild.dispatchEvent(new MouseEvent("click",{shiftKey:e.shiftKey,bubbles:!0,composed:!0,cancelable:!0})),this.toggleAttribute("navigating",i)}}_onFocusIn(e){this._isMousedown||this.toggleAttribute("navigating",!0);const t=e.composedPath()[0];t===this.$.table||t===this.$.focusexit?(this._predictFocusStepTarget(t,t===this.$.table?1:-1).focus(),this._setInteracting(!1)):this._detectInteracting(e)}_onFocusOut(e){this.toggleAttribute("navigating",!1),this._detectInteracting(e),this._hideTooltip(),this._focusedCell=null}_onContentFocusIn(e){const{section:t,cell:i,row:r}=this._getGridEventLocation(e);if(i||this.__rowFocusMode){if(this._detectInteracting(e),t&&(i||r))if(this._activeRowGroup=t,this.$.header===t?this._headerFocusable=this.__getFocusable(r,i):this.$.items===t?this._itemsFocusable=this.__getFocusable(r,i):this.$.footer===t&&(this._footerFocusable=this.__getFocusable(r,i)),i){const t=this.getEventContext(e);this.__pendingBodyCellFocus=this.loading&&"body"===t.section,this.__pendingBodyCellFocus||i.dispatchEvent(new CustomEvent("cell-focus",{bubbles:!0,composed:!0,detail:{context:t}})),this._focusedCell=i._focusButton||i,(0,l.LQ)()&&e.target===i&&this._showTooltip(e)}else this._focusedCell=null;this._detectFocusedItemIndex(e)}}__dispatchPendingBodyCellFocus(){this.__pendingBodyCellFocus&&this.shadowRoot.activeElement===this._itemsFocusable&&this._itemsFocusable.dispatchEvent(new Event("focusin",{bubbles:!0,composed:!0}))}__getFocusable(e,t){return this.__rowFocusMode?e:t._focusButton||t}_detectInteracting(e){const t=e.composedPath().some((e=>"vaadin-grid-cell-content"===e.localName));this._setInteracting(t),this.__updateHorizontalScrollPosition()}_detectFocusedItemIndex(e){const{section:t,row:i}=this._getGridEventLocation(e);t===this.$.items&&(this._focusedItemIndex=i.index)}_updateGridSectionFocusTarget(e){if(!e)return;const t=this._getGridSectionFromFocusTarget(e),i=this.interacting&&t===this._activeRowGroup;e.tabIndex=i?-1:0}_preventScrollerRotatingCellFocus(e,t){e.index===this._focusedItemIndex&&this.hasAttribute("navigating")&&this._activeRowGroup===this.$.items&&(this._navigatingIsHidden=!0,this.toggleAttribute("navigating",!1)),t===this._focusedItemIndex&&this._navigatingIsHidden&&(this._navigatingIsHidden=!1,this.toggleAttribute("navigating",!0))}_getColumns(e,t){let i=this._columnTree.length-1;return e===this.$.header?i=t:e===this.$.footer&&(i=this._columnTree.length-1-t),this._columnTree[i]}__isValidFocusable(e){return this.$.table.contains(e)&&e.offsetHeight}_resetKeyboardNavigation(){if(["header","footer"].forEach((e=>{if(!this.__isValidFocusable(this[`_${e}Focusable`])){const t=[...this.$[e].children].find((e=>e.offsetHeight)),i=t?[...t.children].find((e=>!e.hidden)):null;t&&i&&(this[`_${e}Focusable`]=this.__getFocusable(t,i))}})),!this.__isValidFocusable(this._itemsFocusable)&&this.$.items.firstElementChild){const e=this.__getFirstVisibleItem(),t=e?[...e.children].find((e=>!e.hidden)):null;t&&e&&(delete this._focusedColumnOrder,this._itemsFocusable=this.__getFocusable(e,t))}else this.__updateItemsFocusable()}_scrollHorizontallyToCell(e){if(e.hasAttribute("frozen")||e.hasAttribute("frozen-to-end")||this.__isDetailsCell(e))return;const t=e.getBoundingClientRect(),i=e.parentNode,r=Array.from(i.children).indexOf(e),o=this.$.table.getBoundingClientRect();let s=o.left,n=o.right;for(let e=r-1;e>=0;e--){const t=i.children[e];if(!t.hasAttribute("hidden")&&!this.__isDetailsCell(t)&&(t.hasAttribute("frozen")||t.hasAttribute("frozen-to-end"))){s=t.getBoundingClientRect().right;break}}for(let e=r+1;e<i.children.length;e++){const t=i.children[e];if(!t.hasAttribute("hidden")&&!this.__isDetailsCell(t)&&(t.hasAttribute("frozen")||t.hasAttribute("frozen-to-end"))){n=t.getBoundingClientRect().left;break}}t.left<s&&(this.$.table.scrollLeft+=Math.round(t.left-s)),t.right>n&&(this.$.table.scrollLeft+=Math.round(t.right-n))}_getGridEventLocation(e){const t=e.composedPath(),i=t.indexOf(this.$.table);return{section:i>=1?t[i-1]:null,row:i>=2?t[i-2]:null,cell:i>=3?t[i-3]:null}}_getGridSectionFromFocusTarget(e){return e===this._headerFocusable?this.$.header:e===this._itemsFocusable?this.$.items:e===this._footerFocusable?this.$.footer:null}},Y=e=>class extends e{static get properties(){return{detailsOpenedItems:{type:Array,value:()=>[]},rowDetailsRenderer:Function,_detailsCells:{type:Array}}}static get observers(){return["_detailsOpenedItemsChanged(detailsOpenedItems.*, rowDetailsRenderer)","_rowDetailsRendererChanged(rowDetailsRenderer)"]}ready(){super.ready(),this._detailsCellResizeObserver=new ResizeObserver((e=>{e.forEach((({target:e})=>{this._updateDetailsCellHeight(e.parentElement)})),this.__virtualizer.__adapter._resizeHandler()}))}_rowDetailsRendererChanged(e){e&&this._columnTree&&(0,f.pj)(this.$.items,(e=>{if(!e.querySelector("[part~=details-cell]")){this._updateRow(e,this._columnTree[this._columnTree.length-1]);const t=this._isDetailsOpened(e._item);this._toggleDetailsCell(e,t)}}))}_detailsOpenedItemsChanged(e,t){"detailsOpenedItems.length"!==e.path&&e.value&&(0,f.pj)(this.$.items,(e=>{(e.hasAttribute("details-opened")||t&&this._isDetailsOpened(e._item))&&this._updateItem(e,e._item)}))}_configureDetailsCell(e){e.setAttribute("part","cell details-cell"),e.toggleAttribute("frozen",!0),this._detailsCellResizeObserver.observe(e)}_toggleDetailsCell(e,t){const i=e.querySelector('[part~="details-cell"]');i&&(i.hidden=!t,i.hidden||this.rowDetailsRenderer&&(i._renderer=this.rowDetailsRenderer))}_updateDetailsCellHeight(e){const t=e.querySelector('[part~="details-cell"]');t&&(this.__updateDetailsRowPadding(e,t),requestAnimationFrame((()=>this.__updateDetailsRowPadding(e,t))))}__updateDetailsRowPadding(e,t){t.hidden?e.style.removeProperty("padding-bottom"):e.style.setProperty("padding-bottom",`${t.offsetHeight}px`)}_updateDetailsCellHeights(){(0,f.pj)(this.$.items,(e=>{this._updateDetailsCellHeight(e)}))}_isDetailsOpened(e){return this.detailsOpenedItems&&-1!==this._getItemIndexInArray(e,this.detailsOpenedItems)}openItemDetails(e){this._isDetailsOpened(e)||(this.detailsOpenedItems=[...this.detailsOpenedItems,e])}closeItemDetails(e){this._isDetailsOpened(e)&&(this.detailsOpenedItems=this.detailsOpenedItems.filter((t=>!this._itemsEqual(t,e))))}},X=document.createElement("div");function J(e,t){const{scrollLeft:i}=e;return"rtl"!==t?i:e.scrollWidth-e.clientWidth+i}X.style.position="fixed",X.style.clip="rect(0px, 0px, 0px, 0px)",X.setAttribute("aria-live","polite"),document.body.appendChild(X),i(1224),i(1370),i(5229),i(9107),i(1360),i(1486),i(3392),i(2628);var Q=i(9680);const Z=e=>class extends((0,Q.F)(e)){static get properties(){return{columnRendering:{type:String,value:"eager"},_frozenCells:{type:Array,value:()=>[]},_frozenToEndCells:{type:Array,value:()=>[]},_rowWithFocusedElement:Element}}static get observers(){return["__columnRenderingChanged(_columnTree, columnRendering)"]}get _scrollLeft(){return this.$.table.scrollLeft}get _scrollTop(){return this.$.table.scrollTop}set _scrollTop(e){this.$.table.scrollTop=e}get _lazyColumns(){return"lazy"===this.columnRendering}ready(){super.ready(),this.scrollTarget=this.$.table,this.$.items.addEventListener("focusin",(e=>{const t=e.composedPath().indexOf(this.$.items);this._rowWithFocusedElement=e.composedPath()[t-1]})),this.$.items.addEventListener("focusout",(()=>{this._rowWithFocusedElement=void 0})),this.$.table.addEventListener("scroll",(()=>this._afterScroll()))}_onResize(){if(this._updateOverflow(),this.__updateHorizontalScrollPosition(),this._firefox){const e=!(0,l.GF)(this);e&&!1===this.__previousVisible&&(this._scrollTop=this.__memorizedScrollTop||0),this.__previousVisible=e}}_scrollToFlatIndex(e){e=Math.min(this._effectiveSize-1,Math.max(0,e)),this.__virtualizer.scrollToIndex(e),this.__scrollIntoViewport(e)}__scrollIntoViewport(e){const t=[...this.$.items.children].find((t=>t.index===e));if(t){const e=t.getBoundingClientRect(),i=this.$.footer.getBoundingClientRect().top,r=this.$.header.getBoundingClientRect().bottom;e.bottom>i?this.$.table.scrollTop+=e.bottom-i:e.top<r&&(this.$.table.scrollTop-=r-e.top)}}_scheduleScrolling(){this._scrollingFrame||(this._scrollingFrame=requestAnimationFrame((()=>this.$.scroller.toggleAttribute("scrolling",!0)))),this._debounceScrolling=_.dx.debounce(this._debounceScrolling,h.Wc.after(500),(()=>{cancelAnimationFrame(this._scrollingFrame),delete this._scrollingFrame,this.$.scroller.toggleAttribute("scrolling",!1)}))}_afterScroll(){this.__updateHorizontalScrollPosition(),this.hasAttribute("reordering")||this._scheduleScrolling(),this.hasAttribute("navigating")||this._hideTooltip(!0),this._updateOverflow(),this._debounceColumnContentVisibility=_.dx.debounce(this._debounceColumnContentVisibility,h.Wc.after(100),(()=>{this._lazyColumns&&this.__cachedScrollLeft!==this._scrollLeft&&(this.__cachedScrollLeft=this._scrollLeft,this.__updateColumnsBodyContentHidden())})),this._firefox&&!(0,l.GF)(this)&&!1!==this.__previousVisible&&(this.__memorizedScrollTop=this._scrollTop)}__updateColumnsBodyContentHidden(){if(!this._columnTree)return;const e=this._getColumnsInOrder();if(!e[0]||!e[0]._sizerCell)return;let t=!1;if(e.forEach((i=>{const r=this._lazyColumns&&!this.__isColumnInViewport(i);i._bodyContentHidden!==r&&(t=!0,i._cells.forEach((t=>{if(t!==i._sizerCell)if(r)t.remove();else if(t.__parentRow){const r=[...t.__parentRow.children].find((t=>e.indexOf(t._column)>e.indexOf(i)));t.__parentRow.insertBefore(t,r)}}))),i._bodyContentHidden=r})),t&&this._frozenCellsChanged(),this._lazyColumns){const t=[...e].reverse().find((e=>e.frozen)),i=this.__getColumnEnd(t),r=e.find((e=>!e.frozen&&!e._bodyContentHidden));this.__lazyColumnsStart=this.__getColumnStart(r)-i,this.$.items.style.setProperty("--_grid-lazy-columns-start",`${this.__lazyColumnsStart}px`),this._resetKeyboardNavigation()}}__getColumnEnd(e){return e?e._sizerCell.offsetLeft+(this.__isRTL?0:e._sizerCell.offsetWidth):this.__isRTL?this.$.table.clientWidth:0}__getColumnStart(e){return e?e._sizerCell.offsetLeft+(this.__isRTL?e._sizerCell.offsetWidth:0):this.__isRTL?this.$.table.clientWidth:0}__isColumnInViewport(e){return!(!e.frozen&&!e.frozenToEnd)||this.__isHorizontallyInViewport(e._sizerCell)}__isHorizontallyInViewport(e){return e.offsetLeft+e.offsetWidth>=this._scrollLeft&&e.offsetLeft<=this._scrollLeft+this.clientWidth}__columnRenderingChanged(e,t){"eager"===t?this.$.scroller.removeAttribute("column-rendering"):this.$.scroller.setAttribute("column-rendering",t),this.__updateColumnsBodyContentHidden()}_updateOverflow(){this._debounceOverflow=_.dx.debounce(this._debounceOverflow,h.rs,(()=>{this.__doUpdateOverflow()}))}__doUpdateOverflow(){let e="";const t=this.$.table;t.scrollTop<t.scrollHeight-t.clientHeight&&(e+=" bottom"),t.scrollTop>0&&(e+=" top");const i=J(t,this.getAttribute("dir"));i>0&&(e+=" start"),i<t.scrollWidth-t.clientWidth&&(e+=" end"),this.__isRTL&&(e=e.replace(/start|end/giu,(e=>"start"===e?"end":"start"))),t.scrollLeft<t.scrollWidth-t.clientWidth&&(e+=" right"),t.scrollLeft>0&&(e+=" left");const r=e.trim();r.length>0&&this.getAttribute("overflow")!==r?this.setAttribute("overflow",r):0===r.length&&this.hasAttribute("overflow")&&this.removeAttribute("overflow")}_frozenCellsChanged(){this._debouncerCacheElements=_.dx.debounce(this._debouncerCacheElements,h.YA,(()=>{Array.from(this.shadowRoot.querySelectorAll('[part~="cell"]')).forEach((e=>{e.style.transform=""})),this._frozenCells=Array.prototype.slice.call(this.$.table.querySelectorAll("[frozen]")),this._frozenToEndCells=Array.prototype.slice.call(this.$.table.querySelectorAll("[frozen-to-end]")),this.__updateHorizontalScrollPosition()})),this._debounceUpdateFrozenColumn()}_debounceUpdateFrozenColumn(){this.__debounceUpdateFrozenColumn=_.dx.debounce(this.__debounceUpdateFrozenColumn,h.YA,(()=>this._updateFrozenColumn()))}_updateFrozenColumn(){if(!this._columnTree)return;const e=this._columnTree[this._columnTree.length-1].slice(0);let t,i;e.sort(((e,t)=>e._order-t._order));for(let r=0;r<e.length;r++){const o=e[r];o._lastFrozen=!1,o._firstFrozenToEnd=!1,void 0===i&&o.frozenToEnd&&!o.hidden&&(i=r),o.frozen&&!o.hidden&&(t=r)}void 0!==t&&(e[t]._lastFrozen=!0),void 0!==i&&(e[i]._firstFrozenToEnd=!0),this.__updateColumnsBodyContentHidden()}__updateHorizontalScrollPosition(){if(!this._columnTree)return;const e=this.$.table.scrollWidth,t=this.$.table.clientWidth,i=Math.max(0,this.$.table.scrollLeft),r=J(this.$.table,this.getAttribute("dir")),o=`translate(${-i}px, 0)`;this.$.header.style.transform=o,this.$.footer.style.transform=o,this.$.items.style.transform=o;const s=this.__isRTL?r+t-e:i,n=`translate(${s}px, 0)`;this._frozenCells.forEach((e=>{e.style.transform=n}));const a=this.__isRTL?r:i+t-e,l=`translate(${a}px, 0)`;let d=l;if(this._lazyColumns){const e=this._getColumnsInOrder(),t=[...e].reverse().find((e=>!e.frozenToEnd&&!e._bodyContentHidden)),i=this.__getColumnEnd(t),r=e.find((e=>e.frozenToEnd)),o=a+(this.__getColumnStart(r)-i)+this.__lazyColumnsStart;d=`translate(${o}px, 0)`}this._frozenToEndCells.forEach((e=>{this.$.items.contains(e)?e.style.transform=d:e.style.transform=l})),this.hasAttribute("navigating")&&this.__rowFocusMode&&this.$.table.style.setProperty("--_grid-horizontal-scroll-position",-s+"px")}},ee=e=>class extends e{static get properties(){return{selectedItems:{type:Object,notify:!0,value:()=>[]},__selectedKeys:{type:Object,computed:"__computeSelectedKeys(itemIdPath, selectedItems.*)"}}}static get observers(){return["__selectedItemsChanged(itemIdPath, selectedItems.*)"]}_isSelected(e){return this.__selectedKeys.has(this.getItemId(e))}selectItem(e){this._isSelected(e)||(this.selectedItems=[...this.selectedItems,e])}deselectItem(e){this._isSelected(e)&&(this.selectedItems=this.selectedItems.filter((t=>!this._itemsEqual(t,e))))}_toggleItem(e){this._isSelected(e)?this.deselectItem(e):this.selectItem(e)}__selectedItemsChanged(){this.requestContentUpdate()}__computeSelectedKeys(e,t){const i=t.base||[],r=new Set;return i.forEach((e=>{r.add(this.getItemId(e))})),r}};let te="prepend";const ie=e=>class extends e{static get properties(){return{multiSort:{type:Boolean,value:!1},multiSortPriority:{type:String,value:()=>te},multiSortOnShiftClick:{type:Boolean,value:!1},_sorters:{type:Array,value:()=>[]},_previousSorters:{type:Array,value:()=>[]}}}static setDefaultMultiSortPriority(e){te=["append","prepend"].includes(e)?e:"prepend"}ready(){super.ready(),this.addEventListener("sorter-changed",this._onSorterChanged)}_onSorterChanged(e){const t=e.target;e.stopPropagation(),t._grid=this,this.__updateSorter(t,e.detail.shiftClick,e.detail.fromSorterClick),this.__applySorters()}__removeSorters(e){0!==e.length&&(this._sorters=this._sorters.filter((t=>e.indexOf(t)<0)),this.multiSort&&this.__updateSortOrders(),this.__applySorters())}__updateSortOrders(){this._sorters.forEach(((e,t)=>{e._order=this._sorters.length>1?t:null}))}__appendSorter(e){e.direction?this._sorters.includes(e)||this._sorters.push(e):this._removeArrayItem(this._sorters,e),this.__updateSortOrders()}__prependSorter(e){this._removeArrayItem(this._sorters,e),e.direction&&this._sorters.unshift(e),this.__updateSortOrders()}__updateSorter(e,t,i){if(e.direction||-1!==this._sorters.indexOf(e))if(e._order=null,this.multiSort&&(!this.multiSortOnShiftClick||!i)||this.multiSortOnShiftClick&&t)"append"===this.multiSortPriority?this.__appendSorter(e):this.__prependSorter(e);else if(e.direction||this.multiSortOnShiftClick){const t=this._sorters.filter((t=>t!==e));this._sorters=e.direction?[e]:[],t.forEach((e=>{e._order=null,e.direction=null}))}}__applySorters(){this.dataProvider&&this.isAttached&&JSON.stringify(this._previousSorters)!==JSON.stringify(this._mapSorters())&&this.clearCache(),this._a11yUpdateSorters(),this._previousSorters=this._mapSorters()}_mapSorters(){return this._sorters.map((e=>({path:e.path,direction:e.direction})))}_removeArrayItem(e,t){const i=e.indexOf(t);i>-1&&e.splice(i,1)}},re=e=>class extends e{static get properties(){return{cellClassNameGenerator:Function,cellPartNameGenerator:Function}}static get observers(){return["__cellClassNameGeneratorChanged(cellClassNameGenerator)","__cellPartNameGeneratorChanged(cellPartNameGenerator)"]}__cellClassNameGeneratorChanged(){this.generateCellClassNames()}__cellPartNameGeneratorChanged(){this.generateCellPartNames()}generateCellClassNames(){(0,f.pj)(this.$.items,(e=>{e.hidden||e.hasAttribute("loading")||this._generateCellClassNames(e,this.__getRowModel(e))}))}generateCellPartNames(){(0,f.pj)(this.$.items,(e=>{e.hidden||e.hasAttribute("loading")||this._generateCellPartNames(e,this.__getRowModel(e))}))}_generateCellClassNames(e,t){(0,f.CL)(e,(e=>{if(e.__generatedClasses&&e.__generatedClasses.forEach((t=>e.classList.remove(t))),this.cellClassNameGenerator){const i=this.cellClassNameGenerator(e._column,t);e.__generatedClasses=i&&i.split(" ").filter((e=>e.length>0)),e.__generatedClasses&&e.__generatedClasses.forEach((t=>e.classList.add(t)))}}))}_generateCellPartNames(e,t){(0,f.CL)(e,(e=>{if(e.__generatedParts&&e.__generatedParts.forEach((t=>{(0,f.lJ)(e,null,t)})),this.cellPartNameGenerator){const i=this.cellPartNameGenerator(e._column,t);e.__generatedParts=i&&i.split(" ").filter((e=>e.length>0)),e.__generatedParts&&e.__generatedParts.forEach((t=>{(0,f.lJ)(e,!0,t)}))}}))}},oe=e=>class extends(F(I(V(v(Z(ee(ie(Y(K(b(j(S(A(q(N(re((0,d.N)(e)))))))))))))))))){static get observers(){return["_columnTreeChanged(_columnTree, _columnTree.*)","_effectiveSizeChanged(_effectiveSize, __virtualizer, _hasData, _columnTree)"]}static get properties(){return{_safari:{type:Boolean,value:c.G6},_ios:{type:Boolean,value:c.gn},_firefox:{type:Boolean,value:c.vU},_android:{type:Boolean,value:c.Dt},_touchDevice:{type:Boolean,value:c.T},allRowsVisible:{type:Boolean,value:!1,reflectToAttribute:!0},__pendingRecalculateColumnWidths:{type:Boolean,value:!0},isAttached:{value:!1},__gridElement:{type:Boolean,value:!0}}}constructor(){super(),this.addEventListener("animationend",this._onAnimationEnd)}get _firstVisibleIndex(){const e=this.__getFirstVisibleItem();return e?e.index:void 0}get _lastVisibleIndex(){const e=this.__getLastVisibleItem();return e?e.index:void 0}connectedCallback(){super.connectedCallback(),this.isAttached=!0,this.recalculateColumnWidths()}disconnectedCallback(){super.disconnectedCallback(),this.isAttached=!1,this._hideTooltip(!0)}__getFirstVisibleItem(){return this._getRenderedRows().find((e=>this._isInViewport(e)))}__getLastVisibleItem(){return this._getRenderedRows().reverse().find((e=>this._isInViewport(e)))}_isInViewport(e){const t=this.$.table.getBoundingClientRect(),i=e.getBoundingClientRect(),r=this.$.header.getBoundingClientRect().height,o=this.$.footer.getBoundingClientRect().height;return i.bottom>t.top+r&&i.top<t.bottom-o}_getRenderedRows(){return Array.from(this.$.items.children).filter((e=>!e.hidden)).sort(((e,t)=>e.index-t.index))}_getRowContainingNode(e){const t=(0,u.Q4)("vaadin-grid-cell-content",e);if(t)return t.assignedSlot.parentElement.parentElement}_isItemAssignedToRow(e,t){const i=this.__getRowModel(t);return this.getItemId(e)===this.getItemId(i.item)}ready(){super.ready(),this.__virtualizer=new m.d({createElements:this._createScrollerRows.bind(this),updateElement:this._updateScrollerItem.bind(this),scrollContainer:this.$.items,scrollTarget:this.$.table,reorderElements:!0}),new ResizeObserver((()=>setTimeout((()=>{this.__updateFooterPositioning(),this.__updateColumnsBodyContentHidden(),this.__tryToRecalculateColumnWidthsIfPending()})))).observe(this.$.table),(0,p.k)(this),this._tooltipController=new g.f(this),this.addController(this._tooltipController),this._tooltipController.setManual(!0)}__getBodyCellCoordinates(e){if(this.$.items.contains(e)&&"td"===e.localName)return{item:e.parentElement._item,column:e._column}}__focusBodyCell({item:e,column:t}){const i=this._getRenderedRows().find((t=>t._item===e)),r=i&&[...i.children].find((e=>e._column===t));r&&r.focus()}_focusFirstVisibleRow(){const e=this.__getFirstVisibleItem();this.__rowFocusMode=!0,e.focus()}_effectiveSizeChanged(e,t,i,r){if(t&&i&&r){const i=this.shadowRoot.activeElement,r=this.__getBodyCellCoordinates(i),o=t.size||0;t.size=e,t.update(o-1,o-1),e<o&&t.update(e-1,e-1),r&&i.parentElement.hidden&&this.__focusBodyCell(r),this._resetKeyboardNavigation()}}__hasRowsWithClientHeight(){return!!Array.from(this.$.items.children).filter((e=>e.clientHeight)).length}__getIntrinsicWidth(e){return this.__intrinsicWidthCache.has(e)||this.__calculateAndCacheIntrinsicWidths([e]),this.__intrinsicWidthCache.get(e)}__getDistributedWidth(e,t){if(null==e||e===this)return 0;const i=Math.max(this.__getIntrinsicWidth(e),this.__getDistributedWidth((e.assignedSlot||e).parentElement,e));if(!t)return i;const r=i,o=e._visibleChildColumns.map((e=>this.__getIntrinsicWidth(e))).reduce(((e,t)=>e+t),0),s=Math.max(0,r-o),n=this.__getIntrinsicWidth(t)/o*s;return this.__getIntrinsicWidth(t)+n}_recalculateColumnWidths(e){this.__virtualizer.flush(),[...this.$.header.children,...this.$.footer.children].forEach((e=>{e.__debounceUpdateHeaderFooterRowVisibility&&e.__debounceUpdateHeaderFooterRowVisibility.flush()})),this._debouncerHiddenChanged&&this._debouncerHiddenChanged.flush(),this.__intrinsicWidthCache=new Map;const t=this._firstVisibleIndex,i=this._lastVisibleIndex;this.__viewportRowsCache=this._getRenderedRows().filter((e=>e.index>=t&&e.index<=i)),this.__calculateAndCacheIntrinsicWidths(e),e.forEach((e=>{e.width=`${this.__getDistributedWidth(e)}px`}))}__setVisibleCellContentAutoWidth(e,t){e._allCells.filter((e=>!this.$.items.contains(e)||this.__viewportRowsCache.includes(e.parentElement))).forEach((e=>{e.__measuringAutoWidth=t,e.__measuringAutoWidth?(e.__originalWidth=e.style.width,e.style.width="auto",e.style.position="absolute"):(e.style.width=e.__originalWidth,delete e.__originalWidth,e.style.position="")}))}__getAutoWidthCellsMaxWidth(e){return e._allCells.reduce(((e,t)=>t.__measuringAutoWidth?Math.max(e,t.offsetWidth+1):e),0)}__calculateAndCacheIntrinsicWidths(e){e.forEach((e=>this.__setVisibleCellContentAutoWidth(e,!0))),e.forEach((e=>{const t=this.__getAutoWidthCellsMaxWidth(e);this.__intrinsicWidthCache.set(e,t)})),e.forEach((e=>this.__setVisibleCellContentAutoWidth(e,!1)))}recalculateColumnWidths(){if(!this._columnTree)return;if((0,l.GF)(this)||this._cache.isLoading())return void(this.__pendingRecalculateColumnWidths=!0);const e=this._getColumns().filter((e=>!e.hidden&&e.autoWidth));this._recalculateColumnWidths(e)}__tryToRecalculateColumnWidthsIfPending(){this.__pendingRecalculateColumnWidths&&!(0,l.GF)(this)&&!this._cache.isLoading()&&this.__hasRowsWithClientHeight()&&(this.__pendingRecalculateColumnWidths=!1,this.recalculateColumnWidths())}_onDataProviderPageLoaded(){super._onDataProviderPageLoaded(),this.__tryToRecalculateColumnWidthsIfPending()}_createScrollerRows(e){const t=[];for(let i=0;i<e;i++){const e=document.createElement("tr");e.setAttribute("part","row"),e.setAttribute("role","row"),e.setAttribute("tabindex","-1"),this._columnTree&&this._updateRow(e,this._columnTree[this._columnTree.length-1],"body",!1,!0),t.push(e)}return this._columnTree&&this._columnTree[this._columnTree.length-1].forEach((e=>e.isConnected&&e.notifyPath&&e.notifyPath("_cells.*",e._cells))),this.__afterCreateScrollerRowsDebouncer=_.dx.debounce(this.__afterCreateScrollerRowsDebouncer,h.rs,(()=>{this._afterScroll(),this.__tryToRecalculateColumnWidthsIfPending()})),t}_createCell(e,t){const i=`vaadin-grid-cell-content-${this._contentIndex=this._contentIndex+1||0}`,r=document.createElement("vaadin-grid-cell-content");r.setAttribute("slot",i);const o=document.createElement(e);o.id=i.replace("-content-","-"),o.setAttribute("role","td"===e?"gridcell":"columnheader"),c.Dt||c.gn||(o.addEventListener("mouseenter",(e=>{this.$.scroller.hasAttribute("scrolling")||this._showTooltip(e)})),o.addEventListener("mouseleave",(()=>{this._hideTooltip()})),o.addEventListener("mousedown",(()=>{this._hideTooltip(!0)})));const s=document.createElement("slot");if(s.setAttribute("name",i),t&&t._focusButtonMode){const e=document.createElement("div");e.setAttribute("role","button"),e.setAttribute("tabindex","-1"),o.appendChild(e),o._focusButton=e,o.focus=function(){o._focusButton.focus()},e.appendChild(s)}else o.setAttribute("tabindex","-1"),o.appendChild(s);return o._content=r,r.addEventListener("mousedown",(()=>{if(c.i7){const e=t=>{const i=r.contains(this.getRootNode().activeElement),s=t.composedPath().includes(r);!i&&s&&o.focus(),document.removeEventListener("mouseup",e,!0)};document.addEventListener("mouseup",e,!0)}else setTimeout((()=>{r.contains(this.getRootNode().activeElement)||o.focus()}))})),o}_updateRow(e,t,i="body",r=!1,o=!1){const s=document.createDocumentFragment();(0,f.CL)(e,(e=>{e._vacant=!0})),e.innerHTML="","body"===i&&(e.__cells=[],e.__detailsCell=null),t.filter((e=>!e.hidden)).forEach(((t,n,a)=>{let l;if("body"===i){if(t._cells||(t._cells=[]),l=t._cells.find((e=>e._vacant)),l||(l=this._createCell("td",t),t._cells.push(l)),l.setAttribute("part","cell body-cell"),l.__parentRow=e,e.__cells.push(l),t._bodyContentHidden||e.appendChild(l),e===this.$.sizer&&(t._sizerCell=l),n===a.length-1&&this.rowDetailsRenderer){this._detailsCells||(this._detailsCells=[]);const t=this._detailsCells.find((e=>e._vacant))||this._createCell("td");-1===this._detailsCells.indexOf(t)&&this._detailsCells.push(t),t._content.parentElement||s.appendChild(t._content),this._configureDetailsCell(t),e.appendChild(t),e.__detailsCell=t,this._a11ySetRowDetailsCell(e,t),t._vacant=!1}t.notifyPath&&!o&&t.notifyPath("_cells.*",t._cells)}else{const o="header"===i?"th":"td";r||"vaadin-grid-column-group"===t.localName?(l=t[`_${i}Cell`]||this._createCell(o),l._column=t,e.appendChild(l),t[`_${i}Cell`]=l):(t._emptyCells||(t._emptyCells=[]),l=t._emptyCells.find((e=>e._vacant))||this._createCell(o),l._column=t,e.appendChild(l),-1===t._emptyCells.indexOf(l)&&t._emptyCells.push(l)),l.setAttribute("part",`cell ${i}-cell`)}l._content.parentElement||s.appendChild(l._content),l._vacant=!1,l._column=t})),"body"!==i&&this.__debounceUpdateHeaderFooterRowVisibility(e),this.appendChild(s),this._frozenCellsChanged(),this._updateFirstAndLastColumnForRow(e)}__debounceUpdateHeaderFooterRowVisibility(e){e.__debounceUpdateHeaderFooterRowVisibility=_.dx.debounce(e.__debounceUpdateHeaderFooterRowVisibility,h.YA,(()=>this.__updateHeaderFooterRowVisibility(e)))}__updateHeaderFooterRowVisibility(e){if(!e)return;const t=Array.from(e.children).filter((t=>{const i=t._column;if(i._emptyCells&&i._emptyCells.indexOf(t)>-1)return!1;if(e.parentElement===this.$.header){if(i.headerRenderer)return!0;if(null===i.header)return!1;if(i.path||void 0!==i.header)return!0}else if(i.footerRenderer)return!0;return!1}));e.hidden!==!t.length&&(e.hidden=!t.length),this._resetKeyboardNavigation()}_updateScrollerItem(e,t){this._preventScrollerRotatingCellFocus(e,t),this._columnTree&&(this._updateRowOrderParts(e,t),this._a11yUpdateRowRowindex(e,t),this._getItem(t,e))}_columnTreeChanged(e){this._renderColumnTree(e),this.recalculateColumnWidths(),this.__updateColumnsBodyContentHidden()}_updateRowOrderParts(e,t=e.index){(0,f.UN)(e,{first:0===t,last:t===this._effectiveSize-1,odd:t%2!=0,even:t%2==0})}_updateRowStateParts(e,{expanded:t,selected:i,detailsOpened:r}){(0,f.UN)(e,{expanded:t,selected:i,"details-opened":r})}_renderColumnTree(e){for((0,f.pj)(this.$.items,(t=>{this._updateRow(t,e[e.length-1],"body",!1,!0);const i=this.__getRowModel(t);this._updateRowOrderParts(t),this._updateRowStateParts(t,i),this._filterDragAndDrop(t,i)}));this.$.header.children.length<e.length;){const e=document.createElement("tr");e.setAttribute("part","row"),e.setAttribute("role","row"),e.setAttribute("tabindex","-1"),this.$.header.appendChild(e);const t=document.createElement("tr");t.setAttribute("part","row"),t.setAttribute("role","row"),t.setAttribute("tabindex","-1"),this.$.footer.appendChild(t)}for(;this.$.header.children.length>e.length;)this.$.header.removeChild(this.$.header.firstElementChild),this.$.footer.removeChild(this.$.footer.firstElementChild);(0,f.pj)(this.$.header,((t,i,r)=>{this._updateRow(t,e[i],"header",i===e.length-1);const o=(0,f.Fy)(t);(0,f.c0)(o,"first-header-row-cell",0===i),(0,f.c0)(o,"last-header-row-cell",i===r.length-1)})),(0,f.pj)(this.$.footer,((t,i,r)=>{this._updateRow(t,e[e.length-1-i],"footer",0===i);const o=(0,f.Fy)(t);(0,f.c0)(o,"first-footer-row-cell",0===i),(0,f.c0)(o,"last-footer-row-cell",i===r.length-1)})),this._updateRow(this.$.sizer,e[e.length-1]),this._resizeHandler(),this._frozenCellsChanged(),this._updateFirstAndLastColumn(),this._resetKeyboardNavigation(),this._a11yUpdateHeaderRows(),this._a11yUpdateFooterRows(),this.__updateFooterPositioning(),this.generateCellClassNames(),this.generateCellPartNames(),this.__updateHeaderAndFooter()}__updateFooterPositioning(){this._firefox&&parseFloat(navigator.userAgent.match(/Firefox\/(\d{2,3}.\d)/u)[1])<99&&(this.$.items.style.paddingBottom=0,this.allRowsVisible||(this.$.items.style.paddingBottom=`${this.$.footer.offsetHeight}px`))}_updateItem(e,t){e._item=t;const i=this.__getRowModel(e);this._toggleDetailsCell(e,i.detailsOpened),this._a11yUpdateRowLevel(e,i.level),this._a11yUpdateRowSelected(e,i.selected),this._updateRowStateParts(e,i),this._generateCellClassNames(e,i),this._generateCellPartNames(e,i),this._filterDragAndDrop(e,i),(0,f.pj)(e,(e=>{if(e._renderer){const t=e._column||this;e._renderer.call(t,e._content,t,i)}})),this._updateDetailsCellHeight(e),this._a11yUpdateRowExpanded(e,i.expanded)}_resizeHandler(){this._updateDetailsCellHeights(),this.__updateFooterPositioning(),this.__updateHorizontalScrollPosition()}_onAnimationEnd(e){0===e.animationName.indexOf("vaadin-grid-appear")&&(e.stopPropagation(),this.__tryToRecalculateColumnWidthsIfPending(),requestAnimationFrame((()=>{this.__scrollToPendingIndexes()})))}__getRowModel(e){return{index:e.index,item:e._item,level:this._getIndexLevel(e.index),expanded:this._isExpanded(e._item),selected:this._isSelected(e._item),detailsOpened:!!this.rowDetailsRenderer&&this._isDetailsOpened(e._item)}}_showTooltip(e){const t=this._tooltipController.node;t&&t.isConnected&&(this._tooltipController.setTarget(e.target),this._tooltipController.setContext(this.getEventContext(e)),t._stateController.open({focus:"focusin"===e.type,hover:"mouseenter"===e.type}))}_hideTooltip(e){const t=this._tooltipController.node;t&&t._stateController.close(e)}requestContentUpdate(){this.__updateHeaderAndFooter(),this.__updateVisibleRows()}__updateHeaderAndFooter(){(this._columnTree||[]).forEach((e=>{e.forEach((e=>{e._renderHeaderAndFooter&&e._renderHeaderAndFooter()}))}))}__updateVisibleRows(e,t){this.__virtualizer&&this.__virtualizer.update(e,t)}};class se extends(oe((0,a.S)((0,r.Tb)((0,s.k)(o.H3))))){static get template(){return o.dy`
         | 
| 718 | 
            -
                  <div
         | 
| 719 | 
            -
                    id="scroller"
         | 
| 720 | 
            -
                    safari$="[[_safari]]"
         | 
| 721 | 
            -
                    ios$="[[_ios]]"
         | 
| 722 | 
            -
                    loading$="[[loading]]"
         | 
| 723 | 
            -
                    column-reordering-allowed$="[[columnReorderingAllowed]]"
         | 
| 724 | 
            -
                  >
         | 
| 725 | 
            -
                    <table id="table" role="treegrid" aria-multiselectable="true" tabindex="0">
         | 
| 726 | 
            -
                      <caption id="sizer" part="row"></caption>
         | 
| 727 | 
            -
                      <thead id="header" role="rowgroup"></thead>
         | 
| 728 | 
            -
                      <tbody id="items" role="rowgroup"></tbody>
         | 
| 729 | 
            -
                      <tfoot id="footer" role="rowgroup"></tfoot>
         | 
| 730 | 
            -
                    </table>
         | 
| 731 | 
            -
             | 
| 732 | 
            -
                    <div part="reorder-ghost"></div>
         | 
| 733 | 
            -
                  </div>
         | 
| 734 | 
            -
             | 
| 735 | 
            -
                  <slot name="tooltip"></slot>
         | 
| 736 | 
            -
             | 
| 737 | 
            -
                  <div id="focusexit" tabindex="0"></div>
         | 
| 738 | 
            -
                `}static get is(){return"vaadin-grid"}}(0,n.M)(se)}}]);
         |