@haddowg/json-api-client 1.25.0 → 1.27.0
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.
- package/README.md +6 -0
- package/dist/ajv.cjs +20 -2
- package/dist/ajv.d.cts +5 -1
- package/dist/ajv.d.cts.map +1 -1
- package/dist/ajv.d.mts +5 -1
- package/dist/ajv.d.mts.map +1 -1
- package/dist/ajv.mjs +20 -2
- package/dist/ajv.mjs.map +1 -1
- package/dist/index.cjs +197 -243
- package/dist/index.d.cts +32 -6
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +32 -6
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +180 -231
- package/dist/index.mjs.map +1 -1
- package/dist/validate-BvO7NhkT.mjs +418 -0
- package/dist/validate-BvO7NhkT.mjs.map +1 -0
- package/dist/{validate-BPV_qwZb.d.cts → validate-CMy8mJD2.d.cts} +615 -71
- package/dist/validate-CMy8mJD2.d.cts.map +1 -0
- package/dist/{validate-BPV_qwZb.d.mts → validate-CMy8mJD2.d.mts} +615 -71
- package/dist/validate-CMy8mJD2.d.mts.map +1 -0
- package/dist/validate-DMRQn0XN.cjs +481 -0
- package/package.json +1 -1
- package/dist/validate-BPV_qwZb.d.cts.map +0 -1
- package/dist/validate-BPV_qwZb.d.mts.map +0 -1
package/README.md
CHANGED
|
@@ -73,6 +73,12 @@ albums.$meta?.['page'] // raw top-level meta
|
|
|
73
73
|
> A relation kept in `include` must also stay in the `fields` set for that type, or it is narrowed
|
|
74
74
|
> off the result type.
|
|
75
75
|
|
|
76
|
+
Where the server allows it, `fields` also takes `<attribute>.<key>` to read one key of an object
|
|
77
|
+
attribute, under the
|
|
78
|
+
[Nested Fieldsets profile](https://haddowg.github.io/json-api/profiles/nested-fieldsets/). The
|
|
79
|
+
attribute is then typed with only the selected keys, each optional, and the resource's
|
|
80
|
+
`$nestedFieldset` lists them.
|
|
81
|
+
|
|
76
82
|
### Get one — with a hydrated compound document
|
|
77
83
|
|
|
78
84
|
```ts
|
package/dist/ajv.cjs
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_validate = require("./validate-DMRQn0XN.cjs");
|
|
2
3
|
//#region src/ajv.ts
|
|
3
4
|
/**
|
|
4
5
|
* Thrown by the ajv adapter when a wire resource fails its per-type schema. Aggregates every
|
|
@@ -43,15 +44,32 @@ function toFailures(type, id, errors) {
|
|
|
43
44
|
* skips a type the bundle does not cover (graceful partial coverage), and on a failing resource
|
|
44
45
|
* throws an aggregated {@link AjvValidationError} listing the failing pointers.
|
|
45
46
|
*
|
|
47
|
+
* A response to a request carrying a sparse fieldset for the resource's type is checked against
|
|
48
|
+
* the type's schema relaxed for that fieldset ({@link sparseSchema}), compiled the first time the
|
|
49
|
+
* fieldset is seen and reused after, so the members it leaves out aren't reported missing.
|
|
50
|
+
*
|
|
46
51
|
* @param ajv A configured ajv instance ({@link AjvLike}) — typically `new Ajv2020({ allErrors: true })`.
|
|
47
52
|
* @param schemas The codegen-emitted `schemas` map (type -> resource-object JSON Schema 2020-12 doc).
|
|
48
53
|
*/
|
|
49
54
|
function createAjvValidator(ajv, schemas) {
|
|
50
55
|
const compiled = /* @__PURE__ */ new Map();
|
|
51
56
|
for (const [type, schema] of Object.entries(schemas)) compiled.set(type, ajv.compile(schema));
|
|
52
|
-
const
|
|
57
|
+
const sparse = /* @__PURE__ */ new Map();
|
|
58
|
+
/** The type's validator, relaxed for the fieldset when the request sent one. */
|
|
59
|
+
const validatorFor = (type, fields) => {
|
|
60
|
+
const whole = compiled.get(type);
|
|
61
|
+
if (whole === void 0 || fields === void 0) return whole;
|
|
62
|
+
const key = `${type}\n${fields.join(",")}`;
|
|
63
|
+
let validate = sparse.get(key);
|
|
64
|
+
if (validate === void 0) {
|
|
65
|
+
validate = ajv.compile(require_validate.sparseSchema(schemas[type], fields));
|
|
66
|
+
sparse.set(key, validate);
|
|
67
|
+
}
|
|
68
|
+
return validate;
|
|
69
|
+
};
|
|
70
|
+
const validator = (resource, _schema, context) => {
|
|
53
71
|
const { type, id } = resource;
|
|
54
|
-
const validate =
|
|
72
|
+
const validate = validatorFor(type, context?.fields);
|
|
55
73
|
if (validate === void 0) return;
|
|
56
74
|
if (!validate(resource)) throw new AjvValidationError(type, id, toFailures(type, id, validate.errors ?? []));
|
|
57
75
|
};
|
package/dist/ajv.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { n as SchemaMap, o as Validator } from "./validate-CMy8mJD2.cjs";
|
|
2
2
|
import { ValidateFunction } from "ajv";
|
|
3
3
|
|
|
4
4
|
//#region src/ajv.d.ts
|
|
@@ -46,6 +46,10 @@ declare class AjvValidationError extends Error {
|
|
|
46
46
|
* skips a type the bundle does not cover (graceful partial coverage), and on a failing resource
|
|
47
47
|
* throws an aggregated {@link AjvValidationError} listing the failing pointers.
|
|
48
48
|
*
|
|
49
|
+
* A response to a request carrying a sparse fieldset for the resource's type is checked against
|
|
50
|
+
* the type's schema relaxed for that fieldset ({@link sparseSchema}), compiled the first time the
|
|
51
|
+
* fieldset is seen and reused after, so the members it leaves out aren't reported missing.
|
|
52
|
+
*
|
|
49
53
|
* @param ajv A configured ajv instance ({@link AjvLike}) — typically `new Ajv2020({ allErrors: true })`.
|
|
50
54
|
* @param schemas The codegen-emitted `schemas` map (type -> resource-object JSON Schema 2020-12 doc).
|
|
51
55
|
*/
|
package/dist/ajv.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ajv.d.cts","names":[],"sources":["../src/ajv.ts"],"mappings":";;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"ajv.d.cts","names":[],"sources":["../src/ajv.ts"],"mappings":";;;;;;;;;;UAiDiB,OAAA;EACf,OAAA,CAAQ,MAAA,YAAkB,gBAAgB;AAAA;;UAI3B,oBAAA;EA0EuB;EAxEtC,IAAA;EAwEoE;EAtEpE,EAAA;EAsE6E;EApE7E,OAAA;EAoEiC;EAlEjC,OAAA;EAkE+C;EAhE/C,OAAA;AAAA;AAgE6E;;;;;AAAA,cAxDlE,kBAAA,SAA2B,KAAA;;WAE7B,QAAA,WAAmB,oBAAA;;WAEnB,IAAA;;WAEA,UAAA;cAEG,IAAA,UAAc,EAAA,sBAAwB,QAAA,WAAmB,oBAAA;AAAA;;;;;;;;;;;;;;;;iBAgDvD,kBAAA,CAAmB,GAAA,EAAK,OAAA,EAAS,OAAA,EAAS,SAAA,GAAY,SAAA"}
|
package/dist/ajv.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { n as SchemaMap, o as Validator } from "./validate-CMy8mJD2.mjs";
|
|
2
2
|
import { ValidateFunction } from "ajv";
|
|
3
3
|
|
|
4
4
|
//#region src/ajv.d.ts
|
|
@@ -46,6 +46,10 @@ declare class AjvValidationError extends Error {
|
|
|
46
46
|
* skips a type the bundle does not cover (graceful partial coverage), and on a failing resource
|
|
47
47
|
* throws an aggregated {@link AjvValidationError} listing the failing pointers.
|
|
48
48
|
*
|
|
49
|
+
* A response to a request carrying a sparse fieldset for the resource's type is checked against
|
|
50
|
+
* the type's schema relaxed for that fieldset ({@link sparseSchema}), compiled the first time the
|
|
51
|
+
* fieldset is seen and reused after, so the members it leaves out aren't reported missing.
|
|
52
|
+
*
|
|
49
53
|
* @param ajv A configured ajv instance ({@link AjvLike}) — typically `new Ajv2020({ allErrors: true })`.
|
|
50
54
|
* @param schemas The codegen-emitted `schemas` map (type -> resource-object JSON Schema 2020-12 doc).
|
|
51
55
|
*/
|
package/dist/ajv.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ajv.d.mts","names":[],"sources":["../src/ajv.ts"],"mappings":";;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"ajv.d.mts","names":[],"sources":["../src/ajv.ts"],"mappings":";;;;;;;;;;UAiDiB,OAAA;EACf,OAAA,CAAQ,MAAA,YAAkB,gBAAgB;AAAA;;UAI3B,oBAAA;EA0EuB;EAxEtC,IAAA;EAwEoE;EAtEpE,EAAA;EAsE6E;EApE7E,OAAA;EAoEiC;EAlEjC,OAAA;EAkE+C;EAhE/C,OAAA;AAAA;AAgE6E;;;;;AAAA,cAxDlE,kBAAA,SAA2B,KAAA;;WAE7B,QAAA,WAAmB,oBAAA;;WAEnB,IAAA;;WAEA,UAAA;cAEG,IAAA,UAAc,EAAA,sBAAwB,QAAA,WAAmB,oBAAA;AAAA;;;;;;;;;;;;;;;;iBAgDvD,kBAAA,CAAmB,GAAA,EAAK,OAAA,EAAS,OAAA,EAAS,SAAA,GAAY,SAAA"}
|
package/dist/ajv.mjs
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { r as sparseSchema } from "./validate-BvO7NhkT.mjs";
|
|
1
2
|
//#region src/ajv.ts
|
|
2
3
|
/**
|
|
3
4
|
* Thrown by the ajv adapter when a wire resource fails its per-type schema. Aggregates every
|
|
@@ -42,15 +43,32 @@ function toFailures(type, id, errors) {
|
|
|
42
43
|
* skips a type the bundle does not cover (graceful partial coverage), and on a failing resource
|
|
43
44
|
* throws an aggregated {@link AjvValidationError} listing the failing pointers.
|
|
44
45
|
*
|
|
46
|
+
* A response to a request carrying a sparse fieldset for the resource's type is checked against
|
|
47
|
+
* the type's schema relaxed for that fieldset ({@link sparseSchema}), compiled the first time the
|
|
48
|
+
* fieldset is seen and reused after, so the members it leaves out aren't reported missing.
|
|
49
|
+
*
|
|
45
50
|
* @param ajv A configured ajv instance ({@link AjvLike}) — typically `new Ajv2020({ allErrors: true })`.
|
|
46
51
|
* @param schemas The codegen-emitted `schemas` map (type -> resource-object JSON Schema 2020-12 doc).
|
|
47
52
|
*/
|
|
48
53
|
function createAjvValidator(ajv, schemas) {
|
|
49
54
|
const compiled = /* @__PURE__ */ new Map();
|
|
50
55
|
for (const [type, schema] of Object.entries(schemas)) compiled.set(type, ajv.compile(schema));
|
|
51
|
-
const
|
|
56
|
+
const sparse = /* @__PURE__ */ new Map();
|
|
57
|
+
/** The type's validator, relaxed for the fieldset when the request sent one. */
|
|
58
|
+
const validatorFor = (type, fields) => {
|
|
59
|
+
const whole = compiled.get(type);
|
|
60
|
+
if (whole === void 0 || fields === void 0) return whole;
|
|
61
|
+
const key = `${type}\n${fields.join(",")}`;
|
|
62
|
+
let validate = sparse.get(key);
|
|
63
|
+
if (validate === void 0) {
|
|
64
|
+
validate = ajv.compile(sparseSchema(schemas[type], fields));
|
|
65
|
+
sparse.set(key, validate);
|
|
66
|
+
}
|
|
67
|
+
return validate;
|
|
68
|
+
};
|
|
69
|
+
const validator = (resource, _schema, context) => {
|
|
52
70
|
const { type, id } = resource;
|
|
53
|
-
const validate =
|
|
71
|
+
const validate = validatorFor(type, context?.fields);
|
|
54
72
|
if (validate === void 0) return;
|
|
55
73
|
if (!validate(resource)) throw new AjvValidationError(type, id, toFailures(type, id, validate.errors ?? []));
|
|
56
74
|
};
|
package/dist/ajv.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ajv.mjs","names":[],"sources":["../src/ajv.ts"],"sourcesContent":["/**\n * @haddowg/json-api-client/ajv — an optional ajv adapter for the validation seam.\n *\n * Turns a user-brought ajv instance + the codegen-emitted `schemas` map into the\n * {@link Validator} the client's `validate?` option accepts, so opting into per-field\n * validation is a few lines:\n *\n * ```ts\n * import Ajv2020 from 'ajv/dist/2020'\n * import { createClient } from '@haddowg/json-api-client'\n * import { createAjvValidator } from '@haddowg/json-api-client/ajv'\n * import { schemas } from './japi.gen' // the codegen's `schemas` constant\n *\n * // The bundle emits the JSON Schema 2020-12 dialect, so use `Ajv2020`. `strict: false`\n * // tolerates the schemas' `x-enum-*` annotations; `allErrors` aggregates every failing field.\n * const ajv = new Ajv2020({ strict: false, allErrors: true })\n * const client = createClient(descriptor, {\n * baseUrl: 'https://music.example',\n * validate: createAjvValidator(ajv, schemas),\n * })\n * ```\n *\n * The schemas also carry `format` annotations (`date-time`, `date`, `uuid`, `time`, `uri`). ajv\n * ignores unknown formats by default; to ENFORCE them attach `ajv-formats`\n * (`import addFormats from 'ajv-formats'; addFormats(ajv)`). Note the wire's `time` is a\n * duration-style value the strict `time` format rejects — pass `{ mode: 'fast' }` or omit `time`\n * if you hit that, since formats are advisory and the client's posture is to validate structure\n * and types, trusting the wire on format minutiae.\n *\n * `ajv` is an OPTIONAL peer dependency of this package — it is imported here as a TYPE\n * only (`import type`), so the engine is brought by the caller and never enters the core\n * client's runtime dependency tree. This module is its own sub-path export\n * (`@haddowg/json-api-client/ajv`); importing the main entry never pulls ajv in.\n */\nimport type { ErrorObject, ValidateFunction } from 'ajv'\nimport type
|
|
1
|
+
{"version":3,"file":"ajv.mjs","names":[],"sources":["../src/ajv.ts"],"sourcesContent":["/**\n * @haddowg/json-api-client/ajv — an optional ajv adapter for the validation seam.\n *\n * Turns a user-brought ajv instance + the codegen-emitted `schemas` map into the\n * {@link Validator} the client's `validate?` option accepts, so opting into per-field\n * validation is a few lines:\n *\n * ```ts\n * import Ajv2020 from 'ajv/dist/2020'\n * import { createClient } from '@haddowg/json-api-client'\n * import { createAjvValidator } from '@haddowg/json-api-client/ajv'\n * import { schemas } from './japi.gen' // the codegen's `schemas` constant\n *\n * // The bundle emits the JSON Schema 2020-12 dialect, so use `Ajv2020`. `strict: false`\n * // tolerates the schemas' `x-enum-*` annotations; `allErrors` aggregates every failing field.\n * const ajv = new Ajv2020({ strict: false, allErrors: true })\n * const client = createClient(descriptor, {\n * baseUrl: 'https://music.example',\n * validate: createAjvValidator(ajv, schemas),\n * })\n * ```\n *\n * The schemas also carry `format` annotations (`date-time`, `date`, `uuid`, `time`, `uri`). ajv\n * ignores unknown formats by default; to ENFORCE them attach `ajv-formats`\n * (`import addFormats from 'ajv-formats'; addFormats(ajv)`). Note the wire's `time` is a\n * duration-style value the strict `time` format rejects — pass `{ mode: 'fast' }` or omit `time`\n * if you hit that, since formats are advisory and the client's posture is to validate structure\n * and types, trusting the wire on format minutiae.\n *\n * `ajv` is an OPTIONAL peer dependency of this package — it is imported here as a TYPE\n * only (`import type`), so the engine is brought by the caller and never enters the core\n * client's runtime dependency tree. This module is its own sub-path export\n * (`@haddowg/json-api-client/ajv`); importing the main entry never pulls ajv in.\n */\nimport type { ErrorObject, ValidateFunction } from 'ajv'\nimport {\n type SchemaMap,\n sparseSchema,\n type ValidationContext,\n type Validator,\n type WireResource,\n} from './validate'\n\n/**\n * The minimal ajv surface the adapter uses: `compile(schema)` -> a validate function. Any\n * ajv-core instance satisfies it — typically `new Ajv2020()` (the JSON Schema 2020-12 dialect\n * the bundle emits), but a base `Ajv` with the 2020 meta-schema added works too. Typed\n * structurally so the adapter binds to the capability, not a specific ajv subclass.\n */\nexport interface AjvLike {\n compile(schema: unknown): ValidateFunction\n}\n\n/** One failing field: the resource it came from plus ajv's pointer, keyword, and message. */\nexport interface AjvValidationFailure {\n /** The JSON:API type of the resource that failed (`schemas[type]` was applied). */\n type: string\n /** The resource id, when present (a bare identifier or a full resource object both carry one). */\n id?: string\n /** ajv's `instancePath` into the resource (e.g. `/attributes/title`); empty string for the root. */\n pointer: string\n /** The failing ajv keyword (e.g. `type`, `maxLength`, `enum`). */\n keyword: string\n /** ajv's human-readable message (e.g. `must be string`). */\n message: string\n}\n\n/**\n * Thrown by the ajv adapter when a wire resource fails its per-type schema. Aggregates every\n * ajv error into {@link AjvValidationFailure}s (one per failing field) and renders a message\n * listing the failing pointers, so a caller can both read the summary and walk `failures`.\n */\nexport class AjvValidationError extends Error {\n /** Every failing field across the resource (ajv runs with `allErrors`-aware reporting if enabled). */\n readonly failures: readonly AjvValidationFailure[]\n /** The JSON:API type of the resource that failed. */\n readonly type: string\n /** The id of the resource that failed, when present. */\n readonly resourceId?: string\n\n constructor(type: string, id: string | undefined, failures: readonly AjvValidationFailure[]) {\n const at = id === undefined ? type : `${type}:${id}`\n const pointers = failures.map((f) => `${f.pointer || '/'} ${f.message}`).join('; ')\n super(`Resource ${at} failed schema validation: ${pointers}`)\n this.name = 'AjvValidationError'\n this.type = type\n if (id !== undefined) {\n this.resourceId = id\n }\n this.failures = failures\n }\n}\n\n/** Map ajv's raw `ErrorObject`s for one resource to the adapter's typed failures. */\nfunction toFailures(\n type: string,\n id: string | undefined,\n errors: ErrorObject[],\n): AjvValidationFailure[] {\n return errors.map((e) => {\n const failure: AjvValidationFailure = {\n type,\n pointer: e.instancePath,\n keyword: e.keyword,\n message: e.message ?? 'is invalid',\n }\n if (id !== undefined) {\n failure.id = id\n }\n return failure\n })\n}\n\n/**\n * Build the client's {@link Validator} from a user-brought ajv instance and the codegen's per-type\n * `schemas` map. Each schema is compiled ONCE up front (keyed by JSON:API type) with the instance's\n * configured dialect — pass `new Ajv2020()` for the 2020-12 dialect the bundle emits. The returned\n * function is the bare-`Validator` seam form: it looks the compiled validator up by `resource.type`,\n * skips a type the bundle does not cover (graceful partial coverage), and on a failing resource\n * throws an aggregated {@link AjvValidationError} listing the failing pointers.\n *\n * A response to a request carrying a sparse fieldset for the resource's type is checked against\n * the type's schema relaxed for that fieldset ({@link sparseSchema}), compiled the first time the\n * fieldset is seen and reused after, so the members it leaves out aren't reported missing.\n *\n * @param ajv A configured ajv instance ({@link AjvLike}) — typically `new Ajv2020({ allErrors: true })`.\n * @param schemas The codegen-emitted `schemas` map (type -> resource-object JSON Schema 2020-12 doc).\n */\nexport function createAjvValidator(ajv: AjvLike, schemas: SchemaMap): Validator {\n // Compile every per-type schema once, keyed by type. ajv key-collision (a duplicate `$id`) is the\n // engine's concern; we compile each schema independently so one bad type does not block the rest.\n const compiled = new Map<string, ValidateFunction>()\n for (const [type, schema] of Object.entries(schemas)) {\n compiled.set(type, ajv.compile(schema))\n }\n const sparse = new Map<string, ValidateFunction>()\n\n /** The type's validator, relaxed for the fieldset when the request sent one. */\n const validatorFor = (\n type: string,\n fields: readonly string[] | undefined,\n ): ValidateFunction | undefined => {\n const whole = compiled.get(type)\n if (whole === undefined || fields === undefined) {\n return whole\n }\n const key = `${type}\\n${fields.join(',')}`\n let validate = sparse.get(key)\n if (validate === undefined) {\n validate = ajv.compile(sparseSchema(schemas[type], fields))\n sparse.set(key, validate)\n }\n return validate\n }\n\n // The bare-`Validator` seam form: `(resource, schema, context) => void`. The adapter owns its own\n // compiled lookup (by `resource.type`), so the seam's `schema` argument is unused (the runtime\n // passes `undefined` for a bare validator); `context` carries the request's fieldset.\n const validator: Validator = (\n resource: WireResource,\n _schema: unknown,\n context?: ValidationContext,\n ): void => {\n // Read `type`/`id` up front: ajv's `ValidateFunction` is a type guard, so calling it narrows\n // `resource` in the failing branch and the props would no longer be reachable off it.\n const { type, id } = resource\n const validate = validatorFor(type, context?.fields)\n // A type the bundle does not cover is skipped, not failed — matches the seam's graceful posture.\n if (validate === undefined) {\n return\n }\n if (!validate(resource)) {\n const errors = validate.errors ?? []\n throw new AjvValidationError(type, id, toFailures(type, id, errors))\n }\n }\n return validator\n}\n"],"mappings":";;;;;;;AAwEA,IAAa,qBAAb,cAAwC,MAAM;;CAE5C;;CAEA;;CAEA;CAEA,YAAY,MAAc,IAAwB,UAA2C;EAC3F,MAAM,KAAK,OAAO,KAAA,IAAY,OAAO,GAAG,KAAK,GAAG;EAChD,MAAM,WAAW,SAAS,KAAK,MAAM,GAAG,EAAE,WAAW,IAAI,GAAG,EAAE,SAAS,CAAC,CAAC,KAAK,IAAI;EAClF,MAAM,YAAY,GAAG,6BAA6B,UAAU;EAC5D,KAAK,OAAO;EACZ,KAAK,OAAO;EACZ,IAAI,OAAO,KAAA,GACT,KAAK,aAAa;EAEpB,KAAK,WAAW;CAClB;AACF;;AAGA,SAAS,WACP,MACA,IACA,QACwB;CACxB,OAAO,OAAO,KAAK,MAAM;EACvB,MAAM,UAAgC;GACpC;GACA,SAAS,EAAE;GACX,SAAS,EAAE;GACX,SAAS,EAAE,WAAW;EACxB;EACA,IAAI,OAAO,KAAA,GACT,QAAQ,KAAK;EAEf,OAAO;CACT,CAAC;AACH;;;;;;;;;;;;;;;;AAiBA,SAAgB,mBAAmB,KAAc,SAA+B;CAG9E,MAAM,2BAAW,IAAI,IAA8B;CACnD,KAAK,MAAM,CAAC,MAAM,WAAW,OAAO,QAAQ,OAAO,GACjD,SAAS,IAAI,MAAM,IAAI,QAAQ,MAAM,CAAC;CAExC,MAAM,yBAAS,IAAI,IAA8B;;CAGjD,MAAM,gBACJ,MACA,WACiC;EACjC,MAAM,QAAQ,SAAS,IAAI,IAAI;EAC/B,IAAI,UAAU,KAAA,KAAa,WAAW,KAAA,GACpC,OAAO;EAET,MAAM,MAAM,GAAG,KAAK,IAAI,OAAO,KAAK,GAAG;EACvC,IAAI,WAAW,OAAO,IAAI,GAAG;EAC7B,IAAI,aAAa,KAAA,GAAW;GAC1B,WAAW,IAAI,QAAQ,aAAa,QAAQ,OAAO,MAAM,CAAC;GAC1D,OAAO,IAAI,KAAK,QAAQ;EAC1B;EACA,OAAO;CACT;CAKA,MAAM,aACJ,UACA,SACA,YACS;EAGT,MAAM,EAAE,MAAM,OAAO;EACrB,MAAM,WAAW,aAAa,MAAM,SAAS,MAAM;EAEnD,IAAI,aAAa,KAAA,GACf;EAEF,IAAI,CAAC,SAAS,QAAQ,GAEpB,MAAM,IAAI,mBAAmB,MAAM,IAAI,WAAW,MAAM,IADzC,SAAS,UAAU,CAAC,CAC+B,CAAC;CAEvE;CACA,OAAO;AACT"}
|