@cratis/screenplay-language 4.192.0 → 4.194.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. package/dist/bundles/command-read-completions.js +5 -0
  2. package/dist/bundles/command-read-completions.js.map +1 -0
  3. package/dist/bundles/compiler/Diagnostics/DiagnosticArgument.js +2 -0
  4. package/dist/bundles/compiler/Diagnostics/DiagnosticArgument.js.map +1 -0
  5. package/dist/bundles/compiler/Diagnostics/DiagnosticCodes.js +1 -1
  6. package/dist/bundles/compiler/Diagnostics/DiagnosticCodes.js.map +1 -1
  7. package/dist/bundles/compiler/Files/PlayFolderMerge.js +1 -1
  8. package/dist/bundles/compiler/Files/PlayFolderMerge.js.map +1 -1
  9. package/dist/bundles/compiler/Parsing/CaptureParser.js +1 -1
  10. package/dist/bundles/compiler/Parsing/CaptureParser.js.map +1 -1
  11. package/dist/bundles/compiler/Parsing/ParserContext.js +1 -1
  12. package/dist/bundles/compiler/Parsing/ParserContext.js.map +1 -1
  13. package/dist/bundles/compiler/Parsing/ProducesParser.js +1 -1
  14. package/dist/bundles/compiler/Parsing/ProducesParser.js.map +1 -1
  15. package/dist/bundles/compiler/Parsing/ProjectionParser.js +1 -1
  16. package/dist/bundles/compiler/Parsing/ProjectionParser.js.map +1 -1
  17. package/dist/bundles/compiler/Parsing/ProjectionTargetValidator.js +1 -1
  18. package/dist/bundles/compiler/Parsing/ProjectionTargetValidator.js.map +1 -1
  19. package/dist/bundles/compiler/Parsing/ReactionParser.js +1 -1
  20. package/dist/bundles/compiler/Parsing/ReactionParser.js.map +1 -1
  21. package/dist/bundles/compiler/Parsing/ScreenplayParser.js +1 -1
  22. package/dist/bundles/compiler/Parsing/ScreenplayParser.js.map +1 -1
  23. package/dist/bundles/compiler/Parsing/SpecificationCaseParser.js +1 -1
  24. package/dist/bundles/compiler/Parsing/SpecificationCaseParser.js.map +1 -1
  25. package/dist/bundles/compiler/Parsing/SpecificationCaseValidator.js +1 -1
  26. package/dist/bundles/compiler/Parsing/SpecificationCaseValidator.js.map +1 -1
  27. package/dist/bundles/compiler/Parsing/SpecificationCommandExamples.js +1 -1
  28. package/dist/bundles/compiler/Parsing/SpecificationCommandExamples.js.map +1 -1
  29. package/dist/bundles/compiler/Parsing/SpecificationExampleParser.js +1 -1
  30. package/dist/bundles/compiler/Parsing/SpecificationExampleParser.js.map +1 -1
  31. package/dist/bundles/compiler/Parsing/SpecificationParser.js +1 -1
  32. package/dist/bundles/compiler/Parsing/SpecificationParser.js.map +1 -1
  33. package/dist/bundles/compiler/Parsing/SpecificationResponseParser.js +1 -1
  34. package/dist/bundles/compiler/Parsing/SpecificationResponseParser.js.map +1 -1
  35. package/dist/bundles/compiler/Parsing/SpecificationStreamValidator.js +1 -1
  36. package/dist/bundles/compiler/Parsing/SpecificationStreamValidator.js.map +1 -1
  37. package/dist/bundles/compiler/Syntax/Structure.js.map +1 -1
  38. package/dist/bundles/compiler/Syntax/SyntaxCollections.js +1 -1
  39. package/dist/bundles/compiler/Syntax/SyntaxCollections.js.map +1 -1
  40. package/dist/bundles/compiler/Syntax/SyntaxJson.js +1 -1
  41. package/dist/bundles/compiler/Syntax/SyntaxJson.js.map +1 -1
  42. package/dist/bundles/compiler/index.js +1 -1
  43. package/dist/bundles/completion-items.js +1 -1
  44. package/dist/bundles/completion-items.js.map +1 -1
  45. package/dist/bundles/completion-planner.js +2 -2
  46. package/dist/bundles/completion-planner.js.map +1 -1
  47. package/dist/bundles/diagnostic-codes.js +1 -1
  48. package/dist/bundles/diagnostic-codes.js.map +1 -1
  49. package/dist/bundles/keyword-docs.js +1 -1
  50. package/dist/bundles/keyword-docs.js.map +1 -1
  51. package/dist/bundles/language.js +1 -1
  52. package/dist/bundles/language.js.map +1 -1
  53. package/dist/bundles/response-analysis.js +2 -2
  54. package/dist/bundles/response-analysis.js.map +1 -1
  55. package/dist/bundles/tokens.js +1 -1
  56. package/dist/bundles/tokens.js.map +1 -1
  57. package/dist/bundles/validation.js +1 -1
  58. package/dist/bundles/validation.js.map +1 -1
  59. package/dist/command-read-completions.d.ts +4 -0
  60. package/dist/command-read-completions.d.ts.map +1 -0
  61. package/dist/completion-items.d.ts.map +1 -1
  62. package/dist/completion-planner.d.ts.map +1 -1
  63. package/dist/diagnostic-codes.d.ts +1 -0
  64. package/dist/diagnostic-codes.d.ts.map +1 -1
  65. package/dist/keyword-docs.d.ts.map +1 -1
  66. package/dist/language.d.ts.map +1 -1
  67. package/dist/tokens.d.ts.map +1 -1
  68. package/package.json +1 -1
@@ -0,0 +1,5 @@
1
+ import"./_virtual/_virtual/_rolldown/runtime.js";import{enclosingChain as e,fenceMap as t,indentOf as n}from"./document-context.js";import{responseAnalysis as r}from"./response-analysis.js";import{scanDocument as i}from"./symbols.js";function commandReadCompletions(a,o,s,c){if(![a.join(`
2
+ `),...c.authoringDocuments?.map(e=>e.source)??c.authoringSources??[]].some(e=>{let n=e.split(`
3
+ `),r=t(n);return n.some((e,t)=>!r[t]&&/^command\s+reads\s+protected\s*(?:\/\/.*)?$/.test(e))}))return null;let l=e(a,t(a),o,n(s));if(!l.includes(`command`))return null;let u=s.match(/^\s*require\s+(?:.*(?:==|!=|>=|<=|>|<|\band\b|\bor\b)\s+)?([\w.]*)$/),d=l[0]===`produces`?s.match(/^\s*\w+\s*=\s*([\w.]*)$/):null,f=(u??d)?.[1];if(f===void 0)return null;let p=r(a,c.authoringDocuments??c.authoringSources?.filter(e=>e!==a.join(`
4
+ `))??[],c.authoringPlacement,c.authoringPath,c.authoringPlacementResolved),m=p.operations.contexts.get(o)?.commandLine,h=m===void 0?void 0:i(a).commands.find(e=>e.line===m);if(!h)return[];let g=h.reads??[];return g.flatMap(e=>{let t=e.alias??e.view;if(g.filter(e=>(e.alias??e.view)===t).length!==1||h.properties.some(e=>e.name===t)||!e.alias&&g.filter(t=>t.view===e.view).length!==1)return[];let n=p.readModels.filter(({model:t,scope:n})=>t.name===e.view||[...n,t.name].join(`.`)===e.view);return n.length===1?n[0].model.properties.filter(e=>`${t}.${e.name}`.startsWith(f)).map(e=>({label:`${t}.${e.name}`,insertText:f.includes(`.`)?e.name:`${t}.${e.name}`,documentation:`Protected read property in require or produces mappings (ESM v25). Required absence rejects before requirements; matching intervening facts conflict at commit. Admission depends on the view and key shape.`})):[]})}export{commandReadCompletions};
5
+ //# sourceMappingURL=command-read-completions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"command-read-completions.js","names":["lines","symbols","document","source","fences","fenceMap","index","text","chain","enclosingChain","line","indentOf","before","operand","mapping","prefix","analysis","responseAnalysis","commandLine","command","scanDocument","reads","name","read","other","property","models","model","scope"],"sources":["../../command-read-completions.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { CompletionEntry } from './completion-items';\nimport { enclosingChain, fenceMap, indentOf } from './document-context';\nimport { responseAnalysis } from './response-analysis';\nimport { DocumentSymbols, scanDocument } from './symbols';\n\nexport function commandReadCompletions(lines: string[], line: number, before: string, symbols: DocumentSymbols): CompletionEntry[] | null {\n const sources = [lines.join('\\n'), ...(symbols.authoringDocuments?.map(document => document.source) ?? symbols.authoringSources ?? [])];\n const protectedMode = sources.some(source => {\n const document = source.split('\\n');\n const fences = fenceMap(document);\n return document.some((text, index) => !fences[index] && /^command\\s+reads\\s+protected\\s*(?:\\/\\/.*)?$/.test(text));\n });\n if (!protectedMode) return null;\n const chain = enclosingChain(lines, fenceMap(lines), line, indentOf(before));\n if (!chain.includes('command')) return null;\n const operand = before.match(/^\\s*require\\s+(?:.*(?:==|!=|>=|<=|>|<|\\band\\b|\\bor\\b)\\s+)?([\\w.]*)$/);\n const mapping = chain[0] === 'produces' ? before.match(/^\\s*\\w+\\s*=\\s*([\\w.]*)$/) : null;\n const prefix = (operand ?? mapping)?.[1];\n if (prefix === undefined) return null;\n const analysis = responseAnalysis(lines, symbols.authoringDocuments ?? symbols.authoringSources?.filter(source => source !== lines.join('\\n')) ?? [], symbols.authoringPlacement, symbols.authoringPath, symbols.authoringPlacementResolved);\n const commandLine = analysis.operations.contexts.get(line)?.commandLine;\n const command = commandLine === undefined ? undefined : scanDocument(lines).commands.find(command => command.line === commandLine);\n if (!command) return [];\n const reads = command.reads ?? [];\n return reads.flatMap(read => {\n const name = read.alias ?? read.view;\n if (reads.filter(other => (other.alias ?? other.view) === name).length !== 1 || command.properties.some(property => property.name === name)) return [];\n if (!read.alias && reads.filter(other => other.view === read.view).length !== 1) return [];\n const models = analysis.readModels.filter(({ model, scope }) => model.name === read.view || [...scope, model.name].join('.') === read.view);\n if (models.length !== 1) return [];\n return models[0].model.properties.filter(property => `${name}.${property.name}`.startsWith(prefix)).map(property => ({\n label: `${name}.${property.name}`,\n insertText: prefix.includes('.') ? property.name : `${name}.${property.name}`,\n documentation: 'Protected read property in require or produces mappings (ESM v25). Required absence rejects before requirements; matching intervening facts conflict at commit. Admission depends on the view and key shape.',\n }));\n });\n}\n"],"mappings":"0OAQA,SAAgB,uBAAuB,EAAiB,EAAc,EAAgB,EAAoD,CAOtI,GAAI,CALkB,CADLA,EAAM,KAAK;CAAI,EAAG,GAAIC,EAAQ,oBAAoB,IAAI,GAAYC,EAAS,MAAM,GAAKD,EAAQ,kBAAoB,CAAC,CACxG,CAAC,CAAC,KAAK,GAAU,CACzC,IAAMC,EAAWC,EAAO,MAAM;CAAI,EAC5BC,EAASC,EAASH,CAAQ,EAChC,OAAOA,EAAS,MAAM,EAAM,IAAU,CAACE,EAAOE,IAAU,8CAA8C,KAAKC,CAAI,CAAC,CACpH,CACiB,EAAG,OAAO,KAC3B,IAAMC,EAAQC,EAAeT,EAAOK,EAASL,CAAK,EAAGU,EAAMC,EAASC,CAAM,CAAC,EAC3E,GAAI,CAACJ,EAAM,SAAS,SAAS,EAAG,OAAO,KACvC,IAAMK,EAAUD,EAAO,MAAM,qEAAqE,EAC5FE,EAAUN,EAAM,KAAO,WAAaI,EAAO,MAAM,yBAAyB,EAAI,K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,OACvE,cAAe,8MACnB,EAAE,EAL8B,CAAC,CAMrC,CAAC,CACL"}
@@ -0,0 +1,2 @@
1
+ import"../../_virtual/_virtual/_rolldown/runtime.js";function diagnosticText(e,t){return{[e]:{kind:`text`,value:t}}}function diagnosticKeyword(e,t){return{[e]:{kind:`keyword`,value:t}}}export{diagnosticKeyword,diagnosticText};
2
+ //# sourceMappingURL=DiagnosticArgument.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DiagnosticArgument.js","names":["name"],"sources":["../../../../../../Compiler/Diagnostics/DiagnosticArgument.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { DiagnosticArgumentKind } from './DiagnosticArgumentKind';\n\nexport type DiagnosticArgument =\n | { readonly kind: DiagnosticArgumentKind.Text | DiagnosticArgumentKind.Keyword; readonly value: string }\n | { readonly kind: DiagnosticArgumentKind.Index; readonly value: number }\n | { readonly kind: DiagnosticArgumentKind.Declaration; readonly value: { readonly kind: string; readonly path: readonly string[] } };\n\nexport function diagnosticText(name: string, value: string): Readonly<Record<string, DiagnosticArgument>> {\n return { [name]: { kind: DiagnosticArgumentKind.Text, value } };\n}\n\nexport function diagnosticKeyword(name: string, value: string): Readonly<Record<string, DiagnosticArgument>> {\n return { [name]: { kind: DiagnosticArgumentKind.Keyword, value } };\n}\n"],"mappings":"qDAUA,SAAgB,eAAe,EAAc,EAA6D,CACtG,MAAO,EAAGA,GAAO,CAAE,KAAA,OAAmC,OAAM,CAAE,CAClE,CAEA,SAAgB,kBAAkB,EAAc,EAA6D,CACzG,MAAO,EAAGA,GAAO,CAAE,KAAA,UAAsC,OAAM,CAAE,CACrE"}
@@ -1,2 +1,2 @@
1
- const e={UnknownMatchPattern:`PLAY0366`,InvalidMatchPattern:`PLAY0367`,PatternOutsidePortableMatchDialect:`PLAY0699`,DeprecatedStudioTextRulePattern:`PLAY0787`,InvalidIdentityDeclaration:`PLAY0633`,DuplicateIdentity:`PLAY0634`,InvalidIdentityDetail:`PLAY0635`,UnknownIdentitySource:`PLAY0636`,IdentityDetailWithoutSource:`PLAY0637`,IdentitySourceWithBody:`PLAY0638`,DuplicateIdentityDetail:`PLAY0639`,BuiltInIdentityDetail:`PLAY0640`,UnknownIdentityQuery:`PLAY0641`,InvalidIdentityQuery:`PLAY0642`,IdentityQueryWithoutKey:`PLAY0643`,InvalidIdentityQueryKey:`PLAY0644`,IdentityQueryAuthorizationDependency:`PLAY0645`,IdentityQueryTypeMismatch:`PLAY0646`,InvalidReactionIdentity:`PLAY0647`,GatedInvocationWithoutIdentity:`PLAY0648`,UnusedReactionIdentity:`PLAY0649`,UnusedReactionRole:`PLAY0650`,UnsatisfiedReactionIdentity:`PLAY0651`,ReactionPrivilegeEscalation:`PLAY0652`,CommandProducesPublicEvent:`PLAY0607`,PublicEventRequiresOutboundTranslation:`PLAY0608`,OutboundPublicEventCount:`PLAY0609`,ForeignPublicEventConsumer:`PLAY0610`,OutboundTranslationInput:`PLAY0611`,InboundTranslationOutput:`PLAY0612`,ForeignPublicEventProduced:`PLAY0613`,PublicTranslationRequiresDirection:`PLAY0614`,TranslationConstructDirection:`PLAY0615`,InboundTranslationInput:`PLAY0616`,OutboundTranslationOutput:`PLAY0617`,EventTargetOutsideOutboundTranslation:`PLAY0618`,EventsSourceOutsideInboundTranslation:`PLAY0619`,InvalidCaptureEventsSource:`PLAY0620`,CaptureEventsFromSeveralOrigins:`PLAY0687`,DirectionlessTranslationReactsToOwnCapture:`PLAY0694`,PendingIntentWithOtherHandler:`PLAY0698`,DescribedCommandNotImplemented:`PLAY0695`,DescribedCommandWithoutProductions:`PLAY0696`,DescribedCommandCardinalityNotAdmitted:`PLAY0697`,CaptureEventsKeyNotRequired:`PLAY0700`,CaptureEventsRecordFixture:`PLAY0701`,RefutedGeneratedConceptRule:`PLAY0688`,UnprovenGeneratedConceptRule:`PLAY0689`,InvalidExposureDeclaration:`PLAY0621`,UnknownExposureOwner:`PLAY0622`,ReExposureCycle:`PLAY0623`,ReExposureBroken:`PLAY0624`,InvalidInstanceContribution:`PLAY0625`,UnknownContributionInstance:`PLAY0626`,ContributionNotExposed:`PLAY0627`,ContributionTypeMismatch:`PLAY0628`,UnknownTemplateContentSlot:`PLAY0629`,UnknownNavigationOutlet:`PLAY0630`,TemplateScopeMismatch:`PLAY0631`,IncompatibleComponentPackage:`PLAY0632`,UnknownNavigationDestination:`PLAY0654`,UnknownScreenContributionPoint:`PLAY0655`,TemplateNestingCycle:`PLAY0656`,TemplateCategoryMissing:`PLAY0720`,InvalidTemplateVersionRange:`PLAY0721`,UnknownTemplateBlueprint:`PLAY0722`,DuplicateComplianceMarker:`PLAY0653`,LegacyComplianceMarker:`PLAY0565`,UnknownComplianceMarker:`PLAY0566`,InvalidSecretScope:`PLAY0567`,DuplicateSecretScope:`PLAY0568`,SecretScopeIgnoredForPii:`PLAY0569`,InvalidPersonalDataQualifier:`PLAY0570`,DuplicateSpecialCategory:`PLAY0571`,InvalidPurposeDeclaration:`PLAY0596`,InvalidPurposeVocabulary:`PLAY0597`,DuplicatePurposeField:`PLAY0598`,DuplicatePurposeDeclaration:`PLAY0599`,UnknownPurpose:`PLAY0600`,PurposeInterestMismatch:`PLAY0601`,PersonalDataWithoutPurpose:`PLAY0602`,SpecialDataWithoutCondition:`PLAY0603`,CriminalDataWithoutAuthorization:`PLAY0604`,PurposeWithoutBasis:`PLAY0605`,UnusedPurpose:`PLAY0606`,ConflictingScreenDataBinding:`PLAY0530`,ScreenDataQueryMismatch:`PLAY0531`,ActionWithoutInputSurface:`PLAY0532`,CommandWithoutInputSurface:`PLAY0533`,ReadModelFieldWithoutOrigin:`PLAY0534`,QueryParameterNotHeldByView:`PLAY0535`,UnconsumedEvent:`PLAY0536`,UnreachableScreen:`PLAY0537`,UnknownActionSubjectField:`PLAY0345`,UnresolvedActionSubject:`PLAY0346`,UnreachableActionAlternative:`PLAY0347`,UnknownActionArgumentProperty:`PLAY0348`,UnreachableRefusalBranch:`PLAY0540`,InvalidRefusalValue:`PLAY0541`,UnknownRefusalConstraint:`PLAY0542`,UnknownRedeliveryReaction:`PLAY0544`,IndeterminateNegatedClaimTarget:`PLAY0546`,InvalidRefusalBranch:`PLAY0538`,InvalidRefusalBranchBody:`PLAY0539`,UnmatchedRedeliveredOccurrence:`PLAY0543`,InvalidNoEventsExpectation:`PLAY0545`,InvalidProducesDeclaration:`PLAY0042`,ProducesWhenWithoutEvent:`PLAY0043`,InvalidPropertyMapping:`PLAY0044`,DuplicateProducesTarget:`PLAY0193`,EventSourceIdInPayload:`PLAY0469`,ExplicitProducesTargetsRequired:`PLAY0470`,RedundantEventId:`PLAY0471`,InvalidEventId:`PLAY0472`,InlineEventCollision:`PLAY0473`,InlineEventOutsideCommand:`PLAY0474`,InlineEventGeneration:`PLAY0475`,ReservedProductionMetadata:`PLAY0476`,InvalidEventDocumentation:`PLAY0477`,OmittedProductionDestination:`PLAY0478`,UnknownConstraintProperty:`PLAY0391`,UnknownTopLevelConstruct:`PLAY0001`,InvalidDomainDeclaration:`PLAY0002`,DuplicateDomain:`PLAY0003`,DomainNotFirst:`PLAY0004`,InvalidImportDeclaration:`PLAY0005`,TabIndentation:`PLAY0006`,InvalidConceptDeclaration:`PLAY0007`,UnknownPrimitiveType:`PLAY0008`,InvalidEnumerationValue:`PLAY0009`,UnknownConceptDirective:`PLAY0010`,ValidateReadAsEnumerationBlock:`PLAY0011`,AttributeReasonWithoutAttribute:`PLAY0012`,DuplicateAttributeReason:`PLAY0013`,InvalidTypeDeclaration:`PLAY0014`,TypeWithoutProperties:`PLAY0015`,InvalidPropertyDeclaration:`PLAY0016`,IdentifierOutsideCommand:`PLAY0017`,InvalidEventDeclaration:`PLAY0018`,IdentifierOnEventProperty:`PLAY0019`,TagPropertyReadAsTag:`PLAY0020`,InvalidModuleDeclaration:`PLAY0021`,UnknownModuleDirective:`PLAY0022`,InvalidFeatureDeclaration:`PLAY0023`,UnknownFeatureDirective:`PLAY0024`,InvalidSliceDeclaration:`PLAY0027`,UnknownSliceType:`PLAY0028`,UnknownSliceDirective:`PLAY0029`,InvalidPersonaDeclaration:`PLAY0030`,InvalidPersonaPolicyReference:`PLAY0031`,UnknownPersonaDirective:`PLAY0032`,InvalidCommandDeclaration:`PLAY0033`,UnknownCommandDirective:`PLAY0034`,DuplicateCommandIdentifier:`PLAY0036`,InvalidQueryDeclaration:`PLAY0047`,UnknownQueryDirective:`PLAY0048`,InvalidQueryParameter:`PLAY0049`,InvalidProjectionDeclaration:`PLAY0056`,EmptyProjection:`PLAY0057`,UnknownProjectionDirective:`PLAY0058`,FromWithoutEvent:`PLAY0061`,InvalidEventReference:`PLAY0062`,InvalidJoinDeclaration:`PLAY0063`,JoinWithoutEvent:`PLAY0064`,InvalidChildrenDeclaration:`PLAY0065`,InvalidNestedDeclaration:`PLAY0066`,NestedBlockWithoutFrom:`PLAY0067`,InvalidRemoveDeclaration:`PLAY0068`,UnknownRemoveDirective:`PLAY0069`,InvalidClearDeclaration:`PLAY0070`,ClearWithOutsideNestedBlock:`PLAY0071`,InvalidSpecificationDeclaration:`PLAY0094`,UnknownSpecificationDirective:`PLAY0095`,InvalidSpecificationWhen:`PLAY0096`,DuplicateSpecificationWhen:`PLAY0097`,InvalidThenError:`PLAY0098`,InvalidReadModelStep:`PLAY0099`,InvalidEventStep:`PLAY0100`,InvalidSpecificationValue:`PLAY0101`,InvalidScreenDeclaration:`PLAY0102`,UnknownScreenDirective:`PLAY0103`,InvalidDataDirective:`PLAY0104`,InvalidActionDirective:`PLAY0105`,UnknownActionDirective:`PLAY0106`,InvalidNavigation:`PLAY0107`,InvalidScreenLayoutSlot:`PLAY0108`,UnknownLayoutDirective:`PLAY0026`,InvalidTitleDirective:`PLAY0109`,UnknownTableDirective:`PLAY0110`,UnknownSummaryDirective:`PLAY0111`,AuthorizeWithoutPolicy:`PLAY0122`,InvalidPolicyReference:`PLAY0123`,InvalidConstraintDeclaration:`PLAY0132`,ConstraintWithoutRule:`PLAY0133`,InvalidConstraintBody:`PLAY0134`,DuplicateConstraintBody:`PLAY0135`,InvalidReactionDeclaration:`PLAY0136`,InvalidReactionTrigger:`PLAY0137`,ReactionWithoutTrigger:`PLAY0138`,InvalidValidateDeclaration:`PLAY0140`,InvalidValidationRule:`PLAY0141`,InvalidRuleName:`PLAY0143`,UnknownRuleImplementationDirective:`PLAY0144`,InvalidDescription:`PLAY0145`,EmptyDescription:`PLAY0146`,DuplicateDescription:`PLAY0147`,TagWithoutValue:`PLAY0148`,InvalidTagValue:`PLAY0149`,UnknownContextPath:`PLAY0153`,UnknownContextCausedByProperty:`PLAY0154`,UnknownContextIdentityProperty:`PLAY0155`,ExpectedCodeFence:`PLAY0163`,UnclosedCodeBlock:`PLAY0164`,DuplicateDeclaration:`PLAY0168`,RepeatedSingularDeclarationAcrossFiles:`PLAY0172`,RepeatedDeclarationAcrossFiles:`PLAY0173`,ConflictingDescriptionAcrossFiles:`PLAY0174`,UnexpectedTokenInAuthorize:`PLAY0184`,UnclosedAuthorizeGroup:`PLAY0185`,InvalidReadModelDeclaration:`PLAY0186`,InvalidInvokesDeclaration:`PLAY0194`,InvalidScopeDeclaration:`PLAY0199`,DuplicateScope:`PLAY0200`,InvalidIntervalTrigger:`PLAY0249`,InvalidScheduleTrigger:`PLAY0250`,DuplicateReactionTrigger:`PLAY0253`,InvalidSpecificationEventSource:`PLAY0275`,DuplicateSpecificationEventSource:`PLAY0276`,InvalidProjectionVariantDeclaration:`PLAY0277`,InvalidEntersOnDeclaration:`PLAY0279`,NestedProjectionVariantNotAllowed:`PLAY0280`,InvalidStructuredValue:`PLAY0291`,DuplicateStructuredValueMember:`PLAY0294`,ConflictingSpecificationActions:`PLAY0358`,InvalidSpecificationEventOrder:`PLAY0359`,InvalidValidationSeverity:`PLAY0368`,VariantRequiresEnteringEvent:`PLAY0382`,DuplicateProjectionVariant:`PLAY0384`,DuplicateVariantEnteringEvent:`PLAY0385`,InvalidSpecificationDenied:`PLAY0388`,DuplicateAuthorizationAcrossFiles:`PLAY0394`,FileConstraintOnlySupportsUniqueness:`PLAY0396`,LegacyInlineCodeFence:`PLAY0397`,InvalidEventGeneration:`PLAY0446`,InvalidFileImport:`PLAY0454`,FileImportMatchesNothing:`PLAY0455`,ImportedFileNotFound:`PLAY0456`,ConflictingImportPlacement:`PLAY0457`,ImportCycle:`PLAY0458`,ModuleInPlacedFile:`PLAY0459`,UnexpectedInPlacedFile:`PLAY0460`,InvalidSpecificationClock:`PLAY0461`,InvalidSpecificationTrigger:`PLAY0462`,InvalidSpecificationCapture:`PLAY0463`,InvalidSpecificationQueryAction:`PLAY0464`,MismatchedSpecificationQueryResult:`PLAY0465`,UnknownSpecificationQueryArgument:`PLAY0468`,InvalidSpecificationQuery:`PLAY0265`,UnknownSpecificationQueryDirective:`PLAY0266`,DuplicateSpecificationQueryArguments:`PLAY0267`,InvalidAbsentReadModelStep:`PLAY0453`,LegacyOptionalSuffix:`PLAY0479`,InvalidOptionalModifierOrder:`PLAY0480`,OptionalReadsNotSupported:`PLAY0481`,InvalidSpecificationCaller:`PLAY0386`,DuplicateSpecificationCallerOrDenied:`PLAY0387`,GeneratedPropertyOutsideCommand:`PLAY0482`,InvalidGeneratedType:`PLAY0483`,InvalidGeneratedModifierOrder:`PLAY0484`,DuplicateEventSubject:`PLAY0590`,InvalidSubjectType:`PLAY0591`,ProtectedSubjectType:`PLAY0592`,InvalidSubjectOwner:`PLAY0593`,ReadModelSubjectNotSupported:`PLAY0594`,InvalidSubjectModifierOrder:`PLAY0595`,GeneratedPropertySuppliedAsInput:`PLAY0485`,InvalidCommandResponse:`PLAY0486`,InvalidResponseSource:`PLAY0487`,DuplicateResponseField:`PLAY0488`,InvalidResponseShape:`PLAY0489`,InvalidGeneratedFixture:`PLAY0490`,InvalidReturnExpectation:`PLAY0491`,InvalidImplementationBlock:`PLAY0492`,InvalidImplementationHint:`PLAY0493`,ConflictingImplementationSources:`PLAY0494`,UnknownType:`PLAY0165`,InvalidSystemDeclaration:`PLAY0495`,InvalidOperationDeclaration:`PLAY0496`,InvalidProductionReference:`PLAY0497`,ProductionDeclarationCollision:`PLAY0498`,OperationOutsideCommand:`PLAY0499`,InvalidSystemReference:`PLAY0500`,InvalidOperationMapping:`PLAY0501`,InvalidOperationSpecification:`PLAY0502`,InvalidCaptureDeclaration:`PLAY0078`,UnknownCaptureDirective:`PLAY0079`,InvalidMapEntry:`PLAY0080`,InvalidTranslation:`PLAY0081`,InvalidSplitDeclaration:`PLAY0082`,InvalidSplitTarget:`PLAY0083`,InvalidAppendDeclaration:`PLAY0084`,UnknownAppendDirective:`PLAY0085`,WhenWithoutTrigger:`PLAY0086`,InvalidWhenClause:`PLAY0087`,InvalidWhenTransitionClause:`PLAY0088`,MixedWhenCombinators:`PLAY0089`,WhenCombinatorWithoutProperty:`PLAY0090`,UnknownCaptureBlockDirective:`PLAY0091`,InvalidCompositeKeyPart:`PLAY0072`,TemplateInCompositeKey:`PLAY0073`,EmptyCompositeKey:`PLAY0074`,InvalidProjectionMapping:`PLAY0075`,ExpectedLiteralValue:`PLAY0150`,InvalidExpression:`PLAY0152`,UnterminatedInterpolation:`PLAY0157`,UnterminatedTemplateExpression:`PLAY0156`,ProjectionDocumentWithoutProjection:`PLAY0055`,CaptureDocumentWithoutCapture:`PLAY0077`,SpecificationDocumentWithoutSpecification:`PLAY0093`,InvalidSeedDeclaration:`PLAY0128`,InvalidSeedGroup:`PLAY0129`,InvalidSeedEvent:`PLAY0130`,InvalidSeedPropertyAssignment:`PLAY0131`,InvalidPolicyDeclaration:`PLAY0112`,UnknownPolicyDirective:`PLAY0113`,PolicyWithoutRequirement:`PLAY0114`,ExpectedRoleName:`PLAY0118`,ExpectedClaimName:`PLAY0119`,ExpectedClaimMatches:`PLAY0120`,ExpectedClaimMatchTarget:`PLAY0121`,MixedPolicyImplementation:`PLAY0440`,RepeatedPolicyRequirement:`PLAY0441`,UnexpectedTokenInPolicyCondition:`PLAY0115`,ExpectedPolicyCondition:`PLAY0116`,UnclosedPolicyConditionGroup:`PLAY0117`,UnexpectedTokenInCondition:`PLAY0158`,ExpectedCondition:`PLAY0159`,ExpectedComparisonOperator:`PLAY0161`,ExpectedComparisonValue:`PLAY0162`,InvalidActionAlternative:`PLAY0341`,GuardedActionWithoutAlternatives:`PLAY0342`,MisplacedActionOtherwise:`PLAY0343`,UnsupportedActionConditionOperand:`PLAY0344`,InvalidInteractionArgument:`PLAY0319`,UnclosedConditionGroup:`PLAY0160`,InvalidNumericDirective:`PLAY0508`,DuplicateNumericDirective:`PLAY0509`,LateNumericDirective:`PLAY0510`,InexactNumericLiteral:`PLAY0511`,MixedNumericModes:`PLAY0512`,IncompatibleNumericSource:`PLAY0513`,EventFromLaterSlice:`PLAY0516`,TimelineCycleGroup:`PLAY0517`,InvalidSpecificationExample:`PLAY0518`,DuplicateSpecificationAssignment:`PLAY0519`,UnresolvedSpecificationExampleType:`PLAY0520`,SpecificationExampleNameCollision:`PLAY0521`,SpecificationExampleKindMismatch:`PLAY0522`,InvalidSpecificationExampleValue:`PLAY0523`,MissingSpecificationProperty:`PLAY0524`,UnadmittedSpecificationExampleValue:`PLAY0525`,InvalidSpecificationExampleBody:`PLAY0526`,AmbiguousReference:`PLAY0198`,InvalidSpecificationStream:`PLAY0547`,SpecificationStreamOnCommand:`PLAY0548`,InvalidSpecificationStreamRoute:`PLAY0549`,InvalidSpecificationStreamEventSource:`PLAY0550`,SpecificationStreamContradictsCommand:`PLAY0551`,InvalidDependencyTarget:`PLAY0554`,RepeatedDependencyDeclaration:`PLAY0555`,UndeclaredDependency:`PLAY0552`,UnusedDependencyDeclaration:`PLAY0553`,MutualDependencyDeclarations:`PLAY0556`,AuthorizationRefusalWithoutIdentity:`PLAY0557`,InvalidDocumentation:`PLAY0558`,ConflictingDocumentationAcrossFiles:`PLAY0559`,InvalidSpecificationCallerPersona:`PLAY0572`,UnsynthesizablePersonaCaller:`PLAY0573`,PersonaWithoutGate:`PLAY0574`,GateWithoutPersona:`PLAY0575`,AmbiguousPersonaCaller:`PLAY0576`,InvalidSpecificationParameter:`PLAY0577`,InvalidSpecificationCase:`PLAY0578`,DuplicateSpecificationParameter:`PLAY0579`,DuplicateSpecificationCase:`PLAY0580`,IncompleteSpecificationTable:`PLAY0581`,InvalidSpecificationCaseAssignment:`PLAY0582`,InvalidSpecificationCaseValue:`PLAY0583`,InvalidSpecificationCaseReference:`PLAY0584`,OptionalSpecificationParameterTarget:`PLAY0585`,SpecificationCaseNameCollision:`PLAY0586`,IncompatibleSpecificationParameterType:`PLAY0587`,UnusedSpecificationParameter:`PLAY0588`,SingularSpecificationTableExpansion:`PLAY0589`,UnsupportedInteractionAlternatives:`PLAY0560`,MixedInteractionAlternatives:`PLAY0561`,InteractionAlternativeWithoutActions:`PLAY0562`,InlineInteractionAlternative:`PLAY0563`,LegacyInteractionWhere:`PLAY0564`,InvalidEventSourceDeclaration:`PLAY0503`,InvalidCommandStream:`PLAY0504`,AmbiguousCommandStream:`PLAY0505`,UnsupportedStreamIdType:`PLAY0506`,RedundantSourceStreamId:`PLAY0507`,UnknownEvent:`PLAY0166`,UnknownReadModelProperty:`PLAY0514`,PiiNotSupportedOnIdentifier:`PLAY0515`,HandlerWithoutImplementation:`PLAY0045`,UnknownHandlerDirective:`PLAY0046`,CommandWithProducesAndHandler:`PLAY0035`,AbsoluteFileReference:`PLAY0264`,InvalidTriggerData:`PLAY0246`,InvalidReadModelKey:`PLAY0660`,IncompleteReadModelKey:`PLAY0661`,InvalidReadModelKeyLookup:`PLAY0662`,ProductionRouteOutsideCommand:`PLAY0663`,RedundantProductionRoute:`PLAY0664`,InvalidObserverFilter:`PLAY0665`,ObserverFilterExcludesEveryProducer:`PLAY0666`,ReducerIdentityMismatch:`PLAY0690`,InvalidReactionBatchesDeclaration:`PLAY0693`,GenerationSupportBudgetExceeded:`PLAY0691`,EmptyGenerationSupport:`PLAY0692`,MixedEnumerationNumbering:`PLAY0667`,DuplicateEnumerationNumber:`PLAY0668`,EnumerationNumberOutsideInt32:`PLAY0669`,MalformedEnumerationNumber:`PLAY0670`,UnpinnedStoredEnumeration:`PLAY0671`,ReadsWithChildren:`PLAY0451`,UnknownGenerationStrategy:`PLAY0672`,InvalidGenerationArgument:`PLAY0673`,InvalidGenerationModifier:`PLAY0674`,DuplicateGenerationModifier:`PLAY0675`,DuplicateGeneration:`PLAY0676`,InvalidGenerationPrimitive:`PLAY0677`,InvalidGenerationPrefix:`PLAY0678`,InvalidGenerationAlphabet:`PLAY0679`,InvalidTypeIdPrefix:`PLAY0680`,GenerationSizeOutsideRange:`PLAY0681`,ReservedSequenceGeneration:`PLAY0682`,LowGenerationEntropy:`PLAY0683`,LowGeneratedIdentifierEntropy:`PLAY0684`,ResponseNameUsedOnFailure:`PLAY0685`,EventIdPinNotCarriedToRenderers:`PLAY0686`,InvalidToolbarButton:`PLAY0760`};export{e as DiagnosticCodes};
1
+ const e={UnknownMatchPattern:`PLAY0366`,InvalidMatchPattern:`PLAY0367`,PatternOutsidePortableMatchDialect:`PLAY0699`,DeprecatedStudioTextRulePattern:`PLAY0787`,InvalidIdentityDeclaration:`PLAY0633`,DuplicateIdentity:`PLAY0634`,InvalidIdentityDetail:`PLAY0635`,UnknownIdentitySource:`PLAY0636`,IdentityDetailWithoutSource:`PLAY0637`,IdentitySourceWithBody:`PLAY0638`,DuplicateIdentityDetail:`PLAY0639`,BuiltInIdentityDetail:`PLAY0640`,UnknownIdentityQuery:`PLAY0641`,InvalidIdentityQuery:`PLAY0642`,IdentityQueryWithoutKey:`PLAY0643`,InvalidIdentityQueryKey:`PLAY0644`,IdentityQueryAuthorizationDependency:`PLAY0645`,IdentityQueryTypeMismatch:`PLAY0646`,InvalidReactionIdentity:`PLAY0647`,GatedInvocationWithoutIdentity:`PLAY0648`,UnusedReactionIdentity:`PLAY0649`,UnusedReactionRole:`PLAY0650`,UnsatisfiedReactionIdentity:`PLAY0651`,ReactionPrivilegeEscalation:`PLAY0652`,CommandProducesPublicEvent:`PLAY0607`,PublicEventRequiresOutboundTranslation:`PLAY0608`,OutboundPublicEventCount:`PLAY0609`,ForeignPublicEventConsumer:`PLAY0610`,OutboundTranslationInput:`PLAY0611`,InboundTranslationOutput:`PLAY0612`,ForeignPublicEventProduced:`PLAY0613`,PublicTranslationRequiresDirection:`PLAY0614`,TranslationConstructDirection:`PLAY0615`,InboundTranslationInput:`PLAY0616`,OutboundTranslationOutput:`PLAY0617`,EventTargetOutsideOutboundTranslation:`PLAY0618`,EventsSourceOutsideInboundTranslation:`PLAY0619`,InvalidCaptureEventsSource:`PLAY0620`,CaptureEventsFromSeveralOrigins:`PLAY0687`,DirectionlessTranslationReactsToOwnCapture:`PLAY0694`,PendingIntentWithOtherHandler:`PLAY0698`,DescribedCommandNotImplemented:`PLAY0695`,DescribedCommandWithoutProductions:`PLAY0696`,DescribedCommandCardinalityNotAdmitted:`PLAY0697`,CaptureEventsKeyNotRequired:`PLAY0700`,CaptureEventsRecordFixture:`PLAY0701`,RefutedGeneratedConceptRule:`PLAY0688`,UnprovenGeneratedConceptRule:`PLAY0689`,InvalidExposureDeclaration:`PLAY0621`,UnknownExposureOwner:`PLAY0622`,ReExposureCycle:`PLAY0623`,ReExposureBroken:`PLAY0624`,InvalidInstanceContribution:`PLAY0625`,UnknownContributionInstance:`PLAY0626`,ContributionNotExposed:`PLAY0627`,ContributionTypeMismatch:`PLAY0628`,UnknownTemplateContentSlot:`PLAY0629`,UnknownNavigationOutlet:`PLAY0630`,TemplateScopeMismatch:`PLAY0631`,IncompatibleComponentPackage:`PLAY0632`,UnknownNavigationDestination:`PLAY0654`,UnknownScreenContributionPoint:`PLAY0655`,TemplateNestingCycle:`PLAY0656`,TemplateCategoryMissing:`PLAY0720`,InvalidTemplateVersionRange:`PLAY0721`,UnknownTemplateBlueprint:`PLAY0722`,DuplicateComplianceMarker:`PLAY0653`,LegacyComplianceMarker:`PLAY0565`,UnknownComplianceMarker:`PLAY0566`,InvalidSecretScope:`PLAY0567`,DuplicateSecretScope:`PLAY0568`,SecretScopeIgnoredForPii:`PLAY0569`,InvalidPersonalDataQualifier:`PLAY0570`,DuplicateSpecialCategory:`PLAY0571`,InvalidPurposeDeclaration:`PLAY0596`,InvalidPurposeVocabulary:`PLAY0597`,DuplicatePurposeField:`PLAY0598`,DuplicatePurposeDeclaration:`PLAY0599`,UnknownPurpose:`PLAY0600`,PurposeInterestMismatch:`PLAY0601`,PersonalDataWithoutPurpose:`PLAY0602`,SpecialDataWithoutCondition:`PLAY0603`,CriminalDataWithoutAuthorization:`PLAY0604`,PurposeWithoutBasis:`PLAY0605`,UnusedPurpose:`PLAY0606`,ConflictingScreenDataBinding:`PLAY0530`,ScreenDataQueryMismatch:`PLAY0531`,ActionWithoutInputSurface:`PLAY0532`,CommandWithoutInputSurface:`PLAY0533`,ReadModelFieldWithoutOrigin:`PLAY0534`,QueryParameterNotHeldByView:`PLAY0535`,UnconsumedEvent:`PLAY0536`,UnreachableScreen:`PLAY0537`,UnknownActionSubjectField:`PLAY0345`,UnresolvedActionSubject:`PLAY0346`,UnreachableActionAlternative:`PLAY0347`,UnknownActionArgumentProperty:`PLAY0348`,UnreachableRefusalBranch:`PLAY0540`,InvalidRefusalValue:`PLAY0541`,UnknownRefusalConstraint:`PLAY0542`,UnknownRedeliveryReaction:`PLAY0544`,IndeterminateNegatedClaimTarget:`PLAY0546`,InvalidRefusalBranch:`PLAY0538`,InvalidRefusalBranchBody:`PLAY0539`,UnmatchedRedeliveredOccurrence:`PLAY0543`,InvalidNoEventsExpectation:`PLAY0545`,InvalidProducesDeclaration:`PLAY0042`,ProducesWhenWithoutEvent:`PLAY0043`,InvalidPropertyMapping:`PLAY0044`,DuplicateProducesTarget:`PLAY0193`,EventSourceIdInPayload:`PLAY0469`,ExplicitProducesTargetsRequired:`PLAY0470`,RedundantEventId:`PLAY0471`,InvalidEventId:`PLAY0472`,InlineEventCollision:`PLAY0473`,InlineEventOutsideCommand:`PLAY0474`,InlineEventGeneration:`PLAY0475`,ReservedProductionMetadata:`PLAY0476`,InvalidEventDocumentation:`PLAY0477`,OmittedProductionDestination:`PLAY0478`,UnknownConstraintProperty:`PLAY0391`,UnknownTopLevelConstruct:`PLAY0001`,InvalidDomainDeclaration:`PLAY0002`,DuplicateDomain:`PLAY0003`,DomainNotFirst:`PLAY0004`,InvalidImportDeclaration:`PLAY0005`,TabIndentation:`PLAY0006`,InvalidConceptDeclaration:`PLAY0007`,UnknownPrimitiveType:`PLAY0008`,InvalidEnumerationValue:`PLAY0009`,UnknownConceptDirective:`PLAY0010`,ValidateReadAsEnumerationBlock:`PLAY0011`,AttributeReasonWithoutAttribute:`PLAY0012`,DuplicateAttributeReason:`PLAY0013`,InvalidTypeDeclaration:`PLAY0014`,TypeWithoutProperties:`PLAY0015`,InvalidPropertyDeclaration:`PLAY0016`,IdentifierOutsideCommand:`PLAY0017`,InvalidEventDeclaration:`PLAY0018`,IdentifierOnEventProperty:`PLAY0019`,TagPropertyReadAsTag:`PLAY0020`,InvalidModuleDeclaration:`PLAY0021`,UnknownModuleDirective:`PLAY0022`,InvalidFeatureDeclaration:`PLAY0023`,UnknownFeatureDirective:`PLAY0024`,InvalidSliceDeclaration:`PLAY0027`,UnknownSliceType:`PLAY0028`,UnknownSliceDirective:`PLAY0029`,InvalidPersonaDeclaration:`PLAY0030`,InvalidPersonaPolicyReference:`PLAY0031`,UnknownPersonaDirective:`PLAY0032`,InvalidCommandDeclaration:`PLAY0033`,UnknownCommandDirective:`PLAY0034`,DuplicateCommandIdentifier:`PLAY0036`,InvalidQueryDeclaration:`PLAY0047`,UnknownQueryDirective:`PLAY0048`,InvalidQueryParameter:`PLAY0049`,InvalidProjectionDeclaration:`PLAY0056`,EmptyProjection:`PLAY0057`,UnknownProjectionDirective:`PLAY0058`,FromWithoutEvent:`PLAY0061`,InvalidEventReference:`PLAY0062`,InvalidJoinDeclaration:`PLAY0063`,JoinWithoutEvent:`PLAY0064`,InvalidChildrenDeclaration:`PLAY0065`,InvalidNestedDeclaration:`PLAY0066`,NestedBlockWithoutFrom:`PLAY0067`,InvalidRemoveDeclaration:`PLAY0068`,UnknownRemoveDirective:`PLAY0069`,InvalidClearDeclaration:`PLAY0070`,ClearWithOutsideNestedBlock:`PLAY0071`,InvalidSpecificationDeclaration:`PLAY0094`,UnknownSpecificationDirective:`PLAY0095`,InvalidSpecificationWhen:`PLAY0096`,DuplicateSpecificationWhen:`PLAY0097`,InvalidThenError:`PLAY0098`,InvalidReadModelStep:`PLAY0099`,InvalidEventStep:`PLAY0100`,InvalidSpecificationValue:`PLAY0101`,InvalidScreenDeclaration:`PLAY0102`,UnknownScreenDirective:`PLAY0103`,InvalidDataDirective:`PLAY0104`,InvalidActionDirective:`PLAY0105`,UnknownActionDirective:`PLAY0106`,InvalidNavigation:`PLAY0107`,InvalidScreenLayoutSlot:`PLAY0108`,UnknownLayoutDirective:`PLAY0026`,InvalidTitleDirective:`PLAY0109`,UnknownTableDirective:`PLAY0110`,UnknownSummaryDirective:`PLAY0111`,AuthorizeWithoutPolicy:`PLAY0122`,InvalidPolicyReference:`PLAY0123`,InvalidConstraintDeclaration:`PLAY0132`,ConstraintWithoutRule:`PLAY0133`,InvalidConstraintBody:`PLAY0134`,DuplicateConstraintBody:`PLAY0135`,InvalidReactionDeclaration:`PLAY0136`,InvalidReactionTrigger:`PLAY0137`,ReactionWithoutTrigger:`PLAY0138`,InvalidValidateDeclaration:`PLAY0140`,InvalidValidationRule:`PLAY0141`,InvalidRuleName:`PLAY0143`,UnknownRuleImplementationDirective:`PLAY0144`,InvalidDescription:`PLAY0145`,EmptyDescription:`PLAY0146`,DuplicateDescription:`PLAY0147`,TagWithoutValue:`PLAY0148`,InvalidTagValue:`PLAY0149`,UnknownContextPath:`PLAY0153`,UnknownContextCausedByProperty:`PLAY0154`,UnknownContextIdentityProperty:`PLAY0155`,ExpectedCodeFence:`PLAY0163`,UnclosedCodeBlock:`PLAY0164`,DuplicateDeclaration:`PLAY0168`,RepeatedSingularDeclarationAcrossFiles:`PLAY0172`,RepeatedDeclarationAcrossFiles:`PLAY0173`,ConflictingDescriptionAcrossFiles:`PLAY0174`,UnexpectedTokenInAuthorize:`PLAY0184`,UnclosedAuthorizeGroup:`PLAY0185`,InvalidReadModelDeclaration:`PLAY0186`,InvalidInvokesDeclaration:`PLAY0194`,InvalidScopeDeclaration:`PLAY0199`,DuplicateScope:`PLAY0200`,InvalidIntervalTrigger:`PLAY0249`,InvalidScheduleTrigger:`PLAY0250`,DuplicateReactionTrigger:`PLAY0253`,InvalidSpecificationEventSource:`PLAY0275`,DuplicateSpecificationEventSource:`PLAY0276`,InvalidProjectionVariantDeclaration:`PLAY0277`,InvalidEntersOnDeclaration:`PLAY0279`,NestedProjectionVariantNotAllowed:`PLAY0280`,InvalidStructuredValue:`PLAY0291`,DuplicateStructuredValueMember:`PLAY0294`,ConflictingSpecificationActions:`PLAY0358`,InvalidSpecificationEventOrder:`PLAY0359`,InvalidValidationSeverity:`PLAY0368`,VariantRequiresEnteringEvent:`PLAY0382`,DuplicateProjectionVariant:`PLAY0384`,DuplicateVariantEnteringEvent:`PLAY0385`,InvalidSpecificationDenied:`PLAY0388`,DuplicateAuthorizationAcrossFiles:`PLAY0394`,FileConstraintOnlySupportsUniqueness:`PLAY0396`,LegacyInlineCodeFence:`PLAY0397`,InvalidEventGeneration:`PLAY0446`,InvalidFileImport:`PLAY0454`,FileImportMatchesNothing:`PLAY0455`,ImportedFileNotFound:`PLAY0456`,ConflictingImportPlacement:`PLAY0457`,ImportCycle:`PLAY0458`,ModuleInPlacedFile:`PLAY0459`,UnexpectedInPlacedFile:`PLAY0460`,InvalidSpecificationClock:`PLAY0461`,InvalidSpecificationTrigger:`PLAY0462`,InvalidSpecificationCapture:`PLAY0463`,InvalidSpecificationQueryAction:`PLAY0464`,MismatchedSpecificationQueryResult:`PLAY0465`,UnknownSpecificationQueryArgument:`PLAY0468`,InvalidSpecificationQuery:`PLAY0265`,UnknownSpecificationQueryDirective:`PLAY0266`,DuplicateSpecificationQueryArguments:`PLAY0267`,InvalidAbsentReadModelStep:`PLAY0453`,LegacyOptionalSuffix:`PLAY0479`,InvalidOptionalModifierOrder:`PLAY0480`,OptionalReadsNotSupported:`PLAY0481`,InvalidSpecificationCaller:`PLAY0386`,DuplicateSpecificationCallerOrDenied:`PLAY0387`,GeneratedPropertyOutsideCommand:`PLAY0482`,InvalidGeneratedType:`PLAY0483`,InvalidGeneratedModifierOrder:`PLAY0484`,DuplicateEventSubject:`PLAY0590`,InvalidSubjectType:`PLAY0591`,ProtectedSubjectType:`PLAY0592`,InvalidSubjectOwner:`PLAY0593`,ReadModelSubjectNotSupported:`PLAY0594`,InvalidSubjectModifierOrder:`PLAY0595`,GeneratedPropertySuppliedAsInput:`PLAY0485`,InvalidCommandResponse:`PLAY0486`,InvalidResponseSource:`PLAY0487`,DuplicateResponseField:`PLAY0488`,InvalidResponseShape:`PLAY0489`,InvalidGeneratedFixture:`PLAY0490`,InvalidReturnExpectation:`PLAY0491`,InvalidImplementationBlock:`PLAY0492`,InvalidImplementationHint:`PLAY0493`,ConflictingImplementationSources:`PLAY0494`,UnknownType:`PLAY0165`,InvalidSystemDeclaration:`PLAY0495`,InvalidOperationDeclaration:`PLAY0496`,InvalidProductionReference:`PLAY0497`,ProductionDeclarationCollision:`PLAY0498`,OperationOutsideCommand:`PLAY0499`,InvalidSystemReference:`PLAY0500`,InvalidOperationMapping:`PLAY0501`,InvalidOperationSpecification:`PLAY0502`,InvalidCaptureDeclaration:`PLAY0078`,UnknownCaptureDirective:`PLAY0079`,InvalidMapEntry:`PLAY0080`,InvalidTranslation:`PLAY0081`,InvalidSplitDeclaration:`PLAY0082`,InvalidSplitTarget:`PLAY0083`,InvalidAppendDeclaration:`PLAY0084`,UnknownAppendDirective:`PLAY0085`,WhenWithoutTrigger:`PLAY0086`,InvalidWhenClause:`PLAY0087`,InvalidWhenTransitionClause:`PLAY0088`,MixedWhenCombinators:`PLAY0089`,WhenCombinatorWithoutProperty:`PLAY0090`,UnknownCaptureBlockDirective:`PLAY0091`,InvalidCompositeKeyPart:`PLAY0072`,TemplateInCompositeKey:`PLAY0073`,EmptyCompositeKey:`PLAY0074`,InvalidProjectionMapping:`PLAY0075`,ExpectedLiteralValue:`PLAY0150`,InvalidExpression:`PLAY0152`,UnterminatedInterpolation:`PLAY0157`,UnterminatedTemplateExpression:`PLAY0156`,ProjectionDocumentWithoutProjection:`PLAY0055`,CaptureDocumentWithoutCapture:`PLAY0077`,SpecificationDocumentWithoutSpecification:`PLAY0093`,InvalidSeedDeclaration:`PLAY0128`,InvalidSeedGroup:`PLAY0129`,InvalidSeedEvent:`PLAY0130`,InvalidSeedPropertyAssignment:`PLAY0131`,InvalidPolicyDeclaration:`PLAY0112`,UnknownPolicyDirective:`PLAY0113`,PolicyWithoutRequirement:`PLAY0114`,ExpectedRoleName:`PLAY0118`,ExpectedClaimName:`PLAY0119`,ExpectedClaimMatches:`PLAY0120`,ExpectedClaimMatchTarget:`PLAY0121`,MixedPolicyImplementation:`PLAY0440`,RepeatedPolicyRequirement:`PLAY0441`,UnexpectedTokenInPolicyCondition:`PLAY0115`,ExpectedPolicyCondition:`PLAY0116`,UnclosedPolicyConditionGroup:`PLAY0117`,UnexpectedTokenInCondition:`PLAY0158`,ExpectedCondition:`PLAY0159`,ExpectedComparisonOperator:`PLAY0161`,ExpectedComparisonValue:`PLAY0162`,InvalidActionAlternative:`PLAY0341`,GuardedActionWithoutAlternatives:`PLAY0342`,MisplacedActionOtherwise:`PLAY0343`,UnsupportedActionConditionOperand:`PLAY0344`,InvalidInteractionArgument:`PLAY0319`,UnclosedConditionGroup:`PLAY0160`,InvalidNumericDirective:`PLAY0508`,DuplicateNumericDirective:`PLAY0509`,LateNumericDirective:`PLAY0510`,InexactNumericLiteral:`PLAY0511`,MixedNumericModes:`PLAY0512`,IncompatibleNumericSource:`PLAY0513`,EventFromLaterSlice:`PLAY0516`,TimelineCycleGroup:`PLAY0517`,InvalidSpecificationExample:`PLAY0518`,DuplicateSpecificationAssignment:`PLAY0519`,UnresolvedSpecificationExampleType:`PLAY0520`,SpecificationExampleNameCollision:`PLAY0521`,SpecificationExampleKindMismatch:`PLAY0522`,InvalidSpecificationExampleValue:`PLAY0523`,MissingSpecificationProperty:`PLAY0524`,UnadmittedSpecificationExampleValue:`PLAY0525`,InvalidSpecificationExampleBody:`PLAY0526`,AmbiguousReference:`PLAY0198`,InvalidSpecificationStream:`PLAY0547`,SpecificationStreamOnCommand:`PLAY0548`,InvalidSpecificationStreamRoute:`PLAY0549`,InvalidSpecificationStreamEventSource:`PLAY0550`,SpecificationStreamContradictsCommand:`PLAY0551`,InvalidDependencyTarget:`PLAY0554`,RepeatedDependencyDeclaration:`PLAY0555`,UndeclaredDependency:`PLAY0552`,UnusedDependencyDeclaration:`PLAY0553`,MutualDependencyDeclarations:`PLAY0556`,AuthorizationRefusalWithoutIdentity:`PLAY0557`,InvalidDocumentation:`PLAY0558`,ConflictingDocumentationAcrossFiles:`PLAY0559`,InvalidSpecificationCallerPersona:`PLAY0572`,UnsynthesizablePersonaCaller:`PLAY0573`,PersonaWithoutGate:`PLAY0574`,GateWithoutPersona:`PLAY0575`,AmbiguousPersonaCaller:`PLAY0576`,InvalidSpecificationParameter:`PLAY0577`,InvalidSpecificationCase:`PLAY0578`,DuplicateSpecificationParameter:`PLAY0579`,DuplicateSpecificationCase:`PLAY0580`,IncompleteSpecificationTable:`PLAY0581`,InvalidSpecificationCaseAssignment:`PLAY0582`,InvalidSpecificationCaseValue:`PLAY0583`,InvalidSpecificationCaseReference:`PLAY0584`,OptionalSpecificationParameterTarget:`PLAY0585`,SpecificationCaseNameCollision:`PLAY0586`,IncompatibleSpecificationParameterType:`PLAY0587`,UnusedSpecificationParameter:`PLAY0588`,SingularSpecificationTableExpansion:`PLAY0589`,UnsupportedInteractionAlternatives:`PLAY0560`,MixedInteractionAlternatives:`PLAY0561`,InteractionAlternativeWithoutActions:`PLAY0562`,InlineInteractionAlternative:`PLAY0563`,LegacyInteractionWhere:`PLAY0564`,InvalidEventSourceDeclaration:`PLAY0503`,InvalidCommandStream:`PLAY0504`,AmbiguousCommandStream:`PLAY0505`,UnsupportedStreamIdType:`PLAY0506`,RedundantSourceStreamId:`PLAY0507`,UnknownEvent:`PLAY0166`,UnknownReadModelProperty:`PLAY0514`,PiiNotSupportedOnIdentifier:`PLAY0515`,HandlerWithoutImplementation:`PLAY0045`,UnknownHandlerDirective:`PLAY0046`,CommandWithProducesAndHandler:`PLAY0035`,AbsoluteFileReference:`PLAY0264`,InvalidTriggerData:`PLAY0246`,InvalidReadModelKey:`PLAY0660`,IncompleteReadModelKey:`PLAY0661`,InvalidReadModelKeyLookup:`PLAY0662`,ProductionRouteOutsideCommand:`PLAY0663`,RedundantProductionRoute:`PLAY0664`,InvalidObserverFilter:`PLAY0665`,ObserverFilterExcludesEveryProducer:`PLAY0666`,ReducerIdentityMismatch:`PLAY0690`,InvalidReactionBatchesDeclaration:`PLAY0693`,InvalidCommandReadsDeclaration:`PLAY0780`,GenerationSupportBudgetExceeded:`PLAY0691`,EmptyGenerationSupport:`PLAY0692`,MixedEnumerationNumbering:`PLAY0667`,DuplicateEnumerationNumber:`PLAY0668`,EnumerationNumberOutsideInt32:`PLAY0669`,MalformedEnumerationNumber:`PLAY0670`,UnpinnedStoredEnumeration:`PLAY0671`,ReadsWithChildren:`PLAY0451`,UnknownGenerationStrategy:`PLAY0672`,InvalidGenerationArgument:`PLAY0673`,InvalidGenerationModifier:`PLAY0674`,DuplicateGenerationModifier:`PLAY0675`,DuplicateGeneration:`PLAY0676`,InvalidGenerationPrimitive:`PLAY0677`,InvalidGenerationPrefix:`PLAY0678`,InvalidGenerationAlphabet:`PLAY0679`,InvalidTypeIdPrefix:`PLAY0680`,GenerationSizeOutsideRange:`PLAY0681`,ReservedSequenceGeneration:`PLAY0682`,LowGenerationEntropy:`PLAY0683`,LowGeneratedIdentifierEntropy:`PLAY0684`,ResponseNameUsedOnFailure:`PLAY0685`,EventIdPinNotCarriedToRenderers:`PLAY0686`,InvalidToolbarButton:`PLAY0760`};export{e as DiagnosticCodes};
2
2
  //# sourceMappingURL=DiagnosticCodes.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"DiagnosticCodes.js","names":["DiagnosticCodes"],"sources":["../../../../../../Compiler/Diagnostics/DiagnosticCodes.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\n// Shared diagnostic names, including the explicitly C#-only checks below. Catalogue membership does\n// not imply TypeScript validation support; see Documentation/screenplay/editor-diagnostics.md.\nexport const DiagnosticCodes = {\n UnknownMatchPattern: 'PLAY0366',\n InvalidMatchPattern: 'PLAY0367',\n PatternOutsidePortableMatchDialect: 'PLAY0699',\n DeprecatedStudioTextRulePattern: 'PLAY0787',\n InvalidIdentityDeclaration: 'PLAY0633',\n DuplicateIdentity: 'PLAY0634',\n InvalidIdentityDetail: 'PLAY0635',\n UnknownIdentitySource: 'PLAY0636',\n IdentityDetailWithoutSource: 'PLAY0637',\n IdentitySourceWithBody: 'PLAY0638',\n DuplicateIdentityDetail: 'PLAY0639',\n BuiltInIdentityDetail: 'PLAY0640',\n UnknownIdentityQuery: 'PLAY0641',\n InvalidIdentityQuery: 'PLAY0642',\n IdentityQueryWithoutKey: 'PLAY0643',\n InvalidIdentityQueryKey: 'PLAY0644',\n IdentityQueryAuthorizationDependency: 'PLAY0645',\n IdentityQueryTypeMismatch: 'PLAY0646',\n InvalidReactionIdentity: 'PLAY0647',\n GatedInvocationWithoutIdentity: 'PLAY0648',\n UnusedReactionIdentity: 'PLAY0649',\n UnusedReactionRole: 'PLAY0650',\n UnsatisfiedReactionIdentity: 'PLAY0651',\n ReactionPrivilegeEscalation: 'PLAY0652',\n // C#-only whole-model public event boundaries; membership is not TypeScript validation support.\n CommandProducesPublicEvent: 'PLAY0607',\n PublicEventRequiresOutboundTranslation: 'PLAY0608',\n OutboundPublicEventCount: 'PLAY0609',\n ForeignPublicEventConsumer: 'PLAY0610',\n OutboundTranslationInput: 'PLAY0611',\n InboundTranslationOutput: 'PLAY0612',\n ForeignPublicEventProduced: 'PLAY0613',\n PublicTranslationRequiresDirection: 'PLAY0614',\n TranslationConstructDirection: 'PLAY0615',\n InboundTranslationInput: 'PLAY0616',\n OutboundTranslationOutput: 'PLAY0617',\n EventTargetOutsideOutboundTranslation: 'PLAY0618',\n EventsSourceOutsideInboundTranslation: 'PLAY0619',\n InvalidCaptureEventsSource: 'PLAY0620',\n CaptureEventsFromSeveralOrigins: 'PLAY0687',\n DirectionlessTranslationReactsToOwnCapture: 'PLAY0694',\n PendingIntentWithOtherHandler: 'PLAY0698',\n DescribedCommandNotImplemented: 'PLAY0695', // C# only\n DescribedCommandWithoutProductions: 'PLAY0696', // C# only\n DescribedCommandCardinalityNotAdmitted: 'PLAY0697', // C# only\n CaptureEventsKeyNotRequired: 'PLAY0700',\n CaptureEventsRecordFixture: 'PLAY0701',\n RefutedGeneratedConceptRule: 'PLAY0688',\n UnprovenGeneratedConceptRule: 'PLAY0689',\n // Syntax shared with C#; the reference checks (owners, instances, cycles, outlets, scopes, packages) are C#-only.\n InvalidExposureDeclaration: 'PLAY0621',\n UnknownExposureOwner: 'PLAY0622',\n ReExposureCycle: 'PLAY0623',\n ReExposureBroken: 'PLAY0624',\n InvalidInstanceContribution: 'PLAY0625',\n UnknownContributionInstance: 'PLAY0626',\n ContributionNotExposed: 'PLAY0627',\n ContributionTypeMismatch: 'PLAY0628',\n UnknownTemplateContentSlot: 'PLAY0629',\n UnknownNavigationOutlet: 'PLAY0630',\n TemplateScopeMismatch: 'PLAY0631',\n IncompatibleComponentPackage: 'PLAY0632',\n UnknownNavigationDestination: 'PLAY0654',\n UnknownScreenContributionPoint: 'PLAY0655',\n TemplateNestingCycle: 'PLAY0656',\n TemplateCategoryMissing: 'PLAY0720', // C# only: template declarations are not modeled by this compiler.\n InvalidTemplateVersionRange: 'PLAY0721',\n UnknownTemplateBlueprint: 'PLAY0722', // C# only: ui profile packages are not modeled by this compiler.\n DuplicateComplianceMarker: 'PLAY0653',\n LegacyComplianceMarker: 'PLAY0565',\n UnknownComplianceMarker: 'PLAY0566',\n InvalidSecretScope: 'PLAY0567',\n DuplicateSecretScope: 'PLAY0568',\n SecretScopeIgnoredForPii: 'PLAY0569',\n InvalidPersonalDataQualifier: 'PLAY0570',\n DuplicateSpecialCategory: 'PLAY0571',\n InvalidPurposeDeclaration: 'PLAY0596',\n InvalidPurposeVocabulary: 'PLAY0597',\n DuplicatePurposeField: 'PLAY0598',\n DuplicatePurposeDeclaration: 'PLAY0599',\n UnknownPurpose: 'PLAY0600',\n PurposeInterestMismatch: 'PLAY0601',\n PersonalDataWithoutPurpose: 'PLAY0602',\n SpecialDataWithoutCondition: 'PLAY0603',\n CriminalDataWithoutAuthorization: 'PLAY0604',\n PurposeWithoutBasis: 'PLAY0605',\n UnusedPurpose: 'PLAY0606',\n // C#-only: opt-in completeness, scoped action/refusal reference validation, and semantic binding.\n ConflictingScreenDataBinding: 'PLAY0530',\n ScreenDataQueryMismatch: 'PLAY0531',\n ActionWithoutInputSurface: 'PLAY0532',\n CommandWithoutInputSurface: 'PLAY0533',\n ReadModelFieldWithoutOrigin: 'PLAY0534',\n QueryParameterNotHeldByView: 'PLAY0535',\n UnconsumedEvent: 'PLAY0536',\n UnreachableScreen: 'PLAY0537',\n UnknownActionSubjectField: 'PLAY0345',\n UnresolvedActionSubject: 'PLAY0346',\n UnreachableActionAlternative: 'PLAY0347',\n UnknownActionArgumentProperty: 'PLAY0348',\n UnreachableRefusalBranch: 'PLAY0540',\n InvalidRefusalValue: 'PLAY0541',\n UnknownRefusalConstraint: 'PLAY0542',\n UnknownRedeliveryReaction: 'PLAY0544',\n IndeterminateNegatedClaimTarget: 'PLAY0546',\n InvalidRefusalBranch: 'PLAY0538',\n InvalidRefusalBranchBody: 'PLAY0539',\n UnmatchedRedeliveredOccurrence: 'PLAY0543',\n InvalidNoEventsExpectation: 'PLAY0545',\n InvalidProducesDeclaration: 'PLAY0042',\n ProducesWhenWithoutEvent: 'PLAY0043',\n InvalidPropertyMapping: 'PLAY0044',\n DuplicateProducesTarget: 'PLAY0193',\n EventSourceIdInPayload: 'PLAY0469',\n ExplicitProducesTargetsRequired: 'PLAY0470',\n RedundantEventId: 'PLAY0471',\n InvalidEventId: 'PLAY0472',\n InlineEventCollision: 'PLAY0473',\n InlineEventOutsideCommand: 'PLAY0474',\n InlineEventGeneration: 'PLAY0475',\n ReservedProductionMetadata: 'PLAY0476',\n InvalidEventDocumentation: 'PLAY0477',\n OmittedProductionDestination: 'PLAY0478',\n UnknownConstraintProperty: 'PLAY0391',\n UnknownTopLevelConstruct: 'PLAY0001',\n InvalidDomainDeclaration: 'PLAY0002',\n DuplicateDomain: 'PLAY0003',\n DomainNotFirst: 'PLAY0004',\n InvalidImportDeclaration: 'PLAY0005',\n TabIndentation: 'PLAY0006',\n InvalidConceptDeclaration: 'PLAY0007',\n UnknownPrimitiveType: 'PLAY0008',\n InvalidEnumerationValue: 'PLAY0009',\n UnknownConceptDirective: 'PLAY0010',\n ValidateReadAsEnumerationBlock: 'PLAY0011',\n AttributeReasonWithoutAttribute: 'PLAY0012',\n DuplicateAttributeReason: 'PLAY0013',\n InvalidTypeDeclaration: 'PLAY0014',\n TypeWithoutProperties: 'PLAY0015',\n InvalidPropertyDeclaration: 'PLAY0016',\n IdentifierOutsideCommand: 'PLAY0017',\n InvalidEventDeclaration: 'PLAY0018',\n IdentifierOnEventProperty: 'PLAY0019',\n TagPropertyReadAsTag: 'PLAY0020',\n InvalidModuleDeclaration: 'PLAY0021',\n UnknownModuleDirective: 'PLAY0022',\n InvalidFeatureDeclaration: 'PLAY0023',\n UnknownFeatureDirective: 'PLAY0024',\n InvalidSliceDeclaration: 'PLAY0027',\n UnknownSliceType: 'PLAY0028',\n UnknownSliceDirective: 'PLAY0029',\n InvalidPersonaDeclaration: 'PLAY0030',\n InvalidPersonaPolicyReference: 'PLAY0031',\n UnknownPersonaDirective: 'PLAY0032',\n InvalidCommandDeclaration: 'PLAY0033',\n UnknownCommandDirective: 'PLAY0034',\n DuplicateCommandIdentifier: 'PLAY0036',\n InvalidQueryDeclaration: 'PLAY0047',\n UnknownQueryDirective: 'PLAY0048',\n InvalidQueryParameter: 'PLAY0049',\n InvalidProjectionDeclaration: 'PLAY0056',\n EmptyProjection: 'PLAY0057',\n UnknownProjectionDirective: 'PLAY0058',\n FromWithoutEvent: 'PLAY0061',\n InvalidEventReference: 'PLAY0062',\n InvalidJoinDeclaration: 'PLAY0063',\n JoinWithoutEvent: 'PLAY0064',\n InvalidChildrenDeclaration: 'PLAY0065',\n InvalidNestedDeclaration: 'PLAY0066',\n NestedBlockWithoutFrom: 'PLAY0067',\n InvalidRemoveDeclaration: 'PLAY0068',\n UnknownRemoveDirective: 'PLAY0069',\n InvalidClearDeclaration: 'PLAY0070',\n ClearWithOutsideNestedBlock: 'PLAY0071',\n InvalidSpecificationDeclaration: 'PLAY0094',\n UnknownSpecificationDirective: 'PLAY0095',\n InvalidSpecificationWhen: 'PLAY0096',\n DuplicateSpecificationWhen: 'PLAY0097',\n InvalidThenError: 'PLAY0098',\n InvalidReadModelStep: 'PLAY0099',\n InvalidEventStep: 'PLAY0100',\n InvalidSpecificationValue: 'PLAY0101',\n InvalidScreenDeclaration: 'PLAY0102',\n UnknownScreenDirective: 'PLAY0103',\n InvalidDataDirective: 'PLAY0104',\n InvalidActionDirective: 'PLAY0105',\n UnknownActionDirective: 'PLAY0106',\n InvalidNavigation: 'PLAY0107',\n InvalidScreenLayoutSlot: 'PLAY0108',\n UnknownLayoutDirective: 'PLAY0026',\n InvalidTitleDirective: 'PLAY0109',\n UnknownTableDirective: 'PLAY0110',\n UnknownSummaryDirective: 'PLAY0111',\n AuthorizeWithoutPolicy: 'PLAY0122',\n InvalidPolicyReference: 'PLAY0123',\n InvalidConstraintDeclaration: 'PLAY0132',\n ConstraintWithoutRule: 'PLAY0133',\n InvalidConstraintBody: 'PLAY0134',\n DuplicateConstraintBody: 'PLAY0135',\n InvalidReactionDeclaration: 'PLAY0136',\n InvalidReactionTrigger: 'PLAY0137',\n ReactionWithoutTrigger: 'PLAY0138',\n InvalidValidateDeclaration: 'PLAY0140',\n InvalidValidationRule: 'PLAY0141',\n InvalidRuleName: 'PLAY0143',\n UnknownRuleImplementationDirective: 'PLAY0144',\n InvalidDescription: 'PLAY0145',\n EmptyDescription: 'PLAY0146',\n DuplicateDescription: 'PLAY0147',\n TagWithoutValue: 'PLAY0148',\n InvalidTagValue: 'PLAY0149',\n UnknownContextPath: 'PLAY0153',\n UnknownContextCausedByProperty: 'PLAY0154',\n UnknownContextIdentityProperty: 'PLAY0155',\n ExpectedCodeFence: 'PLAY0163',\n UnclosedCodeBlock: 'PLAY0164',\n DuplicateDeclaration: 'PLAY0168',\n RepeatedSingularDeclarationAcrossFiles: 'PLAY0172',\n RepeatedDeclarationAcrossFiles: 'PLAY0173',\n ConflictingDescriptionAcrossFiles: 'PLAY0174',\n UnexpectedTokenInAuthorize: 'PLAY0184',\n UnclosedAuthorizeGroup: 'PLAY0185',\n InvalidReadModelDeclaration: 'PLAY0186',\n InvalidInvokesDeclaration: 'PLAY0194',\n InvalidScopeDeclaration: 'PLAY0199',\n DuplicateScope: 'PLAY0200',\n InvalidIntervalTrigger: 'PLAY0249',\n InvalidScheduleTrigger: 'PLAY0250',\n DuplicateReactionTrigger: 'PLAY0253',\n InvalidSpecificationEventSource: 'PLAY0275',\n DuplicateSpecificationEventSource: 'PLAY0276',\n InvalidProjectionVariantDeclaration: 'PLAY0277',\n InvalidEntersOnDeclaration: 'PLAY0279',\n NestedProjectionVariantNotAllowed: 'PLAY0280',\n InvalidStructuredValue: 'PLAY0291',\n DuplicateStructuredValueMember: 'PLAY0294',\n ConflictingSpecificationActions: 'PLAY0358',\n InvalidSpecificationEventOrder: 'PLAY0359',\n InvalidValidationSeverity: 'PLAY0368',\n VariantRequiresEnteringEvent: 'PLAY0382',\n DuplicateProjectionVariant: 'PLAY0384',\n DuplicateVariantEnteringEvent: 'PLAY0385',\n InvalidSpecificationDenied: 'PLAY0388',\n DuplicateAuthorizationAcrossFiles: 'PLAY0394',\n FileConstraintOnlySupportsUniqueness: 'PLAY0396',\n LegacyInlineCodeFence: 'PLAY0397',\n InvalidEventGeneration: 'PLAY0446',\n InvalidFileImport: 'PLAY0454',\n FileImportMatchesNothing: 'PLAY0455',\n ImportedFileNotFound: 'PLAY0456',\n ConflictingImportPlacement: 'PLAY0457',\n ImportCycle: 'PLAY0458',\n ModuleInPlacedFile: 'PLAY0459',\n UnexpectedInPlacedFile: 'PLAY0460',\n InvalidSpecificationClock: 'PLAY0461',\n InvalidSpecificationTrigger: 'PLAY0462',\n InvalidSpecificationCapture: 'PLAY0463',\n InvalidSpecificationQueryAction: 'PLAY0464',\n MismatchedSpecificationQueryResult: 'PLAY0465',\n UnknownSpecificationQueryArgument: 'PLAY0468',\n InvalidSpecificationQuery: 'PLAY0265',\n UnknownSpecificationQueryDirective: 'PLAY0266',\n DuplicateSpecificationQueryArguments: 'PLAY0267',\n InvalidAbsentReadModelStep: 'PLAY0453',\n LegacyOptionalSuffix: 'PLAY0479',\n InvalidOptionalModifierOrder: 'PLAY0480',\n OptionalReadsNotSupported: 'PLAY0481',\n InvalidSpecificationCaller: 'PLAY0386',\n DuplicateSpecificationCallerOrDenied: 'PLAY0387',\n GeneratedPropertyOutsideCommand: 'PLAY0482',\n InvalidGeneratedType: 'PLAY0483',\n InvalidGeneratedModifierOrder: 'PLAY0484',\n DuplicateEventSubject: 'PLAY0590',\n InvalidSubjectType: 'PLAY0591',\n ProtectedSubjectType: 'PLAY0592',\n InvalidSubjectOwner: 'PLAY0593',\n ReadModelSubjectNotSupported: 'PLAY0594',\n InvalidSubjectModifierOrder: 'PLAY0595',\n GeneratedPropertySuppliedAsInput: 'PLAY0485',\n InvalidCommandResponse: 'PLAY0486',\n InvalidResponseSource: 'PLAY0487',\n DuplicateResponseField: 'PLAY0488',\n InvalidResponseShape: 'PLAY0489',\n InvalidGeneratedFixture: 'PLAY0490',\n InvalidReturnExpectation: 'PLAY0491',\n InvalidImplementationBlock: 'PLAY0492',\n InvalidImplementationHint: 'PLAY0493',\n ConflictingImplementationSources: 'PLAY0494',\n UnknownType: 'PLAY0165',\n InvalidSystemDeclaration: 'PLAY0495',\n InvalidOperationDeclaration: 'PLAY0496',\n InvalidProductionReference: 'PLAY0497',\n ProductionDeclarationCollision: 'PLAY0498',\n OperationOutsideCommand: 'PLAY0499',\n InvalidSystemReference: 'PLAY0500',\n InvalidOperationMapping: 'PLAY0501',\n InvalidOperationSpecification: 'PLAY0502',\n InvalidCaptureDeclaration: 'PLAY0078',\n UnknownCaptureDirective: 'PLAY0079',\n InvalidMapEntry: 'PLAY0080',\n InvalidTranslation: 'PLAY0081',\n InvalidSplitDeclaration: 'PLAY0082',\n InvalidSplitTarget: 'PLAY0083',\n InvalidAppendDeclaration: 'PLAY0084',\n UnknownAppendDirective: 'PLAY0085',\n WhenWithoutTrigger: 'PLAY0086',\n InvalidWhenClause: 'PLAY0087',\n InvalidWhenTransitionClause: 'PLAY0088',\n MixedWhenCombinators: 'PLAY0089',\n WhenCombinatorWithoutProperty: 'PLAY0090',\n UnknownCaptureBlockDirective: 'PLAY0091',\n InvalidCompositeKeyPart: 'PLAY0072',\n TemplateInCompositeKey: 'PLAY0073',\n EmptyCompositeKey: 'PLAY0074',\n InvalidProjectionMapping: 'PLAY0075',\n ExpectedLiteralValue: 'PLAY0150',\n InvalidExpression: 'PLAY0152',\n UnterminatedInterpolation: 'PLAY0157',\n UnterminatedTemplateExpression: 'PLAY0156',\n ProjectionDocumentWithoutProjection: 'PLAY0055',\n CaptureDocumentWithoutCapture: 'PLAY0077',\n SpecificationDocumentWithoutSpecification: 'PLAY0093',\n InvalidSeedDeclaration: 'PLAY0128',\n InvalidSeedGroup: 'PLAY0129',\n InvalidSeedEvent: 'PLAY0130',\n InvalidSeedPropertyAssignment: 'PLAY0131',\n InvalidPolicyDeclaration: 'PLAY0112',\n UnknownPolicyDirective: 'PLAY0113',\n PolicyWithoutRequirement: 'PLAY0114',\n ExpectedRoleName: 'PLAY0118',\n ExpectedClaimName: 'PLAY0119',\n ExpectedClaimMatches: 'PLAY0120',\n ExpectedClaimMatchTarget: 'PLAY0121',\n MixedPolicyImplementation: 'PLAY0440',\n RepeatedPolicyRequirement: 'PLAY0441',\n UnexpectedTokenInPolicyCondition: 'PLAY0115',\n ExpectedPolicyCondition: 'PLAY0116',\n UnclosedPolicyConditionGroup: 'PLAY0117',\n UnexpectedTokenInCondition: 'PLAY0158',\n ExpectedCondition: 'PLAY0159',\n ExpectedComparisonOperator: 'PLAY0161',\n ExpectedComparisonValue: 'PLAY0162',\n InvalidActionAlternative: 'PLAY0341',\n GuardedActionWithoutAlternatives: 'PLAY0342',\n MisplacedActionOtherwise: 'PLAY0343',\n UnsupportedActionConditionOperand: 'PLAY0344',\n InvalidInteractionArgument: 'PLAY0319',\n UnclosedConditionGroup: 'PLAY0160',\n InvalidNumericDirective: 'PLAY0508',\n DuplicateNumericDirective: 'PLAY0509',\n LateNumericDirective: 'PLAY0510',\n InexactNumericLiteral: 'PLAY0511',\n MixedNumericModes: 'PLAY0512',\n IncompatibleNumericSource: 'PLAY0513',\n EventFromLaterSlice: 'PLAY0516',\n TimelineCycleGroup: 'PLAY0517',\n InvalidSpecificationExample: 'PLAY0518',\n DuplicateSpecificationAssignment: 'PLAY0519',\n UnresolvedSpecificationExampleType: 'PLAY0520',\n SpecificationExampleNameCollision: 'PLAY0521',\n SpecificationExampleKindMismatch: 'PLAY0522',\n InvalidSpecificationExampleValue: 'PLAY0523',\n MissingSpecificationProperty: 'PLAY0524',\n UnadmittedSpecificationExampleValue: 'PLAY0525',\n InvalidSpecificationExampleBody: 'PLAY0526',\n AmbiguousReference: 'PLAY0198',\n InvalidSpecificationStream: 'PLAY0547',\n SpecificationStreamOnCommand: 'PLAY0548',\n InvalidSpecificationStreamRoute: 'PLAY0549',\n InvalidSpecificationStreamEventSource: 'PLAY0550',\n SpecificationStreamContradictsCommand: 'PLAY0551',\n InvalidDependencyTarget: 'PLAY0554',\n RepeatedDependencyDeclaration: 'PLAY0555',\n UndeclaredDependency: 'PLAY0552',\n UnusedDependencyDeclaration: 'PLAY0553',\n MutualDependencyDeclarations: 'PLAY0556',\n AuthorizationRefusalWithoutIdentity: 'PLAY0557',\n InvalidDocumentation: 'PLAY0558',\n ConflictingDocumentationAcrossFiles: 'PLAY0559',\n InvalidSpecificationCallerPersona: 'PLAY0572',\n UnsynthesizablePersonaCaller: 'PLAY0573',\n PersonaWithoutGate: 'PLAY0574',\n GateWithoutPersona: 'PLAY0575',\n AmbiguousPersonaCaller: 'PLAY0576',\n InvalidSpecificationParameter: 'PLAY0577',\n InvalidSpecificationCase: 'PLAY0578',\n DuplicateSpecificationParameter: 'PLAY0579',\n DuplicateSpecificationCase: 'PLAY0580',\n IncompleteSpecificationTable: 'PLAY0581',\n InvalidSpecificationCaseAssignment: 'PLAY0582',\n InvalidSpecificationCaseValue: 'PLAY0583',\n InvalidSpecificationCaseReference: 'PLAY0584',\n OptionalSpecificationParameterTarget: 'PLAY0585',\n SpecificationCaseNameCollision: 'PLAY0586',\n IncompatibleSpecificationParameterType: 'PLAY0587',\n UnusedSpecificationParameter: 'PLAY0588',\n SingularSpecificationTableExpansion: 'PLAY0589',\n UnsupportedInteractionAlternatives: 'PLAY0560',\n MixedInteractionAlternatives: 'PLAY0561',\n InteractionAlternativeWithoutActions: 'PLAY0562',\n InlineInteractionAlternative: 'PLAY0563',\n LegacyInteractionWhere: 'PLAY0564',\n InvalidEventSourceDeclaration: 'PLAY0503',\n InvalidCommandStream: 'PLAY0504',\n AmbiguousCommandStream: 'PLAY0505',\n UnsupportedStreamIdType: 'PLAY0506',\n RedundantSourceStreamId: 'PLAY0507',\n UnknownEvent: 'PLAY0166',\n UnknownReadModelProperty: 'PLAY0514',\n PiiNotSupportedOnIdentifier: 'PLAY0515',\n HandlerWithoutImplementation: 'PLAY0045',\n UnknownHandlerDirective: 'PLAY0046',\n CommandWithProducesAndHandler: 'PLAY0035',\n AbsoluteFileReference: 'PLAY0264',\n InvalidTriggerData: 'PLAY0246',\n InvalidReadModelKey: 'PLAY0660',\n IncompleteReadModelKey: 'PLAY0661', // C# only: scoped read-model key resolution.\n InvalidReadModelKeyLookup: 'PLAY0662', // Shape checks shared; scoped lookup checks are C# only.\n ProductionRouteOutsideCommand: 'PLAY0663',\n RedundantProductionRoute: 'PLAY0664',\n InvalidObserverFilter: 'PLAY0665',\n ObserverFilterExcludesEveryProducer: 'PLAY0666', // C# only: statically known producer routes.\n ReducerIdentityMismatch: 'PLAY0690',\n InvalidReactionBatchesDeclaration: 'PLAY0693',\n GenerationSupportBudgetExceeded: 'PLAY0691',\n EmptyGenerationSupport: 'PLAY0692', // C# only: conservative nominal producer identity comparison.\n MixedEnumerationNumbering: 'PLAY0667',\n DuplicateEnumerationNumber: 'PLAY0668',\n EnumerationNumberOutsideInt32: 'PLAY0669',\n MalformedEnumerationNumber: 'PLAY0670',\n UnpinnedStoredEnumeration: 'PLAY0671',\n ReadsWithChildren: 'PLAY0451',\n UnknownGenerationStrategy: 'PLAY0672',\n InvalidGenerationArgument: 'PLAY0673',\n InvalidGenerationModifier: 'PLAY0674',\n DuplicateGenerationModifier: 'PLAY0675',\n DuplicateGeneration: 'PLAY0676',\n InvalidGenerationPrimitive: 'PLAY0677',\n InvalidGenerationPrefix: 'PLAY0678',\n InvalidGenerationAlphabet: 'PLAY0679',\n InvalidTypeIdPrefix: 'PLAY0680',\n GenerationSizeOutsideRange: 'PLAY0681',\n ReservedSequenceGeneration: 'PLAY0682',\n LowGenerationEntropy: 'PLAY0683',\n LowGeneratedIdentifierEntropy: 'PLAY0684',\n ResponseNameUsedOnFailure: 'PLAY0685',\n // Retired by ESM v16; preserved for compatibility with earlier native compiler diagnostics.\n EventIdPinNotCarriedToRenderers: 'PLAY0686',\n InvalidToolbarButton: 'PLAY0760',\n} as const;\n"],"mappings":"AAKA,MAAaA,EAAkB,CAC3B,oBAAqB,WACrB,oBAAqB,WACr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0B,WAC1B,sBAAuB,WACvB,oCAAqC,WACrC,wBAAyB,WACzB,kCAAmC,WACnC,gCAAiC,WACjC,uBAAwB,WACxB,0BAA2B,WAC3B,2BAA4B,WAC5B,8BAA+B,WAC/B,2BAA4B,WAC5B,0BAA2B,WAC3B,kBAAmB,WACnB,0BAA2B,WAC3B,0BAA2B,WAC3B,0BAA2B,WAC3B,4BAA6B,WAC7B,oBAAqB,WACrB,2BAA4B,WAC5B,wBAAyB,WACzB,0BAA2B,WAC3B,oBAAqB,WACrB,2BAA4B,WAC5B,2BAA4B,WAC5B,qBAAsB,WACtB,8BAA+B,WAC/B,0BAA2B,WAE3B,gCAAiC,WACjC,qBAAsB,UAC1B"}
1
+ {"version":3,"file":"DiagnosticCodes.js","names":["DiagnosticCodes"],"sources":["../../../../../../Compiler/Diagnostics/DiagnosticCodes.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\n// Shared diagnostic names, including the explicitly C#-only checks below. Catalogue membership does\n// not imply TypeScript validation support; see Documentation/screenplay/editor-diagnostics.md.\nexport const DiagnosticCodes = {\n UnknownMatchPattern: 'PLAY0366',\n InvalidMatchPattern: 'PLAY0367',\n PatternOutsidePortableMatchDialect: 'PLAY0699',\n DeprecatedStudioTextRulePattern: 'PLAY0787',\n InvalidIdentityDeclaration: 'PLAY0633',\n DuplicateIdentity: 'PLAY0634',\n InvalidIdentityDetail: 'PLAY0635',\n UnknownIdentitySource: 'PLAY0636',\n IdentityDetailWithoutSource: 'PLAY0637',\n IdentitySourceWithBody: 'PLAY0638',\n DuplicateIdentityDetail: 'PLAY0639',\n BuiltInIdentityDetail: 'PLAY0640',\n UnknownIdentityQuery: 'PLAY0641',\n InvalidIdentityQuery: 'PLAY0642',\n IdentityQueryWithoutKey: 'PLAY0643',\n InvalidIdentityQueryKey: 'PLAY0644',\n IdentityQueryAuthorizationDependency: 'PLAY0645',\n IdentityQueryTypeMismatch: 'PLAY0646',\n InvalidReactionIdentity: 'PLAY0647',\n GatedInvocationWithoutIdentity: 'PLAY0648',\n UnusedReactionIdentity: 'PLAY0649',\n UnusedReactionRole: 'PLAY0650',\n UnsatisfiedReactionIdentity: 'PLAY0651',\n ReactionPrivilegeEscalation: 'PLAY0652',\n // C#-only whole-model public event boundaries; membership is not TypeScript validation support.\n CommandProducesPublicEvent: 'PLAY0607',\n PublicEventRequiresOutboundTranslation: 'PLAY0608',\n OutboundPublicEventCount: 'PLAY0609',\n ForeignPublicEventConsumer: 'PLAY0610',\n OutboundTranslationInput: 'PLAY0611',\n InboundTranslationOutput: 'PLAY0612',\n ForeignPublicEventProduced: 'PLAY0613',\n PublicTranslationRequiresDirection: 'PLAY0614',\n TranslationConstructDirection: 'PLAY0615',\n InboundTranslationInput: 'PLAY0616',\n OutboundTranslationOutput: 'PLAY0617',\n EventTargetOutsideOutboundTranslation: 'PLAY0618',\n EventsSourceOutsideInboundTranslation: 'PLAY0619',\n InvalidCaptureEventsSource: 'PLAY0620',\n CaptureEventsFromSeveralOrigins: 'PLAY0687',\n DirectionlessTranslationReactsToOwnCapture: 'PLAY0694',\n PendingIntentWithOtherHandler: 'PLAY0698',\n DescribedCommandNotImplemented: 'PLAY0695', // C# only\n DescribedCommandWithoutProductions: 'PLAY0696', // C# only\n DescribedCommandCardinalityNotAdmitted: 'PLAY0697', // C# only\n CaptureEventsKeyNotRequired: 'PLAY0700',\n CaptureEventsRecordFixture: 'PLAY0701',\n RefutedGeneratedConceptRule: 'PLAY0688',\n UnprovenGeneratedConceptRule: 'PLAY0689',\n // Syntax shared with C#; the reference checks (owners, instances, cycles, outlets, scopes, packages) are C#-only.\n InvalidExposureDeclaration: 'PLAY0621',\n UnknownExposureOwner: 'PLAY0622',\n ReExposureCycle: 'PLAY0623',\n ReExposureBroken: 'PLAY0624',\n InvalidInstanceContribution: 'PLAY0625',\n UnknownContributionInstance: 'PLAY0626',\n ContributionNotExposed: 'PLAY0627',\n ContributionTypeMismatch: 'PLAY0628',\n UnknownTemplateContentSlot: 'PLAY0629',\n UnknownNavigationOutlet: 'PLAY0630',\n TemplateScopeMismatch: 'PLAY0631',\n IncompatibleComponentPackage: 'PLAY0632',\n UnknownNavigationDestination: 'PLAY0654',\n UnknownScreenContributionPoint: 'PLAY0655',\n TemplateNestingCycle: 'PLAY0656',\n TemplateCategoryMissing: 'PLAY0720', // C# only: template declarations are not modeled by this compiler.\n InvalidTemplateVersionRange: 'PLAY0721',\n UnknownTemplateBlueprint: 'PLAY0722', // C# only: ui profile packages are not modeled by this compiler.\n DuplicateComplianceMarker: 'PLAY0653',\n LegacyComplianceMarker: 'PLAY0565',\n UnknownComplianceMarker: 'PLAY0566',\n InvalidSecretScope: 'PLAY0567',\n DuplicateSecretScope: 'PLAY0568',\n SecretScopeIgnoredForPii: 'PLAY0569',\n InvalidPersonalDataQualifier: 'PLAY0570',\n DuplicateSpecialCategory: 'PLAY0571',\n InvalidPurposeDeclaration: 'PLAY0596',\n InvalidPurposeVocabulary: 'PLAY0597',\n DuplicatePurposeField: 'PLAY0598',\n DuplicatePurposeDeclaration: 'PLAY0599',\n UnknownPurpose: 'PLAY0600',\n PurposeInterestMismatch: 'PLAY0601',\n PersonalDataWithoutPurpose: 'PLAY0602',\n SpecialDataWithoutCondition: 'PLAY0603',\n CriminalDataWithoutAuthorization: 'PLAY0604',\n PurposeWithoutBasis: 'PLAY0605',\n UnusedPurpose: 'PLAY0606',\n // C#-only: opt-in completeness, scoped action/refusal reference validation, and semantic binding.\n ConflictingScreenDataBinding: 'PLAY0530',\n ScreenDataQueryMismatch: 'PLAY0531',\n ActionWithoutInputSurface: 'PLAY0532',\n CommandWithoutInputSurface: 'PLAY0533',\n ReadModelFieldWithoutOrigin: 'PLAY0534',\n QueryParameterNotHeldByView: 'PLAY0535',\n UnconsumedEvent: 'PLAY0536',\n UnreachableScreen: 'PLAY0537',\n UnknownActionSubjectField: 'PLAY0345',\n UnresolvedActionSubject: 'PLAY0346',\n UnreachableActionAlternative: 'PLAY0347',\n UnknownActionArgumentProperty: 'PLAY0348',\n UnreachableRefusalBranch: 'PLAY0540',\n InvalidRefusalValue: 'PLAY0541',\n UnknownRefusalConstraint: 'PLAY0542',\n UnknownRedeliveryReaction: 'PLAY0544',\n IndeterminateNegatedClaimTarget: 'PLAY0546',\n InvalidRefusalBranch: 'PLAY0538',\n InvalidRefusalBranchBody: 'PLAY0539',\n UnmatchedRedeliveredOccurrence: 'PLAY0543',\n InvalidNoEventsExpectation: 'PLAY0545',\n InvalidProducesDeclaration: 'PLAY0042',\n ProducesWhenWithoutEvent: 'PLAY0043',\n InvalidPropertyMapping: 'PLAY0044',\n DuplicateProducesTarget: 'PLAY0193',\n EventSourceIdInPayload: 'PLAY0469',\n ExplicitProducesTargetsRequired: 'PLAY0470',\n RedundantEventId: 'PLAY0471',\n InvalidEventId: 'PLAY0472',\n InlineEventCollision: 'PLAY0473',\n InlineEventOutsideCommand: 'PLAY0474',\n InlineEventGeneration: 'PLAY0475',\n ReservedProductionMetadata: 'PLAY0476',\n InvalidEventDocumentation: 'PLAY0477',\n OmittedProductionDestination: 'PLAY0478',\n UnknownConstraintProperty: 'PLAY0391',\n UnknownTopLevelConstruct: 'PLAY0001',\n InvalidDomainDeclaration: 'PLAY0002',\n DuplicateDomain: 'PLAY0003',\n DomainNotFirst: 'PLAY0004',\n InvalidImportDeclaration: 'PLAY0005',\n TabIndentation: 'PLAY0006',\n InvalidConceptDeclaration: 'PLAY0007',\n UnknownPrimitiveType: 'PLAY0008',\n InvalidEnumerationValue: 'PLAY0009',\n UnknownConceptDirective: 'PLAY0010',\n ValidateReadAsEnumerationBlock: 'PLAY0011',\n AttributeReasonWithoutAttribute: 'PLAY0012',\n DuplicateAttributeReason: 'PLAY0013',\n InvalidTypeDeclaration: 'PLAY0014',\n TypeWithoutProperties: 'PLAY0015',\n InvalidPropertyDeclaration: 'PLAY0016',\n IdentifierOutsideCommand: 'PLAY0017',\n InvalidEventDeclaration: 'PLAY0018',\n IdentifierOnEventProperty: 'PLAY0019',\n TagPropertyReadAsTag: 'PLAY0020',\n InvalidModuleDeclaration: 'PLAY0021',\n UnknownModuleDirective: 'PLAY0022',\n InvalidFeatureDeclaration: 'PLAY0023',\n UnknownFeatureDirective: 'PLAY0024',\n InvalidSliceDeclaration: 'PLAY0027',\n UnknownSliceType: 'PLAY0028',\n UnknownSliceDirective: 'PLAY0029',\n InvalidPersonaDeclaration: 'PLAY0030',\n InvalidPersonaPolicyReference: 'PLAY0031',\n UnknownPersonaDirective: 'PLAY0032',\n InvalidCommandDeclaration: 'PLAY0033',\n UnknownCommandDirective: 'PLAY0034',\n DuplicateCommandIdentifier: 'PLAY0036',\n InvalidQueryDeclaration: 'PLAY0047',\n UnknownQueryDirective: 'PLAY0048',\n InvalidQueryParameter: 'PLAY0049',\n InvalidProjectionDeclaration: 'PLAY0056',\n EmptyProjection: 'PLAY0057',\n UnknownProjectionDirective: 'PLAY0058',\n FromWithoutEvent: 'PLAY0061',\n InvalidEventReference: 'PLAY0062',\n InvalidJoinDeclaration: 'PLAY0063',\n JoinWithoutEvent: 'PLAY0064',\n InvalidChildrenDeclaration: 'PLAY0065',\n InvalidNestedDeclaration: 'PLAY0066',\n NestedBlockWithoutFrom: 'PLAY0067',\n InvalidRemoveDeclaration: 'PLAY0068',\n UnknownRemoveDirective: 'PLAY0069',\n InvalidClearDeclaration: 'PLAY0070',\n ClearWithOutsideNestedBlock: 'PLAY0071',\n InvalidSpecificationDeclaration: 'PLAY0094',\n UnknownSpecificationDirective: 'PLAY0095',\n InvalidSpecificationWhen: 'PLAY0096',\n DuplicateSpecificationWhen: 'PLAY0097',\n InvalidThenError: 'PLAY0098',\n InvalidReadModelStep: 'PLAY0099',\n InvalidEventStep: 'PLAY0100',\n InvalidSpecificationValue: 'PLAY0101',\n InvalidScreenDeclaration: 'PLAY0102',\n UnknownScreenDirective: 'PLAY0103',\n InvalidDataDirective: 'PLAY0104',\n InvalidActionDirective: 'PLAY0105',\n UnknownActionDirective: 'PLAY0106',\n InvalidNavigation: 'PLAY0107',\n InvalidScreenLayoutSlot: 'PLAY0108',\n UnknownLayoutDirective: 'PLAY0026',\n InvalidTitleDirective: 'PLAY0109',\n UnknownTableDirective: 'PLAY0110',\n UnknownSummaryDirective: 'PLAY0111',\n AuthorizeWithoutPolicy: 'PLAY0122',\n InvalidPolicyReference: 'PLAY0123',\n InvalidConstraintDeclaration: 'PLAY0132',\n ConstraintWithoutRule: 'PLAY0133',\n InvalidConstraintBody: 'PLAY0134',\n DuplicateConstraintBody: 'PLAY0135',\n InvalidReactionDeclaration: 'PLAY0136',\n InvalidReactionTrigger: 'PLAY0137',\n ReactionWithoutTrigger: 'PLAY0138',\n InvalidValidateDeclaration: 'PLAY0140',\n InvalidValidationRule: 'PLAY0141',\n InvalidRuleName: 'PLAY0143',\n UnknownRuleImplementationDirective: 'PLAY0144',\n InvalidDescription: 'PLAY0145',\n EmptyDescription: 'PLAY0146',\n DuplicateDescription: 'PLAY0147',\n TagWithoutValue: 'PLAY0148',\n InvalidTagValue: 'PLAY0149',\n UnknownContextPath: 'PLAY0153',\n UnknownContextCausedByProperty: 'PLAY0154',\n UnknownContextIdentityProperty: 'PLAY0155',\n ExpectedCodeFence: 'PLAY0163',\n UnclosedCodeBlock: 'PLAY0164',\n DuplicateDeclaration: 'PLAY0168',\n RepeatedSingularDeclarationAcrossFiles: 'PLAY0172',\n RepeatedDeclarationAcrossFiles: 'PLAY0173',\n ConflictingDescriptionAcrossFiles: 'PLAY0174',\n UnexpectedTokenInAuthorize: 'PLAY0184',\n UnclosedAuthorizeGroup: 'PLAY0185',\n InvalidReadModelDeclaration: 'PLAY0186',\n InvalidInvokesDeclaration: 'PLAY0194',\n InvalidScopeDeclaration: 'PLAY0199',\n DuplicateScope: 'PLAY0200',\n InvalidIntervalTrigger: 'PLAY0249',\n InvalidScheduleTrigger: 'PLAY0250',\n DuplicateReactionTrigger: 'PLAY0253',\n InvalidSpecificationEventSource: 'PLAY0275',\n DuplicateSpecificationEventSource: 'PLAY0276',\n InvalidProjectionVariantDeclaration: 'PLAY0277',\n InvalidEntersOnDeclaration: 'PLAY0279',\n NestedProjectionVariantNotAllowed: 'PLAY0280',\n InvalidStructuredValue: 'PLAY0291',\n DuplicateStructuredValueMember: 'PLAY0294',\n ConflictingSpecificationActions: 'PLAY0358',\n InvalidSpecificationEventOrder: 'PLAY0359',\n InvalidValidationSeverity: 'PLAY0368',\n VariantRequiresEnteringEvent: 'PLAY0382',\n DuplicateProjectionVariant: 'PLAY0384',\n DuplicateVariantEnteringEvent: 'PLAY0385',\n InvalidSpecificationDenied: 'PLAY0388',\n DuplicateAuthorizationAcrossFiles: 'PLAY0394',\n FileConstraintOnlySupportsUniqueness: 'PLAY0396',\n LegacyInlineCodeFence: 'PLAY0397',\n InvalidEventGeneration: 'PLAY0446',\n InvalidFileImport: 'PLAY0454',\n FileImportMatchesNothing: 'PLAY0455',\n ImportedFileNotFound: 'PLAY0456',\n ConflictingImportPlacement: 'PLAY0457',\n ImportCycle: 'PLAY0458',\n ModuleInPlacedFile: 'PLAY0459',\n UnexpectedInPlacedFile: 'PLAY0460',\n InvalidSpecificationClock: 'PLAY0461',\n InvalidSpecificationTrigger: 'PLAY0462',\n InvalidSpecificationCapture: 'PLAY0463',\n InvalidSpecificationQueryAction: 'PLAY0464',\n MismatchedSpecificationQueryResult: 'PLAY0465',\n UnknownSpecificationQueryArgument: 'PLAY0468',\n InvalidSpecificationQuery: 'PLAY0265',\n UnknownSpecificationQueryDirective: 'PLAY0266',\n DuplicateSpecificationQueryArguments: 'PLAY0267',\n InvalidAbsentReadModelStep: 'PLAY0453',\n LegacyOptionalSuffix: 'PLAY0479',\n InvalidOptionalModifierOrder: 'PLAY0480',\n OptionalReadsNotSupported: 'PLAY0481',\n InvalidSpecificationCaller: 'PLAY0386',\n DuplicateSpecificationCallerOrDenied: 'PLAY0387',\n GeneratedPropertyOutsideCommand: 'PLAY0482',\n InvalidGeneratedType: 'PLAY0483',\n InvalidGeneratedModifierOrder: 'PLAY0484',\n DuplicateEventSubject: 'PLAY0590',\n InvalidSubjectType: 'PLAY0591',\n ProtectedSubjectType: 'PLAY0592',\n InvalidSubjectOwner: 'PLAY0593',\n ReadModelSubjectNotSupported: 'PLAY0594',\n InvalidSubjectModifierOrder: 'PLAY0595',\n GeneratedPropertySuppliedAsInput: 'PLAY0485',\n InvalidCommandResponse: 'PLAY0486',\n InvalidResponseSource: 'PLAY0487',\n DuplicateResponseField: 'PLAY0488',\n InvalidResponseShape: 'PLAY0489',\n InvalidGeneratedFixture: 'PLAY0490',\n InvalidReturnExpectation: 'PLAY0491',\n InvalidImplementationBlock: 'PLAY0492',\n InvalidImplementationHint: 'PLAY0493',\n ConflictingImplementationSources: 'PLAY0494',\n UnknownType: 'PLAY0165',\n InvalidSystemDeclaration: 'PLAY0495',\n InvalidOperationDeclaration: 'PLAY0496',\n InvalidProductionReference: 'PLAY0497',\n ProductionDeclarationCollision: 'PLAY0498',\n OperationOutsideCommand: 'PLAY0499',\n InvalidSystemReference: 'PLAY0500',\n InvalidOperationMapping: 'PLAY0501',\n InvalidOperationSpecification: 'PLAY0502',\n InvalidCaptureDeclaration: 'PLAY0078',\n UnknownCaptureDirective: 'PLAY0079',\n InvalidMapEntry: 'PLAY0080',\n InvalidTranslation: 'PLAY0081',\n InvalidSplitDeclaration: 'PLAY0082',\n InvalidSplitTarget: 'PLAY0083',\n InvalidAppendDeclaration: 'PLAY0084',\n UnknownAppendDirective: 'PLAY0085',\n WhenWithoutTrigger: 'PLAY0086',\n InvalidWhenClause: 'PLAY0087',\n InvalidWhenTransitionClause: 'PLAY0088',\n MixedWhenCombinators: 'PLAY0089',\n WhenCombinatorWithoutProperty: 'PLAY0090',\n UnknownCaptureBlockDirective: 'PLAY0091',\n InvalidCompositeKeyPart: 'PLAY0072',\n TemplateInCompositeKey: 'PLAY0073',\n EmptyCompositeKey: 'PLAY0074',\n InvalidProjectionMapping: 'PLAY0075',\n ExpectedLiteralValue: 'PLAY0150',\n InvalidExpression: 'PLAY0152',\n UnterminatedInterpolation: 'PLAY0157',\n UnterminatedTemplateExpression: 'PLAY0156',\n ProjectionDocumentWithoutProjection: 'PLAY0055',\n CaptureDocumentWithoutCapture: 'PLAY0077',\n SpecificationDocumentWithoutSpecification: 'PLAY0093',\n InvalidSeedDeclaration: 'PLAY0128',\n InvalidSeedGroup: 'PLAY0129',\n InvalidSeedEvent: 'PLAY0130',\n InvalidSeedPropertyAssignment: 'PLAY0131',\n InvalidPolicyDeclaration: 'PLAY0112',\n UnknownPolicyDirective: 'PLAY0113',\n PolicyWithoutRequirement: 'PLAY0114',\n ExpectedRoleName: 'PLAY0118',\n ExpectedClaimName: 'PLAY0119',\n ExpectedClaimMatches: 'PLAY0120',\n ExpectedClaimMatchTarget: 'PLAY0121',\n MixedPolicyImplementation: 'PLAY0440',\n RepeatedPolicyRequirement: 'PLAY0441',\n UnexpectedTokenInPolicyCondition: 'PLAY0115',\n ExpectedPolicyCondition: 'PLAY0116',\n UnclosedPolicyConditionGroup: 'PLAY0117',\n UnexpectedTokenInCondition: 'PLAY0158',\n ExpectedCondition: 'PLAY0159',\n ExpectedComparisonOperator: 'PLAY0161',\n ExpectedComparisonValue: 'PLAY0162',\n InvalidActionAlternative: 'PLAY0341',\n GuardedActionWithoutAlternatives: 'PLAY0342',\n MisplacedActionOtherwise: 'PLAY0343',\n UnsupportedActionConditionOperand: 'PLAY0344',\n InvalidInteractionArgument: 'PLAY0319',\n UnclosedConditionGroup: 'PLAY0160',\n InvalidNumericDirective: 'PLAY0508',\n DuplicateNumericDirective: 'PLAY0509',\n LateNumericDirective: 'PLAY0510',\n InexactNumericLiteral: 'PLAY0511',\n MixedNumericModes: 'PLAY0512',\n IncompatibleNumericSource: 'PLAY0513',\n EventFromLaterSlice: 'PLAY0516',\n TimelineCycleGroup: 'PLAY0517',\n InvalidSpecificationExample: 'PLAY0518',\n DuplicateSpecificationAssignment: 'PLAY0519',\n UnresolvedSpecificationExampleType: 'PLAY0520',\n SpecificationExampleNameCollision: 'PLAY0521',\n SpecificationExampleKindMismatch: 'PLAY0522',\n InvalidSpecificationExampleValue: 'PLAY0523',\n MissingSpecificationProperty: 'PLAY0524',\n UnadmittedSpecificationExampleValue: 'PLAY0525',\n InvalidSpecificationExampleBody: 'PLAY0526',\n AmbiguousReference: 'PLAY0198',\n InvalidSpecificationStream: 'PLAY0547',\n SpecificationStreamOnCommand: 'PLAY0548',\n InvalidSpecificationStreamRoute: 'PLAY0549',\n InvalidSpecificationStreamEventSource: 'PLAY0550',\n SpecificationStreamContradictsCommand: 'PLAY0551',\n InvalidDependencyTarget: 'PLAY0554',\n RepeatedDependencyDeclaration: 'PLAY0555',\n UndeclaredDependency: 'PLAY0552',\n UnusedDependencyDeclaration: 'PLAY0553',\n MutualDependencyDeclarations: 'PLAY0556',\n AuthorizationRefusalWithoutIdentity: 'PLAY0557',\n InvalidDocumentation: 'PLAY0558',\n ConflictingDocumentationAcrossFiles: 'PLAY0559',\n InvalidSpecificationCallerPersona: 'PLAY0572',\n UnsynthesizablePersonaCaller: 'PLAY0573',\n PersonaWithoutGate: 'PLAY0574',\n GateWithoutPersona: 'PLAY0575',\n AmbiguousPersonaCaller: 'PLAY0576',\n InvalidSpecificationParameter: 'PLAY0577',\n InvalidSpecificationCase: 'PLAY0578',\n DuplicateSpecificationParameter: 'PLAY0579',\n DuplicateSpecificationCase: 'PLAY0580',\n IncompleteSpecificationTable: 'PLAY0581',\n InvalidSpecificationCaseAssignment: 'PLAY0582',\n InvalidSpecificationCaseValue: 'PLAY0583',\n InvalidSpecificationCaseReference: 'PLAY0584',\n OptionalSpecificationParameterTarget: 'PLAY0585',\n SpecificationCaseNameCollision: 'PLAY0586',\n IncompatibleSpecificationParameterType: 'PLAY0587',\n UnusedSpecificationParameter: 'PLAY0588',\n SingularSpecificationTableExpansion: 'PLAY0589',\n UnsupportedInteractionAlternatives: 'PLAY0560',\n MixedInteractionAlternatives: 'PLAY0561',\n InteractionAlternativeWithoutActions: 'PLAY0562',\n InlineInteractionAlternative: 'PLAY0563',\n LegacyInteractionWhere: 'PLAY0564',\n InvalidEventSourceDeclaration: 'PLAY0503',\n InvalidCommandStream: 'PLAY0504',\n AmbiguousCommandStream: 'PLAY0505',\n UnsupportedStreamIdType: 'PLAY0506',\n RedundantSourceStreamId: 'PLAY0507',\n UnknownEvent: 'PLAY0166',\n UnknownReadModelProperty: 'PLAY0514',\n PiiNotSupportedOnIdentifier: 'PLAY0515',\n HandlerWithoutImplementation: 'PLAY0045',\n UnknownHandlerDirective: 'PLAY0046',\n CommandWithProducesAndHandler: 'PLAY0035',\n AbsoluteFileReference: 'PLAY0264',\n InvalidTriggerData: 'PLAY0246',\n InvalidReadModelKey: 'PLAY0660',\n IncompleteReadModelKey: 'PLAY0661', // C# only: scoped read-model key resolution.\n InvalidReadModelKeyLookup: 'PLAY0662', // Shape checks shared; scoped lookup checks are C# only.\n ProductionRouteOutsideCommand: 'PLAY0663',\n RedundantProductionRoute: 'PLAY0664',\n InvalidObserverFilter: 'PLAY0665',\n ObserverFilterExcludesEveryProducer: 'PLAY0666', // C# only: statically known producer routes.\n ReducerIdentityMismatch: 'PLAY0690',\n InvalidReactionBatchesDeclaration: 'PLAY0693',\n InvalidCommandReadsDeclaration: 'PLAY0780',\n GenerationSupportBudgetExceeded: 'PLAY0691',\n EmptyGenerationSupport: 'PLAY0692', // C# only: conservative nominal producer identity comparison.\n MixedEnumerationNumbering: 'PLAY0667',\n DuplicateEnumerationNumber: 'PLAY0668',\n EnumerationNumberOutsideInt32: 'PLAY0669',\n MalformedEnumerationNumber: 'PLAY0670',\n UnpinnedStoredEnumeration: 'PLAY0671',\n ReadsWithChildren: 'PLAY0451',\n UnknownGenerationStrategy: 'PLAY0672',\n InvalidGenerationArgument: 'PLAY0673',\n InvalidGenerationModifier: 'PLAY0674',\n DuplicateGenerationModifier: 'PLAY0675',\n DuplicateGeneration: 'PLAY0676',\n InvalidGenerationPrimitive: 'PLAY0677',\n InvalidGenerationPrefix: 'PLAY0678',\n InvalidGenerationAlphabet: 'PLAY0679',\n InvalidTypeIdPrefix: 'PLAY0680',\n GenerationSizeOutsideRange: 'PLAY0681',\n ReservedSequenceGeneration: 'PLAY0682',\n LowGenerationEntropy: 'PLAY0683',\n LowGeneratedIdentifierEntropy: 'PLAY0684',\n ResponseNameUsedOnFailure: 'PLAY0685',\n // Retired by ESM v16; preserved for compatibility with earlier native compiler diagnostics.\n EventIdPinNotCarriedToRenderers: 'PLAY0686',\n InvalidToolbarButton: 'PLAY0760',\n} as const;\n"],"mappings":"AAKA,MAAaA,EAAkB,CAC3B,oBAAqB,WACrB,oBAAqB,WACrB,mCAAoC,WACpC,gCAAiC,WACjC,2BAA4B,WAC5B,kBAAmB,WACnB,sBAAuB,WACvB,sBAAuB,WACvB,4BAA6B,WAC7B,uBAAwB,WACxB,wBAAyB,WACzB,sBAAuB,WACvB,qBAAsB,WACtB,qBAAsB,WACtB,wBAAyB,WACzB,wBAAyB,WACzB,qCAAsC,WACtC,0BAA2B,WAC3B,wBAAyB,WACzB,+BAAgC,WAChC,uBAAwB,WACxB,mBAAoB,WACpB,4BAA6B,WAC7B,4BAA6B,WAE7B,2BAA4B,WAC5B,uCAAwC,WACxC,yBAA0B,WAC1B,2BAA4B,WAC5B,yBAA0B,WAC1B,yBAA0B,WAC1B,2BAA4B,WAC5B,mCAAoC,WACpC,8BAA+B,WAC/B,wBAAyB,WACzB,0BAA2B,WAC3B,sCAAuC,WACvC,sCAAuC,WACvC,2BAA4B,WAC5B,gCAAiC,WACjC,2CAA4C,WAC5C,8BAA+B,WAC/B,+BAAgC,WAChC,mCAAoC,WACpC,uCAAwC,WACxC,4BAA6B,WAC7B,2BAA4B,WAC5B,4BAA6B,WAC7B,6BAA8B,WAE9B,2BAA4B,WAC5B,qBAAsB,WACtB,gBAAiB,WACjB,iBAAkB,WAClB,4BAA6B,WAC7B,4BAA6B,WAC7B,uBAAwB,WACxB,yBAA0B,WAC1B,2BAA4B,WAC5B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nC,qCAAsC,WACtC,+BAAgC,WAChC,uCAAwC,WACxC,6BAA8B,WAC9B,oCAAqC,WACrC,mCAAoC,WACpC,6BAA8B,WAC9B,qCAAsC,WACtC,6BAA8B,WAC9B,uBAAwB,WACxB,8BAA+B,WAC/B,qBAAsB,WACtB,uBAAwB,WACxB,wBAAyB,WACzB,wBAAyB,WACzB,aAAc,WACd,yBAA0B,WAC1B,4BAA6B,WAC7B,6BAA8B,WAC9B,wBAAyB,WACzB,8BAA+B,WAC/B,sBAAuB,WACvB,mBAAoB,WACpB,oBAAqB,WACrB,uBAAwB,WACxB,0BAA2B,WAC3B,8BAA+B,WAC/B,yBAA0B,WAC1B,sBAAuB,WACvB,oCAAqC,WACrC,wBAAyB,WACzB,kCAAmC,WACnC,+BAAgC,WAChC,gCAAiC,WACjC,uBAAwB,WACxB,0BAA2B,WAC3B,2BAA4B,WAC5B,8BAA+B,WAC/B,2BAA4B,WAC5B,0BAA2B,WAC3B,kBAAmB,WACnB,0BAA2B,WAC3B,0BAA2B,WAC3B,0BAA2B,WAC3B,4BAA6B,WAC7B,oBAAqB,WACrB,2BAA4B,WAC5B,wBAAyB,WACzB,0BAA2B,WAC3B,oBAAqB,WACrB,2BAA4B,WAC5B,2BAA4B,WAC5B,qBAAsB,WACtB,8BAA+B,WAC/B,0BAA2B,WAE3B,gCAAiC,WACjC,qBAAsB,UAC1B"}
@@ -1,2 +1,2 @@
1
- import"../../_virtual/_virtual/_rolldown/runtime.js";import{DiagnosticCodes as e}from"../Diagnostics/DiagnosticCodes.js";import{validateIdentity as t}from"../Parsing/IdentityValidator.js";import{validateApplicationHandlers as n}from"../Parsing/CommandHandlerValidator.js";import{combineAuthorize as r}from"../Parsing/AuthorizeParser.js";import{LineReader as i}from"../Parsing/LineReader.js";import{InvalidSyntaxJson as a}from"../Syntax/InvalidSyntaxJson.js";import{invalidSourceOptions as o,isAuthoredDocument as s,legacySourceOptions as c,validatedSourceOptions as l}from"../Syntax/SourceOptions.js";import{ParserContext as u}from"../Parsing/ParserContext.js";import{toSyntaxJson as d}from"../Syntax/SyntaxJson.js";function mergeDocuments(r){let s=[],d=r.map(e=>e.value),f=/* @__PURE__ */ new Map,p=!1;for(let t of d)try{f.set(t,Object.hasOwn(t,`sourceOptions`)?l(t.sourceOptions):c)}catch(n){if(!(n instanceof a))throw n;p=!0,s.push(error(e.IncompatibleNumericSource,n.message,t.location))}let m=d.filter(e=>f.get(e)?.numericMode===`exact`||hasDeclarations(e)),h=f.get(m[0])??c;for(let t of m.slice(1))f.get(t)?.numericMode!==h.numericMode&&(p=!0,s.push(error(e.MixedNumericModes,`Declaration-bearing documents and marked import barrels must independently select the same numeric mode.`,t.location)));p&&(h=o);let g=/* @__PURE__ */ new Map,_=declaredInOneFile(d.flatMap(e=>e.concepts),`declaration of`,s,void 0,g),v=declaredInOneFile(d.flatMap(e=>e.types),`declaration of`,s,void 0,g),y=d.flatMap(e=>e.identity==null?[]:[e.identity]);for(let t of y.slice(1))s.push(error(e.RepeatedSingularDeclarationAcrossFiles,`The folder already declares an identity block in '${describe(y[0].location.path)}' - a folder compiles to one application, which can have at most one`,t.location));let b=d.filter(e=>e.reactionProductionMode!=null);for(let t of b.slice(1))s.push(error(e.InvalidReactionBatchesDeclaration,`Declare 'reaction batches atomic' once at the application root.`,t.location));let x=d.map(e=>e.domain).filter(e=>e!==null);for(let t of x.slice(1))s.push(error(e.RepeatedSingularDeclarationAcrossFiles,`The folder already declares a domain in '${describe(x[0].location.path)}' - a folder compiles to one application, which can have at most one`,t.location));let S=mergeModules(d.flatMap(e=>e.modules),s),C=declaredInOneFile(d.flatMap(e=>e.personas),`persona`,s),w={kind:`ApplicationSyntax`,sourceOptions:h,...b.length===0?{}:{reactionProductionMode:b[0].reactionProductionMode},...y.length===0?{}:{identity:y[0]},domain:x[0]??null,imports:firstOfEach(d.flatMap(e=>e.imports),e=>e.qualifiedName),concepts:_,types:v,examples:d.flatMap(e=>e.examples??[]),systems:d.flatMap(e=>e.systems??[]),purposes:declaredInOneFile(d.flatMap(e=>e.purposes??[]),`purpose`,s),eventSources:d.flatMap(e=>e.eventSources??[]),declaredTriggers:d.flatMap(e=>e.declaredTriggers??[]),modules:S,personas:C,policies:d.flatMap(e=>e.policies??[]),seeds:d.flatMap(e=>e.seeds??[]),fileImports:d.flatMap(e=>e.fileImports),...presentOnly(`exposures`,d.flatMap(e=>e.exposures??[])),...presentOnly(`instanceContributions`,d.flatMap(e=>e.instanceContributions??[])),location:d[0]?.location??{line:1,column:1}},T=new u(new i([]));n(w,T),t(w,T),s.push(...T.diagnostics);let E=[...r.flatMap(e=>e.diagnostics),...s];return{value:w,diagnostics:E,success:!E.some(e=>e.severity===`error`)}}function hasDeclarations(e){if(s(e)||e.identity!=null||e.domain!==null||e.concepts.length>0||e.types.length>0||e.personas.length>0||(e.policies?.length??0)>0||(e.purposes?.length??0)>0||(e.seeds?.length??0)>0||(e.systems?.length??0)>0||(e.eventSources?.length??0)>0||(e.examples?.length??0)>0)return!0;let feature=e=>!e.isPlacement||(e.examples?.length??0)>0||e.slices.length>0||e.features.some(feature);return e.modules.some(e=>!e.isPlacement||(e.examples?.length??0)>0||e.features.some(feature))}function mergeModules(e,t){return groupByName(e).map(placedLast).map(e=>e.length===1?{...e[0],isPlacement:!1,features:e[0].features.map(unplaced)}:{...e[0],isPlacement:!1,fileImports:e.flatMap(e=>e.fileImports),examples:e.flatMap(e=>e.examples??[]),purposes:firstOfEach(e.flatMap(e=>e.purposes??[]),e=>e.name),description:firstDescription(e,`module '${e[0].name}'`,t),documentation:firstDocumentation(e,`module '${e[0].name}'`,t),authorize:combineAuthorization(e.map(e=>e.authorize),`module '${e[0].name}'`,t),dependsOn:groupDependencies(e),features:mergeFeatures(e.flatMap(e=>e.features),t)})}function mergeFeatures(e,t){return groupByName(e).map(placedLast).map(e=>e.length===1?unplaced(e[0]):{...e[0],isPlacement:!1,fileImports:e.flatMap(e=>e.fileImports),examples:e.flatMap(e=>e.examples??[]),purposes:firstOfEach(e.flatMap(e=>e.purposes??[]),e=>e.name),description:firstDescription(e,`feature '${e[0].name}'`,t),documentation:firstDocumentation(e,`feature '${e[0].name}'`,t),authorize:combineAuthorization(e.map(e=>e.authorize),`feature '${e[0].name}'`,t),dependsOn:groupDependencies(e),features:mergeFeatures(e.flatMap(e=>e.features),t),slices:declaredInOneFile(e.flatMap(e=>e.slices),`slice`,t,`feature '${e[0].name}'`)})}function groupDependencies(e){return[...e].sort((e,t)=>(e.location.path??``)<(t.location.path??``)?-1:+((e.location.path??``)>(t.location.path??``))).flatMap(e=>e.dependsOn??[])}function placedLast(e){return[...e.filter(e=>!e.isPlacement),...e.filter(e=>e.isPlacement)]}function unplaced(e){return{...e,isPlacement:!1,features:e.features.map(unplaced)}}function combineAuthorization(t,n,i){let a=[];for(let r of t.filter(e=>e!==null)){let t=a.find(e=>e.location.path!==r.location.path&&JSON.stringify(d(e))===JSON.stringify(d(r)));t===void 0?a.push(r):i.push(warning(e.DuplicateAuthorizationAcrossFiles,`An identical authorization is already declared on the ${n} in '${describe(t.location.path)}' - this repeated gate is ignored`,r.location))}return a.reduce((e,t)=>r(e,t),null)}function firstOfEach(e,t){let n=/* @__PURE__ */ new Set;return e.filter(e=>!n.has(t(e))&&n.add(t(e))!==void 0)}function groupByName(e){let t=/* @__PURE__ */ new Map;for(let n of e)t.set(n.name,[...t.get(n.name)??[],n]);return[...t.values()]}function firstDocumentation(t,n,r){let i=t.filter(e=>e.documentation!=null);for(let t of i.slice(1).filter(e=>e.documentation!==i[0].documentation))r.push(warning(e.ConflictingDocumentationAcrossFiles,`The ${n} is already documented in '${describe(i[0].location.path)}' - keeping that documentation`,t.location));return i[0]?.documentation??null}function firstDescription(t,n,r){let i=t.filter(e=>e.description!==null);for(let t of i.slice(1).filter(e=>e.description!==i[0].description))r.push(warning(e.ConflictingDescriptionAcrossFiles,`The ${n} is already described in '${describe(i[0].location.path)}' - keeping that description`,t.location));return i[0]?.description??null}function declaredInOneFile(t,n,r,i,a=/* @__PURE__ */ new Map){let o=[];for(let s of t){let t=a.get(s.name);t!==void 0&&t.path!==s.location.path?r.push(error(e.RepeatedDeclarationAcrossFiles,`Duplicate ${n} '${s.name}'${i===void 0?``:` in ${i}`} - already declared in '${describe(t.path)}'`,s.location)):(t===void 0&&a.set(s.name,s.location),o.push(s))}return o}const describe=e=>e??`another file`,error=(e,t,n)=>({severity:`error`,code:e,message:t,location:n}),warning=(e,t,n)=>({severity:`warning`,code:e,message:t,location:n});function presentOnly(e,t){return t.length===0?{}:{[e]:t}}export{mergeDocuments};
1
+ import"../../_virtual/_virtual/_rolldown/runtime.js";import{DiagnosticCodes as e}from"../Diagnostics/DiagnosticCodes.js";import{validateIdentity as t}from"../Parsing/IdentityValidator.js";import{validateApplicationHandlers as n}from"../Parsing/CommandHandlerValidator.js";import{combineAuthorize as r}from"../Parsing/AuthorizeParser.js";import{LineReader as i}from"../Parsing/LineReader.js";import{InvalidSyntaxJson as a}from"../Syntax/InvalidSyntaxJson.js";import{invalidSourceOptions as o,isAuthoredDocument as s,legacySourceOptions as c,validatedSourceOptions as l}from"../Syntax/SourceOptions.js";import{ParserContext as u}from"../Parsing/ParserContext.js";import{toSyntaxJson as d}from"../Syntax/SyntaxJson.js";function mergeDocuments(r){let s=[],d=r.map(e=>e.value),f=/* @__PURE__ */ new Map,p=!1;for(let t of d)try{f.set(t,Object.hasOwn(t,`sourceOptions`)?l(t.sourceOptions):c)}catch(n){if(!(n instanceof a))throw n;p=!0,s.push(error(e.IncompatibleNumericSource,n.message,t.location))}let m=d.filter(e=>f.get(e)?.numericMode===`exact`||hasDeclarations(e)),h=f.get(m[0])??c;for(let t of m.slice(1))f.get(t)?.numericMode!==h.numericMode&&(p=!0,s.push(error(e.MixedNumericModes,`Declaration-bearing documents and marked import barrels must independently select the same numeric mode.`,t.location)));p&&(h=o);let g=/* @__PURE__ */ new Map,_=declaredInOneFile(d.flatMap(e=>e.concepts),`declaration of`,s,void 0,g),v=declaredInOneFile(d.flatMap(e=>e.types),`declaration of`,s,void 0,g),y=d.flatMap(e=>e.identity==null?[]:[e.identity]);for(let t of y.slice(1))s.push(error(e.RepeatedSingularDeclarationAcrossFiles,`The folder already declares an identity block in '${describe(y[0].location.path)}' - a folder compiles to one application, which can have at most one`,t.location));let b=d.filter(e=>e.commandReadMode!=null);for(let t of b.slice(1))s.push(error(e.InvalidCommandReadsDeclaration,`Declare 'command reads protected' once at the application root.`,t.location));let x=d.filter(e=>e.reactionProductionMode!=null);for(let t of x.slice(1))s.push(error(e.InvalidReactionBatchesDeclaration,`Declare 'reaction batches atomic' once at the application root.`,t.location));let S=d.map(e=>e.domain).filter(e=>e!==null);for(let t of S.slice(1))s.push(error(e.RepeatedSingularDeclarationAcrossFiles,`The folder already declares a domain in '${describe(S[0].location.path)}' - a folder compiles to one application, which can have at most one`,t.location));let C=mergeModules(d.flatMap(e=>e.modules),s),w=declaredInOneFile(d.flatMap(e=>e.personas),`persona`,s),T={kind:`ApplicationSyntax`,sourceOptions:h,...x.length===0?{}:{reactionProductionMode:x[0].reactionProductionMode},...b.length===0?{}:{commandReadMode:b[0].commandReadMode},...y.length===0?{}:{identity:y[0]},domain:S[0]??null,imports:firstOfEach(d.flatMap(e=>e.imports),e=>e.qualifiedName),concepts:_,types:v,examples:d.flatMap(e=>e.examples??[]),systems:d.flatMap(e=>e.systems??[]),purposes:declaredInOneFile(d.flatMap(e=>e.purposes??[]),`purpose`,s),eventSources:d.flatMap(e=>e.eventSources??[]),declaredTriggers:d.flatMap(e=>e.declaredTriggers??[]),modules:C,personas:w,policies:d.flatMap(e=>e.policies??[]),seeds:d.flatMap(e=>e.seeds??[]),fileImports:d.flatMap(e=>e.fileImports),...presentOnly(`exposures`,d.flatMap(e=>e.exposures??[])),...presentOnly(`instanceContributions`,d.flatMap(e=>e.instanceContributions??[])),location:d[0]?.location??{line:1,column:1}},E=new u(new i([]));n(T,E),t(T,E),s.push(...E.diagnostics);let D=[...r.flatMap(e=>e.diagnostics),...s];return{value:T,diagnostics:D,success:!D.some(e=>e.severity===`error`)}}function hasDeclarations(e){if(s(e)||e.identity!=null||e.domain!==null||e.concepts.length>0||e.types.length>0||e.personas.length>0||(e.policies?.length??0)>0||(e.purposes?.length??0)>0||(e.seeds?.length??0)>0||(e.systems?.length??0)>0||(e.eventSources?.length??0)>0||(e.examples?.length??0)>0)return!0;let feature=e=>!e.isPlacement||(e.examples?.length??0)>0||e.slices.length>0||e.features.some(feature);return e.modules.some(e=>!e.isPlacement||(e.examples?.length??0)>0||e.features.some(feature))}function mergeModules(e,t){return groupByName(e).map(placedLast).map(e=>e.length===1?{...e[0],isPlacement:!1,features:e[0].features.map(unplaced)}:{...e[0],isPlacement:!1,fileImports:e.flatMap(e=>e.fileImports),examples:e.flatMap(e=>e.examples??[]),purposes:firstOfEach(e.flatMap(e=>e.purposes??[]),e=>e.name),description:firstDescription(e,`module '${e[0].name}'`,t),documentation:firstDocumentation(e,`module '${e[0].name}'`,t),authorize:combineAuthorization(e.map(e=>e.authorize),`module '${e[0].name}'`,t),dependsOn:groupDependencies(e),features:mergeFeatures(e.flatMap(e=>e.features),t)})}function mergeFeatures(e,t){return groupByName(e).map(placedLast).map(e=>e.length===1?unplaced(e[0]):{...e[0],isPlacement:!1,fileImports:e.flatMap(e=>e.fileImports),examples:e.flatMap(e=>e.examples??[]),purposes:firstOfEach(e.flatMap(e=>e.purposes??[]),e=>e.name),description:firstDescription(e,`feature '${e[0].name}'`,t),documentation:firstDocumentation(e,`feature '${e[0].name}'`,t),authorize:combineAuthorization(e.map(e=>e.authorize),`feature '${e[0].name}'`,t),dependsOn:groupDependencies(e),features:mergeFeatures(e.flatMap(e=>e.features),t),slices:declaredInOneFile(e.flatMap(e=>e.slices),`slice`,t,`feature '${e[0].name}'`)})}function groupDependencies(e){return[...e].sort((e,t)=>(e.location.path??``)<(t.location.path??``)?-1:+((e.location.path??``)>(t.location.path??``))).flatMap(e=>e.dependsOn??[])}function placedLast(e){return[...e.filter(e=>!e.isPlacement),...e.filter(e=>e.isPlacement)]}function unplaced(e){return{...e,isPlacement:!1,features:e.features.map(unplaced)}}function combineAuthorization(t,n,i){let a=[];for(let r of t.filter(e=>e!==null)){let t=a.find(e=>e.location.path!==r.location.path&&JSON.stringify(d(e))===JSON.stringify(d(r)));t===void 0?a.push(r):i.push(warning(e.DuplicateAuthorizationAcrossFiles,`An identical authorization is already declared on the ${n} in '${describe(t.location.path)}' - this repeated gate is ignored`,r.location))}return a.reduce((e,t)=>r(e,t),null)}function firstOfEach(e,t){let n=/* @__PURE__ */ new Set;return e.filter(e=>!n.has(t(e))&&n.add(t(e))!==void 0)}function groupByName(e){let t=/* @__PURE__ */ new Map;for(let n of e)t.set(n.name,[...t.get(n.name)??[],n]);return[...t.values()]}function firstDocumentation(t,n,r){let i=t.filter(e=>e.documentation!=null);for(let t of i.slice(1).filter(e=>e.documentation!==i[0].documentation))r.push(warning(e.ConflictingDocumentationAcrossFiles,`The ${n} is already documented in '${describe(i[0].location.path)}' - keeping that documentation`,t.location));return i[0]?.documentation??null}function firstDescription(t,n,r){let i=t.filter(e=>e.description!==null);for(let t of i.slice(1).filter(e=>e.description!==i[0].description))r.push(warning(e.ConflictingDescriptionAcrossFiles,`The ${n} is already described in '${describe(i[0].location.path)}' - keeping that description`,t.location));return i[0]?.description??null}function declaredInOneFile(t,n,r,i,a=/* @__PURE__ */ new Map){let o=[];for(let s of t){let t=a.get(s.name);t!==void 0&&t.path!==s.location.path?r.push(error(e.RepeatedDeclarationAcrossFiles,`Duplicate ${n} '${s.name}'${i===void 0?``:` in ${i}`} - already declared in '${describe(t.path)}'`,s.location)):(t===void 0&&a.set(s.name,s.location),o.push(s))}return o}const describe=e=>e??`another file`,error=(e,t,n)=>({severity:`error`,code:e,message:t,location:n}),warning=(e,t,n)=>({severity:`warning`,code:e,message:t,location:n});function presentOnly(e,t){return t.length===0?{}:{[e]:t}}export{mergeDocuments};
2
2
  //# sourceMappingURL=PlayFolderMerge.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PlayFolderMerge.js","names":["diagnostics","applications","documents","document","options","invalid","application","validatedSourceOptions","legacySourceOptions","failure","InvalidSyntaxJson","DiagnosticCodes","asserted","sourceOptions","invalidSourceOptions","named","concepts","types","identities","extra","modes","domains","domain","modules","personas","value","item","identityContext","ParserContext","LineReader","validateApplicationHandlers","validateIdentity","all","diagnostic","isAuthoredDocument","node","module","parts","part","reference","features","left","right","feature","kept","authorization","declarations","declaration","first","earlier","toSyntaxJson","owner","combineAuthorize","combined","next","seen","items","key","groups","documented","disagreeing","described","claimed","keyword","within","path","values"],"sources":["../../../../../../Compiler/Files/PlayFolderMerge.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { validateIdentity } from '../Parsing/IdentityValidator';\nimport { validateApplicationHandlers } from '../Parsing/CommandHandlerValidator';\nimport { ParserContext } from '../Parsing/ParserContext';\nimport { LineReader } from '../Parsing/LineReader';\nimport { Diagnostic } from '../Diagnostics/Diagnostic';\nimport { DiagnosticCodes } from '../Diagnostics/DiagnosticCodes';\nimport { SourceLocation } from '../Diagnostics/SourceLocation';\nimport { combineAuthorize } from '../Parsing/AuthorizeParser';\nimport { CompilationResult } from '../ScreenplayCompiler';\nimport { AuthorizeSyntax, PersonaSyntax } from '../Syntax/Authorization';\nimport { ConceptSyntax, TypeSyntax } from '../Syntax/Declarations';\nimport { ApplicationSyntax, FeatureSyntax, ModuleSyntax } from '../Syntax/Structure';\nimport { toSyntaxJson } from '../Syntax/SyntaxJson';\nimport { invalidSourceOptions, isAuthoredDocument, legacySourceOptions, SourceOptions, validatedSourceOptions } from '../Syntax/SourceOptions';\nimport { InvalidSyntaxJson } from '../Syntax/InvalidSyntaxJson';\n\n// \"The documents of a folder are one document\": modules and features with the same name combine, and a\n// name declared in two files is reported - the port of the C# PlayFolderMerge for what this compiler\n// models. The semantic validation the C# merge runs afterwards is not ported.\nexport function mergeDocuments(documents: readonly CompilationResult<ApplicationSyntax>[]): CompilationResult<ApplicationSyntax> {\n const diagnostics: Diagnostic[] = [];\n const applications = documents.map(document => document.value);\n const options = new Map<ApplicationSyntax, SourceOptions>();\n let invalid = false;\n for (const application of applications) {\n try {\n options.set(application, Object.hasOwn(application, 'sourceOptions') ? validatedSourceOptions(application.sourceOptions) : legacySourceOptions);\n } catch (failure) {\n if (!(failure instanceof InvalidSyntaxJson)) throw failure;\n invalid = true;\n diagnostics.push(error(DiagnosticCodes.IncompatibleNumericSource, failure.message, application.location));\n }\n }\n const asserted = applications.filter(application => options.get(application)?.numericMode === 'exact' || hasDeclarations(application));\n let sourceOptions = options.get(asserted[0]) ?? legacySourceOptions;\n for (const application of asserted.slice(1)) {\n if (options.get(application)?.numericMode !== sourceOptions.numericMode) {\n invalid = true;\n diagnostics.push(error(DiagnosticCodes.MixedNumericModes, 'Declaration-bearing documents and marked import barrels must independently select the same numeric mode.', application.location));\n }\n }\n if (invalid) sourceOptions = invalidSourceOptions;\n const named = new Map<string, SourceLocation>();\n const concepts = declaredInOneFile<ConceptSyntax>(applications.flatMap(application => application.concepts), 'declaration of', diagnostics, undefined, named);\n const types = declaredInOneFile<TypeSyntax>(applications.flatMap(application => application.types), 'declaration of', diagnostics, undefined, named);\n const identities = applications.flatMap(application => application.identity == null ? [] : [application.identity]);\n for (const extra of identities.slice(1)) diagnostics.push(error(DiagnosticCodes.RepeatedSingularDeclarationAcrossFiles,\n `The folder already declares an identity block in '${describe(identities[0].location.path)}' - a folder compiles to one application, which can have at most one`, extra.location));\n const modes = applications.filter(application => application.reactionProductionMode != null);\n for (const extra of modes.slice(1)) diagnostics.push(error(DiagnosticCodes.InvalidReactionBatchesDeclaration,\n \"Declare 'reaction batches atomic' once at the application root.\", extra.location));\n const domains = applications.map(application => application.domain).filter(domain => domain !== null);\n for (const extra of domains.slice(1)) {\n diagnostics.push(error(DiagnosticCodes.RepeatedSingularDeclarationAcrossFiles,\n `The folder already declares a domain in '${describe(domains[0].location.path)}' - a folder compiles to one application, which can have at most one`, extra.location));\n }\n // Modules merge before personas are claimed, so the diagnostics come in the order the C# merge reports them.\n const modules = mergeModules(applications.flatMap(application => application.modules), diagnostics);\n const personas = declaredInOneFile<PersonaSyntax>(applications.flatMap(application => application.personas), 'persona', diagnostics);\n const value: ApplicationSyntax = {\n kind: 'ApplicationSyntax',\n sourceOptions,\n ...(modes.length === 0 ? {} : { reactionProductionMode: modes[0].reactionProductionMode }),\n ...(identities.length === 0 ? {} : { identity: identities[0] }),\n domain: domains[0] ?? null,\n imports: firstOfEach(applications.flatMap(application => application.imports), item => item.qualifiedName),\n concepts,\n types,\n examples: applications.flatMap(application => application.examples ?? []),\n systems: applications.flatMap(application => application.systems ?? []),\n purposes: declaredInOneFile(applications.flatMap(application => application.purposes ?? []), 'purpose', diagnostics),\n eventSources: applications.flatMap(application => application.eventSources ?? []),\n declaredTriggers: applications.flatMap(application => application.declaredTriggers ?? []),\n modules,\n personas,\n policies: applications.flatMap(application => application.policies ?? []),\n seeds: applications.flatMap(application => application.seeds ?? []),\n fileImports: applications.flatMap(application => application.fileImports),\n ...presentOnly('exposures', applications.flatMap(application => application.exposures ?? [])),\n ...presentOnly('instanceContributions', applications.flatMap(application => application.instanceContributions ?? [])),\n location: applications[0]?.location ?? { line: 1, column: 1 },\n };\n const identityContext = new ParserContext(new LineReader([]));\n validateApplicationHandlers(value, identityContext);\n validateIdentity(value, identityContext);\n diagnostics.push(...identityContext.diagnostics);\n const all = [...documents.flatMap(document => document.diagnostics), ...diagnostics];\n return { value, diagnostics: all, success: !all.some(diagnostic => diagnostic.severity === 'error') };\n}\n\nfunction hasDeclarations(application: ApplicationSyntax): boolean {\n if (isAuthoredDocument(application)) return true;\n if (application.identity != null || application.domain !== null || application.concepts.length > 0 || application.types.length > 0 || application.personas.length > 0 || (application.policies?.length ?? 0) > 0 || (application.purposes?.length ?? 0) > 0 || (application.seeds?.length ?? 0) > 0 || (application.systems?.length ?? 0) > 0 || (application.eventSources?.length ?? 0) > 0 || (application.examples?.length ?? 0) > 0) return true;\n const feature = (node: FeatureSyntax): boolean => !node.isPlacement || (node.examples?.length ?? 0) > 0 || node.slices.length > 0 || node.features.some(feature);\n return application.modules.some(module => !module.isPlacement || (module.examples?.length ?? 0) > 0 || module.features.some(feature));\n}\n\nfunction mergeModules(modules: readonly ModuleSyntax[], diagnostics: Diagnostic[]): ModuleSyntax[] {\n return groupByName(modules).map(placedLast).map(parts => parts.length === 1 ? { ...parts[0], isPlacement: false, features: parts[0].features.map(unplaced) } : {\n ...parts[0],\n isPlacement: false,\n fileImports: parts.flatMap(part => part.fileImports),\n examples: parts.flatMap(part => part.examples ?? []),\n purposes: firstOfEach(parts.flatMap(part => part.purposes ?? []), reference => reference.name),\n description: firstDescription(parts, `module '${parts[0].name}'`, diagnostics),\n documentation: firstDocumentation(parts, `module '${parts[0].name}'`, diagnostics),\n authorize: combineAuthorization(parts.map(part => part.authorize), `module '${parts[0].name}'`, diagnostics),\n dependsOn: groupDependencies(parts),\n features: mergeFeatures(parts.flatMap(part => part.features), diagnostics),\n });\n}\n\nfunction mergeFeatures(features: readonly FeatureSyntax[], diagnostics: Diagnostic[]): FeatureSyntax[] {\n return groupByName(features).map(placedLast).map(parts => parts.length === 1 ? unplaced(parts[0]) : {\n ...parts[0],\n isPlacement: false,\n fileImports: parts.flatMap(part => part.fileImports),\n examples: parts.flatMap(part => part.examples ?? []),\n purposes: firstOfEach(parts.flatMap(part => part.purposes ?? []), reference => reference.name),\n description: firstDescription(parts, `feature '${parts[0].name}'`, diagnostics),\n documentation: firstDocumentation(parts, `feature '${parts[0].name}'`, diagnostics),\n authorize: combineAuthorization(parts.map(part => part.authorize), `feature '${parts[0].name}'`, diagnostics),\n dependsOn: groupDependencies(parts),\n features: mergeFeatures(parts.flatMap(part => part.features), diagnostics),\n slices: declaredInOneFile(parts.flatMap(part => part.slices), 'slice', diagnostics, `feature '${parts[0].name}'`),\n });\n}\n\n// Dependencies accumulate in path order, independently of which header owns the container.\nfunction groupDependencies(parts: readonly (ModuleSyntax | FeatureSyntax)[]) {\n return [...parts].sort((left, right) => (left.location.path ?? '') < (right.location.path ?? '') ? -1 : (left.location.path ?? '') > (right.location.path ?? '') ? 1 : 0).flatMap(part => part.dependsOn ?? []);\n}\n\n// Where a module or feature is written comes before files merely placed in it, so the merged one is located\n// at its declaration. Within each kind, path order is kept.\nfunction placedLast<T extends { readonly isPlacement: boolean }>(parts: readonly T[]): T[] {\n return [...parts.filter(part => !part.isPlacement), ...parts.filter(part => part.isPlacement)];\n}\n\n// Once merged, a feature is the feature - whether a file was placed in it no longer says anything.\nfunction unplaced(feature: FeatureSyntax): FeatureSyntax {\n return { ...feature, isPlacement: false, features: feature.features.map(unplaced) };\n}\n\n// Combines the gates files declare on one module or feature with 'and', never weakening an earlier one. The\n// same gate repeated in another file says nothing new and is reported and left out.\nfunction combineAuthorization(declarations: readonly (AuthorizeSyntax | null)[], owner: string, diagnostics: Diagnostic[]): AuthorizeSyntax | null {\n const kept: AuthorizeSyntax[] = [];\n for (const authorization of declarations.filter(declaration => declaration !== null)) {\n const first = kept.find(earlier => earlier.location.path !== authorization.location.path\n && JSON.stringify(toSyntaxJson(earlier)) === JSON.stringify(toSyntaxJson(authorization)));\n if (first !== undefined) {\n diagnostics.push(warning(DiagnosticCodes.DuplicateAuthorizationAcrossFiles,\n `An identical authorization is already declared on the ${owner} in '${describe(first.location.path)}' - this repeated gate is ignored`, authorization.location));\n continue;\n }\n kept.push(authorization);\n }\n return kept.reduce<AuthorizeSyntax | null>((combined, next) => combineAuthorize(combined, next), null);\n}\n\nfunction firstOfEach<T>(items: readonly T[], key: (item: T) => string): T[] {\n const seen = new Set<string>();\n return items.filter(item => !seen.has(key(item)) && seen.add(key(item)) !== undefined);\n}\n\n// Groups by name, keeping the order each name first appears in.\nfunction groupByName<T extends { readonly name: string }>(items: readonly T[]): T[][] {\n const groups = new Map<string, T[]>();\n for (const item of items) {\n groups.set(item.name, [...(groups.get(item.name) ?? []), item]);\n }\n return [...groups.values()];\n}\n\nfunction firstDocumentation(parts: readonly { documentation?: string | null; location: SourceLocation }[], owner: string, diagnostics: Diagnostic[]): string | null {\n const documented = parts.filter(part => part.documentation != null);\n for (const disagreeing of documented.slice(1).filter(part => part.documentation !== documented[0].documentation)) {\n diagnostics.push(warning(DiagnosticCodes.ConflictingDocumentationAcrossFiles,\n `The ${owner} is already documented in '${describe(documented[0].location.path)}' - keeping that documentation`, disagreeing.location));\n }\n return documented[0]?.documentation ?? null;\n}\n\nfunction firstDescription(parts: readonly { description: string | null; location: SourceLocation }[], owner: string, diagnostics: Diagnostic[]): string | null {\n const described = parts.filter(part => part.description !== null);\n for (const disagreeing of described.slice(1).filter(part => part.description !== described[0].description)) {\n diagnostics.push(warning(DiagnosticCodes.ConflictingDescriptionAcrossFiles,\n `The ${owner} is already described in '${describe(described[0].location.path)}' - keeping that description`, disagreeing.location));\n }\n return described[0]?.description ?? null;\n}\n\n// Keeps the first declaration of each name; one in another file with the same name is reported and dropped.\n// A repeat within one file is left for that file's own checks.\nfunction declaredInOneFile<T extends { readonly name: string; readonly location: SourceLocation }>(\n declarations: readonly T[], keyword: string, diagnostics: Diagnostic[], within?: string, claimed = new Map<string, SourceLocation>()): T[] {\n const kept: T[] = [];\n for (const declaration of declarations) {\n const first = claimed.get(declaration.name);\n if (first !== undefined && first.path !== declaration.location.path) {\n diagnostics.push(error(DiagnosticCodes.RepeatedDeclarationAcrossFiles,\n `Duplicate ${keyword} '${declaration.name}'${within === undefined ? '' : ` in ${within}`} - already declared in '${describe(first.path)}'`, declaration.location));\n continue;\n }\n if (first === undefined) {\n claimed.set(declaration.name, declaration.location);\n }\n kept.push(declaration);\n }\n return kept;\n}\n\nconst describe = (path: string | undefined): string => path ?? 'another file';\nconst error = (code: string, message: string, location: SourceLocation): Diagnostic => ({ severity: 'error', code, message, location });\nconst warning = (code: string, message: string, location: SourceLocation): Diagnostic => ({ severity: 'warning', code, message, location });\n\n// Composition members are written only when a document declares them, matching the C# canonical JSON.\nfunction presentOnly<TKey extends string, TValue>(key: TKey, values: readonly TValue[]): Partial<Record<TKey, readonly TValue[]>> {\n return values.length === 0 ? {} : { [key]: values } as Partial<Record<TKey, readonly TValue[]>>;\n}\n"],"mappings":"4sBAsBA,SAAgB,eAAe,EAAkG,CAC7H,IAAMA,EAA4B,CAAC,EAC7BC,EAAeC,EAAU,IAAI,GAAYC,EAAS,KAAK,EACvDC,kBAAU,IAAI,IAChBC,EAAU,GACd,IAAK,IAAMC,KAAeL,EACtB,GAAI,CACAG,EAAQ,IAAIE,EAAa,OAAO,OAAOA,EAAa,eAAe,EAAIC,EAAuBD,EAAY,aAAa,EAAIE,CAAmB,CAClJ,OAASC,EAAS,CACd,GAAI,EAAEA,aAAmBC,GAAoB,MAAMD,EACnD,EAAU,GACVT,EAAY,KAAK,MAAMW,EAAgB,0BAA2BF,EAAQ,QAASH,EAAY,QAAQ,CAAC,CAC5G,CAEJ,IAAMM,EAAWX,EAAa,OAAO,GAAeG,EAAQ,IAAIE,CAAW,CAAC,EAAE,cAAgB,SAAW,gBAAgBA,CAAW,CAAC,EACjIO,EAAgBT,EAAQ,IAAIQ,EAAS,EAAE,GAAKJ,EAChD,IAAK,IAAMF,KAAeM,EAAS,MAAM,CAAC,EAClCR,EAAQ,IAAIE,CAAW,CAAC,EAAE,cAAgBO,EAAc,cACxD,EAAU,GACVb,EAAY,KAAK,MAAMW,EAAgB,kBAAmB,2GAA4GL,EAAY,QAAQ,CAAC,GAG/LD,IAAS,EAAgBS,GAC7B,IAAMC,kBAAQ,IAAI,IACZC,EAAW,kBAAiCf,EAAa,QAAQ,GAAeK,EAAY,QAAQ,EAAG,iBAAkBN,EAAa,IAAA,GAAWe,CAAK,EACtJE,EAAQ,kBAA8BhB,EAAa,QAAQ,GAAeK,EAAY,KAAK,EAAG,iBAAkBN,EAAa,IAAA,GAAWe,CAAK,EAC7IG,EAAajB,EAAa,QAAQ,GAAeK,EAAY,UAAY,KAAO,CAAC,EAAI,CAACA,EAAY,QAAQ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c,EAAiB,KAA0C,CAAE,SAAU,UAAW,OAAM,UAAS,UAAS,GAGzI,SAAS,YAAyC,EAAW,EAAqE,CAC9H,OAAOC,EAAO,SAAW,EAAI,CAAC,EAAI,EAAGT,GAAMS,CAAO,CACtD"}
1
+ {"version":3,"file":"PlayFolderMerge.js","names":["diagnostics","applications","documents","document","options","invalid","application","validatedSourceOptions","legacySourceOptions","failure","InvalidSyntaxJson","DiagnosticCodes","asserted","sourceOptions","invalidSourceOptions","named","concepts","types","identities","extra","readModes","modes","domains","domain","modules","personas","value","item","identityContext","ParserContext","LineReader","validateApplicationHandlers","validateIdentity","all","diagnostic","isAuthoredDocument","node","module","parts","part","reference","features","left","right","feature","kept","authorization","declarations","declaration","first","earlier","toSyntaxJson","owner","combineAuthorize","combined","next","seen","items","key","groups","documented","disagreeing","described","claimed","keyword","within","path","values"],"sources":["../../../../../../Compiler/Files/PlayFolderMerge.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { validateIdentity } from '../Parsing/IdentityValidator';\nimport { validateApplicationHandlers } from '../Parsing/CommandHandlerValidator';\nimport { ParserContext } from '../Parsing/ParserContext';\nimport { LineReader } from '../Parsing/LineReader';\nimport { Diagnostic } from '../Diagnostics/Diagnostic';\nimport { DiagnosticCodes } from '../Diagnostics/DiagnosticCodes';\nimport { SourceLocation } from '../Diagnostics/SourceLocation';\nimport { combineAuthorize } from '../Parsing/AuthorizeParser';\nimport { CompilationResult } from '../ScreenplayCompiler';\nimport { AuthorizeSyntax, PersonaSyntax } from '../Syntax/Authorization';\nimport { ConceptSyntax, TypeSyntax } from '../Syntax/Declarations';\nimport { ApplicationSyntax, FeatureSyntax, ModuleSyntax } from '../Syntax/Structure';\nimport { toSyntaxJson } from '../Syntax/SyntaxJson';\nimport { invalidSourceOptions, isAuthoredDocument, legacySourceOptions, SourceOptions, validatedSourceOptions } from '../Syntax/SourceOptions';\nimport { InvalidSyntaxJson } from '../Syntax/InvalidSyntaxJson';\n\n// \"The documents of a folder are one document\": modules and features with the same name combine, and a\n// name declared in two files is reported - the port of the C# PlayFolderMerge for what this compiler\n// models. The semantic validation the C# merge runs afterwards is not ported.\nexport function mergeDocuments(documents: readonly CompilationResult<ApplicationSyntax>[]): CompilationResult<ApplicationSyntax> {\n const diagnostics: Diagnostic[] = [];\n const applications = documents.map(document => document.value);\n const options = new Map<ApplicationSyntax, SourceOptions>();\n let invalid = false;\n for (const application of applications) {\n try {\n options.set(application, Object.hasOwn(application, 'sourceOptions') ? validatedSourceOptions(application.sourceOptions) : legacySourceOptions);\n } catch (failure) {\n if (!(failure instanceof InvalidSyntaxJson)) throw failure;\n invalid = true;\n diagnostics.push(error(DiagnosticCodes.IncompatibleNumericSource, failure.message, application.location));\n }\n }\n const asserted = applications.filter(application => options.get(application)?.numericMode === 'exact' || hasDeclarations(application));\n let sourceOptions = options.get(asserted[0]) ?? legacySourceOptions;\n for (const application of asserted.slice(1)) {\n if (options.get(application)?.numericMode !== sourceOptions.numericMode) {\n invalid = true;\n diagnostics.push(error(DiagnosticCodes.MixedNumericModes, 'Declaration-bearing documents and marked import barrels must independently select the same numeric mode.', application.location));\n }\n }\n if (invalid) sourceOptions = invalidSourceOptions;\n const named = new Map<string, SourceLocation>();\n const concepts = declaredInOneFile<ConceptSyntax>(applications.flatMap(application => application.concepts), 'declaration of', diagnostics, undefined, named);\n const types = declaredInOneFile<TypeSyntax>(applications.flatMap(application => application.types), 'declaration of', diagnostics, undefined, named);\n const identities = applications.flatMap(application => application.identity == null ? [] : [application.identity]);\n for (const extra of identities.slice(1)) diagnostics.push(error(DiagnosticCodes.RepeatedSingularDeclarationAcrossFiles,\n `The folder already declares an identity block in '${describe(identities[0].location.path)}' - a folder compiles to one application, which can have at most one`, extra.location));\n const readModes = applications.filter(application => application.commandReadMode != null);\n for (const extra of readModes.slice(1)) diagnostics.push(error(DiagnosticCodes.InvalidCommandReadsDeclaration,\n \"Declare 'command reads protected' once at the application root.\", extra.location));\n const modes = applications.filter(application => application.reactionProductionMode != null);\n for (const extra of modes.slice(1)) diagnostics.push(error(DiagnosticCodes.InvalidReactionBatchesDeclaration,\n \"Declare 'reaction batches atomic' once at the application root.\", extra.location));\n const domains = applications.map(application => application.domain).filter(domain => domain !== null);\n for (const extra of domains.slice(1)) {\n diagnostics.push(error(DiagnosticCodes.RepeatedSingularDeclarationAcrossFiles,\n `The folder already declares a domain in '${describe(domains[0].location.path)}' - a folder compiles to one application, which can have at most one`, extra.location));\n }\n // Modules merge before personas are claimed, so the diagnostics come in the order the C# merge reports them.\n const modules = mergeModules(applications.flatMap(application => application.modules), diagnostics);\n const personas = declaredInOneFile<PersonaSyntax>(applications.flatMap(application => application.personas), 'persona', diagnostics);\n const value: ApplicationSyntax = {\n kind: 'ApplicationSyntax',\n sourceOptions,\n ...(modes.length === 0 ? {} : { reactionProductionMode: modes[0].reactionProductionMode }),\n ...(readModes.length === 0 ? {} : { commandReadMode: readModes[0].commandReadMode }),\n ...(identities.length === 0 ? {} : { identity: identities[0] }),\n domain: domains[0] ?? null,\n imports: firstOfEach(applications.flatMap(application => application.imports), item => item.qualifiedName),\n concepts,\n types,\n examples: applications.flatMap(application => application.examples ?? []),\n systems: applications.flatMap(application => application.systems ?? []),\n purposes: declaredInOneFile(applications.flatMap(application => application.purposes ?? []), 'purpose', diagnostics),\n eventSources: applications.flatMap(application => application.eventSources ?? []),\n declaredTriggers: applications.flatMap(application => application.declaredTriggers ?? []),\n modules,\n personas,\n policies: applications.flatMap(application => application.policies ?? []),\n seeds: applications.flatMap(application => application.seeds ?? []),\n fileImports: applications.flatMap(application => application.fileImports),\n ...presentOnly('exposures', applications.flatMap(application => application.exposures ?? [])),\n ...presentOnly('instanceContributions', applications.flatMap(application => application.instanceContributions ?? [])),\n location: applications[0]?.location ?? { line: 1, column: 1 },\n };\n const identityContext = new ParserContext(new LineReader([]));\n validateApplicationHandlers(value, identityContext);\n validateIdentity(value, identityContext);\n diagnostics.push(...identityContext.diagnostics);\n const all = [...documents.flatMap(document => document.diagnostics), ...diagnostics];\n return { value, diagnostics: all, success: !all.some(diagnostic => diagnostic.severity === 'error') };\n}\n\nfunction hasDeclarations(application: ApplicationSyntax): boolean {\n if (isAuthoredDocument(application)) return true;\n if (application.identity != null || application.domain !== null || application.concepts.length > 0 || application.types.length > 0 || application.personas.length > 0 || (application.policies?.length ?? 0) > 0 || (application.purposes?.length ?? 0) > 0 || (application.seeds?.length ?? 0) > 0 || (application.systems?.length ?? 0) > 0 || (application.eventSources?.length ?? 0) > 0 || (application.examples?.length ?? 0) > 0) return true;\n const feature = (node: FeatureSyntax): boolean => !node.isPlacement || (node.examples?.length ?? 0) > 0 || node.slices.length > 0 || node.features.some(feature);\n return application.modules.some(module => !module.isPlacement || (module.examples?.length ?? 0) > 0 || module.features.some(feature));\n}\n\nfunction mergeModules(modules: readonly ModuleSyntax[], diagnostics: Diagnostic[]): ModuleSyntax[] {\n return groupByName(modules).map(placedLast).map(parts => parts.length === 1 ? { ...parts[0], isPlacement: false, features: parts[0].features.map(unplaced) } : {\n ...parts[0],\n isPlacement: false,\n fileImports: parts.flatMap(part => part.fileImports),\n examples: parts.flatMap(part => part.examples ?? []),\n purposes: firstOfEach(parts.flatMap(part => part.purposes ?? []), reference => reference.name),\n description: firstDescription(parts, `module '${parts[0].name}'`, diagnostics),\n documentation: firstDocumentation(parts, `module '${parts[0].name}'`, diagnostics),\n authorize: combineAuthorization(parts.map(part => part.authorize), `module '${parts[0].name}'`, diagnostics),\n dependsOn: groupDependencies(parts),\n features: mergeFeatures(parts.flatMap(part => part.features), diagnostics),\n });\n}\n\nfunction mergeFeatures(features: readonly FeatureSyntax[], diagnostics: Diagnostic[]): FeatureSyntax[] {\n return groupByName(features).map(placedLast).map(parts => parts.length === 1 ? unplaced(parts[0]) : {\n ...parts[0],\n isPlacement: false,\n fileImports: parts.flatMap(part => part.fileImports),\n examples: parts.flatMap(part => part.examples ?? []),\n purposes: firstOfEach(parts.flatMap(part => part.purposes ?? []), reference => reference.name),\n description: firstDescription(parts, `feature '${parts[0].name}'`, diagnostics),\n documentation: firstDocumentation(parts, `feature '${parts[0].name}'`, diagnostics),\n authorize: combineAuthorization(parts.map(part => part.authorize), `feature '${parts[0].name}'`, diagnostics),\n dependsOn: groupDependencies(parts),\n features: mergeFeatures(parts.flatMap(part => part.features), diagnostics),\n slices: declaredInOneFile(parts.flatMap(part => part.slices), 'slice', diagnostics, `feature '${parts[0].name}'`),\n });\n}\n\n// Dependencies accumulate in path order, independently of which header owns the container.\nfunction groupDependencies(parts: readonly (ModuleSyntax | FeatureSyntax)[]) {\n return [...parts].sort((left, right) => (left.location.path ?? '') < (right.location.path ?? '') ? -1 : (left.location.path ?? '') > (right.location.path ?? '') ? 1 : 0).flatMap(part => part.dependsOn ?? []);\n}\n\n// Where a module or feature is written comes before files merely placed in it, so the merged one is located\n// at its declaration. Within each kind, path order is kept.\nfunction placedLast<T extends { readonly isPlacement: boolean }>(parts: readonly T[]): T[] {\n return [...parts.filter(part => !part.isPlacement), ...parts.filter(part => part.isPlacement)];\n}\n\n// Once merged, a feature is the feature - whether a file was placed in it no longer says anything.\nfunction unplaced(feature: FeatureSyntax): FeatureSyntax {\n return { ...feature, isPlacement: false, features: feature.features.map(unplaced) };\n}\n\n// Combines the gates files declare on one module or feature with 'and', never weakening an earlier one. The\n// same gate repeated in another file says nothing new and is reported and left out.\nfunction combineAuthorization(declarations: readonly (AuthorizeSyntax | null)[], owner: string, diagnostics: Diagnostic[]): AuthorizeSyntax | null {\n const kept: AuthorizeSyntax[] = [];\n for (const authorization of declarations.filter(declaration => declaration !== null)) {\n const first = kept.find(earlier => earlier.location.path !== authorization.location.path\n && JSON.stringify(toSyntaxJson(earlier)) === JSON.stringify(toSyntaxJson(authorization)));\n if (first !== undefined) {\n diagnostics.push(warning(DiagnosticCodes.DuplicateAuthorizationAcrossFiles,\n `An identical authorization is already declared on the ${owner} in '${describe(first.location.path)}' - this repeated gate is ignored`, authorization.location));\n continue;\n }\n kept.push(authorization);\n }\n return kept.reduce<AuthorizeSyntax | null>((combined, next) => combineAuthorize(combined, next), null);\n}\n\nfunction firstOfEach<T>(items: readonly T[], key: (item: T) => string): T[] {\n const seen = new Set<string>();\n return items.filter(item => !seen.has(key(item)) && seen.add(key(item)) !== undefined);\n}\n\n// Groups by name, keeping the order each name first appears in.\nfunction groupByName<T extends { readonly name: string }>(items: readonly T[]): T[][] {\n const groups = new Map<string, T[]>();\n for (const item of items) {\n groups.set(item.name, [...(groups.get(item.name) ?? []), item]);\n }\n return [...groups.values()];\n}\n\nfunction firstDocumentation(parts: readonly { documentation?: string | null; location: SourceLocation }[], owner: string, diagnostics: Diagnostic[]): string | null {\n const documented = parts.filter(part => part.documentation != null);\n for (const disagreeing of documented.slice(1).filter(part => part.documentation !== documented[0].documentation)) {\n diagnostics.push(warning(DiagnosticCodes.ConflictingDocumentationAcrossFiles,\n `The ${owner} is already documented in '${describe(documented[0].location.path)}' - keeping that documentation`, disagreeing.location));\n }\n return documented[0]?.documentation ?? null;\n}\n\nfunction firstDescription(parts: readonly { description: string | null; location: SourceLocation }[], owner: string, diagnostics: Diagnostic[]): string | null {\n const described = parts.filter(part => part.description !== null);\n for (const disagreeing of described.slice(1).filter(part => part.description !== described[0].description)) {\n diagnostics.push(warning(DiagnosticCodes.ConflictingDescriptionAcrossFiles,\n `The ${owner} is already described in '${describe(described[0].location.path)}' - keeping that description`, disagreeing.location));\n }\n return described[0]?.description ?? null;\n}\n\n// Keeps the first declaration of each name; one in another file with the same name is reported and dropped.\n// A repeat within one file is left for that file's own checks.\nfunction declaredInOneFile<T extends { readonly name: string; readonly location: SourceLocation }>(\n declarations: readonly T[], keyword: string, diagnostics: Diagnostic[], within?: string, claimed = new Map<string, SourceLocation>()): T[] {\n const kept: T[] = [];\n for (const declaration of declarations) {\n const first = claimed.get(declaration.name);\n if (first !== undefined && first.path !== declaration.location.path) {\n diagnostics.push(error(DiagnosticCodes.RepeatedDeclarationAcrossFiles,\n `Duplicate ${keyword} '${declaration.name}'${within === undefined ? '' : ` in ${within}`} - already declared in '${describe(first.path)}'`, declaration.location));\n continue;\n }\n if (first === undefined) {\n claimed.set(declaration.name, declaration.location);\n }\n kept.push(declaration);\n }\n return kept;\n}\n\nconst describe = (path: string | undefined): string => path ?? 'another file';\nconst error = (code: string, message: string, location: SourceLocation): Diagnostic => ({ severity: 'error', code, message, location });\nconst warning = (code: string, message: string, location: SourceLocation): Diagnostic => ({ severity: 'warning', code, message, location });\n\n// Composition members are written only when a document declares them, matching the C# canonical JSON.\nfunction presentOnly<TKey extends string, TValue>(key: TKey, values: readonly TValue[]): Partial<Record<TKey, readonly TValue[]>> {\n return values.length === 0 ? {} : { [key]: values } as Partial<Record<TKey, readonly TValue[]>>;\n}\n"],"mappings":"4sBAsBA,SAAgB,eAAe,EAAkG,CAC7H,IAAMA,EAA4B,CAAC,EAC7BC,EAAeC,EAAU,IAAI,GAAYC,EAAS,KAAK,EACvDC,kBAAU,IAAI,IAChBC,EAAU,GACd,IAAK,IAAMC,KAAeL,EACtB,GAAI,CACAG,EAAQ,IAAIE,EAAa,OAAO,OAAOA,EAAa,eAAe,EAAIC,EAAuBD,EAAY,aAAa,EAAIE,CAAmB,CAClJ,OAASC,EAAS,CACd,GAAI,EAAEA,aAAmBC,GAAoB,MAAMD,EACnD,EAAU,GACVT,EAAY,KAAK,MAAMW,EAAgB,0BAA2BF,EAAQ,QAASH,EAAY,QAAQ,CAAC,CAC5G,CAEJ,IAAMM,EAAWX,EAAa,OAAO,GAAeG,EAAQ,IAAIE,CAAW,CAAC,EAAE,cAAgB,SAAW,gBAAgBA,CAAW,CAAC,EACjIO,EAAgBT,EAAQ,IAAIQ,EAAS,EAAE,GAAKJ,EAChD,IAAK,IAAMF,KAAeM,EAAS,MAAM,CAAC,EAClCR,EAAQ,IAAIE,CAAW,CAAC,EAAE,cAAgBO,EAAc,cACxD,EAAU,GACVb,EAAY,KAAK,MAAMW,EAAgB,kBAAm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AiB,EAA2B,EAAiB,kBAAU,IAAI,IAAoC,CAC3I,IAAMjB,EAAY,CAAC,EACnB,IAAK,IAAMG,KAAeD,EAAc,CACpC,IAAME,EAAQc,EAAQ,IAAIf,EAAY,IAAI,EACtCC,IAAU,IAAA,IAAaA,EAAM,OAASD,EAAY,SAAS,KAC3DhD,EAAY,KAAK,MAAMW,EAAgB,+BACnC,aAAaqD,EAAQ,IAAIhB,EAAY,KAAK,GAAGiB,IAAW,IAAA,GAAY,GAAK,OAAOA,IAAS,0BAA0B,SAAShB,EAAM,IAAI,EAAE,GAAID,EAAY,QAAQ,CAAC,GAGrKC,IAAU,IAAA,IACVc,EAAQ,IAAIf,EAAY,KAAMA,EAAY,QAAQ,EAEtDH,EAAK,KAAKG,CAAW,EACzB,CACA,OAAOH,CACX,CAEA,MAAM,SAAY,GAAqCqB,GAAQ,eACzD,OAAS,EAAc,EAAiB,KAA0C,CAAE,SAAU,QAAS,OAAM,UAAS,UAAS,GAC/H,SAAW,EAAc,EAAiB,KAA0C,CAAE,SAAU,UAAW,OAAM,UAAS,UAAS,GAGzI,SAAS,YAAyC,EAAW,EAAqE,CAC9H,OAAOC,EAAO,SAAW,EAAI,CAAC,EAAI,EAAGT,GAAMS,CAAO,CACtD"}
@@ -1,2 +1,2 @@
1
- import"../../_virtual/_virtual/_rolldown/runtime.js";import{DiagnosticCodes as e}from"../Diagnostics/DiagnosticCodes.js";import{stringBodyPattern as t,unescapeString as n}from"../Text/StringLiteral.js";import{nativePattern as r,pattern as i}from"../Text/patterns.js";import{locationOf as a}from"./SourceLine.js";import{parseModeledMappingSource as o}from"./ExpressionParser.js";import{firstWord as s,unescapeIdentifier as c}from"./LineText.js";import"../Syntax/CaptureEventsSource.js";import{parseTag as l}from"./DeclarationParsers.js";import{parseProjectionExpression as u}from"./ProjectionExpressionParser.js";const grammar=e=>({legacy:i(e),native:r(e)}),d=grammar(`^capture\\s+([A-Za-z_]\\w*)$`),f=/^[A-Za-z_][\w.]*$/,p=grammar(`^append\\s+([A-Z]\\w*)$`),m=grammar(`^children\\s+([a-z_]\\w*)\\s+identified\\s+by\\s+([\\w.]+)$`),h=grammar(`^nested\\s+([\\w.]+)$`),select=(e,t)=>e.sourceOptions.numericMode===`exact`?t.native:t.legacy,g=r(`^(@?[\\w.]+)\\s*=(?!=|>)\\s*(.+)$`),_=r(`^([a-z_]\\w*)\\s*=\\s*(.+)$`),v=r(`^"(${t})"\\s*=>\\s*(\\w+)$`),y=r(`^split\\s+(\\S+)\\s+by\\s+"(${t})"$`),b=new RegExp(r(`"${t}"|[\\w.]+`).source,`gu`),x=r(`^[\\w.]+$`);function parseCapture(t,n){let r=t;t=t.valueContext;let i=select(t,d).exec(n.content)?.[1]??``;i===``&&t.sourceOptions.numericMode===`exact`&&t.error(e.InvalidCaptureDeclaration,`Invalid capture declaration '${n.content}' - expected 'capture <Name>'`,a(n));let o=null,c=null,l=[],u=[],f=[],p=[];for(let i=t.peekChild(n.indent);i!==void 0;i=t.peekChild(n.indent))switch(t.reader.takeSignificant(),s(i.content)){case`source`:o=parseSource(t,i,r);break;case`key`:c=i.content.substring(3).trim();break;case`map`:l.push(...parseMap(t,i));break;case`append`:pushAppend(t,i,u);break;case`children`:{let n=select(t,m).exec(i.content);if(n===null){t.error(e.InvalidChildrenDeclaration,`Invalid children declaration '${i.content}' - expected 'children <collection> identified by <key>'`,a(i)),t.skipOpaqueBlock(i.indent);break}let r=mapAndAppends(t,i);n!==null&&f.push({kind:`CaptureChildrenSyntax`,property:n[1],identifiedBy:n[2],...r,location:a(i)});break}case`nested`:{let n=select(t,h).exec(i.content);if(n===null){t.error(e.InvalidNestedDeclaration,`Invalid nested declaration '${i.content}' - expected 'nested <Property>'`,a(i)),t.skipOpaqueBlock(i.indent);break}let r=mapAndAppends(t,i);n!==null&&p.push({kind:`CaptureNestedSyntax`,property:n[1],...r,location:a(i)});break}default:t.error(e.UnknownCaptureDirective,`Unexpected '${i.content}' in capture body`,a(i)),t.skipOpaqueBlock(i.indent)}return{kind:`CaptureSyntax`,sourceOptions:t.sourceOptions,name:i,source:o,key:c,map:l,appends:u,children:f,nested:p,location:a(n)}}function parseSource(e,t,n){let r=[];for(let n=e.peekChild(t.indent);n!==void 0;n=e.peekChild(t.indent)){e.reader.takeSignificant();let t=s(n.content);r.push({kind:`CaptureSourceSettingSyntax`,name:t,value:n.content.substring(t.length).trim(),location:a(n)})}let i=t.content.substring(6).trim();return i===`events`&&validateEventsSource(n,t,r),{kind:`CaptureSourceSyntax`,syntaxKind:i,settings:r,location:a(t)}}function validateEventsSource(t,n,r){r.length===0&&t.error(e.InvalidCaptureEventsSource,`'source events' needs at least one 'from <Event>' line naming a public event to consume`,a(n));let i=/* @__PURE__ */ new Set;for(let n of r)n.name===`from`?f.test(n.value)?i.has(n.value)?t.error(e.InvalidCaptureEventsSource,`Event '${n.value}' is already consumed by this 'source events'`,n.location):i.add(n.value):t.error(e.InvalidCaptureEventsSource,`Invalid event '${n.value}' - expected 'from <Event>', optionally qualified with dots`,n.location):t.error(e.InvalidCaptureEventsSource,`'source events' accepts only 'from <Event>' lines, got '${n.name}'`,n.location)}function parseMap(t,r){let i=[];for(let o=t.peekChild(r.indent);o!==void 0;o=t.peekChild(r.indent)){t.reader.takeSignificant();let r=a(o);if(s(o.content)===`split`){let s=y.exec(o.content);if(s===null){t.error(e.InvalidSplitDeclaration,`Invalid split operation '${o.content}' - expected 'split <property> by "<separator>"'`,r),t.skipOpaqueBlock(o.indent);continue}let c=[];for(let n=t.peekChild(o.indent);n!==void 0;n=t.peekChild(o.indent))t.reader.takeSignificant(),x.test(n.content)?c.push(n.content):t.error(e.InvalidSplitTarget,`Invalid split target '${n.content}' - expected a property path`,a(n));s!==null&&i.push({kind:`CaptureSplitSyntax`,source:u(s[1],r,t),separator:n(s[2]),targets:c,location:r});continue}let c=_.exec(o.content);if(c===null){t.error(e.InvalidMapEntry,`Invalid map entry '${o.content}' - expected '<property> = <source> [translate]'`,r),t.skipOpaqueBlock(o.indent);continue}let l=c[2].trim(),d=l.startsWith("`")?l.indexOf("`",1):-1,f=l.startsWith("`")?d>=0&&l.substring(d+1).trim()===`translate`:l.endsWith(` translate`),p=l.startsWith("`")&&d>=0&&(t.sourceOptions.numericMode!==`exact`||f||l.substring(d+1).trim()===``)?l.substring(0,d+1):f?l.substring(0,l.length-10).trimEnd():l,m=[];if(f)for(let r=t.peekChild(o.indent);r!==void 0;r=t.peekChild(o.indent)){t.reader.takeSignificant();let i=v.exec(r.content);i===null?t.error(e.InvalidTranslation,`Invalid translation '${r.content}' - expected '"<source>" => <target>'`,a(r)):m.push({kind:`CaptureTranslationSyntax`,from:n(i[1]),to:i[2],location:a(r)})}i.push({kind:`CaptureMapEntrySyntax`,property:c[1],source:u(p,r,t),translations:m,location:r})}return i}function mapAndAppends(t,n){let r=[],i=[];for(let o=t.peekChild(n.indent);o!==void 0;o=t.peekChild(n.indent))t.reader.takeSignificant(),s(o.content)===`map`?r=parseMap(t,o):s(o.content)===`append`?pushAppend(t,o,i):(t.error(e.UnknownCaptureBlockDirective,`Unexpected '${o.content}' in ${s(n.content)} block - expected 'map' or 'append <EventType>'`,a(o)),t.skipOpaqueBlock(o.indent));return{map:r,appends:i}}function pushAppend(t,n,r){let i=select(t,p).exec(n.content);if(i===null){t.error(e.InvalidAppendDeclaration,`Invalid append declaration '${n.content}' - expected 'append <EventType>'`,a(n)),t.skipOpaqueBlock(n.indent);return}let u=[],d=[],f=null,mapping=(n,r=!1)=>{let i=a(n);if(s(n.content)===`tag`){let e=l(t.valueContext,n,!1);e!==void 0&&d.push(e);return}let f=g.exec(n.content);f===null?t.error(r?e.InvalidPropertyMapping:e.UnknownAppendDirective,`Unexpected '${n.content}' in append body`,i):u.push({kind:`PropertyMappingSyntax`,property:c(f[1]),source:o(f[2],i,t.valueContext),location:i})};for(let e=t.peekChild(n.indent);e!==void 0;e=t.peekChild(n.indent))if(t.reader.takeSignificant(),s(e.content)===`when`){f=parseWhen(t,e);for(let n=t.peekChild(e.indent);n!==void 0;n=t.peekChild(e.indent))t.reader.takeSignificant(),mapping(n,!0)}else mapping(e);r.push({kind:`CaptureAppendSyntax`,event:i[1],when:f,mappings:u,tags:d,location:a(n)})}function parseWhen(t,r){let i=r.content.substring(4).trim(),o=a(r),value=(e,t=[],n=null,r=null,i=null)=>({kind:`CaptureWhenSyntax`,syntaxKind:e,properties:t,fromValue:n,toValue:r,expression:i,location:o});if(i===`added`)return value(`Added`);if(i===`removed`)return value(`Removed`);if(i.startsWith("`"))return(!i.endsWith("`")||i.length<2)&&t.error(e.UnterminatedTemplateExpression,`Unterminated template expression in 'when' - expected a closing backtick`,o),value(`Expression`,[],null,null,i);if(i.length===0)return t.error(e.WhenWithoutTrigger,`Expected a trigger after 'when'`,o),null;let s=[...i.match(t.sourceOptions.numericMode===`exact`?/* @__PURE__ */ RegExp(`"(?:[^"\\\\]|\\\\.)*"|[^\\s]+`,`gu`):b)??[]],unquote=e=>e.startsWith(`"`)&&e.endsWith(`"`)?n(e.substring(1,e.length-1)):e;if(s.length===0)return t.error(e.InvalidWhenClause,`Invalid 'when' clause '${r.content}'`,o),null;if(s.length===1)return value(`PropertyChanged`,[unquote(s[0])]);if(s[1]===`from`)return s.length===5&&s[3]===`to`?value(`ValueTransition`,[unquote(s[0])],unquote(s[2]),unquote(s[4])):(t.error(e.InvalidWhenTransitionClause,`Invalid 'when ... from ... to ...' clause '${r.content}'`,o),null);if(s[1]!==`or`&&s[1]!==`and`)return t.error(e.InvalidWhenClause,`Invalid 'when' clause '${r.content}'`,o),null;if(s.length%2==0)return t.error(e.WhenCombinatorWithoutProperty,`Expected a property after '${s[1]}'`,o),null;let c=[unquote(s[0])];for(let n=1;n<s.length-1;n+=2){if(s[n]!==s[1])return t.error(e.MixedWhenCombinators,`Cannot mix 'and' and 'or' in a single 'when' clause '${r.content}'`,o),null;c.push(unquote(s[n+1]))}return value(s[1]===`or`?`LogicalOr`:`LogicalAnd`,c)}export{parseCapture};
1
+ import"../../_virtual/_virtual/_rolldown/runtime.js";import{DiagnosticCodes as e}from"../Diagnostics/DiagnosticCodes.js";import{stringBodyPattern as t,unescapeString as n}from"../Text/StringLiteral.js";import{nativePattern as r,pattern as i}from"../Text/patterns.js";import{locationOf as a}from"./SourceLine.js";import{parseModeledMappingSource as o}from"./ExpressionParser.js";import{diagnosticText as s}from"../Diagnostics/DiagnosticArgument.js";import{firstWord as c,unescapeIdentifier as l}from"./LineText.js";import"../Syntax/CaptureEventsSource.js";import{parseTag as u}from"./DeclarationParsers.js";import{parseProjectionExpression as d}from"./ProjectionExpressionParser.js";const grammar=e=>({legacy:i(e),native:r(e)}),f=grammar(`^capture\\s+([A-Za-z_]\\w*)$`),p=/^[A-Za-z_][\w.]*$/,m=grammar(`^append\\s+([A-Z]\\w*)$`),h=grammar(`^children\\s+([a-z_]\\w*)\\s+identified\\s+by\\s+([\\w.]+)$`),g=grammar(`^nested\\s+([\\w.]+)$`),select=(e,t)=>e.sourceOptions.numericMode===`exact`?t.native:t.legacy,_=r(`^(@?[\\w.]+)\\s*=(?!=|>)\\s*(.+)$`),v=r(`^([a-z_]\\w*)\\s*=\\s*(.+)$`),y=r(`^"(${t})"\\s*=>\\s*(\\w+)$`),b=r(`^split\\s+(\\S+)\\s+by\\s+"(${t})"$`),x=new RegExp(r(`"${t}"|[\\w.]+`).source,`gu`),S=r(`^[\\w.]+$`);function parseCapture(t,n){let r=t;t=t.valueContext;let i=select(t,f).exec(n.content)?.[1]??``;i===``&&t.sourceOptions.numericMode===`exact`&&t.error(e.InvalidCaptureDeclaration,`Invalid capture declaration '${n.content}' - expected 'capture <Name>'`,a(n));let o=null,s=null,l=[],u=[],d=[],p=[];for(let i=t.peekChild(n.indent);i!==void 0;i=t.peekChild(n.indent))switch(t.reader.takeSignificant(),c(i.content)){case`source`:o=parseSource(t,i,r);break;case`key`:s=i.content.substring(3).trim();break;case`map`:l.push(...parseMap(t,i));break;case`append`:pushAppend(t,i,u);break;case`children`:{let n=select(t,h).exec(i.content);if(n===null){t.error(e.InvalidChildrenDeclaration,`Invalid children declaration '${i.content}' - expected 'children <collection> identified by <key>'`,a(i)),t.skipOpaqueBlock(i.indent);break}let r=mapAndAppends(t,i);n!==null&&d.push({kind:`CaptureChildrenSyntax`,property:n[1],identifiedBy:n[2],...r,location:a(i)});break}case`nested`:{let n=select(t,g).exec(i.content);if(n===null){t.error(e.InvalidNestedDeclaration,`Invalid nested declaration '${i.content}' - expected 'nested <Property>'`,a(i)),t.skipOpaqueBlock(i.indent);break}let r=mapAndAppends(t,i);n!==null&&p.push({kind:`CaptureNestedSyntax`,property:n[1],...r,location:a(i)});break}default:t.error(e.UnknownCaptureDirective,`Unexpected '${i.content}' in capture body`,a(i)),t.skipOpaqueBlock(i.indent)}return{kind:`CaptureSyntax`,sourceOptions:t.sourceOptions,name:i,source:o,key:s,map:l,appends:u,children:d,nested:p,location:a(n)}}function parseSource(e,t,n){let r=[];for(let n=e.peekChild(t.indent);n!==void 0;n=e.peekChild(t.indent)){e.reader.takeSignificant();let t=c(n.content);r.push({kind:`CaptureSourceSettingSyntax`,name:t,value:n.content.substring(t.length).trim(),location:a(n)})}let i=t.content.substring(6).trim();return i===`events`&&validateEventsSource(n,t,r),{kind:`CaptureSourceSyntax`,syntaxKind:i,settings:r,location:a(t)}}function validateEventsSource(t,n,r){r.length===0&&t.error(e.InvalidCaptureEventsSource,`'source events' needs at least one 'from <Event>' line naming a public event to consume`,a(n));let i=/* @__PURE__ */ new Set;for(let n of r)n.name===`from`?p.test(n.value)?i.has(n.value)?t.error(e.InvalidCaptureEventsSource,`Event '${n.value}' is already consumed by this 'source events'`,n.location):i.add(n.value):t.error(e.InvalidCaptureEventsSource,`Invalid event '${n.value}' - expected 'from <Event>', optionally qualified with dots`,n.location):t.error(e.InvalidCaptureEventsSource,`'source events' accepts only 'from <Event>' lines, got '${n.name}'`,n.location)}function parseMap(t,r){let i=[];for(let o=t.peekChild(r.indent);o!==void 0;o=t.peekChild(r.indent)){t.reader.takeSignificant();let r=a(o);if(c(o.content)===`split`){let s=b.exec(o.content);if(s===null){t.error(e.InvalidSplitDeclaration,`Invalid split operation '${o.content}' - expected 'split <property> by "<separator>"'`,r),t.skipOpaqueBlock(o.indent);continue}let c=[];for(let n=t.peekChild(o.indent);n!==void 0;n=t.peekChild(o.indent))t.reader.takeSignificant(),S.test(n.content)?c.push(n.content):t.error(e.InvalidSplitTarget,`Invalid split target '${n.content}' - expected a property path`,a(n));s!==null&&i.push({kind:`CaptureSplitSyntax`,source:d(s[1],r,t),separator:n(s[2]),targets:c,location:r});continue}let s=v.exec(o.content);if(s===null){t.error(e.InvalidMapEntry,`Invalid map entry '${o.content}' - expected '<property> = <source> [translate]'`,r),t.skipOpaqueBlock(o.indent);continue}let l=s[2].trim(),u=l.startsWith("`")?l.indexOf("`",1):-1,f=l.startsWith("`")?u>=0&&l.substring(u+1).trim()===`translate`:l.endsWith(` translate`),p=l.startsWith("`")&&u>=0&&(t.sourceOptions.numericMode!==`exact`||f||l.substring(u+1).trim()===``)?l.substring(0,u+1):f?l.substring(0,l.length-10).trimEnd():l,m=[];if(f)for(let r=t.peekChild(o.indent);r!==void 0;r=t.peekChild(o.indent)){t.reader.takeSignificant();let i=y.exec(r.content);i===null?t.error(e.InvalidTranslation,`Invalid translation '${r.content}' - expected '"<source>" => <target>'`,a(r)):m.push({kind:`CaptureTranslationSyntax`,from:n(i[1]),to:i[2],location:a(r)})}i.push({kind:`CaptureMapEntrySyntax`,property:s[1],source:d(p,r,t),translations:m,location:r})}return i}function mapAndAppends(t,n){let r=[],i=[];for(let o=t.peekChild(n.indent);o!==void 0;o=t.peekChild(n.indent))t.reader.takeSignificant(),c(o.content)===`map`?r=parseMap(t,o):c(o.content)===`append`?pushAppend(t,o,i):(t.error(e.UnknownCaptureBlockDirective,`Unexpected '${o.content}' in ${c(n.content)} block - expected 'map' or 'append <EventType>'`,a(o)),t.skipOpaqueBlock(o.indent));return{map:r,appends:i}}function pushAppend(t,n,r){let i=select(t,m).exec(n.content);if(i===null){t.error(e.InvalidAppendDeclaration,`Invalid append declaration '${n.content}' - expected 'append <EventType>'`,a(n)),t.skipOpaqueBlock(n.indent);return}let d=[],f=[],p=null,mapping=(n,r=!1)=>{let i=a(n);if(c(n.content)===`tag`){let e=u(t.valueContext,n,!1);e!==void 0&&f.push(e);return}let p=_.exec(n.content);p===null?t.error(r?e.InvalidPropertyMapping:e.UnknownAppendDirective,`Unexpected '${n.content}' in append body`,i,r?s(`text`,n.content):{}):d.push({kind:`PropertyMappingSyntax`,property:l(p[1]),source:o(p[2],i,t.valueContext),location:i})};for(let e=t.peekChild(n.indent);e!==void 0;e=t.peekChild(n.indent))if(t.reader.takeSignificant(),c(e.content)===`when`){p=parseWhen(t,e);for(let n=t.peekChild(e.indent);n!==void 0;n=t.peekChild(e.indent))t.reader.takeSignificant(),mapping(n,!0)}else mapping(e);r.push({kind:`CaptureAppendSyntax`,event:i[1],when:p,mappings:d,tags:f,location:a(n)})}function parseWhen(t,r){let i=r.content.substring(4).trim(),o=a(r),value=(e,t=[],n=null,r=null,i=null)=>({kind:`CaptureWhenSyntax`,syntaxKind:e,properties:t,fromValue:n,toValue:r,expression:i,location:o});if(i===`added`)return value(`Added`);if(i===`removed`)return value(`Removed`);if(i.startsWith("`"))return(!i.endsWith("`")||i.length<2)&&t.error(e.UnterminatedTemplateExpression,`Unterminated template expression in 'when' - expected a closing backtick`,o),value(`Expression`,[],null,null,i);if(i.length===0)return t.error(e.WhenWithoutTrigger,`Expected a trigger after 'when'`,o),null;let s=[...i.match(t.sourceOptions.numericMode===`exact`?/* @__PURE__ */ RegExp(`"(?:[^"\\\\]|\\\\.)*"|[^\\s]+`,`gu`):x)??[]],unquote=e=>e.startsWith(`"`)&&e.endsWith(`"`)?n(e.substring(1,e.length-1)):e;if(s.length===0)return t.error(e.InvalidWhenClause,`Invalid 'when' clause '${r.content}'`,o),null;if(s.length===1)return value(`PropertyChanged`,[unquote(s[0])]);if(s[1]===`from`)return s.length===5&&s[3]===`to`?value(`ValueTransition`,[unquote(s[0])],unquote(s[2]),unquote(s[4])):(t.error(e.InvalidWhenTransitionClause,`Invalid 'when ... from ... to ...' clause '${r.content}'`,o),null);if(s[1]!==`or`&&s[1]!==`and`)return t.error(e.InvalidWhenClause,`Invalid 'when' clause '${r.content}'`,o),null;if(s.length%2==0)return t.error(e.WhenCombinatorWithoutProperty,`Expected a property after '${s[1]}'`,o),null;let c=[unquote(s[0])];for(let n=1;n<s.length-1;n+=2){if(s[n]!==s[1])return t.error(e.MixedWhenCombinators,`Cannot mix 'and' and 'or' in a single 'when' clause '${r.content}'`,o),null;c.push(unquote(s[n+1]))}return value(s[1]===`or`?`LogicalOr`:`LogicalAnd`,c)}export{parseCapture};
2
2
  //# sourceMappingURL=CaptureParser.js.map