@prisma/orm-framework 8.0.0-rc.14-dev.13 → 8.0.0-rc.14-dev.14

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 +1 @@
1
- {"version":3,"file":"psl-parser.mjs","names":["#registry","#records","#parent","#namespace","#declarations","#references","#base","#scopes"],"sources":["../../../../1-framework/2-authoring/psl-parser/dist/index.mjs"],"sourcesContent":["import { n as isPslIdentifier } from \"./tokenizer-BMz7z2KR.mjs\";\nimport { C as TaggedLiteralExprAst, D as IdentifierAst, S as StringLiteralExprAst, _ as FunctionCallAst, b as ObjectLiteralExprAst, c as NamespaceDeclarationAst, g as BooleanLiteralExprAst, i as GenericBlockDeclarationAst, l as TypesBlockAst, m as ArrayLiteralAst, o as ModelDeclarationAst, t as CompositeTypeDeclarationAst, v as NumberLiteralExprAst } from \"./declarations-CgS5vnfJ.mjs\";\nimport { a as readResolvedConstructorCall, c as diagnosticSource, i as readResolvedAttributes, l as mapPslDiagnostics, n as nodePslSpan, o as createPslDiagnosticCollector, r as readResolvedAttribute, s as diagnosticFromSpan, t as keywordPslSpan } from \"./resolve-GE34dgM6.mjs\";\nimport { flatPslModels, namespacePslExtensionBlocks } from \"@internal/framework-components/psl-ast\";\nimport { isAuthoringModelAttributeDescriptor, isAuthoringPslBlockDescriptor, isAuthoringTypeConstructorDescriptor } from \"@internal/framework-components/authoring\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { InternalError } from \"@internal/utils/internal-error\";\nimport { and, notOk, ok, okVoid, or } from \"@internal/utils/result\";\n//#region src/attribute-helpers.ts\nfunction getPositionalArgument(attribute, index = 0) {\n\treturn attribute.args.filter((arg) => arg.kind === \"positional\")[index]?.value;\n}\nfunction parseQuotedStringLiteral(value) {\n\tconst match = value.trim().match(/^(['\"])(.*)\\1$/);\n\tif (!match) return void 0;\n\treturn match[2] ?? \"\";\n}\n//#endregion\n//#region src/attribute-spec/assemble.ts\nfunction* modelAttributeDescriptors(namespace) {\n\tfor (const value of Object.values(namespace)) {\n\t\tif (isAuthoringModelAttributeDescriptor(value)) {\n\t\t\tyield value;\n\t\t\tcontinue;\n\t\t}\n\t\tyield* modelAttributeDescriptors(value);\n\t}\n}\nfunction assembleAttributeSpecs(contributions) {\n\tconst entries = Object.entries(contributions.attributeSpecs.model);\n\tconst claimed = new Set(entries.map(([attribute]) => attribute));\n\tfor (const descriptor of modelAttributeDescriptors(contributions.modelAttributes)) {\n\t\tif (claimed.has(descriptor.attribute)) throw new InternalError(`Duplicate attribute spec registration for \"${descriptor.attribute}\". Each model attribute name may be registered once across family built-ins and model-attribute descriptors.`);\n\t\tclaimed.add(descriptor.attribute);\n\t\tentries.push([descriptor.attribute, descriptor.spec]);\n\t}\n\treturn Object.freeze(blindCast({\n\t\tmodel: Object.freeze(Object.fromEntries(entries)),\n\t\tfield: Object.freeze({ ...contributions.attributeSpecs.field })\n\t}));\n}\n//#endregion\n//#region src/attribute-spec/block-attribute.ts\nfunction blockAttribute(name, config) {\n\treturn {\n\t\tlevel: \"block\",\n\t\tname,\n\t\tdocumentation: config.documentation,\n\t\tpositional: config.positional ?? [],\n\t\tnamed: config.named ?? {},\n\t\t...config.refine !== void 0 ? { refine: config.refine } : {}\n\t};\n}\n//#endregion\n//#region src/attribute-spec/combinators/diagnostic.ts\nconst ATTRIBUTE_DIAGNOSTIC_CODE = \"PSL_INVALID_ATTRIBUTE_SYNTAX\";\nfunction leafDiagnostic(ctx, node, message, code = ATTRIBUTE_DIAGNOSTIC_CODE) {\n\treturn {\n\t\tcode,\n\t\tmessage,\n\t\t...diagnosticSource(ctx.sources, node.syntax).at(nodePslSpan(node.syntax, ctx.sources))\n\t};\n}\n//#endregion\n//#region src/attribute-spec/combinators/bool.ts\nfunction bool() {\n\treturn {\n\t\tkind: \"bool\",\n\t\tlabel: \"boolean\",\n\t\tparse: (arg, ctx) => {\n\t\t\tconst literal = BooleanLiteralExprAst.cast(arg.syntax);\n\t\t\tif (literal !== void 0) {\n\t\t\t\tconst value = literal.value();\n\t\t\t\tif (value !== void 0) return ok(value);\n\t\t\t}\n\t\t\treturn notOk([leafDiagnostic(ctx, arg, \"Expected a boolean literal\")]);\n\t\t}\n\t};\n}\n//#endregion\n//#region src/entity-reference.ts\nconst references = /* @__PURE__ */ new WeakMap();\nfunction entityReference(resolution) {\n\tswitch (resolution.kind) {\n\t\tcase \"model\":\n\t\tcase \"compositeType\":\n\t\tcase \"namedType\":\n\t\tcase \"block\": return interned(resolution.symbol, resolution.namespace);\n\t\tdefault: return;\n\t}\n}\nfunction interned(declaration, namespace) {\n\tconst existing = references.get(declaration);\n\tif (existing !== void 0) return existing;\n\tconst reference = {\n\t\tdeclaration,\n\t\tnamespace\n\t};\n\treferences.set(declaration, reference);\n\treturn reference;\n}\nfunction matchesSelector(reference, expected) {\n\tconst declaration = reference.declaration;\n\tif (declaration.kind !== expected.kind) return false;\n\treturn expected.kind !== \"block\" || declaration.kind === \"block\" && declaration.keyword === expected.keyword;\n}\nfunction describeResolution(resolution) {\n\tswitch (resolution.kind) {\n\t\tcase \"block\": return resolution.symbol.keyword;\n\t\tcase \"contributedType\": return \"scalar type\";\n\t\tcase \"crossSpace\": return \"cross-space reference\";\n\t\tcase \"unresolved\": return \"unresolved name\";\n\t\tdefault: return resolution.kind;\n\t}\n}\n//#endregion\n//#region src/attribute-spec/combinators/entity-ref.ts\nfunction entityRef(expected) {\n\tconst label = `${expected.kind === \"block\" ? expected.keyword : expected.kind} reference`;\n\treturn {\n\t\tkind: \"entityRef\",\n\t\tlabel,\n\t\texpected,\n\t\tparse: (arg, ctx) => {\n\t\t\tconst name = IdentifierAst.cast(arg.syntax)?.name();\n\t\t\tif (name === void 0) return notOk([leafDiagnostic(ctx, arg, `Expected ${label}`)]);\n\t\t\tconst resolution = ctx.binder.symbolForNode(arg.syntax);\n\t\t\tif (resolution === void 0 || resolution.kind === \"unresolved\") return notOk([]);\n\t\t\tconst reference = entityReference(resolution);\n\t\t\tif (reference === void 0 || !matchesSelector(reference, expected)) return notOk([leafDiagnostic(ctx, arg, `Expected ${label} \"${name}\", found ${describeResolution(resolution)}`)]);\n\t\t\treturn ok(reference);\n\t\t}\n\t};\n}\n//#endregion\n//#region src/attribute-spec/combinators/field-ref.ts\nfunction parseFieldName(arg, ctx) {\n\tconst identifier = IdentifierAst.cast(arg.syntax);\n\tif (identifier === void 0) return notOk([leafDiagnostic(ctx, arg, \"Expected a field name\")]);\n\tconst name = identifier.name();\n\tif (name === void 0) return notOk([leafDiagnostic(ctx, arg, \"Expected a field name\")]);\n\tconst resolution = ctx.binder.symbolForNode(arg.syntax);\n\tif (resolution === void 0) return notOk([]);\n\tif (resolution.kind === \"field\") return ok(resolution.symbol.name);\n\tif (resolution.kind === \"crossSpace\") return ok(name);\n\treturn notOk([]);\n}\nfunction fieldRef() {\n\treturn {\n\t\tkind: \"fieldRef\",\n\t\tlabel: \"field name\",\n\t\tparse: parseFieldName\n\t};\n}\nfunction referencedFieldRef() {\n\treturn {\n\t\tkind: \"referencedFieldRef\",\n\t\tlabel: \"field name\",\n\t\tparse: parseFieldName\n\t};\n}\n//#endregion\n//#region src/attribute-spec/interpret.ts\nfunction interpretArgs(args, spec, ctx, span, sourceNode) {\n\tlet outcome = okVoid();\n\tconst output = {};\n\tconst seen = /* @__PURE__ */ new Set();\n\tlet positionalSlot = 0;\n\tlet reportedExcess = false;\n\tfor (const arg of args) {\n\t\tconst name = arg.name()?.name();\n\t\tlet key;\n\t\tlet param;\n\t\tif (name === void 0) {\n\t\t\tconst posParam = spec.positional[positionalSlot];\n\t\t\tif (posParam === void 0) {\n\t\t\t\tif (!reportedExcess) {\n\t\t\t\t\toutcome = and(outcome, notOk([diagnostic(`Attribute \"${spec.name}\" received too many positional arguments`, ctx, span, sourceNode)]));\n\t\t\t\t\treportedExcess = true;\n\t\t\t\t}\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tpositionalSlot += 1;\n\t\t\tkey = posParam.key;\n\t\t\tparam = posParam.type;\n\t\t} else {\n\t\t\tconst namedParam = Object.hasOwn(spec.named, name) ? spec.named[name] : void 0;\n\t\t\tif (namedParam === void 0) {\n\t\t\t\toutcome = and(outcome, notOk([diagnostic(`Attribute \"${spec.name}\" received unknown argument \"${name}\"`, ctx, nodePslSpan(arg.syntax, ctx.sources), arg.syntax)]));\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tkey = name;\n\t\t\tparam = namedParam.type;\n\t\t}\n\t\tif (seen.has(key)) {\n\t\t\toutcome = and(outcome, notOk([diagnostic(`Attribute \"${spec.name}\" received duplicate argument \"${key}\"`, ctx, nodePslSpan(arg.syntax, ctx.sources), arg.syntax)]));\n\t\t\tcontinue;\n\t\t}\n\t\tseen.add(key);\n\t\tconst result = parseArgValue(arg, param, ctx);\n\t\tif (result.ok) output[key] = result.value;\n\t\toutcome = and(outcome, result);\n\t}\n\tconst finalized = /* @__PURE__ */ new Set();\n\tconst finalizeAbsentKey = (key, positionalParam, namedParam) => {\n\t\tif (finalized.has(key) || seen.has(key)) return;\n\t\tfinalized.add(key);\n\t\tconst effective = namedParam ?? positionalParam;\n\t\tif (effective === void 0) return;\n\t\tif (isOptionalArgType(effective)) {\n\t\t\tif (effective.hasDefault) output[key] = effective.defaultValue;\n\t\t\treturn;\n\t\t}\n\t\toutcome = and(outcome, notOk([diagnostic(`Attribute \"${spec.name}\" is missing required argument \"${key}\"`, ctx, span, sourceNode)]));\n\t};\n\tfor (const param of spec.positional) {\n\t\tconst namedParam = Object.hasOwn(spec.named, param.key) ? spec.named[param.key] : void 0;\n\t\tfinalizeAbsentKey(param.key, param.type, namedParam?.type);\n\t}\n\tfor (const key of Object.keys(spec.named)) finalizeAbsentKey(key, void 0, spec.named[key]?.type);\n\tif (!outcome.ok) return notOk(outcome.failure);\n\treturn ok(output);\n}\nfunction interpretAttribute(attrNode, spec, ctx) {\n\tconst attributeSpan = nodePslSpan(attrNode.syntax, ctx.sources);\n\tconst bound = interpretArgs(attrNode.argList()?.args() ?? [], spec, ctx, attributeSpan, attrNode.syntax);\n\tif (!bound.ok) return notOk(bound.failure);\n\tconst value = blindCast(bound.value);\n\tif (spec.refine !== void 0) {\n\t\tconst refineDiagnostics = spec.refine(value, ctx, attrNode);\n\t\tif (refineDiagnostics.length > 0) return notOk(refineDiagnostics);\n\t}\n\treturn ok(value);\n}\nfunction parseArgValue(arg, argType, ctx) {\n\tconst value = arg.value();\n\tif (value === void 0) return notOk([diagnostic(\"Attribute argument is missing a value\", ctx, nodePslSpan(arg.syntax, ctx.sources), arg.syntax)]);\n\treturn argType.parse(value, ctx);\n}\nfunction isOptionalArgType(param) {\n\treturn \"optional\" in param && param.optional === true;\n}\nfunction diagnostic(message, ctx, span, sourceNode) {\n\treturn {\n\t\tcode: ATTRIBUTE_DIAGNOSTIC_CODE,\n\t\tmessage,\n\t\t...diagnosticSource(ctx.sources, sourceNode).at(span)\n\t};\n}\n//#endregion\n//#region src/attribute-spec/combinators/func-call.ts\nfunction funcCall(name, sig) {\n\treturn {\n\t\tkind: \"funcCall\",\n\t\tlabel: `${name}()`,\n\t\tname,\n\t\tsignature: sig,\n\t\tparse: (arg, ctx) => {\n\t\t\tconst guard = matchCallee(arg, name, ctx);\n\t\t\tif (!guard.ok) return guard;\n\t\t\tconst span = nodePslSpan(guard.value.syntax, ctx.sources);\n\t\t\tconst bound = interpretArgs(guard.value.args(), {\n\t\t\t\tname,\n\t\t\t\tpositional: sig.positional ?? [],\n\t\t\t\tnamed: sig.named ?? {}\n\t\t\t}, ctx, span, guard.value.syntax);\n\t\t\tif (!bound.ok) return notOk(bound.failure);\n\t\t\treturn ok({\n\t\t\t\tfn: name,\n\t\t\t\tspan,\n\t\t\t\targs: bound.value\n\t\t\t});\n\t\t}\n\t};\n}\nfunction matchCallee(arg, name, ctx) {\n\tconst call = FunctionCallAst.cast(arg.syntax);\n\tif (call === void 0) return notOk([leafDiagnostic(ctx, arg, \"Expected a function call\")]);\n\tconst qname = call.name();\n\tif (qname === void 0 || qname.dot() !== void 0 || qname.colon() !== void 0) return notOk([leafDiagnostic(ctx, arg, \"Expected a function call\")]);\n\tconst calleeName = qname.identifier()?.token()?.text;\n\tif (calleeName === void 0) return notOk([leafDiagnostic(ctx, arg, \"Expected a function call\")]);\n\tif (calleeName !== name) return notOk([leafDiagnostic(ctx, arg, `Expected ${name}()`)]);\n\treturn ok(call);\n}\n//#endregion\n//#region src/attribute-spec/combinators/identifier.ts\nfunction identifier(name, options) {\n\tconst label = name ?? \"identifier\";\n\treturn {\n\t\tkind: \"identifier\",\n\t\tlabel,\n\t\tname,\n\t\tdocumentation: options?.documentation ?? \"\",\n\t\tparse: (arg, ctx) => {\n\t\t\tconst value = IdentifierAst.cast(arg.syntax)?.name();\n\t\t\tif (value !== void 0 && (name === void 0 || value === name)) return ok(value);\n\t\t\treturn notOk([leafDiagnostic(ctx, arg, `Expected ${label}`)]);\n\t\t}\n\t};\n}\n//#endregion\n//#region src/attribute-spec/combinators/int.ts\nfunction int(opts) {\n\tconst min = opts?.min;\n\tconst max = opts?.max;\n\treturn {\n\t\tkind: \"int\",\n\t\tlabel: \"integer\",\n\t\t...min === void 0 ? {} : { min },\n\t\t...max === void 0 ? {} : { max },\n\t\tparse: (arg, ctx) => {\n\t\t\tconst literal = NumberLiteralExprAst.cast(arg.syntax);\n\t\t\tif (literal !== void 0) {\n\t\t\t\tconst value = literal.value();\n\t\t\t\tif (value !== void 0 && Number.isInteger(value)) {\n\t\t\t\t\tif ((min === void 0 || value >= min) && (max === void 0 || value <= max)) return ok(value);\n\t\t\t\t\treturn notOk([leafDiagnostic(ctx, arg, rangeMessage(min, max))]);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn notOk([leafDiagnostic(ctx, arg, \"Expected an integer literal\")]);\n\t\t}\n\t};\n}\nfunction rangeMessage(min, max) {\n\tif (min !== void 0 && max !== void 0) return `Expected an integer between ${min} and ${max}`;\n\tif (min !== void 0) return `Expected an integer greater than or equal to ${min}`;\n\treturn `Expected an integer less than or equal to ${max}`;\n}\n//#endregion\n//#region src/attribute-spec/combinators/json.ts\n/**\n* Reads an opaque JSON object from a quoted JSON string — the ADR's one text-encoded surface\n* exception (e.g. an index `filter` / `weights` argument). The string is decoded by the parser,\n* then JSON-parsed; a non-object (array/scalar) or invalid JSON is a diagnostic.\n*/\nfunction json() {\n\treturn {\n\t\tkind: \"json\",\n\t\tlabel: \"JSON object\",\n\t\tparse: (arg, ctx) => {\n\t\t\tconst literal = StringLiteralExprAst.cast(arg.syntax);\n\t\t\tif (literal === void 0) return notOk([leafDiagnostic(ctx, arg, \"Expected a JSON object string\")]);\n\t\t\tconst raw = literal.value();\n\t\t\tif (raw !== void 0) try {\n\t\t\t\tconst parsed = JSON.parse(raw);\n\t\t\t\tif (typeof parsed === \"object\" && parsed !== null && !Array.isArray(parsed)) return ok(blindCast(parsed));\n\t\t\t} catch {}\n\t\t\treturn notOk([leafDiagnostic(ctx, arg, \"Expected a valid JSON object\")]);\n\t\t}\n\t};\n}\n//#endregion\n//#region src/attribute-spec/combinators/list.ts\nfunction list(of, opts) {\n\tconst allowEmpty = opts?.allowEmpty ?? true;\n\tconst unique = opts?.unique ?? false;\n\treturn {\n\t\tkind: \"list\",\n\t\tlabel: opts?.label ?? (of.label.includes(\" | \") ? `(${of.label})[]` : `${of.label}[]`),\n\t\tof,\n\t\tallowEmpty,\n\t\tunique,\n\t\tparse: (arg, ctx) => {\n\t\t\tconst literal = ArrayLiteralAst.cast(arg.syntax);\n\t\t\tif (literal === void 0) return notOk([leafDiagnostic(ctx, arg, `Expected a list of ${of.label}`)]);\n\t\t\tconst parsed = [];\n\t\t\tlet outcome = okVoid();\n\t\t\tlet count = 0;\n\t\t\tfor (const element of literal.elements()) {\n\t\t\t\tcount += 1;\n\t\t\t\tconst result = of.parse(element, ctx);\n\t\t\t\tif (result.ok) parsed.push({\n\t\t\t\t\tnode: element,\n\t\t\t\t\tvalue: result.value\n\t\t\t\t});\n\t\t\t\toutcome = and(outcome, result);\n\t\t\t}\n\t\t\tif (!allowEmpty && count === 0) outcome = and(outcome, notOk([leafDiagnostic(ctx, arg, \"Expected a non-empty list\")]));\n\t\t\tif (unique) {\n\t\t\t\tconst seen = /* @__PURE__ */ new Set();\n\t\t\t\tfor (const { node, value } of parsed) if (seen.has(value)) outcome = and(outcome, notOk([leafDiagnostic(ctx, node, \"Duplicate list entry\")]));\n\t\t\t\telse seen.add(value);\n\t\t\t}\n\t\t\tif (!outcome.ok) return notOk(outcome.failure);\n\t\t\treturn ok(parsed.map((entry) => entry.value));\n\t\t}\n\t};\n}\n//#endregion\n//#region src/attribute-spec/combinators/one-of.ts\nfunction oneOf(...alts) {\n\tconst label = alts.map((alt) => alt.label).join(\" | \");\n\treturn {\n\t\tkind: \"oneOf\",\n\t\tlabel,\n\t\talternatives: alts,\n\t\tparse: (arg, ctx) => {\n\t\t\tconst [head, ...tail] = blindCast(alts);\n\t\t\tlet rejection = head.parse(arg, ctx);\n\t\t\tif (rejection.ok) return rejection;\n\t\t\tfor (const alt of tail) {\n\t\t\t\tconst result = alt.parse(arg, ctx);\n\t\t\t\tif (result.ok) return result;\n\t\t\t\trejection = or(rejection, result);\n\t\t\t}\n\t\t\tif (!rejection.ok && rejection.failure.length === 0) return notOk([]);\n\t\t\treturn notOk([leafDiagnostic(ctx, arg, `Expected one of: ${label}`)]);\n\t\t}\n\t};\n}\n//#endregion\n//#region src/attribute-spec/combinators/record.ts\nfunction record(of) {\n\treturn {\n\t\tkind: \"record\",\n\t\tlabel: `{ [key]: ${of.label} }`,\n\t\tof,\n\t\tparse: (arg, ctx) => {\n\t\t\tconst literal = ObjectLiteralExprAst.cast(arg.syntax);\n\t\t\tif (literal === void 0) return notOk([leafDiagnostic(ctx, arg, \"Expected an object literal\")]);\n\t\t\tconst entries = [];\n\t\t\tconst keys = /* @__PURE__ */ new Set();\n\t\t\tlet outcome = okVoid();\n\t\t\tfor (const field of Array.from(literal.fields())) {\n\t\t\t\tconst key = field.keyName();\n\t\t\t\tif (key === void 0) {\n\t\t\t\t\toutcome = and(outcome, notOk([leafDiagnostic(ctx, field, \"Expected a key\")]));\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tconst value = field.value();\n\t\t\t\tif (value === void 0) {\n\t\t\t\t\toutcome = and(outcome, notOk([leafDiagnostic(ctx, field, `Expected a value for key \"${key}\"`)]));\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tconst parsed = of.parse(value, ctx);\n\t\t\t\tif (!parsed.ok) {\n\t\t\t\t\toutcome = and(outcome, parsed);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (keys.has(key)) {\n\t\t\t\t\toutcome = and(outcome, notOk([leafDiagnostic(ctx, field, `Duplicate key \"${key}\"`)]));\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tkeys.add(key);\n\t\t\t\tentries.push([key, parsed.value]);\n\t\t\t}\n\t\t\tif (!outcome.ok) return notOk(outcome.failure);\n\t\t\treturn ok(Object.fromEntries(entries));\n\t\t}\n\t};\n}\n//#endregion\n//#region src/attribute-spec/combinators/str.ts\nfunction str(value) {\n\tif (value === void 0) return {\n\t\tkind: \"str\",\n\t\tlabel: \"string\",\n\t\tvalue: void 0,\n\t\tparse: (arg, ctx) => {\n\t\t\tconst literal = StringLiteralExprAst.cast(arg.syntax);\n\t\t\tif (literal !== void 0) {\n\t\t\t\tconst parsed = literal.value();\n\t\t\t\tif (parsed !== void 0) return ok(parsed);\n\t\t\t}\n\t\t\treturn notOk([leafDiagnostic(ctx, arg, \"Expected a string literal\")]);\n\t\t}\n\t};\n\treturn {\n\t\tkind: \"str\",\n\t\tlabel: JSON.stringify(value),\n\t\tvalue,\n\t\tparse: (arg, ctx) => {\n\t\t\tconst literal = StringLiteralExprAst.cast(arg.syntax);\n\t\t\tif (literal !== void 0) {\n\t\t\t\tif (literal.value() === value) return ok(value);\n\t\t\t}\n\t\t\treturn notOk([leafDiagnostic(ctx, arg, `Expected ${JSON.stringify(value)}`)]);\n\t\t}\n\t};\n}\n//#endregion\n//#region src/attribute-spec/combinators/json-value.ts\nfunction jsonValue() {\n\tconst self = {\n\t\tkind: \"oneOf\",\n\t\tlabel: \"JSON value\",\n\t\tget alternatives() {\n\t\t\treturn composed.alternatives;\n\t\t},\n\t\tparse: (arg, ctx) => composed.parse(arg, ctx)\n\t};\n\tconst composed = oneOf(str(), finiteNumber(), bool(), jsonNull(), list(self), record(self));\n\treturn self;\n}\nfunction finiteNumber() {\n\treturn {\n\t\tkind: \"num\",\n\t\tvalue: void 0,\n\t\tlabel: \"number\",\n\t\tparse: (arg, ctx) => {\n\t\t\tconst value = NumberLiteralExprAst.cast(arg.syntax)?.value();\n\t\t\tif (value === void 0 || Number.isNaN(value) || !Number.isFinite(value)) return notOk([leafDiagnostic(ctx, arg, \"Expected a finite number literal\")]);\n\t\t\treturn ok(value);\n\t\t}\n\t};\n}\nfunction jsonNull() {\n\treturn {\n\t\tkind: \"null\",\n\t\tlabel: \"null\",\n\t\tparse: (arg, ctx) => {\n\t\t\tif (IdentifierAst.cast(arg.syntax)?.name() === \"null\") return ok(null);\n\t\t\treturn notOk([leafDiagnostic(ctx, arg, \"Expected null\")]);\n\t\t}\n\t};\n}\n//#endregion\n//#region src/attribute-spec/combinators/num.ts\nfunction num(value) {\n\tif (value === void 0) return {\n\t\tkind: \"num\",\n\t\tlabel: \"number\",\n\t\tvalue: void 0,\n\t\tparse: (arg, ctx) => {\n\t\t\tconst literal = NumberLiteralExprAst.cast(arg.syntax);\n\t\t\tif (literal !== void 0) {\n\t\t\t\tconst parsed = literal.value();\n\t\t\t\tif (parsed !== void 0) return ok(parsed);\n\t\t\t}\n\t\t\treturn notOk([leafDiagnostic(ctx, arg, \"Expected a number literal\")]);\n\t\t}\n\t};\n\treturn {\n\t\tkind: \"num\",\n\t\tlabel: String(value),\n\t\tvalue,\n\t\tparse: (arg, ctx) => {\n\t\t\tconst literal = NumberLiteralExprAst.cast(arg.syntax);\n\t\t\tif (literal !== void 0) {\n\t\t\t\tif (literal.value() === value) return ok(value);\n\t\t\t}\n\t\t\treturn notOk([leafDiagnostic(ctx, arg, `Expected ${value}`)]);\n\t\t}\n\t};\n}\n//#endregion\n//#region src/attribute-spec/combinators/num-literal.ts\n/** A number literal kept as its source text, for consumers that must not round it through a JS number. */\nfunction numLiteral() {\n\treturn {\n\t\tkind: \"num\",\n\t\tlabel: \"number\",\n\t\tvalue: void 0,\n\t\tparse: (arg, ctx) => {\n\t\t\tconst text = NumberLiteralExprAst.cast(arg.syntax)?.token()?.text;\n\t\t\tif (text !== void 0) return ok({ text });\n\t\t\treturn notOk([leafDiagnostic(ctx, arg, \"Expected a number literal\")]);\n\t\t}\n\t};\n}\n//#endregion\n//#region src/attribute-spec/combinators/tagged-literal.ts\n/**\n* A `` tag`...` ``, `tag\"...\"`, or `tag'...'` argument. `tags` and `documentation` describe the\n* registered tags for tooling; parsing accepts any tag.\n*/\nfunction taggedLiteral(tags, options) {\n\treturn {\n\t\tkind: \"taggedLiteral\",\n\t\tlabel: `${tags[0] ?? \"tag\"}\\`...\\``,\n\t\ttags,\n\t\tdocumentation: options.documentation,\n\t\tparse: (arg, ctx) => {\n\t\t\tconst literal = TaggedLiteralExprAst.cast(arg.syntax);\n\t\t\tif (literal === void 0) return notOk([leafDiagnostic(ctx, arg, \"Expected a tagged literal\")]);\n\t\t\treturn ok({\n\t\t\t\ttag: literal.tagName(),\n\t\t\t\tcanonicalization: literal.canonicalization(),\n\t\t\t\tspan: nodePslSpan(literal.syntax, ctx.sources)\n\t\t\t});\n\t\t}\n\t};\n}\n//#endregion\n//#region src/attribute-spec/field-attribute.ts\nfunction fieldAttribute(name, config) {\n\treturn {\n\t\tlevel: \"field\",\n\t\tname,\n\t\tdocumentation: config.documentation,\n\t\tpositional: config.positional ?? [],\n\t\tnamed: Object.assign(Object.create(null), config.named),\n\t\t...config.refine !== void 0 ? { refine: config.refine } : {}\n\t};\n}\n//#endregion\n//#region src/attribute-spec/model-attribute.ts\nfunction modelAttribute(name, config) {\n\treturn {\n\t\tlevel: \"model\",\n\t\tname,\n\t\tdocumentation: config.documentation,\n\t\tpositional: config.positional ?? [],\n\t\tnamed: Object.assign(Object.create(null), config.named),\n\t\t...config.refine !== void 0 ? { refine: config.refine } : {}\n\t};\n}\n//#endregion\n//#region src/attribute-spec/optional.ts\nfunction optional(type, ...rest) {\n\tif (rest.length === 0) return {\n\t\t...type,\n\t\toptional: true,\n\t\thasDefault: false\n\t};\n\treturn {\n\t\t...type,\n\t\toptional: true,\n\t\thasDefault: true,\n\t\tdefaultValue: rest[0]\n\t};\n}\n//#endregion\n//#region src/block-spec/descriptor.ts\nfunction blockSpecFactoryOf(descriptor) {\n\treturn blindCast(descriptor.spec);\n}\n//#endregion\n//#region src/contributed-type-scope.ts\nconst scopes = /* @__PURE__ */ new WeakMap();\nfunction contributedTypeScope(typeConstructors) {\n\tconst existing = scopes.get(typeConstructors);\n\tif (existing !== void 0) return existing;\n\tconst members = collect(typeConstructors, []);\n\tconst created = { lookup(name) {\n\t\treturn members.get(name);\n\t} };\n\tscopes.set(typeConstructors, created);\n\treturn created;\n}\nfunction collect(namespace, prefix) {\n\tconst members = /* @__PURE__ */ new Map();\n\tfor (const [name, value] of Object.entries(namespace)) {\n\t\tconst path = [...prefix, name];\n\t\tmembers.set(name, isAuthoringTypeConstructorDescriptor(value) ? {\n\t\t\tkind: \"contributedType\",\n\t\t\tname,\n\t\t\tpath,\n\t\t\tdescriptor: value\n\t\t} : {\n\t\t\tkind: \"contributedNamespace\",\n\t\t\tname,\n\t\t\tpath,\n\t\t\tmembers: collect(value, path)\n\t\t});\n\t}\n\treturn members;\n}\n//#endregion\n//#region src/extension-block.ts\nfunction findBlockDescriptor(descriptors, keyword) {\n\tif (descriptors === void 0) return void 0;\n\tfor (const value of Object.values(descriptors)) {\n\t\tif (value === void 0) continue;\n\t\tif (isAuthoringPslBlockDescriptor(value)) {\n\t\t\tif (value.keyword === keyword) return value;\n\t\t\tcontinue;\n\t\t}\n\t\tconst nested = findBlockDescriptor(value, keyword);\n\t\tif (nested !== void 0) return nested;\n\t}\n}\n//#endregion\n//#region src/scope.ts\nfunction contributedResolution(member) {\n\treturn member.kind === \"contributedType\" ? {\n\t\tkind: \"contributedType\",\n\t\tsymbol: member\n\t} : {\n\t\tkind: \"contributedNamespace\",\n\t\tsymbol: member\n\t};\n}\nfunction namespaceMember(namespace, name) {\n\tconst model = namespace.models[name];\n\tif (model !== void 0) return {\n\t\tkind: \"model\",\n\t\tsymbol: model,\n\t\tnamespace\n\t};\n\tconst compositeType = namespace.compositeTypes[name];\n\tif (compositeType !== void 0) return {\n\t\tkind: \"compositeType\",\n\t\tsymbol: compositeType,\n\t\tnamespace\n\t};\n\tconst block = namespace.blocks[name];\n\tif (block !== void 0) return {\n\t\tkind: \"block\",\n\t\tsymbol: block,\n\t\tnamespace\n\t};\n}\nvar ContributedScope = class {\n\t#registry;\n\tconstructor(registry) {\n\t\tthis.#registry = registry;\n\t}\n\tlookup(name) {\n\t\tconst member = this.#registry.lookup(name);\n\t\treturn member === void 0 ? void 0 : contributedResolution(member);\n\t}\n};\nvar DocumentScope = class {\n\t#records;\n\t#parent;\n\tconstructor(records, parent) {\n\t\tthis.#records = records;\n\t\tthis.#parent = parent;\n\t}\n\tlookup(name) {\n\t\tconst records = this.#records;\n\t\tconst model = records.models[name];\n\t\tif (model !== void 0) return {\n\t\t\tkind: \"model\",\n\t\t\tsymbol: model\n\t\t};\n\t\tconst compositeType = records.compositeTypes[name];\n\t\tif (compositeType !== void 0) return {\n\t\t\tkind: \"compositeType\",\n\t\t\tsymbol: compositeType\n\t\t};\n\t\tconst namedType = records.namedTypes[name];\n\t\tif (namedType !== void 0) return {\n\t\t\tkind: \"namedType\",\n\t\t\tsymbol: namedType\n\t\t};\n\t\tconst block = records.blocks[name];\n\t\tif (block !== void 0) return {\n\t\t\tkind: \"block\",\n\t\t\tsymbol: block\n\t\t};\n\t\tconst namespace = records.namespaces[name];\n\t\tif (namespace !== void 0) return {\n\t\t\tkind: \"namespace\",\n\t\t\tsymbol: namespace\n\t\t};\n\t\treturn this.#parent?.lookup(name);\n\t}\n};\nvar NamespaceScope = class {\n\t#namespace;\n\t#parent;\n\tconstructor(namespace, parent) {\n\t\tthis.#namespace = namespace;\n\t\tthis.#parent = parent;\n\t}\n\tlookup(name) {\n\t\treturn namespaceMember(this.#namespace, name) ?? this.#parent.lookup(name);\n\t}\n};\nfunction contributedScope(registry) {\n\treturn new ContributedScope(registry);\n}\nfunction documentScope(records, parent) {\n\treturn new DocumentScope(records, parent);\n}\nfunction namespaceScope(namespace, parent) {\n\treturn new NamespaceScope(namespace, parent);\n}\nfunction isNamespaceLike(resolution) {\n\treturn resolution.kind === \"namespace\" || resolution.kind === \"contributedNamespace\";\n}\nfunction lookupMember(qualifier, name) {\n\tif (qualifier.kind === \"contributedNamespace\") {\n\t\tconst member = qualifier.symbol.members.get(name);\n\t\treturn member === void 0 ? void 0 : contributedResolution(member);\n\t}\n\treturn namespaceMember(qualifier.symbol, name);\n}\n//#endregion\n//#region src/binder.ts\nconst PSL_UNRESOLVED_REFERENCE = \"PSL_UNRESOLVED_REFERENCE\";\nfunction typeReferenceNode(field) {\n\treturn field.node.typeAnnotation()?.name()?.syntax;\n}\nvar PslBinder = class {\n\t#declarations;\n\t#references;\n\tconstructor(declarations, references) {\n\t\tthis.#declarations = declarations;\n\t\tthis.#references = references;\n\t}\n\tdeclaredSymbol(node) {\n\t\treturn this.#declarations.get(node);\n\t}\n\tsymbolForNode(node) {\n\t\treturn this.#references.get(node);\n\t}\n};\nvar ScopeStack = class {\n\t#base;\n\t#scopes;\n\tconstructor(base) {\n\t\tthis.#base = base;\n\t\tthis.#scopes = [base];\n\t}\n\tcurrent() {\n\t\treturn this.#scopes[this.#scopes.length - 1] ?? this.#base;\n\t}\n\tpush(scope) {\n\t\tthis.#scopes.push(scope);\n\t}\n\tpop() {\n\t\tthis.#scopes.pop();\n\t}\n};\nfunction walkEntities(symbolTable, stack, visit) {\n\tconst { topLevel } = symbolTable;\n\tfor (const entity of Object.values(topLevel.models)) visit(entity);\n\tfor (const entity of Object.values(topLevel.compositeTypes)) visit(entity);\n\tfor (const namespace of Object.values(topLevel.namespaces)) {\n\t\tstack.push(namespaceScope(namespace, stack.current()));\n\t\tfor (const entity of Object.values(namespace.models)) visit(entity);\n\t\tfor (const entity of Object.values(namespace.compositeTypes)) visit(entity);\n\t\tstack.pop();\n\t}\n}\nfunction createBinder(options) {\n\tconst { sources, symbolTable, typeConstructors, attributeSpecs, controlMutationDefaults, describeUnsupportedAttribute } = options;\n\tconst pslBlockDescriptors = options.pslBlockDescriptors ?? {};\n\tconst stack = new ScopeStack(documentScope(symbolTable.topLevel, contributedScope(contributedTypeScope(typeConstructors))));\n\tconst declarations = /* @__PURE__ */ new WeakMap();\n\tconst references = /* @__PURE__ */ new WeakMap();\n\tconst diagnostics = [];\n\tconst binder = new PslBinder(declarations, references);\n\tfor (const symbol of Object.values(symbolTable.topLevel.namedTypes)) declarations.set(symbol.node.syntax, symbol);\n\tfor (const symbol of Object.values(symbolTable.topLevel.blocks)) declarations.set(symbol.node.syntax, symbol);\n\tfor (const namespace of Object.values(symbolTable.topLevel.namespaces)) {\n\t\tfor (const declaration of namespace.declarations) declarations.set(declaration.node.syntax, namespace);\n\t\tfor (const symbol of Object.values(namespace.blocks)) declarations.set(symbol.node.syntax, symbol);\n\t}\n\twalkEntities(symbolTable, stack, (entity) => {\n\t\tdeclarations.set(entity.node.syntax, entity);\n\t\tfor (const field of Object.values(entity.fields)) {\n\t\t\tdeclarations.set(field.node.syntax, field);\n\t\t\tconst node = typeReferenceNode(field);\n\t\t\tif (node === void 0) continue;\n\t\t\tconst outcome = resolveTypeReference(field, stack.current());\n\t\t\tif (outcome === void 0) continue;\n\t\t\treferences.set(node, outcome.resolution);\n\t\t\tif (outcome.message !== void 0) diagnostics.push({\n\t\t\t\tcode: PSL_UNRESOLVED_REFERENCE,\n\t\t\t\tmessage: outcome.message,\n\t\t\t\tdata: {\n\t\t\t\t\treference: \"type\",\n\t\t\t\t\tname: outcome.name,\n\t\t\t\t\tconstructorCall: field.typeConstructor !== void 0\n\t\t\t\t},\n\t\t\t\t...diagnosticSource(sources, node).at()\n\t\t\t});\n\t\t}\n\t});\n\twalkEntities(symbolTable, stack, (entity) => {\n\t\tconst context = {\n\t\t\towner: entity,\n\t\t\tscope: stack.current(),\n\t\t\treferences,\n\t\t\tdiagnostics,\n\t\t\tsymbolTable,\n\t\t\tsources,\n\t\t\tdescribeUnsupportedAttribute\n\t\t};\n\t\tconst specContext = entity.kind === \"model\" ? {\n\t\t\tsymbols: symbolTable,\n\t\t\tmodel: entity,\n\t\t\tcontrolMutationDefaults\n\t\t} : void 0;\n\t\tbindAttributes(entity, entity.attributes, attributeSpecs.model, (factory) => specContext === void 0 ? void 0 : factory(specContext), {\n\t\t\t...context,\n\t\t\tfield: void 0\n\t\t});\n\t\tfor (const field of Object.values(entity.fields)) bindAttributes(field, field.attributes, attributeSpecs.field, (factory) => specContext === void 0 ? void 0 : factory({\n\t\t\t...specContext,\n\t\t\tfield\n\t\t}), {\n\t\t\t...context,\n\t\t\tfield\n\t\t});\n\t});\n\tconst blockContext = {\n\t\tpslBlockDescriptors,\n\t\tsymbolTable,\n\t\tsources,\n\t\treferences,\n\t\tdiagnostics\n\t};\n\tconst bindBlocks = (blocks) => {\n\t\tconst context = {\n\t\t\t...blockContext,\n\t\t\tscope: stack.current()\n\t\t};\n\t\tfor (const block of Object.values(blocks)) bindBlock(block, context);\n\t};\n\tbindBlocks(symbolTable.topLevel.blocks);\n\tfor (const namespace of Object.values(symbolTable.topLevel.namespaces)) {\n\t\tstack.push(namespaceScope(namespace, stack.current()));\n\t\tbindBlocks(namespace.blocks);\n\t\tstack.pop();\n\t}\n\treturn {\n\t\tbinder,\n\t\tdiagnostics\n\t};\n}\nfunction bindBlock(block, ctx) {\n\tconst descriptor = findBlockDescriptor(ctx.pslBlockDescriptors, block.keyword);\n\tif (descriptor === void 0) return;\n\tconst spec = blockSpecFactoryOf(descriptor)({\n\t\tsymbols: ctx.symbolTable,\n\t\tblock\n\t});\n\tfor (const entry of block.node.entries()) {\n\t\tconst key = entry.key()?.name();\n\t\tif (key === void 0) continue;\n\t\tconst rule = spec.mode === \"struct\" ? Object.hasOwn(spec.parameters, key) ? spec.parameters[key]?.type : void 0 : spec.value.type;\n\t\tconst value = entry.value();\n\t\tif (rule === void 0 || value === void 0) continue;\n\t\tbindExpression(rule, value, ctx);\n\t}\n\tconst attributeSpecs = descriptor.attributes ?? {};\n\tif (Object.keys(attributeSpecs).length === 0) return;\n\tfor (const attribute of readResolvedAttributes(block.node.attributes(), ctx.sources)) {\n\t\tconst factory = attributeSpecs[attribute.name];\n\t\tif (factory === void 0) continue;\n\t\tbindArguments(attribute, blindCast(factory)({\n\t\t\tsymbols: ctx.symbolTable,\n\t\t\tblock\n\t\t}), ctx);\n\t}\n}\nfunction bindExpression(rule, expression, ctx, modelContext) {\n\tconst trial = tryBindExpression(rule, expression, ctx, modelContext);\n\tfor (const [node, resolution] of trial.references) ctx.references.set(node, resolution);\n\tctx.diagnostics.push(...trial.diagnostics.values());\n}\nfunction tryBindExpression(rule, expression, ctx, modelContext) {\n\tconst references = /* @__PURE__ */ new Map();\n\tconst diagnostics = /* @__PURE__ */ new Map();\n\tswitch (rule.kind) {\n\t\tcase \"oneOf\":\n\t\t\tfor (const alternative of rule.alternatives) {\n\t\t\t\tconst trial = tryBindExpression(alternative, expression, ctx, modelContext);\n\t\t\t\tif (trial.matched) return trial;\n\t\t\t\tfor (const [node, diagnostic] of trial.diagnostics) diagnostics.set(node, diagnostic);\n\t\t\t\tfor (const [node, resolution] of trial.references) if (resolution.kind === \"unresolved\") references.set(node, resolution);\n\t\t\t}\n\t\t\treturn {\n\t\t\t\tmatched: false,\n\t\t\t\treferences,\n\t\t\t\tdiagnostics\n\t\t\t};\n\t\tcase \"list\":\n\t\tcase \"record\": {\n\t\t\tconst children = rule.kind === \"list\" ? ArrayLiteralAst.cast(expression.syntax)?.elements() : recordValues(expression);\n\t\t\tif (children === void 0) return {\n\t\t\t\tmatched: false,\n\t\t\t\treferences,\n\t\t\t\tdiagnostics\n\t\t\t};\n\t\t\tlet matched = true;\n\t\t\tfor (const child of children) {\n\t\t\t\tconst trial = tryBindExpression(rule.of, child, ctx, modelContext);\n\t\t\t\tmatched = trial.matched && matched;\n\t\t\t\tfor (const [node, resolution] of trial.references) references.set(node, resolution);\n\t\t\t\tfor (const [node, diagnostic] of trial.diagnostics) diagnostics.set(node, diagnostic);\n\t\t\t}\n\t\t\treturn {\n\t\t\t\tmatched,\n\t\t\t\treferences,\n\t\t\t\tdiagnostics\n\t\t\t};\n\t\t}\n\t\tcase \"funcCall\": {\n\t\t\tconst call = FunctionCallAst.cast(expression.syntax);\n\t\t\tconst name = call?.name();\n\t\t\tif (call === void 0 || name === void 0 || name.dot() !== void 0 || name.colon() !== void 0 || name.identifier()?.name() !== rule.name) return {\n\t\t\t\tmatched: false,\n\t\t\t\treferences,\n\t\t\t\tdiagnostics\n\t\t\t};\n\t\t\tlet matched = true;\n\t\t\tlet positional = 0;\n\t\t\tfor (const arg of call.args()) {\n\t\t\t\tconst key = arg.name()?.name();\n\t\t\t\tconst parameter = argumentParameter(rule.signature, key, key === void 0 ? positional++ : positional);\n\t\t\t\tconst value = arg.value();\n\t\t\t\tif (parameter === void 0 || value === void 0) {\n\t\t\t\t\tmatched = false;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tconst trial = tryBindExpression(parameter.type, value, ctx, modelContext);\n\t\t\t\tmatched = trial.matched && matched;\n\t\t\t\tfor (const [node, resolution] of trial.references) references.set(node, resolution);\n\t\t\t\tfor (const [node, diagnostic] of trial.diagnostics) diagnostics.set(node, diagnostic);\n\t\t\t}\n\t\t\treturn {\n\t\t\t\tmatched,\n\t\t\t\treferences,\n\t\t\t\tdiagnostics\n\t\t\t};\n\t\t}\n\t\tcase \"entityRef\": {\n\t\t\tconst node = expression.syntax;\n\t\t\tconst name = IdentifierAst.cast(node)?.name();\n\t\t\tif (name === void 0) return {\n\t\t\t\tmatched: false,\n\t\t\t\treferences,\n\t\t\t\tdiagnostics\n\t\t\t};\n\t\t\tconst failures = [];\n\t\t\tconst resolution = resolveEntity(name, node, {\n\t\t\t\t...ctx,\n\t\t\t\tdiagnostics: failures\n\t\t\t});\n\t\t\treferences.set(node, resolution);\n\t\t\tfor (const diagnostic of failures) diagnostics.set(node, diagnostic);\n\t\t\treturn {\n\t\t\t\tmatched: resolution.kind !== \"unresolved\",\n\t\t\t\treferences,\n\t\t\t\tdiagnostics\n\t\t\t};\n\t\t}\n\t\tcase \"fieldRef\": {\n\t\t\tconst node = expression.syntax;\n\t\t\tconst name = IdentifierAst.cast(node)?.name();\n\t\t\tif (name === void 0 || modelContext === void 0) return {\n\t\t\t\tmatched: false,\n\t\t\t\treferences,\n\t\t\t\tdiagnostics\n\t\t\t};\n\t\t\tconst failures = [];\n\t\t\tconst resolution = resolveOwnerField(name, node, {\n\t\t\t\t...modelContext,\n\t\t\t\tdiagnostics: failures\n\t\t\t});\n\t\t\treferences.set(node, resolution);\n\t\t\tfor (const diagnostic of failures) diagnostics.set(node, diagnostic);\n\t\t\treturn {\n\t\t\t\tmatched: resolution.kind !== \"unresolved\",\n\t\t\t\treferences,\n\t\t\t\tdiagnostics\n\t\t\t};\n\t\t}\n\t\tcase \"referencedFieldRef\": {\n\t\t\tconst node = expression.syntax;\n\t\t\tconst name = IdentifierAst.cast(node)?.name();\n\t\t\tif (name === void 0 || modelContext === void 0) return {\n\t\t\t\tmatched: false,\n\t\t\t\treferences,\n\t\t\t\tdiagnostics\n\t\t\t};\n\t\t\tconst failures = [];\n\t\t\tconst resolution = resolveReferencedField(name, node, {\n\t\t\t\t...modelContext,\n\t\t\t\tdiagnostics: failures\n\t\t\t});\n\t\t\treferences.set(node, resolution);\n\t\t\tfor (const diagnostic of failures) diagnostics.set(node, diagnostic);\n\t\t\treturn {\n\t\t\t\tmatched: resolution.kind !== \"unresolved\",\n\t\t\t\treferences,\n\t\t\t\tdiagnostics\n\t\t\t};\n\t\t}\n\t\tdefault: return {\n\t\t\tmatched: true,\n\t\t\treferences,\n\t\t\tdiagnostics\n\t\t};\n\t}\n}\nfunction recordValues(expression) {\n\tconst record = ObjectLiteralExprAst.cast(expression.syntax);\n\tif (record === void 0) return void 0;\n\treturn (function* () {\n\t\tfor (const field of record.fields()) {\n\t\t\tconst value = field.value();\n\t\t\tif (value !== void 0) yield value;\n\t\t}\n\t})();\n}\nfunction bindAttributes(holder, attributes, specs, instantiate, ctx) {\n\tconst declared = holder.node.attributes();\n\tconst nodes = Array.from(declared);\n\tconst level = holder.kind === \"field\" ? \"field\" : \"model\";\n\tattributes.forEach((attribute, index) => {\n\t\tconst factory = own(specs, attribute.name);\n\t\tif (factory === void 0) {\n\t\t\tconst diagnostic = ctx.describeUnsupportedAttribute?.({\n\t\t\t\tattribute,\n\t\t\t\tlevel,\n\t\t\t\towner: ctx.owner,\n\t\t\t\tfield: level === \"field\" ? ctx.field : void 0\n\t\t\t});\n\t\t\tif (diagnostic !== void 0) ctx.diagnostics.push(diagnostic);\n\t\t\treturn;\n\t\t}\n\t\tconst spec = instantiate(factory);\n\t\tif (spec === void 0) return;\n\t\tconst nameNode = nodes[index]?.name()?.syntax;\n\t\tif (nameNode !== void 0) ctx.references.set(nameNode, {\n\t\t\tkind: \"attribute\",\n\t\t\tsymbol: {\n\t\t\t\tkind: \"attribute\",\n\t\t\t\tname: attribute.name,\n\t\t\t\tlevel,\n\t\t\t\tspec\n\t\t\t}\n\t\t});\n\t\tbindArguments(attribute, spec, ctx, ctx);\n\t});\n}\nfunction bindArguments(attribute, spec, ctx, modelContext) {\n\tlet positional = 0;\n\tfor (const arg of attribute.args) {\n\t\tconst parameter = argumentParameter(spec, arg.name, arg.name === void 0 ? positional++ : positional);\n\t\tif (parameter === void 0 || arg.expression === void 0) continue;\n\t\tbindExpression(parameter.type, arg.expression, ctx, modelContext);\n\t}\n}\nfunction argumentParameter(spec, name, position) {\n\tif (name === void 0) return spec.positional?.[position];\n\treturn spec.named === void 0 ? void 0 : own(spec.named, name);\n}\nfunction resolveOwnerField(name, node, ctx) {\n\tconst field = ctx.owner.fields[name];\n\tif (field !== void 0) return {\n\t\tkind: \"field\",\n\t\tsymbol: field\n\t};\n\treport(`Cannot find field \"${name}\" on \"${ctx.owner.name}\"`, node, ctx, \"field\");\n\treturn {\n\t\tkind: \"unresolved\",\n\t\tname\n\t};\n}\nfunction resolveReferencedField(name, node, ctx) {\n\tconst declaring = ctx.field;\n\tif (declaring === void 0) return {\n\t\tkind: \"unresolved\",\n\t\tname\n\t};\n\tif (declaring.typeContractSpaceId !== void 0) return { kind: \"crossSpace\" };\n\tconst typeNode = typeReferenceNode(declaring);\n\tconst field = targetFields(typeNode === void 0 ? void 0 : ctx.references.get(typeNode))?.[name];\n\tif (field !== void 0) return {\n\t\tkind: \"field\",\n\t\tsymbol: field\n\t};\n\treport(`Cannot find field \"${name}\" on the type of \"${ctx.owner.name}.${declaring.name}\"`, node, ctx, \"field\");\n\treturn {\n\t\tkind: \"unresolved\",\n\t\tname\n\t};\n}\nfunction targetFields(target) {\n\tif (target === void 0) return void 0;\n\tif (target.kind === \"model\" || target.kind === \"compositeType\") return target.symbol.fields;\n}\nfunction resolveEntity(name, node, ctx) {\n\tconst found = ctx.scope.lookup(name);\n\tif (found === void 0) {\n\t\treport(`Cannot find entity \"${name}\"`, node, ctx, \"entity\");\n\t\treturn {\n\t\t\tkind: \"unresolved\",\n\t\t\tname\n\t\t};\n\t}\n\treturn found;\n}\nfunction report(message, node, ctx, reference) {\n\tctx.diagnostics.push({\n\t\tcode: PSL_UNRESOLVED_REFERENCE,\n\t\tmessage,\n\t\tdata: { reference },\n\t\t...diagnosticSource(ctx.sources, node).at()\n\t});\n}\nfunction resolveTypeReference(field, scope) {\n\tif (field.malformedType === true) return void 0;\n\tif (field.typeContractSpaceId !== void 0) return { resolution: { kind: \"crossSpace\" } };\n\tconst name = field.typeName;\n\tif (name === \"\") return void 0;\n\tconst namespaceId = field.typeNamespaceId;\n\tconst found = namespaceId === void 0 ? scope.lookup(name) : qualifiedMember(namespaceId, name, scope);\n\tif (found === void 0) {\n\t\tconst written = namespaceId === void 0 ? name : `${namespaceId}.${name}`;\n\t\treturn {\n\t\t\tresolution: {\n\t\t\t\tkind: \"unresolved\",\n\t\t\t\tname: written\n\t\t\t},\n\t\t\tmessage: `Cannot find type \"${written}\"`,\n\t\t\tname: written\n\t\t};\n\t}\n\tif (\"badQualifier\" in found) return {\n\t\tresolution: {\n\t\t\tkind: \"unresolved\",\n\t\t\tname: found.qualifier\n\t\t},\n\t\tmessage: found.badQualifier,\n\t\tname: found.qualifier\n\t};\n\tif (found.kind === \"namespace\" || found.kind === \"contributedNamespace\") {\n\t\tconst written = namespaceId === void 0 ? name : `${namespaceId}.${name}`;\n\t\treturn {\n\t\t\tresolution: found,\n\t\t\tmessage: `\"${written}\" is a namespace; a type reference must name a model, composite type, enum, or named type`,\n\t\t\tname: written\n\t\t};\n\t}\n\treturn { resolution: found };\n}\nfunction qualifiedMember(namespaceId, name, scope) {\n\tconst qualifier = scope.lookup(namespaceId);\n\tif (qualifier === void 0) return void 0;\n\tif (!isNamespaceLike(qualifier)) return {\n\t\tbadQualifier: `\"${namespaceId}\" is ${describeQualifier(qualifier)}, not a namespace`,\n\t\tqualifier: namespaceId\n\t};\n\treturn lookupMember(qualifier, name);\n}\nfunction describeQualifier(resolution) {\n\tswitch (resolution.kind) {\n\t\tcase \"model\": return \"a model\";\n\t\tcase \"compositeType\": return \"a composite type\";\n\t\tcase \"namedType\": return \"a named type\";\n\t\tcase \"block\": return `${resolution.symbol.keyword === \"enum\" ? \"an\" : \"a\"} ${resolution.symbol.keyword}`;\n\t\tdefault: return \"a scalar type\";\n\t}\n}\nfunction own(record, name) {\n\treturn Object.hasOwn(record, name) ? record[name] : void 0;\n}\n//#endregion\n//#region src/block-spec/constructors.ts\nfunction structBlock(config) {\n\treturn {\n\t\tmode: \"struct\",\n\t\tparameters: config.parameters\n\t};\n}\nfunction mapBlock(config) {\n\treturn {\n\t\tmode: \"map\",\n\t\tvalue: config.value,\n\t\tallowBare: config.allowBare ?? false\n\t};\n}\n//#endregion\n//#region src/block-spec/interpret.ts\nfunction interpretExtensionBlock(input) {\n\tconst { block, descriptor, spec, symbols, sources, binder } = input;\n\tconst ctx = {\n\t\tsources,\n\t\tsymbols,\n\t\tbinder\n\t};\n\tconst entries = spec.mode === \"struct\" ? interpretStructBlock(block, spec, ctx) : interpretMapBlock(block, spec, ctx);\n\tconst diagnostics = [...entries.diagnostics];\n\tconst interpretedAttributes = interpretExtensionBlockAttributes({\n\t\tblock,\n\t\tdescriptor,\n\t\tsymbols,\n\t\tsources,\n\t\tbinder\n\t});\n\tdiagnostics.push(...interpretedAttributes.diagnostics);\n\tif (entries.failed || diagnostics.length > 0) return notOk(diagnostics);\n\treturn ok({\n\t\tkind: descriptor.discriminator,\n\t\tkeyword: block.keyword,\n\t\tname: block.name,\n\t\tvalues: blindCast(entries.values),\n\t\tparameterSpans: entries.parameterSpans,\n\t\tattributes: interpretedAttributes.attributes,\n\t\tspan: block.span\n\t});\n}\nfunction interpretStructBlock(block, spec, ctx) {\n\tconst diagnostics = [];\n\tlet failed = false;\n\tconst values = Object.create(null);\n\tconst parameterSpans = Object.create(null);\n\tconst seen = /* @__PURE__ */ new Set();\n\tfor (const entry of block.node.entries()) {\n\t\tconst key = entry.key()?.name();\n\t\tif (key === void 0) continue;\n\t\tconst span = nodePslSpan(entry.syntax, ctx.sources);\n\t\tif (seen.has(key)) {\n\t\t\tdiagnostics.push(duplicateParameterDiagnostic(block, key, ctx, entry, span));\n\t\t\tcontinue;\n\t\t}\n\t\tseen.add(key);\n\t\tconst rule = Object.hasOwn(spec.parameters, key) ? spec.parameters[key]?.type : void 0;\n\t\tif (rule === void 0) {\n\t\t\tdiagnostics.push(entryDiagnostic(\"PSL_EXTENSION_UNKNOWN_PARAMETER\", `Unknown parameter \"${key}\" in \"${block.keyword}\" block \"${block.name}\". The block does not declare this parameter.`, ctx, entry, span));\n\t\t\tcontinue;\n\t\t}\n\t\tparameterSpans[key] = span;\n\t\tconst value = entry.value();\n\t\tif (value === void 0) {\n\t\t\tdiagnostics.push(bareEntryDiagnostic(block, key, ctx, entry, span));\n\t\t\tcontinue;\n\t\t}\n\t\tconst parsed = rule.parse(value, ctx);\n\t\tif (parsed.ok) values[key] = parsed.value;\n\t\telse {\n\t\t\tfailed = true;\n\t\t\tdiagnostics.push(...parsed.failure);\n\t\t}\n\t}\n\tfor (const [key, param] of Object.entries(spec.parameters)) {\n\t\tif (seen.has(key)) continue;\n\t\tif (isOptionalArgType(param.type)) {\n\t\t\tif (param.type.hasDefault) values[key] = param.type.defaultValue;\n\t\t\tcontinue;\n\t\t}\n\t\tdiagnostics.push(entryDiagnostic(\"PSL_EXTENSION_MISSING_REQUIRED_PARAMETER\", `Required parameter \"${key}\" is missing from \"${block.keyword}\" block \"${block.name}\".`, ctx, block.node, block.span));\n\t}\n\treturn {\n\t\tvalues,\n\t\tparameterSpans,\n\t\tdiagnostics,\n\t\tfailed\n\t};\n}\nfunction interpretMapBlock(block, spec, ctx) {\n\tconst diagnostics = [];\n\tlet failed = false;\n\tconst values = Object.create(null);\n\tconst parameterSpans = Object.create(null);\n\tconst seen = /* @__PURE__ */ new Set();\n\tfor (const entry of block.node.entries()) {\n\t\tconst key = entry.key()?.name();\n\t\tif (key === void 0) continue;\n\t\tconst span = nodePslSpan(entry.syntax, ctx.sources);\n\t\tif (seen.has(key)) {\n\t\t\tdiagnostics.push(duplicateParameterDiagnostic(block, key, ctx, entry, span));\n\t\t\tcontinue;\n\t\t}\n\t\tseen.add(key);\n\t\tparameterSpans[key] = span;\n\t\tconst value = entry.value();\n\t\tif (value === void 0) {\n\t\t\tif (spec.allowBare) {\n\t\t\t\tvalues[key] = void 0;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tdiagnostics.push(bareEntryDiagnostic(block, key, ctx, entry, span));\n\t\t\tcontinue;\n\t\t}\n\t\tconst parsed = spec.value.type.parse(value, ctx);\n\t\tif (parsed.ok) values[key] = parsed.value;\n\t\telse {\n\t\t\tfailed = true;\n\t\t\tdiagnostics.push(...parsed.failure);\n\t\t}\n\t}\n\treturn {\n\t\tvalues,\n\t\tparameterSpans,\n\t\tdiagnostics,\n\t\tfailed\n\t};\n}\nfunction duplicateParameterDiagnostic(block, key, ctx, node, span) {\n\treturn entryDiagnostic(\"PSL_EXTENSION_DUPLICATE_PARAMETER\", `Duplicate parameter \"${key}\" in \"${block.keyword}\" block \"${block.name}\"; first occurrence wins`, ctx, node, span);\n}\nfunction bareEntryDiagnostic(block, key, ctx, node, span) {\n\treturn entryDiagnostic(\"PSL_INVALID_EXTENSION_BLOCK_MEMBER\", `Parameter \"${key}\" in \"${block.keyword}\" block \"${block.name}\" must be written as \"${key} = <value>\".`, ctx, node, span);\n}\nfunction interpretExtensionBlockAttributes(input) {\n\tconst { block, descriptor, symbols, sources, binder } = input;\n\tconst declared = descriptor.attributes ?? {};\n\tconst attributes = Object.create(null);\n\tconst diagnostics = [];\n\tconst seenNames = /* @__PURE__ */ new Set();\n\tfor (const attribute of block.node.attributes()) {\n\t\tconst name = attribute.name()?.path().join(\".\") ?? \"\";\n\t\tconst span = nodePslSpan(attribute.syntax, sources);\n\t\tif (!Object.hasOwn(declared, name)) {\n\t\t\tdiagnostics.push({\n\t\t\t\tcode: \"PSL_EXTENSION_UNKNOWN_BLOCK_ATTRIBUTE\",\n\t\t\t\tmessage: `Unknown attribute \"@@${name}\" in \"${block.keyword}\" block \"${block.name}\"`,\n\t\t\t\t...diagnosticSource(sources, attribute.syntax).at(span)\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\t\tif (seenNames.has(name)) {\n\t\t\tdiagnostics.push({\n\t\t\t\tcode: \"PSL_INVALID_EXTENSION_BLOCK_ATTRIBUTE\",\n\t\t\t\tmessage: `Duplicate attribute \"@@${name}\" in \"${block.keyword}\" block \"${block.name}\"; first occurrence wins`,\n\t\t\t\t...diagnosticSource(sources, attribute.syntax).at(span)\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\t\tseenNames.add(name);\n\t\tconst spec = blindCast(declared[name])({\n\t\t\tsymbols,\n\t\t\tblock\n\t\t});\n\t\tconst result = interpretAttribute(attribute, spec, {\n\t\t\tsources,\n\t\t\tsymbols,\n\t\t\tbinder\n\t\t});\n\t\tif (result.ok) {\n\t\t\tconst argSpans = Object.create(null);\n\t\t\tlet positionalSlot = 0;\n\t\t\tfor (const arg of readResolvedAttribute(attribute, sources).args) {\n\t\t\t\tconst key = arg.name ?? spec.positional[positionalSlot++]?.key;\n\t\t\t\tif (key !== void 0) argSpans[key] = arg.span;\n\t\t\t}\n\t\t\tattributes[name] = {\n\t\t\t\targs: result.value,\n\t\t\t\targSpans,\n\t\t\t\tspan\n\t\t\t};\n\t\t} else diagnostics.push(...result.failure);\n\t}\n\treturn {\n\t\tattributes,\n\t\tdiagnostics\n\t};\n}\nfunction entryDiagnostic(code, message, ctx, node, span) {\n\treturn {\n\t\tcode,\n\t\tmessage,\n\t\t...diagnosticSource(ctx.sources, node.syntax).at(span)\n\t};\n}\nfunction interpretExtensionBlocks(input) {\n\tconst { symbolTable, sources, pslBlockDescriptors, binder } = input;\n\tconst parsedBlocks = /* @__PURE__ */ new Map();\n\tconst diagnostics = [];\n\tconst scopes = [symbolTable.topLevel, ...Object.values(symbolTable.topLevel.namespaces)];\n\tfor (const scope of scopes) for (const block of Object.values(scope.blocks)) {\n\t\tconst descriptor = findBlockDescriptor(pslBlockDescriptors, block.keyword);\n\t\tif (descriptor === void 0) continue;\n\t\tconst parsed = interpretExtensionBlock({\n\t\t\tblock,\n\t\t\tdescriptor,\n\t\t\tspec: blockSpecFactoryOf(descriptor)({\n\t\t\t\tsymbols: symbolTable,\n\t\t\t\tblock\n\t\t\t}),\n\t\t\tsymbols: symbolTable,\n\t\t\tsources,\n\t\t\tbinder\n\t\t});\n\t\tif (parsed.ok) parsedBlocks.set(block, parsed.value);\n\t\telse diagnostics.push(...parsed.failure);\n\t}\n\treturn {\n\t\tparsedBlocks,\n\t\tdiagnostics\n\t};\n}\n//#endregion\n//#region src/name-the-psl-source-loses.ts\n/**\n* A name that is lost when a PSL file is read. The parser keeps block members, and the PSL contract sources keep other names, as keys of plain objects, where assigning this key sets the object's prototype instead of adding a key. Code that writes PSL must not write this name anywhere a PSL source reads a name, including inside `@map` and `@@map`.\n*/\nconst NAME_THE_PSL_SOURCE_LOSES = \"__proto__\";\n//#endregion\n//#region src/schema-directive.ts\nconst DIRECTIVE = /^(\\s*\\/\\/ *use +)(prisma-8|prisma-next)( *)(?!\\S)/;\nconst LEGACY_NAME = \"prisma-next\";\nfunction isPrismaNextSchema(text) {\n\treturn DIRECTIVE.test(text);\n}\n/** The document with the directive earlier releases wrote replaced by the current one. */\nfunction renameLegacyDirective(text) {\n\treturn text.replace(DIRECTIVE, (whole, lead, name, trail) => name === LEGACY_NAME ? `${lead}prisma-8${trail}` : whole);\n}\n//#endregion\n//#region src/symbol-table.ts\n/**\n* Owns duplicate-declaration detection for all PSL scopes; downstream consumers\n* should consume first-wins symbols rather than re-emitting duplicate diagnostics.\n*/\nfunction buildSymbolTable(options) {\n\tconst { documents, sources } = options;\n\tconst diagnostics = [];\n\tconst namespaces = Object.create(null);\n\tconst namedTypes = Object.create(null);\n\tconst blocks = Object.create(null);\n\tconst models = Object.create(null);\n\tconst compositeTypes = Object.create(null);\n\tconst topLevelNames = /* @__PURE__ */ new Set();\n\tfor (const document of documents) {\n\t\tconst sourceFile = sources.sourceFileFor(document.syntax);\n\t\tconst claim = (taken, name) => {\n\t\t\tconst text = name?.name();\n\t\t\tif (text === void 0) return void 0;\n\t\t\tif (taken.has(text)) {\n\t\t\t\tconst range = nameRange(name, sources);\n\t\t\t\tif (range) diagnostics.push({\n\t\t\t\t\tcode: \"PSL_DUPLICATE_DECLARATION\",\n\t\t\t\t\tmessage: `Duplicate declaration of \"${text}\"`,\n\t\t\t\t\tfilename: sourceFile.filename,\n\t\t\t\t\trange\n\t\t\t\t});\n\t\t\t\treturn;\n\t\t\t}\n\t\t\ttaken.add(text);\n\t\t\treturn text;\n\t\t};\n\t\tfor (const declaration of document.declarations()) if (declaration instanceof ModelDeclarationAst) {\n\t\t\tconst name = claim(topLevelNames, declaration.name());\n\t\t\tif (name !== void 0) models[name] = buildModel(name, declaration, sources, diagnostics);\n\t\t} else if (declaration instanceof CompositeTypeDeclarationAst) {\n\t\t\tconst name = claim(topLevelNames, declaration.name());\n\t\t\tif (name !== void 0) compositeTypes[name] = buildCompositeType(name, declaration, sources, diagnostics);\n\t\t} else if (declaration instanceof GenericBlockDeclarationAst) {\n\t\t\tconst name = claim(topLevelNames, declaration.name());\n\t\t\tif (name !== void 0) blocks[name] = buildBlock(name, declaration, sources);\n\t\t} else if (declaration instanceof NamespaceDeclarationAst) {\n\t\t\tconst declaredName = declaration.name()?.name();\n\t\t\tif (declaredName === void 0) continue;\n\t\t\tlet namespace = namespaces[declaredName];\n\t\t\tif (namespace === void 0) {\n\t\t\t\tconst name = claim(topLevelNames, declaration.name());\n\t\t\t\tif (name === void 0) continue;\n\t\t\t\tnamespace = {\n\t\t\t\t\tkind: \"namespace\",\n\t\t\t\t\tname,\n\t\t\t\t\tdeclarations: [],\n\t\t\t\t\tmodels: Object.create(null),\n\t\t\t\t\tcompositeTypes: Object.create(null),\n\t\t\t\t\tblocks: Object.create(null)\n\t\t\t\t};\n\t\t\t\tnamespaces[name] = namespace;\n\t\t\t}\n\t\t\textendNamespace(namespace, declaration, diagnostics, sources);\n\t\t} else if (declaration instanceof TypesBlockAst) for (const binding of declaration.declarations()) {\n\t\t\tconst name = claim(topLevelNames, binding.name());\n\t\t\tif (name === void 0) continue;\n\t\t\tconst resolved = resolveNamedTypeBinding(binding, sources);\n\t\t\tnamedTypes[name] = {\n\t\t\t\tkind: \"namedType\",\n\t\t\t\tname,\n\t\t\t\tnode: binding,\n\t\t\t\tspan: nodePslSpan(binding.syntax, sources),\n\t\t\t\t...resolved\n\t\t\t};\n\t\t}\n\t}\n\treturn {\n\t\tsymbolTable: { topLevel: {\n\t\t\tnamespaces,\n\t\t\tnamedTypes,\n\t\t\tblocks,\n\t\t\tmodels,\n\t\t\tcompositeTypes\n\t\t} },\n\t\tdiagnostics\n\t};\n}\nfunction buildModel(name, node, sources, diagnostics) {\n\treturn {\n\t\tkind: \"model\",\n\t\tname,\n\t\tnode,\n\t\tspan: nodePslSpan(node.syntax, sources),\n\t\tfields: buildFields(name, node.fields(), sources, diagnostics),\n\t\tattributes: readResolvedAttributes(node.attributes(), sources)\n\t};\n}\nfunction buildCompositeType(name, node, sources, diagnostics) {\n\treturn {\n\t\tkind: \"compositeType\",\n\t\tname,\n\t\tnode,\n\t\tspan: nodePslSpan(node.syntax, sources),\n\t\tfields: buildFields(name, node.fields(), sources, diagnostics),\n\t\tattributes: readResolvedAttributes(node.attributes(), sources)\n\t};\n}\nfunction buildBlock(name, node, sources) {\n\treturn {\n\t\tkind: \"block\",\n\t\tname,\n\t\tkeyword: node.keyword()?.text ?? \"\",\n\t\tnode,\n\t\tspan: nodePslSpan(node.syntax, sources)\n\t};\n}\nfunction extendNamespace(namespace, node, diagnostics, sources) {\n\tconst { models, compositeTypes, blocks } = namespace;\n\tnamespace.declarations.push({\n\t\tnode,\n\t\tspan: nodePslSpan(node.syntax, sources)\n\t});\n\tfor (const member of node.declarations()) {\n\t\tconst memberName = member.name()?.name();\n\t\tif (memberName === void 0) continue;\n\t\tif (Object.hasOwn(models, memberName) || Object.hasOwn(compositeTypes, memberName) || Object.hasOwn(blocks, memberName)) {\n\t\t\tconst range = nameRange(member.name(), sources);\n\t\t\tif (range) diagnostics.push({\n\t\t\t\tcode: \"PSL_DUPLICATE_DECLARATION\",\n\t\t\t\tmessage: `Duplicate declaration of \"${memberName}\"`,\n\t\t\t\tfilename: sources.sourceFileFor(member.syntax).filename,\n\t\t\t\trange\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\t\tif (member instanceof ModelDeclarationAst) models[memberName] = buildModel(memberName, member, sources, diagnostics);\n\t\telse if (member instanceof CompositeTypeDeclarationAst) compositeTypes[memberName] = buildCompositeType(memberName, member, sources, diagnostics);\n\t\telse if (member instanceof GenericBlockDeclarationAst) blocks[memberName] = buildBlock(memberName, member, sources);\n\t}\n}\nfunction buildFields(ownerName, fields, sources, diagnostics) {\n\tconst result = Object.create(null);\n\tfor (const field of fields) {\n\t\tconst nameNode = field.name();\n\t\tconst name = nameNode?.name();\n\t\tif (name === void 0) continue;\n\t\tif (Object.hasOwn(result, name)) {\n\t\t\tconst range = nameRange(nameNode, sources);\n\t\t\tif (range) diagnostics.push({\n\t\t\t\tcode: \"PSL_DUPLICATE_DECLARATION\",\n\t\t\t\tmessage: `Duplicate declaration of \"${name}\"`,\n\t\t\t\tfilename: sources.sourceFileFor(field.syntax).filename,\n\t\t\t\trange\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\t\tresult[name] = buildField(ownerName, name, field, sources, diagnostics);\n\t}\n\treturn result;\n}\nfunction buildField(ownerName, name, node, sources, diagnostics) {\n\tconst attributes = readResolvedAttributes(node.attributes(), sources);\n\tconst span = nodePslSpan(node.syntax, sources);\n\tconst annotation = node.typeAnnotation();\n\tconst typeName = annotation?.name();\n\tif (typeName?.isOverQualified()) {\n\t\tconst path = typeName.path();\n\t\tdiagnostics.push({\n\t\t\tcode: \"PSL_INVALID_QUALIFIED_TYPE\",\n\t\t\tmessage: `Field \"${ownerName}.${name}\" has an invalid qualified type \"${path.join(\".\")}\"; use at most one namespace qualifier (e.g. \"ns.TypeName\")`,\n\t\t\tfilename: sources.sourceFileFor(typeName.syntax).filename,\n\t\t\trange: nodeRange(typeName.syntax, sources)\n\t\t});\n\t\treturn {\n\t\t\tkind: \"field\",\n\t\t\tname,\n\t\t\tnode,\n\t\t\tspan,\n\t\t\ttypeName: path[path.length - 1] ?? \"\",\n\t\t\toptional: false,\n\t\t\tlist: false,\n\t\t\tmalformedType: true,\n\t\t\tattributes\n\t\t};\n\t}\n\tconst typeConstructor = annotation?.isConstructor() ? readResolvedConstructorCall(annotation, sources) : void 0;\n\tconst typeNamespaceId = typeName?.namespace()?.name();\n\tconst typeContractSpaceId = typeName?.space()?.name();\n\treturn {\n\t\tkind: \"field\",\n\t\tname,\n\t\tnode,\n\t\tspan,\n\t\ttypeName: typeName?.identifier()?.name() ?? \"\",\n\t\t...typeNamespaceId !== void 0 ? { typeNamespaceId } : {},\n\t\t...typeContractSpaceId !== void 0 ? { typeContractSpaceId } : {},\n\t\toptional: annotation?.isOptional() ?? false,\n\t\tlist: annotation?.isList() ?? false,\n\t\t...typeConstructor !== void 0 ? { typeConstructor } : {},\n\t\tattributes\n\t};\n}\nfunction resolveNamedTypeBinding(node, sources) {\n\tconst annotation = node.typeAnnotation();\n\tconst isConstructor = annotation?.isConstructor() ?? false;\n\tconst baseType = annotation?.name()?.identifier()?.name();\n\tconst typeConstructor = readResolvedConstructorCall(annotation, sources);\n\treturn {\n\t\tisConstructor,\n\t\t...!isConstructor && baseType !== void 0 ? { baseType } : {},\n\t\t...typeConstructor !== void 0 ? { typeConstructor } : {},\n\t\tattributes: readResolvedAttributes(node.attributes(), sources)\n\t};\n}\nfunction nameRange(name, sources) {\n\tif (name === void 0) return void 0;\n\tconst sourceFile = sources.sourceFileFor(name.syntax);\n\tfor (const token of name.syntax.tokens()) if (token.kind === \"Ident\") return {\n\t\tstart: sourceFile.positionAt(token.offset),\n\t\tend: sourceFile.positionAt(token.offset + token.text.length)\n\t};\n}\nfunction nodeRange(node, sources) {\n\tconst sourceFile = sources.sourceFileFor(node);\n\tconst start = node.offset;\n\tconst end = start + node.green.textLength;\n\treturn {\n\t\tstart: sourceFile.positionAt(start),\n\t\tend: sourceFile.positionAt(end)\n\t};\n}\n//#endregion\nexport { NAME_THE_PSL_SOURCE_LOSES, PSL_UNRESOLVED_REFERENCE, assembleAttributeSpecs, blockAttribute, blockSpecFactoryOf, bool, buildSymbolTable, createBinder, createPslDiagnosticCollector, diagnosticFromSpan, diagnosticSource, entityRef, fieldAttribute, fieldRef, findBlockDescriptor, flatPslModels, funcCall, getPositionalArgument, identifier, int, interpretArgs, interpretAttribute, interpretExtensionBlock, interpretExtensionBlockAttributes, interpretExtensionBlocks, isPrismaNextSchema, isPslIdentifier, json, jsonValue, keywordPslSpan, leafDiagnostic, list, mapBlock, mapPslDiagnostics, modelAttribute, namespacePslExtensionBlocks, nodePslSpan, num, numLiteral, oneOf, optional, parseQuotedStringLiteral, readResolvedAttribute, readResolvedAttributes, readResolvedConstructorCall, record, referencedFieldRef, renameLegacyDirective, str, structBlock, taggedLiteral, typeReferenceNode };\n\n//# sourceMappingURL=index.mjs.map"],"mappings":";;;;;;;;;AASA,SAAS,sBAAsB,WAAW,QAAQ,GAAG;CACpD,OAAO,UAAU,KAAK,QAAQ,QAAQ,IAAI,SAAS,YAAY,CAAC,CAAC,MAAM,EAAE;AAC1E;AACA,SAAS,yBAAyB,OAAO;CACxC,MAAM,QAAQ,MAAM,KAAK,CAAC,CAAC,MAAM,gBAAgB;CACjD,IAAI,CAAC,OAAO,OAAO,KAAK;CACxB,OAAO,MAAM,MAAM;AACpB;AAGA,UAAU,0BAA0B,WAAW;CAC9C,KAAK,MAAM,SAAS,OAAO,OAAO,SAAS,GAAG;EAC7C,IAAI,oCAAoC,KAAK,GAAG;GAC/C,MAAM;GACN;EACD;EACA,OAAO,0BAA0B,KAAK;CACvC;AACD;AACA,SAAS,uBAAuB,eAAe;CAC9C,MAAM,UAAU,OAAO,QAAQ,cAAc,eAAe,KAAK;CACjE,MAAM,UAAU,IAAI,IAAI,QAAQ,KAAK,CAAC,eAAe,SAAS,CAAC;CAC/D,KAAK,MAAM,cAAc,0BAA0B,cAAc,eAAe,GAAG;EAClF,IAAI,QAAQ,IAAI,WAAW,SAAS,GAAG,MAAM,IAAI,cAAc,8CAA8C,WAAW,UAAU,6GAA6G;EAC/O,QAAQ,I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MAAM,SAAS,KAAK,OAAO,OAAO,GAAG,IAAI,MAAM,SAAS,SAAS,OAAO;EAC5E,OAAO,WAAW,WAAW,MAAM,MAAM;EACzC,KAAK,WAAW,WAAW,MAAM,SAAS,MAAM,KAAK,MAAM;CAC5D;AACD;AACA,SAAS,UAAU,MAAM,SAAS;CACjC,MAAM,aAAa,QAAQ,cAAc,IAAI;CAC7C,MAAM,QAAQ,KAAK;CACnB,MAAM,MAAM,QAAQ,KAAK,MAAM;CAC/B,OAAO;EACN,OAAO,WAAW,WAAW,KAAK;EAClC,KAAK,WAAW,WAAW,GAAG;CAC/B;AACD"}
1
+ {"version":3,"file":"psl-parser.mjs","names":["#registry","#records","#namespace","#declarations","#references","#documentScope","#scopes","#base"],"sources":["../../../../1-framework/2-authoring/psl-parser/dist/index.mjs"],"sourcesContent":["import { n as isPslIdentifier } from \"./tokenizer-BMz7z2KR.mjs\";\nimport { C as TaggedLiteralExprAst, D as IdentifierAst, S as StringLiteralExprAst, _ as FunctionCallAst, b as ObjectLiteralExprAst, c as NamespaceDeclarationAst, g as BooleanLiteralExprAst, i as GenericBlockDeclarationAst, l as TypesBlockAst, m as ArrayLiteralAst, o as ModelDeclarationAst, t as CompositeTypeDeclarationAst, v as NumberLiteralExprAst } from \"./declarations-DqOfcPNK.mjs\";\nimport { a as readResolvedConstructorCall, c as diagnosticSource, i as readResolvedAttributes, l as mapPslDiagnostics, n as nodePslSpan, o as createPslDiagnosticCollector, r as readResolvedAttribute, s as diagnosticFromSpan, t as keywordPslSpan } from \"./resolve-GE34dgM6.mjs\";\nimport { flatPslModels, namespacePslExtensionBlocks } from \"@internal/framework-components/psl-ast\";\nimport { isAuthoringModelAttributeDescriptor, isAuthoringPslBlockDescriptor, isAuthoringTypeConstructorDescriptor } from \"@internal/framework-components/authoring\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { InternalError } from \"@internal/utils/internal-error\";\nimport { and, notOk, ok, okVoid, or } from \"@internal/utils/result\";\n//#region src/attribute-helpers.ts\nfunction getPositionalArgument(attribute, index = 0) {\n\treturn attribute.args.filter((arg) => arg.kind === \"positional\")[index]?.value;\n}\nfunction parseQuotedStringLiteral(value) {\n\tconst match = value.trim().match(/^(['\"])(.*)\\1$/);\n\tif (!match) return void 0;\n\treturn match[2] ?? \"\";\n}\n//#endregion\n//#region src/attribute-spec/assemble.ts\nfunction* modelAttributeDescriptors(namespace) {\n\tfor (const value of Object.values(namespace)) {\n\t\tif (isAuthoringModelAttributeDescriptor(value)) {\n\t\t\tyield value;\n\t\t\tcontinue;\n\t\t}\n\t\tyield* modelAttributeDescriptors(value);\n\t}\n}\nfunction assembleAttributeSpecs(contributions) {\n\tconst entries = Object.entries(contributions.attributeSpecs.model);\n\tconst claimed = new Set(entries.map(([attribute]) => attribute));\n\tfor (const descriptor of modelAttributeDescriptors(contributions.modelAttributes)) {\n\t\tif (claimed.has(descriptor.attribute)) throw new InternalError(`Duplicate attribute spec registration for \"${descriptor.attribute}\". Each model attribute name may be registered once across family built-ins and model-attribute descriptors.`);\n\t\tclaimed.add(descriptor.attribute);\n\t\tentries.push([descriptor.attribute, descriptor.spec]);\n\t}\n\treturn Object.freeze(blindCast({\n\t\tmodel: Object.freeze(Object.fromEntries(entries)),\n\t\tfield: Object.freeze({ ...contributions.attributeSpecs.field })\n\t}));\n}\n//#endregion\n//#region src/attribute-spec/block-attribute.ts\nfunction blockAttribute(name, config) {\n\treturn {\n\t\tlevel: \"block\",\n\t\tname,\n\t\tdocumentation: config.documentation,\n\t\tpositional: config.positional ?? [],\n\t\tnamed: config.named ?? {},\n\t\t...config.refine !== void 0 ? { refine: config.refine } : {}\n\t};\n}\n//#endregion\n//#region src/attribute-spec/combinators/diagnostic.ts\nconst ATTRIBUTE_DIAGNOSTIC_CODE = \"PSL_INVALID_ATTRIBUTE_SYNTAX\";\nfunction leafDiagnostic(ctx, node, message, code = ATTRIBUTE_DIAGNOSTIC_CODE) {\n\treturn {\n\t\tcode,\n\t\tmessage,\n\t\t...diagnosticSource(ctx.sources, node.syntax).at(nodePslSpan(node.syntax, ctx.sources))\n\t};\n}\n//#endregion\n//#region src/attribute-spec/combinators/bool.ts\nfunction bool() {\n\treturn {\n\t\tkind: \"bool\",\n\t\tlabel: \"boolean\",\n\t\tparse: (arg, ctx) => {\n\t\t\tconst literal = BooleanLiteralExprAst.cast(arg.syntax);\n\t\t\tif (literal !== void 0) {\n\t\t\t\tconst value = literal.value();\n\t\t\t\tif (value !== void 0) return ok(value);\n\t\t\t}\n\t\t\treturn notOk([leafDiagnostic(ctx, arg, \"Expected a boolean literal\")]);\n\t\t}\n\t};\n}\n//#endregion\n//#region src/entity-reference.ts\nconst references = /* @__PURE__ */ new WeakMap();\nfunction entityReference(resolution) {\n\tswitch (resolution.kind) {\n\t\tcase \"model\":\n\t\tcase \"compositeType\":\n\t\tcase \"namedType\":\n\t\tcase \"block\": return interned(resolution.symbol, resolution.namespace);\n\t\tdefault: return;\n\t}\n}\nfunction interned(declaration, namespace) {\n\tconst existing = references.get(declaration);\n\tif (existing !== void 0) return existing;\n\tconst reference = {\n\t\tdeclaration,\n\t\tnamespace\n\t};\n\treferences.set(declaration, reference);\n\treturn reference;\n}\nfunction matchesSelector(reference, expected) {\n\tconst declaration = reference.declaration;\n\tif (declaration.kind !== expected.kind) return false;\n\treturn expected.kind !== \"block\" || declaration.kind === \"block\" && declaration.keyword === expected.keyword;\n}\nfunction describeResolution(resolution) {\n\tswitch (resolution.kind) {\n\t\tcase \"block\": return resolution.symbol.keyword;\n\t\tcase \"contributedType\": return \"scalar type\";\n\t\tcase \"crossSpace\": return \"cross-space reference\";\n\t\tcase \"unresolved\": return \"unresolved name\";\n\t\tdefault: return resolution.kind;\n\t}\n}\n//#endregion\n//#region src/attribute-spec/combinators/entity-ref.ts\nfunction entityRef(expected) {\n\tconst label = `${expected.kind === \"block\" ? expected.keyword : expected.kind} reference`;\n\treturn {\n\t\tkind: \"entityRef\",\n\t\tlabel,\n\t\texpected,\n\t\tparse: (arg, ctx) => {\n\t\t\tconst name = IdentifierAst.cast(arg.syntax)?.name();\n\t\t\tif (name === void 0) return notOk([leafDiagnostic(ctx, arg, `Expected ${label}`)]);\n\t\t\tconst resolution = ctx.binder.symbolForNode(arg.syntax);\n\t\t\tif (resolution === void 0 || resolution.kind === \"unresolved\") return notOk([]);\n\t\t\tconst reference = entityReference(resolution);\n\t\t\tif (reference === void 0 || !matchesSelector(reference, expected)) return notOk([leafDiagnostic(ctx, arg, `Expected ${label} \"${name}\", found ${describeResolution(resolution)}`)]);\n\t\t\treturn ok(reference);\n\t\t}\n\t};\n}\n//#endregion\n//#region src/attribute-spec/combinators/field-ref.ts\nfunction parseFieldName(arg, ctx) {\n\tconst identifier = IdentifierAst.cast(arg.syntax);\n\tif (identifier === void 0) return notOk([leafDiagnostic(ctx, arg, \"Expected a field name\")]);\n\tconst name = identifier.name();\n\tif (name === void 0) return notOk([leafDiagnostic(ctx, arg, \"Expected a field name\")]);\n\tconst resolution = ctx.binder.symbolForNode(arg.syntax);\n\tif (resolution === void 0) return notOk([]);\n\tif (resolution.kind === \"field\") return ok(resolution.symbol.name);\n\tif (resolution.kind === \"crossSpace\") return ok(name);\n\treturn notOk([]);\n}\nfunction fieldRef() {\n\treturn {\n\t\tkind: \"fieldRef\",\n\t\tlabel: \"field name\",\n\t\tparse: parseFieldName\n\t};\n}\nfunction referencedFieldRef() {\n\treturn {\n\t\tkind: \"referencedFieldRef\",\n\t\tlabel: \"field name\",\n\t\tparse: parseFieldName\n\t};\n}\n//#endregion\n//#region src/attribute-spec/interpret.ts\nfunction interpretArgs(args, spec, ctx, span, sourceNode) {\n\tlet outcome = okVoid();\n\tconst output = {};\n\tconst seen = /* @__PURE__ */ new Set();\n\tlet positionalSlot = 0;\n\tlet reportedExcess = false;\n\tfor (const arg of args) {\n\t\tconst name = arg.name()?.name();\n\t\tlet key;\n\t\tlet param;\n\t\tif (name === void 0) {\n\t\t\tconst posParam = spec.positional[positionalSlot];\n\t\t\tif (posParam === void 0) {\n\t\t\t\tif (!reportedExcess) {\n\t\t\t\t\toutcome = and(outcome, notOk([diagnostic(`Attribute \"${spec.name}\" received too many positional arguments`, ctx, span, sourceNode)]));\n\t\t\t\t\treportedExcess = true;\n\t\t\t\t}\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tpositionalSlot += 1;\n\t\t\tkey = posParam.key;\n\t\t\tparam = posParam.type;\n\t\t} else {\n\t\t\tconst namedParam = Object.hasOwn(spec.named, name) ? spec.named[name] : void 0;\n\t\t\tif (namedParam === void 0) {\n\t\t\t\toutcome = and(outcome, notOk([diagnostic(`Attribute \"${spec.name}\" received unknown argument \"${name}\"`, ctx, nodePslSpan(arg.syntax, ctx.sources), arg.syntax)]));\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tkey = name;\n\t\t\tparam = namedParam.type;\n\t\t}\n\t\tif (seen.has(key)) {\n\t\t\toutcome = and(outcome, notOk([diagnostic(`Attribute \"${spec.name}\" received duplicate argument \"${key}\"`, ctx, nodePslSpan(arg.syntax, ctx.sources), arg.syntax)]));\n\t\t\tcontinue;\n\t\t}\n\t\tseen.add(key);\n\t\tconst result = parseArgValue(arg, param, ctx);\n\t\tif (result.ok) output[key] = result.value;\n\t\toutcome = and(outcome, result);\n\t}\n\tconst finalized = /* @__PURE__ */ new Set();\n\tconst finalizeAbsentKey = (key, positionalParam, namedParam) => {\n\t\tif (finalized.has(key) || seen.has(key)) return;\n\t\tfinalized.add(key);\n\t\tconst effective = namedParam ?? positionalParam;\n\t\tif (effective === void 0) return;\n\t\tif (isOptionalArgType(effective)) {\n\t\t\tif (effective.hasDefault) output[key] = effective.defaultValue;\n\t\t\treturn;\n\t\t}\n\t\toutcome = and(outcome, notOk([diagnostic(`Attribute \"${spec.name}\" is missing required argument \"${key}\"`, ctx, span, sourceNode)]));\n\t};\n\tfor (const param of spec.positional) {\n\t\tconst namedParam = Object.hasOwn(spec.named, param.key) ? spec.named[param.key] : void 0;\n\t\tfinalizeAbsentKey(param.key, param.type, namedParam?.type);\n\t}\n\tfor (const key of Object.keys(spec.named)) finalizeAbsentKey(key, void 0, spec.named[key]?.type);\n\tif (!outcome.ok) return notOk(outcome.failure);\n\treturn ok(output);\n}\nfunction interpretAttribute(attrNode, spec, ctx) {\n\tconst attributeSpan = nodePslSpan(attrNode.syntax, ctx.sources);\n\tconst bound = interpretArgs(attrNode.argList()?.args() ?? [], spec, ctx, attributeSpan, attrNode.syntax);\n\tif (!bound.ok) return notOk(bound.failure);\n\tconst value = blindCast(bound.value);\n\tif (spec.refine !== void 0) {\n\t\tconst refineDiagnostics = spec.refine(value, ctx, attrNode);\n\t\tif (refineDiagnostics.length > 0) return notOk(refineDiagnostics);\n\t}\n\treturn ok(value);\n}\nfunction parseArgValue(arg, argType, ctx) {\n\tconst value = arg.value();\n\tif (value === void 0) return notOk([diagnostic(\"Attribute argument is missing a value\", ctx, nodePslSpan(arg.syntax, ctx.sources), arg.syntax)]);\n\treturn argType.parse(value, ctx);\n}\nfunction isOptionalArgType(param) {\n\treturn \"optional\" in param && param.optional === true;\n}\nfunction diagnostic(message, ctx, span, sourceNode) {\n\treturn {\n\t\tcode: ATTRIBUTE_DIAGNOSTIC_CODE,\n\t\tmessage,\n\t\t...diagnosticSource(ctx.sources, sourceNode).at(span)\n\t};\n}\n//#endregion\n//#region src/attribute-spec/combinators/func-call.ts\nfunction funcCall(name, sig) {\n\treturn {\n\t\tkind: \"funcCall\",\n\t\tlabel: `${name}()`,\n\t\tname,\n\t\tsignature: sig,\n\t\tparse: (arg, ctx) => {\n\t\t\tconst guard = matchCallee(arg, name, ctx);\n\t\t\tif (!guard.ok) return guard;\n\t\t\tconst span = nodePslSpan(guard.value.syntax, ctx.sources);\n\t\t\tconst bound = interpretArgs(guard.value.args(), {\n\t\t\t\tname,\n\t\t\t\tpositional: sig.positional ?? [],\n\t\t\t\tnamed: sig.named ?? {}\n\t\t\t}, ctx, span, guard.value.syntax);\n\t\t\tif (!bound.ok) return notOk(bound.failure);\n\t\t\treturn ok({\n\t\t\t\tfn: name,\n\t\t\t\tspan,\n\t\t\t\targs: bound.value\n\t\t\t});\n\t\t}\n\t};\n}\nfunction matchCallee(arg, name, ctx) {\n\tconst call = FunctionCallAst.cast(arg.syntax);\n\tif (call === void 0) return notOk([leafDiagnostic(ctx, arg, \"Expected a function call\")]);\n\tconst qname = call.name();\n\tif (qname === void 0 || qname.dot() !== void 0 || qname.colon() !== void 0) return notOk([leafDiagnostic(ctx, arg, \"Expected a function call\")]);\n\tconst calleeName = qname.identifier()?.token()?.text;\n\tif (calleeName === void 0) return notOk([leafDiagnostic(ctx, arg, \"Expected a function call\")]);\n\tif (calleeName !== name) return notOk([leafDiagnostic(ctx, arg, `Expected ${name}()`)]);\n\treturn ok(call);\n}\n//#endregion\n//#region src/attribute-spec/combinators/identifier.ts\nfunction identifier(name, options) {\n\tconst label = name ?? \"identifier\";\n\treturn {\n\t\tkind: \"identifier\",\n\t\tlabel,\n\t\tname,\n\t\tdocumentation: options?.documentation ?? \"\",\n\t\tparse: (arg, ctx) => {\n\t\t\tconst value = IdentifierAst.cast(arg.syntax)?.name();\n\t\t\tif (value !== void 0 && (name === void 0 || value === name)) return ok(value);\n\t\t\treturn notOk([leafDiagnostic(ctx, arg, `Expected ${label}`)]);\n\t\t}\n\t};\n}\n//#endregion\n//#region src/attribute-spec/combinators/int.ts\nfunction int(opts) {\n\tconst min = opts?.min;\n\tconst max = opts?.max;\n\treturn {\n\t\tkind: \"int\",\n\t\tlabel: \"integer\",\n\t\t...min === void 0 ? {} : { min },\n\t\t...max === void 0 ? {} : { max },\n\t\tparse: (arg, ctx) => {\n\t\t\tconst literal = NumberLiteralExprAst.cast(arg.syntax);\n\t\t\tif (literal !== void 0) {\n\t\t\t\tconst value = literal.value();\n\t\t\t\tif (value !== void 0 && Number.isInteger(value)) {\n\t\t\t\t\tif ((min === void 0 || value >= min) && (max === void 0 || value <= max)) return ok(value);\n\t\t\t\t\treturn notOk([leafDiagnostic(ctx, arg, rangeMessage(min, max))]);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn notOk([leafDiagnostic(ctx, arg, \"Expected an integer literal\")]);\n\t\t}\n\t};\n}\nfunction rangeMessage(min, max) {\n\tif (min !== void 0 && max !== void 0) return `Expected an integer between ${min} and ${max}`;\n\tif (min !== void 0) return `Expected an integer greater than or equal to ${min}`;\n\treturn `Expected an integer less than or equal to ${max}`;\n}\n//#endregion\n//#region src/attribute-spec/combinators/json.ts\n/**\n* Reads an opaque JSON object from a quoted JSON string — the ADR's one text-encoded surface\n* exception (e.g. an index `filter` / `weights` argument). The string is decoded by the parser,\n* then JSON-parsed; a non-object (array/scalar) or invalid JSON is a diagnostic.\n*/\nfunction json() {\n\treturn {\n\t\tkind: \"json\",\n\t\tlabel: \"JSON object\",\n\t\tparse: (arg, ctx) => {\n\t\t\tconst literal = StringLiteralExprAst.cast(arg.syntax);\n\t\t\tif (literal === void 0) return notOk([leafDiagnostic(ctx, arg, \"Expected a JSON object string\")]);\n\t\t\tconst raw = literal.value();\n\t\t\tif (raw !== void 0) try {\n\t\t\t\tconst parsed = JSON.parse(raw);\n\t\t\t\tif (typeof parsed === \"object\" && parsed !== null && !Array.isArray(parsed)) return ok(blindCast(parsed));\n\t\t\t} catch {}\n\t\t\treturn notOk([leafDiagnostic(ctx, arg, \"Expected a valid JSON object\")]);\n\t\t}\n\t};\n}\n//#endregion\n//#region src/attribute-spec/combinators/list.ts\nfunction list(of, opts) {\n\tconst allowEmpty = opts?.allowEmpty ?? true;\n\tconst unique = opts?.unique ?? false;\n\treturn {\n\t\tkind: \"list\",\n\t\tlabel: opts?.label ?? (of.label.includes(\" | \") ? `(${of.label})[]` : `${of.label}[]`),\n\t\tof,\n\t\tallowEmpty,\n\t\tunique,\n\t\tparse: (arg, ctx) => {\n\t\t\tconst literal = ArrayLiteralAst.cast(arg.syntax);\n\t\t\tif (literal === void 0) return notOk([leafDiagnostic(ctx, arg, `Expected a list of ${of.label}`)]);\n\t\t\tconst parsed = [];\n\t\t\tlet outcome = okVoid();\n\t\t\tlet count = 0;\n\t\t\tfor (const element of literal.elements()) {\n\t\t\t\tcount += 1;\n\t\t\t\tconst result = of.parse(element, ctx);\n\t\t\t\tif (result.ok) parsed.push({\n\t\t\t\t\tnode: element,\n\t\t\t\t\tvalue: result.value\n\t\t\t\t});\n\t\t\t\toutcome = and(outcome, result);\n\t\t\t}\n\t\t\tif (!allowEmpty && count === 0) outcome = and(outcome, notOk([leafDiagnostic(ctx, arg, \"Expected a non-empty list\")]));\n\t\t\tif (unique) {\n\t\t\t\tconst seen = /* @__PURE__ */ new Set();\n\t\t\t\tfor (const { node, value } of parsed) if (seen.has(value)) outcome = and(outcome, notOk([leafDiagnostic(ctx, node, \"Duplicate list entry\")]));\n\t\t\t\telse seen.add(value);\n\t\t\t}\n\t\t\tif (!outcome.ok) return notOk(outcome.failure);\n\t\t\treturn ok(parsed.map((entry) => entry.value));\n\t\t}\n\t};\n}\n//#endregion\n//#region src/attribute-spec/combinators/one-of.ts\nfunction oneOf(...alts) {\n\tconst label = alts.map((alt) => alt.label).join(\" | \");\n\treturn {\n\t\tkind: \"oneOf\",\n\t\tlabel,\n\t\talternatives: alts,\n\t\tparse: (arg, ctx) => {\n\t\t\tconst [head, ...tail] = blindCast(alts);\n\t\t\tlet rejection = head.parse(arg, ctx);\n\t\t\tif (rejection.ok) return rejection;\n\t\t\tfor (const alt of tail) {\n\t\t\t\tconst result = alt.parse(arg, ctx);\n\t\t\t\tif (result.ok) return result;\n\t\t\t\trejection = or(rejection, result);\n\t\t\t}\n\t\t\tif (!rejection.ok && rejection.failure.length === 0) return notOk([]);\n\t\t\treturn notOk([leafDiagnostic(ctx, arg, `Expected one of: ${label}`)]);\n\t\t}\n\t};\n}\n//#endregion\n//#region src/attribute-spec/combinators/record.ts\nfunction record(of) {\n\treturn {\n\t\tkind: \"record\",\n\t\tlabel: `{ [key]: ${of.label} }`,\n\t\tof,\n\t\tparse: (arg, ctx) => {\n\t\t\tconst literal = ObjectLiteralExprAst.cast(arg.syntax);\n\t\t\tif (literal === void 0) return notOk([leafDiagnostic(ctx, arg, \"Expected an object literal\")]);\n\t\t\tconst entries = [];\n\t\t\tconst keys = /* @__PURE__ */ new Set();\n\t\t\tlet outcome = okVoid();\n\t\t\tfor (const field of Array.from(literal.fields())) {\n\t\t\t\tconst key = field.keyName();\n\t\t\t\tif (key === void 0) {\n\t\t\t\t\toutcome = and(outcome, notOk([leafDiagnostic(ctx, field, \"Expected a key\")]));\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tconst value = field.value();\n\t\t\t\tif (value === void 0) {\n\t\t\t\t\toutcome = and(outcome, notOk([leafDiagnostic(ctx, field, `Expected a value for key \"${key}\"`)]));\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tconst parsed = of.parse(value, ctx);\n\t\t\t\tif (!parsed.ok) {\n\t\t\t\t\toutcome = and(outcome, parsed);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (keys.has(key)) {\n\t\t\t\t\toutcome = and(outcome, notOk([leafDiagnostic(ctx, field, `Duplicate key \"${key}\"`)]));\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tkeys.add(key);\n\t\t\t\tentries.push([key, parsed.value]);\n\t\t\t}\n\t\t\tif (!outcome.ok) return notOk(outcome.failure);\n\t\t\treturn ok(Object.fromEntries(entries));\n\t\t}\n\t};\n}\n//#endregion\n//#region src/attribute-spec/combinators/str.ts\nfunction str(value) {\n\tif (value === void 0) return {\n\t\tkind: \"str\",\n\t\tlabel: \"string\",\n\t\tvalue: void 0,\n\t\tparse: (arg, ctx) => {\n\t\t\tconst literal = StringLiteralExprAst.cast(arg.syntax);\n\t\t\tif (literal !== void 0) {\n\t\t\t\tconst parsed = literal.value();\n\t\t\t\tif (parsed !== void 0) return ok(parsed);\n\t\t\t}\n\t\t\treturn notOk([leafDiagnostic(ctx, arg, \"Expected a string literal\")]);\n\t\t}\n\t};\n\treturn {\n\t\tkind: \"str\",\n\t\tlabel: JSON.stringify(value),\n\t\tvalue,\n\t\tparse: (arg, ctx) => {\n\t\t\tconst literal = StringLiteralExprAst.cast(arg.syntax);\n\t\t\tif (literal !== void 0) {\n\t\t\t\tif (literal.value() === value) return ok(value);\n\t\t\t}\n\t\t\treturn notOk([leafDiagnostic(ctx, arg, `Expected ${JSON.stringify(value)}`)]);\n\t\t}\n\t};\n}\n//#endregion\n//#region src/attribute-spec/combinators/json-value.ts\nfunction jsonValue() {\n\tconst self = {\n\t\tkind: \"oneOf\",\n\t\tlabel: \"JSON value\",\n\t\tget alternatives() {\n\t\t\treturn composed.alternatives;\n\t\t},\n\t\tparse: (arg, ctx) => composed.parse(arg, ctx)\n\t};\n\tconst composed = oneOf(str(), finiteNumber(), bool(), jsonNull(), list(self), record(self));\n\treturn self;\n}\nfunction finiteNumber() {\n\treturn {\n\t\tkind: \"num\",\n\t\tvalue: void 0,\n\t\tlabel: \"number\",\n\t\tparse: (arg, ctx) => {\n\t\t\tconst value = NumberLiteralExprAst.cast(arg.syntax)?.value();\n\t\t\tif (value === void 0 || Number.isNaN(value) || !Number.isFinite(value)) return notOk([leafDiagnostic(ctx, arg, \"Expected a finite number literal\")]);\n\t\t\treturn ok(value);\n\t\t}\n\t};\n}\nfunction jsonNull() {\n\treturn {\n\t\tkind: \"null\",\n\t\tlabel: \"null\",\n\t\tparse: (arg, ctx) => {\n\t\t\tif (IdentifierAst.cast(arg.syntax)?.name() === \"null\") return ok(null);\n\t\t\treturn notOk([leafDiagnostic(ctx, arg, \"Expected null\")]);\n\t\t}\n\t};\n}\n//#endregion\n//#region src/attribute-spec/combinators/num.ts\nfunction num(value) {\n\tif (value === void 0) return {\n\t\tkind: \"num\",\n\t\tlabel: \"number\",\n\t\tvalue: void 0,\n\t\tparse: (arg, ctx) => {\n\t\t\tconst literal = NumberLiteralExprAst.cast(arg.syntax);\n\t\t\tif (literal !== void 0) {\n\t\t\t\tconst parsed = literal.value();\n\t\t\t\tif (parsed !== void 0) return ok(parsed);\n\t\t\t}\n\t\t\treturn notOk([leafDiagnostic(ctx, arg, \"Expected a number literal\")]);\n\t\t}\n\t};\n\treturn {\n\t\tkind: \"num\",\n\t\tlabel: String(value),\n\t\tvalue,\n\t\tparse: (arg, ctx) => {\n\t\t\tconst literal = NumberLiteralExprAst.cast(arg.syntax);\n\t\t\tif (literal !== void 0) {\n\t\t\t\tif (literal.value() === value) return ok(value);\n\t\t\t}\n\t\t\treturn notOk([leafDiagnostic(ctx, arg, `Expected ${value}`)]);\n\t\t}\n\t};\n}\n//#endregion\n//#region src/attribute-spec/combinators/num-literal.ts\n/** A number literal kept as its source text, for consumers that must not round it through a JS number. */\nfunction numLiteral() {\n\treturn {\n\t\tkind: \"num\",\n\t\tlabel: \"number\",\n\t\tvalue: void 0,\n\t\tparse: (arg, ctx) => {\n\t\t\tconst text = NumberLiteralExprAst.cast(arg.syntax)?.token()?.text;\n\t\t\tif (text !== void 0) return ok({ text });\n\t\t\treturn notOk([leafDiagnostic(ctx, arg, \"Expected a number literal\")]);\n\t\t}\n\t};\n}\n//#endregion\n//#region src/attribute-spec/combinators/tagged-literal.ts\n/**\n* A `` tag`...` ``, `tag\"...\"`, or `tag'...'` argument. `tags` and `documentation` describe the\n* registered tags for tooling; parsing accepts any tag.\n*/\nfunction taggedLiteral(tags, options) {\n\treturn {\n\t\tkind: \"taggedLiteral\",\n\t\tlabel: `${tags[0] ?? \"tag\"}\\`...\\``,\n\t\ttags,\n\t\tdocumentation: options.documentation,\n\t\tparse: (arg, ctx) => {\n\t\t\tconst literal = TaggedLiteralExprAst.cast(arg.syntax);\n\t\t\tif (literal === void 0) return notOk([leafDiagnostic(ctx, arg, \"Expected a tagged literal\")]);\n\t\t\treturn ok({\n\t\t\t\ttag: literal.tagName(),\n\t\t\t\tcanonicalization: literal.canonicalization(),\n\t\t\t\tspan: nodePslSpan(literal.syntax, ctx.sources)\n\t\t\t});\n\t\t}\n\t};\n}\n//#endregion\n//#region src/attribute-spec/field-attribute.ts\nfunction fieldAttribute(name, config) {\n\treturn {\n\t\tlevel: \"field\",\n\t\tname,\n\t\tdocumentation: config.documentation,\n\t\tpositional: config.positional ?? [],\n\t\tnamed: Object.assign(Object.create(null), config.named),\n\t\t...config.refine !== void 0 ? { refine: config.refine } : {}\n\t};\n}\n//#endregion\n//#region src/attribute-spec/model-attribute.ts\nfunction modelAttribute(name, config) {\n\treturn {\n\t\tlevel: \"model\",\n\t\tname,\n\t\tdocumentation: config.documentation,\n\t\tpositional: config.positional ?? [],\n\t\tnamed: Object.assign(Object.create(null), config.named),\n\t\t...config.refine !== void 0 ? { refine: config.refine } : {}\n\t};\n}\n//#endregion\n//#region src/attribute-spec/optional.ts\nfunction optional(type, ...rest) {\n\tif (rest.length === 0) return {\n\t\t...type,\n\t\toptional: true,\n\t\thasDefault: false\n\t};\n\treturn {\n\t\t...type,\n\t\toptional: true,\n\t\thasDefault: true,\n\t\tdefaultValue: rest[0]\n\t};\n}\n//#endregion\n//#region src/block-spec/descriptor.ts\nfunction blockSpecFactoryOf(descriptor) {\n\treturn blindCast(descriptor.spec);\n}\n//#endregion\n//#region src/contributed-type-scope.ts\nconst scopes = /* @__PURE__ */ new WeakMap();\nfunction contributedTypeScope(typeConstructors) {\n\tconst existing = scopes.get(typeConstructors);\n\tif (existing !== void 0) return existing;\n\tconst members = collect(typeConstructors, []);\n\tconst created = {\n\t\tlookup(name) {\n\t\t\treturn members.get(name);\n\t\t},\n\t\tentries() {\n\t\t\treturn members.entries();\n\t\t}\n\t};\n\tscopes.set(typeConstructors, created);\n\treturn created;\n}\nfunction collect(namespace, prefix) {\n\tconst members = /* @__PURE__ */ new Map();\n\tfor (const [name, value] of Object.entries(namespace)) {\n\t\tconst path = [...prefix, name];\n\t\tmembers.set(name, isAuthoringTypeConstructorDescriptor(value) ? {\n\t\t\tkind: \"contributedType\",\n\t\t\tname,\n\t\t\tpath,\n\t\t\tdescriptor: value\n\t\t} : {\n\t\t\tkind: \"contributedNamespace\",\n\t\t\tname,\n\t\t\tpath,\n\t\t\tmembers: collect(value, path)\n\t\t});\n\t}\n\treturn members;\n}\n//#endregion\n//#region src/extension-block.ts\nfunction findBlockDescriptor(descriptors, keyword) {\n\tif (descriptors === void 0) return void 0;\n\tfor (const value of Object.values(descriptors)) {\n\t\tif (value === void 0) continue;\n\t\tif (isAuthoringPslBlockDescriptor(value)) {\n\t\t\tif (value.keyword === keyword) return value;\n\t\t\tcontinue;\n\t\t}\n\t\tconst nested = findBlockDescriptor(value, keyword);\n\t\tif (nested !== void 0) return nested;\n\t}\n}\n//#endregion\n//#region src/scope.ts\nfunction* recordNames(...records) {\n\tfor (const record of records) yield* Object.keys(record);\n}\nvar Scope = class {\n\tparent;\n\tconstructor(parent) {\n\t\tthis.parent = parent;\n\t}\n\t*entries() {\n\t\tconst seen = /* @__PURE__ */ new Set();\n\t\tfor (const name of this.ownNames()) {\n\t\t\tif (seen.has(name)) continue;\n\t\t\tseen.add(name);\n\t\t\tconst resolution = this.lookup(name);\n\t\t\tif (resolution !== void 0) yield [name, resolution];\n\t\t}\n\t\tfor (const entry of this.parent?.entries() ?? []) if (!seen.has(entry[0])) yield entry;\n\t}\n};\nfunction contributedResolution(member) {\n\treturn member.kind === \"contributedType\" ? {\n\t\tkind: \"contributedType\",\n\t\tsymbol: member\n\t} : {\n\t\tkind: \"contributedNamespace\",\n\t\tsymbol: member\n\t};\n}\nfunction namespaceMember(namespace, name) {\n\tconst model = namespace.models[name];\n\tif (model !== void 0) return {\n\t\tkind: \"model\",\n\t\tsymbol: model,\n\t\tnamespace\n\t};\n\tconst compositeType = namespace.compositeTypes[name];\n\tif (compositeType !== void 0) return {\n\t\tkind: \"compositeType\",\n\t\tsymbol: compositeType,\n\t\tnamespace\n\t};\n\tconst block = namespace.blocks[name];\n\tif (block !== void 0) return {\n\t\tkind: \"block\",\n\t\tsymbol: block,\n\t\tnamespace\n\t};\n}\nvar ContributedScope = class extends Scope {\n\t#registry;\n\tconstructor(registry) {\n\t\tsuper(void 0);\n\t\tthis.#registry = registry;\n\t}\n\tlookup(name) {\n\t\tconst member = this.#registry.lookup(name);\n\t\treturn member === void 0 ? void 0 : contributedResolution(member);\n\t}\n\t*ownNames() {\n\t\tfor (const [name] of this.#registry.entries()) yield name;\n\t}\n};\nvar DocumentScope = class extends Scope {\n\t#records;\n\tconstructor(records, parent) {\n\t\tsuper(parent);\n\t\tthis.#records = records;\n\t}\n\tlookup(name) {\n\t\tconst records = this.#records;\n\t\tconst model = records.models[name];\n\t\tif (model !== void 0) return {\n\t\t\tkind: \"model\",\n\t\t\tsymbol: model\n\t\t};\n\t\tconst compositeType = records.compositeTypes[name];\n\t\tif (compositeType !== void 0) return {\n\t\t\tkind: \"compositeType\",\n\t\t\tsymbol: compositeType\n\t\t};\n\t\tconst namedType = records.namedTypes[name];\n\t\tif (namedType !== void 0) return {\n\t\t\tkind: \"namedType\",\n\t\t\tsymbol: namedType\n\t\t};\n\t\tconst block = records.blocks[name];\n\t\tif (block !== void 0) return {\n\t\t\tkind: \"block\",\n\t\t\tsymbol: block\n\t\t};\n\t\tconst namespace = records.namespaces[name];\n\t\tif (namespace !== void 0) return {\n\t\t\tkind: \"namespace\",\n\t\t\tsymbol: namespace\n\t\t};\n\t\treturn this.parent?.lookup(name);\n\t}\n\townNames() {\n\t\tconst records = this.#records;\n\t\treturn recordNames(records.models, records.compositeTypes, records.namedTypes, records.blocks, records.namespaces);\n\t}\n};\nvar NamespaceScope = class extends Scope {\n\t#namespace;\n\tconstructor(namespace, parent) {\n\t\tsuper(parent);\n\t\tthis.#namespace = namespace;\n\t}\n\tlookup(name) {\n\t\treturn namespaceMember(this.#namespace, name) ?? this.parent?.lookup(name);\n\t}\n\townNames() {\n\t\tconst namespace = this.#namespace;\n\t\treturn recordNames(namespace.models, namespace.compositeTypes, namespace.blocks);\n\t}\n};\nfunction contributedScope(registry) {\n\treturn new ContributedScope(registry);\n}\nfunction documentScope(records, parent) {\n\treturn new DocumentScope(records, parent);\n}\nfunction namespaceScope(namespace, parent) {\n\treturn new NamespaceScope(namespace, parent);\n}\nfunction isNamespaceLike(resolution) {\n\treturn resolution.kind === \"namespace\" || resolution.kind === \"contributedNamespace\";\n}\nfunction* memberEntries(qualifier) {\n\tif (qualifier.kind === \"contributedNamespace\") {\n\t\tfor (const [name, member] of qualifier.symbol.members) yield [name, contributedResolution(member)];\n\t\treturn;\n\t}\n\tyield* new NamespaceScope(qualifier.symbol, void 0).entries();\n}\nfunction lookupMember(qualifier, name) {\n\tif (qualifier.kind === \"contributedNamespace\") {\n\t\tconst member = qualifier.symbol.members.get(name);\n\t\treturn member === void 0 ? void 0 : contributedResolution(member);\n\t}\n\treturn namespaceMember(qualifier.symbol, name);\n}\n//#endregion\n//#region src/binder.ts\nconst PSL_UNRESOLVED_REFERENCE = \"PSL_UNRESOLVED_REFERENCE\";\nfunction typeReferenceNode(symbol) {\n\treturn symbol.node.typeAnnotation()?.name()?.syntax;\n}\nvar PslBinder = class {\n\t#declarations;\n\t#references;\n\t#documentScope;\n\t#scopes;\n\tconstructor(declarations, references, documentScope, scopes) {\n\t\tthis.#declarations = declarations;\n\t\tthis.#references = references;\n\t\tthis.#documentScope = documentScope;\n\t\tthis.#scopes = scopes;\n\t}\n\tdeclaredSymbol(node) {\n\t\treturn this.#declarations.get(node);\n\t}\n\tsymbolForNode(node) {\n\t\treturn this.#references.get(node);\n\t}\n\tscopeAt(node) {\n\t\treturn node.findAncestor((ancestor) => this.#scopes.get(ancestor)) ?? this.#documentScope;\n\t}\n};\nvar ScopeStack = class {\n\t#base;\n\t#scopes;\n\tconstructor(base) {\n\t\tthis.#base = base;\n\t\tthis.#scopes = [base];\n\t}\n\tcurrent() {\n\t\treturn this.#scopes[this.#scopes.length - 1] ?? this.#base;\n\t}\n\tpush(scope) {\n\t\tthis.#scopes.push(scope);\n\t}\n\tpop() {\n\t\tthis.#scopes.pop();\n\t}\n};\nfunction walkEntities(symbolTable, stack, binder, visit) {\n\tconst { topLevel } = symbolTable;\n\tfor (const entity of Object.values(topLevel.models)) visit(entity);\n\tfor (const entity of Object.values(topLevel.compositeTypes)) visit(entity);\n\tfor (const namespace of Object.values(topLevel.namespaces)) {\n\t\tstack.push(binder.scopeAt(namespace.declarations[0].node.syntax));\n\t\tfor (const entity of Object.values(namespace.models)) visit(entity);\n\t\tfor (const entity of Object.values(namespace.compositeTypes)) visit(entity);\n\t\tstack.pop();\n\t}\n}\nfunction createBinder(options) {\n\tconst { sources, symbolTable, typeConstructors, attributeSpecs, controlMutationDefaults, describeUnsupportedAttribute } = options;\n\tconst pslBlockDescriptors = options.pslBlockDescriptors ?? {};\n\tconst document = documentScope(symbolTable.topLevel, contributedScope(contributedTypeScope(typeConstructors)));\n\tconst stack = new ScopeStack(document);\n\tconst scopes = /* @__PURE__ */ new WeakMap();\n\tconst declarations = /* @__PURE__ */ new WeakMap();\n\tconst references = /* @__PURE__ */ new WeakMap();\n\tconst diagnostics = [];\n\tconst binder = new PslBinder(declarations, references, document, scopes);\n\tfor (const symbol of Object.values(symbolTable.topLevel.namedTypes)) {\n\t\tdeclarations.set(symbol.node.syntax, symbol);\n\t\tconst name = symbol.node.typeAnnotation()?.name();\n\t\tconst outcome = resolveTypeReference(name, document);\n\t\tif (name !== void 0 && outcome !== void 0) references.set(name.syntax, outcome.resolution);\n\t}\n\tfor (const symbol of Object.values(symbolTable.topLevel.blocks)) declarations.set(symbol.node.syntax, symbol);\n\tfor (const namespace of Object.values(symbolTable.topLevel.namespaces)) {\n\t\tconst scope = namespaceScope(namespace, document);\n\t\tfor (const declaration of namespace.declarations) {\n\t\t\tdeclarations.set(declaration.node.syntax, namespace);\n\t\t\tscopes.set(declaration.node.syntax, scope);\n\t\t}\n\t\tfor (const symbol of Object.values(namespace.blocks)) declarations.set(symbol.node.syntax, symbol);\n\t}\n\twalkEntities(symbolTable, stack, binder, (entity) => {\n\t\tdeclarations.set(entity.node.syntax, entity);\n\t\tfor (const field of Object.values(entity.fields)) {\n\t\t\tdeclarations.set(field.node.syntax, field);\n\t\t\tconst node = typeReferenceNode(field);\n\t\t\tif (node === void 0) continue;\n\t\t\tconst outcome = resolveTypeReference(field.node.typeAnnotation()?.name(), stack.current());\n\t\t\tif (outcome === void 0) continue;\n\t\t\treferences.set(node, outcome.resolution);\n\t\t\tif (outcome.message !== void 0) diagnostics.push({\n\t\t\t\tcode: PSL_UNRESOLVED_REFERENCE,\n\t\t\t\tmessage: outcome.message,\n\t\t\t\tdata: {\n\t\t\t\t\treference: \"type\",\n\t\t\t\t\tname: outcome.name,\n\t\t\t\t\tconstructorCall: field.typeConstructor !== void 0\n\t\t\t\t},\n\t\t\t\t...diagnosticSource(sources, node).at()\n\t\t\t});\n\t\t}\n\t});\n\twalkEntities(symbolTable, stack, binder, (entity) => {\n\t\tconst context = {\n\t\t\towner: entity,\n\t\t\tscope: stack.current(),\n\t\t\treferences,\n\t\t\tdiagnostics,\n\t\t\tsymbolTable,\n\t\t\tsources,\n\t\t\tdescribeUnsupportedAttribute\n\t\t};\n\t\tconst specContext = entity.kind === \"model\" ? {\n\t\t\tsymbols: symbolTable,\n\t\t\tmodel: entity,\n\t\t\tcontrolMutationDefaults\n\t\t} : void 0;\n\t\tbindAttributes(entity, entity.attributes, attributeSpecs.model, (factory) => specContext === void 0 ? void 0 : factory(specContext), {\n\t\t\t...context,\n\t\t\tfield: void 0\n\t\t});\n\t\tfor (const field of Object.values(entity.fields)) bindAttributes(field, field.attributes, attributeSpecs.field, (factory) => specContext === void 0 ? void 0 : factory({\n\t\t\t...specContext,\n\t\t\tfield\n\t\t}), {\n\t\t\t...context,\n\t\t\tfield\n\t\t});\n\t});\n\tconst blockContext = {\n\t\tpslBlockDescriptors,\n\t\tsymbolTable,\n\t\tsources,\n\t\treferences,\n\t\tdiagnostics\n\t};\n\tconst bindBlocks = (blocks) => {\n\t\tconst context = {\n\t\t\t...blockContext,\n\t\t\tscope: stack.current()\n\t\t};\n\t\tfor (const block of Object.values(blocks)) bindBlock(block, context);\n\t};\n\tbindBlocks(symbolTable.topLevel.blocks);\n\tfor (const namespace of Object.values(symbolTable.topLevel.namespaces)) {\n\t\tstack.push(binder.scopeAt(namespace.declarations[0].node.syntax));\n\t\tbindBlocks(namespace.blocks);\n\t\tstack.pop();\n\t}\n\treturn {\n\t\tbinder,\n\t\tdiagnostics\n\t};\n}\nfunction bindBlock(block, ctx) {\n\tconst descriptor = findBlockDescriptor(ctx.pslBlockDescriptors, block.keyword);\n\tif (descriptor === void 0) return;\n\tconst spec = blockSpecFactoryOf(descriptor)({\n\t\tsymbols: ctx.symbolTable,\n\t\tblock\n\t});\n\tfor (const entry of block.node.entries()) {\n\t\tconst key = entry.key()?.name();\n\t\tif (key === void 0) continue;\n\t\tconst rule = spec.mode === \"struct\" ? Object.hasOwn(spec.parameters, key) ? spec.parameters[key]?.type : void 0 : spec.value.type;\n\t\tconst value = entry.value();\n\t\tif (rule === void 0 || value === void 0) continue;\n\t\tbindExpression(rule, value, ctx);\n\t}\n\tconst attributeSpecs = descriptor.attributes ?? {};\n\tif (Object.keys(attributeSpecs).length === 0) return;\n\tfor (const attribute of readResolvedAttributes(block.node.attributes(), ctx.sources)) {\n\t\tconst factory = attributeSpecs[attribute.name];\n\t\tif (factory === void 0) continue;\n\t\tbindArguments(attribute, blindCast(factory)({\n\t\t\tsymbols: ctx.symbolTable,\n\t\t\tblock\n\t\t}), ctx);\n\t}\n}\nfunction bindExpression(rule, expression, ctx, modelContext) {\n\tconst trial = tryBindExpression(rule, expression, ctx, modelContext);\n\tfor (const [node, resolution] of trial.references) ctx.references.set(node, resolution);\n\tctx.diagnostics.push(...trial.diagnostics.values());\n}\nfunction tryBindExpression(rule, expression, ctx, modelContext) {\n\tconst references = /* @__PURE__ */ new Map();\n\tconst diagnostics = /* @__PURE__ */ new Map();\n\tswitch (rule.kind) {\n\t\tcase \"oneOf\":\n\t\t\tfor (const alternative of rule.alternatives) {\n\t\t\t\tconst trial = tryBindExpression(alternative, expression, ctx, modelContext);\n\t\t\t\tif (trial.matched) return trial;\n\t\t\t\tfor (const [node, diagnostic] of trial.diagnostics) diagnostics.set(node, diagnostic);\n\t\t\t\tfor (const [node, resolution] of trial.references) if (resolution.kind === \"unresolved\") references.set(node, resolution);\n\t\t\t}\n\t\t\treturn {\n\t\t\t\tmatched: false,\n\t\t\t\treferences,\n\t\t\t\tdiagnostics\n\t\t\t};\n\t\tcase \"list\":\n\t\tcase \"record\": {\n\t\t\tconst children = rule.kind === \"list\" ? ArrayLiteralAst.cast(expression.syntax)?.elements() : recordValues(expression);\n\t\t\tif (children === void 0) return {\n\t\t\t\tmatched: false,\n\t\t\t\treferences,\n\t\t\t\tdiagnostics\n\t\t\t};\n\t\t\tlet matched = true;\n\t\t\tfor (const child of children) {\n\t\t\t\tconst trial = tryBindExpression(rule.of, child, ctx, modelContext);\n\t\t\t\tmatched = trial.matched && matched;\n\t\t\t\tfor (const [node, resolution] of trial.references) references.set(node, resolution);\n\t\t\t\tfor (const [node, diagnostic] of trial.diagnostics) diagnostics.set(node, diagnostic);\n\t\t\t}\n\t\t\treturn {\n\t\t\t\tmatched,\n\t\t\t\treferences,\n\t\t\t\tdiagnostics\n\t\t\t};\n\t\t}\n\t\tcase \"funcCall\": {\n\t\t\tconst call = FunctionCallAst.cast(expression.syntax);\n\t\t\tconst name = call?.name();\n\t\t\tif (call === void 0 || name === void 0 || name.dot() !== void 0 || name.colon() !== void 0 || name.identifier()?.name() !== rule.name) return {\n\t\t\t\tmatched: false,\n\t\t\t\treferences,\n\t\t\t\tdiagnostics\n\t\t\t};\n\t\t\tlet matched = true;\n\t\t\tlet positional = 0;\n\t\t\tfor (const arg of call.args()) {\n\t\t\t\tconst key = arg.name()?.name();\n\t\t\t\tconst parameter = argumentParameter(rule.signature, key, key === void 0 ? positional++ : positional);\n\t\t\t\tconst value = arg.value();\n\t\t\t\tif (parameter === void 0 || value === void 0) {\n\t\t\t\t\tmatched = false;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tconst trial = tryBindExpression(parameter.type, value, ctx, modelContext);\n\t\t\t\tmatched = trial.matched && matched;\n\t\t\t\tfor (const [node, resolution] of trial.references) references.set(node, resolution);\n\t\t\t\tfor (const [node, diagnostic] of trial.diagnostics) diagnostics.set(node, diagnostic);\n\t\t\t}\n\t\t\treturn {\n\t\t\t\tmatched,\n\t\t\t\treferences,\n\t\t\t\tdiagnostics\n\t\t\t};\n\t\t}\n\t\tcase \"entityRef\": {\n\t\t\tconst node = expression.syntax;\n\t\t\tconst name = IdentifierAst.cast(node)?.name();\n\t\t\tif (name === void 0) return {\n\t\t\t\tmatched: false,\n\t\t\t\treferences,\n\t\t\t\tdiagnostics\n\t\t\t};\n\t\t\tconst failures = [];\n\t\t\tconst resolution = resolveEntity(name, node, {\n\t\t\t\t...ctx,\n\t\t\t\tdiagnostics: failures\n\t\t\t});\n\t\t\treferences.set(node, resolution);\n\t\t\tfor (const diagnostic of failures) diagnostics.set(node, diagnostic);\n\t\t\treturn {\n\t\t\t\tmatched: resolution.kind !== \"unresolved\",\n\t\t\t\treferences,\n\t\t\t\tdiagnostics\n\t\t\t};\n\t\t}\n\t\tcase \"fieldRef\": {\n\t\t\tconst node = expression.syntax;\n\t\t\tconst name = IdentifierAst.cast(node)?.name();\n\t\t\tif (name === void 0 || modelContext === void 0) return {\n\t\t\t\tmatched: false,\n\t\t\t\treferences,\n\t\t\t\tdiagnostics\n\t\t\t};\n\t\t\tconst failures = [];\n\t\t\tconst resolution = resolveOwnerField(name, node, {\n\t\t\t\t...modelContext,\n\t\t\t\tdiagnostics: failures\n\t\t\t});\n\t\t\treferences.set(node, resolution);\n\t\t\tfor (const diagnostic of failures) diagnostics.set(node, diagnostic);\n\t\t\treturn {\n\t\t\t\tmatched: resolution.kind !== \"unresolved\",\n\t\t\t\treferences,\n\t\t\t\tdiagnostics\n\t\t\t};\n\t\t}\n\t\tcase \"referencedFieldRef\": {\n\t\t\tconst node = expression.syntax;\n\t\t\tconst name = IdentifierAst.cast(node)?.name();\n\t\t\tif (name === void 0 || modelContext === void 0) return {\n\t\t\t\tmatched: false,\n\t\t\t\treferences,\n\t\t\t\tdiagnostics\n\t\t\t};\n\t\t\tconst failures = [];\n\t\t\tconst resolution = resolveReferencedField(name, node, {\n\t\t\t\t...modelContext,\n\t\t\t\tdiagnostics: failures\n\t\t\t});\n\t\t\treferences.set(node, resolution);\n\t\t\tfor (const diagnostic of failures) diagnostics.set(node, diagnostic);\n\t\t\treturn {\n\t\t\t\tmatched: resolution.kind !== \"unresolved\",\n\t\t\t\treferences,\n\t\t\t\tdiagnostics\n\t\t\t};\n\t\t}\n\t\tdefault: return {\n\t\t\tmatched: true,\n\t\t\treferences,\n\t\t\tdiagnostics\n\t\t};\n\t}\n}\nfunction recordValues(expression) {\n\tconst record = ObjectLiteralExprAst.cast(expression.syntax);\n\tif (record === void 0) return void 0;\n\treturn (function* () {\n\t\tfor (const field of record.fields()) {\n\t\t\tconst value = field.value();\n\t\t\tif (value !== void 0) yield value;\n\t\t}\n\t})();\n}\nfunction bindAttributes(holder, attributes, specs, instantiate, ctx) {\n\tconst declared = holder.node.attributes();\n\tconst nodes = Array.from(declared);\n\tconst level = holder.kind === \"field\" ? \"field\" : \"model\";\n\tattributes.forEach((attribute, index) => {\n\t\tconst factory = own(specs, attribute.name);\n\t\tif (factory === void 0) {\n\t\t\tconst diagnostic = ctx.describeUnsupportedAttribute?.({\n\t\t\t\tattribute,\n\t\t\t\tlevel,\n\t\t\t\towner: ctx.owner,\n\t\t\t\tfield: level === \"field\" ? ctx.field : void 0\n\t\t\t});\n\t\t\tif (diagnostic !== void 0) ctx.diagnostics.push(diagnostic);\n\t\t\treturn;\n\t\t}\n\t\tconst spec = instantiate(factory);\n\t\tif (spec === void 0) return;\n\t\tconst nameNode = nodes[index]?.name()?.syntax;\n\t\tif (nameNode !== void 0) ctx.references.set(nameNode, {\n\t\t\tkind: \"attribute\",\n\t\t\tsymbol: {\n\t\t\t\tkind: \"attribute\",\n\t\t\t\tname: attribute.name,\n\t\t\t\tlevel,\n\t\t\t\tspec\n\t\t\t}\n\t\t});\n\t\tbindArguments(attribute, spec, ctx, ctx);\n\t});\n}\nfunction bindArguments(attribute, spec, ctx, modelContext) {\n\tlet positional = 0;\n\tfor (const arg of attribute.args) {\n\t\tconst parameter = argumentParameter(spec, arg.name, arg.name === void 0 ? positional++ : positional);\n\t\tif (parameter === void 0 || arg.expression === void 0) continue;\n\t\tbindExpression(parameter.type, arg.expression, ctx, modelContext);\n\t}\n}\nfunction argumentParameter(spec, name, position) {\n\tif (name === void 0) return spec.positional?.[position];\n\treturn spec.named === void 0 ? void 0 : own(spec.named, name);\n}\nfunction resolveOwnerField(name, node, ctx) {\n\tconst field = ctx.owner.fields[name];\n\tif (field !== void 0) return {\n\t\tkind: \"field\",\n\t\tsymbol: field\n\t};\n\treport(`Cannot find field \"${name}\" on \"${ctx.owner.name}\"`, node, ctx, \"field\");\n\treturn {\n\t\tkind: \"unresolved\",\n\t\tname\n\t};\n}\nfunction resolveReferencedField(name, node, ctx) {\n\tconst declaring = ctx.field;\n\tif (declaring === void 0) return {\n\t\tkind: \"unresolved\",\n\t\tname\n\t};\n\tif (declaring.typeContractSpaceId !== void 0) return { kind: \"crossSpace\" };\n\tconst typeNode = typeReferenceNode(declaring);\n\tconst field = targetFields(typeNode === void 0 ? void 0 : ctx.references.get(typeNode))?.[name];\n\tif (field !== void 0) return {\n\t\tkind: \"field\",\n\t\tsymbol: field\n\t};\n\treport(`Cannot find field \"${name}\" on the type of \"${ctx.owner.name}.${declaring.name}\"`, node, ctx, \"field\");\n\treturn {\n\t\tkind: \"unresolved\",\n\t\tname\n\t};\n}\nfunction targetFields(target) {\n\tif (target === void 0) return void 0;\n\tif (target.kind === \"model\" || target.kind === \"compositeType\") return target.symbol.fields;\n}\nfunction resolveEntity(name, node, ctx) {\n\tconst found = ctx.scope.lookup(name);\n\tif (found === void 0) {\n\t\treport(`Cannot find entity \"${name}\"`, node, ctx, \"entity\");\n\t\treturn {\n\t\t\tkind: \"unresolved\",\n\t\t\tname\n\t\t};\n\t}\n\treturn found;\n}\nfunction report(message, node, ctx, reference) {\n\tctx.diagnostics.push({\n\t\tcode: PSL_UNRESOLVED_REFERENCE,\n\t\tmessage,\n\t\tdata: { reference },\n\t\t...diagnosticSource(ctx.sources, node).at()\n\t});\n}\nfunction resolveTypeReference(reference, scope) {\n\tif (reference === void 0 || reference.isOverQualified()) return void 0;\n\tif (reference.space() !== void 0) return { resolution: { kind: \"crossSpace\" } };\n\tconst name = reference.identifier()?.name();\n\tif (name === void 0 || name === \"\") return void 0;\n\tconst namespaceId = reference.namespace()?.name();\n\tconst found = namespaceId === void 0 ? scope.lookup(name) : qualifiedMember(namespaceId, name, scope);\n\tif (found === void 0) {\n\t\tconst written = namespaceId === void 0 ? name : `${namespaceId}.${name}`;\n\t\treturn {\n\t\t\tresolution: {\n\t\t\t\tkind: \"unresolved\",\n\t\t\t\tname: written\n\t\t\t},\n\t\t\tmessage: `Cannot find type \"${written}\"`,\n\t\t\tname: written\n\t\t};\n\t}\n\tif (\"badQualifier\" in found) return {\n\t\tresolution: {\n\t\t\tkind: \"unresolved\",\n\t\t\tname: found.qualifier\n\t\t},\n\t\tmessage: found.badQualifier,\n\t\tname: found.qualifier\n\t};\n\tif (found.kind === \"namespace\" || found.kind === \"contributedNamespace\") {\n\t\tconst written = namespaceId === void 0 ? name : `${namespaceId}.${name}`;\n\t\treturn {\n\t\t\tresolution: found,\n\t\t\tmessage: `\"${written}\" is a namespace; a type reference must name a model, composite type, enum, or named type`,\n\t\t\tname: written\n\t\t};\n\t}\n\treturn { resolution: found };\n}\nfunction qualifiedMember(namespaceId, name, scope) {\n\tconst qualifier = scope.lookup(namespaceId);\n\tif (qualifier === void 0) return void 0;\n\tif (!isNamespaceLike(qualifier)) return {\n\t\tbadQualifier: `\"${namespaceId}\" is ${describeQualifier(qualifier)}, not a namespace`,\n\t\tqualifier: namespaceId\n\t};\n\treturn lookupMember(qualifier, name);\n}\nfunction describeQualifier(resolution) {\n\tswitch (resolution.kind) {\n\t\tcase \"model\": return \"a model\";\n\t\tcase \"compositeType\": return \"a composite type\";\n\t\tcase \"namedType\": return \"a named type\";\n\t\tcase \"block\": return `${resolution.symbol.keyword === \"enum\" ? \"an\" : \"a\"} ${resolution.symbol.keyword}`;\n\t\tdefault: return \"a scalar type\";\n\t}\n}\nfunction own(record, name) {\n\treturn Object.hasOwn(record, name) ? record[name] : void 0;\n}\n//#endregion\n//#region src/block-spec/constructors.ts\nfunction structBlock(config) {\n\treturn {\n\t\tmode: \"struct\",\n\t\tparameters: config.parameters\n\t};\n}\nfunction mapBlock(config) {\n\treturn {\n\t\tmode: \"map\",\n\t\tvalue: config.value,\n\t\tallowBare: config.allowBare ?? false\n\t};\n}\n//#endregion\n//#region src/block-spec/interpret.ts\nfunction interpretExtensionBlock(input) {\n\tconst { block, descriptor, spec, symbols, sources, binder } = input;\n\tconst ctx = {\n\t\tsources,\n\t\tsymbols,\n\t\tbinder\n\t};\n\tconst entries = spec.mode === \"struct\" ? interpretStructBlock(block, spec, ctx) : interpretMapBlock(block, spec, ctx);\n\tconst diagnostics = [...entries.diagnostics];\n\tconst interpretedAttributes = interpretExtensionBlockAttributes({\n\t\tblock,\n\t\tdescriptor,\n\t\tsymbols,\n\t\tsources,\n\t\tbinder\n\t});\n\tdiagnostics.push(...interpretedAttributes.diagnostics);\n\tif (entries.failed || diagnostics.length > 0) return notOk(diagnostics);\n\treturn ok({\n\t\tkind: descriptor.discriminator,\n\t\tkeyword: block.keyword,\n\t\tname: block.name,\n\t\tvalues: blindCast(entries.values),\n\t\tparameterSpans: entries.parameterSpans,\n\t\tattributes: interpretedAttributes.attributes,\n\t\tspan: block.span\n\t});\n}\nfunction interpretStructBlock(block, spec, ctx) {\n\tconst diagnostics = [];\n\tlet failed = false;\n\tconst values = Object.create(null);\n\tconst parameterSpans = Object.create(null);\n\tconst seen = /* @__PURE__ */ new Set();\n\tfor (const entry of block.node.entries()) {\n\t\tconst key = entry.key()?.name();\n\t\tif (key === void 0) continue;\n\t\tconst span = nodePslSpan(entry.syntax, ctx.sources);\n\t\tif (seen.has(key)) {\n\t\t\tdiagnostics.push(duplicateParameterDiagnostic(block, key, ctx, entry, span));\n\t\t\tcontinue;\n\t\t}\n\t\tseen.add(key);\n\t\tconst rule = Object.hasOwn(spec.parameters, key) ? spec.parameters[key]?.type : void 0;\n\t\tif (rule === void 0) {\n\t\t\tdiagnostics.push(entryDiagnostic(\"PSL_EXTENSION_UNKNOWN_PARAMETER\", `Unknown parameter \"${key}\" in \"${block.keyword}\" block \"${block.name}\". The block does not declare this parameter.`, ctx, entry, span));\n\t\t\tcontinue;\n\t\t}\n\t\tparameterSpans[key] = span;\n\t\tconst value = entry.value();\n\t\tif (value === void 0) {\n\t\t\tdiagnostics.push(bareEntryDiagnostic(block, key, ctx, entry, span));\n\t\t\tcontinue;\n\t\t}\n\t\tconst parsed = rule.parse(value, ctx);\n\t\tif (parsed.ok) values[key] = parsed.value;\n\t\telse {\n\t\t\tfailed = true;\n\t\t\tdiagnostics.push(...parsed.failure);\n\t\t}\n\t}\n\tfor (const [key, param] of Object.entries(spec.parameters)) {\n\t\tif (seen.has(key)) continue;\n\t\tif (isOptionalArgType(param.type)) {\n\t\t\tif (param.type.hasDefault) values[key] = param.type.defaultValue;\n\t\t\tcontinue;\n\t\t}\n\t\tdiagnostics.push(entryDiagnostic(\"PSL_EXTENSION_MISSING_REQUIRED_PARAMETER\", `Required parameter \"${key}\" is missing from \"${block.keyword}\" block \"${block.name}\".`, ctx, block.node, block.span));\n\t}\n\treturn {\n\t\tvalues,\n\t\tparameterSpans,\n\t\tdiagnostics,\n\t\tfailed\n\t};\n}\nfunction interpretMapBlock(block, spec, ctx) {\n\tconst diagnostics = [];\n\tlet failed = false;\n\tconst values = Object.create(null);\n\tconst parameterSpans = Object.create(null);\n\tconst seen = /* @__PURE__ */ new Set();\n\tfor (const entry of block.node.entries()) {\n\t\tconst key = entry.key()?.name();\n\t\tif (key === void 0) continue;\n\t\tconst span = nodePslSpan(entry.syntax, ctx.sources);\n\t\tif (seen.has(key)) {\n\t\t\tdiagnostics.push(duplicateParameterDiagnostic(block, key, ctx, entry, span));\n\t\t\tcontinue;\n\t\t}\n\t\tseen.add(key);\n\t\tparameterSpans[key] = span;\n\t\tconst value = entry.value();\n\t\tif (value === void 0) {\n\t\t\tif (spec.allowBare) {\n\t\t\t\tvalues[key] = void 0;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tdiagnostics.push(bareEntryDiagnostic(block, key, ctx, entry, span));\n\t\t\tcontinue;\n\t\t}\n\t\tconst parsed = spec.value.type.parse(value, ctx);\n\t\tif (parsed.ok) values[key] = parsed.value;\n\t\telse {\n\t\t\tfailed = true;\n\t\t\tdiagnostics.push(...parsed.failure);\n\t\t}\n\t}\n\treturn {\n\t\tvalues,\n\t\tparameterSpans,\n\t\tdiagnostics,\n\t\tfailed\n\t};\n}\nfunction duplicateParameterDiagnostic(block, key, ctx, node, span) {\n\treturn entryDiagnostic(\"PSL_EXTENSION_DUPLICATE_PARAMETER\", `Duplicate parameter \"${key}\" in \"${block.keyword}\" block \"${block.name}\"; first occurrence wins`, ctx, node, span);\n}\nfunction bareEntryDiagnostic(block, key, ctx, node, span) {\n\treturn entryDiagnostic(\"PSL_INVALID_EXTENSION_BLOCK_MEMBER\", `Parameter \"${key}\" in \"${block.keyword}\" block \"${block.name}\" must be written as \"${key} = <value>\".`, ctx, node, span);\n}\nfunction interpretExtensionBlockAttributes(input) {\n\tconst { block, descriptor, symbols, sources, binder } = input;\n\tconst declared = descriptor.attributes ?? {};\n\tconst attributes = Object.create(null);\n\tconst diagnostics = [];\n\tconst seenNames = /* @__PURE__ */ new Set();\n\tfor (const attribute of block.node.attributes()) {\n\t\tconst name = attribute.name()?.path().join(\".\") ?? \"\";\n\t\tconst span = nodePslSpan(attribute.syntax, sources);\n\t\tif (!Object.hasOwn(declared, name)) {\n\t\t\tdiagnostics.push({\n\t\t\t\tcode: \"PSL_EXTENSION_UNKNOWN_BLOCK_ATTRIBUTE\",\n\t\t\t\tmessage: `Unknown attribute \"@@${name}\" in \"${block.keyword}\" block \"${block.name}\"`,\n\t\t\t\t...diagnosticSource(sources, attribute.syntax).at(span)\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\t\tif (seenNames.has(name)) {\n\t\t\tdiagnostics.push({\n\t\t\t\tcode: \"PSL_INVALID_EXTENSION_BLOCK_ATTRIBUTE\",\n\t\t\t\tmessage: `Duplicate attribute \"@@${name}\" in \"${block.keyword}\" block \"${block.name}\"; first occurrence wins`,\n\t\t\t\t...diagnosticSource(sources, attribute.syntax).at(span)\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\t\tseenNames.add(name);\n\t\tconst spec = blindCast(declared[name])({\n\t\t\tsymbols,\n\t\t\tblock\n\t\t});\n\t\tconst result = interpretAttribute(attribute, spec, {\n\t\t\tsources,\n\t\t\tsymbols,\n\t\t\tbinder\n\t\t});\n\t\tif (result.ok) {\n\t\t\tconst argSpans = Object.create(null);\n\t\t\tlet positionalSlot = 0;\n\t\t\tfor (const arg of readResolvedAttribute(attribute, sources).args) {\n\t\t\t\tconst key = arg.name ?? spec.positional[positionalSlot++]?.key;\n\t\t\t\tif (key !== void 0) argSpans[key] = arg.span;\n\t\t\t}\n\t\t\tattributes[name] = {\n\t\t\t\targs: result.value,\n\t\t\t\targSpans,\n\t\t\t\tspan\n\t\t\t};\n\t\t} else diagnostics.push(...result.failure);\n\t}\n\treturn {\n\t\tattributes,\n\t\tdiagnostics\n\t};\n}\nfunction entryDiagnostic(code, message, ctx, node, span) {\n\treturn {\n\t\tcode,\n\t\tmessage,\n\t\t...diagnosticSource(ctx.sources, node.syntax).at(span)\n\t};\n}\nfunction interpretExtensionBlocks(input) {\n\tconst { symbolTable, sources, pslBlockDescriptors, binder } = input;\n\tconst parsedBlocks = /* @__PURE__ */ new Map();\n\tconst diagnostics = [];\n\tconst scopes = [symbolTable.topLevel, ...Object.values(symbolTable.topLevel.namespaces)];\n\tfor (const scope of scopes) for (const block of Object.values(scope.blocks)) {\n\t\tconst descriptor = findBlockDescriptor(pslBlockDescriptors, block.keyword);\n\t\tif (descriptor === void 0) continue;\n\t\tconst parsed = interpretExtensionBlock({\n\t\t\tblock,\n\t\t\tdescriptor,\n\t\t\tspec: blockSpecFactoryOf(descriptor)({\n\t\t\t\tsymbols: symbolTable,\n\t\t\t\tblock\n\t\t\t}),\n\t\t\tsymbols: symbolTable,\n\t\t\tsources,\n\t\t\tbinder\n\t\t});\n\t\tif (parsed.ok) parsedBlocks.set(block, parsed.value);\n\t\telse diagnostics.push(...parsed.failure);\n\t}\n\treturn {\n\t\tparsedBlocks,\n\t\tdiagnostics\n\t};\n}\n//#endregion\n//#region src/name-the-psl-source-loses.ts\n/**\n* A name that is lost when a PSL file is read. The parser keeps block members, and the PSL contract sources keep other names, as keys of plain objects, where assigning this key sets the object's prototype instead of adding a key. Code that writes PSL must not write this name anywhere a PSL source reads a name, including inside `@map` and `@@map`.\n*/\nconst NAME_THE_PSL_SOURCE_LOSES = \"__proto__\";\n//#endregion\n//#region src/schema-directive.ts\nconst DIRECTIVE = /^(\\s*\\/\\/ *use +)(prisma-8|prisma-next)( *)(?!\\S)/;\nconst LEGACY_NAME = \"prisma-next\";\nfunction isPrismaNextSchema(text) {\n\treturn DIRECTIVE.test(text);\n}\n/** The document with the directive earlier releases wrote replaced by the current one. */\nfunction renameLegacyDirective(text) {\n\treturn text.replace(DIRECTIVE, (whole, lead, name, trail) => name === LEGACY_NAME ? `${lead}prisma-8${trail}` : whole);\n}\n//#endregion\n//#region src/symbol-table.ts\n/**\n* Owns duplicate-declaration detection for all PSL scopes; downstream consumers\n* should consume first-wins symbols rather than re-emitting duplicate diagnostics.\n*/\nfunction buildSymbolTable(options) {\n\tconst { documents, sources } = options;\n\tconst diagnostics = [];\n\tconst namespaces = Object.create(null);\n\tconst namedTypes = Object.create(null);\n\tconst blocks = Object.create(null);\n\tconst models = Object.create(null);\n\tconst compositeTypes = Object.create(null);\n\tconst topLevelNames = /* @__PURE__ */ new Set();\n\tfor (const document of documents) {\n\t\tconst sourceFile = sources.sourceFileFor(document.syntax);\n\t\tconst claim = (taken, name) => {\n\t\t\tconst text = name?.name();\n\t\t\tif (text === void 0) return void 0;\n\t\t\tif (taken.has(text)) {\n\t\t\t\tconst range = nameRange(name, sources);\n\t\t\t\tif (range) diagnostics.push({\n\t\t\t\t\tcode: \"PSL_DUPLICATE_DECLARATION\",\n\t\t\t\t\tmessage: `Duplicate declaration of \"${text}\"`,\n\t\t\t\t\tfilename: sourceFile.filename,\n\t\t\t\t\trange\n\t\t\t\t});\n\t\t\t\treturn;\n\t\t\t}\n\t\t\ttaken.add(text);\n\t\t\treturn text;\n\t\t};\n\t\tfor (const declaration of document.declarations()) if (declaration instanceof ModelDeclarationAst) {\n\t\t\tconst name = claim(topLevelNames, declaration.name());\n\t\t\tif (name !== void 0) models[name] = buildModel(name, declaration, sources, diagnostics);\n\t\t} else if (declaration instanceof CompositeTypeDeclarationAst) {\n\t\t\tconst name = claim(topLevelNames, declaration.name());\n\t\t\tif (name !== void 0) compositeTypes[name] = buildCompositeType(name, declaration, sources, diagnostics);\n\t\t} else if (declaration instanceof GenericBlockDeclarationAst) {\n\t\t\tconst name = claim(topLevelNames, declaration.name());\n\t\t\tif (name !== void 0) blocks[name] = buildBlock(name, declaration, sources);\n\t\t} else if (declaration instanceof NamespaceDeclarationAst) {\n\t\t\tconst declaredName = declaration.name()?.name();\n\t\t\tif (declaredName === void 0) continue;\n\t\t\tlet namespace = namespaces[declaredName];\n\t\t\tif (namespace === void 0) {\n\t\t\t\tconst name = claim(topLevelNames, declaration.name());\n\t\t\t\tif (name === void 0) continue;\n\t\t\t\tnamespace = {\n\t\t\t\t\tkind: \"namespace\",\n\t\t\t\t\tname,\n\t\t\t\t\tdeclarations: [{\n\t\t\t\t\t\tnode: declaration,\n\t\t\t\t\t\tspan: nodePslSpan(declaration.syntax, sources)\n\t\t\t\t\t}],\n\t\t\t\t\tmodels: Object.create(null),\n\t\t\t\t\tcompositeTypes: Object.create(null),\n\t\t\t\t\tblocks: Object.create(null)\n\t\t\t\t};\n\t\t\t\tnamespaces[name] = namespace;\n\t\t\t} else namespace.declarations.push({\n\t\t\t\tnode: declaration,\n\t\t\t\tspan: nodePslSpan(declaration.syntax, sources)\n\t\t\t});\n\t\t\textendNamespace(namespace, declaration, diagnostics, sources);\n\t\t} else if (declaration instanceof TypesBlockAst) for (const binding of declaration.declarations()) {\n\t\t\tconst name = claim(topLevelNames, binding.name());\n\t\t\tif (name === void 0) continue;\n\t\t\tconst resolved = resolveNamedTypeBinding(binding, sources);\n\t\t\tnamedTypes[name] = {\n\t\t\t\tkind: \"namedType\",\n\t\t\t\tname,\n\t\t\t\tnode: binding,\n\t\t\t\tspan: nodePslSpan(binding.syntax, sources),\n\t\t\t\t...resolved\n\t\t\t};\n\t\t}\n\t}\n\treturn {\n\t\tsymbolTable: { topLevel: {\n\t\t\tnamespaces,\n\t\t\tnamedTypes,\n\t\t\tblocks,\n\t\t\tmodels,\n\t\t\tcompositeTypes\n\t\t} },\n\t\tdiagnostics\n\t};\n}\nfunction buildModel(name, node, sources, diagnostics) {\n\treturn {\n\t\tkind: \"model\",\n\t\tname,\n\t\tnode,\n\t\tspan: nodePslSpan(node.syntax, sources),\n\t\tfields: buildFields(name, node.fields(), sources, diagnostics),\n\t\tattributes: readResolvedAttributes(node.attributes(), sources)\n\t};\n}\nfunction buildCompositeType(name, node, sources, diagnostics) {\n\treturn {\n\t\tkind: \"compositeType\",\n\t\tname,\n\t\tnode,\n\t\tspan: nodePslSpan(node.syntax, sources),\n\t\tfields: buildFields(name, node.fields(), sources, diagnostics),\n\t\tattributes: readResolvedAttributes(node.attributes(), sources)\n\t};\n}\nfunction buildBlock(name, node, sources) {\n\treturn {\n\t\tkind: \"block\",\n\t\tname,\n\t\tkeyword: node.keyword()?.text ?? \"\",\n\t\tnode,\n\t\tspan: nodePslSpan(node.syntax, sources)\n\t};\n}\nfunction extendNamespace(namespace, node, diagnostics, sources) {\n\tconst { models, compositeTypes, blocks } = namespace;\n\tfor (const member of node.declarations()) {\n\t\tconst memberName = member.name()?.name();\n\t\tif (memberName === void 0) continue;\n\t\tif (Object.hasOwn(models, memberName) || Object.hasOwn(compositeTypes, memberName) || Object.hasOwn(blocks, memberName)) {\n\t\t\tconst range = nameRange(member.name(), sources);\n\t\t\tif (range) diagnostics.push({\n\t\t\t\tcode: \"PSL_DUPLICATE_DECLARATION\",\n\t\t\t\tmessage: `Duplicate declaration of \"${memberName}\"`,\n\t\t\t\tfilename: sources.sourceFileFor(member.syntax).filename,\n\t\t\t\trange\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\t\tif (member instanceof ModelDeclarationAst) models[memberName] = buildModel(memberName, member, sources, diagnostics);\n\t\telse if (member instanceof CompositeTypeDeclarationAst) compositeTypes[memberName] = buildCompositeType(memberName, member, sources, diagnostics);\n\t\telse if (member instanceof GenericBlockDeclarationAst) blocks[memberName] = buildBlock(memberName, member, sources);\n\t}\n}\nfunction buildFields(ownerName, fields, sources, diagnostics) {\n\tconst result = Object.create(null);\n\tfor (const field of fields) {\n\t\tconst nameNode = field.name();\n\t\tconst name = nameNode?.name();\n\t\tif (name === void 0) continue;\n\t\tif (Object.hasOwn(result, name)) {\n\t\t\tconst range = nameRange(nameNode, sources);\n\t\t\tif (range) diagnostics.push({\n\t\t\t\tcode: \"PSL_DUPLICATE_DECLARATION\",\n\t\t\t\tmessage: `Duplicate declaration of \"${name}\"`,\n\t\t\t\tfilename: sources.sourceFileFor(field.syntax).filename,\n\t\t\t\trange\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\t\tresult[name] = buildField(ownerName, name, field, sources, diagnostics);\n\t}\n\treturn result;\n}\nfunction buildField(ownerName, name, node, sources, diagnostics) {\n\tconst attributes = readResolvedAttributes(node.attributes(), sources);\n\tconst span = nodePslSpan(node.syntax, sources);\n\tconst annotation = node.typeAnnotation();\n\tconst typeName = annotation?.name();\n\tif (typeName?.isOverQualified()) {\n\t\tconst path = typeName.path();\n\t\tdiagnostics.push({\n\t\t\tcode: \"PSL_INVALID_QUALIFIED_TYPE\",\n\t\t\tmessage: `Field \"${ownerName}.${name}\" has an invalid qualified type \"${path.join(\".\")}\"; use at most one namespace qualifier (e.g. \"ns.TypeName\")`,\n\t\t\tfilename: sources.sourceFileFor(typeName.syntax).filename,\n\t\t\trange: nodeRange(typeName.syntax, sources)\n\t\t});\n\t\treturn {\n\t\t\tkind: \"field\",\n\t\t\tname,\n\t\t\tnode,\n\t\t\tspan,\n\t\t\ttypeName: path[path.length - 1] ?? \"\",\n\t\t\toptional: false,\n\t\t\tlist: false,\n\t\t\tmalformedType: true,\n\t\t\tattributes\n\t\t};\n\t}\n\tconst typeConstructor = annotation?.isConstructor() ? readResolvedConstructorCall(annotation, sources) : void 0;\n\tconst typeNamespaceId = typeName?.namespace()?.name();\n\tconst typeContractSpaceId = typeName?.space()?.name();\n\treturn {\n\t\tkind: \"field\",\n\t\tname,\n\t\tnode,\n\t\tspan,\n\t\ttypeName: typeName?.identifier()?.name() ?? \"\",\n\t\t...typeNamespaceId !== void 0 ? { typeNamespaceId } : {},\n\t\t...typeContractSpaceId !== void 0 ? { typeContractSpaceId } : {},\n\t\toptional: annotation?.isOptional() ?? false,\n\t\tlist: annotation?.isList() ?? false,\n\t\t...typeConstructor !== void 0 ? { typeConstructor } : {},\n\t\tattributes\n\t};\n}\nfunction resolveNamedTypeBinding(node, sources) {\n\tconst annotation = node.typeAnnotation();\n\tconst isConstructor = annotation?.isConstructor() ?? false;\n\tconst baseType = annotation?.name()?.identifier()?.name();\n\tconst typeConstructor = readResolvedConstructorCall(annotation, sources);\n\treturn {\n\t\tisConstructor,\n\t\t...!isConstructor && baseType !== void 0 ? { baseType } : {},\n\t\t...typeConstructor !== void 0 ? { typeConstructor } : {},\n\t\tattributes: readResolvedAttributes(node.attributes(), sources)\n\t};\n}\nfunction nameRange(name, sources) {\n\tif (name === void 0) return void 0;\n\tconst sourceFile = sources.sourceFileFor(name.syntax);\n\tfor (const token of name.syntax.tokens()) if (token.kind === \"Ident\") return {\n\t\tstart: sourceFile.positionAt(token.offset),\n\t\tend: sourceFile.positionAt(token.offset + token.text.length)\n\t};\n}\nfunction nodeRange(node, sources) {\n\tconst sourceFile = sources.sourceFileFor(node);\n\tconst start = node.offset;\n\tconst end = start + node.green.textLength;\n\treturn {\n\t\tstart: sourceFile.positionAt(start),\n\t\tend: sourceFile.positionAt(end)\n\t};\n}\n//#endregion\nexport { NAME_THE_PSL_SOURCE_LOSES, PSL_UNRESOLVED_REFERENCE, assembleAttributeSpecs, blockAttribute, blockSpecFactoryOf, bool, buildSymbolTable, createBinder, createPslDiagnosticCollector, diagnosticFromSpan, diagnosticSource, entityRef, entityReference, fieldAttribute, fieldRef, findBlockDescriptor, flatPslModels, funcCall, getPositionalArgument, identifier, int, interpretArgs, interpretAttribute, interpretExtensionBlock, interpretExtensionBlockAttributes, interpretExtensionBlocks, isNamespaceLike, isPrismaNextSchema, isPslIdentifier, json, jsonValue, keywordPslSpan, leafDiagnostic, list, mapBlock, mapPslDiagnostics, matchesSelector, memberEntries, modelAttribute, namespacePslExtensionBlocks, nodePslSpan, num, numLiteral, oneOf, optional, parseQuotedStringLiteral, readResolvedAttribute, readResolvedAttributes, readResolvedConstructorCall, record, referencedFieldRef, renameLegacyDirective, str, structBlock, taggedLiteral, typeReferenceNode };\n\n//# sourceMappingURL=index.mjs.map"],"mappings":";;;;;;;;;AASA,SAAS,sBAAsB,WAAW,QAAQ,GAAG;CACpD,OAAO,UAAU,KAAK,QAAQ,QAAQ,IAAI,SAAS,YAAY,CAAC,CAAC,MAAM,EAAE;AAC1E;AACA,SAAS,yBAAyB,OAAO;CACxC,MAAM,QAAQ,MAAM,KAAK,CAAC,CAAC,MAAM,gBAAgB;CACjD,IAAI,CAAC,OAAO,OAAO,KAAK;CACxB,OAAO,MAAM,MAAM;AACpB;AAGA,UAAU,0BAA0B,WA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AAW,WAAW,MAAM,SAAS,MAAM,KAAK,MAAM;CAC5D;AACD;AACA,SAAS,UAAU,MAAM,SAAS;CACjC,MAAM,aAAa,QAAQ,cAAc,IAAI;CAC7C,MAAM,QAAQ,KAAK;CACnB,MAAM,MAAM,QAAQ,KAAK,MAAM;CAC/B,OAAO;EACN,OAAO,WAAW,WAAW,KAAK;EAClC,KAAK,WAAW,WAAW,GAAG;CAC/B;AACD"}
@@ -1,8 +1,8 @@
1
1
  import { o as structuredError } from "./structured-error-BXbihKQ-.mjs";
2
2
  import { t as InternalError } from "./internal-error-ChGYPVpq-DhUD05u0.mjs";
3
3
  import { t as SyntaxNode } from "./ast-helpers-2XRnkQEO-BxG5qx3Q.mjs";
4
- import { T as TypesBlockAst, a as CompositeTypeDeclarationAst, c as FieldDeclarationAst, f as KeyValuePairAst, g as NamespaceDeclarationAst, h as NamedTypeDeclarationAst, m as ModelDeclarationAst, p as ModelAttributeAst, u as GenericBlockDeclarationAst } from "./declarations-CgS5vnfJ-Dhi3X7oU.mjs";
5
- import { o as parse } from "./parse-1owoiwHJ-CqCnC7Qx.mjs";
4
+ import { T as TypesBlockAst, a as CompositeTypeDeclarationAst, c as FieldDeclarationAst, f as KeyValuePairAst, g as NamespaceDeclarationAst, h as NamedTypeDeclarationAst, m as ModelDeclarationAst, p as ModelAttributeAst, u as GenericBlockDeclarationAst } from "./declarations-DqOfcPNK-CxtZmhmW.mjs";
5
+ import { o as parse } from "./parse-BTx_wPlc-_tfcu7lx.mjs";
6
6
  //#region ../../../1-framework/2-authoring/psl-parser/dist/format.mjs
7
7
  function emitDocument(document, indentUnit, newline) {
8
8
  const writer = new LineWriter(indentUnit, newline);