@ni/nimble-components 17.0.1 → 17.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/dist/all-components-bundle.js +3194 -216
  2. package/dist/all-components-bundle.js.map +1 -1
  3. package/dist/all-components-bundle.min.js +3022 -2714
  4. package/dist/all-components-bundle.min.js.map +1 -1
  5. package/dist/esm/all-components.d.ts +1 -0
  6. package/dist/esm/all-components.js +1 -0
  7. package/dist/esm/all-components.js.map +1 -1
  8. package/dist/esm/table/components/cell/index.d.ts +15 -3
  9. package/dist/esm/table/components/cell/index.js +32 -2
  10. package/dist/esm/table/components/cell/index.js.map +1 -1
  11. package/dist/esm/table/components/cell/styles.js +8 -1
  12. package/dist/esm/table/components/cell/styles.js.map +1 -1
  13. package/dist/esm/table/components/cell/template.d.ts +1 -1
  14. package/dist/esm/table/components/cell/template.js +2 -2
  15. package/dist/esm/table/components/cell/template.js.map +1 -1
  16. package/dist/esm/table/components/row/index.d.ts +7 -5
  17. package/dist/esm/table/components/row/index.js +20 -5
  18. package/dist/esm/table/components/row/index.js.map +1 -1
  19. package/dist/esm/table/components/row/styles.js +3 -5
  20. package/dist/esm/table/components/row/styles.js.map +1 -1
  21. package/dist/esm/table/components/row/template.d.ts +1 -1
  22. package/dist/esm/table/components/row/template.js +3 -1
  23. package/dist/esm/table/components/row/template.js.map +1 -1
  24. package/dist/esm/table/index.d.ts +2 -2
  25. package/dist/esm/table/index.js +3 -12
  26. package/dist/esm/table/index.js.map +1 -1
  27. package/dist/esm/table/template.js +14 -4
  28. package/dist/esm/table/template.js.map +1 -1
  29. package/dist/esm/table/types.d.ts +17 -1
  30. package/dist/esm/table-column/base/index.d.ts +31 -0
  31. package/dist/esm/table-column/base/index.js +7 -0
  32. package/dist/esm/table-column/base/index.js.map +1 -0
  33. package/dist/esm/table-column/base/styles.d.ts +1 -0
  34. package/dist/esm/table-column/base/styles.js +7 -0
  35. package/dist/esm/table-column/base/styles.js.map +1 -0
  36. package/dist/esm/table-column/base/template.d.ts +1 -0
  37. package/dist/esm/table-column/base/template.js +7 -0
  38. package/dist/esm/table-column/base/template.js.map +1 -0
  39. package/dist/esm/table-column/text/index.d.ts +18 -0
  40. package/dist/esm/table-column/text/index.js +40 -0
  41. package/dist/esm/table-column/text/index.js.map +1 -0
  42. package/dist/esm/table-column/text/styles.d.ts +1 -0
  43. package/dist/esm/table-column/text/styles.js +16 -0
  44. package/dist/esm/table-column/text/styles.js.map +1 -0
  45. package/dist/esm/table-column/text/template.d.ts +3 -0
  46. package/dist/esm/table-column/text/template.js +11 -0
  47. package/dist/esm/table-column/text/template.js.map +1 -0
  48. package/dist/esm/wafer-map/index.d.ts +9 -4
  49. package/dist/esm/wafer-map/index.js +8 -0
  50. package/dist/esm/wafer-map/index.js.map +1 -1
  51. package/dist/esm/wafer-map/modules/zoom-handler.d.ts +24 -0
  52. package/dist/esm/wafer-map/modules/zoom-handler.js +87 -0
  53. package/dist/esm/wafer-map/modules/zoom-handler.js.map +1 -0
  54. package/dist/esm/wafer-map/styles.js +15 -4
  55. package/dist/esm/wafer-map/styles.js.map +1 -1
  56. package/dist/esm/wafer-map/template.js +16 -14
  57. package/dist/esm/wafer-map/template.js.map +1 -1
  58. package/package.json +5 -1
@@ -3594,7 +3594,7 @@
3594
3594
  * @param propertyOrOptions - The options used to configure child node observation.
3595
3595
  * @public
3596
3596
  */
3597
- function children(propertyOrOptions) {
3597
+ function children$1(propertyOrOptions) {
3598
3598
  if (typeof propertyOrOptions === "string") {
3599
3599
  propertyOrOptions = {
3600
3600
  property: propertyOrOptions,
@@ -9791,7 +9791,7 @@
9791
9791
  __decorate([
9792
9792
  observable
9793
9793
  ], DesignTokenNode.prototype, "children", void 0);
9794
- function create(nameOrConfig) {
9794
+ function create$1(nameOrConfig) {
9795
9795
  return DesignTokenImpl.from(nameOrConfig);
9796
9796
  }
9797
9797
  /* eslint-enable @typescript-eslint/no-unused-vars */
@@ -9800,7 +9800,7 @@
9800
9800
  * @public
9801
9801
  */
9802
9802
  const DesignToken = Object.freeze({
9803
- create,
9803
+ create: create$1,
9804
9804
  /**
9805
9805
  * Informs DesignToken that an HTMLElement for which tokens have
9806
9806
  * been set has been connected to the document.
@@ -13969,7 +13969,7 @@
13969
13969
  @click="${(x, c) => x.clickHandler(c.event)}"
13970
13970
  @focusin="${(x, c) => x.focusinHandler(c.event)}"
13971
13971
  @keydown="${(x, c) => x.keydownHandler(c.event)}"
13972
- ${children({
13972
+ ${children$1({
13973
13973
  property: "childItems",
13974
13974
  attributeFilter: ["disabled", "hidden"],
13975
13975
  filter: elements(),
@@ -14834,7 +14834,7 @@
14834
14834
  aria-disabled="${x => x.disabled}"
14835
14835
  @focusin="${(x, c) => x.handleFocus(c.event)}"
14836
14836
  @focusout="${(x, c) => x.handleBlur(c.event)}"
14837
- ${children({
14837
+ ${children$1({
14838
14838
  property: "childItems",
14839
14839
  filter: elements(),
14840
14840
  })}
@@ -15713,9 +15713,9 @@
15713
15713
  const prefix = 'ni-nimble';
15714
15714
  const styleNameFromTokenName = (tokenName) => `${prefix}-${tokenName}`;
15715
15715
 
15716
- const template$g = html `<slot></slot>`;
15716
+ const template$h = html `<slot></slot>`;
15717
15717
 
15718
- const styles$F = css `
15718
+ const styles$G = css `
15719
15719
  :host {
15720
15720
  display: contents;
15721
15721
  }
@@ -15771,8 +15771,8 @@
15771
15771
  ], ThemeProvider.prototype, "theme", void 0);
15772
15772
  const nimbleDesignSystemProvider = ThemeProvider.compose({
15773
15773
  baseName: 'theme-provider',
15774
- styles: styles$F,
15775
- template: template$g
15774
+ styles: styles$G,
15775
+ template: template$h
15776
15776
  });
15777
15777
  DesignSystem.getOrCreate()
15778
15778
  .withPrefix('nimble')
@@ -15931,7 +15931,7 @@
15931
15931
  }
15932
15932
  }
15933
15933
 
15934
- const styles$E = css `
15934
+ const styles$F = css `
15935
15935
  ${display('inline')}
15936
15936
 
15937
15937
  :host {
@@ -16014,7 +16014,7 @@
16014
16014
  `;
16015
16015
 
16016
16016
  // prettier-ignore
16017
- const template$f = (context, definition) => html `
16017
+ const template$g = (context, definition) => html `
16018
16018
  <a
16019
16019
  class="control"
16020
16020
  part="control"
@@ -16087,8 +16087,8 @@
16087
16087
  const nimbleAnchor = Anchor.compose({
16088
16088
  baseName: 'anchor',
16089
16089
  baseClass: Anchor$1,
16090
- template: template$f,
16091
- styles: styles$E,
16090
+ template: template$g,
16091
+ styles: styles$F,
16092
16092
  shadowOptions: {
16093
16093
  delegatesFocus: true
16094
16094
  }
@@ -16173,7 +16173,7 @@
16173
16173
  return new MultivaluePropertyStyleSheetBehavior('appearance', value, styles);
16174
16174
  }
16175
16175
 
16176
- const styles$D = css `
16176
+ const styles$E = css `
16177
16177
  ${display('inline-flex')}
16178
16178
 
16179
16179
  :host {
@@ -16454,8 +16454,8 @@
16454
16454
  }
16455
16455
  `));
16456
16456
 
16457
- const styles$C = css `
16458
- ${styles$D}
16457
+ const styles$D = css `
16458
+ ${styles$E}
16459
16459
  ${buttonAppearanceVariantStyles}
16460
16460
 
16461
16461
  .control {
@@ -16463,7 +16463,7 @@
16463
16463
  }
16464
16464
  `;
16465
16465
 
16466
- const template$e = (context, definition) => html `
16466
+ const template$f = (context, definition) => html `
16467
16467
  <a
16468
16468
  class="control"
16469
16469
  part="control"
@@ -16545,15 +16545,15 @@
16545
16545
  ], AnchorButton.prototype, "disabled", void 0);
16546
16546
  const nimbleAnchorButton = AnchorButton.compose({
16547
16547
  baseName: 'anchor-button',
16548
- template: template$e,
16549
- styles: styles$C,
16548
+ template: template$f,
16549
+ styles: styles$D,
16550
16550
  shadowOptions: {
16551
16551
  delegatesFocus: true
16552
16552
  }
16553
16553
  });
16554
16554
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleAnchorButton());
16555
16555
 
16556
- const styles$B = css `
16556
+ const styles$C = css `
16557
16557
  :host {
16558
16558
  contain: layout;
16559
16559
  display: block;
@@ -16577,13 +16577,13 @@
16577
16577
  baseName: 'anchored-region',
16578
16578
  baseClass: AnchoredRegion$1,
16579
16579
  template: anchoredRegionTemplate,
16580
- styles: styles$B
16580
+ styles: styles$C
16581
16581
  });
16582
16582
  DesignSystem.getOrCreate()
16583
16583
  .withPrefix('nimble')
16584
16584
  .register(nimbleAnchoredRegion());
16585
16585
 
16586
- const styles$A = css `
16586
+ const styles$B = css `
16587
16587
  ${display('inline-block')}
16588
16588
 
16589
16589
  :host {
@@ -16624,7 +16624,7 @@
16624
16624
  baseName: 'breadcrumb',
16625
16625
  baseClass: Breadcrumb$1,
16626
16626
  template: breadcrumbTemplate,
16627
- styles: styles$A
16627
+ styles: styles$B
16628
16628
  });
16629
16629
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleBreadcrumb());
16630
16630
 
@@ -17230,7 +17230,7 @@
17230
17230
  data: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path class="cls-1" d="M8.033 14.026L4.9 10.866 6.277 9.53l1.744 1.81 4.562-4.507 1.307 1.363zm1.155-10.68l-1.321-1.32-2.312 2.311-2.311-2.311-1.321 1.32 2.311 2.312L1.923 7.97l1.32 1.32 2.312-2.31 2.312 2.31 1.32-1.32-2.31-2.312z"/></svg>`
17231
17231
  };
17232
17232
 
17233
- const styles$z = css `
17233
+ const styles$A = css `
17234
17234
  ${display('inline-flex')}
17235
17235
 
17236
17236
  :host {
@@ -17309,15 +17309,15 @@
17309
17309
  baseName: 'breadcrumb-item',
17310
17310
  baseClass: BreadcrumbItem$1,
17311
17311
  template: breadcrumbItemTemplate,
17312
- styles: styles$z,
17312
+ styles: styles$A,
17313
17313
  separator: forwardSlash16X16.data
17314
17314
  });
17315
17315
  DesignSystem.getOrCreate()
17316
17316
  .withPrefix('nimble')
17317
17317
  .register(nimbleBreadcrumbItem());
17318
17318
 
17319
- const styles$y = css `
17320
- ${styles$D}
17319
+ const styles$z = css `
17320
+ ${styles$E}
17321
17321
  ${buttonAppearanceVariantStyles}
17322
17322
  `;
17323
17323
 
@@ -17363,7 +17363,7 @@
17363
17363
  baseName: 'button',
17364
17364
  baseClass: Button$1,
17365
17365
  template: buttonTemplate,
17366
- styles: styles$y,
17366
+ styles: styles$z,
17367
17367
  shadowOptions: {
17368
17368
  delegatesFocus: true
17369
17369
  }
@@ -17443,7 +17443,7 @@
17443
17443
  */
17444
17444
  const themeBehavior = (theme, styles) => new ThemeStyleSheetBehavior(theme, styles);
17445
17445
 
17446
- const styles$x = css `
17446
+ const styles$y = css `
17447
17447
  ${display('inline-flex')}
17448
17448
 
17449
17449
  :host {
@@ -17602,14 +17602,14 @@
17602
17602
  const nimbleCardButton = CardButton.compose({
17603
17603
  baseName: 'card-button',
17604
17604
  template: buttonTemplate,
17605
- styles: styles$x,
17605
+ styles: styles$y,
17606
17606
  shadowOptions: {
17607
17607
  delegatesFocus: true
17608
17608
  }
17609
17609
  });
17610
17610
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleCardButton());
17611
17611
 
17612
- const styles$w = css `
17612
+ const styles$x = css `
17613
17613
  ${display('inline-flex')}
17614
17614
 
17615
17615
  :host {
@@ -17727,14 +17727,14 @@
17727
17727
  baseName: 'checkbox',
17728
17728
  baseClass: Checkbox$1,
17729
17729
  template: checkboxTemplate,
17730
- styles: styles$w,
17730
+ styles: styles$x,
17731
17731
  checkedIndicator: check16X16.data,
17732
17732
  indeterminateIndicator: minus16X16.data
17733
17733
  });
17734
17734
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleCheckbox());
17735
17735
 
17736
- const styles$v = css `
17737
- ${styles$D}
17736
+ const styles$w = css `
17737
+ ${styles$E}
17738
17738
 
17739
17739
  .control[aria-pressed='true'] {
17740
17740
  background-color: ${fillSelectedColor};
@@ -17760,7 +17760,7 @@
17760
17760
  }
17761
17761
  `;
17762
17762
 
17763
- const template$d = (context, definition) => html `
17763
+ const template$e = (context, definition) => html `
17764
17764
  <div
17765
17765
  role="button"
17766
17766
  part="control"
@@ -17835,8 +17835,8 @@
17835
17835
  applyMixins(ToggleButton, StartEnd, DelegatesARIAButton);
17836
17836
  const nimbleToggleButton = ToggleButton.compose({
17837
17837
  baseName: 'toggle-button',
17838
- template: template$d,
17839
- styles: styles$v,
17838
+ template: template$e,
17839
+ styles: styles$w,
17840
17840
  shadowOptions: {
17841
17841
  delegatesFocus: true
17842
17842
  }
@@ -17849,13 +17849,13 @@
17849
17849
  </div>
17850
17850
  `;
17851
17851
 
17852
- const template$c = html `
17852
+ const template$d = html `
17853
17853
  <template>
17854
17854
  <div class="icon" :innerHTML=${x => x.icon.data}></div>
17855
17855
  </template
17856
17856
  `;
17857
17857
 
17858
- const styles$u = css `
17858
+ const styles$v = css `
17859
17859
  ${display('inline-flex')}
17860
17860
 
17861
17861
  :host {
@@ -17908,8 +17908,8 @@
17908
17908
  const registerIcon = (baseName, iconClass) => {
17909
17909
  const composedIcon = iconClass.compose({
17910
17910
  baseName,
17911
- template: template$c,
17912
- styles: styles$u,
17911
+ template: template$d,
17912
+ styles: styles$v,
17913
17913
  baseClass: iconClass
17914
17914
  });
17915
17915
  DesignSystem.getOrCreate().withPrefix('nimble').register(composedIcon());
@@ -17943,7 +17943,7 @@
17943
17943
  block: 'block'
17944
17944
  };
17945
17945
 
17946
- const styles$t = css `
17946
+ const styles$u = css `
17947
17947
  ${display('inline-flex')}
17948
17948
 
17949
17949
  :host {
@@ -18171,7 +18171,7 @@
18171
18171
  }
18172
18172
  `));
18173
18173
 
18174
- const styles$s = css `
18174
+ const styles$t = css `
18175
18175
  .error-icon {
18176
18176
  display: none;
18177
18177
  }
@@ -18209,9 +18209,9 @@
18209
18209
  }
18210
18210
  `;
18211
18211
 
18212
- const styles$r = css `
18212
+ const styles$s = css `
18213
+ ${styles$u}
18213
18214
  ${styles$t}
18214
- ${styles$s}
18215
18215
 
18216
18216
  :host {
18217
18217
  --ni-private-hover-bottom-border-width: 2px;
@@ -18447,7 +18447,7 @@
18447
18447
  baseName: 'combobox',
18448
18448
  baseClass: Combobox$1,
18449
18449
  template: comboboxTemplate,
18450
- styles: styles$r,
18450
+ styles: styles$s,
18451
18451
  shadowOptions: {
18452
18452
  delegatesFocus: true
18453
18453
  },
@@ -18491,7 +18491,7 @@
18491
18491
  */
18492
18492
  const UserDismissed = Symbol('user dismissed');
18493
18493
 
18494
- const styles$q = css `
18494
+ const styles$r = css `
18495
18495
  ${display('grid')}
18496
18496
 
18497
18497
  dialog {
@@ -18607,7 +18607,7 @@
18607
18607
  }
18608
18608
  `));
18609
18609
 
18610
- const template$b = html `
18610
+ const template$c = html `
18611
18611
  <template>
18612
18612
  <dialog
18613
18613
  ${ref('dialogElement')}
@@ -18733,13 +18733,13 @@
18733
18733
  applyMixins(Dialog, ARIAGlobalStatesAndProperties);
18734
18734
  const nimbleDialog = Dialog.compose({
18735
18735
  baseName: 'dialog',
18736
- template: template$b,
18737
- styles: styles$q,
18736
+ template: template$c,
18737
+ styles: styles$r,
18738
18738
  baseClass: Dialog
18739
18739
  });
18740
18740
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleDialog());
18741
18741
 
18742
- const styles$p = css `
18742
+ const styles$q = css `
18743
18743
  ${display('block')}
18744
18744
 
18745
18745
  :host {
@@ -18892,7 +18892,7 @@
18892
18892
  }
18893
18893
  `));
18894
18894
 
18895
- const template$a = html `
18895
+ const template$b = html `
18896
18896
  <dialog
18897
18897
  ${ref('dialog')}
18898
18898
  aria-label="${x => x.ariaLabel}"
@@ -19006,8 +19006,8 @@
19006
19006
  applyMixins(Drawer, ARIAGlobalStatesAndProperties);
19007
19007
  const nimbleDrawer = Drawer.compose({
19008
19008
  baseName: 'drawer',
19009
- template: template$a,
19010
- styles: styles$p
19009
+ template: template$b,
19010
+ styles: styles$q
19011
19011
  });
19012
19012
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleDrawer());
19013
19013
 
@@ -20639,7 +20639,7 @@
20639
20639
  }
20640
20640
  registerIcon('icon-xmark-check', IconXmarkCheck);
20641
20641
 
20642
- const styles$o = css `
20642
+ const styles$p = css `
20643
20643
  ${display('flex')}
20644
20644
 
20645
20645
  :host {
@@ -20719,11 +20719,11 @@
20719
20719
  baseName: 'list-option',
20720
20720
  baseClass: ListboxOption,
20721
20721
  template: listboxOptionTemplate,
20722
- styles: styles$o
20722
+ styles: styles$p
20723
20723
  });
20724
20724
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleListOption());
20725
20725
 
20726
- const styles$n = css `
20726
+ const styles$o = css `
20727
20727
  ${display('grid')}
20728
20728
 
20729
20729
  :host {
@@ -20778,11 +20778,11 @@
20778
20778
  baseName: 'menu',
20779
20779
  baseClass: Menu$1,
20780
20780
  template: menuTemplate,
20781
- styles: styles$n
20781
+ styles: styles$o
20782
20782
  });
20783
20783
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleMenu());
20784
20784
 
20785
- const styles$m = css `
20785
+ const styles$n = css `
20786
20786
  ${display('inline-block')}
20787
20787
 
20788
20788
  :host {
@@ -20801,7 +20801,7 @@
20801
20801
  `;
20802
20802
 
20803
20803
  // prettier-ignore
20804
- const template$9 = html `
20804
+ const template$a = html `
20805
20805
  <template
20806
20806
  ?open="${x => x.open}"
20807
20807
  @focusout="${(x, c) => x.focusoutHandler(c.event)}"
@@ -21009,15 +21009,15 @@
21009
21009
  ], MenuButton.prototype, "slottedMenus", void 0);
21010
21010
  const nimbleMenuButton = MenuButton.compose({
21011
21011
  baseName: 'menu-button',
21012
- template: template$9,
21013
- styles: styles$m,
21012
+ template: template$a,
21013
+ styles: styles$n,
21014
21014
  shadowOptions: {
21015
21015
  delegatesFocus: true
21016
21016
  }
21017
21017
  });
21018
21018
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleMenuButton());
21019
21019
 
21020
- const styles$l = css `
21020
+ const styles$m = css `
21021
21021
  ${display('grid')}
21022
21022
 
21023
21023
  :host {
@@ -21115,7 +21115,7 @@
21115
21115
  baseName: 'menu-item',
21116
21116
  baseClass: MenuItem$1,
21117
21117
  template: menuItemTemplate,
21118
- styles: styles$l,
21118
+ styles: styles$m,
21119
21119
  expandCollapseGlyph: arrowExpanderRight16X16.data
21120
21120
  });
21121
21121
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleMenuItem());
@@ -21129,9 +21129,9 @@
21129
21129
  block: 'block'
21130
21130
  };
21131
21131
 
21132
- const styles$k = css `
21132
+ const styles$l = css `
21133
21133
  ${display('inline-block')}
21134
- ${styles$s}
21134
+ ${styles$t}
21135
21135
 
21136
21136
  :host {
21137
21137
  font: ${bodyFont};
@@ -21345,7 +21345,7 @@
21345
21345
  baseName: 'number-field',
21346
21346
  baseClass: NumberField$1,
21347
21347
  template: numberFieldTemplate,
21348
- styles: styles$k,
21348
+ styles: styles$l,
21349
21349
  shadowOptions: {
21350
21350
  delegatesFocus: true
21351
21351
  },
@@ -21386,7 +21386,7 @@
21386
21386
  });
21387
21387
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleNumberField());
21388
21388
 
21389
- const styles$j = css `
21389
+ const styles$k = css `
21390
21390
  ${display('inline-flex')}
21391
21391
 
21392
21392
  :host {
@@ -21486,12 +21486,12 @@
21486
21486
  baseName: 'radio',
21487
21487
  baseClass: Radio$1,
21488
21488
  template: radioTemplate,
21489
- styles: styles$j,
21489
+ styles: styles$k,
21490
21490
  checkedIndicator: circleFilled16X16.data
21491
21491
  });
21492
21492
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleRadio());
21493
21493
 
21494
- const styles$i = css `
21494
+ const styles$j = css `
21495
21495
  ${display('inline-block')}
21496
21496
 
21497
21497
  .positioning-region {
@@ -21526,16 +21526,16 @@
21526
21526
  baseName: 'radio-group',
21527
21527
  baseClass: RadioGroup$1,
21528
21528
  template: radioGroupTemplate,
21529
- styles: styles$i,
21529
+ styles: styles$j,
21530
21530
  shadowOptions: {
21531
21531
  delegatesFocus: true
21532
21532
  }
21533
21533
  });
21534
21534
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleRadioGroup());
21535
21535
 
21536
- const styles$h = css `
21536
+ const styles$i = css `
21537
+ ${styles$u}
21537
21538
  ${styles$t}
21538
- ${styles$s}
21539
21539
 
21540
21540
  ${
21541
21541
  /* We are using flex `order` to define the visual ordering of the selected value,
@@ -21611,7 +21611,7 @@
21611
21611
  baseName: 'select',
21612
21612
  baseClass: Select$1,
21613
21613
  template: selectTemplate,
21614
- styles: styles$h,
21614
+ styles: styles$i,
21615
21615
  indicator: arrowExpanderDown16X16.data,
21616
21616
  end: html `
21617
21617
  <${DesignSystem.tagFor(IconExclamationMark)}
@@ -21623,7 +21623,7 @@
21623
21623
  });
21624
21624
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleSelect());
21625
21625
 
21626
- const styles$g = css `
21626
+ const styles$h = css `
21627
21627
  ${display('inline-flex')}
21628
21628
 
21629
21629
  :host {
@@ -21767,7 +21767,7 @@
21767
21767
  }
21768
21768
  `));
21769
21769
 
21770
- const template$8 = html `
21770
+ const template$9 = html `
21771
21771
  <template role="progressbar">
21772
21772
  <div class="container">
21773
21773
  <div class="bit1"></div>
@@ -21784,12 +21784,12 @@
21784
21784
  }
21785
21785
  const nimbleSpinner = Spinner.compose({
21786
21786
  baseName: 'spinner',
21787
- template: template$8,
21788
- styles: styles$g
21787
+ template: template$9,
21788
+ styles: styles$h
21789
21789
  });
21790
21790
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleSpinner());
21791
21791
 
21792
- const styles$f = css `
21792
+ const styles$g = css `
21793
21793
  ${display('inline-flex')}
21794
21794
 
21795
21795
  :host {
@@ -21952,7 +21952,7 @@
21952
21952
  `));
21953
21953
 
21954
21954
  // prettier-ignore
21955
- const template$7 = html `
21955
+ const template$8 = html `
21956
21956
  <template
21957
21957
  role="switch"
21958
21958
  aria-checked="${x => x.checked}"
@@ -21996,12 +21996,12 @@
21996
21996
  const nimbleSwitch = Switch.compose({
21997
21997
  baseClass: Switch$1,
21998
21998
  baseName: 'switch',
21999
- template: template$7,
22000
- styles: styles$f
21999
+ template: template$8,
22000
+ styles: styles$g
22001
22001
  });
22002
22002
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleSwitch());
22003
22003
 
22004
- const styles$e = css `
22004
+ const styles$f = css `
22005
22005
  ${display('inline-flex')}
22006
22006
 
22007
22007
  :host {
@@ -22106,11 +22106,11 @@
22106
22106
  baseName: 'tab',
22107
22107
  baseClass: Tab$1,
22108
22108
  template: tabTemplate,
22109
- styles: styles$e
22109
+ styles: styles$f
22110
22110
  });
22111
22111
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleTab());
22112
22112
 
22113
- const styles$d = css `
22113
+ const styles$e = css `
22114
22114
  ${display('block')}
22115
22115
 
22116
22116
  :host {
@@ -22130,7 +22130,7 @@
22130
22130
  baseName: 'tab-panel',
22131
22131
  baseClass: TabPanel$1,
22132
22132
  template: tabPanelTemplate,
22133
- styles: styles$d
22133
+ styles: styles$e
22134
22134
  });
22135
22135
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleTabPanel());
22136
22136
 
@@ -25128,7 +25128,7 @@
25128
25128
  }
25129
25129
  }
25130
25130
 
25131
- const styles$c = css `
25131
+ const styles$d = css `
25132
25132
  ${display('flex')}
25133
25133
 
25134
25134
  .table-container {
@@ -25155,7 +25155,7 @@
25155
25155
  }
25156
25156
  `;
25157
25157
 
25158
- const styles$b = css `
25158
+ const styles$c = css `
25159
25159
  ${display('flex')}
25160
25160
 
25161
25161
  :host {
@@ -25169,7 +25169,7 @@
25169
25169
  `;
25170
25170
 
25171
25171
  // prettier-ignore
25172
- const template$6 = html `
25172
+ const template$7 = html `
25173
25173
  <template role="columnheader">
25174
25174
  <slot></slot>
25175
25175
  </template>
@@ -25183,22 +25183,20 @@
25183
25183
  }
25184
25184
  const nimbleTableHeader = TableHeader.compose({
25185
25185
  baseName: 'table-header',
25186
- template: template$6,
25187
- styles: styles$b
25186
+ template: template$7,
25187
+ styles: styles$c
25188
25188
  });
25189
25189
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleTableHeader());
25190
25190
 
25191
- const styles$a = css `
25192
- ${display('flex')}
25191
+ const styles$b = css `
25192
+ ${display('grid')}
25193
25193
 
25194
25194
  :host {
25195
25195
  height: ${controlHeight};
25196
25196
  background: ${applicationBackgroundColor};
25197
25197
  border-top: calc(2 * ${borderWidth}) solid ${tableRowBorderColor};
25198
- }
25199
-
25200
- .cell {
25201
- flex: 1;
25198
+ grid-auto-flow: column;
25199
+ grid-auto-columns: 1fr;
25202
25200
  }
25203
25201
 
25204
25202
  :host(:hover) .cell {
@@ -25206,19 +25204,26 @@
25206
25204
  }
25207
25205
  `;
25208
25206
 
25209
- const styles$9 = css `
25210
- ${display('flex')}
25207
+ const styles$a = css `
25208
+ ${display('grid')}
25211
25209
 
25212
25210
  :host {
25213
25211
  padding: 0px calc(${standardPadding} / 2);
25212
+ align-self: center;
25213
+ height: 100%;
25214
+ }
25215
+
25216
+ .cell-content-container {
25217
+ overflow: hidden;
25218
+ display: flex;
25214
25219
  align-items: center;
25215
25220
  }
25216
25221
  `;
25217
25222
 
25218
25223
  // prettier-ignore
25219
- const template$5 = html `
25224
+ const template$6 = html `
25220
25225
  <template role="cell">
25221
- ${x => x.data}
25226
+ <div ${ref('cellContentContainer')} class="cell-content-container"></div>
25222
25227
  </template>
25223
25228
  `;
25224
25229
 
@@ -25227,24 +25232,56 @@
25227
25232
  * @internal
25228
25233
  */
25229
25234
  class TableCell extends FoundationElement {
25235
+ constructor() {
25236
+ super(...arguments);
25237
+ this.customCellView = undefined;
25238
+ }
25239
+ connectedCallback() {
25240
+ super.connectedCallback();
25241
+ this.customCellView = this.cellTemplate?.render(this.cellState, this.cellContentContainer);
25242
+ }
25243
+ cellStateChanged() {
25244
+ this.customCellView?.bind(this.cellState, defaultExecutionContext);
25245
+ }
25246
+ cellTemplateChanged() {
25247
+ if (this.isConnected) {
25248
+ this.customCellView = this.cellTemplate?.render(this.cellState, this.cellContentContainer);
25249
+ }
25250
+ }
25251
+ cellStylesChanged(prev, next) {
25252
+ if (prev) {
25253
+ this.$fastController.removeStyles(prev);
25254
+ }
25255
+ if (next) {
25256
+ this.$fastController.addStyles(next);
25257
+ }
25258
+ }
25230
25259
  }
25231
25260
  __decorate$1([
25232
25261
  observable
25233
- ], TableCell.prototype, "data", void 0);
25262
+ ], TableCell.prototype, "cellState", void 0);
25263
+ __decorate$1([
25264
+ observable
25265
+ ], TableCell.prototype, "cellTemplate", void 0);
25266
+ __decorate$1([
25267
+ observable
25268
+ ], TableCell.prototype, "cellStyles", void 0);
25234
25269
  const nimbleTableCell = TableCell.compose({
25235
25270
  baseName: 'table-cell',
25236
- template: template$5,
25237
- styles: styles$9
25271
+ template: template$6,
25272
+ styles: styles$a
25238
25273
  });
25239
25274
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleTableCell());
25240
25275
 
25241
25276
  // prettier-ignore
25242
- const template$4 = html `
25277
+ const template$5 = html `
25243
25278
  <template role="row">
25244
25279
  ${repeat(x => x.columns, html `
25245
25280
  <${DesignSystem.tagFor(TableCell)}
25246
25281
  class="cell"
25247
- :data="${(x, c) => c.parent.getCellValue(x)}"
25282
+ :cellTemplate="${x => x.cellTemplate}"
25283
+ :cellStyles="${x => x.cellStyles}"
25284
+ :cellState="${(x, c) => c.parent.getCellState(x)}"
25248
25285
  >
25249
25286
  </${DesignSystem.tagFor(TableCell)}>
25250
25287
  `)}
@@ -25258,50 +25295,80 @@
25258
25295
  class TableRow extends FoundationElement {
25259
25296
  constructor() {
25260
25297
  super(...arguments);
25261
- // TODO: Temporarily assume the set of columns will be an array of strings.
25262
- // Eventually, this will be an array of column definitions.
25263
25298
  this.columns = [];
25264
25299
  }
25265
- getCellValue(column) {
25266
- return this.data ? this.data[column] : undefined;
25300
+ getCellState(column) {
25301
+ const fieldNames = column.getDataRecordFieldNames();
25302
+ if (this.hasValidFieldNames(fieldNames) && this.dataRecord) {
25303
+ const cellDataValues = fieldNames.map(field => this.dataRecord[field]);
25304
+ const cellRecord = Object.fromEntries(column.cellRecordFieldNames.map((k, i) => [
25305
+ k,
25306
+ cellDataValues[i]
25307
+ ]));
25308
+ const columnConfig = column.getColumnConfig?.() ?? {};
25309
+ const cellState = {
25310
+ cellRecord,
25311
+ columnConfig
25312
+ };
25313
+ return cellState;
25314
+ }
25315
+ return { cellRecord: {}, columnConfig: {} };
25316
+ }
25317
+ hasValidFieldNames(keys) {
25318
+ return keys.every(key => key !== undefined);
25267
25319
  }
25268
25320
  }
25269
25321
  __decorate$1([
25270
25322
  observable
25271
- ], TableRow.prototype, "data", void 0);
25323
+ ], TableRow.prototype, "dataRecord", void 0);
25272
25324
  __decorate$1([
25273
25325
  observable
25274
25326
  ], TableRow.prototype, "columns", void 0);
25275
25327
  const nimbleTableRow = TableRow.compose({
25276
25328
  baseName: 'table-row',
25277
- template: template$4,
25278
- styles: styles$a
25329
+ template: template$5,
25330
+ styles: styles$b
25279
25331
  });
25280
25332
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleTableRow());
25281
25333
 
25334
+ /**
25335
+ * The base class for table columns
25336
+ */
25337
+ class TableColumn extends FoundationElement {
25338
+ }
25339
+
25340
+ const isTableColumn = () => {
25341
+ const filter = (value, _, __) => {
25342
+ return value instanceof TableColumn;
25343
+ };
25344
+ return filter;
25345
+ };
25282
25346
  // prettier-ignore
25283
- const template$3 = html `
25347
+ const template$4 = html `
25284
25348
  <template role="table">
25285
25349
  <div class="table-container">
25286
25350
  <div role="rowgroup" class="header-container">
25287
25351
  <div class="header-row" role="row">
25288
- ${repeat(x => x.columnHeaders, html `
25352
+ ${repeat(x => x.columns, html `
25289
25353
  <${DesignSystem.tagFor(TableHeader)} class="header">
25290
- ${x => x}
25354
+ ${x => x.textContent}
25291
25355
  </${DesignSystem.tagFor(TableHeader)}>
25292
25356
  `)}
25293
25357
  </div>
25294
25358
  </div>
25295
25359
  <div class="table-viewport" role="rowgroup">
25360
+ ${when(x => x.columns.length > 0, html `
25296
25361
  ${repeat(x => x.tableData, html `
25297
25362
  <${DesignSystem.tagFor(TableRow)}
25298
- :data="${x => x.data}"
25363
+ :dataRecord="${x => x.record}"
25299
25364
  :columns="${(_, c) => c.parent.columns}"
25300
25365
  >
25301
25366
  </${DesignSystem.tagFor(TableRow)}>
25302
25367
  `)}
25368
+ `)}
25303
25369
  </div>
25304
25370
  </div>
25371
+ <slot ${slotted({ property: 'columns', filter: isTableColumn() })}></slot>
25305
25372
  </template>
25306
25373
  `;
25307
25374
 
@@ -25316,11 +25383,7 @@
25316
25383
  * @internal
25317
25384
  */
25318
25385
  this.tableData = [];
25319
- // TODO: Temporarily expose the columns as a string array. This will ultimately be
25320
- // column definitions provided by slotted elements.
25321
25386
  this.columns = [];
25322
- // TODO: Temporarily expose the column headers as a string array.
25323
- this.columnHeaders = [];
25324
25387
  this.tableInitialized = false;
25325
25388
  this.tableValidator = new TableValidator();
25326
25389
  this.update = (state) => {
@@ -25387,7 +25450,7 @@
25387
25450
  refreshRows() {
25388
25451
  const rows = this.table.getRowModel().rows;
25389
25452
  this.tableData = rows.map(row => {
25390
- const rowState = { data: row.original };
25453
+ const rowState = { record: row.original };
25391
25454
  return rowState;
25392
25455
  });
25393
25456
  }
@@ -25396,8 +25459,8 @@
25396
25459
  this.update(this.table.initialState);
25397
25460
  this.refreshRows();
25398
25461
  }
25399
- // Temporarily auto-detect the keys in TData to make columns.
25400
- // TODO: Remove this logic when another way to specify columns is provided.
25462
+ // Generate columns for TanStack that correspond to all the keys in TData because all operations,
25463
+ // such as grouping and sorting, will be performed on the data's records, not the values rendered within a cell.
25401
25464
  generateColumns() {
25402
25465
  if (this.data.length === 0) {
25403
25466
  return;
@@ -25413,8 +25476,6 @@
25413
25476
  return columnDef;
25414
25477
  });
25415
25478
  this.updateTableOptions({ columns: generatedColumns });
25416
- this.columnHeaders = generatedColumns.map(x => x.header);
25417
- this.columns = this.columnHeaders;
25418
25479
  }
25419
25480
  }
25420
25481
  __decorate$1([
@@ -25429,16 +25490,81 @@
25429
25490
  __decorate$1([
25430
25491
  observable
25431
25492
  ], Table.prototype, "columns", void 0);
25432
- __decorate$1([
25433
- observable
25434
- ], Table.prototype, "columnHeaders", void 0);
25435
25493
  const nimbleTable = Table.compose({
25436
25494
  baseName: 'table',
25437
- template: template$3,
25438
- styles: styles$c
25495
+ template: template$4,
25496
+ styles: styles$d
25439
25497
  });
25440
25498
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleTable());
25441
25499
 
25500
+ const styles$9 = css `
25501
+ :host {
25502
+ display: none;
25503
+ }
25504
+ `;
25505
+
25506
+ const template$3 = html `
25507
+ <template>
25508
+ <slot></slot>
25509
+ </template>
25510
+ `;
25511
+
25512
+ const cellStyles = css `
25513
+ span {
25514
+ font: ${bodyFont};
25515
+ color: ${bodyFontColor};
25516
+ white-space: nowrap;
25517
+ overflow: hidden;
25518
+ text-overflow: ellipsis;
25519
+ }
25520
+
25521
+ .placeholder {
25522
+ color: ${controlLabelFontColor};
25523
+ }
25524
+ `;
25525
+
25526
+ const cellTemplate = html `
25527
+ <span
25528
+ class="${x => (typeof x.cellRecord.value === 'string' ? '' : 'placeholder')}"
25529
+ >
25530
+ ${x => (typeof x.cellRecord.value === 'string'
25531
+ ? x.cellRecord.value
25532
+ : x.columnConfig.placeholder)}
25533
+ </span>
25534
+ `;
25535
+
25536
+ /**
25537
+ * The table column for displaying strings.
25538
+ */
25539
+ class TableColumnText extends TableColumn {
25540
+ constructor() {
25541
+ super(...arguments);
25542
+ this.cellRecordFieldNames = ['value'];
25543
+ this.cellStyles = cellStyles;
25544
+ this.cellTemplate = cellTemplate;
25545
+ }
25546
+ getColumnConfig() {
25547
+ return { placeholder: this.placeholder ?? '' };
25548
+ }
25549
+ getDataRecordFieldNames() {
25550
+ return [this.fieldName];
25551
+ }
25552
+ }
25553
+ __decorate$1([
25554
+ attr({ attribute: 'field-name' })
25555
+ ], TableColumnText.prototype, "fieldName", void 0);
25556
+ __decorate$1([
25557
+ attr
25558
+ ], TableColumnText.prototype, "placeholder", void 0);
25559
+ const nimbleTableColumnText = TableColumnText.compose({
25560
+ baseName: 'table-column-text',
25561
+ template: template$3,
25562
+ styles: styles$9
25563
+ });
25564
+ DesignSystem.getOrCreate()
25565
+ .withPrefix('nimble')
25566
+ .register(nimbleTableColumnText());
25567
+
25442
25568
  const styles$8 = css `
25443
25569
  ${display('grid')}
25444
25570
 
@@ -25679,7 +25805,7 @@
25679
25805
 
25680
25806
  const styles$5 = css `
25681
25807
  ${display('inline-block')}
25682
- ${styles$s}
25808
+ ${styles$t}
25683
25809
 
25684
25810
  :host {
25685
25811
  font: ${bodyFont};
@@ -26575,20 +26701,22 @@ Instead styling against the role which is more general and likely a better appro
26575
26701
 
26576
26702
  const template = html `
26577
26703
  <div class="wafer-map-container">
26578
- <svg class="svg-root ${x => x.orientation}">
26579
- <g class="zoom-container">
26580
- <svg
26581
- class="circle-base"
26582
- version="1.1"
26583
- x="0px"
26584
- y="0px"
26585
- viewBox="1 .45 20 21"
26586
- >
26587
- <path
26588
- class="circle-drawing-path"
26589
- d="m 21 12 a 10 10 330 1 1 0 -1.98 a 1 1 0 0 0 0 2"
26590
- />
26591
- </svg>
26704
+ <svg class="svg-root">
26705
+ <g class="zoom-container" ${ref('zoomContainer')}>
26706
+ <g class="notch ${x => x.orientation}">
26707
+ <svg
26708
+ class="circle-base"
26709
+ version="1.1"
26710
+ x="0px"
26711
+ y="0px"
26712
+ viewBox="1 .45 20 21"
26713
+ >
26714
+ <path
26715
+ class="circle-drawing-path"
26716
+ d="m 21 12 a 10 10 330 1 1 0 -1.98 a 1 1 0 0 0 0 2"
26717
+ />
26718
+ </svg>
26719
+ </g>
26592
26720
  </g>
26593
26721
  </svg>
26594
26722
  <div class="wafer-map-area">
@@ -26619,19 +26747,30 @@ Instead styling against the role which is more general and likely a better appro
26619
26747
  position: absolute;
26620
26748
  }
26621
26749
 
26622
- .svg-root.top {
26750
+ .circle-base {
26751
+ width: 100%;
26752
+ height: 100%;
26753
+ position: absolute;
26754
+ fill: white;
26755
+ }
26756
+
26757
+ .notch {
26758
+ transform-origin: center center;
26759
+ }
26760
+
26761
+ .notch.top {
26623
26762
  transform: rotate(-90deg);
26624
26763
  }
26625
26764
 
26626
- .svg-root.right {
26765
+ .notch.right {
26627
26766
  transform: rotate(0deg);
26628
26767
  }
26629
26768
 
26630
- .svg-root.left {
26769
+ .notch.left {
26631
26770
  transform: rotate(180deg);
26632
26771
  }
26633
26772
 
26634
- .svg-root.bottom {
26773
+ .notch.bottom {
26635
26774
  transform: rotate(90deg);
26636
26775
  }
26637
26776
 
@@ -26687,7 +26826,7 @@ Instead styling against the role which is more general and likely a better appro
26687
26826
  ordinal: 'ordinal'
26688
26827
  };
26689
26828
 
26690
- function ascending(a, b) {
26829
+ function ascending$1(a, b) {
26691
26830
  return a == null || b == null ? NaN : a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;
26692
26831
  }
26693
26832
 
@@ -26708,11 +26847,11 @@ Instead styling against the role which is more general and likely a better appro
26708
26847
  // tell if the comparator is symmetric, and an asymmetric comparator can’t be
26709
26848
  // used to test whether a single value is comparable.
26710
26849
  if (f.length !== 2) {
26711
- compare1 = ascending;
26712
- compare2 = (d, x) => ascending(f(d), x);
26850
+ compare1 = ascending$1;
26851
+ compare2 = (d, x) => ascending$1(f(d), x);
26713
26852
  delta = (d, x) => f(d) - x;
26714
26853
  } else {
26715
- compare1 = f === ascending || f === descending ? f : zero$1;
26854
+ compare1 = f === ascending$1 || f === descending ? f : zero$1;
26716
26855
  compare2 = f;
26717
26856
  delta = f;
26718
26857
  }
@@ -26757,7 +26896,7 @@ Instead styling against the role which is more general and likely a better appro
26757
26896
  return x === null ? NaN : +x;
26758
26897
  }
26759
26898
 
26760
- const ascendingBisect = bisector(ascending);
26899
+ const ascendingBisect = bisector(ascending$1);
26761
26900
  const bisectRight = ascendingBisect.right;
26762
26901
  bisector(number$1).center;
26763
26902
  var bisect = bisectRight;
@@ -27253,7 +27392,7 @@ Instead styling against the role which is more general and likely a better appro
27253
27392
  return new Rgb(o.r, o.g, o.b, o.opacity);
27254
27393
  }
27255
27394
 
27256
- function rgb$1(r, g, b, opacity) {
27395
+ function rgb(r, g, b, opacity) {
27257
27396
  return arguments.length === 1 ? rgbConvert(r) : new Rgb(r, g, b, opacity == null ? 1 : opacity);
27258
27397
  }
27259
27398
 
@@ -27264,7 +27403,7 @@ Instead styling against the role which is more general and likely a better appro
27264
27403
  this.opacity = +opacity;
27265
27404
  }
27266
27405
 
27267
- define(Rgb, rgb$1, extend(Color, {
27406
+ define(Rgb, rgb, extend(Color, {
27268
27407
  brighter(k) {
27269
27408
  k = k == null ? brighter : Math.pow(brighter, k);
27270
27409
  return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);
@@ -27415,7 +27554,7 @@ Instead styling against the role which is more general and likely a better appro
27415
27554
  : m1) * 255;
27416
27555
  }
27417
27556
 
27418
- var constant = x => () => x;
27557
+ var constant$2 = x => () => x;
27419
27558
 
27420
27559
  function linear$1(a, d) {
27421
27560
  return function(t) {
@@ -27431,20 +27570,20 @@ Instead styling against the role which is more general and likely a better appro
27431
27570
 
27432
27571
  function gamma(y) {
27433
27572
  return (y = +y) === 1 ? nogamma : function(a, b) {
27434
- return b - a ? exponential(a, b, y) : constant(isNaN(a) ? b : a);
27573
+ return b - a ? exponential(a, b, y) : constant$2(isNaN(a) ? b : a);
27435
27574
  };
27436
27575
  }
27437
27576
 
27438
27577
  function nogamma(a, b) {
27439
27578
  var d = b - a;
27440
- return d ? linear$1(a, d) : constant(isNaN(a) ? b : a);
27579
+ return d ? linear$1(a, d) : constant$2(isNaN(a) ? b : a);
27441
27580
  }
27442
27581
 
27443
- var rgb = (function rgbGamma(y) {
27582
+ var interpolateRgb = (function rgbGamma(y) {
27444
27583
  var color = gamma(y);
27445
27584
 
27446
- function rgb(start, end) {
27447
- var r = color((start = rgb$1(start)).r, (end = rgb$1(end)).r),
27585
+ function rgb$1(start, end) {
27586
+ var r = color((start = rgb(start)).r, (end = rgb(end)).r),
27448
27587
  g = color(start.g, end.g),
27449
27588
  b = color(start.b, end.b),
27450
27589
  opacity = nogamma(start.opacity, end.opacity);
@@ -27457,9 +27596,9 @@ Instead styling against the role which is more general and likely a better appro
27457
27596
  };
27458
27597
  }
27459
27598
 
27460
- rgb.gamma = rgbGamma;
27599
+ rgb$1.gamma = rgbGamma;
27461
27600
 
27462
- return rgb;
27601
+ return rgb$1;
27463
27602
  })(1);
27464
27603
 
27465
27604
  function numberArray(a, b) {
@@ -27484,7 +27623,7 @@ Instead styling against the role which is more general and likely a better appro
27484
27623
  c = new Array(nb),
27485
27624
  i;
27486
27625
 
27487
- for (i = 0; i < na; ++i) x[i] = interpolate(a[i], b[i]);
27626
+ for (i = 0; i < na; ++i) x[i] = interpolate$1(a[i], b[i]);
27488
27627
  for (; i < nb; ++i) c[i] = b[i];
27489
27628
 
27490
27629
  return function(t) {
@@ -27516,7 +27655,7 @@ Instead styling against the role which is more general and likely a better appro
27516
27655
 
27517
27656
  for (k in b) {
27518
27657
  if (k in a) {
27519
- i[k] = interpolate(a[k], b[k]);
27658
+ i[k] = interpolate$1(a[k], b[k]);
27520
27659
  } else {
27521
27660
  c[k] = b[k];
27522
27661
  }
@@ -27543,7 +27682,7 @@ Instead styling against the role which is more general and likely a better appro
27543
27682
  };
27544
27683
  }
27545
27684
 
27546
- function string(a, b) {
27685
+ function interpolateString(a, b) {
27547
27686
  var bi = reA.lastIndex = reB.lastIndex = 0, // scan index for next number in b
27548
27687
  am, // current match in a
27549
27688
  bm, // current match in b
@@ -27591,12 +27730,12 @@ Instead styling against the role which is more general and likely a better appro
27591
27730
  });
27592
27731
  }
27593
27732
 
27594
- function interpolate(a, b) {
27733
+ function interpolate$1(a, b) {
27595
27734
  var t = typeof b, c;
27596
- return b == null || t === "boolean" ? constant(b)
27735
+ return b == null || t === "boolean" ? constant$2(b)
27597
27736
  : (t === "number" ? interpolateNumber
27598
- : t === "string" ? ((c = color(b)) ? (b = c, rgb) : string)
27599
- : b instanceof color ? rgb
27737
+ : t === "string" ? ((c = color(b)) ? (b = c, interpolateRgb) : interpolateString)
27738
+ : b instanceof color ? interpolateRgb
27600
27739
  : b instanceof Date ? date
27601
27740
  : isNumberArray(b) ? numberArray
27602
27741
  : Array.isArray(b) ? genericArray
@@ -27610,8 +27749,185 @@ Instead styling against the role which is more general and likely a better appro
27610
27749
  };
27611
27750
  }
27612
27751
 
27613
- function constants(x) {
27614
- return function() {
27752
+ var degrees = 180 / Math.PI;
27753
+
27754
+ var identity$3 = {
27755
+ translateX: 0,
27756
+ translateY: 0,
27757
+ rotate: 0,
27758
+ skewX: 0,
27759
+ scaleX: 1,
27760
+ scaleY: 1
27761
+ };
27762
+
27763
+ function decompose(a, b, c, d, e, f) {
27764
+ var scaleX, scaleY, skewX;
27765
+ if (scaleX = Math.sqrt(a * a + b * b)) a /= scaleX, b /= scaleX;
27766
+ if (skewX = a * c + b * d) c -= a * skewX, d -= b * skewX;
27767
+ if (scaleY = Math.sqrt(c * c + d * d)) c /= scaleY, d /= scaleY, skewX /= scaleY;
27768
+ if (a * d < b * c) a = -a, b = -b, skewX = -skewX, scaleX = -scaleX;
27769
+ return {
27770
+ translateX: e,
27771
+ translateY: f,
27772
+ rotate: Math.atan2(b, a) * degrees,
27773
+ skewX: Math.atan(skewX) * degrees,
27774
+ scaleX: scaleX,
27775
+ scaleY: scaleY
27776
+ };
27777
+ }
27778
+
27779
+ var svgNode;
27780
+
27781
+ /* eslint-disable no-undef */
27782
+ function parseCss(value) {
27783
+ const m = new (typeof DOMMatrix === "function" ? DOMMatrix : WebKitCSSMatrix)(value + "");
27784
+ return m.isIdentity ? identity$3 : decompose(m.a, m.b, m.c, m.d, m.e, m.f);
27785
+ }
27786
+
27787
+ function parseSvg(value) {
27788
+ if (value == null) return identity$3;
27789
+ if (!svgNode) svgNode = document.createElementNS("http://www.w3.org/2000/svg", "g");
27790
+ svgNode.setAttribute("transform", value);
27791
+ if (!(value = svgNode.transform.baseVal.consolidate())) return identity$3;
27792
+ value = value.matrix;
27793
+ return decompose(value.a, value.b, value.c, value.d, value.e, value.f);
27794
+ }
27795
+
27796
+ function interpolateTransform(parse, pxComma, pxParen, degParen) {
27797
+
27798
+ function pop(s) {
27799
+ return s.length ? s.pop() + " " : "";
27800
+ }
27801
+
27802
+ function translate(xa, ya, xb, yb, s, q) {
27803
+ if (xa !== xb || ya !== yb) {
27804
+ var i = s.push("translate(", null, pxComma, null, pxParen);
27805
+ q.push({i: i - 4, x: interpolateNumber(xa, xb)}, {i: i - 2, x: interpolateNumber(ya, yb)});
27806
+ } else if (xb || yb) {
27807
+ s.push("translate(" + xb + pxComma + yb + pxParen);
27808
+ }
27809
+ }
27810
+
27811
+ function rotate(a, b, s, q) {
27812
+ if (a !== b) {
27813
+ if (a - b > 180) b += 360; else if (b - a > 180) a += 360; // shortest path
27814
+ q.push({i: s.push(pop(s) + "rotate(", null, degParen) - 2, x: interpolateNumber(a, b)});
27815
+ } else if (b) {
27816
+ s.push(pop(s) + "rotate(" + b + degParen);
27817
+ }
27818
+ }
27819
+
27820
+ function skewX(a, b, s, q) {
27821
+ if (a !== b) {
27822
+ q.push({i: s.push(pop(s) + "skewX(", null, degParen) - 2, x: interpolateNumber(a, b)});
27823
+ } else if (b) {
27824
+ s.push(pop(s) + "skewX(" + b + degParen);
27825
+ }
27826
+ }
27827
+
27828
+ function scale(xa, ya, xb, yb, s, q) {
27829
+ if (xa !== xb || ya !== yb) {
27830
+ var i = s.push(pop(s) + "scale(", null, ",", null, ")");
27831
+ q.push({i: i - 4, x: interpolateNumber(xa, xb)}, {i: i - 2, x: interpolateNumber(ya, yb)});
27832
+ } else if (xb !== 1 || yb !== 1) {
27833
+ s.push(pop(s) + "scale(" + xb + "," + yb + ")");
27834
+ }
27835
+ }
27836
+
27837
+ return function(a, b) {
27838
+ var s = [], // string constants and placeholders
27839
+ q = []; // number interpolators
27840
+ a = parse(a), b = parse(b);
27841
+ translate(a.translateX, a.translateY, b.translateX, b.translateY, s, q);
27842
+ rotate(a.rotate, b.rotate, s, q);
27843
+ skewX(a.skewX, b.skewX, s, q);
27844
+ scale(a.scaleX, a.scaleY, b.scaleX, b.scaleY, s, q);
27845
+ a = b = null; // gc
27846
+ return function(t) {
27847
+ var i = -1, n = q.length, o;
27848
+ while (++i < n) s[(o = q[i]).i] = o.x(t);
27849
+ return s.join("");
27850
+ };
27851
+ };
27852
+ }
27853
+
27854
+ var interpolateTransformCss = interpolateTransform(parseCss, "px, ", "px)", "deg)");
27855
+ var interpolateTransformSvg = interpolateTransform(parseSvg, ", ", ")", ")");
27856
+
27857
+ var epsilon2 = 1e-12;
27858
+
27859
+ function cosh(x) {
27860
+ return ((x = Math.exp(x)) + 1 / x) / 2;
27861
+ }
27862
+
27863
+ function sinh(x) {
27864
+ return ((x = Math.exp(x)) - 1 / x) / 2;
27865
+ }
27866
+
27867
+ function tanh(x) {
27868
+ return ((x = Math.exp(2 * x)) - 1) / (x + 1);
27869
+ }
27870
+
27871
+ var interpolateZoom = (function zoomRho(rho, rho2, rho4) {
27872
+
27873
+ // p0 = [ux0, uy0, w0]
27874
+ // p1 = [ux1, uy1, w1]
27875
+ function zoom(p0, p1) {
27876
+ var ux0 = p0[0], uy0 = p0[1], w0 = p0[2],
27877
+ ux1 = p1[0], uy1 = p1[1], w1 = p1[2],
27878
+ dx = ux1 - ux0,
27879
+ dy = uy1 - uy0,
27880
+ d2 = dx * dx + dy * dy,
27881
+ i,
27882
+ S;
27883
+
27884
+ // Special case for u0 ≅ u1.
27885
+ if (d2 < epsilon2) {
27886
+ S = Math.log(w1 / w0) / rho;
27887
+ i = function(t) {
27888
+ return [
27889
+ ux0 + t * dx,
27890
+ uy0 + t * dy,
27891
+ w0 * Math.exp(rho * t * S)
27892
+ ];
27893
+ };
27894
+ }
27895
+
27896
+ // General case.
27897
+ else {
27898
+ var d1 = Math.sqrt(d2),
27899
+ b0 = (w1 * w1 - w0 * w0 + rho4 * d2) / (2 * w0 * rho2 * d1),
27900
+ b1 = (w1 * w1 - w0 * w0 - rho4 * d2) / (2 * w1 * rho2 * d1),
27901
+ r0 = Math.log(Math.sqrt(b0 * b0 + 1) - b0),
27902
+ r1 = Math.log(Math.sqrt(b1 * b1 + 1) - b1);
27903
+ S = (r1 - r0) / rho;
27904
+ i = function(t) {
27905
+ var s = t * S,
27906
+ coshr0 = cosh(r0),
27907
+ u = w0 / (rho2 * d1) * (coshr0 * tanh(rho * s + r0) - sinh(r0));
27908
+ return [
27909
+ ux0 + u * dx,
27910
+ uy0 + u * dy,
27911
+ w0 * coshr0 / cosh(rho * s + r0)
27912
+ ];
27913
+ };
27914
+ }
27915
+
27916
+ i.duration = S * 1000 * rho / Math.SQRT2;
27917
+
27918
+ return i;
27919
+ }
27920
+
27921
+ zoom.rho = function(_) {
27922
+ var _1 = Math.max(1e-3, +_), _2 = _1 * _1, _4 = _2 * _2;
27923
+ return zoomRho(_1, _2, _4);
27924
+ };
27925
+
27926
+ return zoom;
27927
+ })(Math.SQRT2, 2, 4);
27928
+
27929
+ function constants(x) {
27930
+ return function() {
27615
27931
  return x;
27616
27932
  };
27617
27933
  }
@@ -27622,7 +27938,7 @@ Instead styling against the role which is more general and likely a better appro
27622
27938
 
27623
27939
  var unit = [0, 1];
27624
27940
 
27625
- function identity$1(x) {
27941
+ function identity$2(x) {
27626
27942
  return x;
27627
27943
  }
27628
27944
 
@@ -27682,25 +27998,25 @@ Instead styling against the role which is more general and likely a better appro
27682
27998
  function transformer() {
27683
27999
  var domain = unit,
27684
28000
  range = unit,
27685
- interpolate$1 = interpolate,
28001
+ interpolate = interpolate$1,
27686
28002
  transform,
27687
28003
  untransform,
27688
28004
  unknown,
27689
- clamp = identity$1,
28005
+ clamp = identity$2,
27690
28006
  piecewise,
27691
28007
  output,
27692
28008
  input;
27693
28009
 
27694
28010
  function rescale() {
27695
28011
  var n = Math.min(domain.length, range.length);
27696
- if (clamp !== identity$1) clamp = clamper(domain[0], domain[n - 1]);
28012
+ if (clamp !== identity$2) clamp = clamper(domain[0], domain[n - 1]);
27697
28013
  piecewise = n > 2 ? polymap : bimap;
27698
28014
  output = input = null;
27699
28015
  return scale;
27700
28016
  }
27701
28017
 
27702
28018
  function scale(x) {
27703
- return x == null || isNaN(x = +x) ? unknown : (output || (output = piecewise(domain.map(transform), range, interpolate$1)))(transform(clamp(x)));
28019
+ return x == null || isNaN(x = +x) ? unknown : (output || (output = piecewise(domain.map(transform), range, interpolate)))(transform(clamp(x)));
27704
28020
  }
27705
28021
 
27706
28022
  scale.invert = function(y) {
@@ -27716,15 +28032,15 @@ Instead styling against the role which is more general and likely a better appro
27716
28032
  };
27717
28033
 
27718
28034
  scale.rangeRound = function(_) {
27719
- return range = Array.from(_), interpolate$1 = interpolateRound, rescale();
28035
+ return range = Array.from(_), interpolate = interpolateRound, rescale();
27720
28036
  };
27721
28037
 
27722
28038
  scale.clamp = function(_) {
27723
- return arguments.length ? (clamp = _ ? true : identity$1, rescale()) : clamp !== identity$1;
28039
+ return arguments.length ? (clamp = _ ? true : identity$2, rescale()) : clamp !== identity$2;
27724
28040
  };
27725
28041
 
27726
28042
  scale.interpolate = function(_) {
27727
- return arguments.length ? (interpolate$1 = _, rescale()) : interpolate$1;
28043
+ return arguments.length ? (interpolate = _, rescale()) : interpolate;
27728
28044
  };
27729
28045
 
27730
28046
  scale.unknown = function(_) {
@@ -27738,7 +28054,7 @@ Instead styling against the role which is more general and likely a better appro
27738
28054
  }
27739
28055
 
27740
28056
  function continuous() {
27741
- return transformer()(identity$1, identity$1);
28057
+ return transformer()(identity$2, identity$2);
27742
28058
  }
27743
28059
 
27744
28060
  function formatDecimal(x) {
@@ -27894,7 +28210,7 @@ Instead styling against the role which is more general and likely a better appro
27894
28210
  "x": (x) => Math.round(x).toString(16)
27895
28211
  };
27896
28212
 
27897
- function identity(x) {
28213
+ function identity$1(x) {
27898
28214
  return x;
27899
28215
  }
27900
28216
 
@@ -27902,11 +28218,11 @@ Instead styling against the role which is more general and likely a better appro
27902
28218
  prefixes = ["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];
27903
28219
 
27904
28220
  function formatLocale(locale) {
27905
- var group = locale.grouping === undefined || locale.thousands === undefined ? identity : formatGroup(map.call(locale.grouping, Number), locale.thousands + ""),
28221
+ var group = locale.grouping === undefined || locale.thousands === undefined ? identity$1 : formatGroup(map.call(locale.grouping, Number), locale.thousands + ""),
27906
28222
  currencyPrefix = locale.currency === undefined ? "" : locale.currency[0] + "",
27907
28223
  currencySuffix = locale.currency === undefined ? "" : locale.currency[1] + "",
27908
28224
  decimal = locale.decimal === undefined ? "." : locale.decimal + "",
27909
- numerals = locale.numerals === undefined ? identity : formatNumerals(map.call(locale.numerals, String)),
28225
+ numerals = locale.numerals === undefined ? identity$1 : formatNumerals(map.call(locale.numerals, String)),
27910
28226
  percent = locale.percent === undefined ? "%" : locale.percent + "",
27911
28227
  minus = locale.minus === undefined ? "−" : locale.minus + "",
27912
28228
  nan = locale.nan === undefined ? "NaN" : locale.nan + "";
@@ -29531,41 +29847,2700 @@ Instead styling against the role which is more general and likely a better appro
29531
29847
  }
29532
29848
  }
29533
29849
 
29534
- /**
29535
- * A nimble-styled WaferMap
29536
- */
29537
- class WaferMap extends FoundationElement {
29538
- constructor() {
29539
- super(...arguments);
29540
- this.quadrant = WaferMapQuadrant.topLeft;
29541
- this.orientation = WaferMapOrientation.top;
29542
- this.maxCharacters = 4;
29543
- this.dieLabelsHidden = false;
29544
- this.dieLabelsSuffix = '';
29545
- this.colorScaleMode = WaferMapColorScaleMode.linear;
29546
- this.highlightedValues = [];
29547
- this.dies = [];
29548
- this.colorScale = {
29549
- colors: [],
29550
- values: []
29551
- };
29552
- this.renderQueued = false;
29850
+ var xhtml = "http://www.w3.org/1999/xhtml";
29851
+
29852
+ var namespaces = {
29853
+ svg: "http://www.w3.org/2000/svg",
29854
+ xhtml: xhtml,
29855
+ xlink: "http://www.w3.org/1999/xlink",
29856
+ xml: "http://www.w3.org/XML/1998/namespace",
29857
+ xmlns: "http://www.w3.org/2000/xmlns/"
29858
+ };
29859
+
29860
+ function namespace(name) {
29861
+ var prefix = name += "", i = prefix.indexOf(":");
29862
+ if (i >= 0 && (prefix = name.slice(0, i)) !== "xmlns") name = name.slice(i + 1);
29863
+ return namespaces.hasOwnProperty(prefix) ? {space: namespaces[prefix], local: name} : name; // eslint-disable-line no-prototype-builtins
29864
+ }
29865
+
29866
+ function creatorInherit(name) {
29867
+ return function() {
29868
+ var document = this.ownerDocument,
29869
+ uri = this.namespaceURI;
29870
+ return uri === xhtml && document.documentElement.namespaceURI === xhtml
29871
+ ? document.createElement(name)
29872
+ : document.createElementNS(uri, name);
29873
+ };
29874
+ }
29875
+
29876
+ function creatorFixed(fullname) {
29877
+ return function() {
29878
+ return this.ownerDocument.createElementNS(fullname.space, fullname.local);
29879
+ };
29880
+ }
29881
+
29882
+ function creator(name) {
29883
+ var fullname = namespace(name);
29884
+ return (fullname.local
29885
+ ? creatorFixed
29886
+ : creatorInherit)(fullname);
29887
+ }
29888
+
29889
+ function none() {}
29890
+
29891
+ function selector(selector) {
29892
+ return selector == null ? none : function() {
29893
+ return this.querySelector(selector);
29894
+ };
29895
+ }
29896
+
29897
+ function selection_select(select) {
29898
+ if (typeof select !== "function") select = selector(select);
29899
+
29900
+ for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {
29901
+ for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) {
29902
+ if ((node = group[i]) && (subnode = select.call(node, node.__data__, i, group))) {
29903
+ if ("__data__" in node) subnode.__data__ = node.__data__;
29904
+ subgroup[i] = subnode;
29905
+ }
29553
29906
  }
29554
- connectedCallback() {
29555
- super.connectedCallback();
29556
- this.resizeObserver = new ResizeObserver(entries => {
29557
- const entry = entries[0];
29558
- if (entry === undefined) {
29559
- return;
29560
- }
29561
- const { height, width } = entry.contentRect;
29562
- this.canvasSideLength = Math.min(height, width);
29563
- });
29564
- this.resizeObserver.observe(this);
29907
+ }
29908
+
29909
+ return new Selection$1(subgroups, this._parents);
29910
+ }
29911
+
29912
+ // Given something array like (or null), returns something that is strictly an
29913
+ // array. This is used to ensure that array-like objects passed to d3.selectAll
29914
+ // or selection.selectAll are converted into proper arrays when creating a
29915
+ // selection; we don’t ever want to create a selection backed by a live
29916
+ // HTMLCollection or NodeList. However, note that selection.selectAll will use a
29917
+ // static NodeList as a group, since it safely derived from querySelectorAll.
29918
+ function array(x) {
29919
+ return x == null ? [] : Array.isArray(x) ? x : Array.from(x);
29920
+ }
29921
+
29922
+ function empty() {
29923
+ return [];
29924
+ }
29925
+
29926
+ function selectorAll(selector) {
29927
+ return selector == null ? empty : function() {
29928
+ return this.querySelectorAll(selector);
29929
+ };
29930
+ }
29931
+
29932
+ function arrayAll(select) {
29933
+ return function() {
29934
+ return array(select.apply(this, arguments));
29935
+ };
29936
+ }
29937
+
29938
+ function selection_selectAll(select) {
29939
+ if (typeof select === "function") select = arrayAll(select);
29940
+ else select = selectorAll(select);
29941
+
29942
+ for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) {
29943
+ for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {
29944
+ if (node = group[i]) {
29945
+ subgroups.push(select.call(node, node.__data__, i, group));
29946
+ parents.push(node);
29947
+ }
29948
+ }
29949
+ }
29950
+
29951
+ return new Selection$1(subgroups, parents);
29952
+ }
29953
+
29954
+ function matcher(selector) {
29955
+ return function() {
29956
+ return this.matches(selector);
29957
+ };
29958
+ }
29959
+
29960
+ function childMatcher(selector) {
29961
+ return function(node) {
29962
+ return node.matches(selector);
29963
+ };
29964
+ }
29965
+
29966
+ var find = Array.prototype.find;
29967
+
29968
+ function childFind(match) {
29969
+ return function() {
29970
+ return find.call(this.children, match);
29971
+ };
29972
+ }
29973
+
29974
+ function childFirst() {
29975
+ return this.firstElementChild;
29976
+ }
29977
+
29978
+ function selection_selectChild(match) {
29979
+ return this.select(match == null ? childFirst
29980
+ : childFind(typeof match === "function" ? match : childMatcher(match)));
29981
+ }
29982
+
29983
+ var filter = Array.prototype.filter;
29984
+
29985
+ function children() {
29986
+ return Array.from(this.children);
29987
+ }
29988
+
29989
+ function childrenFilter(match) {
29990
+ return function() {
29991
+ return filter.call(this.children, match);
29992
+ };
29993
+ }
29994
+
29995
+ function selection_selectChildren(match) {
29996
+ return this.selectAll(match == null ? children
29997
+ : childrenFilter(typeof match === "function" ? match : childMatcher(match)));
29998
+ }
29999
+
30000
+ function selection_filter(match) {
30001
+ if (typeof match !== "function") match = matcher(match);
30002
+
30003
+ for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {
30004
+ for (var group = groups[j], n = group.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) {
30005
+ if ((node = group[i]) && match.call(node, node.__data__, i, group)) {
30006
+ subgroup.push(node);
30007
+ }
30008
+ }
30009
+ }
30010
+
30011
+ return new Selection$1(subgroups, this._parents);
30012
+ }
30013
+
30014
+ function sparse(update) {
30015
+ return new Array(update.length);
30016
+ }
30017
+
30018
+ function selection_enter() {
30019
+ return new Selection$1(this._enter || this._groups.map(sparse), this._parents);
30020
+ }
30021
+
30022
+ function EnterNode(parent, datum) {
30023
+ this.ownerDocument = parent.ownerDocument;
30024
+ this.namespaceURI = parent.namespaceURI;
30025
+ this._next = null;
30026
+ this._parent = parent;
30027
+ this.__data__ = datum;
30028
+ }
30029
+
30030
+ EnterNode.prototype = {
30031
+ constructor: EnterNode,
30032
+ appendChild: function(child) { return this._parent.insertBefore(child, this._next); },
30033
+ insertBefore: function(child, next) { return this._parent.insertBefore(child, next); },
30034
+ querySelector: function(selector) { return this._parent.querySelector(selector); },
30035
+ querySelectorAll: function(selector) { return this._parent.querySelectorAll(selector); }
30036
+ };
30037
+
30038
+ function constant$1(x) {
30039
+ return function() {
30040
+ return x;
30041
+ };
30042
+ }
30043
+
30044
+ function bindIndex(parent, group, enter, update, exit, data) {
30045
+ var i = 0,
30046
+ node,
30047
+ groupLength = group.length,
30048
+ dataLength = data.length;
30049
+
30050
+ // Put any non-null nodes that fit into update.
30051
+ // Put any null nodes into enter.
30052
+ // Put any remaining data into enter.
30053
+ for (; i < dataLength; ++i) {
30054
+ if (node = group[i]) {
30055
+ node.__data__ = data[i];
30056
+ update[i] = node;
30057
+ } else {
30058
+ enter[i] = new EnterNode(parent, data[i]);
30059
+ }
30060
+ }
30061
+
30062
+ // Put any non-null nodes that don’t fit into exit.
30063
+ for (; i < groupLength; ++i) {
30064
+ if (node = group[i]) {
30065
+ exit[i] = node;
30066
+ }
30067
+ }
30068
+ }
30069
+
30070
+ function bindKey(parent, group, enter, update, exit, data, key) {
30071
+ var i,
30072
+ node,
30073
+ nodeByKeyValue = new Map,
30074
+ groupLength = group.length,
30075
+ dataLength = data.length,
30076
+ keyValues = new Array(groupLength),
30077
+ keyValue;
30078
+
30079
+ // Compute the key for each node.
30080
+ // If multiple nodes have the same key, the duplicates are added to exit.
30081
+ for (i = 0; i < groupLength; ++i) {
30082
+ if (node = group[i]) {
30083
+ keyValues[i] = keyValue = key.call(node, node.__data__, i, group) + "";
30084
+ if (nodeByKeyValue.has(keyValue)) {
30085
+ exit[i] = node;
30086
+ } else {
30087
+ nodeByKeyValue.set(keyValue, node);
30088
+ }
30089
+ }
30090
+ }
30091
+
30092
+ // Compute the key for each datum.
30093
+ // If there a node associated with this key, join and add it to update.
30094
+ // If there is not (or the key is a duplicate), add it to enter.
30095
+ for (i = 0; i < dataLength; ++i) {
30096
+ keyValue = key.call(parent, data[i], i, data) + "";
30097
+ if (node = nodeByKeyValue.get(keyValue)) {
30098
+ update[i] = node;
30099
+ node.__data__ = data[i];
30100
+ nodeByKeyValue.delete(keyValue);
30101
+ } else {
30102
+ enter[i] = new EnterNode(parent, data[i]);
30103
+ }
30104
+ }
30105
+
30106
+ // Add any remaining nodes that were not bound to data to exit.
30107
+ for (i = 0; i < groupLength; ++i) {
30108
+ if ((node = group[i]) && (nodeByKeyValue.get(keyValues[i]) === node)) {
30109
+ exit[i] = node;
30110
+ }
30111
+ }
30112
+ }
30113
+
30114
+ function datum(node) {
30115
+ return node.__data__;
30116
+ }
30117
+
30118
+ function selection_data(value, key) {
30119
+ if (!arguments.length) return Array.from(this, datum);
30120
+
30121
+ var bind = key ? bindKey : bindIndex,
30122
+ parents = this._parents,
30123
+ groups = this._groups;
30124
+
30125
+ if (typeof value !== "function") value = constant$1(value);
30126
+
30127
+ for (var m = groups.length, update = new Array(m), enter = new Array(m), exit = new Array(m), j = 0; j < m; ++j) {
30128
+ var parent = parents[j],
30129
+ group = groups[j],
30130
+ groupLength = group.length,
30131
+ data = arraylike(value.call(parent, parent && parent.__data__, j, parents)),
30132
+ dataLength = data.length,
30133
+ enterGroup = enter[j] = new Array(dataLength),
30134
+ updateGroup = update[j] = new Array(dataLength),
30135
+ exitGroup = exit[j] = new Array(groupLength);
30136
+
30137
+ bind(parent, group, enterGroup, updateGroup, exitGroup, data, key);
30138
+
30139
+ // Now connect the enter nodes to their following update node, such that
30140
+ // appendChild can insert the materialized enter node before this node,
30141
+ // rather than at the end of the parent node.
30142
+ for (var i0 = 0, i1 = 0, previous, next; i0 < dataLength; ++i0) {
30143
+ if (previous = enterGroup[i0]) {
30144
+ if (i0 >= i1) i1 = i0 + 1;
30145
+ while (!(next = updateGroup[i1]) && ++i1 < dataLength);
30146
+ previous._next = next || null;
30147
+ }
30148
+ }
30149
+ }
30150
+
30151
+ update = new Selection$1(update, parents);
30152
+ update._enter = enter;
30153
+ update._exit = exit;
30154
+ return update;
30155
+ }
30156
+
30157
+ // Given some data, this returns an array-like view of it: an object that
30158
+ // exposes a length property and allows numeric indexing. Note that unlike
30159
+ // selectAll, this isn’t worried about “live” collections because the resulting
30160
+ // array will only be used briefly while data is being bound. (It is possible to
30161
+ // cause the data to change while iterating by using a key function, but please
30162
+ // don’t; we’d rather avoid a gratuitous copy.)
30163
+ function arraylike(data) {
30164
+ return typeof data === "object" && "length" in data
30165
+ ? data // Array, TypedArray, NodeList, array-like
30166
+ : Array.from(data); // Map, Set, iterable, string, or anything else
30167
+ }
30168
+
30169
+ function selection_exit() {
30170
+ return new Selection$1(this._exit || this._groups.map(sparse), this._parents);
30171
+ }
30172
+
30173
+ function selection_join(onenter, onupdate, onexit) {
30174
+ var enter = this.enter(), update = this, exit = this.exit();
30175
+ if (typeof onenter === "function") {
30176
+ enter = onenter(enter);
30177
+ if (enter) enter = enter.selection();
30178
+ } else {
30179
+ enter = enter.append(onenter + "");
30180
+ }
30181
+ if (onupdate != null) {
30182
+ update = onupdate(update);
30183
+ if (update) update = update.selection();
30184
+ }
30185
+ if (onexit == null) exit.remove(); else onexit(exit);
30186
+ return enter && update ? enter.merge(update).order() : update;
30187
+ }
30188
+
30189
+ function selection_merge(context) {
30190
+ var selection = context.selection ? context.selection() : context;
30191
+
30192
+ for (var groups0 = this._groups, groups1 = selection._groups, m0 = groups0.length, m1 = groups1.length, m = Math.min(m0, m1), merges = new Array(m0), j = 0; j < m; ++j) {
30193
+ for (var group0 = groups0[j], group1 = groups1[j], n = group0.length, merge = merges[j] = new Array(n), node, i = 0; i < n; ++i) {
30194
+ if (node = group0[i] || group1[i]) {
30195
+ merge[i] = node;
30196
+ }
30197
+ }
30198
+ }
30199
+
30200
+ for (; j < m0; ++j) {
30201
+ merges[j] = groups0[j];
30202
+ }
30203
+
30204
+ return new Selection$1(merges, this._parents);
30205
+ }
30206
+
30207
+ function selection_order() {
30208
+
30209
+ for (var groups = this._groups, j = -1, m = groups.length; ++j < m;) {
30210
+ for (var group = groups[j], i = group.length - 1, next = group[i], node; --i >= 0;) {
30211
+ if (node = group[i]) {
30212
+ if (next && node.compareDocumentPosition(next) ^ 4) next.parentNode.insertBefore(node, next);
30213
+ next = node;
30214
+ }
30215
+ }
30216
+ }
30217
+
30218
+ return this;
30219
+ }
30220
+
30221
+ function selection_sort(compare) {
30222
+ if (!compare) compare = ascending;
30223
+
30224
+ function compareNode(a, b) {
30225
+ return a && b ? compare(a.__data__, b.__data__) : !a - !b;
30226
+ }
30227
+
30228
+ for (var groups = this._groups, m = groups.length, sortgroups = new Array(m), j = 0; j < m; ++j) {
30229
+ for (var group = groups[j], n = group.length, sortgroup = sortgroups[j] = new Array(n), node, i = 0; i < n; ++i) {
30230
+ if (node = group[i]) {
30231
+ sortgroup[i] = node;
30232
+ }
30233
+ }
30234
+ sortgroup.sort(compareNode);
30235
+ }
30236
+
30237
+ return new Selection$1(sortgroups, this._parents).order();
30238
+ }
30239
+
30240
+ function ascending(a, b) {
30241
+ return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;
30242
+ }
30243
+
30244
+ function selection_call() {
30245
+ var callback = arguments[0];
30246
+ arguments[0] = this;
30247
+ callback.apply(null, arguments);
30248
+ return this;
30249
+ }
30250
+
30251
+ function selection_nodes() {
30252
+ return Array.from(this);
30253
+ }
30254
+
30255
+ function selection_node() {
30256
+
30257
+ for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {
30258
+ for (var group = groups[j], i = 0, n = group.length; i < n; ++i) {
30259
+ var node = group[i];
30260
+ if (node) return node;
30261
+ }
30262
+ }
30263
+
30264
+ return null;
30265
+ }
30266
+
30267
+ function selection_size() {
30268
+ let size = 0;
30269
+ for (const node of this) ++size; // eslint-disable-line no-unused-vars
30270
+ return size;
30271
+ }
30272
+
30273
+ function selection_empty() {
30274
+ return !this.node();
30275
+ }
30276
+
30277
+ function selection_each(callback) {
30278
+
30279
+ for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {
30280
+ for (var group = groups[j], i = 0, n = group.length, node; i < n; ++i) {
30281
+ if (node = group[i]) callback.call(node, node.__data__, i, group);
30282
+ }
30283
+ }
30284
+
30285
+ return this;
30286
+ }
30287
+
30288
+ function attrRemove$1(name) {
30289
+ return function() {
30290
+ this.removeAttribute(name);
30291
+ };
30292
+ }
30293
+
30294
+ function attrRemoveNS$1(fullname) {
30295
+ return function() {
30296
+ this.removeAttributeNS(fullname.space, fullname.local);
30297
+ };
30298
+ }
30299
+
30300
+ function attrConstant$1(name, value) {
30301
+ return function() {
30302
+ this.setAttribute(name, value);
30303
+ };
30304
+ }
30305
+
30306
+ function attrConstantNS$1(fullname, value) {
30307
+ return function() {
30308
+ this.setAttributeNS(fullname.space, fullname.local, value);
30309
+ };
30310
+ }
30311
+
30312
+ function attrFunction$1(name, value) {
30313
+ return function() {
30314
+ var v = value.apply(this, arguments);
30315
+ if (v == null) this.removeAttribute(name);
30316
+ else this.setAttribute(name, v);
30317
+ };
30318
+ }
30319
+
30320
+ function attrFunctionNS$1(fullname, value) {
30321
+ return function() {
30322
+ var v = value.apply(this, arguments);
30323
+ if (v == null) this.removeAttributeNS(fullname.space, fullname.local);
30324
+ else this.setAttributeNS(fullname.space, fullname.local, v);
30325
+ };
30326
+ }
30327
+
30328
+ function selection_attr(name, value) {
30329
+ var fullname = namespace(name);
30330
+
30331
+ if (arguments.length < 2) {
30332
+ var node = this.node();
30333
+ return fullname.local
30334
+ ? node.getAttributeNS(fullname.space, fullname.local)
30335
+ : node.getAttribute(fullname);
30336
+ }
30337
+
30338
+ return this.each((value == null
30339
+ ? (fullname.local ? attrRemoveNS$1 : attrRemove$1) : (typeof value === "function"
30340
+ ? (fullname.local ? attrFunctionNS$1 : attrFunction$1)
30341
+ : (fullname.local ? attrConstantNS$1 : attrConstant$1)))(fullname, value));
30342
+ }
30343
+
30344
+ function defaultView(node) {
30345
+ return (node.ownerDocument && node.ownerDocument.defaultView) // node is a Node
30346
+ || (node.document && node) // node is a Window
30347
+ || node.defaultView; // node is a Document
30348
+ }
30349
+
30350
+ function styleRemove$1(name) {
30351
+ return function() {
30352
+ this.style.removeProperty(name);
30353
+ };
30354
+ }
30355
+
30356
+ function styleConstant$1(name, value, priority) {
30357
+ return function() {
30358
+ this.style.setProperty(name, value, priority);
30359
+ };
30360
+ }
30361
+
30362
+ function styleFunction$1(name, value, priority) {
30363
+ return function() {
30364
+ var v = value.apply(this, arguments);
30365
+ if (v == null) this.style.removeProperty(name);
30366
+ else this.style.setProperty(name, v, priority);
30367
+ };
30368
+ }
30369
+
30370
+ function selection_style(name, value, priority) {
30371
+ return arguments.length > 1
30372
+ ? this.each((value == null
30373
+ ? styleRemove$1 : typeof value === "function"
30374
+ ? styleFunction$1
30375
+ : styleConstant$1)(name, value, priority == null ? "" : priority))
30376
+ : styleValue(this.node(), name);
30377
+ }
30378
+
30379
+ function styleValue(node, name) {
30380
+ return node.style.getPropertyValue(name)
30381
+ || defaultView(node).getComputedStyle(node, null).getPropertyValue(name);
30382
+ }
30383
+
30384
+ function propertyRemove(name) {
30385
+ return function() {
30386
+ delete this[name];
30387
+ };
30388
+ }
30389
+
30390
+ function propertyConstant(name, value) {
30391
+ return function() {
30392
+ this[name] = value;
30393
+ };
30394
+ }
30395
+
30396
+ function propertyFunction(name, value) {
30397
+ return function() {
30398
+ var v = value.apply(this, arguments);
30399
+ if (v == null) delete this[name];
30400
+ else this[name] = v;
30401
+ };
30402
+ }
30403
+
30404
+ function selection_property(name, value) {
30405
+ return arguments.length > 1
30406
+ ? this.each((value == null
30407
+ ? propertyRemove : typeof value === "function"
30408
+ ? propertyFunction
30409
+ : propertyConstant)(name, value))
30410
+ : this.node()[name];
30411
+ }
30412
+
30413
+ function classArray(string) {
30414
+ return string.trim().split(/^|\s+/);
30415
+ }
30416
+
30417
+ function classList(node) {
30418
+ return node.classList || new ClassList(node);
30419
+ }
30420
+
30421
+ function ClassList(node) {
30422
+ this._node = node;
30423
+ this._names = classArray(node.getAttribute("class") || "");
30424
+ }
30425
+
30426
+ ClassList.prototype = {
30427
+ add: function(name) {
30428
+ var i = this._names.indexOf(name);
30429
+ if (i < 0) {
30430
+ this._names.push(name);
30431
+ this._node.setAttribute("class", this._names.join(" "));
30432
+ }
30433
+ },
30434
+ remove: function(name) {
30435
+ var i = this._names.indexOf(name);
30436
+ if (i >= 0) {
30437
+ this._names.splice(i, 1);
30438
+ this._node.setAttribute("class", this._names.join(" "));
30439
+ }
30440
+ },
30441
+ contains: function(name) {
30442
+ return this._names.indexOf(name) >= 0;
30443
+ }
30444
+ };
30445
+
30446
+ function classedAdd(node, names) {
30447
+ var list = classList(node), i = -1, n = names.length;
30448
+ while (++i < n) list.add(names[i]);
30449
+ }
30450
+
30451
+ function classedRemove(node, names) {
30452
+ var list = classList(node), i = -1, n = names.length;
30453
+ while (++i < n) list.remove(names[i]);
30454
+ }
30455
+
30456
+ function classedTrue(names) {
30457
+ return function() {
30458
+ classedAdd(this, names);
30459
+ };
30460
+ }
30461
+
30462
+ function classedFalse(names) {
30463
+ return function() {
30464
+ classedRemove(this, names);
30465
+ };
30466
+ }
30467
+
30468
+ function classedFunction(names, value) {
30469
+ return function() {
30470
+ (value.apply(this, arguments) ? classedAdd : classedRemove)(this, names);
30471
+ };
30472
+ }
30473
+
30474
+ function selection_classed(name, value) {
30475
+ var names = classArray(name + "");
30476
+
30477
+ if (arguments.length < 2) {
30478
+ var list = classList(this.node()), i = -1, n = names.length;
30479
+ while (++i < n) if (!list.contains(names[i])) return false;
30480
+ return true;
30481
+ }
30482
+
30483
+ return this.each((typeof value === "function"
30484
+ ? classedFunction : value
30485
+ ? classedTrue
30486
+ : classedFalse)(names, value));
30487
+ }
30488
+
30489
+ function textRemove() {
30490
+ this.textContent = "";
30491
+ }
30492
+
30493
+ function textConstant$1(value) {
30494
+ return function() {
30495
+ this.textContent = value;
30496
+ };
30497
+ }
30498
+
30499
+ function textFunction$1(value) {
30500
+ return function() {
30501
+ var v = value.apply(this, arguments);
30502
+ this.textContent = v == null ? "" : v;
30503
+ };
30504
+ }
30505
+
30506
+ function selection_text(value) {
30507
+ return arguments.length
30508
+ ? this.each(value == null
30509
+ ? textRemove : (typeof value === "function"
30510
+ ? textFunction$1
30511
+ : textConstant$1)(value))
30512
+ : this.node().textContent;
30513
+ }
30514
+
30515
+ function htmlRemove() {
30516
+ this.innerHTML = "";
30517
+ }
30518
+
30519
+ function htmlConstant(value) {
30520
+ return function() {
30521
+ this.innerHTML = value;
30522
+ };
30523
+ }
30524
+
30525
+ function htmlFunction(value) {
30526
+ return function() {
30527
+ var v = value.apply(this, arguments);
30528
+ this.innerHTML = v == null ? "" : v;
30529
+ };
30530
+ }
30531
+
30532
+ function selection_html(value) {
30533
+ return arguments.length
30534
+ ? this.each(value == null
30535
+ ? htmlRemove : (typeof value === "function"
30536
+ ? htmlFunction
30537
+ : htmlConstant)(value))
30538
+ : this.node().innerHTML;
30539
+ }
30540
+
30541
+ function raise() {
30542
+ if (this.nextSibling) this.parentNode.appendChild(this);
30543
+ }
30544
+
30545
+ function selection_raise() {
30546
+ return this.each(raise);
30547
+ }
30548
+
30549
+ function lower() {
30550
+ if (this.previousSibling) this.parentNode.insertBefore(this, this.parentNode.firstChild);
30551
+ }
30552
+
30553
+ function selection_lower() {
30554
+ return this.each(lower);
30555
+ }
30556
+
30557
+ function selection_append(name) {
30558
+ var create = typeof name === "function" ? name : creator(name);
30559
+ return this.select(function() {
30560
+ return this.appendChild(create.apply(this, arguments));
30561
+ });
30562
+ }
30563
+
30564
+ function constantNull() {
30565
+ return null;
30566
+ }
30567
+
30568
+ function selection_insert(name, before) {
30569
+ var create = typeof name === "function" ? name : creator(name),
30570
+ select = before == null ? constantNull : typeof before === "function" ? before : selector(before);
30571
+ return this.select(function() {
30572
+ return this.insertBefore(create.apply(this, arguments), select.apply(this, arguments) || null);
30573
+ });
30574
+ }
30575
+
30576
+ function remove() {
30577
+ var parent = this.parentNode;
30578
+ if (parent) parent.removeChild(this);
30579
+ }
30580
+
30581
+ function selection_remove() {
30582
+ return this.each(remove);
30583
+ }
30584
+
30585
+ function selection_cloneShallow() {
30586
+ var clone = this.cloneNode(false), parent = this.parentNode;
30587
+ return parent ? parent.insertBefore(clone, this.nextSibling) : clone;
30588
+ }
30589
+
30590
+ function selection_cloneDeep() {
30591
+ var clone = this.cloneNode(true), parent = this.parentNode;
30592
+ return parent ? parent.insertBefore(clone, this.nextSibling) : clone;
30593
+ }
30594
+
30595
+ function selection_clone(deep) {
30596
+ return this.select(deep ? selection_cloneDeep : selection_cloneShallow);
30597
+ }
30598
+
30599
+ function selection_datum(value) {
30600
+ return arguments.length
30601
+ ? this.property("__data__", value)
30602
+ : this.node().__data__;
30603
+ }
30604
+
30605
+ function contextListener(listener) {
30606
+ return function(event) {
30607
+ listener.call(this, event, this.__data__);
30608
+ };
30609
+ }
30610
+
30611
+ function parseTypenames$1(typenames) {
30612
+ return typenames.trim().split(/^|\s+/).map(function(t) {
30613
+ var name = "", i = t.indexOf(".");
30614
+ if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i);
30615
+ return {type: t, name: name};
30616
+ });
30617
+ }
30618
+
30619
+ function onRemove(typename) {
30620
+ return function() {
30621
+ var on = this.__on;
30622
+ if (!on) return;
30623
+ for (var j = 0, i = -1, m = on.length, o; j < m; ++j) {
30624
+ if (o = on[j], (!typename.type || o.type === typename.type) && o.name === typename.name) {
30625
+ this.removeEventListener(o.type, o.listener, o.options);
30626
+ } else {
30627
+ on[++i] = o;
30628
+ }
30629
+ }
30630
+ if (++i) on.length = i;
30631
+ else delete this.__on;
30632
+ };
30633
+ }
30634
+
30635
+ function onAdd(typename, value, options) {
30636
+ return function() {
30637
+ var on = this.__on, o, listener = contextListener(value);
30638
+ if (on) for (var j = 0, m = on.length; j < m; ++j) {
30639
+ if ((o = on[j]).type === typename.type && o.name === typename.name) {
30640
+ this.removeEventListener(o.type, o.listener, o.options);
30641
+ this.addEventListener(o.type, o.listener = listener, o.options = options);
30642
+ o.value = value;
30643
+ return;
30644
+ }
30645
+ }
30646
+ this.addEventListener(typename.type, listener, options);
30647
+ o = {type: typename.type, name: typename.name, value: value, listener: listener, options: options};
30648
+ if (!on) this.__on = [o];
30649
+ else on.push(o);
30650
+ };
30651
+ }
30652
+
30653
+ function selection_on(typename, value, options) {
30654
+ var typenames = parseTypenames$1(typename + ""), i, n = typenames.length, t;
30655
+
30656
+ if (arguments.length < 2) {
30657
+ var on = this.node().__on;
30658
+ if (on) for (var j = 0, m = on.length, o; j < m; ++j) {
30659
+ for (i = 0, o = on[j]; i < n; ++i) {
30660
+ if ((t = typenames[i]).type === o.type && t.name === o.name) {
30661
+ return o.value;
30662
+ }
30663
+ }
30664
+ }
30665
+ return;
30666
+ }
30667
+
30668
+ on = value ? onAdd : onRemove;
30669
+ for (i = 0; i < n; ++i) this.each(on(typenames[i], value, options));
30670
+ return this;
30671
+ }
30672
+
30673
+ function dispatchEvent(node, type, params) {
30674
+ var window = defaultView(node),
30675
+ event = window.CustomEvent;
30676
+
30677
+ if (typeof event === "function") {
30678
+ event = new event(type, params);
30679
+ } else {
30680
+ event = window.document.createEvent("Event");
30681
+ if (params) event.initEvent(type, params.bubbles, params.cancelable), event.detail = params.detail;
30682
+ else event.initEvent(type, false, false);
30683
+ }
30684
+
30685
+ node.dispatchEvent(event);
30686
+ }
30687
+
30688
+ function dispatchConstant(type, params) {
30689
+ return function() {
30690
+ return dispatchEvent(this, type, params);
30691
+ };
30692
+ }
30693
+
30694
+ function dispatchFunction(type, params) {
30695
+ return function() {
30696
+ return dispatchEvent(this, type, params.apply(this, arguments));
30697
+ };
30698
+ }
30699
+
30700
+ function selection_dispatch(type, params) {
30701
+ return this.each((typeof params === "function"
30702
+ ? dispatchFunction
30703
+ : dispatchConstant)(type, params));
30704
+ }
30705
+
30706
+ function* selection_iterator() {
30707
+ for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {
30708
+ for (var group = groups[j], i = 0, n = group.length, node; i < n; ++i) {
30709
+ if (node = group[i]) yield node;
30710
+ }
30711
+ }
30712
+ }
30713
+
30714
+ var root = [null];
30715
+
30716
+ function Selection$1(groups, parents) {
30717
+ this._groups = groups;
30718
+ this._parents = parents;
30719
+ }
30720
+
30721
+ function selection() {
30722
+ return new Selection$1([[document.documentElement]], root);
30723
+ }
30724
+
30725
+ function selection_selection() {
30726
+ return this;
30727
+ }
30728
+
30729
+ Selection$1.prototype = selection.prototype = {
30730
+ constructor: Selection$1,
30731
+ select: selection_select,
30732
+ selectAll: selection_selectAll,
30733
+ selectChild: selection_selectChild,
30734
+ selectChildren: selection_selectChildren,
30735
+ filter: selection_filter,
30736
+ data: selection_data,
30737
+ enter: selection_enter,
30738
+ exit: selection_exit,
30739
+ join: selection_join,
30740
+ merge: selection_merge,
30741
+ selection: selection_selection,
30742
+ order: selection_order,
30743
+ sort: selection_sort,
30744
+ call: selection_call,
30745
+ nodes: selection_nodes,
30746
+ node: selection_node,
30747
+ size: selection_size,
30748
+ empty: selection_empty,
30749
+ each: selection_each,
30750
+ attr: selection_attr,
30751
+ style: selection_style,
30752
+ property: selection_property,
30753
+ classed: selection_classed,
30754
+ text: selection_text,
30755
+ html: selection_html,
30756
+ raise: selection_raise,
30757
+ lower: selection_lower,
30758
+ append: selection_append,
30759
+ insert: selection_insert,
30760
+ remove: selection_remove,
30761
+ clone: selection_clone,
30762
+ datum: selection_datum,
30763
+ on: selection_on,
30764
+ dispatch: selection_dispatch,
30765
+ [Symbol.iterator]: selection_iterator
30766
+ };
30767
+
30768
+ function select(selector) {
30769
+ return typeof selector === "string"
30770
+ ? new Selection$1([[document.querySelector(selector)]], [document.documentElement])
30771
+ : new Selection$1([[selector]], root);
30772
+ }
30773
+
30774
+ function sourceEvent(event) {
30775
+ let sourceEvent;
30776
+ while (sourceEvent = event.sourceEvent) event = sourceEvent;
30777
+ return event;
30778
+ }
30779
+
30780
+ function pointer(event, node) {
30781
+ event = sourceEvent(event);
30782
+ if (node === undefined) node = event.currentTarget;
30783
+ if (node) {
30784
+ var svg = node.ownerSVGElement || node;
30785
+ if (svg.createSVGPoint) {
30786
+ var point = svg.createSVGPoint();
30787
+ point.x = event.clientX, point.y = event.clientY;
30788
+ point = point.matrixTransform(node.getScreenCTM().inverse());
30789
+ return [point.x, point.y];
30790
+ }
30791
+ if (node.getBoundingClientRect) {
30792
+ var rect = node.getBoundingClientRect();
30793
+ return [event.clientX - rect.left - node.clientLeft, event.clientY - rect.top - node.clientTop];
30794
+ }
30795
+ }
30796
+ return [event.pageX, event.pageY];
30797
+ }
30798
+
30799
+ var noop = {value: () => {}};
30800
+
30801
+ function dispatch() {
30802
+ for (var i = 0, n = arguments.length, _ = {}, t; i < n; ++i) {
30803
+ if (!(t = arguments[i] + "") || (t in _) || /[\s.]/.test(t)) throw new Error("illegal type: " + t);
30804
+ _[t] = [];
30805
+ }
30806
+ return new Dispatch(_);
30807
+ }
30808
+
30809
+ function Dispatch(_) {
30810
+ this._ = _;
30811
+ }
30812
+
30813
+ function parseTypenames(typenames, types) {
30814
+ return typenames.trim().split(/^|\s+/).map(function(t) {
30815
+ var name = "", i = t.indexOf(".");
30816
+ if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i);
30817
+ if (t && !types.hasOwnProperty(t)) throw new Error("unknown type: " + t);
30818
+ return {type: t, name: name};
30819
+ });
30820
+ }
30821
+
30822
+ Dispatch.prototype = dispatch.prototype = {
30823
+ constructor: Dispatch,
30824
+ on: function(typename, callback) {
30825
+ var _ = this._,
30826
+ T = parseTypenames(typename + "", _),
30827
+ t,
30828
+ i = -1,
30829
+ n = T.length;
30830
+
30831
+ // If no callback was specified, return the callback of the given type and name.
30832
+ if (arguments.length < 2) {
30833
+ while (++i < n) if ((t = (typename = T[i]).type) && (t = get$1(_[t], typename.name))) return t;
30834
+ return;
30835
+ }
30836
+
30837
+ // If a type was specified, set the callback for the given type and name.
30838
+ // Otherwise, if a null callback was specified, remove callbacks of the given name.
30839
+ if (callback != null && typeof callback !== "function") throw new Error("invalid callback: " + callback);
30840
+ while (++i < n) {
30841
+ if (t = (typename = T[i]).type) _[t] = set$1(_[t], typename.name, callback);
30842
+ else if (callback == null) for (t in _) _[t] = set$1(_[t], typename.name, null);
30843
+ }
30844
+
30845
+ return this;
30846
+ },
30847
+ copy: function() {
30848
+ var copy = {}, _ = this._;
30849
+ for (var t in _) copy[t] = _[t].slice();
30850
+ return new Dispatch(copy);
30851
+ },
30852
+ call: function(type, that) {
30853
+ if ((n = arguments.length - 2) > 0) for (var args = new Array(n), i = 0, n, t; i < n; ++i) args[i] = arguments[i + 2];
30854
+ if (!this._.hasOwnProperty(type)) throw new Error("unknown type: " + type);
30855
+ for (t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args);
30856
+ },
30857
+ apply: function(type, that, args) {
30858
+ if (!this._.hasOwnProperty(type)) throw new Error("unknown type: " + type);
30859
+ for (var t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args);
30860
+ }
30861
+ };
30862
+
30863
+ function get$1(type, name) {
30864
+ for (var i = 0, n = type.length, c; i < n; ++i) {
30865
+ if ((c = type[i]).name === name) {
30866
+ return c.value;
30867
+ }
30868
+ }
30869
+ }
30870
+
30871
+ function set$1(type, name, callback) {
30872
+ for (var i = 0, n = type.length; i < n; ++i) {
30873
+ if (type[i].name === name) {
30874
+ type[i] = noop, type = type.slice(0, i).concat(type.slice(i + 1));
30875
+ break;
30876
+ }
30877
+ }
30878
+ if (callback != null) type.push({name: name, value: callback});
30879
+ return type;
30880
+ }
30881
+
30882
+ // These are typically used in conjunction with noevent to ensure that we can
30883
+ const nonpassivecapture = {capture: true, passive: false};
30884
+
30885
+ function noevent$1(event) {
30886
+ event.preventDefault();
30887
+ event.stopImmediatePropagation();
30888
+ }
30889
+
30890
+ function dragDisable(view) {
30891
+ var root = view.document.documentElement,
30892
+ selection = select(view).on("dragstart.drag", noevent$1, nonpassivecapture);
30893
+ if ("onselectstart" in root) {
30894
+ selection.on("selectstart.drag", noevent$1, nonpassivecapture);
30895
+ } else {
30896
+ root.__noselect = root.style.MozUserSelect;
30897
+ root.style.MozUserSelect = "none";
30898
+ }
30899
+ }
30900
+
30901
+ function yesdrag(view, noclick) {
30902
+ var root = view.document.documentElement,
30903
+ selection = select(view).on("dragstart.drag", null);
30904
+ if (noclick) {
30905
+ selection.on("click.drag", noevent$1, nonpassivecapture);
30906
+ setTimeout(function() { selection.on("click.drag", null); }, 0);
30907
+ }
30908
+ if ("onselectstart" in root) {
30909
+ selection.on("selectstart.drag", null);
30910
+ } else {
30911
+ root.style.MozUserSelect = root.__noselect;
30912
+ delete root.__noselect;
30913
+ }
30914
+ }
30915
+
30916
+ var frame = 0, // is an animation frame pending?
30917
+ timeout$1 = 0, // is a timeout pending?
30918
+ interval = 0, // are any timers active?
30919
+ pokeDelay = 1000, // how frequently we check for clock skew
30920
+ taskHead,
30921
+ taskTail,
30922
+ clockLast = 0,
30923
+ clockNow = 0,
30924
+ clockSkew = 0,
30925
+ clock = typeof performance === "object" && performance.now ? performance : Date,
30926
+ setFrame = typeof window === "object" && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : function(f) { setTimeout(f, 17); };
30927
+
30928
+ function now() {
30929
+ return clockNow || (setFrame(clearNow), clockNow = clock.now() + clockSkew);
30930
+ }
30931
+
30932
+ function clearNow() {
30933
+ clockNow = 0;
30934
+ }
30935
+
30936
+ function Timer() {
30937
+ this._call =
30938
+ this._time =
30939
+ this._next = null;
30940
+ }
30941
+
30942
+ Timer.prototype = timer.prototype = {
30943
+ constructor: Timer,
30944
+ restart: function(callback, delay, time) {
30945
+ if (typeof callback !== "function") throw new TypeError("callback is not a function");
30946
+ time = (time == null ? now() : +time) + (delay == null ? 0 : +delay);
30947
+ if (!this._next && taskTail !== this) {
30948
+ if (taskTail) taskTail._next = this;
30949
+ else taskHead = this;
30950
+ taskTail = this;
30951
+ }
30952
+ this._call = callback;
30953
+ this._time = time;
30954
+ sleep();
30955
+ },
30956
+ stop: function() {
30957
+ if (this._call) {
30958
+ this._call = null;
30959
+ this._time = Infinity;
30960
+ sleep();
30961
+ }
30962
+ }
30963
+ };
30964
+
30965
+ function timer(callback, delay, time) {
30966
+ var t = new Timer;
30967
+ t.restart(callback, delay, time);
30968
+ return t;
30969
+ }
30970
+
30971
+ function timerFlush() {
30972
+ now(); // Get the current time, if not already set.
30973
+ ++frame; // Pretend we’ve set an alarm, if we haven’t already.
30974
+ var t = taskHead, e;
30975
+ while (t) {
30976
+ if ((e = clockNow - t._time) >= 0) t._call.call(undefined, e);
30977
+ t = t._next;
30978
+ }
30979
+ --frame;
30980
+ }
30981
+
30982
+ function wake() {
30983
+ clockNow = (clockLast = clock.now()) + clockSkew;
30984
+ frame = timeout$1 = 0;
30985
+ try {
30986
+ timerFlush();
30987
+ } finally {
30988
+ frame = 0;
30989
+ nap();
30990
+ clockNow = 0;
30991
+ }
30992
+ }
30993
+
30994
+ function poke() {
30995
+ var now = clock.now(), delay = now - clockLast;
30996
+ if (delay > pokeDelay) clockSkew -= delay, clockLast = now;
30997
+ }
30998
+
30999
+ function nap() {
31000
+ var t0, t1 = taskHead, t2, time = Infinity;
31001
+ while (t1) {
31002
+ if (t1._call) {
31003
+ if (time > t1._time) time = t1._time;
31004
+ t0 = t1, t1 = t1._next;
31005
+ } else {
31006
+ t2 = t1._next, t1._next = null;
31007
+ t1 = t0 ? t0._next = t2 : taskHead = t2;
31008
+ }
31009
+ }
31010
+ taskTail = t0;
31011
+ sleep(time);
31012
+ }
31013
+
31014
+ function sleep(time) {
31015
+ if (frame) return; // Soonest alarm already set, or will be.
31016
+ if (timeout$1) timeout$1 = clearTimeout(timeout$1);
31017
+ var delay = time - clockNow; // Strictly less than if we recomputed clockNow.
31018
+ if (delay > 24) {
31019
+ if (time < Infinity) timeout$1 = setTimeout(wake, time - clock.now() - clockSkew);
31020
+ if (interval) interval = clearInterval(interval);
31021
+ } else {
31022
+ if (!interval) clockLast = clock.now(), interval = setInterval(poke, pokeDelay);
31023
+ frame = 1, setFrame(wake);
31024
+ }
31025
+ }
31026
+
31027
+ function timeout(callback, delay, time) {
31028
+ var t = new Timer;
31029
+ delay = delay == null ? 0 : +delay;
31030
+ t.restart(elapsed => {
31031
+ t.stop();
31032
+ callback(elapsed + delay);
31033
+ }, delay, time);
31034
+ return t;
31035
+ }
31036
+
31037
+ var emptyOn = dispatch("start", "end", "cancel", "interrupt");
31038
+ var emptyTween = [];
31039
+
31040
+ var CREATED = 0;
31041
+ var SCHEDULED = 1;
31042
+ var STARTING = 2;
31043
+ var STARTED = 3;
31044
+ var RUNNING = 4;
31045
+ var ENDING = 5;
31046
+ var ENDED = 6;
31047
+
31048
+ function schedule(node, name, id, index, group, timing) {
31049
+ var schedules = node.__transition;
31050
+ if (!schedules) node.__transition = {};
31051
+ else if (id in schedules) return;
31052
+ create(node, id, {
31053
+ name: name,
31054
+ index: index, // For context during callback.
31055
+ group: group, // For context during callback.
31056
+ on: emptyOn,
31057
+ tween: emptyTween,
31058
+ time: timing.time,
31059
+ delay: timing.delay,
31060
+ duration: timing.duration,
31061
+ ease: timing.ease,
31062
+ timer: null,
31063
+ state: CREATED
31064
+ });
31065
+ }
31066
+
31067
+ function init(node, id) {
31068
+ var schedule = get(node, id);
31069
+ if (schedule.state > CREATED) throw new Error("too late; already scheduled");
31070
+ return schedule;
31071
+ }
31072
+
31073
+ function set(node, id) {
31074
+ var schedule = get(node, id);
31075
+ if (schedule.state > STARTED) throw new Error("too late; already running");
31076
+ return schedule;
31077
+ }
31078
+
31079
+ function get(node, id) {
31080
+ var schedule = node.__transition;
31081
+ if (!schedule || !(schedule = schedule[id])) throw new Error("transition not found");
31082
+ return schedule;
31083
+ }
31084
+
31085
+ function create(node, id, self) {
31086
+ var schedules = node.__transition,
31087
+ tween;
31088
+
31089
+ // Initialize the self timer when the transition is created.
31090
+ // Note the actual delay is not known until the first callback!
31091
+ schedules[id] = self;
31092
+ self.timer = timer(schedule, 0, self.time);
31093
+
31094
+ function schedule(elapsed) {
31095
+ self.state = SCHEDULED;
31096
+ self.timer.restart(start, self.delay, self.time);
31097
+
31098
+ // If the elapsed delay is less than our first sleep, start immediately.
31099
+ if (self.delay <= elapsed) start(elapsed - self.delay);
31100
+ }
31101
+
31102
+ function start(elapsed) {
31103
+ var i, j, n, o;
31104
+
31105
+ // If the state is not SCHEDULED, then we previously errored on start.
31106
+ if (self.state !== SCHEDULED) return stop();
31107
+
31108
+ for (i in schedules) {
31109
+ o = schedules[i];
31110
+ if (o.name !== self.name) continue;
31111
+
31112
+ // While this element already has a starting transition during this frame,
31113
+ // defer starting an interrupting transition until that transition has a
31114
+ // chance to tick (and possibly end); see d3/d3-transition#54!
31115
+ if (o.state === STARTED) return timeout(start);
31116
+
31117
+ // Interrupt the active transition, if any.
31118
+ if (o.state === RUNNING) {
31119
+ o.state = ENDED;
31120
+ o.timer.stop();
31121
+ o.on.call("interrupt", node, node.__data__, o.index, o.group);
31122
+ delete schedules[i];
31123
+ }
31124
+
31125
+ // Cancel any pre-empted transitions.
31126
+ else if (+i < id) {
31127
+ o.state = ENDED;
31128
+ o.timer.stop();
31129
+ o.on.call("cancel", node, node.__data__, o.index, o.group);
31130
+ delete schedules[i];
31131
+ }
31132
+ }
31133
+
31134
+ // Defer the first tick to end of the current frame; see d3/d3#1576.
31135
+ // Note the transition may be canceled after start and before the first tick!
31136
+ // Note this must be scheduled before the start event; see d3/d3-transition#16!
31137
+ // Assuming this is successful, subsequent callbacks go straight to tick.
31138
+ timeout(function() {
31139
+ if (self.state === STARTED) {
31140
+ self.state = RUNNING;
31141
+ self.timer.restart(tick, self.delay, self.time);
31142
+ tick(elapsed);
31143
+ }
31144
+ });
31145
+
31146
+ // Dispatch the start event.
31147
+ // Note this must be done before the tween are initialized.
31148
+ self.state = STARTING;
31149
+ self.on.call("start", node, node.__data__, self.index, self.group);
31150
+ if (self.state !== STARTING) return; // interrupted
31151
+ self.state = STARTED;
31152
+
31153
+ // Initialize the tween, deleting null tween.
31154
+ tween = new Array(n = self.tween.length);
31155
+ for (i = 0, j = -1; i < n; ++i) {
31156
+ if (o = self.tween[i].value.call(node, node.__data__, self.index, self.group)) {
31157
+ tween[++j] = o;
31158
+ }
31159
+ }
31160
+ tween.length = j + 1;
31161
+ }
31162
+
31163
+ function tick(elapsed) {
31164
+ var t = elapsed < self.duration ? self.ease.call(null, elapsed / self.duration) : (self.timer.restart(stop), self.state = ENDING, 1),
31165
+ i = -1,
31166
+ n = tween.length;
31167
+
31168
+ while (++i < n) {
31169
+ tween[i].call(node, t);
31170
+ }
31171
+
31172
+ // Dispatch the end event.
31173
+ if (self.state === ENDING) {
31174
+ self.on.call("end", node, node.__data__, self.index, self.group);
31175
+ stop();
31176
+ }
31177
+ }
31178
+
31179
+ function stop() {
31180
+ self.state = ENDED;
31181
+ self.timer.stop();
31182
+ delete schedules[id];
31183
+ for (var i in schedules) return; // eslint-disable-line no-unused-vars
31184
+ delete node.__transition;
31185
+ }
31186
+ }
31187
+
31188
+ function interrupt(node, name) {
31189
+ var schedules = node.__transition,
31190
+ schedule,
31191
+ active,
31192
+ empty = true,
31193
+ i;
31194
+
31195
+ if (!schedules) return;
31196
+
31197
+ name = name == null ? null : name + "";
31198
+
31199
+ for (i in schedules) {
31200
+ if ((schedule = schedules[i]).name !== name) { empty = false; continue; }
31201
+ active = schedule.state > STARTING && schedule.state < ENDING;
31202
+ schedule.state = ENDED;
31203
+ schedule.timer.stop();
31204
+ schedule.on.call(active ? "interrupt" : "cancel", node, node.__data__, schedule.index, schedule.group);
31205
+ delete schedules[i];
31206
+ }
31207
+
31208
+ if (empty) delete node.__transition;
31209
+ }
31210
+
31211
+ function selection_interrupt(name) {
31212
+ return this.each(function() {
31213
+ interrupt(this, name);
31214
+ });
31215
+ }
31216
+
31217
+ function tweenRemove(id, name) {
31218
+ var tween0, tween1;
31219
+ return function() {
31220
+ var schedule = set(this, id),
31221
+ tween = schedule.tween;
31222
+
31223
+ // If this node shared tween with the previous node,
31224
+ // just assign the updated shared tween and we’re done!
31225
+ // Otherwise, copy-on-write.
31226
+ if (tween !== tween0) {
31227
+ tween1 = tween0 = tween;
31228
+ for (var i = 0, n = tween1.length; i < n; ++i) {
31229
+ if (tween1[i].name === name) {
31230
+ tween1 = tween1.slice();
31231
+ tween1.splice(i, 1);
31232
+ break;
31233
+ }
31234
+ }
31235
+ }
31236
+
31237
+ schedule.tween = tween1;
31238
+ };
31239
+ }
31240
+
31241
+ function tweenFunction(id, name, value) {
31242
+ var tween0, tween1;
31243
+ if (typeof value !== "function") throw new Error;
31244
+ return function() {
31245
+ var schedule = set(this, id),
31246
+ tween = schedule.tween;
31247
+
31248
+ // If this node shared tween with the previous node,
31249
+ // just assign the updated shared tween and we’re done!
31250
+ // Otherwise, copy-on-write.
31251
+ if (tween !== tween0) {
31252
+ tween1 = (tween0 = tween).slice();
31253
+ for (var t = {name: name, value: value}, i = 0, n = tween1.length; i < n; ++i) {
31254
+ if (tween1[i].name === name) {
31255
+ tween1[i] = t;
31256
+ break;
31257
+ }
31258
+ }
31259
+ if (i === n) tween1.push(t);
31260
+ }
31261
+
31262
+ schedule.tween = tween1;
31263
+ };
31264
+ }
31265
+
31266
+ function transition_tween(name, value) {
31267
+ var id = this._id;
31268
+
31269
+ name += "";
31270
+
31271
+ if (arguments.length < 2) {
31272
+ var tween = get(this.node(), id).tween;
31273
+ for (var i = 0, n = tween.length, t; i < n; ++i) {
31274
+ if ((t = tween[i]).name === name) {
31275
+ return t.value;
31276
+ }
31277
+ }
31278
+ return null;
31279
+ }
31280
+
31281
+ return this.each((value == null ? tweenRemove : tweenFunction)(id, name, value));
31282
+ }
31283
+
31284
+ function tweenValue(transition, name, value) {
31285
+ var id = transition._id;
31286
+
31287
+ transition.each(function() {
31288
+ var schedule = set(this, id);
31289
+ (schedule.value || (schedule.value = {}))[name] = value.apply(this, arguments);
31290
+ });
31291
+
31292
+ return function(node) {
31293
+ return get(node, id).value[name];
31294
+ };
31295
+ }
31296
+
31297
+ function interpolate(a, b) {
31298
+ var c;
31299
+ return (typeof b === "number" ? interpolateNumber
31300
+ : b instanceof color ? interpolateRgb
31301
+ : (c = color(b)) ? (b = c, interpolateRgb)
31302
+ : interpolateString)(a, b);
31303
+ }
31304
+
31305
+ function attrRemove(name) {
31306
+ return function() {
31307
+ this.removeAttribute(name);
31308
+ };
31309
+ }
31310
+
31311
+ function attrRemoveNS(fullname) {
31312
+ return function() {
31313
+ this.removeAttributeNS(fullname.space, fullname.local);
31314
+ };
31315
+ }
31316
+
31317
+ function attrConstant(name, interpolate, value1) {
31318
+ var string00,
31319
+ string1 = value1 + "",
31320
+ interpolate0;
31321
+ return function() {
31322
+ var string0 = this.getAttribute(name);
31323
+ return string0 === string1 ? null
31324
+ : string0 === string00 ? interpolate0
31325
+ : interpolate0 = interpolate(string00 = string0, value1);
31326
+ };
31327
+ }
31328
+
31329
+ function attrConstantNS(fullname, interpolate, value1) {
31330
+ var string00,
31331
+ string1 = value1 + "",
31332
+ interpolate0;
31333
+ return function() {
31334
+ var string0 = this.getAttributeNS(fullname.space, fullname.local);
31335
+ return string0 === string1 ? null
31336
+ : string0 === string00 ? interpolate0
31337
+ : interpolate0 = interpolate(string00 = string0, value1);
31338
+ };
31339
+ }
31340
+
31341
+ function attrFunction(name, interpolate, value) {
31342
+ var string00,
31343
+ string10,
31344
+ interpolate0;
31345
+ return function() {
31346
+ var string0, value1 = value(this), string1;
31347
+ if (value1 == null) return void this.removeAttribute(name);
31348
+ string0 = this.getAttribute(name);
31349
+ string1 = value1 + "";
31350
+ return string0 === string1 ? null
31351
+ : string0 === string00 && string1 === string10 ? interpolate0
31352
+ : (string10 = string1, interpolate0 = interpolate(string00 = string0, value1));
31353
+ };
31354
+ }
31355
+
31356
+ function attrFunctionNS(fullname, interpolate, value) {
31357
+ var string00,
31358
+ string10,
31359
+ interpolate0;
31360
+ return function() {
31361
+ var string0, value1 = value(this), string1;
31362
+ if (value1 == null) return void this.removeAttributeNS(fullname.space, fullname.local);
31363
+ string0 = this.getAttributeNS(fullname.space, fullname.local);
31364
+ string1 = value1 + "";
31365
+ return string0 === string1 ? null
31366
+ : string0 === string00 && string1 === string10 ? interpolate0
31367
+ : (string10 = string1, interpolate0 = interpolate(string00 = string0, value1));
31368
+ };
31369
+ }
31370
+
31371
+ function transition_attr(name, value) {
31372
+ var fullname = namespace(name), i = fullname === "transform" ? interpolateTransformSvg : interpolate;
31373
+ return this.attrTween(name, typeof value === "function"
31374
+ ? (fullname.local ? attrFunctionNS : attrFunction)(fullname, i, tweenValue(this, "attr." + name, value))
31375
+ : value == null ? (fullname.local ? attrRemoveNS : attrRemove)(fullname)
31376
+ : (fullname.local ? attrConstantNS : attrConstant)(fullname, i, value));
31377
+ }
31378
+
31379
+ function attrInterpolate(name, i) {
31380
+ return function(t) {
31381
+ this.setAttribute(name, i.call(this, t));
31382
+ };
31383
+ }
31384
+
31385
+ function attrInterpolateNS(fullname, i) {
31386
+ return function(t) {
31387
+ this.setAttributeNS(fullname.space, fullname.local, i.call(this, t));
31388
+ };
31389
+ }
31390
+
31391
+ function attrTweenNS(fullname, value) {
31392
+ var t0, i0;
31393
+ function tween() {
31394
+ var i = value.apply(this, arguments);
31395
+ if (i !== i0) t0 = (i0 = i) && attrInterpolateNS(fullname, i);
31396
+ return t0;
31397
+ }
31398
+ tween._value = value;
31399
+ return tween;
31400
+ }
31401
+
31402
+ function attrTween(name, value) {
31403
+ var t0, i0;
31404
+ function tween() {
31405
+ var i = value.apply(this, arguments);
31406
+ if (i !== i0) t0 = (i0 = i) && attrInterpolate(name, i);
31407
+ return t0;
31408
+ }
31409
+ tween._value = value;
31410
+ return tween;
31411
+ }
31412
+
31413
+ function transition_attrTween(name, value) {
31414
+ var key = "attr." + name;
31415
+ if (arguments.length < 2) return (key = this.tween(key)) && key._value;
31416
+ if (value == null) return this.tween(key, null);
31417
+ if (typeof value !== "function") throw new Error;
31418
+ var fullname = namespace(name);
31419
+ return this.tween(key, (fullname.local ? attrTweenNS : attrTween)(fullname, value));
31420
+ }
31421
+
31422
+ function delayFunction(id, value) {
31423
+ return function() {
31424
+ init(this, id).delay = +value.apply(this, arguments);
31425
+ };
31426
+ }
31427
+
31428
+ function delayConstant(id, value) {
31429
+ return value = +value, function() {
31430
+ init(this, id).delay = value;
31431
+ };
31432
+ }
31433
+
31434
+ function transition_delay(value) {
31435
+ var id = this._id;
31436
+
31437
+ return arguments.length
31438
+ ? this.each((typeof value === "function"
31439
+ ? delayFunction
31440
+ : delayConstant)(id, value))
31441
+ : get(this.node(), id).delay;
31442
+ }
31443
+
31444
+ function durationFunction(id, value) {
31445
+ return function() {
31446
+ set(this, id).duration = +value.apply(this, arguments);
31447
+ };
31448
+ }
31449
+
31450
+ function durationConstant(id, value) {
31451
+ return value = +value, function() {
31452
+ set(this, id).duration = value;
31453
+ };
31454
+ }
31455
+
31456
+ function transition_duration(value) {
31457
+ var id = this._id;
31458
+
31459
+ return arguments.length
31460
+ ? this.each((typeof value === "function"
31461
+ ? durationFunction
31462
+ : durationConstant)(id, value))
31463
+ : get(this.node(), id).duration;
31464
+ }
31465
+
31466
+ function easeConstant(id, value) {
31467
+ if (typeof value !== "function") throw new Error;
31468
+ return function() {
31469
+ set(this, id).ease = value;
31470
+ };
31471
+ }
31472
+
31473
+ function transition_ease(value) {
31474
+ var id = this._id;
31475
+
31476
+ return arguments.length
31477
+ ? this.each(easeConstant(id, value))
31478
+ : get(this.node(), id).ease;
31479
+ }
31480
+
31481
+ function easeVarying(id, value) {
31482
+ return function() {
31483
+ var v = value.apply(this, arguments);
31484
+ if (typeof v !== "function") throw new Error;
31485
+ set(this, id).ease = v;
31486
+ };
31487
+ }
31488
+
31489
+ function transition_easeVarying(value) {
31490
+ if (typeof value !== "function") throw new Error;
31491
+ return this.each(easeVarying(this._id, value));
31492
+ }
31493
+
31494
+ function transition_filter(match) {
31495
+ if (typeof match !== "function") match = matcher(match);
31496
+
31497
+ for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {
31498
+ for (var group = groups[j], n = group.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) {
31499
+ if ((node = group[i]) && match.call(node, node.__data__, i, group)) {
31500
+ subgroup.push(node);
31501
+ }
31502
+ }
31503
+ }
31504
+
31505
+ return new Transition(subgroups, this._parents, this._name, this._id);
31506
+ }
31507
+
31508
+ function transition_merge(transition) {
31509
+ if (transition._id !== this._id) throw new Error;
31510
+
31511
+ for (var groups0 = this._groups, groups1 = transition._groups, m0 = groups0.length, m1 = groups1.length, m = Math.min(m0, m1), merges = new Array(m0), j = 0; j < m; ++j) {
31512
+ for (var group0 = groups0[j], group1 = groups1[j], n = group0.length, merge = merges[j] = new Array(n), node, i = 0; i < n; ++i) {
31513
+ if (node = group0[i] || group1[i]) {
31514
+ merge[i] = node;
31515
+ }
31516
+ }
31517
+ }
31518
+
31519
+ for (; j < m0; ++j) {
31520
+ merges[j] = groups0[j];
31521
+ }
31522
+
31523
+ return new Transition(merges, this._parents, this._name, this._id);
31524
+ }
31525
+
31526
+ function start(name) {
31527
+ return (name + "").trim().split(/^|\s+/).every(function(t) {
31528
+ var i = t.indexOf(".");
31529
+ if (i >= 0) t = t.slice(0, i);
31530
+ return !t || t === "start";
31531
+ });
31532
+ }
31533
+
31534
+ function onFunction(id, name, listener) {
31535
+ var on0, on1, sit = start(name) ? init : set;
31536
+ return function() {
31537
+ var schedule = sit(this, id),
31538
+ on = schedule.on;
31539
+
31540
+ // If this node shared a dispatch with the previous node,
31541
+ // just assign the updated shared dispatch and we’re done!
31542
+ // Otherwise, copy-on-write.
31543
+ if (on !== on0) (on1 = (on0 = on).copy()).on(name, listener);
31544
+
31545
+ schedule.on = on1;
31546
+ };
31547
+ }
31548
+
31549
+ function transition_on(name, listener) {
31550
+ var id = this._id;
31551
+
31552
+ return arguments.length < 2
31553
+ ? get(this.node(), id).on.on(name)
31554
+ : this.each(onFunction(id, name, listener));
31555
+ }
31556
+
31557
+ function removeFunction(id) {
31558
+ return function() {
31559
+ var parent = this.parentNode;
31560
+ for (var i in this.__transition) if (+i !== id) return;
31561
+ if (parent) parent.removeChild(this);
31562
+ };
31563
+ }
31564
+
31565
+ function transition_remove() {
31566
+ return this.on("end.remove", removeFunction(this._id));
31567
+ }
31568
+
31569
+ function transition_select(select) {
31570
+ var name = this._name,
31571
+ id = this._id;
31572
+
31573
+ if (typeof select !== "function") select = selector(select);
31574
+
31575
+ for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {
31576
+ for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) {
31577
+ if ((node = group[i]) && (subnode = select.call(node, node.__data__, i, group))) {
31578
+ if ("__data__" in node) subnode.__data__ = node.__data__;
31579
+ subgroup[i] = subnode;
31580
+ schedule(subgroup[i], name, id, i, subgroup, get(node, id));
31581
+ }
31582
+ }
31583
+ }
31584
+
31585
+ return new Transition(subgroups, this._parents, name, id);
31586
+ }
31587
+
31588
+ function transition_selectAll(select) {
31589
+ var name = this._name,
31590
+ id = this._id;
31591
+
31592
+ if (typeof select !== "function") select = selectorAll(select);
31593
+
31594
+ for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) {
31595
+ for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {
31596
+ if (node = group[i]) {
31597
+ for (var children = select.call(node, node.__data__, i, group), child, inherit = get(node, id), k = 0, l = children.length; k < l; ++k) {
31598
+ if (child = children[k]) {
31599
+ schedule(child, name, id, k, children, inherit);
31600
+ }
31601
+ }
31602
+ subgroups.push(children);
31603
+ parents.push(node);
31604
+ }
31605
+ }
31606
+ }
31607
+
31608
+ return new Transition(subgroups, parents, name, id);
31609
+ }
31610
+
31611
+ var Selection = selection.prototype.constructor;
31612
+
31613
+ function transition_selection() {
31614
+ return new Selection(this._groups, this._parents);
31615
+ }
31616
+
31617
+ function styleNull(name, interpolate) {
31618
+ var string00,
31619
+ string10,
31620
+ interpolate0;
31621
+ return function() {
31622
+ var string0 = styleValue(this, name),
31623
+ string1 = (this.style.removeProperty(name), styleValue(this, name));
31624
+ return string0 === string1 ? null
31625
+ : string0 === string00 && string1 === string10 ? interpolate0
31626
+ : interpolate0 = interpolate(string00 = string0, string10 = string1);
31627
+ };
31628
+ }
31629
+
31630
+ function styleRemove(name) {
31631
+ return function() {
31632
+ this.style.removeProperty(name);
31633
+ };
31634
+ }
31635
+
31636
+ function styleConstant(name, interpolate, value1) {
31637
+ var string00,
31638
+ string1 = value1 + "",
31639
+ interpolate0;
31640
+ return function() {
31641
+ var string0 = styleValue(this, name);
31642
+ return string0 === string1 ? null
31643
+ : string0 === string00 ? interpolate0
31644
+ : interpolate0 = interpolate(string00 = string0, value1);
31645
+ };
31646
+ }
31647
+
31648
+ function styleFunction(name, interpolate, value) {
31649
+ var string00,
31650
+ string10,
31651
+ interpolate0;
31652
+ return function() {
31653
+ var string0 = styleValue(this, name),
31654
+ value1 = value(this),
31655
+ string1 = value1 + "";
31656
+ if (value1 == null) string1 = value1 = (this.style.removeProperty(name), styleValue(this, name));
31657
+ return string0 === string1 ? null
31658
+ : string0 === string00 && string1 === string10 ? interpolate0
31659
+ : (string10 = string1, interpolate0 = interpolate(string00 = string0, value1));
31660
+ };
31661
+ }
31662
+
31663
+ function styleMaybeRemove(id, name) {
31664
+ var on0, on1, listener0, key = "style." + name, event = "end." + key, remove;
31665
+ return function() {
31666
+ var schedule = set(this, id),
31667
+ on = schedule.on,
31668
+ listener = schedule.value[key] == null ? remove || (remove = styleRemove(name)) : undefined;
31669
+
31670
+ // If this node shared a dispatch with the previous node,
31671
+ // just assign the updated shared dispatch and we’re done!
31672
+ // Otherwise, copy-on-write.
31673
+ if (on !== on0 || listener0 !== listener) (on1 = (on0 = on).copy()).on(event, listener0 = listener);
31674
+
31675
+ schedule.on = on1;
31676
+ };
31677
+ }
31678
+
31679
+ function transition_style(name, value, priority) {
31680
+ var i = (name += "") === "transform" ? interpolateTransformCss : interpolate;
31681
+ return value == null ? this
31682
+ .styleTween(name, styleNull(name, i))
31683
+ .on("end.style." + name, styleRemove(name))
31684
+ : typeof value === "function" ? this
31685
+ .styleTween(name, styleFunction(name, i, tweenValue(this, "style." + name, value)))
31686
+ .each(styleMaybeRemove(this._id, name))
31687
+ : this
31688
+ .styleTween(name, styleConstant(name, i, value), priority)
31689
+ .on("end.style." + name, null);
31690
+ }
31691
+
31692
+ function styleInterpolate(name, i, priority) {
31693
+ return function(t) {
31694
+ this.style.setProperty(name, i.call(this, t), priority);
31695
+ };
31696
+ }
31697
+
31698
+ function styleTween(name, value, priority) {
31699
+ var t, i0;
31700
+ function tween() {
31701
+ var i = value.apply(this, arguments);
31702
+ if (i !== i0) t = (i0 = i) && styleInterpolate(name, i, priority);
31703
+ return t;
31704
+ }
31705
+ tween._value = value;
31706
+ return tween;
31707
+ }
31708
+
31709
+ function transition_styleTween(name, value, priority) {
31710
+ var key = "style." + (name += "");
31711
+ if (arguments.length < 2) return (key = this.tween(key)) && key._value;
31712
+ if (value == null) return this.tween(key, null);
31713
+ if (typeof value !== "function") throw new Error;
31714
+ return this.tween(key, styleTween(name, value, priority == null ? "" : priority));
31715
+ }
31716
+
31717
+ function textConstant(value) {
31718
+ return function() {
31719
+ this.textContent = value;
31720
+ };
31721
+ }
31722
+
31723
+ function textFunction(value) {
31724
+ return function() {
31725
+ var value1 = value(this);
31726
+ this.textContent = value1 == null ? "" : value1;
31727
+ };
31728
+ }
31729
+
31730
+ function transition_text(value) {
31731
+ return this.tween("text", typeof value === "function"
31732
+ ? textFunction(tweenValue(this, "text", value))
31733
+ : textConstant(value == null ? "" : value + ""));
31734
+ }
31735
+
31736
+ function textInterpolate(i) {
31737
+ return function(t) {
31738
+ this.textContent = i.call(this, t);
31739
+ };
31740
+ }
31741
+
31742
+ function textTween(value) {
31743
+ var t0, i0;
31744
+ function tween() {
31745
+ var i = value.apply(this, arguments);
31746
+ if (i !== i0) t0 = (i0 = i) && textInterpolate(i);
31747
+ return t0;
31748
+ }
31749
+ tween._value = value;
31750
+ return tween;
31751
+ }
31752
+
31753
+ function transition_textTween(value) {
31754
+ var key = "text";
31755
+ if (arguments.length < 1) return (key = this.tween(key)) && key._value;
31756
+ if (value == null) return this.tween(key, null);
31757
+ if (typeof value !== "function") throw new Error;
31758
+ return this.tween(key, textTween(value));
31759
+ }
31760
+
31761
+ function transition_transition() {
31762
+ var name = this._name,
31763
+ id0 = this._id,
31764
+ id1 = newId();
31765
+
31766
+ for (var groups = this._groups, m = groups.length, j = 0; j < m; ++j) {
31767
+ for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {
31768
+ if (node = group[i]) {
31769
+ var inherit = get(node, id0);
31770
+ schedule(node, name, id1, i, group, {
31771
+ time: inherit.time + inherit.delay + inherit.duration,
31772
+ delay: 0,
31773
+ duration: inherit.duration,
31774
+ ease: inherit.ease
31775
+ });
31776
+ }
31777
+ }
31778
+ }
31779
+
31780
+ return new Transition(groups, this._parents, name, id1);
31781
+ }
31782
+
31783
+ function transition_end() {
31784
+ var on0, on1, that = this, id = that._id, size = that.size();
31785
+ return new Promise(function(resolve, reject) {
31786
+ var cancel = {value: reject},
31787
+ end = {value: function() { if (--size === 0) resolve(); }};
31788
+
31789
+ that.each(function() {
31790
+ var schedule = set(this, id),
31791
+ on = schedule.on;
31792
+
31793
+ // If this node shared a dispatch with the previous node,
31794
+ // just assign the updated shared dispatch and we’re done!
31795
+ // Otherwise, copy-on-write.
31796
+ if (on !== on0) {
31797
+ on1 = (on0 = on).copy();
31798
+ on1._.cancel.push(cancel);
31799
+ on1._.interrupt.push(cancel);
31800
+ on1._.end.push(end);
31801
+ }
31802
+
31803
+ schedule.on = on1;
31804
+ });
31805
+
31806
+ // The selection was empty, resolve end immediately
31807
+ if (size === 0) resolve();
31808
+ });
31809
+ }
31810
+
31811
+ var id = 0;
31812
+
31813
+ function Transition(groups, parents, name, id) {
31814
+ this._groups = groups;
31815
+ this._parents = parents;
31816
+ this._name = name;
31817
+ this._id = id;
31818
+ }
31819
+
31820
+ function newId() {
31821
+ return ++id;
31822
+ }
31823
+
31824
+ var selection_prototype = selection.prototype;
31825
+
31826
+ Transition.prototype = {
31827
+ constructor: Transition,
31828
+ select: transition_select,
31829
+ selectAll: transition_selectAll,
31830
+ selectChild: selection_prototype.selectChild,
31831
+ selectChildren: selection_prototype.selectChildren,
31832
+ filter: transition_filter,
31833
+ merge: transition_merge,
31834
+ selection: transition_selection,
31835
+ transition: transition_transition,
31836
+ call: selection_prototype.call,
31837
+ nodes: selection_prototype.nodes,
31838
+ node: selection_prototype.node,
31839
+ size: selection_prototype.size,
31840
+ empty: selection_prototype.empty,
31841
+ each: selection_prototype.each,
31842
+ on: transition_on,
31843
+ attr: transition_attr,
31844
+ attrTween: transition_attrTween,
31845
+ style: transition_style,
31846
+ styleTween: transition_styleTween,
31847
+ text: transition_text,
31848
+ textTween: transition_textTween,
31849
+ remove: transition_remove,
31850
+ tween: transition_tween,
31851
+ delay: transition_delay,
31852
+ duration: transition_duration,
31853
+ ease: transition_ease,
31854
+ easeVarying: transition_easeVarying,
31855
+ end: transition_end,
31856
+ [Symbol.iterator]: selection_prototype[Symbol.iterator]
31857
+ };
31858
+
31859
+ function cubicInOut(t) {
31860
+ return ((t *= 2) <= 1 ? t * t * t : (t -= 2) * t * t + 2) / 2;
31861
+ }
31862
+
31863
+ var defaultTiming = {
31864
+ time: null, // Set on use.
31865
+ delay: 0,
31866
+ duration: 250,
31867
+ ease: cubicInOut
31868
+ };
31869
+
31870
+ function inherit(node, id) {
31871
+ var timing;
31872
+ while (!(timing = node.__transition) || !(timing = timing[id])) {
31873
+ if (!(node = node.parentNode)) {
31874
+ throw new Error(`transition ${id} not found`);
31875
+ }
31876
+ }
31877
+ return timing;
31878
+ }
31879
+
31880
+ function selection_transition(name) {
31881
+ var id,
31882
+ timing;
31883
+
31884
+ if (name instanceof Transition) {
31885
+ id = name._id, name = name._name;
31886
+ } else {
31887
+ id = newId(), (timing = defaultTiming).time = now(), name = name == null ? null : name + "";
31888
+ }
31889
+
31890
+ for (var groups = this._groups, m = groups.length, j = 0; j < m; ++j) {
31891
+ for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {
31892
+ if (node = group[i]) {
31893
+ schedule(node, name, id, i, group, timing || inherit(node, id));
31894
+ }
31895
+ }
31896
+ }
31897
+
31898
+ return new Transition(groups, this._parents, name, id);
31899
+ }
31900
+
31901
+ selection.prototype.interrupt = selection_interrupt;
31902
+ selection.prototype.transition = selection_transition;
31903
+
31904
+ var constant = x => () => x;
31905
+
31906
+ function ZoomEvent(type, {
31907
+ sourceEvent,
31908
+ target,
31909
+ transform,
31910
+ dispatch
31911
+ }) {
31912
+ Object.defineProperties(this, {
31913
+ type: {value: type, enumerable: true, configurable: true},
31914
+ sourceEvent: {value: sourceEvent, enumerable: true, configurable: true},
31915
+ target: {value: target, enumerable: true, configurable: true},
31916
+ transform: {value: transform, enumerable: true, configurable: true},
31917
+ _: {value: dispatch}
31918
+ });
31919
+ }
31920
+
31921
+ function Transform(k, x, y) {
31922
+ this.k = k;
31923
+ this.x = x;
31924
+ this.y = y;
31925
+ }
31926
+
31927
+ Transform.prototype = {
31928
+ constructor: Transform,
31929
+ scale: function(k) {
31930
+ return k === 1 ? this : new Transform(this.k * k, this.x, this.y);
31931
+ },
31932
+ translate: function(x, y) {
31933
+ return x === 0 & y === 0 ? this : new Transform(this.k, this.x + this.k * x, this.y + this.k * y);
31934
+ },
31935
+ apply: function(point) {
31936
+ return [point[0] * this.k + this.x, point[1] * this.k + this.y];
31937
+ },
31938
+ applyX: function(x) {
31939
+ return x * this.k + this.x;
31940
+ },
31941
+ applyY: function(y) {
31942
+ return y * this.k + this.y;
31943
+ },
31944
+ invert: function(location) {
31945
+ return [(location[0] - this.x) / this.k, (location[1] - this.y) / this.k];
31946
+ },
31947
+ invertX: function(x) {
31948
+ return (x - this.x) / this.k;
31949
+ },
31950
+ invertY: function(y) {
31951
+ return (y - this.y) / this.k;
31952
+ },
31953
+ rescaleX: function(x) {
31954
+ return x.copy().domain(x.range().map(this.invertX, this).map(x.invert, x));
31955
+ },
31956
+ rescaleY: function(y) {
31957
+ return y.copy().domain(y.range().map(this.invertY, this).map(y.invert, y));
31958
+ },
31959
+ toString: function() {
31960
+ return "translate(" + this.x + "," + this.y + ") scale(" + this.k + ")";
31961
+ }
31962
+ };
31963
+
31964
+ var identity = new Transform(1, 0, 0);
31965
+
31966
+ transform.prototype = Transform.prototype;
31967
+
31968
+ function transform(node) {
31969
+ while (!node.__zoom) if (!(node = node.parentNode)) return identity;
31970
+ return node.__zoom;
31971
+ }
31972
+
31973
+ function nopropagation(event) {
31974
+ event.stopImmediatePropagation();
31975
+ }
31976
+
31977
+ function noevent(event) {
31978
+ event.preventDefault();
31979
+ event.stopImmediatePropagation();
31980
+ }
31981
+
31982
+ // Ignore right-click, since that should open the context menu.
31983
+ // except for pinch-to-zoom, which is sent as a wheel+ctrlKey event
31984
+ function defaultFilter(event) {
31985
+ return (!event.ctrlKey || event.type === 'wheel') && !event.button;
31986
+ }
31987
+
31988
+ function defaultExtent() {
31989
+ var e = this;
31990
+ if (e instanceof SVGElement) {
31991
+ e = e.ownerSVGElement || e;
31992
+ if (e.hasAttribute("viewBox")) {
31993
+ e = e.viewBox.baseVal;
31994
+ return [[e.x, e.y], [e.x + e.width, e.y + e.height]];
31995
+ }
31996
+ return [[0, 0], [e.width.baseVal.value, e.height.baseVal.value]];
31997
+ }
31998
+ return [[0, 0], [e.clientWidth, e.clientHeight]];
31999
+ }
32000
+
32001
+ function defaultTransform() {
32002
+ return this.__zoom || identity;
32003
+ }
32004
+
32005
+ function defaultWheelDelta(event) {
32006
+ return -event.deltaY * (event.deltaMode === 1 ? 0.05 : event.deltaMode ? 1 : 0.002) * (event.ctrlKey ? 10 : 1);
32007
+ }
32008
+
32009
+ function defaultTouchable() {
32010
+ return navigator.maxTouchPoints || ("ontouchstart" in this);
32011
+ }
32012
+
32013
+ function defaultConstrain(transform, extent, translateExtent) {
32014
+ var dx0 = transform.invertX(extent[0][0]) - translateExtent[0][0],
32015
+ dx1 = transform.invertX(extent[1][0]) - translateExtent[1][0],
32016
+ dy0 = transform.invertY(extent[0][1]) - translateExtent[0][1],
32017
+ dy1 = transform.invertY(extent[1][1]) - translateExtent[1][1];
32018
+ return transform.translate(
32019
+ dx1 > dx0 ? (dx0 + dx1) / 2 : Math.min(0, dx0) || Math.max(0, dx1),
32020
+ dy1 > dy0 ? (dy0 + dy1) / 2 : Math.min(0, dy0) || Math.max(0, dy1)
32021
+ );
32022
+ }
32023
+
32024
+ function zoom() {
32025
+ var filter = defaultFilter,
32026
+ extent = defaultExtent,
32027
+ constrain = defaultConstrain,
32028
+ wheelDelta = defaultWheelDelta,
32029
+ touchable = defaultTouchable,
32030
+ scaleExtent = [0, Infinity],
32031
+ translateExtent = [[-Infinity, -Infinity], [Infinity, Infinity]],
32032
+ duration = 250,
32033
+ interpolate = interpolateZoom,
32034
+ listeners = dispatch("start", "zoom", "end"),
32035
+ touchstarting,
32036
+ touchfirst,
32037
+ touchending,
32038
+ touchDelay = 500,
32039
+ wheelDelay = 150,
32040
+ clickDistance2 = 0,
32041
+ tapDistance = 10;
32042
+
32043
+ function zoom(selection) {
32044
+ selection
32045
+ .property("__zoom", defaultTransform)
32046
+ .on("wheel.zoom", wheeled, {passive: false})
32047
+ .on("mousedown.zoom", mousedowned)
32048
+ .on("dblclick.zoom", dblclicked)
32049
+ .filter(touchable)
32050
+ .on("touchstart.zoom", touchstarted)
32051
+ .on("touchmove.zoom", touchmoved)
32052
+ .on("touchend.zoom touchcancel.zoom", touchended)
32053
+ .style("-webkit-tap-highlight-color", "rgba(0,0,0,0)");
32054
+ }
32055
+
32056
+ zoom.transform = function(collection, transform, point, event) {
32057
+ var selection = collection.selection ? collection.selection() : collection;
32058
+ selection.property("__zoom", defaultTransform);
32059
+ if (collection !== selection) {
32060
+ schedule(collection, transform, point, event);
32061
+ } else {
32062
+ selection.interrupt().each(function() {
32063
+ gesture(this, arguments)
32064
+ .event(event)
32065
+ .start()
32066
+ .zoom(null, typeof transform === "function" ? transform.apply(this, arguments) : transform)
32067
+ .end();
32068
+ });
32069
+ }
32070
+ };
32071
+
32072
+ zoom.scaleBy = function(selection, k, p, event) {
32073
+ zoom.scaleTo(selection, function() {
32074
+ var k0 = this.__zoom.k,
32075
+ k1 = typeof k === "function" ? k.apply(this, arguments) : k;
32076
+ return k0 * k1;
32077
+ }, p, event);
32078
+ };
32079
+
32080
+ zoom.scaleTo = function(selection, k, p, event) {
32081
+ zoom.transform(selection, function() {
32082
+ var e = extent.apply(this, arguments),
32083
+ t0 = this.__zoom,
32084
+ p0 = p == null ? centroid(e) : typeof p === "function" ? p.apply(this, arguments) : p,
32085
+ p1 = t0.invert(p0),
32086
+ k1 = typeof k === "function" ? k.apply(this, arguments) : k;
32087
+ return constrain(translate(scale(t0, k1), p0, p1), e, translateExtent);
32088
+ }, p, event);
32089
+ };
32090
+
32091
+ zoom.translateBy = function(selection, x, y, event) {
32092
+ zoom.transform(selection, function() {
32093
+ return constrain(this.__zoom.translate(
32094
+ typeof x === "function" ? x.apply(this, arguments) : x,
32095
+ typeof y === "function" ? y.apply(this, arguments) : y
32096
+ ), extent.apply(this, arguments), translateExtent);
32097
+ }, null, event);
32098
+ };
32099
+
32100
+ zoom.translateTo = function(selection, x, y, p, event) {
32101
+ zoom.transform(selection, function() {
32102
+ var e = extent.apply(this, arguments),
32103
+ t = this.__zoom,
32104
+ p0 = p == null ? centroid(e) : typeof p === "function" ? p.apply(this, arguments) : p;
32105
+ return constrain(identity.translate(p0[0], p0[1]).scale(t.k).translate(
32106
+ typeof x === "function" ? -x.apply(this, arguments) : -x,
32107
+ typeof y === "function" ? -y.apply(this, arguments) : -y
32108
+ ), e, translateExtent);
32109
+ }, p, event);
32110
+ };
32111
+
32112
+ function scale(transform, k) {
32113
+ k = Math.max(scaleExtent[0], Math.min(scaleExtent[1], k));
32114
+ return k === transform.k ? transform : new Transform(k, transform.x, transform.y);
32115
+ }
32116
+
32117
+ function translate(transform, p0, p1) {
32118
+ var x = p0[0] - p1[0] * transform.k, y = p0[1] - p1[1] * transform.k;
32119
+ return x === transform.x && y === transform.y ? transform : new Transform(transform.k, x, y);
32120
+ }
32121
+
32122
+ function centroid(extent) {
32123
+ return [(+extent[0][0] + +extent[1][0]) / 2, (+extent[0][1] + +extent[1][1]) / 2];
32124
+ }
32125
+
32126
+ function schedule(transition, transform, point, event) {
32127
+ transition
32128
+ .on("start.zoom", function() { gesture(this, arguments).event(event).start(); })
32129
+ .on("interrupt.zoom end.zoom", function() { gesture(this, arguments).event(event).end(); })
32130
+ .tween("zoom", function() {
32131
+ var that = this,
32132
+ args = arguments,
32133
+ g = gesture(that, args).event(event),
32134
+ e = extent.apply(that, args),
32135
+ p = point == null ? centroid(e) : typeof point === "function" ? point.apply(that, args) : point,
32136
+ w = Math.max(e[1][0] - e[0][0], e[1][1] - e[0][1]),
32137
+ a = that.__zoom,
32138
+ b = typeof transform === "function" ? transform.apply(that, args) : transform,
32139
+ i = interpolate(a.invert(p).concat(w / a.k), b.invert(p).concat(w / b.k));
32140
+ return function(t) {
32141
+ if (t === 1) t = b; // Avoid rounding error on end.
32142
+ else { var l = i(t), k = w / l[2]; t = new Transform(k, p[0] - l[0] * k, p[1] - l[1] * k); }
32143
+ g.zoom(null, t);
32144
+ };
32145
+ });
32146
+ }
32147
+
32148
+ function gesture(that, args, clean) {
32149
+ return (!clean && that.__zooming) || new Gesture(that, args);
32150
+ }
32151
+
32152
+ function Gesture(that, args) {
32153
+ this.that = that;
32154
+ this.args = args;
32155
+ this.active = 0;
32156
+ this.sourceEvent = null;
32157
+ this.extent = extent.apply(that, args);
32158
+ this.taps = 0;
32159
+ }
32160
+
32161
+ Gesture.prototype = {
32162
+ event: function(event) {
32163
+ if (event) this.sourceEvent = event;
32164
+ return this;
32165
+ },
32166
+ start: function() {
32167
+ if (++this.active === 1) {
32168
+ this.that.__zooming = this;
32169
+ this.emit("start");
32170
+ }
32171
+ return this;
32172
+ },
32173
+ zoom: function(key, transform) {
32174
+ if (this.mouse && key !== "mouse") this.mouse[1] = transform.invert(this.mouse[0]);
32175
+ if (this.touch0 && key !== "touch") this.touch0[1] = transform.invert(this.touch0[0]);
32176
+ if (this.touch1 && key !== "touch") this.touch1[1] = transform.invert(this.touch1[0]);
32177
+ this.that.__zoom = transform;
32178
+ this.emit("zoom");
32179
+ return this;
32180
+ },
32181
+ end: function() {
32182
+ if (--this.active === 0) {
32183
+ delete this.that.__zooming;
32184
+ this.emit("end");
32185
+ }
32186
+ return this;
32187
+ },
32188
+ emit: function(type) {
32189
+ var d = select(this.that).datum();
32190
+ listeners.call(
32191
+ type,
32192
+ this.that,
32193
+ new ZoomEvent(type, {
32194
+ sourceEvent: this.sourceEvent,
32195
+ target: zoom,
32196
+ type,
32197
+ transform: this.that.__zoom,
32198
+ dispatch: listeners
32199
+ }),
32200
+ d
32201
+ );
32202
+ }
32203
+ };
32204
+
32205
+ function wheeled(event, ...args) {
32206
+ if (!filter.apply(this, arguments)) return;
32207
+ var g = gesture(this, args).event(event),
32208
+ t = this.__zoom,
32209
+ k = Math.max(scaleExtent[0], Math.min(scaleExtent[1], t.k * Math.pow(2, wheelDelta.apply(this, arguments)))),
32210
+ p = pointer(event);
32211
+
32212
+ // If the mouse is in the same location as before, reuse it.
32213
+ // If there were recent wheel events, reset the wheel idle timeout.
32214
+ if (g.wheel) {
32215
+ if (g.mouse[0][0] !== p[0] || g.mouse[0][1] !== p[1]) {
32216
+ g.mouse[1] = t.invert(g.mouse[0] = p);
32217
+ }
32218
+ clearTimeout(g.wheel);
32219
+ }
32220
+
32221
+ // If this wheel event won’t trigger a transform change, ignore it.
32222
+ else if (t.k === k) return;
32223
+
32224
+ // Otherwise, capture the mouse point and location at the start.
32225
+ else {
32226
+ g.mouse = [p, t.invert(p)];
32227
+ interrupt(this);
32228
+ g.start();
32229
+ }
32230
+
32231
+ noevent(event);
32232
+ g.wheel = setTimeout(wheelidled, wheelDelay);
32233
+ g.zoom("mouse", constrain(translate(scale(t, k), g.mouse[0], g.mouse[1]), g.extent, translateExtent));
32234
+
32235
+ function wheelidled() {
32236
+ g.wheel = null;
32237
+ g.end();
32238
+ }
32239
+ }
32240
+
32241
+ function mousedowned(event, ...args) {
32242
+ if (touchending || !filter.apply(this, arguments)) return;
32243
+ var currentTarget = event.currentTarget,
32244
+ g = gesture(this, args, true).event(event),
32245
+ v = select(event.view).on("mousemove.zoom", mousemoved, true).on("mouseup.zoom", mouseupped, true),
32246
+ p = pointer(event, currentTarget),
32247
+ x0 = event.clientX,
32248
+ y0 = event.clientY;
32249
+
32250
+ dragDisable(event.view);
32251
+ nopropagation(event);
32252
+ g.mouse = [p, this.__zoom.invert(p)];
32253
+ interrupt(this);
32254
+ g.start();
32255
+
32256
+ function mousemoved(event) {
32257
+ noevent(event);
32258
+ if (!g.moved) {
32259
+ var dx = event.clientX - x0, dy = event.clientY - y0;
32260
+ g.moved = dx * dx + dy * dy > clickDistance2;
32261
+ }
32262
+ g.event(event)
32263
+ .zoom("mouse", constrain(translate(g.that.__zoom, g.mouse[0] = pointer(event, currentTarget), g.mouse[1]), g.extent, translateExtent));
32264
+ }
32265
+
32266
+ function mouseupped(event) {
32267
+ v.on("mousemove.zoom mouseup.zoom", null);
32268
+ yesdrag(event.view, g.moved);
32269
+ noevent(event);
32270
+ g.event(event).end();
32271
+ }
32272
+ }
32273
+
32274
+ function dblclicked(event, ...args) {
32275
+ if (!filter.apply(this, arguments)) return;
32276
+ var t0 = this.__zoom,
32277
+ p0 = pointer(event.changedTouches ? event.changedTouches[0] : event, this),
32278
+ p1 = t0.invert(p0),
32279
+ k1 = t0.k * (event.shiftKey ? 0.5 : 2),
32280
+ t1 = constrain(translate(scale(t0, k1), p0, p1), extent.apply(this, args), translateExtent);
32281
+
32282
+ noevent(event);
32283
+ if (duration > 0) select(this).transition().duration(duration).call(schedule, t1, p0, event);
32284
+ else select(this).call(zoom.transform, t1, p0, event);
32285
+ }
32286
+
32287
+ function touchstarted(event, ...args) {
32288
+ if (!filter.apply(this, arguments)) return;
32289
+ var touches = event.touches,
32290
+ n = touches.length,
32291
+ g = gesture(this, args, event.changedTouches.length === n).event(event),
32292
+ started, i, t, p;
32293
+
32294
+ nopropagation(event);
32295
+ for (i = 0; i < n; ++i) {
32296
+ t = touches[i], p = pointer(t, this);
32297
+ p = [p, this.__zoom.invert(p), t.identifier];
32298
+ if (!g.touch0) g.touch0 = p, started = true, g.taps = 1 + !!touchstarting;
32299
+ else if (!g.touch1 && g.touch0[2] !== p[2]) g.touch1 = p, g.taps = 0;
32300
+ }
32301
+
32302
+ if (touchstarting) touchstarting = clearTimeout(touchstarting);
32303
+
32304
+ if (started) {
32305
+ if (g.taps < 2) touchfirst = p[0], touchstarting = setTimeout(function() { touchstarting = null; }, touchDelay);
32306
+ interrupt(this);
32307
+ g.start();
32308
+ }
32309
+ }
32310
+
32311
+ function touchmoved(event, ...args) {
32312
+ if (!this.__zooming) return;
32313
+ var g = gesture(this, args).event(event),
32314
+ touches = event.changedTouches,
32315
+ n = touches.length, i, t, p, l;
32316
+
32317
+ noevent(event);
32318
+ for (i = 0; i < n; ++i) {
32319
+ t = touches[i], p = pointer(t, this);
32320
+ if (g.touch0 && g.touch0[2] === t.identifier) g.touch0[0] = p;
32321
+ else if (g.touch1 && g.touch1[2] === t.identifier) g.touch1[0] = p;
32322
+ }
32323
+ t = g.that.__zoom;
32324
+ if (g.touch1) {
32325
+ var p0 = g.touch0[0], l0 = g.touch0[1],
32326
+ p1 = g.touch1[0], l1 = g.touch1[1],
32327
+ dp = (dp = p1[0] - p0[0]) * dp + (dp = p1[1] - p0[1]) * dp,
32328
+ dl = (dl = l1[0] - l0[0]) * dl + (dl = l1[1] - l0[1]) * dl;
32329
+ t = scale(t, Math.sqrt(dp / dl));
32330
+ p = [(p0[0] + p1[0]) / 2, (p0[1] + p1[1]) / 2];
32331
+ l = [(l0[0] + l1[0]) / 2, (l0[1] + l1[1]) / 2];
32332
+ }
32333
+ else if (g.touch0) p = g.touch0[0], l = g.touch0[1];
32334
+ else return;
32335
+
32336
+ g.zoom("touch", constrain(translate(t, p, l), g.extent, translateExtent));
32337
+ }
32338
+
32339
+ function touchended(event, ...args) {
32340
+ if (!this.__zooming) return;
32341
+ var g = gesture(this, args).event(event),
32342
+ touches = event.changedTouches,
32343
+ n = touches.length, i, t;
32344
+
32345
+ nopropagation(event);
32346
+ if (touchending) clearTimeout(touchending);
32347
+ touchending = setTimeout(function() { touchending = null; }, touchDelay);
32348
+ for (i = 0; i < n; ++i) {
32349
+ t = touches[i];
32350
+ if (g.touch0 && g.touch0[2] === t.identifier) delete g.touch0;
32351
+ else if (g.touch1 && g.touch1[2] === t.identifier) delete g.touch1;
32352
+ }
32353
+ if (g.touch1 && !g.touch0) g.touch0 = g.touch1, delete g.touch1;
32354
+ if (g.touch0) g.touch0[1] = this.__zoom.invert(g.touch0[0]);
32355
+ else {
32356
+ g.end();
32357
+ // If this was a dbltap, reroute to the (optional) dblclick.zoom handler.
32358
+ if (g.taps === 2) {
32359
+ t = pointer(t, this);
32360
+ if (Math.hypot(touchfirst[0] - t[0], touchfirst[1] - t[1]) < tapDistance) {
32361
+ var p = select(this).on("dblclick.zoom");
32362
+ if (p) p.apply(this, arguments);
32363
+ }
32364
+ }
32365
+ }
32366
+ }
32367
+
32368
+ zoom.wheelDelta = function(_) {
32369
+ return arguments.length ? (wheelDelta = typeof _ === "function" ? _ : constant(+_), zoom) : wheelDelta;
32370
+ };
32371
+
32372
+ zoom.filter = function(_) {
32373
+ return arguments.length ? (filter = typeof _ === "function" ? _ : constant(!!_), zoom) : filter;
32374
+ };
32375
+
32376
+ zoom.touchable = function(_) {
32377
+ return arguments.length ? (touchable = typeof _ === "function" ? _ : constant(!!_), zoom) : touchable;
32378
+ };
32379
+
32380
+ zoom.extent = function(_) {
32381
+ return arguments.length ? (extent = typeof _ === "function" ? _ : constant([[+_[0][0], +_[0][1]], [+_[1][0], +_[1][1]]]), zoom) : extent;
32382
+ };
32383
+
32384
+ zoom.scaleExtent = function(_) {
32385
+ return arguments.length ? (scaleExtent[0] = +_[0], scaleExtent[1] = +_[1], zoom) : [scaleExtent[0], scaleExtent[1]];
32386
+ };
32387
+
32388
+ zoom.translateExtent = function(_) {
32389
+ return arguments.length ? (translateExtent[0][0] = +_[0][0], translateExtent[1][0] = +_[1][0], translateExtent[0][1] = +_[0][1], translateExtent[1][1] = +_[1][1], zoom) : [[translateExtent[0][0], translateExtent[0][1]], [translateExtent[1][0], translateExtent[1][1]]];
32390
+ };
32391
+
32392
+ zoom.constrain = function(_) {
32393
+ return arguments.length ? (constrain = _, zoom) : constrain;
32394
+ };
32395
+
32396
+ zoom.duration = function(_) {
32397
+ return arguments.length ? (duration = +_, zoom) : duration;
32398
+ };
32399
+
32400
+ zoom.interpolate = function(_) {
32401
+ return arguments.length ? (interpolate = _, zoom) : interpolate;
32402
+ };
32403
+
32404
+ zoom.on = function() {
32405
+ var value = listeners.on.apply(listeners, arguments);
32406
+ return value === listeners ? zoom : value;
32407
+ };
32408
+
32409
+ zoom.clickDistance = function(_) {
32410
+ return arguments.length ? (clickDistance2 = (_ = +_) * _, zoom) : Math.sqrt(clickDistance2);
32411
+ };
32412
+
32413
+ zoom.tapDistance = function(_) {
32414
+ return arguments.length ? (tapDistance = +_, zoom) : tapDistance;
32415
+ };
32416
+
32417
+ return zoom;
32418
+ }
32419
+
32420
+ /**
32421
+ * ZoomHandler deals with user interactions and events like zooming
32422
+ */
32423
+ class ZoomHandler {
32424
+ constructor(canvas, zoomContainer, dataManager, renderingModule, canvasLength) {
32425
+ this.canvas = canvas;
32426
+ this.zoomContainer = zoomContainer;
32427
+ this.dataManager = dataManager;
32428
+ this.renderingModule = renderingModule;
32429
+ this.canvasLength = canvasLength;
32430
+ this.zoomTransform = identity;
32431
+ this.minScale = 1.1;
32432
+ this.minExtentPoint = [-100, -100];
32433
+ this.extentPadding = 100;
32434
+ }
32435
+ attachZoomBehavior() {
32436
+ this.zoomBehavior = this.createZoomBehavior();
32437
+ this.zoomBehavior(select(this.canvas));
32438
+ }
32439
+ resetTransform() {
32440
+ const canvasContext = this.canvas.getContext('2d');
32441
+ if (canvasContext === null) {
32442
+ return;
32443
+ }
32444
+ this.zoomTransform = identity;
32445
+ this.clearCanvas(canvasContext, this.canvasLength, this.canvasLength);
32446
+ this.scaleCanvas(canvasContext, identity.x, identity.y, identity.k);
32447
+ this.renderingModule.drawWafer();
32448
+ this.zoomBehavior?.transform(select(this.canvas), identity);
32449
+ }
32450
+ createZoomBehavior() {
32451
+ const zoomBehavior = zoom()
32452
+ .scaleExtent([
32453
+ 1.1,
32454
+ this.getZoomMax(this.canvasLength * this.canvasLength, this.dataManager.containerDimensions.width
32455
+ * this.dataManager.containerDimensions.height)
32456
+ ])
32457
+ .translateExtent([
32458
+ this.minExtentPoint,
32459
+ [
32460
+ this.canvasLength + this.extentPadding,
32461
+ this.canvasLength + this.extentPadding
32462
+ ]
32463
+ ])
32464
+ .filter((event) => {
32465
+ const transform$1 = transform(this.canvas);
32466
+ return transform$1.k >= this.minScale || event.type === 'wheel';
32467
+ })
32468
+ .on('zoom', (event) => {
32469
+ const transform = event.transform;
32470
+ const canvasContext = this.canvas.getContext('2d');
32471
+ if (canvasContext === null) {
32472
+ return;
32473
+ }
32474
+ canvasContext.save();
32475
+ if (transform.k === this.minScale) {
32476
+ this.zoomTransform = identity;
32477
+ this.clearCanvas(canvasContext, this.canvasLength, this.canvasLength);
32478
+ this.scaleCanvas(canvasContext, identity.x, identity.y, identity.k);
32479
+ this.renderingModule.drawWafer();
32480
+ zoomBehavior.transform(select(this.canvas), identity);
32481
+ }
32482
+ else {
32483
+ this.zoomTransform = transform;
32484
+ this.clearCanvas(canvasContext, this.canvasLength * this.zoomTransform.k, this.canvasLength * this.zoomTransform.k);
32485
+ this.scaleCanvas(canvasContext, transform.x, transform.y, transform.k);
32486
+ this.renderingModule.drawWafer();
32487
+ }
32488
+ canvasContext.restore();
32489
+ this.zoomContainer.setAttribute('transform', this.zoomTransform.toString());
32490
+ });
32491
+ return zoomBehavior;
32492
+ }
32493
+ getZoomMax(canvasArea, dataArea) {
32494
+ return Math.ceil((dataArea / canvasArea) * 100);
32495
+ }
32496
+ clearCanvas(context, width, height) {
32497
+ context.clearRect(0, 0, width, height);
32498
+ }
32499
+ scaleCanvas(context, x = 0, y = 0, scale = 1) {
32500
+ context.translate(x, y);
32501
+ context.scale(scale, scale);
32502
+ }
32503
+ }
32504
+
32505
+ /**
32506
+ * A nimble-styled WaferMap
32507
+ */
32508
+ class WaferMap extends FoundationElement {
32509
+ constructor() {
32510
+ super(...arguments);
32511
+ this.quadrant = WaferMapQuadrant.topLeft;
32512
+ this.orientation = WaferMapOrientation.top;
32513
+ this.maxCharacters = 4;
32514
+ this.dieLabelsHidden = false;
32515
+ this.dieLabelsSuffix = '';
32516
+ this.colorScaleMode = WaferMapColorScaleMode.linear;
32517
+ this.highlightedValues = [];
32518
+ this.dies = [];
32519
+ this.colorScale = {
32520
+ colors: [],
32521
+ values: []
32522
+ };
32523
+ this.renderQueued = false;
32524
+ }
32525
+ connectedCallback() {
32526
+ super.connectedCallback();
32527
+ this.resizeObserver = new ResizeObserver(entries => {
32528
+ const entry = entries[0];
32529
+ if (entry === undefined) {
32530
+ return;
32531
+ }
32532
+ const { height, width } = entry.contentRect;
32533
+ this.canvasSideLength = Math.min(height, width);
32534
+ });
32535
+ this.resizeObserver.observe(this);
32536
+ this.canvas.addEventListener('wheel', event => event.preventDefault(), {
32537
+ passive: false
32538
+ });
29565
32539
  this.queueRender();
29566
32540
  }
29567
32541
  disconnectedCallback() {
29568
32542
  super.disconnectedCallback();
32543
+ this.canvas.removeEventListener('wheel', event => event.preventDefault());
29569
32544
  this.resizeObserver.unobserve(this);
29570
32545
  }
29571
32546
  /**
@@ -29580,6 +32555,8 @@ Instead styling against the role which is more general and likely a better appro
29580
32555
  this.renderer?.clearCanvas(this.canvasSideLength, this.canvasSideLength);
29581
32556
  this.dataManager = new DataManager(this.dies, this.quadrant, { width: this.canvasSideLength, height: this.canvasSideLength }, this.colorScale, this.highlightedValues, this.colorScaleMode, this.dieLabelsHidden, this.dieLabelsSuffix, this.maxCharacters);
29582
32557
  this.renderer = new RenderingModule(this.dataManager, this.canvas);
32558
+ this.zoomHandler = new ZoomHandler(this.canvas, this.zoomContainer, this.dataManager, this.renderer, this.canvasSideLength);
32559
+ this.zoomHandler.attachZoomBehavior();
29583
32560
  this.renderer.drawWafer();
29584
32561
  }
29585
32562
  quadrantChanged() {
@@ -29615,6 +32592,7 @@ Instead styling against the role which is more general and likely a better appro
29615
32592
  this.canvas.width = this.canvasSideLength;
29616
32593
  this.canvas.height = this.canvasSideLength;
29617
32594
  }
32595
+ this.zoomHandler?.resetTransform();
29618
32596
  this.queueRender();
29619
32597
  }
29620
32598
  queueRender() {