@ni/nimble-components 32.7.1 → 32.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2850,7 +2850,40 @@ const jg=qg.compose({baseName:"card-button",template:(t,e)=>Q`
2850
2850
  `,styles:Ug,shadowOptions:{delegatesFocus:!0}})
2851
2851
  _i.getOrCreate().withPrefix("nimble").register(jg())
2852
2852
  const Wg=Mt`
2853
+ .error-icon {
2854
+ display: none;
2855
+ }
2856
+
2857
+ :host([error-visible]) .error-icon {
2858
+ display: inline-flex;
2859
+ width: ${Gl};
2860
+ height: ${Gl};
2861
+ flex: none;
2862
+ }
2863
+
2864
+ .error-text {
2865
+ display: none;
2866
+ }
2867
+
2868
+ :host([error-visible]) .error-text {
2869
+ display: block;
2870
+ font: ${Gd};
2871
+ color: ${Sl};
2872
+ width: 100%;
2873
+ position: absolute;
2874
+ bottom: calc(-1 * (${Qd} + 2px));
2875
+ left: 0px;
2876
+ overflow: hidden;
2877
+ text-overflow: ellipsis;
2878
+ white-space: nowrap;
2879
+ }
2880
+
2881
+ :host([error-visible]) .error-text:empty {
2882
+ display: none;
2883
+ }
2884
+ `,Gg=Mt`
2853
2885
  ${Ps("inline-flex")}
2886
+ ${Wg}
2854
2887
 
2855
2888
  :host {
2856
2889
  font: ${od};
@@ -2858,16 +2891,25 @@ const Wg=Mt`
2858
2891
  cursor: pointer;
2859
2892
  outline: none;
2860
2893
  ${Bm}
2894
+ min-height: ${Vl};
2861
2895
  }
2862
2896
 
2863
2897
  :host([disabled]) {
2864
2898
  cursor: default;
2865
2899
  }
2866
2900
 
2901
+ .container {
2902
+ position: relative;
2903
+ display: grid;
2904
+ grid-template-columns: auto 1fr auto;
2905
+ grid-template-rows: ${hd} auto;
2906
+ align-items: center;
2907
+ width: 100%;
2908
+ }
2909
+
2867
2910
  .control {
2868
- width: calc(${Vl} / 2);
2869
- height: calc(${Vl} / 2);
2870
- flex-shrink: 0;
2911
+ width: ${Gl};
2912
+ height: ${Gl};
2871
2913
  border: ${Wl} solid ${Cl};
2872
2914
  padding: 2px;
2873
2915
  display: inline-flex;
@@ -2876,6 +2918,8 @@ const Wg=Mt`
2876
2918
  transition: box-shadow ${lh};
2877
2919
  ${""}
2878
2920
  line-height: 0;
2921
+ grid-column: 1;
2922
+ grid-row: 1;
2879
2923
  }
2880
2924
 
2881
2925
  @media (prefers-reduced-motion) {
@@ -2903,7 +2947,9 @@ const Wg=Mt`
2903
2947
  .label {
2904
2948
  font: inherit;
2905
2949
  color: ${rd};
2906
- padding-left: 1ch;
2950
+ padding-left: ${Ul};
2951
+ grid-column: 2;
2952
+ grid-row: 1 / span 2;
2907
2953
  cursor: inherit;
2908
2954
  }
2909
2955
 
@@ -2920,16 +2966,13 @@ const Wg=Mt`
2920
2966
  height: ${Gl};
2921
2967
  width: ${Gl};
2922
2968
  overflow: visible;
2969
+ fill: ${Cl};
2923
2970
  }
2924
2971
 
2925
2972
  :host(.checked:not(.indeterminate)) slot[name='checked-indicator'] {
2926
2973
  display: contents;
2927
2974
  }
2928
2975
 
2929
- slot[name='checked-indicator'] svg {
2930
- fill: ${Cl};
2931
- }
2932
-
2933
2976
  :host([disabled]) slot[name='checked-indicator'] svg {
2934
2977
  fill: rgba(${kl}, 0.3);
2935
2978
  }
@@ -2951,10 +2994,20 @@ const Wg=Mt`
2951
2994
  :host([disabled]) slot[name='indeterminate-indicator'] svg {
2952
2995
  fill: rgba(${kl}, 0.3);
2953
2996
  }
2997
+
2998
+ .error-icon {
2999
+ grid-column: 3;
3000
+ grid-row: 1;
3001
+ margin: 0px ${Hl};
3002
+ }
3003
+ `,Zg=Q`
3004
+ <div class="error-text" title="${t=>t.errorText}" aria-live="polite">
3005
+ ${t=>t.errorText}
3006
+ </div>
2954
3007
  `
2955
- class Gg extends Vn{get resolvedTabindex(){const t=this.tabIndex??0
2956
- return this.disabled?void 0:`${t}`}}t([ft({attribute:"tabindex",converter:ut})],Gg.prototype,"tabIndex",void 0)
2957
- const Zg=Gg.compose({baseName:"checkbox",baseClass:Vn,template:(t,e)=>Q`
3008
+ class Kg extends Vn{constructor(){super(...arguments),this.errorVisible=!1}get resolvedTabindex(){const t=this.tabIndex??0
3009
+ return this.disabled?void 0:`${t}`}}t([ft({attribute:"tabindex",converter:ut})],Kg.prototype,"tabIndex",void 0),t([ft({attribute:"error-text"})],Kg.prototype,"errorText",void 0),t([ft({attribute:"error-visible",mode:"boolean"})],Kg.prototype,"errorVisible",void 0)
3010
+ const Yg=Kg.compose({baseName:"checkbox",baseClass:Vn,template:(t,e)=>Q`
2958
3011
  <template
2959
3012
  role="checkbox"
2960
3013
  aria-checked="${t=>t.checked}"
@@ -2966,24 +3019,31 @@ const Zg=Gg.compose({baseName:"checkbox",baseClass:Vn,template:(t,e)=>Q`
2966
3019
  @click="${(t,e)=>t.clickHandler(e.event)}"
2967
3020
  class="${t=>t.readOnly?"readonly":""} ${t=>t.checked?"checked":""} ${t=>t.indeterminate?"indeterminate":""}"
2968
3021
  >
2969
- <div part="control" class="control">
2970
- <slot name="checked-indicator">
2971
- ${e.checkedIndicator||""}
2972
- </slot>
2973
- <slot name="indeterminate-indicator">
2974
- ${e.indeterminateIndicator||""}
2975
- </slot>
3022
+ <div part="container" class="container">
3023
+ <div part="control" class="control">
3024
+ <slot name="checked-indicator">
3025
+ ${e.checkedIndicator||""}
3026
+ </slot>
3027
+ <slot name="indeterminate-indicator">
3028
+ ${e.indeterminateIndicator||""}
3029
+ </slot>
3030
+ </div>
3031
+ <label
3032
+ part="label"
3033
+ class="${t=>t.defaultSlottedNodes?.length?"label":"label label__hidden"}"
3034
+ >
3035
+ <slot ${ie("defaultSlottedNodes")}></slot>
3036
+ </label>
3037
+ <${Mg}
3038
+ severity="error"
3039
+ class="error-icon"
3040
+ ></${Mg}>
3041
+ ${Zg}
2976
3042
  </div>
2977
- <label
2978
- part="label"
2979
- class="${t=>t.defaultSlottedNodes?.length?"label":"label label__hidden"}"
2980
- >
2981
- <slot ${ie("defaultSlottedNodes")}></slot>
2982
- </label>
2983
3043
  </template>
2984
- `,styles:Wg,checkedIndicator:Pu.data,indeterminateIndicator:wf.data})
2985
- _i.getOrCreate().withPrefix("nimble").register(Zg())
2986
- const Kg="nimble-checkbox",Yg=Mt`
3044
+ `,styles:Gg,checkedIndicator:Pu.data,indeterminateIndicator:wf.data})
3045
+ _i.getOrCreate().withPrefix("nimble").register(Yg())
3046
+ const Xg="nimble-checkbox",Jg=Mt`
2987
3047
  ${Eh}
2988
3048
  ${Ah}
2989
3049
 
@@ -3030,9 +3090,9 @@ const Kg="nimble-checkbox",Yg=Mt`
3030
3090
  }
3031
3091
  }
3032
3092
  `))
3033
- class Xg extends as{constructor(){super(...arguments),this.appearance=kh,this.contentHidden=!1}get resolvedTabindex(){const t=this.tabIndex??0
3034
- return this.disabled?void 0:`${t}`}}t([ft],Xg.prototype,"appearance",void 0),t([ft({attribute:"appearance-variant"})],Xg.prototype,"appearanceVariant",void 0),t([ft({attribute:"content-hidden",mode:"boolean"})],Xg.prototype,"contentHidden",void 0),t([ft({attribute:"tabindex",converter:ut})],Xg.prototype,"tabIndex",void 0),Ke(Xg,re,Nn)
3035
- const Jg=Xg.compose({baseName:"toggle-button",template:(t,e)=>Q`
3093
+ class Qg extends as{constructor(){super(...arguments),this.appearance=kh,this.contentHidden=!1}get resolvedTabindex(){const t=this.tabIndex??0
3094
+ return this.disabled?void 0:`${t}`}}t([ft],Qg.prototype,"appearance",void 0),t([ft({attribute:"appearance-variant"})],Qg.prototype,"appearanceVariant",void 0),t([ft({attribute:"content-hidden",mode:"boolean"})],Qg.prototype,"contentHidden",void 0),t([ft({attribute:"tabindex",converter:ut})],Qg.prototype,"tabIndex",void 0),Ke(Qg,re,Nn)
3095
+ const tv=Qg.compose({baseName:"toggle-button",template:(t,e)=>Q`
3036
3096
  <div
3037
3097
  role="button"
3038
3098
  part="control"
@@ -3072,15 +3132,11 @@ const Jg=Xg.compose({baseName:"toggle-button",template:(t,e)=>Q`
3072
3132
  </span>
3073
3133
  ${ae(0,e)}
3074
3134
  </div>
3075
- `,styles:Yg,shadowOptions:{delegatesFocus:!0}})
3076
- _i.getOrCreate().withPrefix("nimble").register(Jg())
3077
- const Qg="nimble-toggle-button",tv=Q`
3078
- <div class="error-text" title="${t=>t.errorText}" aria-live="polite">
3079
- ${t=>t.errorText}
3080
- </div>
3081
- `
3135
+ `,styles:Jg,shadowOptions:{delegatesFocus:!0}})
3136
+ _i.getOrCreate().withPrefix("nimble").register(tv())
3137
+ const ev="nimble-toggle-button"
3082
3138
  zm("icon-arrow-expander-down",class extends Vm{constructor(){super(Xh)}})
3083
- const ev="nimble-icon-arrow-expander-down",nv="above",iv="underline",sv="outline",ov="block",rv=Mt`
3139
+ const nv="nimble-icon-arrow-expander-down",iv="above",sv="underline",ov="outline",rv="block",av=Mt`
3084
3140
  ${Ps("inline-flex")}
3085
3141
 
3086
3142
  :host {
@@ -3316,7 +3372,7 @@ const ev="nimble-icon-arrow-expander-down",nv="above",iv="underline",sv="outline
3316
3372
  align-items: center;
3317
3373
  padding: ${Hl} ${Ul};
3318
3374
  }
3319
- `.withBehaviors($h(iv,Mt`
3375
+ `.withBehaviors($h(sv,Mt`
3320
3376
  .control {
3321
3377
  border-bottom-width: ${Wl};
3322
3378
  padding-bottom: 0;
@@ -3325,12 +3381,12 @@ const ev="nimble-icon-arrow-expander-down",nv="above",iv="underline",sv="outline
3325
3381
  :host([disabled]) .control {
3326
3382
  border-color: rgba(${kl}, 0.1);
3327
3383
  }
3328
- `),$h(sv,Mt`
3384
+ `),$h(ov,Mt`
3329
3385
  .control {
3330
3386
  border-width: ${Wl};
3331
3387
  padding: 0;
3332
3388
  }
3333
- `),$h(ov,Mt`
3389
+ `),$h(rv,Mt`
3334
3390
  .control {
3335
3391
  background-color: rgba(${kl}, 0.1);
3336
3392
  }
@@ -3347,41 +3403,9 @@ const ev="nimble-icon-arrow-expander-down",nv="above",iv="underline",sv="outline
3347
3403
  .listbox slot {
3348
3404
  background: ${ml(co,.15)};
3349
3405
  }
3350
- `)),av=Mt`
3351
- .error-icon {
3352
- display: none;
3353
- }
3354
-
3355
- :host([error-visible]) .error-icon {
3356
- display: inline-flex;
3357
- width: ${Gl};
3358
- height: ${Gl};
3359
- flex: none;
3360
- }
3361
-
3362
- .error-text {
3363
- display: none;
3364
- }
3365
-
3366
- :host([error-visible]) .error-text {
3367
- display: block;
3368
- font: ${Gd};
3369
- color: ${Sl};
3370
- width: 100%;
3371
- position: absolute;
3372
- bottom: calc(-1 * (${Qd} + 2px));
3373
- left: 0px;
3374
- overflow: hidden;
3375
- text-overflow: ellipsis;
3376
- white-space: nowrap;
3377
- }
3378
-
3379
- :host([error-visible]) .error-text:empty {
3380
- display: none;
3381
- }
3382
- `,lv={none:void 0,standard:"standard",manual:"manual"},cv=Mt`
3383
- ${rv}
3406
+ `)),lv={none:void 0,standard:"standard",manual:"manual"},cv=Mt`
3384
3407
  ${av}
3408
+ ${Wg}
3385
3409
 
3386
3410
  :host {
3387
3411
  --ni-private-hover-bottom-border-width: 2px;
@@ -3450,7 +3474,7 @@ const ev="nimble-icon-arrow-expander-down",nv="above",iv="underline",sv="outline
3450
3474
  :host([disabled]) .dropdown-icon {
3451
3475
  fill: ${ad};
3452
3476
  }
3453
- `.withBehaviors($h(ov,Mt`
3477
+ `.withBehaviors($h(rv,Mt`
3454
3478
  :host([error-visible]) .control {
3455
3479
  border-bottom-width: ${Wl};
3456
3480
  padding-bottom: 0;
@@ -3458,7 +3482,7 @@ const ev="nimble-icon-arrow-expander-down",nv="above",iv="underline",sv="outline
3458
3482
  `))
3459
3483
  class dv{constructor(t,e){this.target=t,this.propertyName=e}bind(t){this.source=t,this.setSourceValue(!1),this.mouseOverHandler=()=>{const t=this.target.offsetWidth<this.target.scrollWidth
3460
3484
  this.setSourceValue(t)},this.mouseOutHandler=()=>{this.setSourceValue(!1)},this.target.addEventListener("mouseover",this.mouseOverHandler),this.target.addEventListener("mouseout",this.mouseOutHandler)}unbind(){this.source=void 0,this.target.removeEventListener("mouseover",this.mouseOverHandler),this.target.removeEventListener("mouseout",this.mouseOutHandler)}setSourceValue(t){this.source[this.propertyName]=t}}function hv(t){return new D("nimble-overflow",dv,t)}let uv=class extends Fi{}
3461
- class pv extends(An(uv)){constructor(){super(...arguments),this.proxy=document.createElement("input")}}class fv extends pv{constructor(){super(...arguments),this.appearance=iv,this.errorVisible=!1,this.open=!1,this.filteredOptions=[],this.hasOverflow=!1,this.listboxId=il("listbox-"),this.availableViewportHeight=0,this.valueUpdatedByInput=!1,this._value="",this.filter="",this.forcedPosition=!1}get value(){return x.track(this,"value"),this._value}set value(t){const e=this._value
3485
+ class pv extends(An(uv)){constructor(){super(...arguments),this.proxy=document.createElement("input")}}class fv extends pv{constructor(){super(...arguments),this.appearance=sv,this.errorVisible=!1,this.open=!1,this.filteredOptions=[],this.hasOverflow=!1,this.listboxId=il("listbox-"),this.availableViewportHeight=0,this.valueUpdatedByInput=!1,this._value="",this.filter="",this.forcedPosition=!1}get value(){return x.track(this,"value"),this._value}set value(t){const e=this._value
3462
3486
  let n=t
3463
3487
  if(this.$fastController.isConnected&&this.options){const e=this.findIndexOfValidOption(t),i=this.options[this.selectedIndex]?.text,s=this.options[e]?.text
3464
3488
  i!==s&&(this.selectedIndex=e),n=this.firstSelectedOption?.text||n}e!==n&&(this._value=n,super.valueChanged(e,n),x.notify(this,"value")),this.filter=t,this.filterOptions(),this.selectedIndex=this.findIndexOfValidOption(this.value)}get options(){return x.track(this,"options"),this.filteredOptions&&this.filter?this.filteredOptions:this._options}set options(t){this._options=t,x.notify(this,"options")}get isAutocompleteInline(){return this.autocomplete===Yn||this.isAutocompleteBoth}get isAutocompleteList(){return this.autocomplete===Xn||this.isAutocompleteBoth}get isAutocompleteBoth(){return this.autocomplete===Jn}slottedOptionsChanged(t,e){const n=this.value
@@ -3545,7 +3569,7 @@ const mv=fv.compose({baseName:"combobox",baseClass:pv,template:(t,e)=>Q`
3545
3569
  class="anchored-region"
3546
3570
  fixed-placement
3547
3571
  auto-update-mode="auto"
3548
- vertical-default-position="${t=>t.positionAttribute===nv?"top":"bottom"}"
3572
+ vertical-default-position="${t=>t.positionAttribute===iv?"top":"bottom"}"
3549
3573
  vertical-positioning-mode="${t=>t.positionAttribute?"locktodefault":"dynamic"}"
3550
3574
  horizontal-default-position="center"
3551
3575
  horizontal-positioning-mode="locktodefault"
@@ -3582,7 +3606,7 @@ const mv=fv.compose({baseName:"combobox",baseClass:pv,template:(t,e)=>Q`
3582
3606
  class="error-icon"
3583
3607
  ></${Mg}>
3584
3608
  <div class="separator"></div>
3585
- <${Qg}
3609
+ <${ev}
3586
3610
  ${Ut("dropdownButton")}
3587
3611
  appearance="ghost"
3588
3612
  ?checked="${t=>t.open}"
@@ -3596,14 +3620,14 @@ const mv=fv.compose({baseName:"combobox",baseClass:pv,template:(t,e)=>Q`
3596
3620
  aria-hidden="true"
3597
3621
  tabindex="-1"
3598
3622
  >
3599
- <${ev}
3623
+ <${nv}
3600
3624
  slot="start"
3601
3625
  class="dropdown-icon"
3602
3626
  >
3603
- </${ev}>
3604
- </${Qg}>
3627
+ </${nv}>
3628
+ </${ev}>
3605
3629
  </div>
3606
- ${tv}
3630
+ ${Zg}
3607
3631
  `})
3608
3632
  Ke(fv,re,ei),_i.getOrCreate().withPrefix("nimble").register(mv())
3609
3633
  const gv=Symbol("user dismissed"),vv=Mt`
@@ -4426,7 +4450,7 @@ const Zb="auto",Kb=Mt`
4426
4450
  ?open="${t=>t.open}"
4427
4451
  @focusout="${(t,e)=>t.focusoutHandler(e.event)}"
4428
4452
  >
4429
- <${Qg}
4453
+ <${ev}
4430
4454
  part="button"
4431
4455
  appearance="${t=>t.appearance}"
4432
4456
  appearance-variant="${t=>t.appearanceVariant}"
@@ -4445,7 +4469,7 @@ const Zb="auto",Kb=Mt`
4445
4469
  <slot slot="start" name="start"></slot>
4446
4470
  <slot></slot>
4447
4471
  <slot slot="end" name="end"></slot>
4448
- </${Qg}>
4472
+ </${ev}>
4449
4473
  ${Gt((t=>t.open),Q`
4450
4474
  <${Cg}
4451
4475
  fixed-placement="true"
@@ -4631,7 +4655,7 @@ const ey=class extends Vi{}.compose({baseName:"menu-item",baseClass:Vi,template:
4631
4655
  _i.getOrCreate().withPrefix("nimble").register(ey())
4632
4656
  const ny="underline",iy="outline",sy="block",oy=Mt`
4633
4657
  ${Ps("inline-block")}
4634
- ${av}
4658
+ ${Wg}
4635
4659
 
4636
4660
  :host {
4637
4661
  font: ${od};
@@ -4924,7 +4948,7 @@ const ay=ry.compose({baseName:"number-field",baseClass:Zi,template:(t,e)=>Q`
4924
4948
  severity="error"
4925
4949
  class="error-icon"
4926
4950
  ></${Mg}>
4927
- ${tv}
4951
+ ${Zg}
4928
4952
  `})
4929
4953
  _i.getOrCreate().withPrefix("nimble").register(ay())
4930
4954
  const ly=Mt`
@@ -5040,7 +5064,7 @@ const cy=class extends Ji{}.compose({baseName:"radio",baseClass:Ji,template:(t,e
5040
5064
  _i.getOrCreate().withPrefix("nimble").register(cy())
5041
5065
  const dy=Mt`
5042
5066
  ${Ps("inline-block")}
5043
- ${av}
5067
+ ${Wg}
5044
5068
 
5045
5069
  .positioning-region {
5046
5070
  display: flex;
@@ -5099,7 +5123,7 @@ const dy=Mt`
5099
5123
  <slot
5100
5124
  ${ie({property:"slottedRadioButtons",filter:te("[role=radio]")})}
5101
5125
  ></slot>
5102
- ${tv}
5126
+ ${Zg}
5103
5127
  </div>
5104
5128
  </template>
5105
5129
  `
@@ -7451,7 +7475,7 @@ const UI=class extends vs{}.compose({baseName:"toolbar",baseClass:vs,template:(t
7451
7475
  `,styles:HI,shadowOptions:{delegatesFocus:!0}})
7452
7476
  _i.getOrCreate().withPrefix("nimble").register(UI())
7453
7477
  const qI="nimble-toolbar",jI="Bold",WI="Italics",GI="Bulleted List",ZI="Numbered List",KI=yi.create({name:"rich-text-toggle-bold-label",cssCustomPropertyName:null}).withDefault(jI),YI=yi.create({name:"rich-text-toggle-italics-label",cssCustomPropertyName:null}).withDefault(WI),XI=yi.create({name:"rich-text-toggle-bulleted-list-label",cssCustomPropertyName:null}).withDefault(GI),JI=yi.create({name:"rich-text-toggle-numbered-list-label",cssCustomPropertyName:null}).withDefault(ZI),QI=Mt`
7454
- ${rv}
7478
+ ${av}
7455
7479
 
7456
7480
  :host {
7457
7481
  height: auto;
@@ -7534,7 +7558,7 @@ const sM="nimble-rich-text-mention-listbox",oM=Q`
7534
7558
  ></${Mg}>
7535
7559
  <section class="footer-section">
7536
7560
  <${qI}>
7537
- <${Qg}
7561
+ <${ev}
7538
7562
  ${Ut("boldButton")}
7539
7563
  appearance="ghost"
7540
7564
  content-hidden
@@ -7547,8 +7571,8 @@ const sM="nimble-rich-text-mention-listbox",oM=Q`
7547
7571
  >
7548
7572
  ${t=>KI.getValueFor(t)}
7549
7573
  <${Dv} slot="start"></${Dv}>
7550
- </${Qg}>
7551
- <${Qg}
7574
+ </${ev}>
7575
+ <${ev}
7552
7576
  ${Ut("italicsButton")}
7553
7577
  appearance="ghost"
7554
7578
  content-hidden
@@ -7561,8 +7585,8 @@ const sM="nimble-rich-text-mention-listbox",oM=Q`
7561
7585
  >
7562
7586
  ${t=>YI.getValueFor(t)}
7563
7587
  <${Ev} slot="start"></${Ev}>
7564
- </${Qg}>
7565
- <${Qg}
7588
+ </${ev}>
7589
+ <${ev}
7566
7590
  ${Ut("bulletListButton")}
7567
7591
  appearance="ghost"
7568
7592
  content-hidden
@@ -7575,8 +7599,8 @@ const sM="nimble-rich-text-mention-listbox",oM=Q`
7575
7599
  >
7576
7600
  ${t=>XI.getValueFor(t)}
7577
7601
  <${Av} slot="start"></${Av}>
7578
- </${Qg}>
7579
- <${Qg}
7602
+ </${ev}>
7603
+ <${ev}
7580
7604
  ${Ut("numberedListButton")}
7581
7605
  appearance="ghost"
7582
7606
  content-hidden
@@ -7589,7 +7613,7 @@ const sM="nimble-rich-text-mention-listbox",oM=Q`
7589
7613
  >
7590
7614
  ${t=>JI.getValueFor(t)}
7591
7615
  <${Rv} slot="start"></${Rv}>
7592
- </${Qg}>
7616
+ </${ev}>
7593
7617
  ${Qt((t=>t.getMentionExtensionConfig()),Q`
7594
7618
  <${jh}
7595
7619
  appearance="ghost"
@@ -7608,7 +7632,7 @@ const sM="nimble-rich-text-mention-listbox",oM=Q`
7608
7632
  <slot name="footer-actions"></slot>
7609
7633
  </span>
7610
7634
  </section>
7611
- ${tv}
7635
+ ${Zg}
7612
7636
  </div>
7613
7637
  <${sM}
7614
7638
  ${Ut("mentionListbox")}
@@ -7621,7 +7645,7 @@ const sM="nimble-rich-text-mention-listbox",oM=Q`
7621
7645
  </template>
7622
7646
  `,rM=Mt`
7623
7647
  ${Ps("inline-flex")}
7624
- ${av}
7648
+ ${Wg}
7625
7649
 
7626
7650
  :host {
7627
7651
  font: ${od};
@@ -7827,7 +7851,7 @@ const sM="nimble-rich-text-mention-listbox",oM=Q`
7827
7851
  }
7828
7852
 
7829
7853
  ${jh},
7830
- ${Qg} {
7854
+ ${ev} {
7831
7855
  height: ${zl};
7832
7856
  }
7833
7857
 
@@ -7840,7 +7864,7 @@ const sM="nimble-rich-text-mention-listbox",oM=Q`
7840
7864
  }
7841
7865
 
7842
7866
  ::slotted(${jh}),
7843
- ::slotted(${Qg}),
7867
+ ::slotted(${ev}),
7844
7868
  ::slotted(${"nimble-anchor-button"}),
7845
7869
  ::slotted(${Qb}) {
7846
7870
  height: ${zl};
@@ -9180,8 +9204,8 @@ this.viewer.replaceChildren(t.fragment),this.mentionedHrefs=t.mentionedHrefs}els
9180
9204
  const $O=MO.compose({baseName:"rich-text-viewer",template:_O,styles:IO})
9181
9205
  _i.getOrCreate().withPrefix("nimble").register($O())
9182
9206
  const DO=Mt`
9183
- ${rv}
9184
9207
  ${av}
9208
+ ${Wg}
9185
9209
 
9186
9210
  ${""}
9187
9211
 
@@ -9321,7 +9345,7 @@ const DO=Mt`
9321
9345
  .loading-spinner {
9322
9346
  margin-left: auto;
9323
9347
  }
9324
- `.withBehaviors($h(ov,Mt`
9348
+ `.withBehaviors($h(rv,Mt`
9325
9349
  :host([error-visible]) .control {
9326
9350
  border-bottom-width: ${Wl};
9327
9351
  padding-bottom: 0;
@@ -9507,7 +9531,7 @@ _i.getOrCreate().withPrefix("nimble").register(RO())
9507
9531
  const FO="nimble-spinner",NO=t=>t instanceof Ib,LO=t=>t instanceof Ab
9508
9532
  let BO=class extends Fi{}
9509
9533
  class PO extends(An(BO)){constructor(){super(...arguments),this.proxy=document.createElement("select")}}const VO=t=>!t.visuallyHidden&&!t.disabled&&!t.hidden,zO=t=>!t.visuallyHidden&&!t.hidden
9510
- class HO extends PO{constructor(){super(...arguments),this.appearance=iv,this.errorVisible=!1,this.filterMode=lv.none,this.clearable=!1,this.loadingVisible=!1,this.displayPlaceholder=!1,this.open=!1,this.listboxId=il("listbox-"),this.hasOverflow=!1,this.filteredOptions=[],this.filter="",this.availableViewportHeight=0,this._value="",this.forcedPosition=!1,this.selectedOptionObserver=new MutationObserver((()=>{this.updateDisplayValue()}))}get collapsible(){return!(this.multiple||"number"==typeof this.size)}get labelContent(){return this.$fastController.isConnected?_b(this.labelSlot):""}connectedCallback(){super.connectedCallback(),this.forcedPosition=!!this.positionAttribute,this.open&&this.initializeOpenState(),this.observeSelectedOptionTextContent()}disconnectedCallback(){super.disconnectedCallback(),this.selectedOptionObserver?.disconnect()}get value(){return x.track(this,"value"),this._value}set value(t){const e=this._value
9534
+ class HO extends PO{constructor(){super(...arguments),this.appearance=sv,this.errorVisible=!1,this.filterMode=lv.none,this.clearable=!1,this.loadingVisible=!1,this.displayPlaceholder=!1,this.open=!1,this.listboxId=il("listbox-"),this.hasOverflow=!1,this.filteredOptions=[],this.filter="",this.availableViewportHeight=0,this._value="",this.forcedPosition=!1,this.selectedOptionObserver=new MutationObserver((()=>{this.updateDisplayValue()}))}get collapsible(){return!(this.multiple||"number"==typeof this.size)}get labelContent(){return this.$fastController.isConnected?_b(this.labelSlot):""}connectedCallback(){super.connectedCallback(),this.forcedPosition=!!this.positionAttribute,this.open&&this.initializeOpenState(),this.observeSelectedOptionTextContent()}disconnectedCallback(){super.disconnectedCallback(),this.selectedOptionObserver?.disconnect()}get value(){return x.track(this,"value"),this._value}set value(t){const e=this._value
9511
9535
  let n=t
9512
9536
  if(this.options?.length){const t=this.options.findIndex((t=>t.value===n)),e=this.options[this.selectedIndex]?.value??null,i=this.options[t]?.value??null;-1!==t&&e===i||(n="",this.selectedIndex=t),n=this.firstSelectedOption?.value??n}e!==n&&(this._value=n,super.valueChanged(e,n),x.notify(this,"value"),this.updateDisplayValue())}get displayValue(){return x.track(this,"displayValue"),this.firstSelectedOption?.text??""}anchoredRegionChanged(t,e){this.anchoredRegion&&this.control&&(this.anchoredRegion.anchorElement=this.control)}controlChanged(t,e){this.anchoredRegion&&this.control&&(this.anchoredRegion.anchorElement=this.control)}slottedOptionsChanged(t,e){const n=this.value
9513
9537
  this.options.forEach((t=>{const e=x.getNotifier(t)
@@ -9668,7 +9692,7 @@ const UO=HO.compose({baseName:"select",baseClass:ns,template:(t,e)=>Q`
9668
9692
  class="anchored-region"
9669
9693
  fixed-placement
9670
9694
  auto-update-mode="auto"
9671
- vertical-default-position="${t=>t.positionAttribute===nv?"top":"bottom"}"
9695
+ vertical-default-position="${t=>t.positionAttribute===iv?"top":"bottom"}"
9672
9696
  vertical-positioning-mode="${t=>t.positionAttribute?"locktodefault":"dynamic"}"
9673
9697
  horizontal-default-position="center"
9674
9698
  horizontal-positioning-mode="locktodefault"
@@ -9734,7 +9758,7 @@ const UO=HO.compose({baseName:"select",baseClass:ns,template:(t,e)=>Q`
9734
9758
  severity="error"
9735
9759
  class="error-icon"
9736
9760
  ></${Mg}>
9737
- ${tv}
9761
+ ${Zg}
9738
9762
  `})
9739
9763
  Ke(HO,re,is),_i.getOrCreate().withPrefix("nimble").register(UO())
9740
9764
  const qO=Mt`
@@ -10518,6 +10542,7 @@ return!this.missingColumnId&&!this.duplicateColumnId}validateColumnSortIndices(t
10518
10542
 
10519
10543
  .header-row-action-container {
10520
10544
  display: flex;
10545
+ align-items: center;
10521
10546
  }
10522
10547
 
10523
10548
  .checkbox-container {
@@ -11012,7 +11037,7 @@ const zF="nimble-table-cell",HF=Q`
11012
11037
  ${Gt((t=>!t.rowOperationGridCellHidden),Q`
11013
11038
  <span role="gridcell" class="row-operations-container">
11014
11039
  ${Gt((t=>t.showSelectionCheckbox),Q`
11015
- <${Kg}
11040
+ <${Xg}
11016
11041
  ${Ut("selectionCheckbox")}
11017
11042
  class="selection-checkbox"
11018
11043
  ${""}
@@ -11022,7 +11047,7 @@ const zF="nimble-table-cell",HF=Q`
11022
11047
  title="${t=>gb.getValueFor(t)}"
11023
11048
  aria-label="${t=>gb.getValueFor(t)}"
11024
11049
  >
11025
- </${Kg}>
11050
+ </${Xg}>
11026
11051
  `)}
11027
11052
  </span>
11028
11053
  `)}
@@ -11204,7 +11229,7 @@ const jF="nimble-table-row",WF=Mt`
11204
11229
  >
11205
11230
  ${Gt((t=>t.selectable),Q`
11206
11231
  <span role="gridcell" class="checkbox-container">
11207
- <${Kg}
11232
+ <${Xg}
11208
11233
  ${Ut("selectionCheckbox")}
11209
11234
  class="selection-checkbox"
11210
11235
  @change="${(t,e)=>t.onSelectionCheckboxChange(e.event)}"
@@ -11212,7 +11237,7 @@ const jF="nimble-table-row",WF=Mt`
11212
11237
  title="${t=>mb.getValueFor(t)}"
11213
11238
  aria-label="${t=>mb.getValueFor(t)}"
11214
11239
  >
11215
- </${Kg}>
11240
+ </${Xg}>
11216
11241
  </span>
11217
11242
  `)}
11218
11243
 
@@ -11270,7 +11295,7 @@ const YF="nimble-table-group-row",XF=Q`
11270
11295
  `)}
11271
11296
  ${Gt((t=>t.selectionMode===eF.multiple),Q`
11272
11297
  <span class="checkbox-container">
11273
- <${Kg}
11298
+ <${Xg}
11274
11299
  ${Ut("selectionCheckbox")}
11275
11300
  ${""}
11276
11301
  tabindex="-1"
@@ -11279,7 +11304,7 @@ const YF="nimble-table-group-row",XF=Q`
11279
11304
  title="${t=>fb.getValueFor(t)}"
11280
11305
  aria-label="${t=>fb.getValueFor(t)}"
11281
11306
  >
11282
- </${Kg}>
11307
+ </${Xg}>
11283
11308
  </span>
11284
11309
  `)}
11285
11310
  <span class="collapse-all-button-container">
@@ -12163,7 +12188,7 @@ const UL=Q`
12163
12188
  title=${t=>t.hasOverflow?t.cellRecord.value:null}
12164
12189
  >
12165
12190
  <span ${Ut("valueSpan")} class="value-label">${t=>t.cellRecord.value}</span>
12166
- <${ev} slot="end"></${ev}>
12191
+ <${nv} slot="end"></${nv}>
12167
12192
 
12168
12193
  <slot name="${qL}" slot="menu"></slot>
12169
12194
  </${Qb}>
@@ -12291,7 +12316,7 @@ const $B=class extends We{}.compose({baseName:"tabs-toolbar",template:MB,styles:
12291
12316
  _i.getOrCreate().withPrefix("nimble").register($B())
12292
12317
  const DB="outline",EB="block",AB=Mt`
12293
12318
  ${Ps("inline-flex")}
12294
- ${av}
12319
+ ${Wg}
12295
12320
 
12296
12321
  :host {
12297
12322
  font: ${od};
@@ -12507,13 +12532,13 @@ const OB=TB.compose({baseName:"text-area",baseClass:ms,template:()=>Q`
12507
12532
  class="error-icon ${t=>t.scrollbarWidth>=0?"scrollbar-width-calculated":""}"
12508
12533
  style="--ni-private-scrollbar-width: ${t=>t.scrollbarWidth}px;"
12509
12534
  ></${Mg}>
12510
- ${tv}
12535
+ ${Zg}
12511
12536
  </div>
12512
12537
  `,styles:AB,shadowOptions:{delegatesFocus:!0}})
12513
12538
  _i.getOrCreate().withPrefix("nimble").register(OB())
12514
12539
  const RB="underline",FB="outline",NB="block",LB="frameless",BB=Mt`
12515
12540
  ${Ps("inline-block")}
12516
- ${av}
12541
+ ${Wg}
12517
12542
 
12518
12543
  :host {
12519
12544
  font: ${od};
@@ -12815,7 +12840,7 @@ const VB=PB.compose({baseName:"text-field",baseClass:qi,template:(t,e)=>Q`
12815
12840
  <span part="actions">
12816
12841
  <slot name="actions"></slot>
12817
12842
  </span>
12818
- ${tv}
12843
+ ${Zg}
12819
12844
  `})
12820
12845
  _i.getOrCreate().withPrefix("nimble").register(VB())
12821
12846
  const zB=Mt`
@@ -13922,15 +13947,16 @@ let{[e]:r,[e+1]:a}=s
13922
13947
  const l=n instanceof Map?n.entries():Object.entries(n)
13923
13948
  for(const t of l)if(o(i,r,t),++r>=a)break}))
13924
13949
  const bW=new Wj,yW=Symbol.for("parent"),wW=Symbol.for("rowIndex")
13925
- class xW{constructor(t,e){return this[yW]=t,this[wW]=e,new Proxy(this,new kW)}toArray(){return Object.values(this.toJSON())}toJSON(){const t=this[wW],e=this[yW],n=e.type.children,i={}
13950
+ class xW{constructor(t,e){return this[yW]=t,this[wW]=e,new Proxy(this,kW)}toArray(){return Object.values(this.toJSON())}toJSON(){const t=this[wW],e=this[yW],n=e.type.children,i={}
13926
13951
  for(let s=-1,o=n.length;++s<o;)i[n[s].name]=KW.visit(e.children[s],t)
13927
13952
  return i}toString(){return`{${[...this].map((([t,e])=>`${Tq(t)}: ${Tq(e)}`)).join(", ")}}`}[Symbol.for("nodejs.util.inspect.custom")](){return this.toString()}[Symbol.iterator](){return new CW(this[yW],this[wW])}}class CW{constructor(t,e){this.childIndex=0,this.children=t.children,this.rowIndex=e,this.childFields=t.type.children,this.numChildren=this.childFields.length}[Symbol.iterator](){return this}next(){const t=this.childIndex
13928
13953
  return t<this.numChildren?(this.childIndex=t+1,{done:!1,value:[this.childFields[t].name,KW.visit(this.children[t],this.rowIndex)]}):{done:!0,value:null}}}Object.defineProperties(xW.prototype,{[Symbol.toStringTag]:{enumerable:!1,configurable:!1,value:"Row"},[yW]:{writable:!0,enumerable:!1,configurable:!1,value:null},[wW]:{writable:!0,enumerable:!1,configurable:!1,value:-1}})
13929
- class kW{isExtensible(){return!1}deleteProperty(){return!1}preventExtensions(){return!0}ownKeys(t){return t[yW].type.children.map((t=>t.name))}has(t,e){return-1!==t[yW].type.children.findIndex((t=>t.name===e))}getOwnPropertyDescriptor(t,e){if(-1!==t[yW].type.children.findIndex((t=>t.name===e)))return{writable:!0,enumerable:!0,configurable:!0}}get(t,e){if(Reflect.has(t,e))return t[e]
13954
+ const kW=new class{isExtensible(){return!1}deleteProperty(){return!1}preventExtensions(){return!0}ownKeys(t){return t[yW].type.children.map((t=>t.name))}has(t,e){return t[yW].type.children.some((t=>t.name===e))}getOwnPropertyDescriptor(t,e){if(t[yW].type.children.some((t=>t.name===e)))return{writable:!0,enumerable:!0,configurable:!0}}get(t,e){if(Reflect.has(t,e))return t[e]
13930
13955
  const n=t[yW].type.children.findIndex((t=>t.name===e))
13931
13956
  if(-1!==n){const i=KW.visit(t[yW].children[n],t[wW])
13932
13957
  return Reflect.set(t,e,i),i}}set(t,e,n){const i=t[yW].type.children.findIndex((t=>t.name===e))
13933
- return-1!==i?(bW.visit(t[yW].children[i],t[wW],n),Reflect.set(t,e,n)):!(!Reflect.has(t,e)&&"symbol"!=typeof e)&&Reflect.set(t,e,n)}}class SW extends Vj{}function _W(t){return(e,n)=>e.getValid(n)?t(e,n):null}const IW=(t,e,n)=>{if(n+1>=e.length)return null
13958
+ return-1!==i?(bW.visit(t[yW].children[i],t[wW],n),Reflect.set(t,e,n)):!(!Reflect.has(t,e)&&"symbol"!=typeof e)&&Reflect.set(t,e,n)}}
13959
+ class SW extends Vj{}function _W(t){return(e,n)=>e.getValid(n)?t(e,n):null}const IW=(t,e,n)=>{if(n+1>=e.length)return null
13934
13960
  const i=Oq(e[n]),s=Oq(e[n+1])
13935
13961
  return t.subarray(i,s)},MW=({values:t},e)=>((t,e)=>864e5*t[e])(t,e),$W=({values:t},e)=>Oq(t[e]),DW=({stride:t,values:e},n)=>e[t*n],EW=({values:t},e)=>t[e],AW=({values:t,valueOffsets:e},n)=>IW(t,e,n),TW=({values:t,valueOffsets:e},n)=>{const i=IW(t,e,n)
13936
13962
  return null!==i?oU(i):null},OW=({values:t},e)=>1e3*Oq(t[e]),RW=({values:t},e)=>Oq(t[e]),FW=({values:t},e)=>Rq(t[e],BigInt(1e3)),NW=({values:t},e)=>Rq(t[e],BigInt(1e6)),LW=({values:t},e)=>t[e],BW=({values:t},e)=>t[e],PW=({values:t},e)=>t[e],VW=({values:t},e)=>t[e],zW=(t,e)=>{const n=t.type.typeIdToChildIndex[t.typeIds[e]],i=t.children[n]
@@ -14132,7 +14158,7 @@ return t?this.bb.__vector_len(this.bb_pos+t):0}customMetadata(t,e){const n=this.
14132
14158
  return n?(e||new rq).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+n)+4*t),this.bb):null}customMetadataLength(){const t=this.bb.__offset(this.bb_pos,12)
14133
14159
  return t?this.bb.__vector_len(this.bb_pos+t):0}static startFooter(t){t.startObject(5)}static addVersion(t,e){t.addFieldInt16(0,e,NU.V1)}static addSchema(t,e){t.addFieldOffset(1,e,0)}static addDictionaries(t,e){t.addFieldOffset(2,e,0)}static startDictionariesVector(t,e){t.startVector(24,e,8)}static addRecordBatches(t,e){t.addFieldOffset(3,e,0)}static startRecordBatchesVector(t,e){t.startVector(24,e,8)}static addCustomMetadata(t,e){t.addFieldOffset(4,e,0)}static createCustomMetadataVector(t,e){t.startVector(4,e.length,4)
14134
14160
  for(let n=e.length-1;n>=0;n--)t.addOffset(e[n])
14135
- return t.endVector()}static startCustomMetadataVector(t,e){t.startVector(4,e,4)}static endFooter(t){return t.endObject()}static finishFooterBuffer(t,e){t.finish(e)}static finishSizePrefixedFooterBuffer(t,e){t.finish(e,void 0,!0)}}class jG{constructor(t=[],e,n,i=NU.V5){this.fields=t||[],this.metadata=e||new Map,n||(n=ZG(t)),this.dictionaries=n,this.metadataVersion=i}get[Symbol.toStringTag](){return"Schema"}get names(){return this.fields.map((t=>t.name))}toString(){return`Schema<{ ${this.fields.map(((t,e)=>`${e}: ${t}`)).join(", ")} }>`}select(t){const e=new Set(t),n=this.fields.filter((t=>e.has(t.name)))
14161
+ return t.endVector()}static startCustomMetadataVector(t,e){t.startVector(4,e,4)}static endFooter(t){return t.endObject()}static finishFooterBuffer(t,e){t.finish(e)}static finishSizePrefixedFooterBuffer(t,e){t.finish(e,void 0,!0)}}class jG{constructor(t=[],e,n,i=NU.V5){this.fields=t||[],this.metadata=e||new Map,n||(n=ZG(this.fields)),this.dictionaries=n,this.metadataVersion=i}get[Symbol.toStringTag](){return"Schema"}get names(){return this.fields.map((t=>t.name))}toString(){return`Schema<{ ${this.fields.map(((t,e)=>`${e}: ${t}`)).join(", ")} }>`}select(t){const e=new Set(t),n=this.fields.filter((t=>e.has(t.name)))
14136
14162
  return new jG(n,this.metadata)}selectAt(t){const e=t.map((t=>this.fields[t])).filter(Boolean)
14137
14163
  return new jG(e,this.metadata)}assign(...t){const e=t[0]instanceof jG?t[0]:Array.isArray(t[0])?new jG(t[0]):new jG(t),n=[...this.fields],i=GG(GG(new Map,this.metadata),e.metadata),s=e.fields.filter((t=>{const e=n.findIndex((e=>e.name===t.name))
14138
14164
  return!~e||(n[e]=t.clone({metadata:GG(GG(new Map,n[e].metadata),t.metadata)}))&&!1})),o=ZG(s,new Map)
@@ -14426,9 +14452,8 @@ const s=new Array
14426
14452
  try{for(var o,a=!0,l=r(this);!(t=(o=yield l.next()).done);a=!0){i=o.value,a=!1
14427
14453
  const t=i
14428
14454
  s.push(t)}}catch(t){e={error:t}}finally{try{a||t||!(n=l.return)||(yield n.call(l))}finally{if(e)throw e.error}}return s}))}[Symbol.iterator](){throw new Error("AsyncRecordBatchStreamReader is not Iterable")}[Symbol.asyncIterator](){return this._impl[Symbol.asyncIterator]()}}class _K extends kK{constructor(t){super(t),this._impl=t}}class IK extends SK{constructor(t){super(t),this._impl=t}}class MK{get numDictionaries(){return this._dictionaryIndex}get numRecordBatches(){return this._recordBatchIndex}constructor(t=new Map){this.closed=!1,this.autoDestroy=!0,this._dictionaryIndex=0,this._recordBatchIndex=0,this.dictionaries=t}isSync(){return!1}isAsync(){return!1}isFile(){return!1}isStream(){return!1}reset(t){return this._dictionaryIndex=0,this._recordBatchIndex=0,this.schema=t,this.dictionaries=new Map,this}_loadRecordBatch(t,e){const n=this._loadVectors(t,e,this.schema.fields),i=wG({type:new Aj(this.schema.fields),length:t.length,children:n})
14429
- return new LZ(this.schema,i)}_loadDictionaryBatch(t,e){const{id:n,isDelta:i}=t,{dictionaries:s,schema:o}=this,r=s.get(n)
14430
- if(i||!r){const s=o.dictionaries.get(n),a=this._loadVectors(t.data,e,[s])
14431
- return(r&&i?r.concat(new zG(a)):new zG(a)).memoize()}return r.memoize()}_loadVectors(t,e,n){return new vZ(e,t.nodes,t.buffers,this.dictionaries,this.schema.metadataVersion).visitMany(n)}}class $K extends MK{constructor(t,e){super(e),this._reader=pU(t)?new fK(this._handle=t):new uK(this._handle=t)}isSync(){return!0}isStream(){return!0}[Symbol.iterator](){return this}cancel(){!this.closed&&(this.closed=!0)&&(this.reset()._reader.return(),this._reader=null,this.dictionaries=null)}open(t){return this.closed||(this.autoDestroy=OK(this,t),this.schema||(this.schema=this._reader.readSchema())||this.cancel()),this}throw(t){return!this.closed&&this.autoDestroy&&(this.closed=!0)?this.reset()._reader.throw(t):tZ}return(t){return!this.closed&&this.autoDestroy&&(this.closed=!0)?this.reset()._reader.return(t):tZ}next(){if(this.closed)return tZ
14455
+ return new LZ(this.schema,i)}_loadDictionaryBatch(t,e){const{id:n,isDelta:i}=t,{dictionaries:s,schema:o}=this,r=s.get(n),a=o.dictionaries.get(n),l=this._loadVectors(t.data,e,[a])
14456
+ return(r&&i?r.concat(new zG(l)):new zG(l)).memoize()}_loadVectors(t,e,n){return new vZ(e,t.nodes,t.buffers,this.dictionaries,this.schema.metadataVersion).visitMany(n)}}class $K extends MK{constructor(t,e){super(e),this._reader=pU(t)?new fK(this._handle=t):new uK(this._handle=t)}isSync(){return!0}isStream(){return!0}[Symbol.iterator](){return this}cancel(){!this.closed&&(this.closed=!0)&&(this.reset()._reader.return(),this._reader=null,this.dictionaries=null)}open(t){return this.closed||(this.autoDestroy=OK(this,t),this.schema||(this.schema=this._reader.readSchema())||this.cancel()),this}throw(t){return!this.closed&&this.autoDestroy&&(this.closed=!0)?this.reset()._reader.throw(t):tZ}return(t){return!this.closed&&this.autoDestroy&&(this.closed=!0)?this.reset()._reader.return(t):tZ}next(){if(this.closed)return tZ
14432
14457
  let t
14433
14458
  const{_reader:e}=this
14434
14459
  for(;t=this._readNextMessageAndValidate();)if(t.isSchema())this.reset(t.header())
@@ -14782,31 +14807,35 @@ case"RELEASE":c=void 0
14782
14807
  break
14783
14808
  default:return}}catch(t){c={value:t,[KY]:0}}Promise.resolve(c).catch((t=>({value:t,[KY]:0}))).then((n=>{const[s,a]=cX(n)
14784
14809
  e.postMessage(Object.assign(Object.assign({},s),{id:o}),a),"RELEASE"===r&&(e.removeEventListener("message",i),QY(e),ZY in t&&"function"==typeof t[ZY]&&t[ZY]())})).catch((t=>{const[n,i]=cX({value:new TypeError("Unserializable return value"),[KY]:0})
14785
- e.postMessage(Object.assign(Object.assign({},n),{id:o}),i)}))})),e.start&&e.start()}function QY(t){(function(t){return"MessagePort"===t.constructor.name})(t)&&t.close()}function tX(t,e){return oX(t,[],e)}function eX(t){if(t)throw new Error("Proxy has been released and is not useable")}function nX(t){return hX(t,{type:"RELEASE"}).then((()=>{QY(t)}))}const iX=new WeakMap,sX="FinalizationRegistry"in globalThis&&new FinalizationRegistry((t=>{const e=(iX.get(t)||0)-1
14810
+ e.postMessage(Object.assign(Object.assign({},n),{id:o}),i)}))})),e.start&&e.start()}function QY(t){(function(t){return"MessagePort"===t.constructor.name})(t)&&t.close()}function tX(t,e){const n=new Map
14811
+ return t.addEventListener("message",(function(t){const{data:e}=t
14812
+ if(!e||!e.id)return
14813
+ const i=n.get(e.id)
14814
+ if(i)try{i(e)}finally{n.delete(e.id)}})),oX(t,n,[],e)}function eX(t){if(t)throw new Error("Proxy has been released and is not useable")}function nX(t){return hX(t,new Map,{type:"RELEASE"}).then((()=>{QY(t)}))}const iX=new WeakMap,sX="FinalizationRegistry"in globalThis&&new FinalizationRegistry((t=>{const e=(iX.get(t)||0)-1
14786
14815
  iX.set(t,e),0===e&&nX(t)}))
14787
- function oX(t,e=[],n=function(){}){let i=!1
14788
- const s=new Proxy(n,{get(n,o){if(eX(i),o===GY)return()=>{!function(t){sX&&sX.unregister(t)}(s),nX(t),i=!0}
14789
- if("then"===o){if(0===e.length)return{then:()=>s}
14790
- const n=hX(t,{type:"GET",path:e.map((t=>t.toString()))}).then(dX)
14791
- return n.then.bind(n)}return oX(t,[...e,o])},set(n,s,o){eX(i)
14792
- const[r,a]=cX(o)
14793
- return hX(t,{type:"SET",path:[...e,s].map((t=>t.toString())),value:r},a).then(dX)},apply(n,s,o){eX(i)
14794
- const r=e[e.length-1]
14795
- if(r===WY)return hX(t,{type:"ENDPOINT"}).then(dX)
14796
- if("bind"===r)return oX(t,e.slice(0,-1))
14797
- const[a,l]=rX(o)
14798
- return hX(t,{type:"APPLY",path:e.map((t=>t.toString())),argumentList:a},l).then(dX)},construct(n,s){eX(i)
14799
- const[o,r]=rX(s)
14800
- return hX(t,{type:"CONSTRUCT",path:e.map((t=>t.toString())),argumentList:o},r).then(dX)}})
14816
+ function oX(t,e,n=[],i=function(){}){let s=!1
14817
+ const o=new Proxy(i,{get(i,r){if(eX(s),r===GY)return()=>{!function(t){sX&&sX.unregister(t)}(o),nX(t),e.clear(),s=!0}
14818
+ if("then"===r){if(0===n.length)return{then:()=>o}
14819
+ const i=hX(t,e,{type:"GET",path:n.map((t=>t.toString()))}).then(dX)
14820
+ return i.then.bind(i)}return oX(t,e,[...n,r])},set(i,o,r){eX(s)
14821
+ const[a,l]=cX(r)
14822
+ return hX(t,e,{type:"SET",path:[...n,o].map((t=>t.toString())),value:a},l).then(dX)},apply(i,o,r){eX(s)
14823
+ const a=n[n.length-1]
14824
+ if(a===WY)return hX(t,e,{type:"ENDPOINT"}).then(dX)
14825
+ if("bind"===a)return oX(t,e,n.slice(0,-1))
14826
+ const[l,c]=rX(r)
14827
+ return hX(t,e,{type:"APPLY",path:n.map((t=>t.toString())),argumentList:l},c).then(dX)},construct(i,o){eX(s)
14828
+ const[r,a]=rX(o)
14829
+ return hX(t,e,{type:"CONSTRUCT",path:n.map((t=>t.toString())),argumentList:r},a).then(dX)}})
14801
14830
  return function(t,e){const n=(iX.get(e)||0)+1
14802
- iX.set(e,n),sX&&sX.register(t,e,t)}(s,t),s}function rX(t){const e=t.map(cX)
14831
+ iX.set(e,n),sX&&sX.register(t,e,t)}(o,t),o}function rX(t){const e=t.map(cX)
14803
14832
  return[e.map((t=>t[0])),(n=e.map((t=>t[1])),Array.prototype.concat.apply([],n))]
14804
14833
  var n}const aX=new WeakMap
14805
14834
  function lX(t,e){return aX.set(t,e),t}function cX(t){for(const[e,n]of XY)if(n.canHandle(t)){const[i,s]=n.serialize(t)
14806
14835
  return[{type:"HANDLER",name:e,value:i},s]}return[{type:"RAW",value:t},aX.get(t)||[]]}function dX(t){switch(t.type){case"HANDLER":return XY.get(t.name).deserialize(t.value)
14807
- case"RAW":return t.value}}function hX(t,e,n){return new Promise((i=>{const s=new Array(4).fill(0).map((()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16))).join("-")
14808
- t.addEventListener("message",(function e(n){n.data&&n.data.id&&n.data.id===s&&(t.removeEventListener("message",e),i(n.data))})),t.start&&t.start(),t.postMessage(Object.assign({id:s},e),n)}))}let uX
14809
- class pX{constructor(t){this.wafermap=t,this.minDieDim=100}async setupWafer(t){if(void 0===this.matrixRenderer){const{matrixRenderer:t}=await(async()=>{if(void 0===uX){const t=new Blob(['var MatrixRenderer = (function (exports) {\n \'use strict\';\n\n /**\n * @license\n * Copyright 2019 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n const proxyMarker = Symbol("Comlink.proxy");\n const createEndpoint = Symbol("Comlink.endpoint");\n const releaseProxy = Symbol("Comlink.releaseProxy");\n const finalizer = Symbol("Comlink.finalizer");\n const throwMarker = Symbol("Comlink.thrown");\n const isObject = (val) => (typeof val === "object" && val !== null) || typeof val === "function";\n /**\n * Internal transfer handle to handle objects marked to proxy.\n */\n const proxyTransferHandler = {\n canHandle: (val) => isObject(val) && val[proxyMarker],\n serialize(obj) {\n const { port1, port2 } = new MessageChannel();\n expose(obj, port1);\n return [port2, [port2]];\n },\n deserialize(port) {\n port.start();\n return wrap(port);\n },\n };\n /**\n * Internal transfer handler to handle thrown exceptions.\n */\n const throwTransferHandler = {\n canHandle: (value) => isObject(value) && throwMarker in value,\n serialize({ value }) {\n let serialized;\n if (value instanceof Error) {\n serialized = {\n isError: true,\n value: {\n message: value.message,\n name: value.name,\n stack: value.stack,\n },\n };\n }\n else {\n serialized = { isError: false, value };\n }\n return [serialized, []];\n },\n deserialize(serialized) {\n if (serialized.isError) {\n throw Object.assign(new Error(serialized.value.message), serialized.value);\n }\n throw serialized.value;\n },\n };\n /**\n * Allows customizing the serialization of certain values.\n */\n const transferHandlers = new Map([\n ["proxy", proxyTransferHandler],\n ["throw", throwTransferHandler],\n ]);\n function isAllowedOrigin(allowedOrigins, origin) {\n for (const allowedOrigin of allowedOrigins) {\n if (origin === allowedOrigin || allowedOrigin === "*") {\n return true;\n }\n if (allowedOrigin instanceof RegExp && allowedOrigin.test(origin)) {\n return true;\n }\n }\n return false;\n }\n function expose(obj, ep = globalThis, allowedOrigins = ["*"]) {\n ep.addEventListener("message", function callback(ev) {\n if (!ev || !ev.data) {\n return;\n }\n if (!isAllowedOrigin(allowedOrigins, ev.origin)) {\n console.warn(`Invalid origin \'${ev.origin}\' for comlink proxy`);\n return;\n }\n const { id, type, path } = Object.assign({ path: [] }, ev.data);\n const argumentList = (ev.data.argumentList || []).map(fromWireValue);\n let returnValue;\n try {\n const parent = path.slice(0, -1).reduce((obj, prop) => obj[prop], obj);\n const rawValue = path.reduce((obj, prop) => obj[prop], obj);\n switch (type) {\n case "GET" /* MessageType.GET */:\n {\n returnValue = rawValue;\n }\n break;\n case "SET" /* MessageType.SET */:\n {\n parent[path.slice(-1)[0]] = fromWireValue(ev.data.value);\n returnValue = true;\n }\n break;\n case "APPLY" /* MessageType.APPLY */:\n {\n returnValue = rawValue.apply(parent, argumentList);\n }\n break;\n case "CONSTRUCT" /* MessageType.CONSTRUCT */:\n {\n const value = new rawValue(...argumentList);\n returnValue = proxy(value);\n }\n break;\n case "ENDPOINT" /* MessageType.ENDPOINT */:\n {\n const { port1, port2 } = new MessageChannel();\n expose(obj, port2);\n returnValue = transfer(port1, [port1]);\n }\n break;\n case "RELEASE" /* MessageType.RELEASE */:\n {\n returnValue = undefined;\n }\n break;\n default:\n return;\n }\n }\n catch (value) {\n returnValue = { value, [throwMarker]: 0 };\n }\n Promise.resolve(returnValue)\n .catch((value) => {\n return { value, [throwMarker]: 0 };\n })\n .then((returnValue) => {\n const [wireValue, transferables] = toWireValue(returnValue);\n ep.postMessage(Object.assign(Object.assign({}, wireValue), { id }), transferables);\n if (type === "RELEASE" /* MessageType.RELEASE */) {\n // detach and deactive after sending release response above.\n ep.removeEventListener("message", callback);\n closeEndPoint(ep);\n if (finalizer in obj && typeof obj[finalizer] === "function") {\n obj[finalizer]();\n }\n }\n })\n .catch((error) => {\n // Send Serialization Error To Caller\n const [wireValue, transferables] = toWireValue({\n value: new TypeError("Unserializable return value"),\n [throwMarker]: 0,\n });\n ep.postMessage(Object.assign(Object.assign({}, wireValue), { id }), transferables);\n });\n });\n if (ep.start) {\n ep.start();\n }\n }\n function isMessagePort(endpoint) {\n return endpoint.constructor.name === "MessagePort";\n }\n function closeEndPoint(endpoint) {\n if (isMessagePort(endpoint))\n endpoint.close();\n }\n function wrap(ep, target) {\n return createProxy(ep, [], target);\n }\n function throwIfProxyReleased(isReleased) {\n if (isReleased) {\n throw new Error("Proxy has been released and is not useable");\n }\n }\n function releaseEndpoint(ep) {\n return requestResponseMessage(ep, {\n type: "RELEASE" /* MessageType.RELEASE */,\n }).then(() => {\n closeEndPoint(ep);\n });\n }\n const proxyCounter = new WeakMap();\n const proxyFinalizers = "FinalizationRegistry" in globalThis &&\n new FinalizationRegistry((ep) => {\n const newCount = (proxyCounter.get(ep) || 0) - 1;\n proxyCounter.set(ep, newCount);\n if (newCount === 0) {\n releaseEndpoint(ep);\n }\n });\n function registerProxy(proxy, ep) {\n const newCount = (proxyCounter.get(ep) || 0) + 1;\n proxyCounter.set(ep, newCount);\n if (proxyFinalizers) {\n proxyFinalizers.register(proxy, ep, proxy);\n }\n }\n function unregisterProxy(proxy) {\n if (proxyFinalizers) {\n proxyFinalizers.unregister(proxy);\n }\n }\n function createProxy(ep, path = [], target = function () { }) {\n let isProxyReleased = false;\n const proxy = new Proxy(target, {\n get(_target, prop) {\n throwIfProxyReleased(isProxyReleased);\n if (prop === releaseProxy) {\n return () => {\n unregisterProxy(proxy);\n releaseEndpoint(ep);\n isProxyReleased = true;\n };\n }\n if (prop === "then") {\n if (path.length === 0) {\n return { then: () => proxy };\n }\n const r = requestResponseMessage(ep, {\n type: "GET" /* MessageType.GET */,\n path: path.map((p) => p.toString()),\n }).then(fromWireValue);\n return r.then.bind(r);\n }\n return createProxy(ep, [...path, prop]);\n },\n set(_target, prop, rawValue) {\n throwIfProxyReleased(isProxyReleased);\n // FIXME: ES6 Proxy Handler `set` methods are supposed to return a\n // boolean. To show good will, we return true asynchronously ¯\\_(ツ)_/¯\n const [value, transferables] = toWireValue(rawValue);\n return requestResponseMessage(ep, {\n type: "SET" /* MessageType.SET */,\n path: [...path, prop].map((p) => p.toString()),\n value,\n }, transferables).then(fromWireValue);\n },\n apply(_target, _thisArg, rawArgumentList) {\n throwIfProxyReleased(isProxyReleased);\n const last = path[path.length - 1];\n if (last === createEndpoint) {\n return requestResponseMessage(ep, {\n type: "ENDPOINT" /* MessageType.ENDPOINT */,\n }).then(fromWireValue);\n }\n // We just pretend that `bind()` didn’t happen.\n if (last === "bind") {\n return createProxy(ep, path.slice(0, -1));\n }\n const [argumentList, transferables] = processArguments(rawArgumentList);\n return requestResponseMessage(ep, {\n type: "APPLY" /* MessageType.APPLY */,\n path: path.map((p) => p.toString()),\n argumentList,\n }, transferables).then(fromWireValue);\n },\n construct(_target, rawArgumentList) {\n throwIfProxyReleased(isProxyReleased);\n const [argumentList, transferables] = processArguments(rawArgumentList);\n return requestResponseMessage(ep, {\n type: "CONSTRUCT" /* MessageType.CONSTRUCT */,\n path: path.map((p) => p.toString()),\n argumentList,\n }, transferables).then(fromWireValue);\n },\n });\n registerProxy(proxy, ep);\n return proxy;\n }\n function myFlat(arr) {\n return Array.prototype.concat.apply([], arr);\n }\n function processArguments(argumentList) {\n const processed = argumentList.map(toWireValue);\n return [processed.map((v) => v[0]), myFlat(processed.map((v) => v[1]))];\n }\n const transferCache = new WeakMap();\n function transfer(obj, transfers) {\n transferCache.set(obj, transfers);\n return obj;\n }\n function proxy(obj) {\n return Object.assign(obj, { [proxyMarker]: true });\n }\n function toWireValue(value) {\n for (const [name, handler] of transferHandlers) {\n if (handler.canHandle(value)) {\n const [serializedValue, transferables] = handler.serialize(value);\n return [\n {\n type: "HANDLER" /* WireValueType.HANDLER */,\n name,\n value: serializedValue,\n },\n transferables,\n ];\n }\n }\n return [\n {\n type: "RAW" /* WireValueType.RAW */,\n value,\n },\n transferCache.get(value) || [],\n ];\n }\n function fromWireValue(value) {\n switch (value.type) {\n case "HANDLER" /* WireValueType.HANDLER */:\n return transferHandlers.get(value.name).deserialize(value.value);\n case "RAW" /* WireValueType.RAW */:\n return value.value;\n }\n }\n function requestResponseMessage(ep, msg, transfers) {\n return new Promise((resolve) => {\n const id = generateUUID();\n ep.addEventListener("message", function l(ev) {\n if (!ev.data || !ev.data.id || ev.data.id !== id) {\n return;\n }\n ep.removeEventListener("message", l);\n resolve(ev.data);\n });\n if (ep.start) {\n ep.start();\n }\n ep.postMessage(Object.assign({ id }, msg), transfers);\n });\n }\n function generateUUID() {\n return new Array(4)\n .fill(0)\n .map(() => Math.floor(Math.random() * Number.MAX_SAFE_INTEGER).toString(16))\n .join("-");\n }\n\n /**\n * MatrixRenderer class is meant to be used within a Web Worker context,\n * using Comlink to facilitate communication between the main thread and the worker.\n * The MatrixRenderer class manages a matrix of dies, once an instance of MatrixRenderer is created,\n * it is exposed to the main thread using Comlink\'s `expose` method.\n * This setup is used in the wafer-map component to perform heavy computational duties\n */\n class MatrixRenderer {\n constructor() {\n this.values = Float64Array.from([]);\n this.scaledColumnIndices = Float64Array.from([]);\n this.scaledRowIndices = Float64Array.from([]);\n this.columnIndicesPositions = Int32Array.from([]);\n this.colorIndices = Int32Array.from([]);\n this.colors = [];\n this.colorValues = Float64Array.from([]);\n this.outsideRangeDieColor = \'rgba(218,223,236,1)\';\n this.fontSizeFactor = 0.8;\n this.renderConfig = {\n dieDimensions: {\n width: 0,\n height: 0\n },\n margin: {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0\n },\n verticalCoefficient: 1,\n horizontalCoefficient: 1,\n horizontalConstant: 0,\n verticalConstant: 0,\n gridMinX: 0,\n gridMaxX: 0,\n gridMinY: 0,\n gridMaxY: 0,\n labelsFontSize: 0,\n colorScale: [],\n dieLabelsSuffix: \'\',\n maxCharacters: 0\n };\n this.transformConfig = {\n transform: {\n k: 1,\n x: 0,\n y: 0\n },\n topLeftCanvasCorner: {\n x: 0,\n y: 0\n },\n bottomRightCanvasCorner: {\n x: 0,\n y: 0\n }\n };\n }\n setMatrixData(columnIndices, rowIndices, valuesBuffer) {\n const scaledColumnIndex = [];\n const columnPositions = [];\n const scaledRowIndices = [];\n const values = [];\n const colorIndices = [];\n let prevXIndex;\n let dieCount = 0;\n for (let i = 0; i < columnIndices.length; i++) {\n const xIndex = columnIndices[i];\n const yIndex = rowIndices[i];\n if (this.isDieInGrid(xIndex, yIndex)) {\n if (xIndex !== prevXIndex) {\n scaledColumnIndex.push(this.calculateHorizontalScaledIndices(xIndex));\n columnPositions.push(dieCount);\n prevXIndex = xIndex;\n }\n scaledRowIndices.push(this.calculateVerticalScaledIndices(yIndex));\n const value = valuesBuffer[i];\n values.push(value);\n colorIndices.push(this.findColorIndex(value));\n dieCount += 1;\n }\n }\n this.scaledColumnIndices = Float64Array.from(scaledColumnIndex);\n this.columnIndicesPositions = Int32Array.from(columnPositions);\n this.scaledRowIndices = Float64Array.from(scaledRowIndices);\n this.values = Float64Array.from(values);\n this.colorIndices = Int32Array.from(colorIndices);\n }\n setRenderConfig(renderConfig) {\n this.renderConfig = renderConfig;\n this.colors = renderConfig.colorScale.map(marker => marker.color);\n this.colorValues = Float64Array.from(renderConfig.colorScale.map(marker => marker.value));\n }\n setTransformConfig(transformData) {\n this.transformConfig = transformData;\n }\n setCanvas(canvas) {\n this.canvas = canvas;\n this.context = canvas.getContext(\'2d\');\n }\n scaleCanvas() {\n this.context.translate(this.transformConfig.transform.x, this.transformConfig.transform.y);\n this.context.scale(this.transformConfig.transform.k, this.transformConfig.transform.k);\n }\n setCanvasDimensions(data) {\n this.canvas.width = data.width;\n this.canvas.height = data.height;\n }\n getCanvasDimensions() {\n return {\n width: this.canvas.width,\n height: this.canvas.height\n };\n }\n clearCanvas() {\n this.context.clearRect(0, 0, this.canvas.width, this.canvas.height);\n }\n drawWafer() {\n this.context.restore();\n this.context.save();\n this.clearCanvas();\n this.scaleCanvas();\n for (let i = 0; i < this.scaledColumnIndices.length; i++) {\n const scaledX = this.scaledColumnIndices[i];\n if (!(scaledX >= this.transformConfig.topLeftCanvasCorner.x\n && scaledX < this.transformConfig.bottomRightCanvasCorner.x)) {\n continue;\n }\n // columnIndexPositions is used to get chunks to determine the start and end index of the column, it looks something like [0, 1, 4, 9, 12]\n // This means that the first column has a start index of 0 and an end index of 1, the second column has a start index of 1 and an end index of 4, and so on\n // scaledRowIndices is used when we reach the end of the columnIndexPositions, when columnIndexPositions is [0, 1, 4, 9, 12], scaledRowIndices is 13\n const columnEndIndex = this.columnIndicesPositions[i + 1] !== undefined\n ? this.columnIndicesPositions[i + 1]\n : this.scaledRowIndices.length;\n for (let columnStartIndex = this.columnIndicesPositions[i]; columnStartIndex < columnEndIndex; columnStartIndex++) {\n const scaledY = this.scaledRowIndices[columnStartIndex];\n if (!(scaledY >= this.transformConfig.topLeftCanvasCorner.y\n && scaledY < this.transformConfig.bottomRightCanvasCorner.y)) {\n continue;\n }\n // Fill style is temporary green for all dies, will be replaced with a color based on the value of the die in a future implementation\n this.context.fillStyle = this.colors[this.colorIndices[columnStartIndex]]\n ?? this.outsideRangeDieColor;\n this.context.fillRect(scaledX, scaledY, this.renderConfig.dieDimensions.width, this.renderConfig.dieDimensions.height);\n }\n }\n }\n drawText() {\n this.context.font = `${this.renderConfig.labelsFontSize.toString()}px sans-serif`;\n this.context.fillStyle = \'#ffffff\';\n this.context.textAlign = \'center\';\n this.context.lineCap = \'butt\';\n const approximateTextHeight = this.context.measureText(\'M\');\n for (let i = 0; i < this.scaledColumnIndices.length; i++) {\n const scaledX = this.scaledColumnIndices[i];\n if (!(scaledX >= this.transformConfig.topLeftCanvasCorner.x\n && scaledX < this.transformConfig.bottomRightCanvasCorner.x)) {\n continue;\n }\n // columnIndexPositions is used to get chunks to determine the start and end index of the column, it looks something like [0, 1, 4, 9, 12]\n // This means that the first column has a start index of 0 and an end index of 1, the second column has a start index of 1 and an end index of 4, and so on\n // scaledRowIndices is used when we reach the end of the columnIndexPositions, when columnIndexPositions is [0, 1, 4, 9, 12], scaledRowIndices is 13\n const columnEndIndex = this.columnIndicesPositions[i + 1] !== undefined\n ? this.columnIndicesPositions[i + 1]\n : this.scaledRowIndices.length;\n for (let columnStartIndex = this.columnIndicesPositions[i]; columnStartIndex < columnEndIndex; columnStartIndex++) {\n const scaledY = this.scaledRowIndices[columnStartIndex];\n if (!(scaledY >= this.transformConfig.topLeftCanvasCorner.y\n && scaledY < this.transformConfig.bottomRightCanvasCorner.y)) {\n continue;\n }\n let label = `${this.values[columnStartIndex] || \'NaN\'}${this.renderConfig.dieLabelsSuffix}`;\n if (label.length >= this.renderConfig.maxCharacters) {\n label = `${label.substring(0, this.renderConfig.maxCharacters)}…`;\n }\n this.context.fillText(label, scaledX + this.renderConfig.dieDimensions.width / 2, scaledY\n + this.renderConfig.dieDimensions.height / 2\n + approximateTextHeight.width / 2, this.renderConfig.dieDimensions.width * this.fontSizeFactor);\n }\n }\n }\n isDieInGrid(x, y) {\n return (x >= this.renderConfig.gridMinX\n && x <= this.renderConfig.gridMaxX\n && y >= this.renderConfig.gridMinY\n && y <= this.renderConfig.gridMaxY);\n }\n calculateHorizontalScaledIndices(columnIndex) {\n return (this.renderConfig.horizontalCoefficient * columnIndex\n + this.renderConfig.horizontalConstant\n + this.renderConfig.margin.left);\n }\n calculateVerticalScaledIndices(rowIndex) {\n return (this.renderConfig.verticalCoefficient * rowIndex\n + this.renderConfig.verticalConstant\n + this.renderConfig.margin.top);\n }\n findColorIndex(value) {\n let index = -1;\n if (this.colorValues.length === 0 || this.colorValues[0] >= value) {\n return index;\n }\n for (let i = 0; i < this.colorValues.length; i++) {\n if (value <= this.colorValues[i]) {\n index = i;\n break;\n }\n }\n return index;\n }\n }\n expose(MatrixRenderer);\n\n exports.MatrixRenderer = MatrixRenderer;\n\n return exports;\n\n})({});\n'],{type:"text/javascript"})
14836
+ case"RAW":return t.value}}function hX(t,e,n,i){return new Promise((s=>{const o=new Array(4).fill(0).map((()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16))).join("-")
14837
+ e.set(o,s),t.start&&t.start(),t.postMessage(Object.assign({id:o},n),i)}))}let uX
14838
+ class pX{constructor(t){this.wafermap=t,this.minDieDim=100}async setupWafer(t){if(void 0===this.matrixRenderer){const{matrixRenderer:t}=await(async()=>{if(void 0===uX){const t=new Blob(['var MatrixRenderer = (function (exports) {\n \'use strict\';\n\n /**\n * @license\n * Copyright 2019 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n const proxyMarker = Symbol("Comlink.proxy");\n const createEndpoint = Symbol("Comlink.endpoint");\n const releaseProxy = Symbol("Comlink.releaseProxy");\n const finalizer = Symbol("Comlink.finalizer");\n const throwMarker = Symbol("Comlink.thrown");\n const isObject = (val) => (typeof val === "object" && val !== null) || typeof val === "function";\n /**\n * Internal transfer handle to handle objects marked to proxy.\n */\n const proxyTransferHandler = {\n canHandle: (val) => isObject(val) && val[proxyMarker],\n serialize(obj) {\n const { port1, port2 } = new MessageChannel();\n expose(obj, port1);\n return [port2, [port2]];\n },\n deserialize(port) {\n port.start();\n return wrap(port);\n },\n };\n /**\n * Internal transfer handler to handle thrown exceptions.\n */\n const throwTransferHandler = {\n canHandle: (value) => isObject(value) && throwMarker in value,\n serialize({ value }) {\n let serialized;\n if (value instanceof Error) {\n serialized = {\n isError: true,\n value: {\n message: value.message,\n name: value.name,\n stack: value.stack,\n },\n };\n }\n else {\n serialized = { isError: false, value };\n }\n return [serialized, []];\n },\n deserialize(serialized) {\n if (serialized.isError) {\n throw Object.assign(new Error(serialized.value.message), serialized.value);\n }\n throw serialized.value;\n },\n };\n /**\n * Allows customizing the serialization of certain values.\n */\n const transferHandlers = new Map([\n ["proxy", proxyTransferHandler],\n ["throw", throwTransferHandler],\n ]);\n function isAllowedOrigin(allowedOrigins, origin) {\n for (const allowedOrigin of allowedOrigins) {\n if (origin === allowedOrigin || allowedOrigin === "*") {\n return true;\n }\n if (allowedOrigin instanceof RegExp && allowedOrigin.test(origin)) {\n return true;\n }\n }\n return false;\n }\n function expose(obj, ep = globalThis, allowedOrigins = ["*"]) {\n ep.addEventListener("message", function callback(ev) {\n if (!ev || !ev.data) {\n return;\n }\n if (!isAllowedOrigin(allowedOrigins, ev.origin)) {\n console.warn(`Invalid origin \'${ev.origin}\' for comlink proxy`);\n return;\n }\n const { id, type, path } = Object.assign({ path: [] }, ev.data);\n const argumentList = (ev.data.argumentList || []).map(fromWireValue);\n let returnValue;\n try {\n const parent = path.slice(0, -1).reduce((obj, prop) => obj[prop], obj);\n const rawValue = path.reduce((obj, prop) => obj[prop], obj);\n switch (type) {\n case "GET" /* MessageType.GET */:\n {\n returnValue = rawValue;\n }\n break;\n case "SET" /* MessageType.SET */:\n {\n parent[path.slice(-1)[0]] = fromWireValue(ev.data.value);\n returnValue = true;\n }\n break;\n case "APPLY" /* MessageType.APPLY */:\n {\n returnValue = rawValue.apply(parent, argumentList);\n }\n break;\n case "CONSTRUCT" /* MessageType.CONSTRUCT */:\n {\n const value = new rawValue(...argumentList);\n returnValue = proxy(value);\n }\n break;\n case "ENDPOINT" /* MessageType.ENDPOINT */:\n {\n const { port1, port2 } = new MessageChannel();\n expose(obj, port2);\n returnValue = transfer(port1, [port1]);\n }\n break;\n case "RELEASE" /* MessageType.RELEASE */:\n {\n returnValue = undefined;\n }\n break;\n default:\n return;\n }\n }\n catch (value) {\n returnValue = { value, [throwMarker]: 0 };\n }\n Promise.resolve(returnValue)\n .catch((value) => {\n return { value, [throwMarker]: 0 };\n })\n .then((returnValue) => {\n const [wireValue, transferables] = toWireValue(returnValue);\n ep.postMessage(Object.assign(Object.assign({}, wireValue), { id }), transferables);\n if (type === "RELEASE" /* MessageType.RELEASE */) {\n // detach and deactive after sending release response above.\n ep.removeEventListener("message", callback);\n closeEndPoint(ep);\n if (finalizer in obj && typeof obj[finalizer] === "function") {\n obj[finalizer]();\n }\n }\n })\n .catch((error) => {\n // Send Serialization Error To Caller\n const [wireValue, transferables] = toWireValue({\n value: new TypeError("Unserializable return value"),\n [throwMarker]: 0,\n });\n ep.postMessage(Object.assign(Object.assign({}, wireValue), { id }), transferables);\n });\n });\n if (ep.start) {\n ep.start();\n }\n }\n function isMessagePort(endpoint) {\n return endpoint.constructor.name === "MessagePort";\n }\n function closeEndPoint(endpoint) {\n if (isMessagePort(endpoint))\n endpoint.close();\n }\n function wrap(ep, target) {\n const pendingListeners = new Map();\n ep.addEventListener("message", function handleMessage(ev) {\n const { data } = ev;\n if (!data || !data.id) {\n return;\n }\n const resolver = pendingListeners.get(data.id);\n if (!resolver) {\n return;\n }\n try {\n resolver(data);\n }\n finally {\n pendingListeners.delete(data.id);\n }\n });\n return createProxy(ep, pendingListeners, [], target);\n }\n function throwIfProxyReleased(isReleased) {\n if (isReleased) {\n throw new Error("Proxy has been released and is not useable");\n }\n }\n function releaseEndpoint(ep) {\n return requestResponseMessage(ep, new Map(), {\n type: "RELEASE" /* MessageType.RELEASE */,\n }).then(() => {\n closeEndPoint(ep);\n });\n }\n const proxyCounter = new WeakMap();\n const proxyFinalizers = "FinalizationRegistry" in globalThis &&\n new FinalizationRegistry((ep) => {\n const newCount = (proxyCounter.get(ep) || 0) - 1;\n proxyCounter.set(ep, newCount);\n if (newCount === 0) {\n releaseEndpoint(ep);\n }\n });\n function registerProxy(proxy, ep) {\n const newCount = (proxyCounter.get(ep) || 0) + 1;\n proxyCounter.set(ep, newCount);\n if (proxyFinalizers) {\n proxyFinalizers.register(proxy, ep, proxy);\n }\n }\n function unregisterProxy(proxy) {\n if (proxyFinalizers) {\n proxyFinalizers.unregister(proxy);\n }\n }\n function createProxy(ep, pendingListeners, path = [], target = function () { }) {\n let isProxyReleased = false;\n const proxy = new Proxy(target, {\n get(_target, prop) {\n throwIfProxyReleased(isProxyReleased);\n if (prop === releaseProxy) {\n return () => {\n unregisterProxy(proxy);\n releaseEndpoint(ep);\n pendingListeners.clear();\n isProxyReleased = true;\n };\n }\n if (prop === "then") {\n if (path.length === 0) {\n return { then: () => proxy };\n }\n const r = requestResponseMessage(ep, pendingListeners, {\n type: "GET" /* MessageType.GET */,\n path: path.map((p) => p.toString()),\n }).then(fromWireValue);\n return r.then.bind(r);\n }\n return createProxy(ep, pendingListeners, [...path, prop]);\n },\n set(_target, prop, rawValue) {\n throwIfProxyReleased(isProxyReleased);\n // FIXME: ES6 Proxy Handler `set` methods are supposed to return a\n // boolean. To show good will, we return true asynchronously ¯\\_(ツ)_/¯\n const [value, transferables] = toWireValue(rawValue);\n return requestResponseMessage(ep, pendingListeners, {\n type: "SET" /* MessageType.SET */,\n path: [...path, prop].map((p) => p.toString()),\n value,\n }, transferables).then(fromWireValue);\n },\n apply(_target, _thisArg, rawArgumentList) {\n throwIfProxyReleased(isProxyReleased);\n const last = path[path.length - 1];\n if (last === createEndpoint) {\n return requestResponseMessage(ep, pendingListeners, {\n type: "ENDPOINT" /* MessageType.ENDPOINT */,\n }).then(fromWireValue);\n }\n // We just pretend that `bind()` didn’t happen.\n if (last === "bind") {\n return createProxy(ep, pendingListeners, path.slice(0, -1));\n }\n const [argumentList, transferables] = processArguments(rawArgumentList);\n return requestResponseMessage(ep, pendingListeners, {\n type: "APPLY" /* MessageType.APPLY */,\n path: path.map((p) => p.toString()),\n argumentList,\n }, transferables).then(fromWireValue);\n },\n construct(_target, rawArgumentList) {\n throwIfProxyReleased(isProxyReleased);\n const [argumentList, transferables] = processArguments(rawArgumentList);\n return requestResponseMessage(ep, pendingListeners, {\n type: "CONSTRUCT" /* MessageType.CONSTRUCT */,\n path: path.map((p) => p.toString()),\n argumentList,\n }, transferables).then(fromWireValue);\n },\n });\n registerProxy(proxy, ep);\n return proxy;\n }\n function myFlat(arr) {\n return Array.prototype.concat.apply([], arr);\n }\n function processArguments(argumentList) {\n const processed = argumentList.map(toWireValue);\n return [processed.map((v) => v[0]), myFlat(processed.map((v) => v[1]))];\n }\n const transferCache = new WeakMap();\n function transfer(obj, transfers) {\n transferCache.set(obj, transfers);\n return obj;\n }\n function proxy(obj) {\n return Object.assign(obj, { [proxyMarker]: true });\n }\n function toWireValue(value) {\n for (const [name, handler] of transferHandlers) {\n if (handler.canHandle(value)) {\n const [serializedValue, transferables] = handler.serialize(value);\n return [\n {\n type: "HANDLER" /* WireValueType.HANDLER */,\n name,\n value: serializedValue,\n },\n transferables,\n ];\n }\n }\n return [\n {\n type: "RAW" /* WireValueType.RAW */,\n value,\n },\n transferCache.get(value) || [],\n ];\n }\n function fromWireValue(value) {\n switch (value.type) {\n case "HANDLER" /* WireValueType.HANDLER */:\n return transferHandlers.get(value.name).deserialize(value.value);\n case "RAW" /* WireValueType.RAW */:\n return value.value;\n }\n }\n function requestResponseMessage(ep, pendingListeners, msg, transfers) {\n return new Promise((resolve) => {\n const id = generateUUID();\n pendingListeners.set(id, resolve);\n if (ep.start) {\n ep.start();\n }\n ep.postMessage(Object.assign({ id }, msg), transfers);\n });\n }\n function generateUUID() {\n return new Array(4)\n .fill(0)\n .map(() => Math.floor(Math.random() * Number.MAX_SAFE_INTEGER).toString(16))\n .join("-");\n }\n\n /**\n * MatrixRenderer class is meant to be used within a Web Worker context,\n * using Comlink to facilitate communication between the main thread and the worker.\n * The MatrixRenderer class manages a matrix of dies, once an instance of MatrixRenderer is created,\n * it is exposed to the main thread using Comlink\'s `expose` method.\n * This setup is used in the wafer-map component to perform heavy computational duties\n */\n class MatrixRenderer {\n constructor() {\n this.values = Float64Array.from([]);\n this.scaledColumnIndices = Float64Array.from([]);\n this.scaledRowIndices = Float64Array.from([]);\n this.columnIndicesPositions = Int32Array.from([]);\n this.colorIndices = Int32Array.from([]);\n this.colors = [];\n this.colorValues = Float64Array.from([]);\n this.outsideRangeDieColor = \'rgba(218,223,236,1)\';\n this.fontSizeFactor = 0.8;\n this.renderConfig = {\n dieDimensions: {\n width: 0,\n height: 0\n },\n margin: {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0\n },\n verticalCoefficient: 1,\n horizontalCoefficient: 1,\n horizontalConstant: 0,\n verticalConstant: 0,\n gridMinX: 0,\n gridMaxX: 0,\n gridMinY: 0,\n gridMaxY: 0,\n labelsFontSize: 0,\n colorScale: [],\n dieLabelsSuffix: \'\',\n maxCharacters: 0\n };\n this.transformConfig = {\n transform: {\n k: 1,\n x: 0,\n y: 0\n },\n topLeftCanvasCorner: {\n x: 0,\n y: 0\n },\n bottomRightCanvasCorner: {\n x: 0,\n y: 0\n }\n };\n }\n setMatrixData(columnIndices, rowIndices, valuesBuffer) {\n const scaledColumnIndex = [];\n const columnPositions = [];\n const scaledRowIndices = [];\n const values = [];\n const colorIndices = [];\n let prevXIndex;\n let dieCount = 0;\n for (let i = 0; i < columnIndices.length; i++) {\n const xIndex = columnIndices[i];\n const yIndex = rowIndices[i];\n if (this.isDieInGrid(xIndex, yIndex)) {\n if (xIndex !== prevXIndex) {\n scaledColumnIndex.push(this.calculateHorizontalScaledIndices(xIndex));\n columnPositions.push(dieCount);\n prevXIndex = xIndex;\n }\n scaledRowIndices.push(this.calculateVerticalScaledIndices(yIndex));\n const value = valuesBuffer[i];\n values.push(value);\n colorIndices.push(this.findColorIndex(value));\n dieCount += 1;\n }\n }\n this.scaledColumnIndices = Float64Array.from(scaledColumnIndex);\n this.columnIndicesPositions = Int32Array.from(columnPositions);\n this.scaledRowIndices = Float64Array.from(scaledRowIndices);\n this.values = Float64Array.from(values);\n this.colorIndices = Int32Array.from(colorIndices);\n }\n setRenderConfig(renderConfig) {\n this.renderConfig = renderConfig;\n this.colors = renderConfig.colorScale.map(marker => marker.color);\n this.colorValues = Float64Array.from(renderConfig.colorScale.map(marker => marker.value));\n }\n setTransformConfig(transformData) {\n this.transformConfig = transformData;\n }\n setCanvas(canvas) {\n this.canvas = canvas;\n this.context = canvas.getContext(\'2d\');\n }\n scaleCanvas() {\n this.context.translate(this.transformConfig.transform.x, this.transformConfig.transform.y);\n this.context.scale(this.transformConfig.transform.k, this.transformConfig.transform.k);\n }\n setCanvasDimensions(data) {\n this.canvas.width = data.width;\n this.canvas.height = data.height;\n }\n getCanvasDimensions() {\n return {\n width: this.canvas.width,\n height: this.canvas.height\n };\n }\n clearCanvas() {\n this.context.clearRect(0, 0, this.canvas.width, this.canvas.height);\n }\n drawWafer() {\n this.context.restore();\n this.context.save();\n this.clearCanvas();\n this.scaleCanvas();\n for (let i = 0; i < this.scaledColumnIndices.length; i++) {\n const scaledX = this.scaledColumnIndices[i];\n if (!(scaledX >= this.transformConfig.topLeftCanvasCorner.x\n && scaledX < this.transformConfig.bottomRightCanvasCorner.x)) {\n continue;\n }\n // columnIndexPositions is used to get chunks to determine the start and end index of the column, it looks something like [0, 1, 4, 9, 12]\n // This means that the first column has a start index of 0 and an end index of 1, the second column has a start index of 1 and an end index of 4, and so on\n // scaledRowIndices is used when we reach the end of the columnIndexPositions, when columnIndexPositions is [0, 1, 4, 9, 12], scaledRowIndices is 13\n const columnEndIndex = this.columnIndicesPositions[i + 1] !== undefined\n ? this.columnIndicesPositions[i + 1]\n : this.scaledRowIndices.length;\n for (let columnStartIndex = this.columnIndicesPositions[i]; columnStartIndex < columnEndIndex; columnStartIndex++) {\n const scaledY = this.scaledRowIndices[columnStartIndex];\n if (!(scaledY >= this.transformConfig.topLeftCanvasCorner.y\n && scaledY < this.transformConfig.bottomRightCanvasCorner.y)) {\n continue;\n }\n // Fill style is temporary green for all dies, will be replaced with a color based on the value of the die in a future implementation\n this.context.fillStyle = this.colors[this.colorIndices[columnStartIndex]]\n ?? this.outsideRangeDieColor;\n this.context.fillRect(scaledX, scaledY, this.renderConfig.dieDimensions.width, this.renderConfig.dieDimensions.height);\n }\n }\n }\n drawText() {\n this.context.font = `${this.renderConfig.labelsFontSize.toString()}px sans-serif`;\n this.context.fillStyle = \'#ffffff\';\n this.context.textAlign = \'center\';\n this.context.lineCap = \'butt\';\n const approximateTextHeight = this.context.measureText(\'M\');\n for (let i = 0; i < this.scaledColumnIndices.length; i++) {\n const scaledX = this.scaledColumnIndices[i];\n if (!(scaledX >= this.transformConfig.topLeftCanvasCorner.x\n && scaledX < this.transformConfig.bottomRightCanvasCorner.x)) {\n continue;\n }\n // columnIndexPositions is used to get chunks to determine the start and end index of the column, it looks something like [0, 1, 4, 9, 12]\n // This means that the first column has a start index of 0 and an end index of 1, the second column has a start index of 1 and an end index of 4, and so on\n // scaledRowIndices is used when we reach the end of the columnIndexPositions, when columnIndexPositions is [0, 1, 4, 9, 12], scaledRowIndices is 13\n const columnEndIndex = this.columnIndicesPositions[i + 1] !== undefined\n ? this.columnIndicesPositions[i + 1]\n : this.scaledRowIndices.length;\n for (let columnStartIndex = this.columnIndicesPositions[i]; columnStartIndex < columnEndIndex; columnStartIndex++) {\n const scaledY = this.scaledRowIndices[columnStartIndex];\n if (!(scaledY >= this.transformConfig.topLeftCanvasCorner.y\n && scaledY < this.transformConfig.bottomRightCanvasCorner.y)) {\n continue;\n }\n let label = `${this.values[columnStartIndex] || \'NaN\'}${this.renderConfig.dieLabelsSuffix}`;\n if (label.length >= this.renderConfig.maxCharacters) {\n label = `${label.substring(0, this.renderConfig.maxCharacters)}…`;\n }\n this.context.fillText(label, scaledX + this.renderConfig.dieDimensions.width / 2, scaledY\n + this.renderConfig.dieDimensions.height / 2\n + approximateTextHeight.width / 2, this.renderConfig.dieDimensions.width * this.fontSizeFactor);\n }\n }\n }\n isDieInGrid(x, y) {\n return (x >= this.renderConfig.gridMinX\n && x <= this.renderConfig.gridMaxX\n && y >= this.renderConfig.gridMinY\n && y <= this.renderConfig.gridMaxY);\n }\n calculateHorizontalScaledIndices(columnIndex) {\n return (this.renderConfig.horizontalCoefficient * columnIndex\n + this.renderConfig.horizontalConstant\n + this.renderConfig.margin.left);\n }\n calculateVerticalScaledIndices(rowIndex) {\n return (this.renderConfig.verticalCoefficient * rowIndex\n + this.renderConfig.verticalConstant\n + this.renderConfig.margin.top);\n }\n findColorIndex(value) {\n let index = -1;\n if (this.colorValues.length === 0 || this.colorValues[0] >= value) {\n return index;\n }\n for (let i = 0; i < this.colorValues.length; i++) {\n if (value <= this.colorValues[i]) {\n index = i;\n break;\n }\n }\n return index;\n }\n }\n expose(MatrixRenderer);\n\n exports.MatrixRenderer = MatrixRenderer;\n\n return exports;\n\n})({});\n'],{type:"text/javascript"})
14810
14839
  uX=URL.createObjectURL(t)}const t=new Worker(uX),e=tX(t)
14811
14840
  return{matrixRenderer:await new e,terminate:()=>t.terminate()}})()
14812
14841
  this.matrixRenderer=t