@ni/nimble-components 34.10.2 → 35.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. package/dist/all-components-bundle.js +80 -73
  2. package/dist/all-components-bundle.js.map +1 -1
  3. package/dist/all-components-bundle.min.js +10 -11
  4. package/dist/all-components-bundle.min.js.map +1 -1
  5. package/dist/esm/table-column/number-text/index.d.ts +1 -1
  6. package/dist/esm/table-column/number-text/index.js +2 -2
  7. package/dist/esm/table-column/number-text/index.js.map +1 -1
  8. package/dist/esm/table-column/number-text/models/{number-text-unit-format.d.ts → unit-format-number-text.d.ts} +7 -7
  9. package/dist/esm/table-column/number-text/models/{number-text-unit-format.js → unit-format-number-text.js} +14 -14
  10. package/dist/esm/table-column/number-text/models/unit-format-number-text.js.map +1 -0
  11. package/dist/esm/unit/base/unit.d.ts +1 -1
  12. package/dist/esm/unit/base/unit.js.map +1 -1
  13. package/dist/esm/unit/byte/index.js +5 -5
  14. package/dist/esm/unit/byte/index.js.map +1 -1
  15. package/dist/esm/unit/celsius/index.js +2 -2
  16. package/dist/esm/unit/celsius/index.js.map +1 -1
  17. package/dist/esm/unit/fahrenheit/index.js +2 -2
  18. package/dist/esm/unit/fahrenheit/index.js.map +1 -1
  19. package/dist/esm/unit/volt/index.js +2 -2
  20. package/dist/esm/unit/volt/index.js.map +1 -1
  21. package/package.json +3 -3
  22. package/dist/esm/table-column/number-text/models/number-text-unit-format.js.map +0 -1
  23. package/dist/esm/utilities/unit-format/decimal-unit-format.d.ts +0 -19
  24. package/dist/esm/utilities/unit-format/decimal-unit-format.js +0 -46
  25. package/dist/esm/utilities/unit-format/decimal-unit-format.js.map +0 -1
  26. package/dist/esm/utilities/unit-format/default-unit-format.d.ts +0 -22
  27. package/dist/esm/utilities/unit-format/default-unit-format.js +0 -70
  28. package/dist/esm/utilities/unit-format/default-unit-format.js.map +0 -1
  29. package/dist/esm/utilities/unit-format/scaled-unit/scaled-unit.d.ts +0 -16
  30. package/dist/esm/utilities/unit-format/scaled-unit/scaled-unit.js +0 -13
  31. package/dist/esm/utilities/unit-format/scaled-unit/scaled-unit.js.map +0 -1
  32. package/dist/esm/utilities/unit-format/scaled-unit-format/intl-number-format-scaled-unit-format.d.ts +0 -11
  33. package/dist/esm/utilities/unit-format/scaled-unit-format/intl-number-format-scaled-unit-format.js +0 -21
  34. package/dist/esm/utilities/unit-format/scaled-unit-format/intl-number-format-scaled-unit-format.js.map +0 -1
  35. package/dist/esm/utilities/unit-format/scaled-unit-format/manually-translated-scaled-unit-format.d.ts +0 -43
  36. package/dist/esm/utilities/unit-format/scaled-unit-format/manually-translated-scaled-unit-format.js +0 -63
  37. package/dist/esm/utilities/unit-format/scaled-unit-format/manually-translated-scaled-unit-format.js.map +0 -1
  38. package/dist/esm/utilities/unit-format/scaled-unit-format/scaled-unit-format.d.ts +0 -10
  39. package/dist/esm/utilities/unit-format/scaled-unit-format/scaled-unit-format.js +0 -10
  40. package/dist/esm/utilities/unit-format/scaled-unit-format/scaled-unit-format.js.map +0 -1
  41. package/dist/esm/utilities/unit-format/unit-format.d.ts +0 -16
  42. package/dist/esm/utilities/unit-format/unit-format.js +0 -21
  43. package/dist/esm/utilities/unit-format/unit-format.js.map +0 -1
  44. package/dist/esm/utilities/unit-format/unit-scale/byte-1024-unit-scale.d.ts +0 -9
  45. package/dist/esm/utilities/unit-format/unit-scale/byte-1024-unit-scale.js +0 -31
  46. package/dist/esm/utilities/unit-format/unit-scale/byte-1024-unit-scale.js.map +0 -1
  47. package/dist/esm/utilities/unit-format/unit-scale/byte-unit-scale.d.ts +0 -9
  48. package/dist/esm/utilities/unit-format/unit-scale/byte-unit-scale.js +0 -25
  49. package/dist/esm/utilities/unit-format/unit-scale/byte-unit-scale.js.map +0 -1
  50. package/dist/esm/utilities/unit-format/unit-scale/celsius-unit-scale.d.ts +0 -9
  51. package/dist/esm/utilities/unit-format/unit-scale/celsius-unit-scale.js +0 -18
  52. package/dist/esm/utilities/unit-format/unit-scale/celsius-unit-scale.js.map +0 -1
  53. package/dist/esm/utilities/unit-format/unit-scale/fahrenheit-unit-scale.d.ts +0 -9
  54. package/dist/esm/utilities/unit-format/unit-scale/fahrenheit-unit-scale.js +0 -18
  55. package/dist/esm/utilities/unit-format/unit-scale/fahrenheit-unit-scale.js.map +0 -1
  56. package/dist/esm/utilities/unit-format/unit-scale/passthrough-unit-scale.d.ts +0 -9
  57. package/dist/esm/utilities/unit-format/unit-scale/passthrough-unit-scale.js +0 -15
  58. package/dist/esm/utilities/unit-format/unit-scale/passthrough-unit-scale.js.map +0 -1
  59. package/dist/esm/utilities/unit-format/unit-scale/unit-scale.d.ts +0 -15
  60. package/dist/esm/utilities/unit-format/unit-scale/unit-scale.js +0 -49
  61. package/dist/esm/utilities/unit-format/unit-scale/unit-scale.js.map +0 -1
  62. package/dist/esm/utilities/unit-format/unit-scale/utilities/metrix-prefixes.d.ts +0 -1
  63. package/dist/esm/utilities/unit-format/unit-scale/utilities/metrix-prefixes.js +0 -17
  64. package/dist/esm/utilities/unit-format/unit-scale/utilities/metrix-prefixes.js.map +0 -1
  65. package/dist/esm/utilities/unit-format/unit-scale/volt-unit-scale.d.ts +0 -9
  66. package/dist/esm/utilities/unit-format/unit-scale/volt-unit-scale.js +0 -24
  67. package/dist/esm/utilities/unit-format/unit-scale/volt-unit-scale.js.map +0 -1
@@ -76888,7 +76888,7 @@ focus outline in that case.
76888
76888
  /**
76889
76889
  * A formatter for units that can be formatted/translated by Intl.NumberFormat
76890
76890
  */
76891
- class IntlNumberFormatScaledUnitFormat extends ScaledUnitFormat {
76891
+ class ScaledUnitFormatIntlNumberFormat extends ScaledUnitFormat {
76892
76892
  constructor(scaledUnitFormatFactoryOptions, unitSpecificIntlNumberFormatOptions) {
76893
76893
  super(scaledUnitFormatFactoryOptions);
76894
76894
  this.formatter = new Intl.NumberFormat(this.locale, {
@@ -76898,7 +76898,7 @@ focus outline in that case.
76898
76898
  });
76899
76899
  }
76900
76900
  static createFactory(unitSpecificIntlNumberFormatOptions) {
76901
- return (scaledUnitFormatFactoryOptions) => new IntlNumberFormatScaledUnitFormat(scaledUnitFormatFactoryOptions, unitSpecificIntlNumberFormatOptions);
76901
+ return (scaledUnitFormatFactoryOptions) => new ScaledUnitFormatIntlNumberFormat(scaledUnitFormatFactoryOptions, unitSpecificIntlNumberFormatOptions);
76902
76902
  }
76903
76903
  format(value) {
76904
76904
  return this.formatter.format(value);
@@ -76970,14 +76970,14 @@ focus outline in that case.
76970
76970
  /**
76971
76971
  * Unit scale that is used to passthrough a number without applying scaling or units
76972
76972
  */
76973
- class PassthroughUnitScale extends UnitScale {
76973
+ class UnitScalePassthrough extends UnitScale {
76974
76974
  constructor() {
76975
76975
  super([
76976
- new ScaledUnit(10 ** 0, IntlNumberFormatScaledUnitFormat.createFactory({}))
76976
+ new ScaledUnit(10 ** 0, ScaledUnitFormatIntlNumberFormat.createFactory({}))
76977
76977
  ]);
76978
76978
  }
76979
76979
  }
76980
- const passthroughUnitScale = new PassthroughUnitScale();
76980
+ const unitScalePassthrough = new UnitScalePassthrough();
76981
76981
 
76982
76982
  // Workaround to avoid ts errors about signDisplay not accepting the value 'negative'.
76983
76983
  // It has been supported by browsers since 8/23, but TypeScript still hasn't
@@ -76987,15 +76987,15 @@ focus outline in that case.
76987
76987
  * Format for numbers with units to show in a tabular form.
76988
76988
  * Large and tiny numbers are shown exponentially and the rest as decimal.
76989
76989
  */
76990
- class DefaultUnitFormat extends UnitFormat {
76991
- constructor(locale, { unitScale = passthroughUnitScale } = {
76992
- unitScale: passthroughUnitScale
76990
+ class UnitFormatDefault extends UnitFormat {
76991
+ constructor(locale, { unitScale = unitScalePassthrough } = {
76992
+ unitScale: unitScalePassthrough
76993
76993
  }) {
76994
76994
  super();
76995
76995
  // Format options to use by default. It renders the number with a maximum of 6 signficant digits (including zero before decimal point).
76996
76996
  this.defaultIntlNumberFormatOptions = {
76997
- maximumSignificantDigits: DefaultUnitFormat.maximumDigits,
76998
- maximumFractionDigits: DefaultUnitFormat.maximumDigits - 1,
76997
+ maximumSignificantDigits: UnitFormatDefault.maximumDigits,
76998
+ maximumFractionDigits: UnitFormatDefault.maximumDigits - 1,
76999
76999
  roundingPriority: 'lessPrecision',
77000
77000
  signDisplay
77001
77001
  };
@@ -77003,7 +77003,7 @@ focus outline in that case.
77003
77003
  // Format options for numbers that should be displayed in exponential notation. This should be used
77004
77004
  // for numbers with magintudes over 'exponentialUpperBound' or under 'exponentialLowerBound'.
77005
77005
  this.exponentialIntlNumberFormatOptions = {
77006
- maximumSignificantDigits: DefaultUnitFormat.maximumDigits,
77006
+ maximumSignificantDigits: UnitFormatDefault.maximumDigits,
77007
77007
  notation: 'scientific',
77008
77008
  signDisplay
77009
77009
  };
@@ -77028,8 +77028,8 @@ focus outline in that case.
77028
77028
  const { scaledValue, scaledUnit } = this.unitScale.scaleNumber(number);
77029
77029
  const absoluteValue = Math.abs(scaledValue);
77030
77030
  const useExponential = absoluteValue !== 0
77031
- && (absoluteValue >= DefaultUnitFormat.exponentialUpperBound
77032
- || absoluteValue < DefaultUnitFormat.exponentialLowerBound);
77031
+ && (absoluteValue >= UnitFormatDefault.exponentialUpperBound
77032
+ || absoluteValue < UnitFormatDefault.exponentialLowerBound);
77033
77033
  return useExponential
77034
77034
  ? this.exponentialScaledUnitFormatter.format(number)
77035
77035
  : this.defaultScaledUnitFormatters
@@ -77038,23 +77038,23 @@ focus outline in that case.
77038
77038
  }
77039
77039
  }
77040
77040
  // The maximum number of digits that should be rendered for any given value.
77041
- DefaultUnitFormat.maximumDigits = 6;
77041
+ UnitFormatDefault.maximumDigits = 6;
77042
77042
  // Use exponential notation for numbers that will be rendered with 3 leading 0s or more.
77043
77043
  // Because a maximum of 6 digits are rendered, showing more than 3 leading 0s is not ideal
77044
77044
  // because then at least half of the displayed digits will be leading 0s.
77045
- DefaultUnitFormat.exponentialLowerBound = 0.000995;
77045
+ UnitFormatDefault.exponentialLowerBound = 0.000995;
77046
77046
  // Use exponential formatting for numbers whose magnitude cannot otherwise be displayed
77047
77047
  // with 6 digits or less.
77048
- DefaultUnitFormat.exponentialUpperBound = 999999.5;
77048
+ UnitFormatDefault.exponentialUpperBound = 999999.5;
77049
77049
 
77050
77050
  /**
77051
77051
  * Format for decimal numbers with units.
77052
77052
  */
77053
- class DecimalUnitFormat extends UnitFormat {
77054
- constructor(locale, { minimumFractionDigits = 0, maximumFractionDigits = Math.max(3, minimumFractionDigits), unitScale = passthroughUnitScale } = {
77053
+ class UnitFormatDecimal extends UnitFormat {
77054
+ constructor(locale, { minimumFractionDigits = 0, maximumFractionDigits = Math.max(3, minimumFractionDigits), unitScale = unitScalePassthrough } = {
77055
77055
  minimumFractionDigits: 0,
77056
77056
  maximumFractionDigits: 3,
77057
- unitScale: passthroughUnitScale
77057
+ unitScale: unitScalePassthrough
77058
77058
  }) {
77059
77059
  super();
77060
77060
  this.scaledUnitFormatters = new Map();
@@ -77094,7 +77094,7 @@ focus outline in that case.
77094
77094
  /**
77095
77095
  * Format for numbers (with optional units) in a number-text table column.
77096
77096
  */
77097
- class NumberTextUnitFormat extends UnitFormat {
77097
+ class UnitFormatNumberText extends UnitFormat {
77098
77098
  constructor(locale, options) {
77099
77099
  super();
77100
77100
  this._resolvedOptions = this.resolveOptions(options);
@@ -77119,18 +77119,18 @@ focus outline in that case.
77119
77119
  resolveUnitFormat(locale, options) {
77120
77120
  const { numberTextFormat, decimalMaximumDigits, decimalDigits, unitScale } = options;
77121
77121
  if (numberTextFormat === NumberTextFormat.default) {
77122
- return new DefaultUnitFormat(locale, {
77122
+ return new UnitFormatDefault(locale, {
77123
77123
  unitScale
77124
77124
  });
77125
77125
  }
77126
77126
  if (typeof decimalDigits === 'number') {
77127
- return new DecimalUnitFormat(locale, {
77127
+ return new UnitFormatDecimal(locale, {
77128
77128
  minimumFractionDigits: decimalDigits,
77129
77129
  maximumFractionDigits: decimalDigits,
77130
77130
  unitScale
77131
77131
  });
77132
77132
  }
77133
- return new DecimalUnitFormat(locale, {
77133
+ return new UnitFormatDecimal(locale, {
77134
77134
  minimumFractionDigits: 0,
77135
77135
  maximumFractionDigits: decimalMaximumDigits,
77136
77136
  unitScale
@@ -77142,7 +77142,7 @@ focus outline in that case.
77142
77142
  numberTextFormat: NumberTextFormat.default,
77143
77143
  decimalDigits: undefined,
77144
77144
  decimalMaximumDigits: undefined,
77145
- unitScale: options?.unitScale ?? passthroughUnitScale
77145
+ unitScale: options?.unitScale ?? unitScalePassthrough
77146
77146
  };
77147
77147
  }
77148
77148
  const hasDecimalDigits = typeof options.decimalDigits === 'number';
@@ -77153,20 +77153,20 @@ focus outline in that case.
77153
77153
  if (!hasDecimalDigits && !hasDecimalMaximumDigits) {
77154
77154
  return {
77155
77155
  numberTextFormat: NumberTextFormat.decimal,
77156
- decimalDigits: NumberTextUnitFormat.defaultDecimalDigits,
77156
+ decimalDigits: UnitFormatNumberText.defaultDecimalDigits,
77157
77157
  decimalMaximumDigits: undefined,
77158
- unitScale: options.unitScale ?? passthroughUnitScale
77158
+ unitScale: options.unitScale ?? unitScalePassthrough
77159
77159
  };
77160
77160
  }
77161
77161
  return {
77162
77162
  numberTextFormat: NumberTextFormat.decimal,
77163
77163
  decimalDigits: options.decimalDigits,
77164
77164
  decimalMaximumDigits: options.decimalMaximumDigits,
77165
- unitScale: options.unitScale ?? passthroughUnitScale
77165
+ unitScale: options.unitScale ?? unitScalePassthrough
77166
77166
  };
77167
77167
  }
77168
77168
  }
77169
- NumberTextUnitFormat.defaultDecimalDigits = 2;
77169
+ UnitFormatNumberText.defaultDecimalDigits = 2;
77170
77170
 
77171
77171
  const numberTextValidityFlagNames = [
77172
77172
  'invalidDecimalDigits',
@@ -77325,7 +77325,7 @@ focus outline in that case.
77325
77325
  }
77326
77326
  createFormatter() {
77327
77327
  const unitScale = this.unit?.resolvedUnitScale;
77328
- return new NumberTextUnitFormat(lang.getValueFor(this), {
77328
+ return new UnitFormatNumberText(lang.getValueFor(this), {
77329
77329
  // Attribute values sometimes resolve to either null or undefined
77330
77330
  // See https://github.com/microsoft/fast/issues/6630
77331
77331
  numberTextFormat: this.format ?? undefined,
@@ -78921,8 +78921,6 @@ focus outline in that case.
78921
78921
  });
78922
78922
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleTreeView());
78923
78923
 
78924
- const template$1 = html `<template slot="unit"></template>`;
78925
-
78926
78924
  /**
78927
78925
  * Representations of a unit in a particular language
78928
78926
  */
@@ -78936,7 +78934,7 @@ focus outline in that case.
78936
78934
  /**
78937
78935
  * A formatter for units that are not supported by Intl.NumberFormat
78938
78936
  */
78939
- class ManuallyTranslatedScaledUnitFormat extends ScaledUnitFormat {
78937
+ class ScaledUnitFormatManuallyTranslated extends ScaledUnitFormat {
78940
78938
  constructor(scaledUnitFormatFactoryOptions, { unitTranslations, scaledPrefixText }) {
78941
78939
  super(scaledUnitFormatFactoryOptions);
78942
78940
  if (!unitTranslations.get('en')) {
@@ -78947,8 +78945,8 @@ focus outline in that case.
78947
78945
  this.unitTranslation = this.getTranslationToUse(unitTranslations, this.locale);
78948
78946
  this.scaledPrefixText = scaledPrefixText;
78949
78947
  }
78950
- static createFactory(manuallyTranslatedScaledUnitFormatOptions) {
78951
- return (scaledUnitFormatFactoryOptions) => new ManuallyTranslatedScaledUnitFormat(scaledUnitFormatFactoryOptions, manuallyTranslatedScaledUnitFormatOptions);
78948
+ static createFactory(scaledUnitFormatManuallyTranslatedOptions) {
78949
+ return (scaledUnitFormatFactoryOptions) => new ScaledUnitFormatManuallyTranslated(scaledUnitFormatFactoryOptions, scaledUnitFormatManuallyTranslatedOptions);
78952
78950
  }
78953
78951
  format(value) {
78954
78952
  const formatted = this.formatter.format(value);
@@ -79003,17 +79001,17 @@ focus outline in that case.
79003
79001
  /**
79004
79002
  * Byte units (1024-based)
79005
79003
  */
79006
- class Byte1024UnitScale extends UnitScale {
79004
+ class UnitScaleByte1024 extends UnitScale {
79007
79005
  constructor() {
79008
- super(byte1024Prefixes.map(([scaleFactor, scaledPrefixText]) => new ScaledUnit(scaleFactor, ManuallyTranslatedScaledUnitFormat.createFactory({
79006
+ super(byte1024Prefixes.map(([scaleFactor, scaledPrefixText]) => new ScaledUnit(scaleFactor, ScaledUnitFormatManuallyTranslated.createFactory({
79009
79007
  unitTranslations: unitTranslations$1,
79010
79008
  scaledPrefixText
79011
79009
  }))));
79012
79010
  }
79013
79011
  }
79014
- const byte1024UnitScale = new Byte1024UnitScale();
79012
+ const unitScaleByte1024 = new UnitScaleByte1024();
79015
79013
 
79016
- const byteUnitScaleOptions = [
79014
+ const unitScaleByteConfig = [
79017
79015
  [1000 ** 0, 'byte', 'long'],
79018
79016
  [1000 ** 1, 'kilobyte', 'short'],
79019
79017
  [1000 ** 2, 'megabyte', 'short'],
@@ -79024,16 +79022,18 @@ focus outline in that case.
79024
79022
  /**
79025
79023
  * Byte units (1000-based)
79026
79024
  */
79027
- class ByteUnitScale extends UnitScale {
79025
+ class UnitScaleByte extends UnitScale {
79028
79026
  constructor() {
79029
- super(byteUnitScaleOptions.map(([scaleFactor, unit, unitDisplay]) => new ScaledUnit(scaleFactor, IntlNumberFormatScaledUnitFormat.createFactory({
79027
+ super(unitScaleByteConfig.map(([scaleFactor, unit, unitDisplay]) => new ScaledUnit(scaleFactor, ScaledUnitFormatIntlNumberFormat.createFactory({
79030
79028
  style: 'unit',
79031
79029
  unit,
79032
79030
  unitDisplay
79033
79031
  }))));
79034
79032
  }
79035
79033
  }
79036
- const byteUnitScale = new ByteUnitScale();
79034
+ const unitScaleByte = new UnitScaleByte();
79035
+
79036
+ const template$1 = html `<template slot="unit"></template>`;
79037
79037
 
79038
79038
  const styles$1 = css `
79039
79039
  ${display('none')}
@@ -79050,12 +79050,12 @@ focus outline in that case.
79050
79050
  * the default of decimal (base 1000 scale with metric prefixes)
79051
79051
  */
79052
79052
  this.binary = false;
79053
- this.resolvedUnitScale = byteUnitScale;
79053
+ this.resolvedUnitScale = unitScaleByte;
79054
79054
  }
79055
79055
  binaryChanged() {
79056
79056
  this.resolvedUnitScale = this.binary
79057
- ? byte1024UnitScale
79058
- : byteUnitScale;
79057
+ ? unitScaleByte1024
79058
+ : unitScaleByte;
79059
79059
  }
79060
79060
  }
79061
79061
  __decorate([
@@ -79095,15 +79095,15 @@ focus outline in that case.
79095
79095
  /**
79096
79096
  * Voltage unit scale
79097
79097
  */
79098
- class VoltUnitScale extends UnitScale {
79098
+ class UnitScaleVolt extends UnitScale {
79099
79099
  constructor() {
79100
- super(metricPrefixes.map(([scaleFactor, scaledPrefixText]) => new ScaledUnit(scaleFactor, ManuallyTranslatedScaledUnitFormat.createFactory({
79100
+ super(metricPrefixes.map(([scaleFactor, scaledPrefixText]) => new ScaledUnit(scaleFactor, ScaledUnitFormatManuallyTranslated.createFactory({
79101
79101
  unitTranslations,
79102
79102
  scaledPrefixText
79103
79103
  }))));
79104
79104
  }
79105
79105
  }
79106
- const voltUnitScale = new VoltUnitScale();
79106
+ const unitScaleVolt = new UnitScaleVolt();
79107
79107
 
79108
79108
  /**
79109
79109
  * Element representing units for volts
@@ -79111,7 +79111,7 @@ focus outline in that case.
79111
79111
  class UnitVolt extends Unit {
79112
79112
  constructor() {
79113
79113
  super();
79114
- this.resolvedUnitScale = voltUnitScale;
79114
+ this.resolvedUnitScale = unitScaleVolt;
79115
79115
  }
79116
79116
  }
79117
79117
  const nimbleUnitVolt = UnitVolt.compose({
@@ -83206,28 +83206,33 @@ focus outline in that case.
83206
83206
  return this.bytes_.length;
83207
83207
  }
83208
83208
  readInt8(offset) {
83209
- return this.readUint8(offset) << 24 >> 24;
83209
+ return (this.readUint8(offset) << 24) >> 24;
83210
83210
  }
83211
83211
  readUint8(offset) {
83212
83212
  return this.bytes_[offset];
83213
83213
  }
83214
83214
  readInt16(offset) {
83215
- return this.readUint16(offset) << 16 >> 16;
83215
+ return (this.readUint16(offset) << 16) >> 16;
83216
83216
  }
83217
83217
  readUint16(offset) {
83218
- return this.bytes_[offset] | this.bytes_[offset + 1] << 8;
83218
+ return this.bytes_[offset] | (this.bytes_[offset + 1] << 8);
83219
83219
  }
83220
83220
  readInt32(offset) {
83221
- return this.bytes_[offset] | this.bytes_[offset + 1] << 8 | this.bytes_[offset + 2] << 16 | this.bytes_[offset + 3] << 24;
83221
+ return (this.bytes_[offset] |
83222
+ (this.bytes_[offset + 1] << 8) |
83223
+ (this.bytes_[offset + 2] << 16) |
83224
+ (this.bytes_[offset + 3] << 24));
83222
83225
  }
83223
83226
  readUint32(offset) {
83224
83227
  return this.readInt32(offset) >>> 0;
83225
83228
  }
83226
83229
  readInt64(offset) {
83227
- return BigInt.asIntN(64, BigInt(this.readUint32(offset)) + (BigInt(this.readUint32(offset + 4)) << BigInt(32)));
83230
+ return BigInt.asIntN(64, BigInt(this.readUint32(offset)) +
83231
+ (BigInt(this.readUint32(offset + 4)) << BigInt(32)));
83228
83232
  }
83229
83233
  readUint64(offset) {
83230
- return BigInt.asUintN(64, BigInt(this.readUint32(offset)) + (BigInt(this.readUint32(offset + 4)) << BigInt(32)));
83234
+ return BigInt.asUintN(64, BigInt(this.readUint32(offset)) +
83235
+ (BigInt(this.readUint32(offset + 4)) << BigInt(32)));
83231
83236
  }
83232
83237
  readFloat32(offset) {
83233
83238
  int32[0] = this.readInt32(offset);
@@ -83287,11 +83292,11 @@ focus outline in that case.
83287
83292
  * start of a the root vtable).
83288
83293
  */
83289
83294
  getBufferIdentifier() {
83290
- if (this.bytes_.length < this.position_ + SIZEOF_INT +
83291
- FILE_IDENTIFIER_LENGTH) {
83295
+ if (this.bytes_.length <
83296
+ this.position_ + SIZEOF_INT + FILE_IDENTIFIER_LENGTH) {
83292
83297
  throw new Error('FlatBuffers: ByteBuffer is too short to contain an identifier.');
83293
83298
  }
83294
- let result = "";
83299
+ let result = '';
83295
83300
  for (let i = 0; i < FILE_IDENTIFIER_LENGTH; i++) {
83296
83301
  result += String.fromCharCode(this.readInt8(this.position_ + SIZEOF_INT + i));
83297
83302
  }
@@ -83303,7 +83308,9 @@ focus outline in that case.
83303
83308
  */
83304
83309
  __offset(bb_pos, vtable_offset) {
83305
83310
  const vtable = bb_pos - this.readInt32(bb_pos);
83306
- return vtable_offset < this.readInt16(vtable) ? this.readInt16(vtable + vtable_offset) : 0;
83311
+ return vtable_offset < this.readInt16(vtable)
83312
+ ? this.readInt16(vtable + vtable_offset)
83313
+ : 0;
83307
83314
  }
83308
83315
  /**
83309
83316
  * Initialize any Table-derived type to point to the union at the given offset.
@@ -83367,8 +83374,7 @@ focus outline in that case.
83367
83374
  }
83368
83375
  __has_identifier(ident) {
83369
83376
  if (ident.length != FILE_IDENTIFIER_LENGTH) {
83370
- throw new Error('FlatBuffers: file identifier must be length ' +
83371
- FILE_IDENTIFIER_LENGTH);
83377
+ throw new Error('FlatBuffers: file identifier must be length ' + FILE_IDENTIFIER_LENGTH);
83372
83378
  }
83373
83379
  for (let i = 0; i < FILE_IDENTIFIER_LENGTH; i++) {
83374
83380
  if (ident.charCodeAt(i) != this.readInt8(this.position() + SIZEOF_INT + i)) {
@@ -83481,7 +83487,9 @@ focus outline in that case.
83481
83487
  * called finish().
83482
83488
  */
83483
83489
  asUint8Array() {
83484
- return this.bb.bytes().subarray(this.bb.position(), this.bb.position() + this.offset());
83490
+ return this.bb
83491
+ .bytes()
83492
+ .subarray(this.bb.position(), this.bb.position() + this.offset());
83485
83493
  }
83486
83494
  /**
83487
83495
  * Prepare to write an element of `size` after `additional_bytes` have been
@@ -83499,7 +83507,7 @@ focus outline in that case.
83499
83507
  }
83500
83508
  // Find the amount of alignment needed such that `size` is properly
83501
83509
  // aligned after `additional_bytes`
83502
- const align_size = ((~(this.bb.capacity() - this.space + additional_bytes)) + 1) & (size - 1);
83510
+ const align_size = (~(this.bb.capacity() - this.space + additional_bytes) + 1) & (size - 1);
83503
83511
  // Reallocate the buffer if needed.
83504
83512
  while (this.space < align_size + size + additional_bytes) {
83505
83513
  const old_buf_size = this.bb.capacity();
@@ -83514,22 +83522,22 @@ focus outline in that case.
83514
83522
  }
83515
83523
  }
83516
83524
  writeInt8(value) {
83517
- this.bb.writeInt8(this.space -= 1, value);
83525
+ this.bb.writeInt8((this.space -= 1), value);
83518
83526
  }
83519
83527
  writeInt16(value) {
83520
- this.bb.writeInt16(this.space -= 2, value);
83528
+ this.bb.writeInt16((this.space -= 2), value);
83521
83529
  }
83522
83530
  writeInt32(value) {
83523
- this.bb.writeInt32(this.space -= 4, value);
83531
+ this.bb.writeInt32((this.space -= 4), value);
83524
83532
  }
83525
83533
  writeInt64(value) {
83526
- this.bb.writeInt64(this.space -= 8, value);
83534
+ this.bb.writeInt64((this.space -= 8), value);
83527
83535
  }
83528
83536
  writeFloat32(value) {
83529
- this.bb.writeFloat32(this.space -= 4, value);
83537
+ this.bb.writeFloat32((this.space -= 4), value);
83530
83538
  }
83531
83539
  writeFloat64(value) {
83532
- this.bb.writeFloat64(this.space -= 8, value);
83540
+ this.bb.writeFloat64((this.space -= 8), value);
83533
83541
  }
83534
83542
  /**
83535
83543
  * Add an `int8` to the buffer, properly aligned, and grows the buffer (if necessary).
@@ -83677,7 +83685,7 @@ focus outline in that case.
83677
83685
  static growByteBuffer(bb) {
83678
83686
  const old_buf_size = bb.capacity();
83679
83687
  // Ensure we don't grow beyond what fits in an int.
83680
- if (old_buf_size & 0xC0000000) {
83688
+ if (old_buf_size & 0xc0000000) {
83681
83689
  throw new Error('FlatBuffers: cannot grow buffer beyond 2 gigabytes.');
83682
83690
  }
83683
83691
  const new_buf_size = old_buf_size << 1;
@@ -83776,8 +83784,7 @@ focus outline in that case.
83776
83784
  const size_prefix = opt_size_prefix ? SIZE_PREFIX_LENGTH : 0;
83777
83785
  if (opt_file_identifier) {
83778
83786
  const file_identifier = opt_file_identifier;
83779
- this.prep(this.minalign, SIZEOF_INT +
83780
- FILE_IDENTIFIER_LENGTH + size_prefix);
83787
+ this.prep(this.minalign, SIZEOF_INT + FILE_IDENTIFIER_LENGTH + size_prefix);
83781
83788
  if (file_identifier.length != FILE_IDENTIFIER_LENGTH) {
83782
83789
  throw new TypeError('FlatBuffers: file identifier must be length ' +
83783
83790
  FILE_IDENTIFIER_LENGTH);
@@ -83880,7 +83887,7 @@ focus outline in that case.
83880
83887
  }
83881
83888
  this.addInt8(0);
83882
83889
  this.startVector(1, utf8.length, 1);
83883
- this.bb.setPosition(this.space -= utf8.length);
83890
+ this.bb.setPosition((this.space -= utf8.length));
83884
83891
  this.bb.bytes().set(utf8, this.space);
83885
83892
  return this.endVector();
83886
83893
  }
@@ -83895,7 +83902,7 @@ focus outline in that case.
83895
83902
  return 0;
83896
83903
  }
83897
83904
  this.startVector(1, v.length, 1);
83898
- this.bb.setPosition(this.space -= v.length);
83905
+ this.bb.setPosition((this.space -= v.length));
83899
83906
  this.bb.bytes().set(v, this.space);
83900
83907
  return this.endVector();
83901
83908
  }