@defra/forms-model 3.0.161 → 3.0.163

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,134 +0,0 @@
1
- const conditionValueFactories = {};
2
- class Registration {
3
- type;
4
- constructor(type, factory) {
5
- conditionValueFactories[type] = factory;
6
- this.type = type;
7
- }
8
- }
9
- export class AbstractConditionValue {
10
- type;
11
- constructor(registration) {
12
- if (new.target === AbstractConditionValue) {
13
- throw new TypeError('Cannot construct ConditionValue instances directly');
14
- }
15
- if (!(registration instanceof Registration)) {
16
- throw new TypeError('You must register your value type! Call registerValueType!');
17
- }
18
- this.type = registration.type;
19
- }
20
- toPresentationString() {}
21
- toExpression() {}
22
- }
23
- const valueType = registerValueType('Value', obj => ConditionValue.from(obj));
24
- export class ConditionValue extends AbstractConditionValue {
25
- value;
26
- display;
27
- constructor(value, display) {
28
- super(valueType);
29
- if (!value || typeof value !== 'string') {
30
- throw Error(`value ${value} is not valid`);
31
- }
32
- if (display && typeof display !== 'string') {
33
- throw Error(`display ${display} is not valid`);
34
- }
35
- this.value = value;
36
- this.display = display || value;
37
- }
38
- toPresentationString() {
39
- return this.display;
40
- }
41
- toExpression() {
42
- return this.value;
43
- }
44
- static from(obj) {
45
- return new ConditionValue(obj.value, obj.display);
46
- }
47
- clone() {
48
- return ConditionValue.from(this);
49
- }
50
- }
51
- export const dateDirections = {
52
- FUTURE: 'in the future',
53
- PAST: 'in the past'
54
- };
55
- export const dateUnits = {
56
- YEARS: {
57
- display: 'year(s)',
58
- value: 'years'
59
- },
60
- MONTHS: {
61
- display: 'month(s)',
62
- value: 'months'
63
- },
64
- DAYS: {
65
- display: 'day(s)',
66
- value: 'days'
67
- }
68
- };
69
- export const timeUnits = {
70
- HOURS: {
71
- display: 'hour(s)',
72
- value: 'hours'
73
- },
74
- MINUTES: {
75
- display: 'minute(s)',
76
- value: 'minutes'
77
- },
78
- SECONDS: {
79
- display: 'second(s)',
80
- value: 'seconds'
81
- }
82
- };
83
- export const dateTimeUnits = Object.assign({}, dateUnits, timeUnits);
84
- export const relativeTimeValueType = registerValueType('RelativeTime', obj => RelativeTimeValue.from(obj));
85
- export class RelativeTimeValue extends AbstractConditionValue {
86
- timePeriod;
87
- timeUnit;
88
- direction;
89
- timeOnly;
90
- constructor(timePeriod, timeUnit, direction, timeOnly = false) {
91
- super(relativeTimeValueType);
92
- if (typeof timePeriod !== 'string') {
93
- throw Error(`time period ${timePeriod} is not valid`);
94
- }
95
- if (!Object.values(dateTimeUnits).map(it => it.value).includes(timeUnit)) {
96
- throw Error(`time unit ${timeUnit} is not valid`);
97
- }
98
- if (!Object.values(dateDirections).includes(direction)) {
99
- throw Error(`direction ${direction} is not valid`);
100
- }
101
- this.timePeriod = timePeriod;
102
- this.timeUnit = timeUnit;
103
- this.direction = direction;
104
- this.timeOnly = timeOnly;
105
- }
106
- toPresentationString() {
107
- return `${this.timePeriod} ${this.timeUnit} ${this.direction}`;
108
- }
109
- toExpression() {
110
- const timePeriod = this.direction === dateDirections.PAST ? 0 - Number(this.timePeriod) : this.timePeriod;
111
- return this.timeOnly ? `timeForComparison(${timePeriod}, '${this.timeUnit}')` : `dateForComparison(${timePeriod}, '${this.timeUnit}')`;
112
- }
113
- static from(obj) {
114
- return new RelativeTimeValue(obj.timePeriod, obj.timeUnit, obj.direction, obj.timeOnly);
115
- }
116
- clone() {
117
- return RelativeTimeValue.from(this);
118
- }
119
- }
120
-
121
- /**
122
- * All value types should call this, and should be located in this file.
123
- * Furthermore the types should be registered without the classes needing to be instantiated.
124
- *
125
- * Otherwise we can't guarantee they've been registered for deserialization before
126
- * valueFrom is called
127
- */
128
- function registerValueType(type, factory) {
129
- return new Registration(type, factory);
130
- }
131
- export function valueFrom(obj) {
132
- return conditionValueFactories[obj.type](obj);
133
- }
134
- //# sourceMappingURL=inline-condition-values.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"inline-condition-values.js","names":["conditionValueFactories","Registration","type","constructor","factory","AbstractConditionValue","registration","new","target","TypeError","toPresentationString","toExpression","valueType","registerValueType","obj","ConditionValue","from","value","display","Error","clone","dateDirections","FUTURE","PAST","dateUnits","YEARS","MONTHS","DAYS","timeUnits","HOURS","MINUTES","SECONDS","dateTimeUnits","Object","assign","relativeTimeValueType","RelativeTimeValue","timePeriod","timeUnit","direction","timeOnly","values","map","it","includes","Number","valueFrom"],"sources":["../../../src/conditions/inline-condition-values.ts"],"sourcesContent":["const conditionValueFactories = {}\n\nclass Registration {\n type\n\n constructor(type, factory) {\n conditionValueFactories[type] = factory\n this.type = type\n }\n}\n\nexport class AbstractConditionValue {\n type\n\n constructor(registration) {\n if (new.target === AbstractConditionValue) {\n throw new TypeError('Cannot construct ConditionValue instances directly')\n }\n if (!(registration instanceof Registration)) {\n throw new TypeError(\n 'You must register your value type! Call registerValueType!'\n )\n }\n this.type = registration.type\n }\n\n toPresentationString() {}\n toExpression() {}\n}\n\nconst valueType = registerValueType('Value', (obj) => ConditionValue.from(obj))\nexport class ConditionValue extends AbstractConditionValue {\n value\n display\n\n constructor(value, display) {\n super(valueType)\n if (!value || typeof value !== 'string') {\n throw Error(`value ${value} is not valid`)\n }\n if (display && typeof display !== 'string') {\n throw Error(`display ${display} is not valid`)\n }\n this.value = value\n this.display = display || value\n }\n\n toPresentationString() {\n return this.display\n }\n\n toExpression() {\n return this.value\n }\n\n static from(obj) {\n return new ConditionValue(obj.value, obj.display)\n }\n\n clone() {\n return ConditionValue.from(this)\n }\n}\n\nexport const dateDirections = {\n FUTURE: 'in the future',\n PAST: 'in the past'\n}\n\nexport const dateUnits = {\n YEARS: { display: 'year(s)', value: 'years' },\n MONTHS: { display: 'month(s)', value: 'months' },\n DAYS: { display: 'day(s)', value: 'days' }\n}\nexport const timeUnits = {\n HOURS: { display: 'hour(s)', value: 'hours' },\n MINUTES: { display: 'minute(s)', value: 'minutes' },\n SECONDS: { display: 'second(s)', value: 'seconds' }\n}\nexport const dateTimeUnits = Object.assign({}, dateUnits, timeUnits)\n\nexport const relativeTimeValueType = registerValueType('RelativeTime', (obj) =>\n RelativeTimeValue.from(obj)\n)\nexport class RelativeTimeValue extends AbstractConditionValue {\n timePeriod\n timeUnit\n direction\n timeOnly\n\n constructor(timePeriod, timeUnit, direction, timeOnly = false) {\n super(relativeTimeValueType)\n if (typeof timePeriod !== 'string') {\n throw Error(`time period ${timePeriod} is not valid`)\n }\n if (\n !Object.values(dateTimeUnits)\n .map((it) => it.value)\n .includes(timeUnit)\n ) {\n throw Error(`time unit ${timeUnit} is not valid`)\n }\n if (!Object.values(dateDirections).includes(direction)) {\n throw Error(`direction ${direction} is not valid`)\n }\n this.timePeriod = timePeriod\n this.timeUnit = timeUnit\n this.direction = direction\n this.timeOnly = timeOnly\n }\n\n toPresentationString() {\n return `${this.timePeriod} ${this.timeUnit} ${this.direction}`\n }\n\n toExpression() {\n const timePeriod =\n this.direction === dateDirections.PAST\n ? 0 - Number(this.timePeriod)\n : this.timePeriod\n return this.timeOnly\n ? `timeForComparison(${timePeriod}, '${this.timeUnit}')`\n : `dateForComparison(${timePeriod}, '${this.timeUnit}')`\n }\n\n static from(obj) {\n return new RelativeTimeValue(\n obj.timePeriod,\n obj.timeUnit,\n obj.direction,\n obj.timeOnly\n )\n }\n\n clone() {\n return RelativeTimeValue.from(this)\n }\n}\n\n/**\n * All value types should call this, and should be located in this file.\n * Furthermore the types should be registered without the classes needing to be instantiated.\n *\n * Otherwise we can't guarantee they've been registered for deserialization before\n * valueFrom is called\n */\nfunction registerValueType(type, factory) {\n return new Registration(type, factory)\n}\n\nexport function valueFrom(obj) {\n return conditionValueFactories[obj.type](obj)\n}\n"],"mappings":"AAAA,MAAMA,uBAAuB,GAAG,CAAC,CAAC;AAElC,MAAMC,YAAY,CAAC;EACjBC,IAAI;EAEJC,WAAWA,CAACD,IAAI,EAAEE,OAAO,EAAE;IACzBJ,uBAAuB,CAACE,IAAI,CAAC,GAAGE,OAAO;IACvC,IAAI,CAACF,IAAI,GAAGA,IAAI;E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A,CAAA,EAAG;IACN,OAAOgB,iBAAiB,CAACpB,IAAI,CAAC,IAAI,CAAC;EACrC;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASH,iBAAiBA,CAACX,IAAI,EAAEE,OAAO,EAAE;EACxC,OAAO,IAAIH,YAAY,CAACC,IAAI,EAAEE,OAAO,CAAC;AACxC;AAEA,OAAO,SAAS0C,SAASA,CAAChC,GAAG,EAAE;EAC7B,OAAOd,uBAAuB,CAACc,GAAG,CAACZ,IAAI,CAAC,CAACY,GAAG,CAAC;AAC/C","ignoreList":[]}
@@ -1,86 +0,0 @@
1
- export declare const coordinators: {
2
- AND: string;
3
- OR: string;
4
- };
5
- export declare class ConditionsModel {
6
- #private;
7
- constructor();
8
- clone(): ConditionsModel;
9
- clear(): this;
10
- set name(name: any);
11
- get name(): any;
12
- add(condition: any): this;
13
- replace(index: any, condition: any): this;
14
- remove(indexes: any): this;
15
- addGroups(groupDefs: any): this;
16
- splitGroup(index: any): this;
17
- moveEarlier(index: any): this;
18
- moveLater(index: any): this;
19
- switchCoordinators(): void;
20
- get asPerUserGroupings(): any[];
21
- get hasConditions(): boolean;
22
- get lastIndex(): number;
23
- toPresentationString(): any;
24
- toExpression(): any;
25
- _applyGroups(userGroupedConditions: any): any;
26
- _group(conditions: any, groupDefs: any): any;
27
- _ungroup(conditions: any, splitIndex: any): any;
28
- _autoGroupDefs(conditions: any): GroupDef[];
29
- toJSON(): {
30
- name: any;
31
- conditions: any;
32
- };
33
- static from(obj: any): ConditionsModel;
34
- }
35
- export declare class GroupDef {
36
- first: any;
37
- last: any;
38
- constructor(first: any, last: any);
39
- contains(index: any): boolean;
40
- startsWith(index: any): boolean;
41
- applyTo(conditions: any): any[];
42
- }
43
- export declare function toPresentationString(condition: any): string;
44
- export declare function toExpression(condition: any): string;
45
- export declare class Field {
46
- name: any;
47
- type: any;
48
- display: any;
49
- constructor(name: any, type: any, display: any);
50
- static from(obj: any): Field;
51
- }
52
- declare class AbstractCondition {
53
- coordinator: any;
54
- constructor(coordinator: any);
55
- coordinatorString(): string;
56
- getCoordinator(): any;
57
- setCoordinator(coordinator: any): void;
58
- isGroup(): boolean;
59
- getGroupedConditions(): this[];
60
- _asFirstCondition(): void;
61
- asFirstCondition(): void;
62
- clone(): void;
63
- conditionString(): void;
64
- conditionExpression(): void;
65
- }
66
- export declare class Condition extends AbstractCondition {
67
- field: any;
68
- operator: any;
69
- value: any;
70
- constructor(field: any, operator: any, value: any, coordinator: any);
71
- asFirstCondition(): this;
72
- conditionString(): string;
73
- conditionExpression(): any;
74
- clone(): Condition;
75
- }
76
- export declare class ConditionRef extends AbstractCondition {
77
- conditionName: any;
78
- conditionDisplayName: any;
79
- constructor(conditionName: any, conditionDisplayName: any, coordinator: any);
80
- asFirstCondition(): this;
81
- conditionString(): string;
82
- conditionExpression(): any;
83
- clone(): ConditionRef;
84
- }
85
- export {};
86
- //# sourceMappingURL=inline-condition-model.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"inline-condition-model.d.ts","sourceRoot":"","sources":["../../../src/conditions/inline-condition-model.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,YAAY;;;CAGxB,CAAA;AAED,qBAAa,eAAe;;;IAU1B,KAAK;IAYL,KAAK;IAOL,IAAI,IAAI,CAAC,IAAI,KAAA,EAEZ;IAED,IAAI,IAAI,QAEP;IAED,GAAG,CAAC,SAAS,KAAA;IAYb,OAAO,CAAC,KAAK,KAAA,EAAE,SAAS,KAAA;IAgBxB,MAAM,CAAC,OAAO,KAAA;IAWd,SAAS,CAAC,SAAS,KAAA;IASnB,UAAU,CAAC,KAAK,KAAA;IAShB,WAAW,CAAC,KAAK,KAAA;IAejB,SAAS,CAAC,KAAK,KAAA;IAef,kBAAkB;IAOlB,IAAI,kBAAkB,UAErB;IAED,IAAI,aAAa,YAEhB;IAED,IAAI,SAAS,WAEZ;IAED,oBAAoB;IAMpB,YAAY;IAMZ,YAAY,CAAC,qBAAqB,KAAA;IAi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AY5D,gBAAgB;IAKhB,eAAe;IAIf,mBAAmB;IAInB,KAAK;CAON"}
@@ -1,175 +0,0 @@
1
- export declare const customOperators: {
2
- CheckboxesField: {
3
- contains: {
4
- expression: (field: any, value: any) => string;
5
- };
6
- 'does not contain': {
7
- expression: (field: any, value: any) => string;
8
- };
9
- };
10
- NumberField: any;
11
- DateField: {
12
- is: {
13
- expression: (field: any, value: any) => string;
14
- };
15
- 'is not': {
16
- expression: (field: any, value: any) => string;
17
- };
18
- 'is before': {
19
- expression: (field: any, value: any) => string;
20
- };
21
- 'is after': {
22
- expression: (field: any, value: any) => string;
23
- };
24
- } & {
25
- 'is at least': {
26
- units: any;
27
- expression: (field: any, value: any) => string;
28
- };
29
- 'is at most': {
30
- units: any;
31
- expression: (field: any, value: any) => string;
32
- };
33
- 'is less than': {
34
- units: any;
35
- expression: (field: any, value: any) => string;
36
- };
37
- 'is more than': {
38
- units: any;
39
- expression: (field: any, value: any) => string;
40
- };
41
- };
42
- TimeField: {
43
- is: {
44
- expression: (field: any, value: any) => string;
45
- };
46
- 'is not': {
47
- expression: (field: any, value: any) => string;
48
- };
49
- 'is before': {
50
- expression: (field: any, value: any) => string;
51
- };
52
- 'is after': {
53
- expression: (field: any, value: any) => string;
54
- };
55
- } & {
56
- 'is at least': {
57
- units: any;
58
- expression: (field: any, value: any) => string;
59
- };
60
- 'is at most': {
61
- units: any;
62
- expression: (field: any, value: any) => string;
63
- };
64
- 'is less than': {
65
- units: any;
66
- expression: (field: any, value: any) => string;
67
- };
68
- 'is more than': {
69
- units: any;
70
- expression: (field: any, value: any) => string;
71
- };
72
- };
73
- DatePartsField: {
74
- is: {
75
- expression: (field: any, value: any) => string;
76
- };
77
- 'is not': {
78
- expression: (field: any, value: any) => string;
79
- };
80
- 'is before': {
81
- expression: (field: any, value: any) => string;
82
- };
83
- 'is after': {
84
- expression: (field: any, value: any) => string;
85
- };
86
- } & {
87
- 'is at least': {
88
- units: any;
89
- expression: (field: any, value: any) => string;
90
- };
91
- 'is at most': {
92
- units: any;
93
- expression: (field: any, value: any) => string;
94
- };
95
- 'is less than': {
96
- units: any;
97
- expression: (field: any, value: any) => string;
98
- };
99
- 'is more than': {
100
- units: any;
101
- expression: (field: any, value: any) => string;
102
- };
103
- };
104
- DateTimeField: {
105
- is: {
106
- expression: (field: any, value: any) => string;
107
- };
108
- 'is not': {
109
- expression: (field: any, value: any) => string;
110
- };
111
- 'is before': {
112
- expression: (field: any, value: any) => string;
113
- };
114
- 'is after': {
115
- expression: (field: any, value: any) => string;
116
- };
117
- } & {
118
- 'is at least': {
119
- units: any;
120
- expression: (field: any, value: any) => string;
121
- };
122
- 'is at most': {
123
- units: any;
124
- expression: (field: any, value: any) => string;
125
- };
126
- 'is less than': {
127
- units: any;
128
- expression: (field: any, value: any) => string;
129
- };
130
- 'is more than': {
131
- units: any;
132
- expression: (field: any, value: any) => string;
133
- };
134
- };
135
- DateTimePartsField: {
136
- is: {
137
- expression: (field: any, value: any) => string;
138
- };
139
- 'is not': {
140
- expression: (field: any, value: any) => string;
141
- };
142
- 'is before': {
143
- expression: (field: any, value: any) => string;
144
- };
145
- 'is after': {
146
- expression: (field: any, value: any) => string;
147
- };
148
- } & {
149
- 'is at least': {
150
- units: any;
151
- expression: (field: any, value: any) => string;
152
- };
153
- 'is at most': {
154
- units: any;
155
- expression: (field: any, value: any) => string;
156
- };
157
- 'is less than': {
158
- units: any;
159
- expression: (field: any, value: any) => string;
160
- };
161
- 'is more than': {
162
- units: any;
163
- expression: (field: any, value: any) => string;
164
- };
165
- };
166
- TextField: any;
167
- MultilineTextField: any;
168
- EmailAddressField: any;
169
- };
170
- export declare function getOperatorNames(fieldType: any): string[];
171
- export declare function getExpression(fieldType: any, fieldName: any, operator: any, value: any): any;
172
- export declare function getOperatorConfig(fieldType: any, operator: any): any;
173
- export declare const absoluteDateOrTimeOperatorNames: string[];
174
- export declare const relativeDateOrTimeOperatorNames: string[];
175
- //# sourceMappingURL=inline-condition-operators.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"inline-condition-operators.d.ts","sourceRoot":"","sources":["../../../src/conditions/inline-condition-operators.ts"],"names":[],"mappings":"AAsCA,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuC3B,CAAA;AAED,wBAAgB,gBAAgB,CAAC,SAAS,KAAA,YAEzC;AAED,wBAAgB,aAAa,CAAC,SAAS,KAAA,EAAE,SAAS,KAAA,EAAE,QAAQ,KAAA,EAAE,KAAK,KAAA,OAKlE;AAED,wBAAgB,iBAAiB,CAAC,SAAS,KAAA,EAAE,QAAQ,KAAA,OAEpD;AAyCD,eAAO,MAAM,+BAA+B,UAE3C,CAAA;AACD,eAAO,MAAM,+BAA+B,UAE3C,CAAA"}
@@ -1,93 +0,0 @@
1
- declare class Registration {
2
- type: any;
3
- constructor(type: any, factory: any);
4
- }
5
- export declare class AbstractConditionValue {
6
- type: any;
7
- constructor(registration: any);
8
- toPresentationString(): void;
9
- toExpression(): void;
10
- }
11
- export declare class ConditionValue extends AbstractConditionValue {
12
- value: any;
13
- display: any;
14
- constructor(value: any, display: any);
15
- toPresentationString(): any;
16
- toExpression(): any;
17
- static from(obj: any): ConditionValue;
18
- clone(): ConditionValue;
19
- }
20
- export declare const dateDirections: {
21
- FUTURE: string;
22
- PAST: string;
23
- };
24
- export declare const dateUnits: {
25
- YEARS: {
26
- display: string;
27
- value: string;
28
- };
29
- MONTHS: {
30
- display: string;
31
- value: string;
32
- };
33
- DAYS: {
34
- display: string;
35
- value: string;
36
- };
37
- };
38
- export declare const timeUnits: {
39
- HOURS: {
40
- display: string;
41
- value: string;
42
- };
43
- MINUTES: {
44
- display: string;
45
- value: string;
46
- };
47
- SECONDS: {
48
- display: string;
49
- value: string;
50
- };
51
- };
52
- export declare const dateTimeUnits: {
53
- YEARS: {
54
- display: string;
55
- value: string;
56
- };
57
- MONTHS: {
58
- display: string;
59
- value: string;
60
- };
61
- DAYS: {
62
- display: string;
63
- value: string;
64
- };
65
- } & {
66
- HOURS: {
67
- display: string;
68
- value: string;
69
- };
70
- MINUTES: {
71
- display: string;
72
- value: string;
73
- };
74
- SECONDS: {
75
- display: string;
76
- value: string;
77
- };
78
- };
79
- export declare const relativeTimeValueType: Registration;
80
- export declare class RelativeTimeValue extends AbstractConditionValue {
81
- timePeriod: any;
82
- timeUnit: any;
83
- direction: any;
84
- timeOnly: any;
85
- constructor(timePeriod: any, timeUnit: any, direction: any, timeOnly?: boolean);
86
- toPresentationString(): string;
87
- toExpression(): string;
88
- static from(obj: any): RelativeTimeValue;
89
- clone(): RelativeTimeValue;
90
- }
91
- export declare function valueFrom(obj: any): any;
92
- export {};
93
- //# sourceMappingURL=inline-condition-values.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"inline-condition-values.d.ts","sourceRoot":"","sources":["../../../src/conditions/inline-condition-values.ts"],"names":[],"mappings":"AAEA,cAAM,YAAY;IAChB,IAAI,MAAA;gBAEQ,IAAI,KAAA,EAAE,OAAO,KAAA;CAI1B;AAED,qBAAa,sBAAsB;IACjC,IAAI,MAAA;gBAEQ,YAAY,KAAA;IAYxB,oBAAoB;IACpB,YAAY;CACb;AAGD,qBAAa,cAAe,SAAQ,sBAAsB;IACxD,KAAK,MAAA;IACL,OAAO,MAAA;gBAEK,KAAK,KAAA,EAAE,OAAO,KAAA;IAY1B,oBAAoB;IAIpB,YAAY;IAIZ,MAAM,CAAC,IAAI,CAAC,GAAG,KAAA;IAIf,KAAK;CAGN;AAED,eAAO,MAAM,cAAc;;;CAG1B,CAAA;AAED,eAAO,MAAM,SAAS;;;;;;;;;;;;;CAIrB,CAAA;AACD,eAAO,MAAM,SAAS;;;;;;;;;;;;;CAIrB,CAAA;AACD,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;CAA0C,CAAA;AAEpE,eAAO,MAAM,qBAAqB,cAEjC,CAAA;AACD,qBAAa,iBAAkB,SAAQ,sBAAsB;IAC3D,UAAU,MAAA;IACV,QAAQ,MAAA;IACR,SAAS,MAAA;IACT,QAAQ,MAAA;gBAEI,UAAU,KAAA,EAAE,QAAQ,KAAA,EAAE,SAAS,KAAA,EAAE,QAAQ,UAAQ;IAqB7D,oBAAoB;IAIpB,YAAY;IAUZ,MAAM,CAAC,IAAI,CAAC,GAAG,KAAA;IASf,KAAK;CAGN;AAaD,wBAAgB,SAAS,CAAC,GAAG,KAAA,OAE5B"}