@ni/nimble-components 35.13.1 → 35.13.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -108,12 +108,10 @@
108
108
  try {
109
109
  // Hopefully we never get here...
110
110
  // Not all environments allow eval and Function. Use only as a last resort:
111
- // eslint-disable-next-line no-new-func
112
111
  return new Function("return this")();
113
112
  }
114
113
  catch {
115
114
  // If all fails, give up and create an object.
116
- // eslint-disable-next-line @typescript-eslint/consistent-type-assertions
117
115
  return {};
118
116
  }
119
117
  })();
@@ -194,6 +192,17 @@
194
192
  ...propConfig,
195
193
  });
196
194
  }
195
+ /**
196
+ * Core services shared across FAST instances.
197
+ * @internal
198
+ */
199
+ var KernelServiceId;
200
+ (function (KernelServiceId) {
201
+ KernelServiceId[KernelServiceId["updateQueue"] = 1] = "updateQueue";
202
+ KernelServiceId[KernelServiceId["observable"] = 2] = "observable";
203
+ KernelServiceId[KernelServiceId["contextEvent"] = 3] = "contextEvent";
204
+ KernelServiceId[KernelServiceId["elementRegistry"] = 4] = "elementRegistry";
205
+ })(KernelServiceId || (KernelServiceId = {}));
197
206
  /**
198
207
  * A readonly, empty array.
199
208
  * @remarks
@@ -224,7 +233,7 @@
224
233
  };
225
234
  }
226
235
 
227
- const updateQueue = $global.FAST.getById(1 /* KernelServiceId.updateQueue */, () => {
236
+ const updateQueue = $global.FAST.getById(KernelServiceId.updateQueue, () => {
228
237
  const tasks = [];
229
238
  const pendingErrors = [];
230
239
  function throwFirstError() {
@@ -275,11 +284,9 @@
275
284
  process,
276
285
  });
277
286
  });
278
- /* eslint-disable */
279
287
  const fastHTMLPolicy = $global.trustedTypes.createPolicy("fast-html", {
280
288
  createHTML: html => html,
281
289
  });
282
- /* eslint-enable */
283
290
  let htmlPolicy = fastHTMLPolicy;
284
291
  const marker = `fast-${Math.random().toString(36).substring(2, 8)}`;
285
292
  /** @internal */
@@ -610,7 +617,7 @@
610
617
  * Common Observable APIs.
611
618
  * @public
612
619
  */
613
- const Observable = FAST.getById(2 /* KernelServiceId.observable */, () => {
620
+ const Observable = FAST.getById(KernelServiceId.observable, () => {
614
621
  const volatileRegex = /(\?\?|:|&&|\|\||if)/;
615
622
  const notifierLookup = new WeakMap();
616
623
  const queueUpdate = DOM.queueUpdate;
@@ -864,7 +871,7 @@
864
871
  },
865
872
  });
866
873
  }
867
- const contextEvent = FAST.getById(3 /* KernelServiceId.contextEvent */, () => {
874
+ const contextEvent = FAST.getById(KernelServiceId.contextEvent, () => {
868
875
  let current = null;
869
876
  return {
870
877
  get() {
@@ -1821,7 +1828,9 @@
1821
1828
  function separateSheetsToPrepend(sheets) {
1822
1829
  const prepend = [];
1823
1830
  const append = [];
1824
- sheets.forEach(x => (x[prependToAdoptedStyleSheetsSymbol] ? prepend : append).push(x));
1831
+ sheets.forEach(x =>
1832
+ // @ts-expect-error
1833
+ (x[prependToAdoptedStyleSheetsSymbol] ? prepend : append).push(x));
1825
1834
  return { prepend, append };
1826
1835
  }
1827
1836
  let addAdoptedStyleSheets = (target, sheets) => {
@@ -2035,15 +2044,18 @@
2035
2044
  * @param value - The value to set the attribute/property to.
2036
2045
  */
2037
2046
  setValue(source, newValue) {
2047
+ // @ts-expect-error
2038
2048
  const oldValue = source[this.fieldName];
2039
2049
  const converter = this.converter;
2040
2050
  if (converter !== void 0) {
2041
2051
  newValue = converter.fromView(newValue);
2042
2052
  }
2043
2053
  if (oldValue !== newValue) {
2054
+ // @ts-expect-error
2044
2055
  source[this.fieldName] = newValue;
2045
2056
  this.tryReflectToAttribute(source);
2046
2057
  if (this.hasCallback) {
2058
+ // @ts-expect-error
2047
2059
  source[this.callbackName](oldValue, newValue);
2048
2060
  }
2049
2061
  source.$fastController.notify(this.name);
@@ -2055,6 +2067,7 @@
2055
2067
  */
2056
2068
  getValue(source) {
2057
2069
  Observable.track(source, this.name);
2070
+ // @ts-expect-error
2058
2071
  return source[this.fieldName];
2059
2072
  }
2060
2073
  /** @internal */
@@ -2074,6 +2087,7 @@
2074
2087
  }
2075
2088
  DOM.queueUpdate(() => {
2076
2089
  guards.add(element);
2090
+ // @ts-expect-error
2077
2091
  const latestValue = element[this.fieldName];
2078
2092
  switch (mode) {
2079
2093
  case "reflect":
@@ -2143,7 +2157,7 @@
2143
2157
 
2144
2158
  const defaultShadowOptions = { mode: "open" };
2145
2159
  const defaultElementOptions = {};
2146
- const fastRegistry = FAST.getById(4 /* KernelServiceId.elementRegistry */, () => {
2160
+ const fastRegistry = FAST.getById(KernelServiceId.elementRegistry, () => {
2147
2161
  const typeToDefinition = new Map();
2148
2162
  return Object.freeze({
2149
2163
  register(definition) {
@@ -2613,11 +2627,9 @@
2613
2627
  }
2614
2628
  }
2615
2629
 
2616
- /* eslint-disable-next-line @typescript-eslint/explicit-function-return-type */
2617
2630
  function createFASTElement(BaseType) {
2618
2631
  return class extends BaseType {
2619
2632
  constructor() {
2620
- /* eslint-disable-next-line */
2621
2633
  super();
2622
2634
  Controller.forCustomElement(this);
2623
2635
  }
@@ -3178,7 +3190,6 @@
3178
3190
  }
3179
3191
  }
3180
3192
  /* eslint-disable prefer-rest-params */
3181
- /* eslint-disable @typescript-eslint/explicit-function-return-type */
3182
3193
  /**
3183
3194
  * Enables the array observation mechanism.
3184
3195
  * @remarks
@@ -3282,7 +3293,6 @@
3282
3293
  };
3283
3294
  }
3284
3295
  /* eslint-enable prefer-rest-params */
3285
- /* eslint-enable @typescript-eslint/explicit-function-return-type */
3286
3296
 
3287
3297
  /**
3288
3298
  * The runtime behavior for template references.
@@ -3310,7 +3320,6 @@
3310
3320
  * Unbinds this behavior from the source.
3311
3321
  * @param source - The source to unbind from.
3312
3322
  */
3313
- /* eslint-disable-next-line @typescript-eslint/no-empty-function */
3314
3323
  unbind() { }
3315
3324
  }
3316
3325
  /**
@@ -3917,7 +3926,7 @@
3917
3926
  * @returns The resolver.
3918
3927
  */
3919
3928
  instance(value) {
3920
- return this.registerResolver(0 /* ResolverStrategy.instance */, value);
3929
+ return this.registerResolver(ResolverStrategy.instance, value);
3921
3930
  }
3922
3931
  /**
3923
3932
  * Creates a resolver that enforces a singleton lifetime.
@@ -3925,7 +3934,7 @@
3925
3934
  * @returns The resolver.
3926
3935
  */
3927
3936
  singleton(value) {
3928
- return this.registerResolver(1 /* ResolverStrategy.singleton */, value);
3937
+ return this.registerResolver(ResolverStrategy.singleton, value);
3929
3938
  }
3930
3939
  /**
3931
3940
  * Creates a resolver that creates a new instance for every dependency request.
@@ -3933,7 +3942,7 @@
3933
3942
  * @returns - The resolver.
3934
3943
  */
3935
3944
  transient(value) {
3936
- return this.registerResolver(2 /* ResolverStrategy.transient */, value);
3945
+ return this.registerResolver(ResolverStrategy.transient, value);
3937
3946
  }
3938
3947
  /**
3939
3948
  * Creates a resolver that invokes a callback function for every dependency resolution
@@ -3942,7 +3951,7 @@
3942
3951
  * @returns The resolver.
3943
3952
  */
3944
3953
  callback(value) {
3945
- return this.registerResolver(3 /* ResolverStrategy.callback */, value);
3954
+ return this.registerResolver(ResolverStrategy.callback, value);
3946
3955
  }
3947
3956
  /**
3948
3957
  * Creates a resolver that invokes a callback function the first time that a dependency
@@ -3952,7 +3961,7 @@
3952
3961
  * @returns The resolver.
3953
3962
  */
3954
3963
  cachedCallback(value) {
3955
- return this.registerResolver(3 /* ResolverStrategy.callback */, cacheCallbackResult(value));
3964
+ return this.registerResolver(ResolverStrategy.callback, cacheCallbackResult(value));
3956
3965
  }
3957
3966
  /**
3958
3967
  * Aliases the current key to a different key.
@@ -3960,11 +3969,10 @@
3960
3969
  * @returns The resolver.
3961
3970
  */
3962
3971
  aliasTo(destinationKey) {
3963
- return this.registerResolver(5 /* ResolverStrategy.alias */, destinationKey);
3972
+ return this.registerResolver(ResolverStrategy.alias, destinationKey);
3964
3973
  }
3965
3974
  registerResolver(strategy, state) {
3966
3975
  const { container, key } = this;
3967
- /* eslint-disable-next-line @typescript-eslint/no-non-null-assertion */
3968
3976
  this.container = this.key = (void 0);
3969
3977
  return container.registerResolver(key, new ResolverImpl(key, strategy, state));
3970
3978
  }
@@ -4000,7 +4008,7 @@
4000
4008
  * @returns The resolver.
4001
4009
  */
4002
4010
  singleton(key) {
4003
- return new ResolverImpl(key, 1 /* ResolverStrategy.singleton */, key);
4011
+ return new ResolverImpl(key, ResolverStrategy.singleton, key);
4004
4012
  },
4005
4013
  /**
4006
4014
  * Provides default transient resolution behavior during auto-registration.
@@ -4008,7 +4016,7 @@
4008
4016
  * @returns The resolver.
4009
4017
  */
4010
4018
  transient(key) {
4011
- return new ResolverImpl(key, 2 /* ResolverStrategy.transient */, key);
4019
+ return new ResolverImpl(key, ResolverStrategy.transient, key);
4012
4020
  },
4013
4021
  });
4014
4022
  /**
@@ -4230,8 +4238,10 @@
4230
4238
  const handleChange = () => {
4231
4239
  const newContainer = DI.findResponsibleContainer(this);
4232
4240
  const newValue = newContainer.get(key);
4241
+ // @ts-expect-error
4233
4242
  const oldValue = this[diPropertyKey];
4234
4243
  if (newValue !== oldValue) {
4244
+ // @ts-expect-error
4235
4245
  this[diPropertyKey] = value;
4236
4246
  notifier.notify(propertyName);
4237
4247
  }
@@ -4414,6 +4424,16 @@
4414
4424
  DI.inject;
4415
4425
  const defaultSingletonOptions = { scoped: false };
4416
4426
  /** @internal */
4427
+ var ResolverStrategy;
4428
+ (function (ResolverStrategy) {
4429
+ ResolverStrategy[ResolverStrategy["instance"] = 0] = "instance";
4430
+ ResolverStrategy[ResolverStrategy["singleton"] = 1] = "singleton";
4431
+ ResolverStrategy[ResolverStrategy["transient"] = 2] = "transient";
4432
+ ResolverStrategy[ResolverStrategy["callback"] = 3] = "callback";
4433
+ ResolverStrategy[ResolverStrategy["array"] = 4] = "array";
4434
+ ResolverStrategy[ResolverStrategy["alias"] = 5] = "alias";
4435
+ })(ResolverStrategy || (ResolverStrategy = {}));
4436
+ /** @internal */
4417
4437
  class ResolverImpl {
4418
4438
  constructor(key, strategy, state) {
4419
4439
  this.key = key;
@@ -4429,9 +4449,9 @@
4429
4449
  }
4430
4450
  resolve(handler, requestor) {
4431
4451
  switch (this.strategy) {
4432
- case 0 /* ResolverStrategy.instance */:
4452
+ case ResolverStrategy.instance:
4433
4453
  return this.state;
4434
- case 1 /* ResolverStrategy.singleton */: {
4454
+ case ResolverStrategy.singleton: {
4435
4455
  if (this.resolving) {
4436
4456
  throw new Error(`Cyclic dependency found: ${this.state.name}`);
4437
4457
  }
@@ -4439,11 +4459,11 @@
4439
4459
  this.state = handler
4440
4460
  .getFactory(this.state)
4441
4461
  .construct(requestor);
4442
- this.strategy = 0 /* ResolverStrategy.instance */;
4462
+ this.strategy = ResolverStrategy.instance;
4443
4463
  this.resolving = false;
4444
4464
  return this.state;
4445
4465
  }
4446
- case 2 /* ResolverStrategy.transient */: {
4466
+ case ResolverStrategy.transient: {
4447
4467
  // Always create transients from the requesting container
4448
4468
  const factory = handler.getFactory(this.state);
4449
4469
  if (factory === null) {
@@ -4451,11 +4471,11 @@
4451
4471
  }
4452
4472
  return factory.construct(requestor);
4453
4473
  }
4454
- case 3 /* ResolverStrategy.callback */:
4474
+ case ResolverStrategy.callback:
4455
4475
  return this.state(handler, requestor, this);
4456
- case 4 /* ResolverStrategy.array */:
4476
+ case ResolverStrategy.array:
4457
4477
  return this.state[0].resolve(handler, requestor);
4458
- case 5 /* ResolverStrategy.alias */:
4478
+ case ResolverStrategy.alias:
4459
4479
  return requestor.get(this.state);
4460
4480
  default:
4461
4481
  throw new Error(`Invalid resolver strategy specified: ${this.strategy}.`);
@@ -4463,10 +4483,10 @@
4463
4483
  }
4464
4484
  getFactory(container) {
4465
4485
  switch (this.strategy) {
4466
- case 1 /* ResolverStrategy.singleton */:
4467
- case 2 /* ResolverStrategy.transient */:
4486
+ case ResolverStrategy.singleton:
4487
+ case ResolverStrategy.transient:
4468
4488
  return container.getFactory(this.state);
4469
- case 5 /* ResolverStrategy.alias */:
4489
+ case ResolverStrategy.alias:
4470
4490
  return container.getResolver(this.state)?.getFactory?.(container) ?? null;
4471
4491
  default:
4472
4492
  return null;
@@ -4653,11 +4673,11 @@
4653
4673
  resolvers.set(key, resolver);
4654
4674
  }
4655
4675
  else if (result instanceof ResolverImpl &&
4656
- result.strategy === 4 /* ResolverStrategy.array */) {
4676
+ result.strategy === ResolverStrategy.array) {
4657
4677
  result.state.push(resolver);
4658
4678
  }
4659
4679
  else {
4660
- resolvers.set(key, new ResolverImpl(key, 4 /* ResolverStrategy.array */, [result, resolver]));
4680
+ resolvers.set(key, new ResolverImpl(key, ResolverStrategy.array, [result, resolver]));
4661
4681
  }
4662
4682
  return resolver;
4663
4683
  }
@@ -4749,9 +4769,7 @@
4749
4769
  while (current != null) {
4750
4770
  resolver = current.resolvers.get(key);
4751
4771
  if (resolver != null) {
4752
- resolutions = resolutions.concat(
4753
- /* eslint-disable-next-line @typescript-eslint/no-non-null-assertion */
4754
- buildAllResponse(resolver, current, requestor));
4772
+ resolutions = resolutions.concat(buildAllResponse(resolver, current, requestor));
4755
4773
  }
4756
4774
  current = current.parent;
4757
4775
  }
@@ -4857,7 +4875,7 @@
4857
4875
  * @param value - The instance to return when the key is requested.
4858
4876
  */
4859
4877
  instance(key, value) {
4860
- return new ResolverImpl(key, 0 /* ResolverStrategy.instance */, value);
4878
+ return new ResolverImpl(key, ResolverStrategy.instance, value);
4861
4879
  },
4862
4880
  /**
4863
4881
  * Creates an instance from the class.
@@ -4872,7 +4890,7 @@
4872
4890
  * @param value - The class to instantiate as a singleton when first requested.
4873
4891
  */
4874
4892
  singleton(key, value) {
4875
- return new ResolverImpl(key, 1 /* ResolverStrategy.singleton */, value);
4893
+ return new ResolverImpl(key, ResolverStrategy.singleton, value);
4876
4894
  },
4877
4895
  /**
4878
4896
  * Creates an instance from a class.
@@ -4887,7 +4905,7 @@
4887
4905
  * @param value - The class to instantiate each time the key is requested.
4888
4906
  */
4889
4907
  transient(key, value) {
4890
- return new ResolverImpl(key, 2 /* ResolverStrategy.transient */, value);
4908
+ return new ResolverImpl(key, ResolverStrategy.transient, value);
4891
4909
  },
4892
4910
  /**
4893
4911
  * Delegates to a callback function to provide the dependency.
@@ -4904,7 +4922,7 @@
4904
4922
  * @param callback - The function that is expected to return the dependency.
4905
4923
  */
4906
4924
  callback(key, callback) {
4907
- return new ResolverImpl(key, 3 /* ResolverStrategy.callback */, callback);
4925
+ return new ResolverImpl(key, ResolverStrategy.callback, callback);
4908
4926
  },
4909
4927
  /**
4910
4928
  * Delegates to a callback function to provide the dependency and then caches the
@@ -4923,7 +4941,7 @@
4923
4941
  * Should all references to the resolver returned be removed, the cache will expire.
4924
4942
  */
4925
4943
  cachedCallback(key, callback) {
4926
- return new ResolverImpl(key, 3 /* ResolverStrategy.callback */, cacheCallbackResult(callback));
4944
+ return new ResolverImpl(key, ResolverStrategy.callback, cacheCallbackResult(callback));
4927
4945
  },
4928
4946
  /**
4929
4947
  * Creates an alternate {@link Key} to retrieve an instance by.
@@ -4940,7 +4958,7 @@
4940
4958
  * @param aliasKey - The alias to the original key.
4941
4959
  */
4942
4960
  aliasTo(originalKey, aliasKey) {
4943
- return new ResolverImpl(aliasKey, 5 /* ResolverStrategy.alias */, originalKey);
4961
+ return new ResolverImpl(aliasKey, ResolverStrategy.alias, originalKey);
4944
4962
  },
4945
4963
  });
4946
4964
  /** @internal */
@@ -4951,7 +4969,7 @@
4951
4969
  }
4952
4970
  function buildAllResponse(resolver, handler, requestor) {
4953
4971
  if (resolver instanceof ResolverImpl &&
4954
- resolver.strategy === 4 /* ResolverStrategy.array */) {
4972
+ resolver.strategy === ResolverStrategy.array) {
4955
4973
  const state = resolver.state;
4956
4974
  let i = state.length;
4957
4975
  const results = new Array(i);
@@ -5268,9 +5286,7 @@
5268
5286
  baseCtors.forEach(baseCtor => {
5269
5287
  Object.getOwnPropertyNames(baseCtor.prototype).forEach(name => {
5270
5288
  if (name !== "constructor") {
5271
- Object.defineProperty(derivedCtor.prototype, name,
5272
- /* eslint-disable-next-line @typescript-eslint/no-non-null-assertion */
5273
- Object.getOwnPropertyDescriptor(baseCtor.prototype, name));
5289
+ Object.defineProperty(derivedCtor.prototype, name, Object.getOwnPropertyDescriptor(baseCtor.prototype, name));
5274
5290
  }
5275
5291
  });
5276
5292
  const baseAttributes = AttributeConfiguration.locate(baseCtor);
@@ -5366,7 +5382,7 @@
5366
5382
  styleElement.sheet.insertRule("foo:focus-visible {color:inherit}", 0);
5367
5383
  _canUseFocusVisible = true;
5368
5384
  }
5369
- catch (_a) {
5385
+ catch {
5370
5386
  _canUseFocusVisible = false;
5371
5387
  }
5372
5388
  finally {
@@ -9087,6 +9103,7 @@
9087
9103
  constructor(source) {
9088
9104
  super();
9089
9105
  const sheet = new CSSStyleSheet();
9106
+ // @ts-expect-error
9090
9107
  sheet[prependToAdoptedStyleSheetsSymbol] = true;
9091
9108
  this.target = sheet.cssRules[sheet.insertRule(":host{}")].style;
9092
9109
  source.$fastController.addStyles(ElementStyles.create([sheet]));
@@ -9266,7 +9283,6 @@
9266
9283
  };
9267
9284
  }
9268
9285
  if (propertyTargetCache.has(source)) {
9269
- /* eslint-disable-next-line @typescript-eslint/no-non-null-assertion */
9270
9286
  return propertyTargetCache.get(source);
9271
9287
  }
9272
9288
  let target;
@@ -9938,9 +9954,7 @@
9938
9954
  RootStyleSheetTarget.unregisterRoot(target);
9939
9955
  },
9940
9956
  });
9941
- /* eslint-enable @typescript-eslint/no-non-null-assertion */
9942
9957
 
9943
- /* eslint-disable @typescript-eslint/no-non-null-assertion */
9944
9958
  /**
9945
9959
  * Indicates what to do with an ambiguous (duplicate) element.
9946
9960
  * @public
@@ -10144,7 +10158,6 @@
10144
10158
  return DesignSystem.tagFor(type);
10145
10159
  }
10146
10160
  }
10147
- /* eslint-enable @typescript-eslint/no-non-null-assertion */
10148
10161
 
10149
10162
  /*!
10150
10163
  * tabbable 6.5.0
@@ -11994,6 +12007,7 @@
11994
12007
  return (this.parentToolbar ?? false);
11995
12008
  }
11996
12009
  get isInsideFoundationToolbar() {
12010
+ // @ts-expect-error
11997
12011
  return !!this.parentToolbar?.["$fastController"];
11998
12012
  }
11999
12013
  /**
@@ -12964,8 +12978,11 @@
12964
12978
  }
12965
12979
  // If the original property isn't emptied out,
12966
12980
  // the next set will morph into a grid-area style setting that is not what we want
12981
+ // @ts-expect-error
12967
12982
  tab.style[gridHorizontalProperty] = "";
12983
+ // @ts-expect-error
12968
12984
  tab.style[gridVerticalProperty] = "";
12985
+ // @ts-expect-error
12969
12986
  tab.style[gridProperty] = `${index + 1}`;
12970
12987
  if (!this.isHorizontal()) {
12971
12988
  tab.classList.add("vertical");
@@ -13183,15 +13200,20 @@
13183
13200
  ? "translateX"
13184
13201
  : "translateY";
13185
13202
  const offsetProperty = this.isHorizontal() ? "offsetLeft" : "offsetTop";
13203
+ // @ts-expect-error
13186
13204
  const prev = this.activeIndicatorRef[offsetProperty];
13205
+ // @ts-expect-error
13187
13206
  this.activeIndicatorRef.style[gridProperty] = `${this.activeTabIndex + 1}`;
13207
+ // @ts-expect-error
13188
13208
  const next = this.activeIndicatorRef[offsetProperty];
13209
+ // @ts-expect-error
13189
13210
  this.activeIndicatorRef.style[gridProperty] = `${this.prevActiveTabIndex + 1}`;
13190
13211
  const dif = next - prev;
13191
13212
  this.activeIndicatorRef.style.transform = `${translateProperty}(${dif}px)`;
13192
13213
  this.activeIndicatorRef.classList.add("activeIndicatorTransition");
13193
13214
  this.activeIndicatorRef.addEventListener("transitionend", () => {
13194
13215
  this.ticking = false;
13216
+ // @ts-expect-error
13195
13217
  this.activeIndicatorRef.style[gridProperty] = `${this.activeTabIndex + 1}`;
13196
13218
  this.activeIndicatorRef.style.transform = `${translateProperty}(0px)`;
13197
13219
  this.activeIndicatorRef.classList.remove("activeIndicatorTransition");
@@ -13590,7 +13612,10 @@
13590
13612
  * @internal
13591
13613
  */
13592
13614
  getDirectionalIncrementer(key) {
13593
- return (ToolbarArrowKeyMap[key]?.[this.orientation]?.[this.direction] ??
13615
+ return (
13616
+ // @ts-expect-error
13617
+ ToolbarArrowKeyMap[key]?.[this.orientation]?.[this.direction] ??
13618
+ // @ts-expect-error
13594
13619
  ToolbarArrowKeyMap[key]?.[this.orientation] ??
13595
13620
  0);
13596
13621
  }
@@ -15197,6 +15222,30 @@
15197
15222
  this.b = blue;
15198
15223
  this.a = typeof alpha === "number" && !isNaN(alpha) ? alpha : 1;
15199
15224
  }
15225
+ /**
15226
+ * The red value
15227
+ * @remarks
15228
+ * Scaled to the range [0.0 , 1.0]. Values outside this range are allowed but any methods that convert or tostring the values will also be clamped
15229
+ */
15230
+ r;
15231
+ /**
15232
+ * The green value
15233
+ * @remarks
15234
+ * Scaled to the range [0.0 , 1.0]. Values outside this range are allowed but any methods that convert or tostring the values will also be clamped
15235
+ */
15236
+ g;
15237
+ /**
15238
+ * The blue value
15239
+ * @remarks
15240
+ * Scaled to the range [0.0 , 1.0]. Values outside this range are allowed but any methods that convert or tostring the values will also be clamped
15241
+ */
15242
+ b;
15243
+ /**
15244
+ * The alpha value
15245
+ * @remarks
15246
+ * Scaled to the range [0.0 , 1.0]. Values outside this range are allowed but any methods that convert or tostring the values will also be clamped
15247
+ */
15248
+ a;
15200
15249
  /**
15201
15250
  * Determines if one color is equal to another.
15202
15251
  * @param rhs - the color to compare
@@ -19310,7 +19359,7 @@ Defines an interaction area clip-path that leaves out the severity text so it is
19310
19359
  };
19311
19360
  const systemlink16X16 = {
19312
19361
  name: 'systemlink_16_x_16',
19313
- data: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M7.357 9.143H4.786V6.79c0-.927.442-1.714 1.262-2.211C6.674 4.2 7.505 4 8.451 4h5.335v2.571H8.69c-.911.124-1.262.548-1.333 1.267z" class="cls-1"/><path d="M8.643 7.857h2.571v2.352c0 .927-.442 1.714-1.262 2.211-.626.38-1.457.58-2.403.58H2.214v-2.571H7.31c.911-.124 1.262-.548 1.333-1.267z" class="cls-1"/></svg>`,
19362
+ data: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M7.249 2.55a1.06 1.06 0 0 1 1.498 0 1.06 1.06 0 0 1-.295 1.703v1.86a2.42 2.42 0 0 1 1.672 1.215l1.768-.573q.023-.176.106-.344a1.059 1.059 0 1 1 .176 1.208l-1.768.574a2.42 2.42 0 0 1-.638 1.964l1.093 1.504q.175-.033.36-.005a1.058 1.058 0 1 1-1.095.54l-1.093-1.503a2.43 2.43 0 0 1-2.066 0l-1.093 1.503q.085.155.117.34a1.058 1.058 0 1 1-.852-.875l1.093-1.504a2.42 2.42 0 0 1-.638-1.964l-1.768-.574a1.054 1.054 0 0 1-1.71-.247 1.059 1.059 0 1 1 1.992-.617l1.768.573q.161-.295.41-.547c.358-.358.8-.58 1.262-.668v-1.86a1.06 1.06 0 0 1-.294-1.704Zm2.072 9.704c-.42.148-.865.224-1.323.224s-.904-.076-1.324-.224l.566-.779q.37.094.758.094c.388 0 .512-.033.757-.094zM11.98 8.4l.002.097c0 .886-.288 1.727-.82 2.419l-.566-.778c.274-.43.434-.923.467-1.44l.914-.298Zm-7.046.298c.033.502.189.998.466 1.438l-.566.779A3.97 3.97 0 0 1 4.018 8.4zM6.86 5.644c-.377.15-.731.377-1.035.681q-.1.1-.19.209l-.915-.298q.202-.292.46-.554A3.96 3.96 0 0 1 6.86 4.68v.965Zm2.275-.964a3.96 3.96 0 0 1 2.14 1.556l-.915.298a3.075 3.075 0 0 0-1.224-.89z" class="cls-1"/></svg>`,
19314
19363
  };
19315
19364
  const t16X16 = {
19316
19365
  name: 't_16_x_16',
@@ -52296,6 +52345,19 @@ img.ProseMirror-separator {
52296
52345
  const QUOTE_TEST_RE = /['"]/;
52297
52346
  const QUOTE_RE = /['"]/g;
52298
52347
  const APOSTROPHE$1 = '\u2019'; /* ’ */
52348
+ // Caps memory on malicious input
52349
+ const MAX_OPENERS = 1000;
52350
+
52351
+ function truncateStack (stack, heads, length) {
52352
+ while (stack.length > length) {
52353
+ const item = stack.pop();
52354
+ if (item.isSingleQuote) {
52355
+ heads.single = item.prevSameQuoteIdx;
52356
+ } else {
52357
+ heads.double = item.prevSameQuoteIdx;
52358
+ }
52359
+ }
52360
+ }
52299
52361
 
52300
52362
  function addReplacement (replacements, tokenIdx, pos, ch) {
52301
52363
  if (!replacements[tokenIdx]) {
@@ -52325,6 +52387,8 @@ img.ProseMirror-separator {
52325
52387
  let j;
52326
52388
 
52327
52389
  const stack = [];
52390
+ // stack indexes of topmost openers of each type (-1 if none)
52391
+ const heads = { single: -1, double: -1 };
52328
52392
  // token index -> list of replacements in the original token content
52329
52393
  const replacements = {};
52330
52394
 
@@ -52336,7 +52400,7 @@ img.ProseMirror-separator {
52336
52400
  for (j = stack.length - 1; j >= 0; j--) {
52337
52401
  if (stack[j].level <= thisLevel) { break }
52338
52402
  }
52339
- stack.length = j + 1;
52403
+ truncateStack(stack, heads, j + 1);
52340
52404
 
52341
52405
  if (token.type !== 'text') { continue }
52342
52406
 
@@ -52440,39 +52504,45 @@ img.ProseMirror-separator {
52440
52504
  }
52441
52505
 
52442
52506
  if (canClose) {
52443
- // this could be a closing quote, rewind the stack to get a match
52444
- for (j = stack.length - 1; j >= 0; j--) {
52445
- let item = stack[j];
52446
- if (stack[j].level < thisLevel) { break }
52447
- if (item.single === isSingle && stack[j].level === thisLevel) {
52448
- item = stack[j];
52449
-
52450
- let openQuote;
52451
- let closeQuote;
52452
- if (isSingle) {
52453
- openQuote = state.md.options.quotes[2];
52454
- closeQuote = state.md.options.quotes[3];
52455
- } else {
52456
- openQuote = state.md.options.quotes[0];
52457
- closeQuote = state.md.options.quotes[1];
52458
- }
52507
+ // Stack levels never decrease, so an opener of this type below
52508
+ // the current level means there is no match
52509
+ j = isSingle ? heads.single : heads.double;
52510
+ if (j >= 0 && stack[j].level === thisLevel) {
52511
+ const item = stack[j];
52512
+
52513
+ let openQuote;
52514
+ let closeQuote;
52515
+ if (isSingle) {
52516
+ openQuote = state.md.options.quotes[2];
52517
+ closeQuote = state.md.options.quotes[3];
52518
+ } else {
52519
+ openQuote = state.md.options.quotes[0];
52520
+ closeQuote = state.md.options.quotes[1];
52521
+ }
52459
52522
 
52460
- addReplacement(replacements, i, t.index, closeQuote);
52461
- addReplacement(replacements, item.token, item.pos, openQuote);
52523
+ addReplacement(replacements, i, t.index, closeQuote);
52524
+ addReplacement(replacements, item.tokenIdx, item.contentPos, openQuote);
52462
52525
 
52463
- stack.length = j;
52464
- continue OUTER
52465
- }
52526
+ truncateStack(stack, heads, j);
52527
+ continue OUTER
52466
52528
  }
52467
52529
  }
52468
52530
 
52469
52531
  if (canOpen) {
52532
+ if (stack.length >= MAX_OPENERS) { return }
52470
52533
  stack.push({
52471
- token: i,
52472
- pos: t.index,
52473
- single: isSingle,
52474
- level: thisLevel
52534
+ tokenIdx: i,
52535
+ contentPos: t.index,
52536
+ isSingleQuote: isSingle,
52537
+ level: thisLevel,
52538
+ // stack index of the previous opener of the same quote type, -1 if none
52539
+ prevSameQuoteIdx: isSingle ? heads.single : heads.double
52475
52540
  });
52541
+ if (isSingle) {
52542
+ heads.single = stack.length - 1;
52543
+ } else {
52544
+ heads.double = stack.length - 1;
52545
+ }
52476
52546
  } else if (canClose && isSingle) {
52477
52547
  addReplacement(replacements, i, t.index, APOSTROPHE$1);
52478
52548
  }
@@ -76439,8 +76509,11 @@ focus outline in that case.
76439
76509
  </template>
76440
76510
  `;
76441
76511
 
76442
- function createLazyMeasurementsView(count, flat, getItemKey) {
76443
- const cache = new Array(count);
76512
+ function getMeasurementKey(item) {
76513
+ return typeof item === "object" ? item.key : item;
76514
+ }
76515
+ function createLazyMeasurementsView(cache, flat) {
76516
+ const count = cache.length;
76444
76517
  return new Proxy(cache, {
76445
76518
  get(target, prop, receiver) {
76446
76519
  if (typeof prop === "string") {
@@ -76449,11 +76522,11 @@ focus outline in that case.
76449
76522
  const i = +prop;
76450
76523
  if (Number.isInteger(i) && i >= 0 && i < count) {
76451
76524
  let v = target[i];
76452
- if (!v) {
76525
+ if (typeof v !== "object") {
76453
76526
  const s = flat[i * 2];
76454
76527
  v = target[i] = {
76455
76528
  index: i,
76456
- key: getItemKey(i),
76529
+ key: v,
76457
76530
  start: s,
76458
76531
  size: flat[i * 2 + 1],
76459
76532
  end: s + flat[i * 2 + 1],
@@ -76625,7 +76698,7 @@ focus outline in that case.
76625
76698
  let offset = 0;
76626
76699
  const fallback = registerScrollendEvent ? null : debounce(
76627
76700
  targetWindow,
76628
- () => cb(offset, false),
76701
+ () => cb(readOffset(element), false),
76629
76702
  instance.options.isScrollingResetDelay
76630
76703
  );
76631
76704
  const createHandler = (isScrolling) => () => {
@@ -76687,6 +76760,27 @@ focus outline in that case.
76687
76760
  });
76688
76761
  };
76689
76762
  const elementScroll = scrollWithAdjustments;
76763
+ function isAppendWithTrim(prevCount, nextCount, getPreviousKey, getNextKey) {
76764
+ if (nextCount === 0) return false;
76765
+ const firstKey = getNextKey(0);
76766
+ const removedKeys = /* @__PURE__ */ new Set();
76767
+ let removedCount = 0;
76768
+ while (removedCount < prevCount) {
76769
+ const key = getPreviousKey(removedCount);
76770
+ if (key === firstKey) break;
76771
+ removedKeys.add(key);
76772
+ removedCount++;
76773
+ }
76774
+ const retainedCount = prevCount - removedCount;
76775
+ if (retainedCount === 0 || retainedCount >= nextCount) return false;
76776
+ for (let i = 0; i < retainedCount; i++) {
76777
+ if (getNextKey(i) !== getPreviousKey(removedCount + i)) return false;
76778
+ }
76779
+ for (let i = retainedCount; i < nextCount; i++) {
76780
+ if (removedKeys.has(getNextKey(i))) return false;
76781
+ }
76782
+ return true;
76783
+ }
76690
76784
  let Virtualizer$1 = class Virtualizer {
76691
76785
  constructor(opts) {
76692
76786
  this.unsubs = [];
@@ -76695,7 +76789,7 @@ focus outline in that case.
76695
76789
  this.isScrolling = false;
76696
76790
  this.scrollState = null;
76697
76791
  this.measurementsCache = [];
76698
- this._flatMeasurements = null;
76792
+ this._singleLaneMeasurements = null;
76699
76793
  this.itemSizeCache = /* @__PURE__ */ new Map();
76700
76794
  this.itemSizeCacheVersion = 0;
76701
76795
  this.laneAssignments = /* @__PURE__ */ new Map();
@@ -76713,6 +76807,7 @@ focus outline in that case.
76713
76807
  this._iosJustTouchEnded = false;
76714
76808
  this._iosTouchEndTimerId = null;
76715
76809
  this._intendedScrollOffset = null;
76810
+ this._clampedAdjustment = null;
76716
76811
  this.elementsCache = /* @__PURE__ */ new Map();
76717
76812
  this.now = () => {
76718
76813
  var _a, _b, _c;
@@ -76772,7 +76867,7 @@ focus outline in that case.
76772
76867
  })();
76773
76868
  this.range = null;
76774
76869
  this.setOptions = (opts2) => {
76775
- var _a, _b;
76870
+ var _a;
76776
76871
  const merged = {
76777
76872
  debug: false,
76778
76873
  initialOffset: 0,
@@ -76816,8 +76911,10 @@ focus outline in that case.
76816
76911
  const prevCount = prevOptions.count;
76817
76912
  const nextCount = merged.count;
76818
76913
  const measurements = this.getMeasurements();
76819
- const prevFirstKey = prevCount > 0 ? ((_a = measurements[0]) == null ? void 0 : _a.key) ?? prevOptions.getItemKey(0) : null;
76820
- const prevLastKey = prevCount > 0 ? ((_b = measurements[prevCount - 1]) == null ? void 0 : _b.key) ?? prevOptions.getItemKey(prevCount - 1) : null;
76914
+ const previousItems = ((_a = this._singleLaneMeasurements) == null ? void 0 : _a.items) ?? measurements;
76915
+ const getPreviousKey = (index) => getMeasurementKey(previousItems[index]);
76916
+ const prevFirstKey = prevCount > 0 ? getPreviousKey(0) : null;
76917
+ const prevLastKey = prevCount > 0 ? getPreviousKey(prevCount - 1) : null;
76821
76918
  const didCountChange = nextCount !== prevCount;
76822
76919
  const didEdgeKeysChange = didCountChange || prevCount > 0 && nextCount > 0 && (merged.getItemKey(0) !== prevFirstKey || merged.getItemKey(nextCount - 1) !== prevLastKey);
76823
76920
  if (didEdgeKeysChange) {
@@ -76827,8 +76924,15 @@ focus outline in that case.
76827
76924
  anchor = [item.key, this.getScrollOffset() - item.start];
76828
76925
  }
76829
76926
  const behavior = merged.followOnAppend === true ? "auto" : merged.followOnAppend || null;
76830
- if (behavior && nextCount > prevCount && this.isAtEnd(prevOptions.scrollEndThreshold) && (prevCount === 0 || merged.getItemKey(nextCount - 1) !== prevLastKey)) {
76831
- followOnAppend = behavior;
76927
+ if (behavior && nextCount > 0 && this.isAtEnd(prevOptions.scrollEndThreshold) && (prevCount === 0 || merged.getItemKey(nextCount - 1) !== prevLastKey)) {
76928
+ if (nextCount > prevCount || isAppendWithTrim(
76929
+ prevCount,
76930
+ nextCount,
76931
+ getPreviousKey,
76932
+ merged.getItemKey
76933
+ )) {
76934
+ followOnAppend = behavior;
76935
+ }
76832
76936
  }
76833
76937
  }
76834
76938
  }
@@ -76851,7 +76955,7 @@ focus outline in that case.
76851
76955
  const anchorItem = newMeasurements[idx];
76852
76956
  if (anchorItem) {
76853
76957
  const newOffset = Math.max(0, anchorItem.start + anchorOffset);
76854
- if (newOffset !== this.scrollOffset) {
76958
+ if (!followOnAppend && newOffset !== this.scrollOffset) {
76855
76959
  anchorDelta = newOffset - this.scrollOffset;
76856
76960
  this.scrollOffset = newOffset;
76857
76961
  anchorResolved = true;
@@ -76908,6 +77012,7 @@ focus outline in that case.
76908
77012
  this._iosDeferredAdjustment = 0;
76909
77013
  this._iosTouching = false;
76910
77014
  this._iosJustTouchEnded = false;
77015
+ this._clampedAdjustment = null;
76911
77016
  this.scrollElement = null;
76912
77017
  this.targetWindow = null;
76913
77018
  };
@@ -76917,7 +77022,7 @@ focus outline in that case.
76917
77022
  };
76918
77023
  };
76919
77024
  this._willUpdate = () => {
76920
- var _a;
77025
+ var _a, _b;
76921
77026
  const scrollElement = this.options.enabled ? this.options.getScrollElement() : null;
76922
77027
  if (this.scrollElement !== scrollElement) {
76923
77028
  this.cleanup();
@@ -76949,6 +77054,9 @@ focus outline in that case.
76949
77054
  offset = this._intendedScrollOffset;
76950
77055
  }
76951
77056
  this._intendedScrollOffset = null;
77057
+ if (this._clampedAdjustment !== null && Math.abs(offset - this._clampedAdjustment.maxAtWrite) >= 1.5) {
77058
+ this._clampedAdjustment = null;
77059
+ }
76952
77060
  this.scrollAdjustments = 0;
76953
77061
  const prevOffset = this.getScrollOffset();
76954
77062
  this.scrollDirection = isScrolling ? prevOffset === offset ? this.scrollDirection : prevOffset < offset ? "forward" : "backward" : null;
@@ -77016,7 +77124,11 @@ focus outline in that case.
77016
77124
  if (anchorDelta !== 0) {
77017
77125
  this._iosDeferredAdjustment += anchorDelta;
77018
77126
  }
77019
- } else {
77127
+ } else if (((_b = this.scrollState) == null ? void 0 : _b.behavior) === "smooth" && !approxEqual(
77128
+ this.getScrollOffset() - anchorDelta,
77129
+ this.scrollState.lastTargetOffset
77130
+ )) ;
77131
+ else {
77020
77132
  this._scrollToOffset(this.getScrollOffset(), {
77021
77133
  adjustments: void 0,
77022
77134
  behavior: void 0
@@ -77027,6 +77139,21 @@ focus outline in that case.
77027
77139
  this.scrollToEnd({ behavior: followOnAppend });
77028
77140
  }
77029
77141
  }
77142
+ this._retryClampedAdjustment();
77143
+ };
77144
+ this._retryClampedAdjustment = () => {
77145
+ if (this._clampedAdjustment === null || !this.scrollElement || !this.options.enabled) {
77146
+ return;
77147
+ }
77148
+ const { target, maxAtWrite } = this._clampedAdjustment;
77149
+ const max = this.getMaxScrollOffset();
77150
+ if (max > maxAtWrite + 0.5) {
77151
+ this._clampedAdjustment = target > max + 0.5 ? { target, maxAtWrite: max } : null;
77152
+ this._scrollToOffset(target, {
77153
+ adjustments: void 0,
77154
+ behavior: void 0
77155
+ });
77156
+ }
77030
77157
  };
77031
77158
  this._flushIosDeferredIfReady = () => {
77032
77159
  if (this._iosDeferredAdjustment === 0) return;
@@ -77110,9 +77237,11 @@ focus outline in that case.
77110
77237
  laneAssignmentMode,
77111
77238
  gap
77112
77239
  }, _itemSizeCacheVersion) => {
77240
+ var _a;
77113
77241
  const itemSizeCache = this.itemSizeCache;
77114
77242
  if (!enabled) {
77115
77243
  this.measurementsCache = [];
77244
+ this._singleLaneMeasurements = null;
77116
77245
  this.itemSizeCache.clear();
77117
77246
  this.laneAssignments.clear();
77118
77247
  return [];
@@ -77128,6 +77257,7 @@ focus outline in that case.
77128
77257
  this.lanesChangedFlag = false;
77129
77258
  this.lanesSettling = true;
77130
77259
  this.measurementsCache = [];
77260
+ this._singleLaneMeasurements = null;
77131
77261
  this.itemSizeCache.clear();
77132
77262
  this.laneAssignments.clear();
77133
77263
  this.pendingMin = null;
@@ -77145,13 +77275,13 @@ focus outline in that case.
77145
77275
  }
77146
77276
  if (lanes === 1) {
77147
77277
  const need = count * 2;
77148
- let flat = this._flatMeasurements;
77278
+ let flat = (_a = this._singleLaneMeasurements) == null ? void 0 : _a.flat;
77149
77279
  if (!flat || flat.length < need) {
77150
77280
  const next = new Float64Array(need);
77151
77281
  if (flat && min > 0) next.set(flat.subarray(0, min * 2));
77152
77282
  flat = next;
77153
- this._flatMeasurements = flat;
77154
77283
  }
77284
+ const items = min === 0 ? new Array(count) : this._singleLaneMeasurements.items.slice();
77155
77285
  let runningStart;
77156
77286
  if (min === 0) {
77157
77287
  runningStart = paddingStart + scrollMargin;
@@ -77161,13 +77291,15 @@ focus outline in that case.
77161
77291
  }
77162
77292
  for (let i = min; i < count; i++) {
77163
77293
  const key = getItemKey(i);
77294
+ items[i] = key;
77164
77295
  const measuredSize = itemSizeCache.get(key);
77165
77296
  const size = typeof measuredSize === "number" ? measuredSize : this.options.estimateSize(i);
77166
77297
  flat[i * 2] = runningStart;
77167
77298
  flat[i * 2 + 1] = size;
77168
77299
  runningStart += size + gap;
77169
77300
  }
77170
- const view = createLazyMeasurementsView(count, flat, getItemKey);
77301
+ this._singleLaneMeasurements = { flat, items };
77302
+ const view = createLazyMeasurementsView(items, flat);
77171
77303
  this.measurementsCache = view;
77172
77304
  return view;
77173
77305
  }
@@ -77262,7 +77394,7 @@ focus outline in that case.
77262
77394
  lanes,
77263
77395
  // Pass the typed array so binary search + forward-walk can read
77264
77396
  // start/end directly from Float64Array, skipping the Proxy traps.
77265
- lanes === 1 && this._flatMeasurements != null ? this._flatMeasurements : null
77397
+ lanes === 1 && this._singleLaneMeasurements !== null ? this._singleLaneMeasurements.flat : null
77266
77398
  );
77267
77399
  return this.range;
77268
77400
  },
@@ -77359,13 +77491,13 @@ focus outline in that case.
77359
77491
  }
77360
77492
  };
77361
77493
  this.resizeItem = (index, size) => {
77362
- var _a, _b;
77494
+ var _a, _b, _c;
77363
77495
  if (!this.isIndexInRange(index)) return;
77364
77496
  let cachedSize;
77365
77497
  let itemStart;
77366
77498
  let key;
77367
- const flat = this._flatMeasurements;
77368
- if (this.options.lanes === 1 && flat !== null) {
77499
+ const flat = (_a = this._singleLaneMeasurements) == null ? void 0 : _a.flat;
77500
+ if (this.options.lanes === 1 && flat != null) {
77369
77501
  key = this.options.getItemKey(index);
77370
77502
  itemStart = flat[index * 2];
77371
77503
  cachedSize = flat[index * 2 + 1];
@@ -77379,7 +77511,7 @@ focus outline in that case.
77379
77511
  const itemSize = this.itemSizeCache.get(key) ?? cachedSize;
77380
77512
  const delta = size - itemSize;
77381
77513
  if (delta !== 0) {
77382
- const wasAtEnd = this.options.anchorTo === "end" && ((_a = this.scrollState) == null ? void 0 : _a.behavior) !== "smooth" && this.getVirtualDistanceFromEnd() <= this.options.scrollEndThreshold;
77514
+ const wasAtEnd = this.options.anchorTo === "end" && ((_b = this.scrollState) == null ? void 0 : _b.behavior) !== "smooth" && this.getVirtualDistanceFromEnd() <= this.options.scrollEndThreshold;
77383
77515
  const prevTotalSize = wasAtEnd ? this.getTotalSize() : 0;
77384
77516
  const scrollOffsetWithAdj = this.getScrollOffset() + this.scrollAdjustments;
77385
77517
  const isFirstMeasure = !this.itemSizeCache.has(key);
@@ -77398,7 +77530,7 @@ focus outline in that case.
77398
77530
  // scrolling up" cascade.
77399
77531
  itemStart + itemSize <= scrollOffsetWithAdj && this.scrollDirection !== "backward"
77400
77532
  );
77401
- const shouldAdjustScroll = ((_b = this.scrollState) == null ? void 0 : _b.behavior) !== "smooth" && (this.shouldAdjustScrollPositionOnItemSizeChange !== void 0 ? this.shouldAdjustScrollPositionOnItemSizeChange(
77533
+ const shouldAdjustScroll = ((_c = this.scrollState) == null ? void 0 : _c.behavior) !== "smooth" && (this.shouldAdjustScrollPositionOnItemSizeChange !== void 0 ? this.shouldAdjustScrollPositionOnItemSizeChange(
77402
77534
  // The callback expects a VirtualItem; build one lazily only
77403
77535
  // when the consumer actually supplied a custom predicate.
77404
77536
  this.measurementsCache[index] ?? {
@@ -77426,6 +77558,7 @@ focus outline in that case.
77426
77558
  adjustedSync = this.applyScrollAdjustment(delta);
77427
77559
  }
77428
77560
  this.notify(adjustedSync);
77561
+ this._retryClampedAdjustment();
77429
77562
  }
77430
77563
  };
77431
77564
  this.getVirtualItems = memo(
@@ -77445,11 +77578,12 @@ focus outline in that case.
77445
77578
  }
77446
77579
  );
77447
77580
  this.getVirtualItemForOffset = (offset) => {
77581
+ var _a;
77448
77582
  const measurements = this.getMeasurements();
77449
77583
  if (measurements.length === 0) {
77450
77584
  return void 0;
77451
77585
  }
77452
- const flat = this._flatMeasurements;
77586
+ const flat = (_a = this._singleLaneMeasurements) == null ? void 0 : _a.flat;
77453
77587
  const useFlat = this.options.lanes === 1 && flat != null;
77454
77588
  const idx = findNearestBinarySearch(
77455
77589
  0,
@@ -77584,18 +77718,18 @@ focus outline in that case.
77584
77718
  });
77585
77719
  };
77586
77720
  this.getTotalSize = () => {
77587
- var _a;
77721
+ var _a, _b;
77588
77722
  const measurements = this.getMeasurements();
77589
77723
  let end;
77590
77724
  if (measurements.length === 0) {
77591
77725
  end = this.options.paddingStart;
77592
77726
  } else if (this.options.lanes === 1) {
77593
77727
  const lastIdx = measurements.length - 1;
77594
- const flat = this._flatMeasurements;
77728
+ const flat = (_a = this._singleLaneMeasurements) == null ? void 0 : _a.flat;
77595
77729
  if (flat != null) {
77596
77730
  end = flat[lastIdx * 2] + flat[lastIdx * 2 + 1];
77597
77731
  } else {
77598
- end = ((_a = measurements[lastIdx]) == null ? void 0 : _a.end) ?? 0;
77732
+ end = ((_b = measurements[lastIdx]) == null ? void 0 : _b.end) ?? 0;
77599
77733
  }
77600
77734
  } else {
77601
77735
  const endByLane = Array(this.options.lanes).fill(null);
@@ -77661,6 +77795,10 @@ focus outline in that case.
77661
77795
  this._iosDeferredAdjustment += delta;
77662
77796
  return false;
77663
77797
  } else {
77798
+ const target = this.getScrollOffset() + this.scrollAdjustments + delta;
77799
+ const el = this.scrollElement;
77800
+ const maxAtWrite = el !== null && ("scrollHeight" in el || "document" in el) ? this.getMaxScrollOffset() : null;
77801
+ this._clampedAdjustment = maxAtWrite !== null && target > maxAtWrite + 0.5 ? { target, maxAtWrite } : null;
77664
77802
  this._scrollToOffset(this.getScrollOffset(), {
77665
77803
  adjustments: this.scrollAdjustments += delta,
77666
77804
  behavior