@cute-widgets/base 20.0.1

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 (183) hide show
  1. package/CHANGELOG.md +1 -0
  2. package/LICENSE.md +191 -0
  3. package/README.md +190 -0
  4. package/abstract/index.d.ts +327 -0
  5. package/alert/index.d.ts +68 -0
  6. package/autocomplete/index.d.ts +442 -0
  7. package/badge/index.d.ts +26 -0
  8. package/bottom-sheet/index.d.ts +231 -0
  9. package/button/index.d.ts +182 -0
  10. package/button-toggle/index.d.ts +225 -0
  11. package/card/index.d.ts +163 -0
  12. package/checkbox/index.d.ts +174 -0
  13. package/chips/index.d.ts +963 -0
  14. package/collapse/index.d.ts +97 -0
  15. package/core/animation/index.d.ts +43 -0
  16. package/core/datetime/index.d.ts +404 -0
  17. package/core/directives/index.d.ts +168 -0
  18. package/core/error/index.d.ts +74 -0
  19. package/core/index.d.ts +1039 -0
  20. package/core/interfaces/index.d.ts +114 -0
  21. package/core/layout/index.d.ts +53 -0
  22. package/core/line/index.d.ts +37 -0
  23. package/core/nav/index.d.ts +321 -0
  24. package/core/observers/index.d.ts +124 -0
  25. package/core/option/index.d.ts +185 -0
  26. package/core/pipes/index.d.ts +53 -0
  27. package/core/ripple/index.d.ts +66 -0
  28. package/core/testing/index.d.ts +154 -0
  29. package/core/theming/index.d.ts +118 -0
  30. package/core/types/index.d.ts +53 -0
  31. package/core/utils/index.d.ts +129 -0
  32. package/cute-widgets-base-20.0.1.tgz +0 -0
  33. package/datepicker/index.d.ts +1817 -0
  34. package/dialog/index.d.ts +484 -0
  35. package/divider/index.d.ts +24 -0
  36. package/expansion/README.md +8 -0
  37. package/expansion/index.d.ts +308 -0
  38. package/fesm2022/cute-widgets-base-abstract.mjs +547 -0
  39. package/fesm2022/cute-widgets-base-abstract.mjs.map +1 -0
  40. package/fesm2022/cute-widgets-base-alert.mjs +198 -0
  41. package/fesm2022/cute-widgets-base-alert.mjs.map +1 -0
  42. package/fesm2022/cute-widgets-base-autocomplete.mjs +1217 -0
  43. package/fesm2022/cute-widgets-base-autocomplete.mjs.map +1 -0
  44. package/fesm2022/cute-widgets-base-badge.mjs +75 -0
  45. package/fesm2022/cute-widgets-base-badge.mjs.map +1 -0
  46. package/fesm2022/cute-widgets-base-bottom-sheet.mjs +416 -0
  47. package/fesm2022/cute-widgets-base-bottom-sheet.mjs.map +1 -0
  48. package/fesm2022/cute-widgets-base-button-toggle.mjs +640 -0
  49. package/fesm2022/cute-widgets-base-button-toggle.mjs.map +1 -0
  50. package/fesm2022/cute-widgets-base-button.mjs +546 -0
  51. package/fesm2022/cute-widgets-base-button.mjs.map +1 -0
  52. package/fesm2022/cute-widgets-base-card.mjs +471 -0
  53. package/fesm2022/cute-widgets-base-card.mjs.map +1 -0
  54. package/fesm2022/cute-widgets-base-checkbox.mjs +390 -0
  55. package/fesm2022/cute-widgets-base-checkbox.mjs.map +1 -0
  56. package/fesm2022/cute-widgets-base-chips.mjs +2360 -0
  57. package/fesm2022/cute-widgets-base-chips.mjs.map +1 -0
  58. package/fesm2022/cute-widgets-base-collapse.mjs +259 -0
  59. package/fesm2022/cute-widgets-base-collapse.mjs.map +1 -0
  60. package/fesm2022/cute-widgets-base-core-animation.mjs +53 -0
  61. package/fesm2022/cute-widgets-base-core-animation.mjs.map +1 -0
  62. package/fesm2022/cute-widgets-base-core-datetime.mjs +568 -0
  63. package/fesm2022/cute-widgets-base-core-datetime.mjs.map +1 -0
  64. package/fesm2022/cute-widgets-base-core-directives.mjs +404 -0
  65. package/fesm2022/cute-widgets-base-core-directives.mjs.map +1 -0
  66. package/fesm2022/cute-widgets-base-core-error.mjs +105 -0
  67. package/fesm2022/cute-widgets-base-core-error.mjs.map +1 -0
  68. package/fesm2022/cute-widgets-base-core-interfaces.mjs +22 -0
  69. package/fesm2022/cute-widgets-base-core-interfaces.mjs.map +1 -0
  70. package/fesm2022/cute-widgets-base-core-layout.mjs +74 -0
  71. package/fesm2022/cute-widgets-base-core-layout.mjs.map +1 -0
  72. package/fesm2022/cute-widgets-base-core-line.mjs +87 -0
  73. package/fesm2022/cute-widgets-base-core-line.mjs.map +1 -0
  74. package/fesm2022/cute-widgets-base-core-nav.mjs +863 -0
  75. package/fesm2022/cute-widgets-base-core-nav.mjs.map +1 -0
  76. package/fesm2022/cute-widgets-base-core-observers.mjs +304 -0
  77. package/fesm2022/cute-widgets-base-core-observers.mjs.map +1 -0
  78. package/fesm2022/cute-widgets-base-core-option.mjs +373 -0
  79. package/fesm2022/cute-widgets-base-core-option.mjs.map +1 -0
  80. package/fesm2022/cute-widgets-base-core-pipes.mjs +97 -0
  81. package/fesm2022/cute-widgets-base-core-pipes.mjs.map +1 -0
  82. package/fesm2022/cute-widgets-base-core-ripple.mjs +172 -0
  83. package/fesm2022/cute-widgets-base-core-ripple.mjs.map +1 -0
  84. package/fesm2022/cute-widgets-base-core-testing.mjs +210 -0
  85. package/fesm2022/cute-widgets-base-core-testing.mjs.map +1 -0
  86. package/fesm2022/cute-widgets-base-core-theming.mjs +314 -0
  87. package/fesm2022/cute-widgets-base-core-theming.mjs.map +1 -0
  88. package/fesm2022/cute-widgets-base-core-types.mjs +22 -0
  89. package/fesm2022/cute-widgets-base-core-types.mjs.map +1 -0
  90. package/fesm2022/cute-widgets-base-core-utils.mjs +257 -0
  91. package/fesm2022/cute-widgets-base-core-utils.mjs.map +1 -0
  92. package/fesm2022/cute-widgets-base-core.mjs +1600 -0
  93. package/fesm2022/cute-widgets-base-core.mjs.map +1 -0
  94. package/fesm2022/cute-widgets-base-datepicker.mjs +4827 -0
  95. package/fesm2022/cute-widgets-base-datepicker.mjs.map +1 -0
  96. package/fesm2022/cute-widgets-base-dialog.mjs +1046 -0
  97. package/fesm2022/cute-widgets-base-dialog.mjs.map +1 -0
  98. package/fesm2022/cute-widgets-base-divider.mjs +86 -0
  99. package/fesm2022/cute-widgets-base-divider.mjs.map +1 -0
  100. package/fesm2022/cute-widgets-base-expansion.mjs +623 -0
  101. package/fesm2022/cute-widgets-base-expansion.mjs.map +1 -0
  102. package/fesm2022/cute-widgets-base-form-field.mjs +969 -0
  103. package/fesm2022/cute-widgets-base-form-field.mjs.map +1 -0
  104. package/fesm2022/cute-widgets-base-grid-list.mjs +715 -0
  105. package/fesm2022/cute-widgets-base-grid-list.mjs.map +1 -0
  106. package/fesm2022/cute-widgets-base-icon.mjs +1105 -0
  107. package/fesm2022/cute-widgets-base-icon.mjs.map +1 -0
  108. package/fesm2022/cute-widgets-base-input.mjs +726 -0
  109. package/fesm2022/cute-widgets-base-input.mjs.map +1 -0
  110. package/fesm2022/cute-widgets-base-layout-container.mjs +95 -0
  111. package/fesm2022/cute-widgets-base-layout-container.mjs.map +1 -0
  112. package/fesm2022/cute-widgets-base-layout-stack.mjs +166 -0
  113. package/fesm2022/cute-widgets-base-layout-stack.mjs.map +1 -0
  114. package/fesm2022/cute-widgets-base-layout.mjs +250 -0
  115. package/fesm2022/cute-widgets-base-layout.mjs.map +1 -0
  116. package/fesm2022/cute-widgets-base-list.mjs +1557 -0
  117. package/fesm2022/cute-widgets-base-list.mjs.map +1 -0
  118. package/fesm2022/cute-widgets-base-menu.mjs +1283 -0
  119. package/fesm2022/cute-widgets-base-menu.mjs.map +1 -0
  120. package/fesm2022/cute-widgets-base-navbar.mjs +359 -0
  121. package/fesm2022/cute-widgets-base-navbar.mjs.map +1 -0
  122. package/fesm2022/cute-widgets-base-paginator.mjs +485 -0
  123. package/fesm2022/cute-widgets-base-paginator.mjs.map +1 -0
  124. package/fesm2022/cute-widgets-base-progress.mjs +321 -0
  125. package/fesm2022/cute-widgets-base-progress.mjs.map +1 -0
  126. package/fesm2022/cute-widgets-base-radio.mjs +637 -0
  127. package/fesm2022/cute-widgets-base-radio.mjs.map +1 -0
  128. package/fesm2022/cute-widgets-base-select.mjs +1208 -0
  129. package/fesm2022/cute-widgets-base-select.mjs.map +1 -0
  130. package/fesm2022/cute-widgets-base-sidenav.mjs +1095 -0
  131. package/fesm2022/cute-widgets-base-sidenav.mjs.map +1 -0
  132. package/fesm2022/cute-widgets-base-slider.mjs +99 -0
  133. package/fesm2022/cute-widgets-base-slider.mjs.map +1 -0
  134. package/fesm2022/cute-widgets-base-snack-bar.mjs +897 -0
  135. package/fesm2022/cute-widgets-base-snack-bar.mjs.map +1 -0
  136. package/fesm2022/cute-widgets-base-sort.mjs +639 -0
  137. package/fesm2022/cute-widgets-base-sort.mjs.map +1 -0
  138. package/fesm2022/cute-widgets-base-spinner.mjs +154 -0
  139. package/fesm2022/cute-widgets-base-spinner.mjs.map +1 -0
  140. package/fesm2022/cute-widgets-base-stepper.mjs +673 -0
  141. package/fesm2022/cute-widgets-base-stepper.mjs.map +1 -0
  142. package/fesm2022/cute-widgets-base-table.mjs +1023 -0
  143. package/fesm2022/cute-widgets-base-table.mjs.map +1 -0
  144. package/fesm2022/cute-widgets-base-tabs.mjs +729 -0
  145. package/fesm2022/cute-widgets-base-tabs.mjs.map +1 -0
  146. package/fesm2022/cute-widgets-base-timepicker.mjs +965 -0
  147. package/fesm2022/cute-widgets-base-timepicker.mjs.map +1 -0
  148. package/fesm2022/cute-widgets-base-toolbar.mjs +120 -0
  149. package/fesm2022/cute-widgets-base-toolbar.mjs.map +1 -0
  150. package/fesm2022/cute-widgets-base-tooltip.mjs +947 -0
  151. package/fesm2022/cute-widgets-base-tooltip.mjs.map +1 -0
  152. package/fesm2022/cute-widgets-base-tree.mjs +598 -0
  153. package/fesm2022/cute-widgets-base-tree.mjs.map +1 -0
  154. package/fesm2022/cute-widgets-base.mjs +68 -0
  155. package/fesm2022/cute-widgets-base.mjs.map +1 -0
  156. package/form-field/index.d.ts +401 -0
  157. package/grid-list/index.d.ts +361 -0
  158. package/icon/index.d.ts +477 -0
  159. package/index.d.ts +3 -0
  160. package/input/index.d.ts +256 -0
  161. package/layout/container/index.d.ts +31 -0
  162. package/layout/index.d.ts +78 -0
  163. package/layout/stack/index.d.ts +52 -0
  164. package/list/index.d.ts +659 -0
  165. package/menu/index.d.ts +497 -0
  166. package/navbar/index.d.ts +91 -0
  167. package/package.json +279 -0
  168. package/paginator/index.d.ts +216 -0
  169. package/progress/index.d.ts +130 -0
  170. package/radio/index.d.ts +259 -0
  171. package/select/index.d.ts +426 -0
  172. package/sidenav/index.d.ts +369 -0
  173. package/slider/index.d.ts +48 -0
  174. package/snack-bar/index.d.ts +374 -0
  175. package/sort/index.d.ts +334 -0
  176. package/spinner/index.d.ts +70 -0
  177. package/stepper/index.d.ts +295 -0
  178. package/table/index.d.ts +395 -0
  179. package/tabs/index.d.ts +307 -0
  180. package/timepicker/index.d.ts +350 -0
  181. package/toolbar/index.d.ts +36 -0
  182. package/tooltip/index.d.ts +299 -0
  183. package/tree/index.d.ts +314 -0
@@ -0,0 +1,105 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Injectable } from '@angular/core';
3
+
4
+ /**
5
+ * @license Apache-2.0
6
+ *
7
+ * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.
8
+ *
9
+ * You may not use this file except in compliance with the License
10
+ * that can be found at http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * This code is a modification of the `@angular/material` original
13
+ * code licensed under MIT-style License (https://angular.dev/license).
14
+ */
15
+ /** Error state matcher that matches when a control is invalid and dirty. */
16
+ class ShowOnDirtyErrorStateMatcher {
17
+ isErrorState(control, form) {
18
+ return !!(control && control.invalid && (control.dirty || (form && form.submitted)));
19
+ }
20
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ShowOnDirtyErrorStateMatcher, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
21
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ShowOnDirtyErrorStateMatcher }); }
22
+ }
23
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ShowOnDirtyErrorStateMatcher, decorators: [{
24
+ type: Injectable
25
+ }] });
26
+ /** Provider that defines how form controls behave in regard to displaying error messages. */
27
+ class ErrorStateMatcher {
28
+ isErrorState(control, form) {
29
+ return !!(control && control.invalid && (control.touched || (form && form.submitted)));
30
+ }
31
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ErrorStateMatcher, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
32
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ErrorStateMatcher, providedIn: 'root' }); }
33
+ }
34
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ErrorStateMatcher, decorators: [{
35
+ type: Injectable,
36
+ args: [{ providedIn: 'root' }]
37
+ }] });
38
+
39
+ /**
40
+ * Class that tracks the error state of a component.
41
+ * @docs-private
42
+ */
43
+ class _ErrorStateTracker {
44
+ constructor(_defaultMatcher, ngControl, _parentFormGroup, _parentForm, _stateChanges) {
45
+ this._defaultMatcher = _defaultMatcher;
46
+ this.ngControl = ngControl;
47
+ this._parentFormGroup = _parentFormGroup;
48
+ this._parentForm = _parentForm;
49
+ this._stateChanges = _stateChanges;
50
+ /** Whether the tracker is currently in an error state. */
51
+ this.errorState = false;
52
+ }
53
+ /** Updates the error state based on the provided error state matcher. */
54
+ updateErrorState() {
55
+ const oldState = this.errorState;
56
+ const parent = this._parentFormGroup || this._parentForm;
57
+ const matcher = this.matcher || this._defaultMatcher;
58
+ const control = this.ngControl ? this.ngControl.control : null;
59
+ // Note: the null check here shouldn't be necessary, but there's an internal
60
+ // test that appears to pass an object whose `isErrorState` isn't a function.
61
+ const newState = typeof matcher?.isErrorState === 'function' ? matcher.isErrorState(control, parent) : false;
62
+ if (newState !== oldState) {
63
+ this.errorState = newState;
64
+ this._stateChanges.next();
65
+ }
66
+ }
67
+ }
68
+ function mixinErrorState(base) {
69
+ return class extends base {
70
+ /** Whether the component is in an error state. */
71
+ get errorState() {
72
+ return this._getTracker().errorState;
73
+ }
74
+ set errorState(value) {
75
+ this._getTracker().errorState = value;
76
+ }
77
+ /** An object used to control the error state of the component. */
78
+ get errorStateMatcher() {
79
+ return this._getTracker().matcher;
80
+ }
81
+ set errorStateMatcher(value) {
82
+ this._getTracker().matcher = value;
83
+ }
84
+ /** Updates the error state based on the provided error state matcher. */
85
+ updateErrorState() {
86
+ this._getTracker().updateErrorState();
87
+ }
88
+ _getTracker() {
89
+ if (!this._tracker) {
90
+ this._tracker = new _ErrorStateTracker(this._defaultErrorStateMatcher, this.ngControl, this._parentFormGroup, this._parentForm, this.stateChanges);
91
+ }
92
+ return this._tracker;
93
+ }
94
+ constructor(...args) {
95
+ super(...args);
96
+ }
97
+ };
98
+ }
99
+
100
+ /**
101
+ * Generated bundle index. Do not edit.
102
+ */
103
+
104
+ export { ErrorStateMatcher, ShowOnDirtyErrorStateMatcher, _ErrorStateTracker, mixinErrorState };
105
+ //# sourceMappingURL=cute-widgets-base-core-error.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cute-widgets-base-core-error.mjs","sources":["../../../../projects/cute-widgets/base/core/error/src/error-options.ts","../../../../projects/cute-widgets/base/core/error/src/error-state.ts","../../../../projects/cute-widgets/base/core/error/cute-widgets-base-core-error.ts"],"sourcesContent":["/**\r\n * @license Apache-2.0\r\n *\r\n * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.\r\n *\r\n * You may not use this file except in compliance with the License\r\n * that can be found at http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * This code is a modification of the `@angular/material` original\r\n * code licensed under MIT-style License (https://angular.dev/license).\r\n */\r\nimport {Injectable} from '@angular/core';\r\nimport {FormGroupDirective, NgForm, AbstractControl} from '@angular/forms';\r\n\r\n/** Error state matcher that matches when a control is invalid and dirty. */\r\n@Injectable()\r\nexport class ShowOnDirtyErrorStateMatcher implements ErrorStateMatcher {\r\n isErrorState(control: AbstractControl | null, form: FormGroupDirective | NgForm | null): boolean {\r\n return !!(control && control.invalid && (control.dirty || (form && form.submitted)));\r\n }\r\n}\r\n\r\n/** Provider that defines how form controls behave in regard to displaying error messages. */\r\n@Injectable({providedIn: 'root'})\r\nexport class ErrorStateMatcher {\r\n isErrorState(control: AbstractControl | null, form: FormGroupDirective | NgForm | null): boolean {\r\n return !!(control && control.invalid && (control.touched || (form && form.submitted)));\r\n }\r\n}\r\n","/**\r\n * @license Apache-2.0\r\n *\r\n * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.\r\n *\r\n * You may not use this file except in compliance with the License\r\n * that can be found at http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * This code is a modification of the `@angular/material` original\r\n * code licensed under MIT-style License (https://angular.dev/license).\r\n */\r\nimport {AbstractControl, FormGroupDirective, NgControl, NgForm} from '@angular/forms';\r\nimport {Subject} from 'rxjs';\r\nimport {ErrorStateMatcher} from './error-options';\r\nimport {AbstractConstructor, Constructor} from '@cute-widgets/base/core/types';\r\n\r\n/** @docs-private */\r\nexport interface CanUpdateErrorState {\r\n /** Updates the error state based on the provided error state matcher. */\r\n updateErrorState(): void;\r\n /** Whether the component is in an error state. */\r\n errorState: boolean;\r\n /** An object used to control the error state of the component. */\r\n errorStateMatcher: ErrorStateMatcher;\r\n}\r\n\r\ntype CanUpdateErrorStateCtor = Constructor<CanUpdateErrorState> &\r\n AbstractConstructor<CanUpdateErrorState>;\r\n\r\n/** @docs-private */\r\nexport interface HasErrorState {\r\n _parentFormGroup: FormGroupDirective;\r\n _parentForm: NgForm;\r\n _defaultErrorStateMatcher: ErrorStateMatcher;\r\n\r\n // These properties are defined as per the `CuteFormFieldControl` interface. Since\r\n // this mixin is commonly used with custom form-field controls, we respect the\r\n // properties (also with the public name they need according to `CuteFormFieldControl`).\r\n ngControl: NgControl;\r\n stateChanges: Subject<void>;\r\n}\r\n\r\n/**\r\n * Class that tracks the error state of a component.\r\n * @docs-private\r\n */\r\nexport class _ErrorStateTracker {\r\n /** Whether the tracker is currently in an error state. */\r\n errorState = false;\r\n\r\n /** User-defined matcher for the error state. */\r\n matcher!: ErrorStateMatcher;\r\n\r\n constructor(\r\n private _defaultMatcher: ErrorStateMatcher | null,\r\n public ngControl: NgControl | null,\r\n private _parentFormGroup: FormGroupDirective | null,\r\n private _parentForm: NgForm | null,\r\n private _stateChanges: Subject<void>,\r\n ) {}\r\n\r\n /** Updates the error state based on the provided error state matcher. */\r\n updateErrorState() {\r\n const oldState = this.errorState;\r\n const parent = this._parentFormGroup || this._parentForm;\r\n const matcher = this.matcher || this._defaultMatcher;\r\n const control = this.ngControl ? (this.ngControl.control as AbstractControl) : null;\r\n // Note: the null check here shouldn't be necessary, but there's an internal\r\n // test that appears to pass an object whose `isErrorState` isn't a function.\r\n const newState =\r\n typeof matcher?.isErrorState === 'function' ? matcher.isErrorState(control, parent) : false;\r\n\r\n if (newState !== oldState) {\r\n this.errorState = newState;\r\n this._stateChanges.next();\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * Mixin to augment a directive with updateErrorState method.\r\n * For component with `errorState` and need to update `errorState`.\r\n */\r\nexport function mixinErrorState<T extends AbstractConstructor<HasErrorState>>(\r\n base: T,\r\n): CanUpdateErrorStateCtor & T;\r\nexport function mixinErrorState<T extends Constructor<HasErrorState>>(\r\n base: T,\r\n): CanUpdateErrorStateCtor & T {\r\n return class extends base {\r\n private _tracker: _ErrorStateTracker | undefined;\r\n\r\n /** Whether the component is in an error state. */\r\n get errorState() {\r\n return this._getTracker().errorState;\r\n }\r\n set errorState(value: boolean) {\r\n this._getTracker().errorState = value;\r\n }\r\n\r\n /** An object used to control the error state of the component. */\r\n get errorStateMatcher() {\r\n return this._getTracker().matcher;\r\n }\r\n set errorStateMatcher(value: ErrorStateMatcher) {\r\n this._getTracker().matcher = value;\r\n }\r\n\r\n /** Updates the error state based on the provided error state matcher. */\r\n updateErrorState() {\r\n this._getTracker().updateErrorState();\r\n }\r\n\r\n private _getTracker() {\r\n if (!this._tracker) {\r\n this._tracker = new _ErrorStateTracker(\r\n this._defaultErrorStateMatcher,\r\n this.ngControl,\r\n this._parentFormGroup,\r\n this._parentForm,\r\n this.stateChanges,\r\n );\r\n }\r\n\r\n return this._tracker;\r\n }\r\n\r\n constructor(...args: any[]) {\r\n super(...args);\r\n }\r\n };\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;AAAA;;;;;;;;;;AAUG;AAIH;MAEa,4BAA4B,CAAA;IACrC,YAAY,CAAC,OAA+B,EAAE,IAAwC,EAAA;QAClF,OAAO,CAAC,EAAE,OAAO,IAAI,OAAO,CAAC,OAAO,KAAK,OAAO,CAAC,KAAK,KAAK,IAAI,IAAI,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC;IACxF;+GAHS,4BAA4B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;mHAA5B,4BAA4B,EAAA,CAAA,CAAA;;4FAA5B,4BAA4B,EAAA,UAAA,EAAA,CAAA;kBADxC;;AAOD;MAEa,iBAAiB,CAAA;IAC1B,YAAY,CAAC,OAA+B,EAAE,IAAwC,EAAA;QAClF,OAAO,CAAC,EAAE,OAAO,IAAI,OAAO,CAAC,OAAO,KAAK,OAAO,CAAC,OAAO,KAAK,IAAI,IAAI,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC;IAC1F;+GAHS,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAjB,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,iBAAiB,cADL,MAAM,EAAA,CAAA,CAAA;;4FAClB,iBAAiB,EAAA,UAAA,EAAA,CAAA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AAC,UAAU,GAAG,KAAK;QACzC;;AAGA,QAAA,IAAI,iBAAiB,GAAA;AACjB,YAAA,OAAO,IAAI,CAAC,WAAW,EAAE,CAAC,OAAO;QACrC;QACA,IAAI,iBAAiB,CAAC,KAAwB,EAAA;AAC1C,YAAA,IAAI,CAAC,WAAW,EAAE,CAAC,OAAO,GAAG,KAAK;QACtC;;QAGA,gBAAgB,GAAA;AACZ,YAAA,IAAI,CAAC,WAAW,EAAE,CAAC,gBAAgB,EAAE;QACzC;QAEQ,WAAW,GAAA;AACf,YAAA,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE;gBAChB,IAAI,CAAC,QAAQ,GAAG,IAAI,kBAAkB,CAClC,IAAI,CAAC,yBAAyB,EAC9B,IAAI,CAAC,SAAS,EACd,IAAI,CAAC,gBAAgB,EACrB,IAAI,CAAC,WAAW,EAChB,IAAI,CAAC,YAAY,CACpB;YACL;YAEA,OAAO,IAAI,CAAC,QAAQ;QACxB;AAEA,QAAA,WAAA,CAAY,GAAG,IAAW,EAAA;AACtB,YAAA,KAAK,CAAC,GAAG,IAAI,CAAC;QAClB;KACH;AACL;;ACnIA;;AAEG;;;;"}
@@ -0,0 +1,22 @@
1
+ /**
2
+ * @license Apache-2.0
3
+ *
4
+ * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.
5
+ *
6
+ * You may not use this file except in compliance with the License
7
+ * that can be found at http://www.apache.org/licenses/LICENSE-2.0
8
+ */
9
+
10
+ /**
11
+ * @license Apache-2.0
12
+ *
13
+ * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.
14
+ *
15
+ * You may not use this file except in compliance with the License
16
+ * that can be found at http://www.apache.org/licenses/LICENSE-2.0
17
+ */
18
+
19
+ /**
20
+ * Generated bundle index. Do not edit.
21
+ */
22
+ //# sourceMappingURL=cute-widgets-base-core-interfaces.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cute-widgets-base-core-interfaces.mjs","sources":["../../../../projects/cute-widgets/base/core/interfaces/src/MenuItem.ts","../../../../projects/cute-widgets/base/core/interfaces/src/TreeNode.ts","../../../../projects/cute-widgets/base/core/interfaces/cute-widgets-base-core-interfaces.ts"],"sourcesContent":["/**\r\n * @license Apache-2.0\r\n *\r\n * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.\r\n *\r\n * You may not use this file except in compliance with the License\r\n * that can be found at http://www.apache.org/licenses/LICENSE-2.0\r\n */\r\n\r\nimport {TreeNode} from \"./TreeNode\";\r\nimport {ToolbarItem} from \"./ToolbarItem\";\r\n\r\n/**\r\n * Menu Item interface is used for items in a drop-down or cascading menu\r\n */\r\nexport interface MenuItem<D=unknown> extends TreeNode<D> {\r\n /** An array of the submenu items. */\r\n children?: MenuItem<D>[];\r\n /** Whether an item is the default item. */\r\n default?: (()=>boolean)|boolean;\r\n /** Is item checked? Default is _false_. */\r\n checked?: (()=>boolean)|boolean;\r\n /** Item is clicked (selected or unselected). */\r\n clicked?: () => void;\r\n /** Toolbar's item definition. */\r\n toolBarItem?: ToolbarItem;\r\n}\r\n\r\n","/**\r\n * @license Apache-2.0\r\n *\r\n * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.\r\n *\r\n * You may not use this file except in compliance with the License\r\n * that can be found at http://www.apache.org/licenses/LICENSE-2.0\r\n */\r\n\r\nimport {RichThemeColor} from \"@cute-widgets/base/core/theming\";\r\n\r\n/**\r\n * A structure that populates the properties for individual items in a TreeView control.\r\n */\r\nexport interface TreeNode<D=unknown> {\r\n /** Unique identifier */\r\n id?: string;\r\n /** Identifies the string label associated with the item. */\r\n label: string;\r\n /** Specifies whether the item has children. */\r\n hasChildren?: boolean;\r\n /** Children items. */\r\n children?: TreeNode<D>[];\r\n /** Item short description */\r\n microHelp?: string;\r\n /** Indicates the level of the item in the TreeView control. */\r\n level?: number;\r\n /** Any user-defined data. */\r\n data?: D;\r\n /** Router link. */\r\n routerLink?: string | string[];\r\n /** Identifies the picture displayed to the left of the item label. */\r\n icon?: string;\r\n /** Icon color. */\r\n iconColor?: string;\r\n /** Icon CSS class(es). */\r\n iconClass?: string | string[] | Record<string, boolean>;\r\n /** Identifies the state picture associated with the item. */\r\n stateIcon?: string;\r\n /** The badge text associated with the item. */\r\n badge?: string;\r\n /** Badge theme color. */\r\n badgeColor?: RichThemeColor;\r\n /** Is node enabled? Default is _true_. */\r\n enabled?: (()=>boolean)|boolean;\r\n /** Is node visible? Default is _true_. */\r\n visible?: (()=>boolean)|boolean;\r\n\r\n status?: {\r\n /** Specifies whether the node is expanded. */\r\n expanded?: boolean;\r\n /** Specifies whether the node has been populated with children. */\r\n populated?: boolean;\r\n /** Specifies whether the item has focus. */\r\n hasFocus?: boolean;\r\n /** Specifies whether the item is selected. */\r\n selection?: 'checked' | 'indeterminate' | 'unchecked';\r\n };\r\n\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"AAAA;;;;;;;AAOG;;ACPH;;;;;;;AAOG;;ACPH;;AAEG"}
@@ -0,0 +1,74 @@
1
+ /**
2
+ * @license Apache-2.0
3
+ *
4
+ * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.
5
+ *
6
+ * You may not use this file except in compliance with the License
7
+ * that can be found at http://www.apache.org/licenses/LICENSE-2.0
8
+ */
9
+ /**
10
+ * Bootstrap media-queries, or `breakpoints`.
11
+ * PascalCase is being used as Breakpoints is used like an enum.
12
+ */
13
+ const bsBreakpoints = {
14
+ SmallAndDown: '(max-width: 575.98px)',
15
+ MediumAndDown: '(max-width: 767.98px)',
16
+ LargeAndDown: '(max-width: 991.98px)',
17
+ XLargeAndDown: '(max-width: 1199.98px)',
18
+ XXLargeAndDown: '(max-width: 1399.98px)',
19
+ XSmall: '(max-width: 575.98px)',
20
+ Small: '(min-width: 576px) and (max-width: 767.98px)',
21
+ Medium: '(min-width: 768px) and (max-width: 991.98px)',
22
+ Large: '(min-width: 992px) and (max-width: 1199.98px)',
23
+ XLarge: '(min-width: 1200px) and (max-width: 1399.98px)',
24
+ XXLarge: '(min-width: 1400px)',
25
+ get grid() {
26
+ return { xs: 0, sm: 576, md: 768, lg: 992, xl: 1200, xxl: 1400 };
27
+ },
28
+ get xs() { return this.XSmall; },
29
+ get sm() { return this.Small; },
30
+ get md() { return this.Medium; },
31
+ get lg() { return this.Large; },
32
+ get xl() { return this.XLarge; },
33
+ get xxl() { return this.XXLarge; },
34
+ /**
35
+ * Gets the object's property name of the media-query by its value
36
+ * @param query The media-query text
37
+ * @returns The property name of the media-query or _undefined_ if it was not found
38
+ */
39
+ getQueryName(query) {
40
+ let res;
41
+ if (query) {
42
+ for (const key in this) {
43
+ if (this[key] === query) {
44
+ res = key;
45
+ break;
46
+ }
47
+ }
48
+ }
49
+ return res;
50
+ },
51
+ /**
52
+ * Gets the breakpoint label by Bootstrap's breakpoint abbreviation
53
+ * @param code Bootstrap's breakpoint abbreviation
54
+ * @returns More descriptive text of the abbreviation
55
+ */
56
+ getLabel(code) {
57
+ switch (code) {
58
+ case "xs": return "XSmall";
59
+ case "sm": return "Small";
60
+ case "md": return "Medium";
61
+ case "lg": return "Large";
62
+ case "xl": return "XLarge";
63
+ case "xxl": return "XXLarge";
64
+ }
65
+ return "";
66
+ }
67
+ };
68
+
69
+ /**
70
+ * Generated bundle index. Do not edit.
71
+ */
72
+
73
+ export { bsBreakpoints };
74
+ //# sourceMappingURL=cute-widgets-base-core-layout.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cute-widgets-base-core-layout.mjs","sources":["../../../../projects/cute-widgets/base/core/layout/src/bs-breakpoints.ts","../../../../projects/cute-widgets/base/core/layout/cute-widgets-base-core-layout.ts"],"sourcesContent":["/**\r\n * @license Apache-2.0\r\n *\r\n * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.\r\n *\r\n * You may not use this file except in compliance with the License\r\n * that can be found at http://www.apache.org/licenses/LICENSE-2.0\r\n */\r\n\r\n/**\r\n * Bootstrap media-queries, or `breakpoints`.\r\n * PascalCase is being used as Breakpoints is used like an enum.\r\n */\r\nexport const bsBreakpoints = {\r\n\r\n SmallAndDown: '(max-width: 575.98px)',\r\n MediumAndDown: '(max-width: 767.98px)',\r\n LargeAndDown: '(max-width: 991.98px)',\r\n XLargeAndDown: '(max-width: 1199.98px)',\r\n XXLargeAndDown: '(max-width: 1399.98px)',\r\n\r\n XSmall: '(max-width: 575.98px)',\r\n Small: '(min-width: 576px) and (max-width: 767.98px)',\r\n Medium: '(min-width: 768px) and (max-width: 991.98px)',\r\n Large: '(min-width: 992px) and (max-width: 1199.98px)',\r\n XLarge: '(min-width: 1200px) and (max-width: 1399.98px)',\r\n XXLarge: '(min-width: 1400px)',\r\n\r\n get grid(): {xs:number,sm:number,md:number,lg:number,xl:number,xxl:number} {\r\n return {xs:0, sm:576, md:768, lg: 992, xl: 1200, xxl: 1400};\r\n },\r\n\r\n get xs(): string {return this.XSmall},\r\n get sm(): string {return this.Small},\r\n get md(): string {return this.Medium},\r\n get lg(): string {return this.Large},\r\n get xl(): string {return this.XLarge},\r\n get xxl(): string {return this.XXLarge},\r\n\r\n /**\r\n * Gets the object's property name of the media-query by its value\r\n * @param query The media-query text\r\n * @returns The property name of the media-query or _undefined_ if it was not found\r\n */\r\n getQueryName(query: string): string | undefined {\r\n let res: string | undefined;\r\n if (query) {\r\n for (const key in this) {\r\n if ((this as any)[key] === query) {\r\n res = key;\r\n break;\r\n }\r\n }\r\n }\r\n return res;\r\n },\r\n /**\r\n * Gets the breakpoint label by Bootstrap's breakpoint abbreviation\r\n * @param code Bootstrap's breakpoint abbreviation\r\n * @returns More descriptive text of the abbreviation\r\n */\r\n getLabel(code: string): string {\r\n switch (code) {\r\n case \"xs\": return \"XSmall\";\r\n case \"sm\": return \"Small\";\r\n case \"md\": return \"Medium\";\r\n case \"lg\": return \"Large\";\r\n case \"xl\": return \"XLarge\";\r\n case \"xxl\": return \"XXLarge\";\r\n }\r\n return \"\";\r\n }\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';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K,KAAK,EAAE;oBAChC,GAAG,GAAG,GAAG;oBACT;gBACF;YACF;QACF;AACA,QAAA,OAAO,GAAG;IACZ,CAAC;AACD;;;;AAIG;AACH,IAAA,QAAQ,CAAC,IAAY,EAAA;QACnB,QAAQ,IAAI;AACV,YAAA,KAAK,IAAI,EAAE,OAAO,QAAQ;AAC1B,YAAA,KAAK,IAAI,EAAE,OAAO,OAAO;AACzB,YAAA,KAAK,IAAI,EAAE,OAAO,QAAQ;AAC1B,YAAA,KAAK,IAAI,EAAE,OAAO,OAAO;AACzB,YAAA,KAAK,IAAI,EAAE,OAAO,QAAQ;AAC1B,YAAA,KAAK,KAAK,EAAE,OAAO,SAAS;;AAE9B,QAAA,OAAO,EAAE;IACX;;;ACvEF;;AAEG;;;;"}
@@ -0,0 +1,87 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Directive, NgModule } from '@angular/core';
3
+ import { startWith } from 'rxjs/operators';
4
+ import { CommonModule } from '@angular/common';
5
+
6
+ /**
7
+ * @license Apache-2.0
8
+ *
9
+ * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.
10
+ *
11
+ * You may not use this file except in compliance with the License
12
+ * that can be found at http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * This code is a modification of the `@angular/material` original
15
+ * code licensed under MIT-style License (https://angular.dev/license).
16
+ */
17
+ /**
18
+ * Shared directive to count lines inside a text area, such as a list item.
19
+ * Line elements can be extracted with a @ContentChildren(CuteLine) query, then
20
+ * counted by checking the query list's length.
21
+ */
22
+ class CuteLine {
23
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CuteLine, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
24
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.15", type: CuteLine, isStandalone: true, selector: "[cute-line], [cuteLine]", host: { classAttribute: "cute-line" }, ngImport: i0 }); }
25
+ }
26
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CuteLine, decorators: [{
27
+ type: Directive,
28
+ args: [{
29
+ selector: '[cute-line], [cuteLine]',
30
+ host: { 'class': 'cute-line' },
31
+ standalone: true,
32
+ }]
33
+ }] });
34
+ /**
35
+ * Helper that takes a query list of lines and sets the correct class on the host.
36
+ */
37
+ function setLines(lines, element, prefix = 'cute') {
38
+ // Note: doesn't need to unsubscribe, because `changes`
39
+ // gets completed by Angular when the view is destroyed.
40
+ lines.changes.pipe(startWith(lines)).subscribe(({ length }) => {
41
+ setClass(element, `${prefix}-2-line`, false);
42
+ setClass(element, `${prefix}-3-line`, false);
43
+ setClass(element, `${prefix}-multi-line`, false);
44
+ if (length === 2 || length === 3) {
45
+ setClass(element, `${prefix}-${length}-line`, true);
46
+ }
47
+ else if (length > 3) {
48
+ setClass(element, `${prefix}-multi-line`, true);
49
+ }
50
+ });
51
+ }
52
+ /** Adds or removes a class from an element. */
53
+ function setClass(element, className, isAdd) {
54
+ element.nativeElement.classList.toggle(className, isAdd);
55
+ }
56
+
57
+ /**
58
+ * @license Apache-2.0
59
+ *
60
+ * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.
61
+ *
62
+ * You may not use this file except in compliance with the License
63
+ * that can be found at http://www.apache.org/licenses/LICENSE-2.0
64
+ */
65
+ const TYPES = [
66
+ CuteLine
67
+ ];
68
+ class CuteLineModule {
69
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CuteLineModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
70
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.15", ngImport: i0, type: CuteLineModule, imports: [CommonModule, CuteLine], exports: [CuteLine] }); }
71
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CuteLineModule, imports: [CommonModule] }); }
72
+ }
73
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CuteLineModule, decorators: [{
74
+ type: NgModule,
75
+ args: [{
76
+ imports: [CommonModule, ...TYPES],
77
+ exports: TYPES,
78
+ declarations: [],
79
+ }]
80
+ }] });
81
+
82
+ /**
83
+ * Generated bundle index. Do not edit.
84
+ */
85
+
86
+ export { CuteLine, CuteLineModule, setLines };
87
+ //# sourceMappingURL=cute-widgets-base-core-line.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cute-widgets-base-core-line.mjs","sources":["../../../../projects/cute-widgets/base/core/line/src/line.ts","../../../../projects/cute-widgets/base/core/line/src/line.module.ts","../../../../projects/cute-widgets/base/core/line/cute-widgets-base-core-line.ts"],"sourcesContent":["/**\r\n * @license Apache-2.0\r\n *\r\n * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.\r\n *\r\n * You may not use this file except in compliance with the License\r\n * that can be found at http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * This code is a modification of the `@angular/material` original\r\n * code licensed under MIT-style License (https://angular.dev/license).\r\n */\r\nimport {Directive, ElementRef, QueryList} from '@angular/core';\r\nimport {startWith} from 'rxjs/operators';\r\n\r\n/**\r\n * Shared directive to count lines inside a text area, such as a list item.\r\n * Line elements can be extracted with a @ContentChildren(CuteLine) query, then\r\n * counted by checking the query list's length.\r\n */\r\n@Directive({\r\n selector: '[cute-line], [cuteLine]',\r\n host: {'class': 'cute-line'},\r\n standalone: true,\r\n})\r\nexport class CuteLine {}\r\n\r\n/**\r\n * Helper that takes a query list of lines and sets the correct class on the host.\r\n */\r\nexport function setLines(\r\n lines: QueryList<unknown>,\r\n element: ElementRef<HTMLElement>,\r\n prefix = 'cute',\r\n) {\r\n // Note: doesn't need to unsubscribe, because `changes`\r\n // gets completed by Angular when the view is destroyed.\r\n lines.changes.pipe(startWith(lines)).subscribe(({length}) => {\r\n setClass(element, `${prefix}-2-line`, false);\r\n setClass(element, `${prefix}-3-line`, false);\r\n setClass(element, `${prefix}-multi-line`, false);\r\n\r\n if (length === 2 || length === 3) {\r\n setClass(element, `${prefix}-${length}-line`, true);\r\n } else if (length > 3) {\r\n setClass(element, `${prefix}-multi-line`, true);\r\n }\r\n });\r\n}\r\n\r\n/** Adds or removes a class from an element. */\r\nfunction setClass(element: ElementRef<HTMLElement>, className: string, isAdd: boolean): void {\r\n element.nativeElement.classList.toggle(className, isAdd);\r\n}\r\n","/**\r\n * @license Apache-2.0\r\n *\r\n * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.\r\n *\r\n * You may not use this file except in compliance with the License\r\n * that can be found at http://www.apache.org/licenses/LICENSE-2.0\r\n */\r\nimport {NgModule, Type} from '@angular/core';\r\nimport {CommonModule} from '@angular/common';\r\nimport {CuteLine} from \"./line\";\r\n\r\nconst TYPES: (any | Type<any>)[] = [\r\n CuteLine\r\n];\r\n\r\n@NgModule({\r\n imports: [CommonModule, ...TYPES],\r\n exports: TYPES,\r\n declarations: [],\r\n})\r\nexport class CuteLineModule {\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAAA;;;;;;;;;;AAUG;AAIH;;;;AAIG;MAMU,QAAQ,CAAA;+GAAR,QAAQ,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;mGAAR,QAAQ,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,yBAAA,EAAA,IAAA,EAAA,EAAA,cAAA,EAAA,WAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FAAR,QAAQ,EAAA,UAAA,EAAA,CAAA;kBALpB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,yBAAyB;AACnC,oBAAA,IAAI,EAAE,EAAC,OAAO,EAAE,WAAW,EAAC;AAC5B,oBAAA,U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