@animus-ui/system 0.1.3 → 0.1.5

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 (47) hide show
  1. package/README.md +31 -6
  2. package/dist/Animus.d.ts +1 -1
  3. package/dist/Animus.d.ts.map +1 -1
  4. package/dist/AnimusExtended.d.ts +1 -1
  5. package/dist/AnimusExtended.d.ts.map +1 -1
  6. package/dist/SystemBuilder.d.ts +180 -11
  7. package/dist/SystemBuilder.d.ts.map +1 -1
  8. package/dist/assert-root-slot-B83scqPh.js +21 -0
  9. package/dist/asset.d.ts +25 -0
  10. package/dist/asset.d.ts.map +1 -0
  11. package/dist/compose.d.ts +3 -1
  12. package/dist/compose.d.ts.map +1 -1
  13. package/dist/compose.js +2 -1
  14. package/dist/composeWithContext.d.ts +3 -1
  15. package/dist/composeWithContext.d.ts.map +1 -1
  16. package/dist/composeWithContext.js +3 -2
  17. package/dist/conditions.d.ts +52 -4
  18. package/dist/conditions.d.ts.map +1 -1
  19. package/dist/{createComposedFamily-DJ2aqfqN.js → createComposedFamily-DhjtkyWd.js} +81 -7
  20. package/dist/groups/index.js +1 -1
  21. package/dist/index.d.ts +6 -5
  22. package/dist/index.d.ts.map +1 -1
  23. package/dist/index.js +887 -147
  24. package/dist/runtime/assert-root-slot.d.ts +17 -0
  25. package/dist/runtime/assert-root-slot.d.ts.map +1 -0
  26. package/dist/runtime/createComposedFamily.d.ts.map +1 -1
  27. package/dist/runtime/is-dev.d.ts +46 -0
  28. package/dist/runtime/is-dev.d.ts.map +1 -0
  29. package/dist/runtime/resolveClasses.d.ts +15 -7
  30. package/dist/runtime/resolveClasses.d.ts.map +1 -1
  31. package/dist/runtime/witness.d.ts +4 -2
  32. package/dist/runtime/witness.d.ts.map +1 -1
  33. package/dist/runtime-entry.js +1 -1
  34. package/dist/selectors.d.ts +5 -1
  35. package/dist/selectors.d.ts.map +1 -1
  36. package/dist/{size-CusLCguT.js → size-DHdmBc64.js} +35 -8
  37. package/dist/theme/createTheme.d.ts +125 -13
  38. package/dist/theme/createTheme.d.ts.map +1 -1
  39. package/dist/theme/index.d.ts +1 -1
  40. package/dist/theme/index.d.ts.map +1 -1
  41. package/dist/theme/resolveReferences.d.ts +49 -0
  42. package/dist/theme/resolveReferences.d.ts.map +1 -0
  43. package/dist/transforms/createTransform.d.ts +22 -0
  44. package/dist/transforms/createTransform.d.ts.map +1 -1
  45. package/dist/types/theme.d.ts +28 -4
  46. package/dist/types/theme.d.ts.map +1 -1
  47. package/package.json +2 -2
@@ -12,10 +12,11 @@
12
12
  * This module hosts BOTH the runtime registry and the authoring TYPE surface
13
13
  * (inc 04): the augmentable `Conditions`/`Selectors` publication, the
14
14
  * `ConditionsOf`/`SelectorsOf` extractors, the branded rejection types
15
- * (`UnknownConditionAlias`/`UnknownAtRule`), and the shallow `RawAtRuleKey`
16
- * shapes consumed by `ThemedCSSProps`' kind-dispatched arms. `addConditions()`
17
- * constrains values to `@media`/`@container`/`@supports`-prefixed strings at
18
- * the type level; `inferConditionKind` remains the runtime fail-loud check.
15
+ * (`UnknownConditionAlias`/`UnknownAtRule`, plus the cross-registry
16
+ * `ReservedBySelectorRegistry`/`ReservedByConditionRegistry`), and the shallow
17
+ * `RawAtRuleKey` shapes consumed by `ThemedCSSProps`' kind-dispatched arms.
18
+ * `addConditions()` constrains values to `AtRuleValue` at the type level;
19
+ * `inferConditionKind` remains the runtime fail-loud check.
19
20
  */
20
21
  /** The three condition kinds, inferred from the at-rule prefix of the value. */
21
22
  export type ConditionKind = 'media' | 'container' | 'supports';
@@ -84,6 +85,47 @@ export interface UnknownAtRule<K extends string> {
84
85
  readonly __unknownAtRule: K;
85
86
  readonly hint: `"${K}" is not a valid at-rule block key. At-rule keys must begin with "@media ", "@container ", or "@supports " followed by a parenthesized/feature tail.`;
86
87
  }
88
+ /**
89
+ * Branded rejection for an `addConditions()` key already owned by the SELECTOR
90
+ * registry — a built-in (`BuiltInSelectorAlias`) or one registered earlier in
91
+ * the chain. A name resolves through exactly one registry; the runtime throw in
92
+ * `mergeConditions` is this type's fail-loud backstop.
93
+ *
94
+ * The rejecting arm must be a real type, never a bare `never`: in VALUE
95
+ * position a `never` arm makes inference for the whole record fall back to the
96
+ * constraint, dropping BOTH the check and the literal key accumulation — the
97
+ * gate silently becomes a no-op.
98
+ *
99
+ * The static `BuiltInSelectorAlias`/`BuiltInConditionAlias` unions must stay in
100
+ * sync with `BUILT_IN_SELECTORS`/`BUILT_IN_CONDITIONS` (25 and 9 entries today)
101
+ * or this compile-time gate and the construction-time throw disagree.
102
+ */
103
+ export interface ReservedBySelectorRegistry<K extends string> {
104
+ readonly __reservedBySelectorRegistry: K;
105
+ readonly hint: `"${K}" is already a selector alias — condition and selector alias names must be disjoint. Rename this condition alias, or redefine the selector with .addSelectors().`;
106
+ }
107
+ /**
108
+ * Branded rejection for an `addSelectors()` key already owned by the CONDITION
109
+ * registry — a built-in (`BuiltInConditionAlias`) or one registered earlier in
110
+ * the chain. Mirror of `ReservedBySelectorRegistry`; the runtime throw in
111
+ * `addSelectors` is the backstop.
112
+ */
113
+ export interface ReservedByConditionRegistry<K extends string> {
114
+ readonly __reservedByConditionRegistry: K;
115
+ readonly hint: `"${K}" is already a condition alias — condition and selector alias names must be disjoint. Rename this selector alias, or redefine the condition with .addConditions().`;
116
+ }
117
+ /**
118
+ * The alias NAMES carried by a registered union, or `never` once that union has
119
+ * widened to the whole `_` pattern. Registering a non-literal record
120
+ * (`Record<`_${string}`, …>`) widens the phantom `Conds`/`Sels` union to
121
+ * `` `_${string}` ``; a gate that subtracted it verbatim would then match every
122
+ * subsequent key and reject legal aliases with a misleading brand. A widened
123
+ * registration must not poison the opposite-registry gate — it goes quiet and
124
+ * the construction-time throw stays the backstop for the names the type layer
125
+ * can no longer enumerate. Built-ins are subtracted separately and are
126
+ * unaffected.
127
+ */
128
+ export type NarrowedAliases<U extends string> = `_${string}` extends U ? never : U;
87
129
  /**
88
130
  * SHALLOW at-rule key shapes (design D9): prefix + tail only. Deep query-grammar
89
131
  * template literals are the repo's one known TS2589 zone (string-embedded
@@ -92,6 +134,12 @@ export interface UnknownAtRule<K extends string> {
92
134
  * rejects prefix typos (`@containr …`, `@medi …`) without a closed grammar.
93
135
  */
94
136
  export type RawAtRuleKey = `@media ${string}` | `@container ${string}` | `@supports ${string}`;
137
+ /**
138
+ * The at-rule VALUE shape `addConditions()` accepts. Same prefix-only principle
139
+ * as `RawAtRuleKey`, minus its trailing space — a value may open its query
140
+ * immediately (`@media(width>=40em)`).
141
+ */
142
+ export type AtRuleValue = `@media${string}` | `@container${string}` | `@supports${string}`;
95
143
  export interface ConditionAlias {
96
144
  /** Full at-rule condition string, e.g. `@media (prefers-reduced-motion: reduce)`. */
97
145
  value: string;
@@ -1 +1 @@
1
- {"version":3,"file":"conditions.d.ts","sourceRoot":"","sources":["../src/conditions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,gFAAgF;AAChF,MAAM,MAAM,aAAa,GAAG,OAAO,GAAG,WAAW,GAAG,UAAU,CAAC;AAY/D;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,MAAM,WAAW,UAAU;CAAG;AAE9B,OAAO,CAAC,MAAM,WAAW,EAAE,OAAO,MAAM,CAAC;AACzC,OAAO,CAAC,MAAM,UAAU,EAAE,OAAO,MAAM,CAAC;AAExC;;;;GAIG;AACH,MAAM,WAAW,aAAa,CAC5B,CAAC,SAAS,MAAM,GAAG,KAAK,EACxB,CAAC,SAAS,MAAM,GAAG,KAAK;IAExB,QAAQ,CAAC,CAAC,WAAW,CAAC,CAAC,EAAE,CAAC,CAAC;IAC3B,QAAQ,CAAC,CAAC,UAAU,CAAC,CAAC,EAAE,CAAC,CAAC;CAC3B;AAED,uEAAuE;AACvE,MAAM,MAAM,YAAY,CAAC,GAAG,IAC1B,GAAG,SAAS,aAAa,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,GAAG,CAAC,GAAG,KAAK,C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AO,MAAM,mBAAmB,EAAE,iBA0CjC,CAAC;AAUF;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,aAAa,CAS/D;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,eAAe,CAC7B,IAAI,EAAE,iBAAiB,EACvB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC9B,qBAAqB,GAAE,WAAW,CAAC,MAAM,CAAqB,GAC7D,iBAAiB,CA0BnB;AAED,oEAAoE;AACpE,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,iBAAiB,GAAG,MAAM,EAAE,CAEvE;AAED;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CACnC,GAAG,EAAE,iBAAiB,GACrB,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAMhC"}
@@ -1,9 +1,72 @@
1
+ import { t as assertRootSlot } from "./assert-root-slot-B83scqPh.js";
1
2
  import { Children, cloneElement, createElement, forwardRef, isValidElement } from "react";
2
- import { UNITLESS_PROPERTIES } from "@animus-ui/properties";
3
+ import { isUnitlessProperty } from "@animus-ui/properties";
4
+ //#region src/runtime/is-dev.ts
5
+ /**
6
+ * The runtime's dev-build signal, shared by every development-only path
7
+ * (drop diagnostic, reachability witness). Several hosts have to be satisfied
8
+ * at once, and they force this exact shape:
9
+ *
10
+ * - **Bundles built through an Animus plugin.** `__ANIMUS_DEV__` is a
11
+ * build-time define supplied by the Vite plugin's `config` hook and by the
12
+ * Next plugin's DefinePlugin entry, each keyed on its bundler's own
13
+ * dev/build signal. It is tested FIRST, and as the CONDITIONAL OF THE
14
+ * INITIALIZER ITSELF — not as an early return inside the IIFE below. That
15
+ * distinction is the whole point: define-replacement turns the test into
16
+ * `typeof false === 'boolean'`, and only in this position does the
17
+ * production minifier propagate the resulting constant into every `IS_DEV`
18
+ * reference, so the gated branches and their diagnostic strings leave the
19
+ * bundle entirely. Hidden inside the IIFE, the same guard collapses to a
20
+ * variable the minifier keeps, and every diagnostic string ships. Never
21
+ * "tidy" this ternary into the fallback.
22
+ * - **Browser bundles without the define.** `process.env.NODE_ENV` is a define
23
+ * token that Vite and Next rewrite to a string literal; `typeof process` is
24
+ * not rewritten by anything, so guarding the token with it strands every dev
25
+ * branch in a browser (no `process` global → the conjunction is false in dev
26
+ * too). The token must therefore be read bare.
27
+ * - **Next under Turbopack.** The Next plugin supplies the define from its
28
+ * `webpack()` hook, and a Turbopack-active run never calls that hook (the
29
+ * Turbopack path wires rules and aliases instead), so those builds carry no
30
+ * token and land on the `process.env.NODE_ENV` fallback below — correct
31
+ * answer, no elimination.
32
+ * - **QuickJS (the Rust system-loader).** It evaluates the system dist with no
33
+ * define pass and no `process`, so the `typeof` test is simply false and the
34
+ * bare read then throws ReferenceError at module scope — caught here, and
35
+ * not-dev is the correct answer for a loader that only reads config.
36
+ * `import.meta` is unavailable there (a script-context eval makes it a syntax
37
+ * error), so it is never used.
38
+ * - **Node (SSR, tests).** Reads the real `process.env.NODE_ENV`.
39
+ *
40
+ * Evaluated once, at module load: in every host the answer is fixed for the
41
+ * lifetime of the bundle.
42
+ *
43
+ * The define is the sanctioned foldable path, and the only one. The try/catch
44
+ * fallback is deliberately NOT foldable — a host that supplies no token keeps
45
+ * its (gated-off, never-executed) diagnostic strings, which is the accepted
46
+ * price of a diagnostic that actually fires in a browser dev build. Restore
47
+ * elimination by supplying the define from a bundler plugin.
48
+ */
49
+ const IS_DEV = typeof __ANIMUS_DEV__ === "boolean" ? __ANIMUS_DEV__ : (() => {
50
+ try {
51
+ if (typeof process !== "undefined" && typeof process.env === "undefined") return true;
52
+ return process.env.NODE_ENV !== "production";
53
+ } catch {
54
+ return false;
55
+ }
56
+ })();
57
+ //#endregion
3
58
  //#region src/runtime/witness.ts
59
+ /**
60
+ * Dev-mode reachability witness: records every class-resolution outcome into a
61
+ * bounded in-page ring buffer at globalThis.__ANIMUS_WITNESS__. Development
62
+ * only — a production build records nothing and never creates the handle
63
+ * (IS_DEV is false). See is-dev.ts for the define/fold story and which hosts
64
+ * eliminate this code rather than merely gate it off. The handle name is the
65
+ * greppable exclusion token.
66
+ */
4
67
  const WITNESS_CAP = 5e3;
5
68
  function recordWitness(component, prop, value, outcome) {
6
- if (typeof process === "undefined" || process.env?.NODE_ENV === "production") return;
69
+ if (!IS_DEV) return;
7
70
  const g = globalThis;
8
71
  const buf = g.__ANIMUS_WITNESS__ ??= [];
9
72
  buf.push({
@@ -17,11 +80,19 @@ function recordWitness(component, prop, value, outcome) {
17
80
  //#endregion
18
81
  //#region src/runtime/resolveClasses.ts
19
82
  /**
20
- * Apply unit fallback to a value for a given CSS property.
83
+ * Apply unit fallback to a value for the CSS properties the value lands on.
84
+ * `isUnitlessProperty` owns the spelling question, so either convention works.
85
+ *
86
+ * A mixed property set resolves to unitless: an unsuffixed number on a length
87
+ * property is dropped by the CSS parser, whereas `px` on a unitless property
88
+ * renders and silently changes layout — prefer the drop.
89
+ *
90
+ * An empty property list keeps the unconditional `px` — configs emitted before
91
+ * `property` was carried name no property at all.
21
92
  */
22
- function applyUnitFallback(value, cssProperty) {
93
+ function applyUnitFallback(value, cssProperties) {
23
94
  if (typeof value === "number") {
24
- if (UNITLESS_PROPERTIES.has(cssProperty)) return String(value);
95
+ if (cssProperties.some(isUnitlessProperty)) return String(value);
25
96
  return `${value}px`;
26
97
  }
27
98
  return String(value);
@@ -45,11 +116,13 @@ function resolveValue(value, dc) {
45
116
  const transformed = dc.transform ? dc.transform(scaleResolved) : scaleResolved;
46
117
  return String(transformed);
47
118
  }
48
- return applyUnitFallback(dc.transform ? dc.transform(value) : value, dc.varName);
119
+ const transformed = dc.transform ? dc.transform(value) : value;
120
+ if (typeof transformed !== "number") return String(transformed);
121
+ return applyUnitFallback(transformed, dc.properties && dc.properties.length > 0 ? dc.properties : dc.property ? [dc.property] : []);
49
122
  }
50
123
  const warnedDrops = /* @__PURE__ */ new Set();
51
124
  function warnDroppedValue(baseClassName, propName, serializedValue) {
52
- if (typeof process !== "undefined" && process.env?.NODE_ENV !== "production") {
125
+ if (IS_DEV) {
53
126
  const dedupeKey = `${baseClassName}|${propName}`;
54
127
  if (warnedDrops.has(dedupeKey)) return;
55
128
  warnedDrops.add(dedupeKey);
@@ -320,6 +393,7 @@ function createClassResolver(className, config, systemPropMap, dynamicPropConfig
320
393
  * no useContext, no hooks.
321
394
  */
322
395
  function createComposedFamily(slots, config) {
396
+ assertRootSlot(slots, "createComposedFamily");
323
397
  const { name } = config;
324
398
  const result = {};
325
399
  for (const [slotName, SourceComponent] of Object.entries(slots)) {
@@ -1,4 +1,4 @@
1
- import { a as borderShorthand, i as gridItemRatio, n as size, r as gridItem, s as createScale } from "../size-CusLCguT.js";
1
+ import { a as borderShorthand, i as gridItemRatio, n as size, o as createScale, r as gridItem } from "../size-DHdmBc64.js";
2
2
  //#region src/groups/index.ts
3
3
  const color = {
4
4
  color: {
package/dist/index.d.ts CHANGED
@@ -2,18 +2,19 @@ export { Animus, AnimusWithAll } from './Animus';
2
2
  export { AnimusExtended, AnimusExtendedWithAll } from './AnimusExtended';
3
3
  export { compose } from './compose';
4
4
  export type { KeyframeFrameMap, KeyframeRef, Keyframes } from './keyframes';
5
+ export { asset, ASSET_PLACEHOLDER_PREFIX, type AssetRef } from './asset.js';
5
6
  export { createComponent } from './runtime';
6
7
  export { createClassResolver } from './runtime/createClassResolver';
7
8
  export { createComposedFamily } from './runtime/createComposedFamily';
8
- export type { CreateKeyframesFactory, FontFace, FontFaceSrc, GlobalStyleBlock, GlobalStyleMap, GlobalStylesFactory, SerializedConfig, SystemInstance, } from './SystemBuilder';
9
+ export type { CreateKeyframesFactory, FontFace, FontFaceSrc, GlobalStyleBlock, GlobalStyleMap, GlobalStylesFactory, LibraryBundle, RegistrySnapshot, SerializedConfig, SystemBuilderStage, SystemInstance, } from './SystemBuilder';
9
10
  export { createSystem, SystemBuilder } from './SystemBuilder';
10
11
  export { createScale, numericOrStringScale, numericScale, stringScale, } from './scales/createScale';
11
- export { BUILT_IN_CONDITIONS, type ConditionAlias, type ConditionAliasMap, type ConditionKind, type Conditions, type ConditionsOf, type RawAtRuleKey, type RegistryBrand, type SelectorsOf, type UnknownAtRule, type UnknownConditionAlias, } from './conditions.js';
12
+ export { type AtRuleValue, BUILT_IN_CONDITIONS, type ConditionAlias, type ConditionAliasMap, type ConditionKind, type Conditions, type ConditionsOf, type NarrowedAliases, type RawAtRuleKey, type RegistryBrand, type ReservedByConditionRegistry, type ReservedBySelectorRegistry, type SelectorsOf, type UnknownAtRule, type UnknownConditionAlias, } from './conditions.js';
12
13
  export { BUILT_IN_SELECTORS, type SelectorAlias, type SelectorAliasMap, type Selectors, } from './selectors';
13
14
  export type { Assign, AssignValueIfUnmergable, ColorModeConfig, FindPath, KeyAsVariable, LiteralPaths, Mergable, Merge, MergeTheme, Path, PathToLiteral, PathValue, PrivateThemeKeys, SanitizeKey, } from './theme';
14
- export { createTheme, ThemeBuilder } from './theme';
15
+ export { createTheme, type Flatten, ThemeBuilder, type ThemeBuilderStage, } from './theme';
15
16
  export { borderShorthand } from './transforms/border';
16
- export { createTransform, type NamedTransform, type TransformFn, } from './transforms/createTransform';
17
+ export { areTransformsEqual, createTransform, type NamedTransform, type TransformFn, } from './transforms/createTransform';
17
18
  export { gridItem, gridItemRatio } from './transforms/grid';
18
19
  export { percentageOrAbsolute, size } from './transforms/size';
19
20
  export type { AnimusComponent, AnimusWrappedComponent, AnyBrandedComponent, ComposedFamily, SharedConfig, VariantPropsOf, } from './types/component';
@@ -21,5 +22,5 @@ export type { AbstractParser, BuiltInConditionAlias, BuiltInSelectorAlias, Compo
21
22
  export type { AbstractProps, MediaQueryMap, ResponsiveProp, ThemeProps, } from './types/props';
22
23
  export type { ArrayScale, MapScale } from './types/scales';
23
24
  export type { CSSObject } from './types/shared';
24
- export type { AbstractTheme, BaseTheme, BrowserColorSchemeConfig, ColorModeOptions, ColorTokenRef, ContextualVarRegistration, CSSColorValue, EmittedScales, EmittedTokenPaths, ScaleTokenRef, SerializedTheme, SystemPreferenceConfig, Theme, ThemeManifest, TokenScales, } from './types/theme';
25
+ export type { AbstractTheme, BaseTheme, BrowserColorSchemeConfig, ColorModeOptions, ColorTokenRef, ContextualVarRegistration, CSSColorValue, EmittedScales, EmittedTokenPaths, ScaleTokenRef, SerializedTheme, SystemPreferenceConfig, Theme, ThemeManifest, ThemeStructuralKey, TokenScales, } from './types/theme';
25
26
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAIzE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,YAAY,EAAE,gBAAgB,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE5E,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AACtE,YAAY,EACV,sBAAsB,EACtB,QAAQ,EACR,WAAW,EACX,gBAAgB,EAChB,cAAc,EACd,mBAAmB,EACnB,gBAAgB,EAChB,cAAc,GACf,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAE9D,OAAO,EACL,WAAW,EACX,oBAAoB,EACpB,YAAY,EACZ,WAAW,GACZ,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EACL,mBAAmB,EACnB,KAAK,cAAc,EACnB,KAAK,iBAAiB,EACtB,KAAK,aAAa,EAClB,KAAK,UAAU,EACf,KAAK,YAAY,EACjB,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,WAAW,EAChB,KAAK,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