@angular/core 18.2.9 → 18.2.11

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.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v18.2.9
2
+ * @license Angular v18.2.11
3
3
  * (c) 2010-2024 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v18.2.9
2
+ * @license Angular v18.2.11
3
3
  * (c) 2010-2024 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v18.2.9
2
+ * @license Angular v18.2.11
3
3
  * (c) 2010-2024 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v18.2.9
2
+ * @license Angular v18.2.11
3
3
  * (c) 2010-2024 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -175,10 +175,10 @@ class TestBedApplicationErrorHandler {
175
175
  throw e;
176
176
  }
177
177
  }
178
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: TestBedApplicationErrorHandler, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
179
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: TestBedApplicationErrorHandler }); }
178
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: TestBedApplicationErrorHandler, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
179
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: TestBedApplicationErrorHandler }); }
180
180
  }
181
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: TestBedApplicationErrorHandler, decorators: [{
181
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: TestBedApplicationErrorHandler, decorators: [{
182
182
  type: Injectable
183
183
  }] });
184
184
 
package/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v18.2.9
2
+ * @license Angular v18.2.11
3
3
  * (c) 2010-2024 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -1072,7 +1072,6 @@ export declare class ApplicationRef {
1072
1072
  * @param component Component to {@link ChangeDetectorRef#markForCheck mark for check}.
1073
1073
  *
1074
1074
  * @publicApi
1075
- * @globalApi ng
1076
1075
  */
1077
1076
  declare function applyChanges(component: {}): void;
1078
1077
 
@@ -4400,7 +4399,6 @@ export declare interface ForwardRefFn {
4400
4399
  * is no component associated with it.
4401
4400
  *
4402
4401
  * @publicApi
4403
- * @globalApi ng
4404
4402
  */
4405
4403
  declare function getComponent<T>(element: Element): T | null;
4406
4404
 
@@ -4414,7 +4412,6 @@ declare function getComponent<T>(element: Element): T | null;
4414
4412
  * inside any component.
4415
4413
  *
4416
4414
  * @publicApi
4417
- * @globalApi ng
4418
4415
  */
4419
4416
  declare function getContext<T extends {}>(element: Element): T | null;
4420
4417
 
@@ -4449,7 +4446,6 @@ declare function getDependenciesFromInjectable<T>(injector: Injector, token: Typ
4449
4446
  * @returns metadata of the passed directive or component
4450
4447
  *
4451
4448
  * @publicApi
4452
- * @globalApi ng
4453
4449
  */
4454
4450
  declare function getDirectiveMetadata(directiveOrComponentInstance: any): ɵComponentDebugMetadata | DirectiveDebugMetadata | null;
4455
4451
 
@@ -4461,7 +4457,6 @@ declare function getDirectiveMetadata(directiveOrComponentInstance: any): ɵComp
4461
4457
  * @returns Injector associated with the element, component or directive instance.
4462
4458
  *
4463
4459
  * @publicApi
4464
- * @globalApi ng
4465
4460
  */
4466
4461
  declare function getInjector(elementOrDir: Element | {}): Injector;
4467
4462
 
@@ -4530,7 +4525,6 @@ declare function getInjectorResolutionPath(injector: Injector): Injector[];
4530
4525
  * @returns Array of event listeners on the DOM element.
4531
4526
  *
4532
4527
  * @publicApi
4533
- * @globalApi ng
4534
4528
  */
4535
4529
  declare function getListeners(element: Element): Listener[];
4536
4530
 
@@ -4564,7 +4558,6 @@ export declare function getNgModuleById<T>(id: string): Type<T>;
4564
4558
  * part of a component view.
4565
4559
  *
4566
4560
  * @publicApi
4567
- * @globalApi ng
4568
4561
  */
4569
4562
  declare function getOwningComponent<T>(elementOrDir: Element | {}): T | null;
4570
4563
 
@@ -4584,7 +4577,6 @@ export declare function getPlatform(): PlatformRef | null;
4584
4577
  * @returns Root components associated with the target object.
4585
4578
  *
4586
4579
  * @publicApi
4587
- * @globalApi ng
4588
4580
  */
4589
4581
  declare function getRootComponents(elementOrDir: Element | {}): {}[];
4590
4582
 
@@ -4906,7 +4898,7 @@ declare type HostDirectiveBindingMap = {
4906
4898
  [publicName: string]: string;
4907
4899
  };
4908
4900
 
4909
- /** Values that can be used to define a host directive through the `HostDirectivesFeature`. */
4901
+ /** Value that can be used to configure a host directive. */
4910
4902
  declare type HostDirectiveConfig = Type<unknown> | {
4911
4903
  directive: Type<unknown>;
4912
4904
  inputs?: string[];
@@ -12758,8 +12750,17 @@ export declare interface ɵDirectiveDef<T> {
12758
12750
  * configuration. Host directives will be added to the map as they're being matched to the node.
12759
12751
  */
12760
12752
  findHostDirectiveDefs: ((currentDef: ɵDirectiveDef<unknown>, matchedDefs: ɵDirectiveDef<unknown>[], hostDirectiveDefs: HostDirectiveDefs) => void) | null;
12761
- /** Additional directives to be applied whenever the directive has been matched. */
12762
- hostDirectives: HostDirectiveDef[] | null;
12753
+ /**
12754
+ * Additional directives to be applied whenever the directive has been matched.
12755
+ *
12756
+ * `HostDirectiveConfig` objects represent a host directive that can be resolved eagerly and were
12757
+ * already pre-processed when the definition was created. A function needs to be resolved lazily
12758
+ * during directive matching, because it's a forward reference.
12759
+ *
12760
+ * **Note:** we can't `HostDirectiveConfig` in the array, because there's no way to distinguish if
12761
+ * a function in the array is a `Type` or a `() => HostDirectiveConfig[]`.
12762
+ */
12763
+ hostDirectives: (HostDirectiveDef | (() => HostDirectiveConfig[]))[] | null;
12763
12764
  setInput: (<U extends T>(this: ɵDirectiveDef<U>, instance: U, inputSignalNode: null | ɵInputSignalNode<unknown, unknown>, value: any, publicName: string, privateName: string) => void) | null;
12764
12765
  }
12765
12766
 
@@ -12867,7 +12868,6 @@ export declare function ɵgetDeferBlocks(lView: LView, deferBlocks: ɵDeferBlock
12867
12868
  * @returns Array of directives associated with the node.
12868
12869
  *
12869
12870
  * @publicApi
12870
- * @globalApi ng
12871
12871
  */
12872
12872
  export declare function ɵgetDirectives(node: Node): {}[];
12873
12873
 
@@ -12880,7 +12880,6 @@ export declare function ɵgetDirectives(node: Node): {}[];
12880
12880
  * @returns Host element of the target.
12881
12881
  *
12882
12882
  * @publicApi
12883
- * @globalApi ng
12884
12883
  */
12885
12884
  export declare function ɵgetHostElement(componentOrDirective: {}): Element;
12886
12885
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@angular/core",
3
- "version": "18.2.9",
3
+ "version": "18.2.11",
4
4
  "description": "Angular - the core framework",
5
5
  "author": "angular",
6
6
  "license": "MIT",
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v18.2.9
2
+ * @license Angular v18.2.11
3
3
  * (c) 2010-2024 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v18.2.9
2
+ * @license Angular v18.2.11
3
3
  * (c) 2010-2024 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v18.2.9
2
+ * @license Angular v18.2.11
3
3
  * (c) 2010-2024 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -5889,7 +5889,7 @@ var ShadowCss = class {
5889
5889
  });
5890
5890
  }
5891
5891
  _convertColonHostContext(cssText) {
5892
- return cssText.replace(_cssColonHostContextReGlobal, (selectorText, pseudoPrefix) => {
5892
+ return cssText.replace(_cssColonHostContextReGlobal, (selectorText) => {
5893
5893
  var _a2;
5894
5894
  const contextSelectorGroups = [[]];
5895
5895
  let match;
@@ -5904,7 +5904,7 @@ var ShadowCss = class {
5904
5904
  }
5905
5905
  selectorText = match[2];
5906
5906
  }
5907
- return contextSelectorGroups.map((contextSelectors) => _combineHostContextSelectors(contextSelectors, selectorText, pseudoPrefix)).join(", ");
5907
+ return contextSelectorGroups.map((contextSelectors) => combineHostContextSelectors(contextSelectors, selectorText)).join(", ");
5908
5908
  });
5909
5909
  }
5910
5910
  _convertShadowDOMSelectors(cssText) {
@@ -5915,12 +5915,7 @@ var ShadowCss = class {
5915
5915
  let selector = rule.selector;
5916
5916
  let content = rule.content;
5917
5917
  if (rule.selector[0] !== "@") {
5918
- selector = this._scopeSelector({
5919
- selector,
5920
- scopeSelector,
5921
- hostSelector,
5922
- isParentSelector: true
5923
- });
5918
+ selector = this._scopeSelector(rule.selector, scopeSelector, hostSelector);
5924
5919
  } else if (scopedAtRuleIdentifiers.some((atRule) => rule.selector.startsWith(atRule))) {
5925
5920
  content = this._scopeSelectors(rule.content, scopeSelector, hostSelector);
5926
5921
  } else if (rule.selector.startsWith("@font-face") || rule.selector.startsWith("@page")) {
@@ -5935,18 +5930,12 @@ var ShadowCss = class {
5935
5930
  return new CssRule(selector, rule.content);
5936
5931
  });
5937
5932
  }
5938
- _scopeSelector({ selector, scopeSelector, hostSelector, isParentSelector = false }) {
5939
- const selectorSplitRe = / ?,(?!(?:[^)(]*(?:\([^)(]*(?:\([^)(]*(?:\([^)(]*\)[^)(]*)*\)[^)(]*)*\)[^)(]*)*\))) ?/;
5940
- return selector.split(selectorSplitRe).map((part) => part.split(_shadowDeepSelectors)).map((deepParts) => {
5933
+ _scopeSelector(selector, scopeSelector, hostSelector) {
5934
+ return selector.split(/ ?, ?/).map((part) => part.split(_shadowDeepSelectors)).map((deepParts) => {
5941
5935
  const [shallowPart, ...otherParts] = deepParts;
5942
5936
  const applyScope = (shallowPart2) => {
5943
5937
  if (this._selectorNeedsScoping(shallowPart2, scopeSelector)) {
5944
- return this._applySelectorScope({
5945
- selector: shallowPart2,
5946
- scopeSelector,
5947
- hostSelector,
5948
- isParentSelector
5949
- });
5938
+ return this._applySelectorScope(shallowPart2, scopeSelector, hostSelector);
5950
5939
  } else {
5951
5940
  return shallowPart2;
5952
5941
  }
@@ -5968,15 +5957,15 @@ var ShadowCss = class {
5968
5957
  _polyfillHostRe.lastIndex = 0;
5969
5958
  if (_polyfillHostRe.test(selector)) {
5970
5959
  const replaceBy = `[${hostSelector}]`;
5971
- return selector.replace(_polyfillHostNoCombinatorReGlobal, (_hnc, selector2) => {
5972
- return selector2.replace(/([^:\)]*)(:*)(.*)/, (_, before, colon, after) => {
5960
+ return selector.replace(_polyfillHostNoCombinatorRe, (hnc, selector2) => {
5961
+ return selector2.replace(/([^:]*)(:*)(.*)/, (_, before, colon, after) => {
5973
5962
  return before + replaceBy + colon + after;
5974
5963
  });
5975
5964
  }).replace(_polyfillHostRe, replaceBy + " ");
5976
5965
  }
5977
5966
  return scopeSelector + " " + selector;
5978
5967
  }
5979
- _applySelectorScope({ selector, scopeSelector, hostSelector, isParentSelector }) {
5968
+ _applySelectorScope(selector, scopeSelector, hostSelector) {
5980
5969
  var _a2;
5981
5970
  const isRe = /\[is=([^\]]*)\]/g;
5982
5971
  scopeSelector = scopeSelector.replace(isRe, (_, ...parts) => parts[0]);
@@ -5988,10 +5977,6 @@ var ShadowCss = class {
5988
5977
  }
5989
5978
  if (p.includes(_polyfillHostNoCombinator)) {
5990
5979
  scopedP = this._applySimpleSelectorScope(p, scopeSelector, hostSelector);
5991
- if (_polyfillHostNoCombinatorWithinPseudoFunction.test(p)) {
5992
- const [_, before, colon, after] = scopedP.match(/([^:]*)(:*)(.*)/);
5993
- scopedP = before + attrName + colon + after;
5994
- }
5995
5980
  } else {
5996
5981
  const t = p.replace(_polyfillHostRe, "");
5997
5982
  if (t.length > 0) {
@@ -6003,52 +5988,29 @@ var ShadowCss = class {
6003
5988
  }
6004
5989
  return scopedP;
6005
5990
  };
6006
- const _pseudoFunctionAwareScopeSelectorPart = (selectorPart) => {
6007
- let scopedPart = "";
6008
- const cssPrefixWithPseudoSelectorFunctionMatch = selectorPart.match(_cssPrefixWithPseudoSelectorFunction);
6009
- if (cssPrefixWithPseudoSelectorFunctionMatch) {
6010
- const [cssPseudoSelectorFunction] = cssPrefixWithPseudoSelectorFunctionMatch;
6011
- const selectorToScope = selectorPart.slice(cssPseudoSelectorFunction.length, -1);
6012
- if (selectorToScope.includes(_polyfillHostNoCombinator)) {
6013
- this._shouldScopeIndicator = true;
6014
- }
6015
- const scopedInnerPart = this._scopeSelector({
6016
- selector: selectorToScope,
6017
- scopeSelector,
6018
- hostSelector
6019
- });
6020
- scopedPart = `${cssPseudoSelectorFunction}${scopedInnerPart})`;
6021
- } else {
6022
- this._shouldScopeIndicator = this._shouldScopeIndicator || selectorPart.includes(_polyfillHostNoCombinator);
6023
- scopedPart = this._shouldScopeIndicator ? _scopeSelectorPart(selectorPart) : selectorPart;
6024
- }
6025
- return scopedPart;
6026
- };
6027
- if (isParentSelector) {
6028
- this._safeSelector = new SafeSelector(selector);
6029
- selector = this._safeSelector.content();
6030
- }
5991
+ const safeContent = new SafeSelector(selector);
5992
+ selector = safeContent.content();
6031
5993
  let scopedSelector = "";
6032
5994
  let startIndex = 0;
6033
5995
  let res;
6034
- const sep = /( |>|\+|~(?!=))(?!([^)(]*(?:\([^)(]*(?:\([^)(]*(?:\([^)(]*\)[^)(]*)*\)[^)(]*)*\)[^)(]*)*\)))\s*/g;
5996
+ const sep = /( |>|\+|~(?!=))\s*/g;
6035
5997
  const hasHost = selector.includes(_polyfillHostNoCombinator);
6036
- if (isParentSelector || this._shouldScopeIndicator) {
6037
- this._shouldScopeIndicator = !hasHost;
6038
- }
5998
+ let shouldScope = !hasHost;
6039
5999
  while ((res = sep.exec(selector)) !== null) {
6040
6000
  const separator = res[1];
6041
6001
  const part2 = selector.slice(startIndex, res.index);
6042
6002
  if (part2.match(/__esc-ph-(\d+)__/) && ((_a2 = selector[res.index + 1]) == null ? void 0 : _a2.match(/[a-fA-F\d]/))) {
6043
6003
  continue;
6044
6004
  }
6045
- const scopedPart = _pseudoFunctionAwareScopeSelectorPart(part2);
6005
+ shouldScope = shouldScope || part2.includes(_polyfillHostNoCombinator);
6006
+ const scopedPart = shouldScope ? _scopeSelectorPart(part2) : part2;
6046
6007
  scopedSelector += `${scopedPart} ${separator} `;
6047
6008
  startIndex = sep.lastIndex;
6048
6009
  }
6049
6010
  const part = selector.substring(startIndex);
6050
- scopedSelector += _pseudoFunctionAwareScopeSelectorPart(part);
6051
- return this._safeSelector.restore(scopedSelector);
6011
+ shouldScope = shouldScope || part.includes(_polyfillHostNoCombinator);
6012
+ scopedSelector += shouldScope ? _scopeSelectorPart(part) : part;
6013
+ return safeContent.restore(scopedSelector);
6052
6014
  }
6053
6015
  _insertPolyfillHostInCssText(selector) {
6054
6016
  return selector.replace(_colonHostContextRe, _polyfillHostContext).replace(_colonHostRe, _polyfillHost);
@@ -6087,8 +6049,6 @@ var SafeSelector = class {
6087
6049
  });
6088
6050
  }
6089
6051
  };
6090
- var _cssScopedPseudoFunctionPrefix = "(:(where|is)\\()?";
6091
- var _cssPrefixWithPseudoSelectorFunction = /^:(where|is)\(/i;
6092
6052
  var _cssContentNextSelectorRe = /polyfill-next-selector[^}]*content:[\s]*?(['"])(.*?)\1[;\s]*}([^{]*?){/gim;
6093
6053
  var _cssContentRuleRe = /(polyfill-rule)[^}]*(content:[\s]*(['"])(.*?)\3)[;\s]*[^}]*}/gim;
6094
6054
  var _cssContentUnscopedRuleRe = /(polyfill-unscoped-rule)[^}]*(content:[\s]*(['"])(.*?)\3)[;\s]*[^}]*}/gim;
@@ -6096,12 +6056,10 @@ var _polyfillHost = "-shadowcsshost";
6096
6056
  var _polyfillHostContext = "-shadowcsscontext";
6097
6057
  var _parenSuffix = "(?:\\(((?:\\([^)(]*\\)|[^)(]*)+?)\\))?([^,{]*)";
6098
6058
  var _cssColonHostRe = new RegExp(_polyfillHost + _parenSuffix, "gim");
6099
- var _cssColonHostContextReGlobal = new RegExp(_cssScopedPseudoFunctionPrefix + "(" + _polyfillHostContext + _parenSuffix + ")", "gim");
6059
+ var _cssColonHostContextReGlobal = new RegExp(_polyfillHostContext + _parenSuffix, "gim");
6100
6060
  var _cssColonHostContextRe = new RegExp(_polyfillHostContext + _parenSuffix, "im");
6101
6061
  var _polyfillHostNoCombinator = _polyfillHost + "-no-combinator";
6102
- var _polyfillHostNoCombinatorWithinPseudoFunction = new RegExp(`:.*\\(.*${_polyfillHostNoCombinator}.*\\)`);
6103
6062
  var _polyfillHostNoCombinatorRe = /-shadowcsshost-no-combinator([^\s]*)/;
6104
- var _polyfillHostNoCombinatorReGlobal = new RegExp(_polyfillHostNoCombinatorRe, "g");
6105
6063
  var _shadowDOMSelectorsRe = [
6106
6064
  /::shadow/g,
6107
6065
  /::content/g,
@@ -6236,7 +6194,7 @@ function unescapeInStrings(input) {
6236
6194
  function unescapeQuotes(str, isQuoted) {
6237
6195
  return !isQuoted ? str : str.replace(/((?:^|[^\\])(?:\\\\)*)\\(?=['"])/g, "$1");
6238
6196
  }
6239
- function _combineHostContextSelectors(contextSelectors, otherSelectors, pseudoPrefix = "") {
6197
+ function combineHostContextSelectors(contextSelectors, otherSelectors) {
6240
6198
  const hostMarker = _polyfillHostNoCombinator;
6241
6199
  _polyfillHostRe.lastIndex = 0;
6242
6200
  const otherSelectorsHasHost = _polyfillHostRe.test(otherSelectors);
@@ -6254,7 +6212,7 @@ function _combineHostContextSelectors(contextSelectors, otherSelectors, pseudoPr
6254
6212
  combined[i] = contextSelector + previousSelectors;
6255
6213
  }
6256
6214
  }
6257
- return combined.map((s) => otherSelectorsHasHost ? `${pseudoPrefix}${s}${otherSelectors}` : `${pseudoPrefix}${s}${hostMarker}${otherSelectors}, ${pseudoPrefix}${s} ${hostMarker}${otherSelectors}`).join(",");
6215
+ return combined.map((s) => otherSelectorsHasHost ? `${s}${otherSelectors}` : `${s}${hostMarker}${otherSelectors}, ${s} ${hostMarker}${otherSelectors}`).join(",");
6258
6216
  }
6259
6217
  function repeatGroups(groups, multiples) {
6260
6218
  const length = groups.length;
@@ -23493,7 +23451,7 @@ function publishFacade(global) {
23493
23451
  }
23494
23452
 
23495
23453
  // bazel-out/k8-fastbuild/bin/packages/compiler/src/version.mjs
23496
- var VERSION2 = new Version("18.2.9");
23454
+ var VERSION2 = new Version("18.2.11");
23497
23455
 
23498
23456
  // bazel-out/k8-fastbuild/bin/packages/compiler/src/i18n/extractor_merger.mjs
23499
23457
  var _VisitorMode;
@@ -5889,7 +5889,7 @@ var ShadowCss = class {
5889
5889
  });
5890
5890
  }
5891
5891
  _convertColonHostContext(cssText) {
5892
- return cssText.replace(_cssColonHostContextReGlobal, (selectorText, pseudoPrefix) => {
5892
+ return cssText.replace(_cssColonHostContextReGlobal, (selectorText) => {
5893
5893
  var _a2;
5894
5894
  const contextSelectorGroups = [[]];
5895
5895
  let match;
@@ -5904,7 +5904,7 @@ var ShadowCss = class {
5904
5904
  }
5905
5905
  selectorText = match[2];
5906
5906
  }
5907
- return contextSelectorGroups.map((contextSelectors) => _combineHostContextSelectors(contextSelectors, selectorText, pseudoPrefix)).join(", ");
5907
+ return contextSelectorGroups.map((contextSelectors) => combineHostContextSelectors(contextSelectors, selectorText)).join(", ");
5908
5908
  });
5909
5909
  }
5910
5910
  _convertShadowDOMSelectors(cssText) {
@@ -5915,12 +5915,7 @@ var ShadowCss = class {
5915
5915
  let selector = rule.selector;
5916
5916
  let content = rule.content;
5917
5917
  if (rule.selector[0] !== "@") {
5918
- selector = this._scopeSelector({
5919
- selector,
5920
- scopeSelector,
5921
- hostSelector,
5922
- isParentSelector: true
5923
- });
5918
+ selector = this._scopeSelector(rule.selector, scopeSelector, hostSelector);
5924
5919
  } else if (scopedAtRuleIdentifiers.some((atRule) => rule.selector.startsWith(atRule))) {
5925
5920
  content = this._scopeSelectors(rule.content, scopeSelector, hostSelector);
5926
5921
  } else if (rule.selector.startsWith("@font-face") || rule.selector.startsWith("@page")) {
@@ -5935,18 +5930,12 @@ var ShadowCss = class {
5935
5930
  return new CssRule(selector, rule.content);
5936
5931
  });
5937
5932
  }
5938
- _scopeSelector({ selector, scopeSelector, hostSelector, isParentSelector = false }) {
5939
- const selectorSplitRe = / ?,(?!(?:[^)(]*(?:\([^)(]*(?:\([^)(]*(?:\([^)(]*\)[^)(]*)*\)[^)(]*)*\)[^)(]*)*\))) ?/;
5940
- return selector.split(selectorSplitRe).map((part) => part.split(_shadowDeepSelectors)).map((deepParts) => {
5933
+ _scopeSelector(selector, scopeSelector, hostSelector) {
5934
+ return selector.split(/ ?, ?/).map((part) => part.split(_shadowDeepSelectors)).map((deepParts) => {
5941
5935
  const [shallowPart, ...otherParts] = deepParts;
5942
5936
  const applyScope = (shallowPart2) => {
5943
5937
  if (this._selectorNeedsScoping(shallowPart2, scopeSelector)) {
5944
- return this._applySelectorScope({
5945
- selector: shallowPart2,
5946
- scopeSelector,
5947
- hostSelector,
5948
- isParentSelector
5949
- });
5938
+ return this._applySelectorScope(shallowPart2, scopeSelector, hostSelector);
5950
5939
  } else {
5951
5940
  return shallowPart2;
5952
5941
  }
@@ -5968,15 +5957,15 @@ var ShadowCss = class {
5968
5957
  _polyfillHostRe.lastIndex = 0;
5969
5958
  if (_polyfillHostRe.test(selector)) {
5970
5959
  const replaceBy = `[${hostSelector}]`;
5971
- return selector.replace(_polyfillHostNoCombinatorReGlobal, (_hnc, selector2) => {
5972
- return selector2.replace(/([^:\)]*)(:*)(.*)/, (_, before, colon, after) => {
5960
+ return selector.replace(_polyfillHostNoCombinatorRe, (hnc, selector2) => {
5961
+ return selector2.replace(/([^:]*)(:*)(.*)/, (_, before, colon, after) => {
5973
5962
  return before + replaceBy + colon + after;
5974
5963
  });
5975
5964
  }).replace(_polyfillHostRe, replaceBy + " ");
5976
5965
  }
5977
5966
  return scopeSelector + " " + selector;
5978
5967
  }
5979
- _applySelectorScope({ selector, scopeSelector, hostSelector, isParentSelector }) {
5968
+ _applySelectorScope(selector, scopeSelector, hostSelector) {
5980
5969
  var _a2;
5981
5970
  const isRe = /\[is=([^\]]*)\]/g;
5982
5971
  scopeSelector = scopeSelector.replace(isRe, (_, ...parts) => parts[0]);
@@ -5988,10 +5977,6 @@ var ShadowCss = class {
5988
5977
  }
5989
5978
  if (p.includes(_polyfillHostNoCombinator)) {
5990
5979
  scopedP = this._applySimpleSelectorScope(p, scopeSelector, hostSelector);
5991
- if (_polyfillHostNoCombinatorWithinPseudoFunction.test(p)) {
5992
- const [_, before, colon, after] = scopedP.match(/([^:]*)(:*)(.*)/);
5993
- scopedP = before + attrName + colon + after;
5994
- }
5995
5980
  } else {
5996
5981
  const t = p.replace(_polyfillHostRe, "");
5997
5982
  if (t.length > 0) {
@@ -6003,52 +5988,29 @@ var ShadowCss = class {
6003
5988
  }
6004
5989
  return scopedP;
6005
5990
  };
6006
- const _pseudoFunctionAwareScopeSelectorPart = (selectorPart) => {
6007
- let scopedPart = "";
6008
- const cssPrefixWithPseudoSelectorFunctionMatch = selectorPart.match(_cssPrefixWithPseudoSelectorFunction);
6009
- if (cssPrefixWithPseudoSelectorFunctionMatch) {
6010
- const [cssPseudoSelectorFunction] = cssPrefixWithPseudoSelectorFunctionMatch;
6011
- const selectorToScope = selectorPart.slice(cssPseudoSelectorFunction.length, -1);
6012
- if (selectorToScope.includes(_polyfillHostNoCombinator)) {
6013
- this._shouldScopeIndicator = true;
6014
- }
6015
- const scopedInnerPart = this._scopeSelector({
6016
- selector: selectorToScope,
6017
- scopeSelector,
6018
- hostSelector
6019
- });
6020
- scopedPart = `${cssPseudoSelectorFunction}${scopedInnerPart})`;
6021
- } else {
6022
- this._shouldScopeIndicator = this._shouldScopeIndicator || selectorPart.includes(_polyfillHostNoCombinator);
6023
- scopedPart = this._shouldScopeIndicator ? _scopeSelectorPart(selectorPart) : selectorPart;
6024
- }
6025
- return scopedPart;
6026
- };
6027
- if (isParentSelector) {
6028
- this._safeSelector = new SafeSelector(selector);
6029
- selector = this._safeSelector.content();
6030
- }
5991
+ const safeContent = new SafeSelector(selector);
5992
+ selector = safeContent.content();
6031
5993
  let scopedSelector = "";
6032
5994
  let startIndex = 0;
6033
5995
  let res;
6034
- const sep = /( |>|\+|~(?!=))(?!([^)(]*(?:\([^)(]*(?:\([^)(]*(?:\([^)(]*\)[^)(]*)*\)[^)(]*)*\)[^)(]*)*\)))\s*/g;
5996
+ const sep = /( |>|\+|~(?!=))\s*/g;
6035
5997
  const hasHost = selector.includes(_polyfillHostNoCombinator);
6036
- if (isParentSelector || this._shouldScopeIndicator) {
6037
- this._shouldScopeIndicator = !hasHost;
6038
- }
5998
+ let shouldScope = !hasHost;
6039
5999
  while ((res = sep.exec(selector)) !== null) {
6040
6000
  const separator = res[1];
6041
6001
  const part2 = selector.slice(startIndex, res.index);
6042
6002
  if (part2.match(/__esc-ph-(\d+)__/) && ((_a2 = selector[res.index + 1]) == null ? void 0 : _a2.match(/[a-fA-F\d]/))) {
6043
6003
  continue;
6044
6004
  }
6045
- const scopedPart = _pseudoFunctionAwareScopeSelectorPart(part2);
6005
+ shouldScope = shouldScope || part2.includes(_polyfillHostNoCombinator);
6006
+ const scopedPart = shouldScope ? _scopeSelectorPart(part2) : part2;
6046
6007
  scopedSelector += `${scopedPart} ${separator} `;
6047
6008
  startIndex = sep.lastIndex;
6048
6009
  }
6049
6010
  const part = selector.substring(startIndex);
6050
- scopedSelector += _pseudoFunctionAwareScopeSelectorPart(part);
6051
- return this._safeSelector.restore(scopedSelector);
6011
+ shouldScope = shouldScope || part.includes(_polyfillHostNoCombinator);
6012
+ scopedSelector += shouldScope ? _scopeSelectorPart(part) : part;
6013
+ return safeContent.restore(scopedSelector);
6052
6014
  }
6053
6015
  _insertPolyfillHostInCssText(selector) {
6054
6016
  return selector.replace(_colonHostContextRe, _polyfillHostContext).replace(_colonHostRe, _polyfillHost);
@@ -6087,8 +6049,6 @@ var SafeSelector = class {
6087
6049
  });
6088
6050
  }
6089
6051
  };
6090
- var _cssScopedPseudoFunctionPrefix = "(:(where|is)\\()?";
6091
- var _cssPrefixWithPseudoSelectorFunction = /^:(where|is)\(/i;
6092
6052
  var _cssContentNextSelectorRe = /polyfill-next-selector[^}]*content:[\s]*?(['"])(.*?)\1[;\s]*}([^{]*?){/gim;
6093
6053
  var _cssContentRuleRe = /(polyfill-rule)[^}]*(content:[\s]*(['"])(.*?)\3)[;\s]*[^}]*}/gim;
6094
6054
  var _cssContentUnscopedRuleRe = /(polyfill-unscoped-rule)[^}]*(content:[\s]*(['"])(.*?)\3)[;\s]*[^}]*}/gim;
@@ -6096,12 +6056,10 @@ var _polyfillHost = "-shadowcsshost";
6096
6056
  var _polyfillHostContext = "-shadowcsscontext";
6097
6057
  var _parenSuffix = "(?:\\(((?:\\([^)(]*\\)|[^)(]*)+?)\\))?([^,{]*)";
6098
6058
  var _cssColonHostRe = new RegExp(_polyfillHost + _parenSuffix, "gim");
6099
- var _cssColonHostContextReGlobal = new RegExp(_cssScopedPseudoFunctionPrefix + "(" + _polyfillHostContext + _parenSuffix + ")", "gim");
6059
+ var _cssColonHostContextReGlobal = new RegExp(_polyfillHostContext + _parenSuffix, "gim");
6100
6060
  var _cssColonHostContextRe = new RegExp(_polyfillHostContext + _parenSuffix, "im");
6101
6061
  var _polyfillHostNoCombinator = _polyfillHost + "-no-combinator";
6102
- var _polyfillHostNoCombinatorWithinPseudoFunction = new RegExp(`:.*\\(.*${_polyfillHostNoCombinator}.*\\)`);
6103
6062
  var _polyfillHostNoCombinatorRe = /-shadowcsshost-no-combinator([^\s]*)/;
6104
- var _polyfillHostNoCombinatorReGlobal = new RegExp(_polyfillHostNoCombinatorRe, "g");
6105
6063
  var _shadowDOMSelectorsRe = [
6106
6064
  /::shadow/g,
6107
6065
  /::content/g,
@@ -6236,7 +6194,7 @@ function unescapeInStrings(input) {
6236
6194
  function unescapeQuotes(str, isQuoted) {
6237
6195
  return !isQuoted ? str : str.replace(/((?:^|[^\\])(?:\\\\)*)\\(?=['"])/g, "$1");
6238
6196
  }
6239
- function _combineHostContextSelectors(contextSelectors, otherSelectors, pseudoPrefix = "") {
6197
+ function combineHostContextSelectors(contextSelectors, otherSelectors) {
6240
6198
  const hostMarker = _polyfillHostNoCombinator;
6241
6199
  _polyfillHostRe.lastIndex = 0;
6242
6200
  const otherSelectorsHasHost = _polyfillHostRe.test(otherSelectors);
@@ -6254,7 +6212,7 @@ function _combineHostContextSelectors(contextSelectors, otherSelectors, pseudoPr
6254
6212
  combined[i] = contextSelector + previousSelectors;
6255
6213
  }
6256
6214
  }
6257
- return combined.map((s) => otherSelectorsHasHost ? `${pseudoPrefix}${s}${otherSelectors}` : `${pseudoPrefix}${s}${hostMarker}${otherSelectors}, ${pseudoPrefix}${s} ${hostMarker}${otherSelectors}`).join(",");
6215
+ return combined.map((s) => otherSelectorsHasHost ? `${s}${otherSelectors}` : `${s}${hostMarker}${otherSelectors}, ${s} ${hostMarker}${otherSelectors}`).join(",");
6258
6216
  }
6259
6217
  function repeatGroups(groups, multiples) {
6260
6218
  const length = groups.length;
@@ -23493,7 +23451,7 @@ function publishFacade(global) {
23493
23451
  }
23494
23452
 
23495
23453
  // bazel-out/k8-fastbuild/bin/packages/compiler/src/version.mjs
23496
- var VERSION2 = new Version("18.2.9");
23454
+ var VERSION2 = new Version("18.2.11");
23497
23455
 
23498
23456
  // bazel-out/k8-fastbuild/bin/packages/compiler/src/i18n/extractor_merger.mjs
23499
23457
  var _VisitorMode;